From 3bf15984fb4c86ef7658c15aa6dcf56c28abd042 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Mon, 20 Jul 2026 20:05:11 -0700 Subject: [PATCH 1/6] Regenerate client from latest OpenAPI spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supersedes #10 (owner_group_ids on heartbeat models) — that field is now included via the full regeneration. --- .serena/.gitignore | 2 + .serena/project.yml | 167 ++ pyproject.toml | 9 +- rootly_sdk/__init__.py | 2 +- rootly_sdk/api/__init__.py | 2 +- rootly_sdk/api/ai_chat/__init__.py | 1 + rootly_sdk/api/ai_chat/create_ai_chat.py | 259 ++ .../api/ai_chat/delete_ai_chat_session.py | 125 + .../ai_chat/list_ai_chat_session_messages.py | 225 ++ rootly_sdk/api/ai_chat/stream_ai_chat.py | 174 ++ rootly_sdk/api/alert_events/__init__.py | 2 +- .../api/alert_events/create_alert_event.py | 92 +- .../api/alert_events/delete_alert_event.py | 68 +- .../api/alert_events/get_alert_event.py | 80 +- .../api/alert_events/list_alert_events.py | 113 +- .../alert_events/list_alert_events_feed.py | 364 +++ .../api/alert_events/update_alert_event.py | 92 +- rootly_sdk/api/alert_fields/__init__.py | 2 +- .../api/alert_fields/create_alert_field.py | 79 +- .../api/alert_fields/delete_alert_field.py | 84 +- .../api/alert_fields/get_alert_field.py | 82 +- .../api/alert_fields/list_alert_fields.py | 270 ++- .../api/alert_fields/update_alert_field.py | 92 +- rootly_sdk/api/alert_groups/__init__.py | 2 +- .../api/alert_groups/create_alert_group.py | 79 +- .../api/alert_groups/delete_alert_group.py | 82 +- .../api/alert_groups/get_alert_group.py | 82 +- .../api/alert_groups/list_alert_groups.py | 188 +- .../api/alert_groups/update_alert_group.py | 92 +- rootly_sdk/api/alert_routes/__init__.py | 2 +- .../api/alert_routes/create_alert_route.py | 79 +- .../api/alert_routes/delete_alert_route.py | 84 +- .../api/alert_routes/get_alert_route.py | 82 +- .../api/alert_routes/list_alert_routes.py | 232 +- .../api/alert_routes/patch_alert_route.py | 94 +- .../api/alert_routes/update_alert_route.py | 92 +- .../api/alert_routing_rules/__init__.py | 2 +- .../create_alert_routing_rule.py | 79 +- .../delete_alert_routing_rule.py | 82 +- .../get_alert_routing_rule.py | 82 +- .../list_alert_routing_rules.py | 266 ++- .../update_alert_routing_rule.py | 92 +- rootly_sdk/api/alert_sources/__init__.py | 2 +- .../api/alert_sources/create_alerts_source.py | 79 +- .../api/alert_sources/delete_alerts_source.py | 80 +- .../api/alert_sources/get_alerts_source.py | 80 +- .../api/alert_sources/list_alerts_sources.py | 141 +- .../api/alert_sources/update_alerts_source.py | 90 +- rootly_sdk/api/alert_urgencies/__init__.py | 2 +- .../alert_urgencies/create_alert_urgency.py | 79 +- .../alert_urgencies/delete_alert_urgency.py | 80 +- .../api/alert_urgencies/get_alert_urgency.py | 80 +- .../alert_urgencies/list_alert_urgencies.py | 202 +- .../alert_urgencies/update_alert_urgency.py | 90 +- rootly_sdk/api/alerts/__init__.py | 2 +- rootly_sdk/api/alerts/acknowledge_alert.py | 82 +- rootly_sdk/api/alerts/attach_alert.py | 86 +- rootly_sdk/api/alerts/create_alert.py | 79 +- rootly_sdk/api/alerts/escalate_alert.py | 225 ++ rootly_sdk/api/alerts/get_alert.py | 92 +- rootly_sdk/api/alerts/get_receipt.py | 187 ++ rootly_sdk/api/alerts/list_alerts.py | 659 +++++- rootly_sdk/api/alerts/list_incident_alerts.py | 82 +- rootly_sdk/api/alerts/resolve_alert.py | 92 +- rootly_sdk/api/alerts/snooze_alert.py | 222 ++ rootly_sdk/api/alerts/update_alert.py | 92 +- rootly_sdk/api/api_keys/__init__.py | 2 +- rootly_sdk/api/api_keys/create_api_key.py | 79 +- rootly_sdk/api/api_keys/delete_api_key.py | 82 +- rootly_sdk/api/api_keys/get_api_key.py | 93 +- rootly_sdk/api/api_keys/list_api_keys.py | 264 ++- rootly_sdk/api/api_keys/rotate_api_key.py | 92 +- rootly_sdk/api/api_keys/update_api_key.py | 92 +- rootly_sdk/api/audits/__init__.py | 2 +- rootly_sdk/api/audits/list_audits.py | 398 +++- rootly_sdk/api/authorizations/__init__.py | 2 +- .../authorizations/create_authorization.py | 77 +- .../authorizations/delete_authorization.py | 80 +- .../api/authorizations/get_authorization.py | 80 +- .../api/authorizations/list_authorizations.py | 158 +- .../authorizations/update_authorization.py | 90 +- .../catalog_checklist_templates/__init__.py | 2 +- .../create_catalog_checklist_template.py | 79 +- .../delete_catalog_checklist_template.py | 82 +- .../get_catalog_checklist_template.py | 82 +- .../list_catalog_checklist_templates.py | 176 +- .../trigger_catalog_checklist_template.py | 70 +- .../update_catalog_checklist_template.py | 92 +- rootly_sdk/api/catalog_entities/__init__.py | 2 +- .../bulk_delete_catalog_entities.py | 250 ++ .../bulk_upsert_catalog_entities.py | 237 ++ .../catalog_entities/create_catalog_entity.py | 92 +- .../catalog_entities/delete_catalog_entity.py | 82 +- .../catalog_entities/get_catalog_entity.py | 94 +- .../catalog_entities/list_catalog_entities.py | 388 ++- .../catalog_entities/update_catalog_entity.py | 92 +- .../api/catalog_entity_checklists/__init__.py | 2 +- .../get_catalog_entity_checklist.py | 82 +- .../list_catalog_entity_checklists.py | 150 +- .../api/catalog_entity_properties/__init__.py | 2 +- .../create_catalog_entity_property.py | 92 +- .../delete_catalog_entity_property.py | 80 +- .../get_catalog_entity_property.py | 96 +- .../list_catalog_entity_properties.py | 171 +- .../update_catalog_entity_property.py | 90 +- rootly_sdk/api/catalog_properties/__init__.py | 2 +- .../create_catalog_property.py | 44 +- .../delete_catalog_property.py | 39 +- .../get_catalog_property.py | 39 +- .../list_catalog_properties.py | 39 +- .../update_catalog_property.py | 44 +- rootly_sdk/api/catalogs/__init__.py | 2 +- rootly_sdk/api/catalogs/create_catalog.py | 79 +- rootly_sdk/api/catalogs/delete_catalog.py | 82 +- rootly_sdk/api/catalogs/get_catalog.py | 82 +- rootly_sdk/api/catalogs/list_catalogs.py | 362 ++- rootly_sdk/api/catalogs/update_catalog.py | 92 +- rootly_sdk/api/causes/__init__.py | 2 +- rootly_sdk/api/causes/create_cause.py | 79 +- .../causes/create_cause_catalog_property.py | 79 +- rootly_sdk/api/causes/delete_cause.py | 82 +- rootly_sdk/api/causes/get_cause.py | 82 +- .../causes/list_cause_catalog_properties.py | 160 +- rootly_sdk/api/causes/list_causes.py | 262 ++- rootly_sdk/api/causes/update_cause.py | 92 +- .../api/communications_groups/__init__.py | 2 +- .../create_communications_group.py | 77 +- .../delete_communications_group.py | 68 +- .../get_communications_group.py | 80 +- .../list_communications_groups.py | 174 +- .../update_communications_group.py | 90 +- .../api/communications_stages/__init__.py | 2 +- .../create_communications_stage.py | 79 +- .../delete_communications_stage.py | 68 +- .../get_communications_stage.py | 80 +- .../list_communications_stages.py | 150 +- .../update_communications_stage.py | 90 +- .../api/communications_templates/__init__.py | 2 +- .../create_communications_template.py | 77 +- .../delete_communications_template.py | 68 +- .../get_communications_template.py | 80 +- .../list_communications_templates.py | 158 +- .../update_communications_template.py | 90 +- .../api/communications_types/__init__.py | 2 +- .../create_communications_type.py | 77 +- .../delete_communications_type.py | 68 +- .../get_communications_type.py | 80 +- .../list_communications_types.py | 150 +- .../update_communications_type.py | 90 +- rootly_sdk/api/custom_forms/__init__.py | 2 +- .../api/custom_forms/create_custom_form.py | 79 +- .../api/custom_forms/delete_custom_form.py | 82 +- .../api/custom_forms/get_custom_form.py | 82 +- .../api/custom_forms/list_custom_forms.py | 160 +- .../api/custom_forms/update_custom_form.py | 92 +- rootly_sdk/api/dashboard_panels/__init__.py | 2 +- .../create_dashboard_panel.py | 90 +- .../delete_dashboard_panel.py | 74 +- .../duplicate_dashboard_panel.py | 80 +- .../dashboard_panels/get_dashboard_panel.py | 101 +- .../dashboard_panels/list_dashboard_panels.py | 97 +- .../update_dashboard_panel.py | 84 +- rootly_sdk/api/dashboards/__init__.py | 2 +- rootly_sdk/api/dashboards/create_dashboard.py | 79 +- rootly_sdk/api/dashboards/delete_dashboard.py | 82 +- .../api/dashboards/duplicate_dashboard.py | 82 +- rootly_sdk/api/dashboards/get_dashboard.py | 94 +- rootly_sdk/api/dashboards/list_dashboards.py | 87 +- .../api/dashboards/set_default_dashboard.py | 82 +- rootly_sdk/api/dashboards/update_dashboard.py | 92 +- .../__init__.py | 2 +- .../create_custom_field_option.py | 92 +- .../delete_custom_field_option.py | 80 +- .../get_custom_field_option.py | 80 +- .../list_custom_field_options.py | 117 +- .../update_custom_field_option.py | 90 +- .../api/deprecated_custom_fields/__init__.py | 2 +- .../create_custom_field.py | 79 +- .../delete_custom_field.py | 80 +- .../get_custom_field.py | 92 +- .../list_custom_fields.py | 400 +++- .../update_custom_field.py | 90 +- .../__init__.py | 2 +- .../create_incident_custom_field_selection.py | 92 +- .../delete_incident_custom_field_selection.py | 80 +- .../get_incident_custom_field_selection.py | 80 +- .../list_incident_custom_field_selections.py | 105 +- .../update_incident_custom_field_selection.py | 90 +- .../__init__.py | 2 +- .../create_workflow_custom_field_selection.py | 90 +- .../delete_workflow_custom_field_selection.py | 80 +- .../get_workflow_custom_field_selection.py | 80 +- .../list_workflow_custom_field_selections.py | 105 +- .../update_workflow_custom_field_selection.py | 90 +- .../api/edge_connector_actions/__init__.py | 2 +- .../create_edge_connector_action.py | 46 +- .../delete_edge_connector_action.py | 47 +- .../get_edge_connector_action.py | 47 +- .../list_edge_connector_actions.py | 39 +- .../update_edge_connector_action.py | 53 +- rootly_sdk/api/edge_connectors/__init__.py | 2 +- .../edge_connectors/create_edge_connector.py | 39 +- .../edge_connectors/delete_edge_connector.py | 39 +- .../api/edge_connectors/get_edge_connector.py | 39 +- .../edge_connectors/list_edge_connectors.py | 49 +- .../edge_connectors/update_edge_connector.py | 46 +- rootly_sdk/api/environments/__init__.py | 2 +- .../environments/bulk_delete_environments.py | 237 ++ .../environments/bulk_upsert_environments.py | 236 ++ .../api/environments/create_environment.py | 79 +- .../create_environment_catalog_property.py | 79 +- .../api/environments/delete_environment.py | 82 +- .../api/environments/get_environment.py | 82 +- .../list_environment_catalog_properties.py | 160 +- .../api/environments/list_environments.py | 338 ++- .../api/environments/update_environment.py | 92 +- rootly_sdk/api/escalation_levels/__init__.py | 2 +- .../delete_escalation_level.py | 80 +- .../escalation_levels/get_escalation_level.py | 80 +- .../update_escalation_level.py | 90 +- .../api/escalation_levels_path/__init__.py | 2 +- .../create_escalation_level_paths.py | 92 +- .../list_escalation_levels_paths.py | 105 +- .../escalation_levels_policies/__init__.py | 2 +- .../create_escalation_level.py | 92 +- .../list_escalation_levels.py | 105 +- rootly_sdk/api/escalation_paths/__init__.py | 2 +- .../create_escalation_path.py | 92 +- .../delete_escalation_path.py | 80 +- .../escalation_paths/get_escalation_path.py | 92 +- .../escalation_paths/list_escalation_paths.py | 127 +- .../update_escalation_path.py | 90 +- .../api/escalation_policies/__init__.py | 2 +- .../create_escalation_policy.py | 79 +- .../delete_escalation_policy.py | 80 +- .../get_escalation_policy.py | 92 +- .../list_escalation_policies.py | 278 ++- .../update_escalation_policy.py | 90 +- rootly_sdk/api/form_field_options/__init__.py | 2 +- .../create_form_field_option.py | 92 +- .../delete_form_field_option.py | 80 +- .../get_form_field_option.py | 80 +- .../list_form_field_options.py | 113 +- .../update_form_field_option.py | 90 +- .../__init__.py | 2 +- .../create_form_field_placement_condition.py | 92 +- .../delete_form_field_placement_condition.py | 80 +- .../get_form_field_placement_condition.py | 80 +- .../list_form_field_placement_conditions.py | 113 +- .../update_form_field_placement_condition.py | 90 +- .../api/form_field_placements/__init__.py | 2 +- .../create_form_field_placement.py | 92 +- .../delete_form_field_placement.py | 80 +- .../get_form_field_placement.py | 80 +- .../list_form_field_placements.py | 109 +- .../update_form_field_placement.py | 97 +- .../api/form_field_positions/__init__.py | 2 +- .../create_form_field_position.py | 97 +- .../delete_form_field_position.py | 80 +- .../get_form_field_position.py | 80 +- .../list_form_field_positions.py | 109 +- .../update_form_field_position.py | 97 +- rootly_sdk/api/form_fields/__init__.py | 2 +- .../api/form_fields/create_form_field.py | 79 +- .../api/form_fields/delete_form_field.py | 82 +- rootly_sdk/api/form_fields/get_form_field.py | 94 +- .../api/form_fields/list_form_fields.py | 399 +++- .../api/form_fields/update_form_field.py | 92 +- .../api/form_set_conditions/__init__.py | 2 +- .../create_form_set_condition.py | 92 +- .../delete_form_set_condition.py | 80 +- .../get_form_set_condition.py | 80 +- .../list_form_set_conditions.py | 109 +- .../update_form_set_condition.py | 90 +- rootly_sdk/api/form_sets/__init__.py | 2 +- rootly_sdk/api/form_sets/create_form_set.py | 79 +- rootly_sdk/api/form_sets/delete_form_set.py | 82 +- rootly_sdk/api/form_sets/get_form_set.py | 82 +- rootly_sdk/api/form_sets/list_form_sets.py | 134 +- rootly_sdk/api/form_sets/update_form_set.py | 92 +- rootly_sdk/api/functionalities/__init__.py | 2 +- .../bulk_delete_functionalities.py | 237 ++ .../bulk_upsert_functionalities.py | 236 ++ .../functionalities/create_functionality.py | 79 +- .../create_functionality_catalog_property.py | 79 +- .../functionalities/delete_functionality.py | 82 +- .../api/functionalities/get_functionality.py | 82 +- .../get_functionality_incidents_chart.py | 92 +- .../get_functionality_uptime_chart.py | 93 +- .../functionalities/list_functionalities.py | 302 ++- .../list_functionality_catalog_properties.py | 160 +- .../functionalities/update_functionality.py | 92 +- rootly_sdk/api/heartbeats/__init__.py | 2 +- rootly_sdk/api/heartbeats/create_heartbeat.py | 79 +- rootly_sdk/api/heartbeats/delete_heartbeat.py | 82 +- rootly_sdk/api/heartbeats/get_heartbeat.py | 82 +- rootly_sdk/api/heartbeats/list_heartbeats.py | 142 +- rootly_sdk/api/heartbeats/ping_heartbeat.py | 68 +- rootly_sdk/api/heartbeats/update_heartbeat.py | 94 +- .../api/incident_action_items/__init__.py | 2 +- .../create_incident_action_item.py | 92 +- .../delete_incident_action_item.py | 80 +- .../get_incident_action_items.py | 80 +- .../list_all_incident_action_items.py | 466 +++- .../list_incident_action_items.py | 101 +- .../update_incident_action_item.py | 90 +- .../__init__.py | 2 +- .../create_incident_event_functionality.py | 92 +- .../delete_incident_event_functionality.py | 80 +- .../get_incident_event_functionalities.py | 80 +- .../list_incident_event_functionalities.py | 105 +- .../update_incident_event_functionality.py | 90 +- .../api/incident_event_services/__init__.py | 2 +- .../create_incident_event_service.py | 92 +- .../delete_incident_event_service.py | 80 +- .../get_incident_event_services.py | 80 +- .../list_incident_event_services.py | 105 +- .../update_incident_event_service.py | 90 +- rootly_sdk/api/incident_events/__init__.py | 2 +- .../incident_events/create_incident_event.py | 92 +- .../incident_events/delete_incident_event.py | 80 +- .../incident_events/get_incident_events.py | 80 +- .../incident_events/list_incident_events.py | 97 +- .../incident_events/update_incident_event.py | 90 +- rootly_sdk/api/incident_feedbacks/__init__.py | 2 +- .../create_incident_feedback.py | 92 +- .../get_incident_feedbacks.py | 80 +- .../list_incident_feedbacks.py | 101 +- .../update_incident_feedback.py | 90 +- .../__init__.py | 2 +- .../create_incident_form_field_selection.py | 92 +- .../delete_incident_form_field_selection.py | 80 +- .../get_incident_form_field_selection.py | 80 +- .../list_incident_form_field_selections.py | 105 +- .../update_incident_form_field_selection.py | 90 +- .../__init__.py | 2 +- .../create_incident_permission_set_boolean.py | 92 +- .../delete_incident_permission_set_boolean.py | 80 +- .../get_incident_permission_set_boolean.py | 80 +- .../list_incident_permission_set_booleans.py | 153 +- .../update_incident_permission_set_boolean.py | 90 +- .../__init__.py | 2 +- ...create_incident_permission_set_resource.py | 92 +- ...delete_incident_permission_set_resource.py | 80 +- .../get_incident_permission_set_resource.py | 80 +- .../list_incident_permission_set_resources.py | 153 +- ...update_incident_permission_set_resource.py | 90 +- .../api/incident_permission_sets/__init__.py | 2 +- .../create_incident_permission_set.py | 79 +- .../delete_incident_permission_set.py | 82 +- .../get_incident_permission_set.py | 82 +- .../list_incident_permission_sets.py | 158 +- .../update_incident_permission_set.py | 92 +- .../incident_retrospective_steps/__init__.py | 2 +- .../get_incident_retrospective_step.py | 80 +- .../update_incident_retrospective_step.py | 90 +- .../api/incident_retrospectives/__init__.py | 2 +- .../list_incident_post_mortems.py | 362 +-- .../list_incident_postmortem.py | 82 +- .../update_incident_postmortem.py | 92 +- .../api/incident_role_tasks/__init__.py | 2 +- .../create_incident_role_task.py | 92 +- .../delete_incident_role_task.py | 80 +- .../get_incident_role_task.py | 80 +- .../list_incident_role_tasks.py | 101 +- .../update_incident_role_task.py | 90 +- rootly_sdk/api/incident_roles/__init__.py | 2 +- .../incident_roles/create_incident_role.py | 79 +- .../incident_roles/delete_incident_role.py | 82 +- .../api/incident_roles/get_incident_role.py | 82 +- .../api/incident_roles/list_incident_roles.py | 330 ++- .../incident_roles/update_incident_role.py | 92 +- .../incident_status_page_events/__init__.py | 2 +- .../create_incident_status_page.py | 92 +- .../delete_incident_status_page.py | 80 +- .../get_incident_status_pages.py | 80 +- .../list_incident_status_pages.py | 105 +- .../update_incident_status_page.py | 90 +- .../api/incident_sub_statuses/__init__.py | 2 +- .../create_incident_sub_status.py | 90 +- .../delete_incident_sub_status.py | 80 +- .../get_incident_sub_status.py | 90 +- .../list_incident_sub_statuses.py | 155 +- .../update_incident_sub_status.py | 88 +- rootly_sdk/api/incident_types/__init__.py | 2 +- .../incident_types/create_incident_type.py | 79 +- .../create_incident_type_catalog_property.py | 79 +- .../incident_types/delete_incident_type.py | 82 +- .../api/incident_types/get_incident_type.py | 82 +- .../list_incident_type_catalog_properties.py | 160 +- .../api/incident_types/list_incident_types.py | 330 ++- .../incident_types/update_incident_type.py | 92 +- rootly_sdk/api/incidents/__init__.py | 2 +- .../incidents/add_subscribers_to_incident.py | 92 +- .../api/incidents/assign_user_to_incident.py | 92 +- rootly_sdk/api/incidents/cancel_incident.py | 92 +- rootly_sdk/api/incidents/create_incident.py | 79 +- rootly_sdk/api/incidents/delete_incident.py | 82 +- .../incidents/detach_from_parent_incident.py | 80 +- rootly_sdk/api/incidents/get_incident.py | 94 +- rootly_sdk/api/incidents/list_incidents.py | 2086 ++++++++++++++--- .../incidents/mark_as_duplicate_incident.py | 92 +- rootly_sdk/api/incidents/mitigate_incident.py | 92 +- .../remove_assigned_user_from_incident.py | 92 +- .../remove_subscribers_to_incident.py | 92 +- rootly_sdk/api/incidents/resolve_incident.py | 92 +- rootly_sdk/api/incidents/restart_incident.py | 92 +- rootly_sdk/api/incidents/triage_incident.py | 92 +- .../incidents/unmark_as_duplicate_incident.py | 80 +- rootly_sdk/api/incidents/update_incident.py | 92 +- rootly_sdk/api/ip_ranges/__init__.py | 2 +- rootly_sdk/api/ip_ranges/get_ip_ranges.py | 72 +- rootly_sdk/api/live_call_routers/__init__.py | 2 +- .../create_live_call_router.py | 79 +- .../delete_live_call_router.py | 80 +- .../generate_phone_number_live_call_router.py | 85 +- .../live_call_routers/get_live_call_router.py | 80 +- .../list_live_call_routers.py | 150 +- .../update_live_call_router.py | 90 +- rootly_sdk/api/meeting_recordings/__init__.py | 2 +- .../create_meeting_recording.py | 136 +- .../delete_meeting_recording.py | 118 +- .../delete_meeting_recording_video.py | 118 +- .../delete_standalone_meeting_recording.py | 129 + .../get_meeting_recording.py | 146 +- .../import_meeting_recording.py | 219 ++ .../leave_meeting_recording.py | 120 +- .../list_all_meeting_recordings.py | 226 ++ .../list_meeting_recordings.py | 95 +- .../pause_meeting_recording.py | 118 +- .../resume_meeting_recording.py | 116 +- .../start_recording_session.py | 202 ++ .../stop_meeting_recording.py | 120 +- .../api/on_call_pay_reports/__init__.py | 2 +- .../create_on_call_pay_report.py | 79 +- .../get_on_call_pay_report.py | 91 +- .../list_on_call_pay_reports.py | 126 +- .../regenerate_on_call_pay_report.py | 80 +- .../update_on_call_pay_report.py | 92 +- rootly_sdk/api/on_call_roles/__init__.py | 2 +- .../api/on_call_roles/create_on_call_role.py | 79 +- .../api/on_call_roles/delete_on_call_role.py | 80 +- .../api/on_call_roles/get_on_call_role.py | 80 +- .../api/on_call_roles/list_on_call_roles.py | 150 +- .../api/on_call_roles/update_on_call_role.py | 90 +- rootly_sdk/api/on_call_shadows/__init__.py | 2 +- .../on_call_shadows/create_on_call_shadow.py | 92 +- .../api/on_call_shadows/get_on_call_shadow.py | 80 +- .../on_call_shadows/list_on_call_shadows.py | 97 +- .../on_call_shadows/update_on_call_shadow.py | 90 +- rootly_sdk/api/on_calls/__init__.py | 2 +- rootly_sdk/api/on_calls/list_oncalls.py | 177 +- rootly_sdk/api/override_shifts/__init__.py | 2 +- .../override_shifts/create_override_shift.py | 115 +- .../override_shifts/delete_on_call_shadow.py | 82 +- .../override_shifts/delete_override_shift.py | 80 +- .../api/override_shifts/get_override_shift.py | 80 +- .../override_shifts/list_override_shifts.py | 97 +- .../override_shifts/update_override_shift.py | 90 +- rootly_sdk/api/playbook_tasks/__init__.py | 2 +- .../playbook_tasks/create_playbook_task.py | 92 +- .../playbook_tasks/delete_playbook_task.py | 80 +- .../api/playbook_tasks/get_playbook_task.py | 80 +- .../api/playbook_tasks/list_playbook_tasks.py | 97 +- .../playbook_tasks/update_playbook_task.py | 90 +- rootly_sdk/api/playbooks/__init__.py | 2 +- rootly_sdk/api/playbooks/create_playbook.py | 79 +- rootly_sdk/api/playbooks/delete_playbook.py | 80 +- rootly_sdk/api/playbooks/get_playbook.py | 92 +- rootly_sdk/api/playbooks/list_playbooks.py | 87 +- rootly_sdk/api/playbooks/update_playbook.py | 90 +- rootly_sdk/api/pulses/__init__.py | 2 +- rootly_sdk/api/pulses/create_pulse.py | 79 +- rootly_sdk/api/pulses/get_pulse.py | 80 +- rootly_sdk/api/pulses/list_pulses.py | 522 ++++- rootly_sdk/api/pulses/update_pulse.py | 90 +- .../retrospective_configurations/__init__.py | 2 +- .../get_retrospective_configuration.py | 96 +- .../list_retrospective_configurations.py | 107 +- .../update_retrospective_configuration.py | 90 +- .../__init__.py | 2 +- ...create_retrospective_process_group_step.py | 90 +- ...delete_retrospective_process_group_step.py | 80 +- .../get_retrospective_process_group_step.py | 78 +- .../list_retrospective_process_group_steps.py | 145 +- ...update_retrospective_process_group_step.py | 88 +- .../retrospective_process_groups/__init__.py | 2 +- .../create_retrospective_process_group.py | 90 +- .../delete_retrospective_process_group.py | 80 +- .../get_retrospective_process_group.py | 94 +- .../list_retrospective_process_groups.py | 163 +- .../update_retrospective_process_group.py | 88 +- .../api/retrospective_processes/__init__.py | 2 +- .../create_retrospective_process.py | 79 +- .../delete_retrospective_process.py | 80 +- .../get_retrospective_process.py | 96 +- .../list_retrospective_processes.py | 99 +- .../update_retrospective_process.py | 90 +- .../api/retrospective_steps/__init__.py | 2 +- .../create_retrospective_step.py | 92 +- .../delete_retrospective_step.py | 80 +- .../get_retrospective_step.py | 80 +- .../list_retrospective_steps.py | 109 +- .../update_retrospective_step.py | 90 +- .../api/retrospective_templates/__init__.py | 2 +- .../create_postmortem_template.py | 79 +- .../delete_postmortem_template.py | 82 +- .../get_postmortem_template.py | 82 +- .../list_postmortem_templates.py | 90 +- .../update_postmortem_template.py | 92 +- rootly_sdk/api/roles/__init__.py | 2 +- rootly_sdk/api/roles/create_role.py | 79 +- rootly_sdk/api/roles/delete_role.py | 82 +- rootly_sdk/api/roles/get_role.py | 82 +- rootly_sdk/api/roles/list_roles.py | 150 +- rootly_sdk/api/roles/update_role.py | 92 +- .../schedule_rotation_active_days/__init__.py | 2 +- .../create_schedule_rotation_active_day.py | 92 +- .../delete_schedule_rotation_active_day.py | 80 +- .../get_schedule_rotation_active_day.py | 80 +- .../list_schedule_rotation_active_days.py | 105 +- .../update_schedule_rotation_active_day.py | 90 +- .../api/schedule_rotation_users/__init__.py | 2 +- .../create_schedule_rotation_user.py | 92 +- .../delete_schedule_rotation_user.py | 80 +- .../get_schedule_rotation_user.py | 80 +- .../list_schedule_rotation_users.py | 105 +- .../update_schedule_rotation_user.py | 90 +- rootly_sdk/api/schedule_rotations/__init__.py | 2 +- .../create_schedule_rotation.py | 92 +- .../delete_schedule_rotation.py | 80 +- .../get_schedule_rotation.py | 80 +- .../list_schedule_rotations.py | 109 +- .../update_schedule_rotation.py | 90 +- rootly_sdk/api/schedules/__init__.py | 2 +- rootly_sdk/api/schedules/create_schedule.py | 79 +- rootly_sdk/api/schedules/delete_schedule.py | 80 +- rootly_sdk/api/schedules/get_schedule.py | 80 +- rootly_sdk/api/schedules/list_schedules.py | 194 +- rootly_sdk/api/schedules/update_schedule.py | 90 +- rootly_sdk/api/secrets/__init__.py | 2 +- rootly_sdk/api/secrets/create_secret.py | 79 +- rootly_sdk/api/secrets/delete_secret.py | 80 +- rootly_sdk/api/secrets/get_secret.py | 80 +- rootly_sdk/api/secrets/list_secrets.py | 86 +- rootly_sdk/api/secrets/update_secret.py | 90 +- rootly_sdk/api/services/__init__.py | 2 +- .../api/services/bulk_delete_services.py | 233 ++ .../api/services/bulk_upsert_services.py | 236 ++ rootly_sdk/api/services/create_service.py | 79 +- .../create_service_catalog_property.py | 79 +- rootly_sdk/api/services/delete_service.py | 82 +- rootly_sdk/api/services/get_service.py | 82 +- .../services/get_service_incidents_chart.py | 92 +- .../api/services/get_service_uptime_chart.py | 93 +- .../list_service_catalog_properties.py | 160 +- rootly_sdk/api/services/list_services.py | 438 +++- rootly_sdk/api/services/update_service.py | 92 +- rootly_sdk/api/severities/__init__.py | 2 +- rootly_sdk/api/severities/create_severity.py | 79 +- rootly_sdk/api/severities/delete_severity.py | 82 +- rootly_sdk/api/severities/get_severity.py | 82 +- rootly_sdk/api/severities/list_severities.py | 406 +++- rootly_sdk/api/severities/update_severity.py | 92 +- .../api/shift_coverage_requests/__init__.py | 1 + .../create_shift_coverage_request.py | 220 ++ .../delete_shift_coverage_request.py | 179 ++ .../get_shift_coverage_request.py | 179 ++ .../list_shift_coverage_requests.py | 179 ++ rootly_sdk/api/shifts/__init__.py | 2 +- rootly_sdk/api/shifts/get_schedule_shifts.py | 95 +- rootly_sdk/api/shifts/list_shifts.py | 127 +- rootly_sdk/api/sl_as/__init__.py | 2 +- rootly_sdk/api/sl_as/create_sla.py | 79 +- rootly_sdk/api/sl_as/delete_sla.py | 80 +- rootly_sdk/api/sl_as/get_sla.py | 80 +- rootly_sdk/api/sl_as/list_sl_as.py | 262 ++- rootly_sdk/api/sl_as/update_sla.py | 90 +- .../api/status_page_templates/__init__.py | 2 +- .../create_status_page_template.py | 92 +- .../delete_status_page_template.py | 80 +- .../get_status_page_template.py | 80 +- .../list_status_page_templates.py | 101 +- .../update_status_page_template.py | 90 +- rootly_sdk/api/status_pages/__init__.py | 2 +- .../api/status_pages/create_status_page.py | 79 +- .../api/status_pages/delete_status_page.py | 82 +- .../api/status_pages/get_status_page.py | 82 +- .../api/status_pages/list_status_pages.py | 270 ++- .../api/status_pages/update_status_page.py | 94 +- rootly_sdk/api/statuses/__init__.py | 2 +- rootly_sdk/api/statuses/get_status.py | 82 +- rootly_sdk/api/statuses/list_statuses.py | 152 +- rootly_sdk/api/sub_statuses/__init__.py | 2 +- .../api/sub_statuses/create_sub_status.py | 79 +- .../api/sub_statuses/delete_sub_status.py | 82 +- rootly_sdk/api/sub_statuses/get_sub_status.py | 82 +- .../api/sub_statuses/list_sub_statuses.py | 142 +- .../api/sub_statuses/update_sub_status.py | 92 +- rootly_sdk/api/teams/__init__.py | 2 +- rootly_sdk/api/teams/bulk_delete_groups.py | 233 ++ rootly_sdk/api/teams/bulk_upsert_groups.py | 236 ++ .../teams/create_group_catalog_property.py | 79 +- rootly_sdk/api/teams/create_team.py | 79 +- rootly_sdk/api/teams/delete_team.py | 82 +- rootly_sdk/api/teams/get_team.py | 94 +- .../api/teams/get_team_incidents_chart.py | 90 +- .../teams/list_group_catalog_properties.py | 160 +- rootly_sdk/api/teams/list_teams.py | 507 +++- rootly_sdk/api/teams/update_team.py | 92 +- .../api/user_email_addresses/__init__.py | 2 +- .../create_user_email_address.py | 94 +- .../delete_user_email_address.py | 82 +- .../get_user_email_addresses.py | 82 +- .../resend_user_email_address_verification.py | 82 +- .../show_user_email_address.py | 82 +- .../update_user_email_address.py | 94 +- .../verify_user_email_address.py | 92 +- .../api/user_notification_rules/__init__.py | 2 +- .../create_user_notification_rule.py | 92 +- .../delete_user_notification_rule.py | 80 +- .../get_user_notification_rule.py | 80 +- .../list_user_notification_rules.py | 113 +- .../update_user_notification_rule.py | 90 +- rootly_sdk/api/user_phone_numbers/__init__.py | 2 +- .../create_user_phone_number.py | 94 +- .../delete_user_phone_number.py | 84 +- .../get_user_phone_numbers.py | 82 +- .../show_user_phone_number.py | 82 +- .../update_user_phone_number.py | 94 +- rootly_sdk/api/users/__init__.py | 2 +- rootly_sdk/api/users/delete_user.py | 80 +- rootly_sdk/api/users/get_current_user.py | 82 +- rootly_sdk/api/users/get_user.py | 92 +- rootly_sdk/api/users/list_users.py | 150 +- rootly_sdk/api/users/update_user.py | 92 +- .../api/webhooks_deliveries/__init__.py | 2 +- .../deliver_webhooks_delivery.py | 78 +- .../get_webhooks_delivery.py | 80 +- .../list_webhooks_deliveries.py | 101 +- rootly_sdk/api/webhooks_endpoints/__init__.py | 2 +- .../create_webhooks_endpoint.py | 79 +- .../delete_webhooks_endpoint.py | 80 +- .../get_webhooks_endpoint.py | 80 +- .../list_webhooks_endpoints.py | 106 +- .../update_webhooks_endpoint.py | 90 +- .../__init__.py | 1 + ...rkflow_action_item_form_field_condition.py | 219 ++ ...rkflow_action_item_form_field_condition.py | 187 ++ ...rkflow_action_item_form_field_condition.py | 187 ++ ...kflow_action_item_form_field_conditions.py | 231 ++ ...rkflow_action_item_form_field_condition.py | 208 ++ .../__init__.py | 2 +- .../create_workflow_form_field_condition.py | 90 +- .../delete_workflow_form_field_condition.py | 80 +- .../get_workflow_form_field_condition.py | 80 +- .../list_workflow_form_field_conditions.py | 105 +- .../update_workflow_form_field_condition.py | 90 +- rootly_sdk/api/workflow_groups/__init__.py | 2 +- .../workflow_groups/create_workflow_group.py | 79 +- .../workflow_groups/delete_workflow_group.py | 80 +- .../api/workflow_groups/get_workflow_group.py | 80 +- .../workflow_groups/list_workflow_groups.py | 134 +- .../workflow_groups/update_workflow_group.py | 90 +- rootly_sdk/api/workflow_runs/__init__.py | 2 +- .../api/workflow_runs/create_workflow_run.py | 92 +- .../api/workflow_runs/list_workflow_runs.py | 130 +- rootly_sdk/api/workflow_tasks/__init__.py | 2 +- .../workflow_tasks/create_workflow_task.py | 90 +- .../workflow_tasks/delete_workflow_task.py | 80 +- .../api/workflow_tasks/get_workflow_task.py | 80 +- .../api/workflow_tasks/list_workflow_tasks.py | 241 +- .../workflow_tasks/update_workflow_task.py | 90 +- rootly_sdk/api/workflows/__init__.py | 2 +- rootly_sdk/api/workflows/create_workflow.py | 79 +- rootly_sdk/api/workflows/delete_workflow.py | 82 +- rootly_sdk/api/workflows/get_workflow.py | 94 +- rootly_sdk/api/workflows/list_workflows.py | 272 ++- rootly_sdk/api/workflows/update_workflow.py | 94 +- rootly_sdk/client.py | 7 +- rootly_sdk/errors.py | 4 +- rootly_sdk/models/__init__.py | 1272 +++++++++- .../models/action_item_trigger_params.py | 448 ++-- ...rams_incident_condition_acknowledged_at.py | 22 + ...cident_condition_acknowledged_at_type_1.py | 22 - ..._params_incident_condition_detected_at.py} | 16 +- ...trigger_params_incident_condition_label.py | 29 + ..._params_incident_condition_mitigated_at.py | 22 + ..._incident_condition_mitigated_at_type_1.py | 22 - ..._params_incident_condition_resolved_at.py} | 16 +- ...r_params_incident_condition_started_at.py} | 16 +- ...igger_params_incident_condition_summary.py | 20 + ...arams_incident_condition_summary_type_1.py | 22 - ..._params_incident_conditional_inactivity.py | 21 + ..._incident_conditional_inactivity_type_1.py | 21 - .../models/add_action_item_task_params.py | 30 +- ...ction_item_task_params_assigned_to_user.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...dd_microsoft_teams_chat_tab_task_params.py | 9 +- ...crosoft_teams_chat_tab_task_params_chat.py | 5 +- ...microsoft_teams_tab_task_params_type_0.py} | 39 +- ..._microsoft_teams_tab_task_params_type_1.py | 64 + rootly_sdk/models/add_role_task_params.py | 10 +- .../add_role_task_params_assigned_to_user.py | 5 +- .../add_slack_bookmark_task_params_type_0.py | 72 + .../add_slack_bookmark_task_params_type_1.py | 64 + rootly_sdk/models/add_subscribers.py | 8 +- rootly_sdk/models/add_subscribers_data.py | 10 +- .../models/add_subscribers_data_attributes.py | 7 +- rootly_sdk/models/add_team_task_params.py | 9 +- .../models/add_to_timeline_task_params.py | 15 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/ai_chat_response.py | 98 + rootly_sdk/models/ai_chat_response_data.py | 92 + .../ai_chat_response_data_attributes.py | 106 + ...ai_chat_response_data_attributes_status.py | 15 + .../models/ai_chat_response_data_type.py | 15 + rootly_sdk/models/ai_chat_session_message.py | 95 + .../models/ai_chat_session_message_list.py | 101 + .../ai_chat_session_message_list_meta.py | 50 + .../models/ai_chat_session_message_role.py | 16 + rootly_sdk/models/alert.py | 364 ++- .../alert_alert_field_values_type_0_item.py | 104 + .../alert_alerting_targets_type_0_item.py | 73 + rootly_sdk/models/alert_data_type_0.py | 5 +- rootly_sdk/models/alert_event.py | 233 +- rootly_sdk/models/alert_event_action.py | 8 + .../alert_event_escalation_target_type_0.py | 80 + ...ert_event_escalation_target_type_0_data.py | 103 + ...scalation_target_type_0_data_attributes.py | 50 + rootly_sdk/models/alert_event_feed_list.py | 137 ++ .../models/alert_event_feed_list_data_item.py | 91 + .../alert_event_feed_list_data_item_type.py | 15 + rootly_sdk/models/alert_event_feed_meta.py | 175 ++ .../models/alert_event_incident_type_0.py | 217 ++ rootly_sdk/models/alert_event_list.py | 35 +- .../models/alert_event_list_data_item.py | 10 +- rootly_sdk/models/alert_event_response.py | 33 +- .../models/alert_event_response_data.py | 10 +- .../models/alert_event_schedule_type_0.py | 148 ++ ...chedule_type_0_escalation_policies_item.py | 91 + rootly_sdk/models/alert_event_user.py | 199 ++ rootly_sdk/models/alert_field.py | 5 +- rootly_sdk/models/alert_field_list.py | 35 +- .../models/alert_field_list_data_item.py | 10 +- rootly_sdk/models/alert_field_response.py | 33 +- .../models/alert_field_response_data.py | 10 +- rootly_sdk/models/alert_group.py | 9 +- .../models/alert_group_attributes_item.py | 5 +- .../models/alert_group_conditions_item.py | 15 +- ...roup_conditions_item_values_item_type_0.py | 5 +- rootly_sdk/models/alert_group_list.py | 33 +- .../models/alert_group_list_data_item.py | 10 +- rootly_sdk/models/alert_group_response.py | 33 +- .../models/alert_group_response_data.py | 10 +- rootly_sdk/models/alert_group_targets_item.py | 19 +- .../alert_group_targets_item_target_type.py | 3 +- rootly_sdk/models/alert_labels_item_type_0.py | 7 +- rootly_sdk/models/alert_list.py | 35 +- rootly_sdk/models/alert_list_data_item.py | 26 +- .../models/alert_list_data_item_source.py | 105 - .../models/alert_notification_target_type.py | 19 + rootly_sdk/models/alert_response.py | 33 +- rootly_sdk/models/alert_response_data.py | 26 +- .../models/alert_response_data_source.py | 105 - rootly_sdk/models/alert_route.py | 9 +- rootly_sdk/models/alert_route_list.py | 10 +- .../models/alert_route_list_data_item.py | 10 +- rootly_sdk/models/alert_route_response.py | 8 +- .../models/alert_route_response_data.py | 10 +- rootly_sdk/models/alert_route_rules_item.py | 8 +- ..._route_rules_item_condition_groups_item.py | 9 +- ...m_condition_groups_item_conditions_item.py | 14 +- ...lert_route_rules_item_destinations_item.py | 10 +- rootly_sdk/models/alert_routing_rule.py | 15 +- .../models/alert_routing_rule_condition.py | 12 +- .../alert_routing_rule_condition_group.py | 9 +- ...lert_routing_rule_condition_groups_item.py | 11 +- ...e_condition_groups_item_conditions_item.py | 12 +- .../alert_routing_rule_conditions_item.py | 10 +- .../alert_routing_rule_destination_type_0.py | 10 +- rootly_sdk/models/alert_routing_rule_list.py | 35 +- .../alert_routing_rule_list_data_item.py | 13 +- .../models/alert_routing_rule_response.py | 33 +- .../alert_routing_rule_response_data.py | 13 +- .../alert_routing_rule_target_type_0.py | 14 +- rootly_sdk/models/alert_source.py | 105 - rootly_sdk/models/alert_trigger_params.py | 58 +- ...gger_params_alert_field_conditions_item.py | 8 +- ...trigger_params_alert_payload_conditions.py | 11 +- ...lert_payload_conditions_conditions_item.py | 8 +- rootly_sdk/models/alert_urgency.py | 86 +- rootly_sdk/models/alert_urgency_list.py | 35 +- .../models/alert_urgency_list_data_item.py | 13 +- rootly_sdk/models/alert_urgency_response.py | 33 +- .../models/alert_urgency_response_data.py | 13 +- rootly_sdk/models/alerts_source.py | 37 +- ...rce_alert_source_fields_attributes_item.py | 6 +- ...rt_source_urgency_rules_attributes_item.py | 12 +- ...source_alert_template_attributes_type_0.py | 6 +- rootly_sdk/models/alerts_source_list.py | 35 +- .../models/alerts_source_list_data_item.py | 13 +- ...ource_resolution_rule_attributes_type_0.py | 15 +- ...butes_type_0_conditions_attributes_item.py | 12 +- rootly_sdk/models/alerts_source_response.py | 33 +- .../models/alerts_source_response_data.py | 13 +- .../models/alerts_source_source_type.py | 2 + ...rts_source_sourceable_attributes_type_0.py | 9 +- ...s_type_0_field_mappings_attributes_item.py | 11 +- rootly_sdk/models/api_key.py | 9 +- rootly_sdk/models/api_key_list.py | 35 +- rootly_sdk/models/api_key_list_data_item.py | 10 +- rootly_sdk/models/api_key_response.py | 33 +- rootly_sdk/models/api_key_response_data.py | 10 +- .../models/api_key_with_token_response.py | 33 +- .../api_key_with_token_response_data.py | 13 +- ...key_with_token_response_data_attributes.py | 9 +- .../archive_google_chat_spaces_task_params.py | 106 + ...gle_chat_spaces_task_params_spaces_item.py | 73 + ...oogle_chat_spaces_task_params_task_type.py | 19 + ...ve_microsoft_teams_channels_task_params.py | 14 +- ...eams_channels_task_params_channels_item.py | 5 +- ...crosoft_teams_channels_task_params_team.py | 5 +- .../archive_slack_channels_task_params.py | 13 +- ...lack_channels_task_params_channels_item.py | 5 +- rootly_sdk/models/assign_role_to_user.py | 8 +- rootly_sdk/models/assign_role_to_user_data.py | 10 +- .../assign_role_to_user_data_attributes.py | 6 +- rootly_sdk/models/attach_alert.py | 8 +- rootly_sdk/models/attach_alert_data.py | 10 +- .../models/attach_alert_data_attributes.py | 8 +- .../attach_datadog_dashboards_task_params.py | 14 +- ..._dashboards_task_params_dashboards_item.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ospective_pdf_to_jira_issue_task_params.py | 128 + ...f_to_jira_issue_task_params_integration.py | 74 + ...pdf_to_jira_issue_task_params_task_type.py | 21 + rootly_sdk/models/audit.py | 151 +- rootly_sdk/models/audit_item_type.py | 40 + .../models/audit_object_changes_type_0.py | 5 +- rootly_sdk/models/audit_object_type_0.py | 5 +- rootly_sdk/models/audits_list.py | 35 +- rootly_sdk/models/audits_list_data_item.py | 10 +- rootly_sdk/models/authorization.py | 18 +- rootly_sdk/models/authorization_list.py | 35 +- .../models/authorization_list_data_item.py | 13 +- rootly_sdk/models/authorization_response.py | 33 +- .../models/authorization_response_data.py | 13 +- .../auto_assign_role_opsgenie_task_params.py | 9 +- ...sign_role_opsgenie_task_params_schedule.py | 5 +- ...e_pagerduty_task_params_type_0_schedule.py | 73 + ...ty_task_params_type_1_escalation_policy.py | 73 + .../auto_assign_role_rootly_task_params.py | 23 +- ...ly_task_params_escalation_policy_target.py | 5 +- ...gn_role_rootly_task_params_group_target.py | 5 +- ...role_rootly_task_params_schedule_target.py | 5 +- ..._role_rootly_task_params_service_target.py | 5 +- ...ign_role_rootly_task_params_user_target.py | 5 +- ...auto_assign_role_victor_ops_task_params.py | 9 +- ...assign_role_victor_ops_task_params_team.py | 5 +- .../bulk_destroy_catalog_entities_response.py | 79 + ..._destroy_catalog_entities_response_data.py | 91 + .../bulk_destroy_catalog_entities_type_0.py | 48 + .../bulk_destroy_catalog_entities_type_1.py | 65 + ...troy_catalog_entities_type_1_managed_by.py | 23 + .../bulk_destroy_environments_response.py | 79 + ...bulk_destroy_environments_response_data.py | 91 + .../bulk_destroy_environments_type_0.py | 48 + .../bulk_destroy_environments_type_1.py | 63 + ..._destroy_environments_type_1_managed_by.py | 23 + .../bulk_destroy_functionalities_response.py | 79 + ...k_destroy_functionalities_response_data.py | 91 + .../bulk_destroy_functionalities_type_0.py | 48 + .../bulk_destroy_functionalities_type_1.py | 63 + ...stroy_functionalities_type_1_managed_by.py | 23 + .../models/bulk_destroy_services_response.py | 79 + .../bulk_destroy_services_response_data.py | 91 + .../models/bulk_destroy_services_type_0.py | 48 + .../models/bulk_destroy_services_type_1.py | 63 + ...bulk_destroy_services_type_1_managed_by.py | 19 + .../models/bulk_destroy_teams_response.py | 79 + .../bulk_destroy_teams_response_data.py | 91 + .../models/bulk_destroy_teams_type_0.py | 48 + .../models/bulk_destroy_teams_type_1.py | 63 + .../bulk_destroy_teams_type_1_managed_by.py | 19 + .../models/bulk_upsert_catalog_entities.py | 82 + ...k_upsert_catalog_entities_entities_item.py | 152 ++ ...alog_entities_entities_item_fields_item.py | 86 + .../bulk_upsert_catalog_entities_error.py | 81 + ...sert_catalog_entities_error_errors_item.py | 82 + .../bulk_upsert_catalog_entities_response.py | 84 + ...ert_catalog_entities_response_data_item.py | 108 + ...atalog_entities_response_data_item_type.py | 19 + rootly_sdk/models/bulk_upsert_environments.py | 82 + .../bulk_upsert_environments_entities_item.py | 200 ++ ..._environments_entities_item_fields_item.py | 86 + .../models/bulk_upsert_environments_error.py | 81 + ...k_upsert_environments_error_errors_item.py | 82 + .../bulk_upsert_environments_response.py | 84 + ..._upsert_environments_response_data_item.py | 108 + ...rt_environments_response_data_item_type.py | 19 + .../models/bulk_upsert_functionalities.py | 83 + ...lk_upsert_functionalities_entities_item.py | 402 ++++ ...nctionalities_entities_item_fields_item.py | 86 + .../bulk_upsert_functionalities_error.py | 81 + ...psert_functionalities_error_errors_item.py | 82 + .../bulk_upsert_functionalities_response.py | 84 + ...sert_functionalities_response_data_item.py | 108 + ...functionalities_response_data_item_type.py | 19 + rootly_sdk/models/bulk_upsert_services.py | 82 + .../bulk_upsert_services_entities_item.py | 516 ++++ ...sert_services_entities_item_fields_item.py | 86 + .../models/bulk_upsert_services_error.py | 81 + .../bulk_upsert_services_error_errors_item.py | 82 + .../models/bulk_upsert_services_response.py | 84 + ...bulk_upsert_services_response_data_item.py | 106 + ...upsert_services_response_data_item_type.py | 19 + rootly_sdk/models/bulk_upsert_teams.py | 82 + .../models/bulk_upsert_teams_entities_item.py | 396 ++++ ..._upsert_teams_entities_item_fields_item.py | 86 + rootly_sdk/models/bulk_upsert_teams_error.py | 81 + .../bulk_upsert_teams_error_errors_item.py | 82 + .../models/bulk_upsert_teams_response.py | 84 + .../bulk_upsert_teams_response_data_item.py | 106 + ...lk_upsert_teams_response_data_item_type.py | 15 + rootly_sdk/models/call_people_task_params.py | 12 +- rootly_sdk/models/cancel_incident.py | 8 +- rootly_sdk/models/cancel_incident_data.py | 10 +- .../models/cancel_incident_data_attributes.py | 7 +- rootly_sdk/models/catalog.py | 47 +- .../models/catalog_checklist_template.py | 20 +- ...g_checklist_template_fields_type_0_item.py | 8 +- .../models/catalog_checklist_template_list.py | 33 +- ...talog_checklist_template_list_data_item.py | 13 +- ...g_checklist_template_owners_type_0_item.py | 8 +- .../catalog_checklist_template_response.py | 33 +- ...atalog_checklist_template_response_data.py | 13 +- rootly_sdk/models/catalog_entity.py | 66 +- rootly_sdk/models/catalog_entity_checklist.py | 21 +- ..._checklist_checklist_fields_type_0_item.py | 9 +- ...klist_checklist_fields_type_0_item_data.py | 11 +- ...list_fields_type_0_item_data_attributes.py | 5 +- ...m_data_attributes_value_snapshot_type_0.py | 5 +- ..._checklist_checklist_owners_type_0_item.py | 9 +- ...klist_checklist_owners_type_0_item_data.py | 11 +- ...list_owners_type_0_item_data_attributes.py | 5 +- .../models/catalog_entity_checklist_list.py | 33 +- ...catalog_entity_checklist_list_data_item.py | 13 +- .../catalog_entity_checklist_response.py | 33 +- .../catalog_entity_checklist_response_data.py | 13 +- rootly_sdk/models/catalog_entity_list.py | 35 +- .../models/catalog_entity_list_data_item.py | 13 +- .../models/catalog_entity_managed_by.py | 21 + .../models/catalog_entity_properties_item.py | 5 +- rootly_sdk/models/catalog_entity_property.py | 9 +- .../models/catalog_entity_property_list.py | 35 +- .../catalog_entity_property_list_data_item.py | 13 +- .../catalog_entity_property_response.py | 33 +- .../catalog_entity_property_response_data.py | 13 +- rootly_sdk/models/catalog_entity_response.py | 33 +- .../models/catalog_entity_response_data.py | 13 +- rootly_sdk/models/catalog_field.py | 51 +- rootly_sdk/models/catalog_field_list.py | 35 +- .../models/catalog_field_list_data_item.py | 13 +- rootly_sdk/models/catalog_field_managed_by.py | 21 + rootly_sdk/models/catalog_field_response.py | 33 +- .../models/catalog_field_response_data.py | 13 +- rootly_sdk/models/catalog_list.py | 35 +- rootly_sdk/models/catalog_list_data_item.py | 10 +- rootly_sdk/models/catalog_managed_by.py | 21 + rootly_sdk/models/catalog_property.py | 51 +- rootly_sdk/models/catalog_property_list.py | 35 +- .../models/catalog_property_list_data_item.py | 13 +- .../models/catalog_property_managed_by.py | 21 + .../models/catalog_property_response.py | 33 +- .../models/catalog_property_response_data.py | 13 +- rootly_sdk/models/catalog_response.py | 33 +- rootly_sdk/models/catalog_response_data.py | 10 +- rootly_sdk/models/cause.py | 7 +- rootly_sdk/models/cause_list.py | 35 +- rootly_sdk/models/cause_list_data_item.py | 10 +- rootly_sdk/models/cause_properties_item.py | 5 +- rootly_sdk/models/cause_response.py | 33 +- rootly_sdk/models/cause_response_data.py | 10 +- ...e_google_chat_space_privacy_task_params.py | 121 + ...le_chat_space_privacy_task_params_space.py | 73 + ...hat_space_privacy_task_params_task_type.py | 19 + ...hange_slack_channel_privacy_task_params.py | 35 +- ...ack_channel_privacy_task_params_channel.py | 5 +- ...k_channel_privacy_task_params_task_type.py | 4 +- rootly_sdk/models/communications_group.py | 18 +- ...tion_external_group_members_type_0_item.py | 5 +- ...munication_group_conditions_type_0_item.py | 10 +- .../models/communications_group_response.py | 33 +- .../communications_group_response_data.py | 13 +- .../models/communications_groups_response.py | 33 +- ...ommunications_groups_response_data_item.py | 13 +- rootly_sdk/models/communications_stage.py | 6 +- .../models/communications_stage_response.py | 33 +- .../communications_stage_response_data.py | 13 +- .../models/communications_stages_response.py | 33 +- ...ommunications_stages_response_data_item.py | 13 +- rootly_sdk/models/communications_template.py | 10 +- ...mmunication_template_stages_type_0_item.py | 9 +- ...cation_template_stages_type_0_item_data.py | 13 +- ...late_stages_type_0_item_data_attributes.py | 12 +- ...tem_data_attributes_communication_stage.py | 5 +- ..._data_attributes_communication_template.py | 5 +- ...munications_template_communication_type.py | 5 +- .../communications_template_response.py | 33 +- .../communications_template_response_data.py | 13 +- .../communications_templates_response.py | 33 +- ...unications_templates_response_data_item.py | 9 +- rootly_sdk/models/communications_type.py | 6 +- .../models/communications_type_response.py | 33 +- .../communications_type_response_data.py | 13 +- .../models/communications_types_response.py | 33 +- ...communications_types_response_data_item.py | 13 +- ...reate_airtable_table_record_task_params.py | 10 +- ..._airtable_table_record_task_params_base.py | 5 +- ...airtable_table_record_task_params_table.py | 5 +- ...e_anthropic_chat_completion_task_params.py | 13 +- ...ropic_chat_completion_task_params_model.py | 5 +- .../create_asana_subtask_task_params.py | 15 +- ...te_asana_subtask_task_params_completion.py | 5 +- .../models/create_asana_task_task_params.py | 17 +- ...reate_asana_task_task_params_completion.py | 5 +- ...te_asana_task_task_params_projects_item.py | 5 +- ...create_asana_task_task_params_workspace.py | 5 +- .../models/create_clickup_task_task_params.py | 13 +- ...reate_clickup_task_task_params_priority.py | 5 +- .../models/create_coda_page_task_params.py | 14 +- .../create_coda_page_task_params_doc.py | 5 +- .../create_coda_page_task_params_template.py | 5 +- .../create_confluence_page_task_params.py | 43 +- ...te_confluence_page_task_params_ancestor.py | 5 +- ...confluence_page_task_params_integration.py | 5 +- ...reate_confluence_page_task_params_space.py | 5 +- ...te_confluence_page_task_params_template.py | 5 +- .../create_datadog_notebook_task_params.py | 19 +- ...e_datadog_notebook_task_params_template.py | 5 +- .../create_dropbox_paper_page_task_params.py | 12 +- ...ropbox_paper_page_task_params_namespace.py | 5 +- ...ox_paper_page_task_params_parent_folder.py | 5 +- .../create_edge_connector_action_body.py | 7 +- ...reate_edge_connector_action_body_action.py | 11 +- ...e_connector_action_body_action_metadata.py | 9 +- ...on_body_action_metadata_parameters_item.py | 10 +- .../models/create_edge_connector_body.py | 8 +- .../models/create_edge_connector_body_data.py | 13 +- ...ate_edge_connector_body_data_attributes.py | 36 +- ..._connector_body_data_attributes_filters.py | 83 + .../models/create_github_issue_task_params.py | 36 +- ...ate_github_issue_task_params_issue_type.py | 5 +- ...te_github_issue_task_params_labels_item.py | 5 +- ...ate_github_issue_task_params_repository.py | 5 +- .../models/create_gitlab_issue_task_params.py | 19 +- ...ate_gitlab_issue_task_params_repository.py | 5 +- .../create_go_to_meeting_task_params.py | 17 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...reate_google_calendar_event_task_params.py | 15 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../create_google_chat_space_task_params.py | 103 + ...google_chat_space_task_params_task_type.py | 19 + .../create_google_docs_page_task_params.py | 34 +- ...eate_google_docs_page_task_params_drive.py | 5 +- ...gle_docs_page_task_params_parent_folder.py | 5 +- ...ate_google_docs_permissions_task_params.py | 8 +- ...ogle_gemini_chat_completion_task_params.py | 13 +- ...emini_chat_completion_task_params_model.py | 5 +- .../create_google_meeting_task_params.py | 21 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../create_incident_postmortem_task_params.py | 7 +- ..._postmortem_task_params_template_type_0.py | 5 +- .../models/create_incident_task_params.py | 12 +- .../models/create_jira_issue_task_params.py | 16 +- ...eate_jira_issue_task_params_integration.py | 5 +- ...reate_jira_issue_task_params_issue_type.py | 5 +- .../create_jira_issue_task_params_priority.py | 5 +- .../create_jira_issue_task_params_status.py | 5 +- .../models/create_jira_subtask_task_params.py | 18 +- ...te_jira_subtask_task_params_integration.py | 5 +- ...reate_jira_subtask_task_params_priority.py | 5 +- .../create_jira_subtask_task_params_status.py | 5 +- ..._subtask_task_params_subtask_issue_type.py | 5 +- .../models/create_jsmops_alert_task_params.py | 22 +- ...mops_alert_task_params_escalations_item.py | 5 +- ...jsmops_alert_task_params_schedules_item.py | 5 +- ...ate_jsmops_alert_task_params_teams_item.py | 5 +- ...ate_jsmops_alert_task_params_users_item.py | 5 +- ...create_linear_issue_comment_task_params.py | 8 +- .../models/create_linear_issue_task_params.py | 38 +- ...te_linear_issue_task_params_labels_item.py | 5 +- ...reate_linear_issue_task_params_priority.py | 5 +- ...create_linear_issue_task_params_project.py | 5 +- .../create_linear_issue_task_params_state.py | 5 +- .../create_linear_issue_task_params_team.py | 5 +- ...create_linear_subtask_issue_task_params.py | 34 +- ...r_subtask_issue_task_params_labels_item.py | 5 +- ...near_subtask_issue_task_params_priority.py | 5 +- ..._linear_subtask_issue_task_params_state.py | 5 +- ...ate_microsoft_teams_channel_task_params.py | 35 +- ...icrosoft_teams_channel_task_params_team.py | 5 +- ...create_microsoft_teams_chat_task_params.py | 13 +- ...oft_teams_chat_task_params_members_item.py | 5 +- ...ate_microsoft_teams_meeting_task_params.py | 15 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ate_mistral_chat_completion_task_params.py | 9 +- ...stral_chat_completion_task_params_model.py | 5 +- .../models/create_motion_task_task_params.py | 16 +- ...create_motion_task_task_params_priority.py | 5 +- .../create_motion_task_task_params_project.py | 5 +- .../create_motion_task_task_params_status.py | 5 +- ...reate_motion_task_task_params_workspace.py | 5 +- .../models/create_notion_page_task_params.py | 13 +- ...ate_notion_page_task_params_parent_page.py | 5 +- ...eate_openai_chat_completion_task_params.py | 17 +- ...penai_chat_completion_task_params_model.py | 5 +- .../create_opsgenie_alert_task_params.py | 24 +- ...enie_alert_task_params_escalations_item.py | 5 +- ...sgenie_alert_task_params_schedules_item.py | 5 +- ...e_opsgenie_alert_task_params_teams_item.py | 5 +- ...e_opsgenie_alert_task_params_users_item.py | 5 +- .../create_outlook_event_task_params.py | 16 +- ...eate_outlook_event_task_params_calendar.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ate_pagerduty_status_update_task_params.py | 8 +- .../create_pagertree_alert_task_params.py | 26 +- ..._pagertree_alert_task_params_teams_item.py | 5 +- ..._pagertree_alert_task_params_users_item.py | 5 +- .../models/create_quip_page_task_params.py | 12 +- ...create_service_now_incident_task_params.py | 12 +- ...ice_now_incident_task_params_completion.py | 5 +- ...rvice_now_incident_task_params_priority.py | 5 +- .../create_sharepoint_page_task_params.py | 15 +- ...reate_sharepoint_page_task_params_drive.py | 5 +- ...arepoint_page_task_params_parent_folder.py | 5 +- ...create_sharepoint_page_task_params_site.py | 5 +- ...ortcut_story_task_params_type_0_project.py | 73 + ...story_task_params_type_1_workflow_state.py | 73 + .../create_shortcut_task_task_params.py | 13 +- ...te_shortcut_task_task_params_completion.py | 5 +- .../create_slack_channel_task_params.py | 19 +- ...ate_slack_channel_task_params_workspace.py | 5 +- .../models/create_sub_incident_task_params.py | 12 +- .../models/create_trello_card_task_params.py | 16 +- ...ate_trello_card_task_params_archivation.py | 5 +- .../create_trello_card_task_params_board.py | 5 +- ...ate_trello_card_task_params_labels_item.py | 5 +- .../create_trello_card_task_params_list.py | 5 +- ...ate_watsonx_chat_completion_task_params.py | 9 +- ...tsonx_chat_completion_task_params_model.py | 5 +- .../create_webex_meeting_task_params.py | 17 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../create_zendesk_jira_link_task_params.py | 12 +- .../create_zendesk_ticket_task_params.py | 20 +- ...e_zendesk_ticket_task_params_completion.py | 5 +- ...ate_zendesk_ticket_task_params_priority.py | 5 +- .../models/create_zoom_meeting_task_params.py | 37 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/custom_field.py | 15 +- rootly_sdk/models/custom_field_list.py | 35 +- .../models/custom_field_list_data_item.py | 13 +- rootly_sdk/models/custom_field_option.py | 5 +- rootly_sdk/models/custom_field_option_list.py | 35 +- .../custom_field_option_list_data_item.py | 13 +- .../models/custom_field_option_response.py | 33 +- .../custom_field_option_response_data.py | 13 +- rootly_sdk/models/custom_field_response.py | 33 +- .../models/custom_field_response_data.py | 10 +- rootly_sdk/models/custom_form.py | 6 +- rootly_sdk/models/custom_form_list.py | 35 +- .../models/custom_form_list_data_item.py | 10 +- rootly_sdk/models/custom_form_response.py | 33 +- .../models/custom_form_response_data.py | 10 +- rootly_sdk/models/dashboard.py | 12 +- rootly_sdk/models/dashboard_list.py | 35 +- rootly_sdk/models/dashboard_list_data_item.py | 10 +- rootly_sdk/models/dashboard_panel.py | 7 +- .../models/dashboard_panel_data_item.py | 5 +- rootly_sdk/models/dashboard_panel_list.py | 35 +- .../models/dashboard_panel_list_data_item.py | 13 +- rootly_sdk/models/dashboard_panel_params.py | 12 +- .../dashboard_panel_params_datalabels.py | 5 +- .../dashboard_panel_params_datasets_item.py | 8 +- ...l_params_datasets_item_aggregate_type_0.py | 10 +- ..._panel_params_datasets_item_filter_item.py | 13 +- ...ms_datasets_item_filter_item_rules_item.py | 14 +- ...ms_datasets_item_group_by_type_1_type_0.py | 10 +- .../models/dashboard_panel_params_legend.py | 12 +- .../models/dashboard_panel_position_type_0.py | 5 +- rootly_sdk/models/dashboard_panel_response.py | 33 +- .../models/dashboard_panel_response_data.py | 13 +- rootly_sdk/models/dashboard_response.py | 33 +- rootly_sdk/models/dashboard_response_data.py | 10 +- .../models/delete_alert_route_response_200.py | 7 +- .../delete_alert_route_response_200_data.py | 7 +- ...lert_route_response_200_data_attributes.py | 5 +- rootly_sdk/models/duplicate_incident.py | 8 +- rootly_sdk/models/duplicate_incident_data.py | 10 +- .../duplicate_incident_data_attributes.py | 7 +- rootly_sdk/models/edge_connector.py | 8 +- rootly_sdk/models/edge_connector_action.py | 8 +- .../models/edge_connector_action_data.py | 12 +- .../edge_connector_action_data_attributes.py | 21 +- ..._data_attributes_parameters_type_0_item.py | 10 +- rootly_sdk/models/edge_connector_data.py | 12 +- .../models/edge_connector_data_attributes.py | 16 +- rootly_sdk/models/environment.py | 48 +- rootly_sdk/models/environment_list.py | 35 +- .../models/environment_list_data_item.py | 10 +- rootly_sdk/models/environment_managed_by.py | 21 + .../environment_properties_type_0_item.py | 5 +- rootly_sdk/models/environment_response.py | 33 +- .../models/environment_response_data.py | 10 +- .../environment_slack_aliases_type_0_item.py | 5 +- .../environment_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/errors_list.py | 7 +- rootly_sdk/models/errors_list_errors_item.py | 6 +- rootly_sdk/models/escalate_alert.py | 79 + rootly_sdk/models/escalate_alert_data.py | 97 + .../models/escalate_alert_data_attributes.py | 57 + rootly_sdk/models/escalate_alert_data_type.py | 15 + ...ation_path_rule_alert_urgency_rule_type.py | 19 - .../escalation_path_rule_deferral_window.py | 105 - ...ion_path_rule_deferral_window_rule_type.py | 19 - ...h_rule_deferral_window_time_blocks_item.py | 251 -- .../escalation_path_rule_field_rule_type.py | 15 - ...escalation_path_rule_json_path_operator.py | 22 - ...scalation_path_rule_json_path_rule_type.py | 15 - .../escalation_path_rule_service_rule_type.py | 15 - ...lation_path_rule_working_hour_rule_type.py | 19 - rootly_sdk/models/escalation_policy.py | 5 +- ...escalation_policy_business_hours_type_0.py | 12 +- ..._policy_business_hours_type_0_time_zone.py | 32 + rootly_sdk/models/escalation_policy_level.py | 13 +- .../models/escalation_policy_level_list.py | 35 +- .../escalation_policy_level_list_data_item.py | 8 +- ..._notification_target_params_item_type_0.py | 14 +- ...fication_target_params_item_type_0_type.py | 3 +- .../escalation_policy_level_response.py | 33 +- .../escalation_policy_level_response_data.py | 13 +- rootly_sdk/models/escalation_policy_list.py | 35 +- .../escalation_policy_list_data_item.py | 13 +- rootly_sdk/models/escalation_policy_path.py | 442 +++- .../models/escalation_policy_path_list.py | 35 +- .../escalation_policy_path_list_data_item.py | 8 +- .../models/escalation_policy_path_response.py | 33 +- .../escalation_policy_path_response_data.py | 13 +- ...calation_policy_path_rules_item_type_0.py} | 28 +- ...policy_path_rules_item_type_0_rule_type.py | 19 + ...calation_policy_path_rules_item_type_1.py} | 28 +- ...policy_path_rules_item_type_1_rule_type.py | 19 + ...calation_policy_path_rules_item_type_2.py} | 40 +- ..._policy_path_rules_item_type_2_operator.py | 47 + ...policy_path_rules_item_type_2_rule_type.py | 19 + ...calation_policy_path_rules_item_type_3.py} | 40 +- ...policy_path_rules_item_type_3_operator.py} | 16 +- ...policy_path_rules_item_type_3_rule_type.py | 19 + ...calation_policy_path_rules_item_type_4.py} | 28 +- ...policy_path_rules_item_type_4_rule_type.py | 19 + ...scalation_policy_path_rules_item_type_5.py | 112 + ...policy_path_rules_item_type_5_rule_type.py | 19 + ...path_rules_item_type_5_time_blocks_item.py | 166 ++ ...olicy_path_rules_item_type_5_time_zone.py} | 46 +- ...scalation_policy_path_rules_item_type_6.py | 90 + ..._policy_path_rules_item_type_6_operator.py | 22 + ...policy_path_rules_item_type_6_rule_type.py | 19 + ...scalation_policy_path_rules_item_type_7.py | 83 + ..._policy_path_rules_item_type_7_operator.py | 20 + ...policy_path_rules_item_type_7_rule_type.py | 19 + ...on_policy_path_rules_item_type_8_type_0.py | 80 + ...path_rules_item_type_8_type_0_rule_type.py | 21 + ...on_policy_path_rules_item_type_8_type_1.py | 80 + ...path_rules_item_type_8_type_1_rule_type.py | 21 + ...on_policy_path_rules_item_type_8_type_2.py | 126 + ..._path_rules_item_type_8_type_2_operator.py | 49 + ...path_rules_item_type_8_type_2_rule_type.py | 21 + ...on_policy_path_rules_item_type_8_type_3.py | 114 + ..._path_rules_item_type_8_type_3_operator.py | 49 + ...path_rules_item_type_8_type_3_rule_type.py | 21 + ...on_policy_path_rules_item_type_8_type_4.py | 80 + ...path_rules_item_type_8_type_4_rule_type.py | 21 + ...on_policy_path_rules_item_type_8_type_5.py | 116 + ...path_rules_item_type_8_type_5_rule_type.py | 21 + ...les_item_type_8_type_5_time_blocks_item.py | 166 ++ ...path_rules_item_type_8_type_5_time_zone.py | 631 +++++ ...on_policy_path_rules_item_type_8_type_6.py | 94 + ..._path_rules_item_type_8_type_6_operator.py | 24 + ...path_rules_item_type_8_type_6_rule_type.py | 21 + ...on_policy_path_rules_item_type_8_type_7.py | 87 + ..._path_rules_item_type_8_type_7_operator.py | 22 + ...path_rules_item_type_8_type_7_rule_type.py | 21 + ...on_policy_path_rules_item_type_9_type_0.py | 80 + ...path_rules_item_type_9_type_0_rule_type.py | 21 + ...on_policy_path_rules_item_type_9_type_1.py | 80 + ...path_rules_item_type_9_type_1_rule_type.py | 21 + ...on_policy_path_rules_item_type_9_type_2.py | 126 + ..._path_rules_item_type_9_type_2_operator.py | 49 + ...path_rules_item_type_9_type_2_rule_type.py | 21 + ...on_policy_path_rules_item_type_9_type_3.py | 114 + ..._path_rules_item_type_9_type_3_operator.py | 49 + ...path_rules_item_type_9_type_3_rule_type.py | 21 + ...on_policy_path_rules_item_type_9_type_4.py | 80 + ...path_rules_item_type_9_type_4_rule_type.py | 21 + ...on_policy_path_rules_item_type_9_type_5.py | 116 + ...path_rules_item_type_9_type_5_rule_type.py | 21 + ...les_item_type_9_type_5_time_blocks_item.py | 166 ++ ...path_rules_item_type_9_type_5_time_zone.py | 631 +++++ ...on_policy_path_rules_item_type_9_type_6.py | 94 + ..._path_rules_item_type_9_type_6_operator.py | 24 + ...path_rules_item_type_9_type_6_rule_type.py | 21 + ...on_policy_path_rules_item_type_9_type_7.py | 87 + ..._path_rules_item_type_9_type_7_operator.py | 22 + ...path_rules_item_type_9_type_7_rule_type.py | 21 + ..._policy_path_time_restriction_time_zone.py | 32 + ...tion_policy_path_time_restrictions_item.py | 14 +- .../models/escalation_policy_response.py | 33 +- .../models/escalation_policy_response_data.py | 13 +- rootly_sdk/models/form_field.py | 15 +- rootly_sdk/models/form_field_kind.py | 2 + rootly_sdk/models/form_field_list.py | 35 +- .../models/form_field_list_data_item.py | 10 +- rootly_sdk/models/form_field_option.py | 5 +- rootly_sdk/models/form_field_option_list.py | 35 +- .../form_field_option_list_data_item.py | 13 +- .../models/form_field_option_response.py | 33 +- .../models/form_field_option_response_data.py | 13 +- rootly_sdk/models/form_field_placement.py | 18 +- .../models/form_field_placement_condition.py | 18 +- .../form_field_placement_condition_list.py | 35 +- ...ield_placement_condition_list_data_item.py | 9 +- ...form_field_placement_condition_response.py | 33 +- ...field_placement_condition_response_data.py | 9 +- .../models/form_field_placement_list.py | 35 +- .../form_field_placement_list_data_item.py | 13 +- .../models/form_field_placement_response.py | 33 +- .../form_field_placement_response_data.py | 13 +- rootly_sdk/models/form_field_position.py | 9 +- rootly_sdk/models/form_field_position_form.py | 4 + rootly_sdk/models/form_field_position_list.py | 35 +- .../form_field_position_list_data_item.py | 13 +- .../models/form_field_position_response.py | 33 +- .../form_field_position_response_data.py | 13 +- rootly_sdk/models/form_field_response.py | 33 +- rootly_sdk/models/form_field_response_data.py | 10 +- rootly_sdk/models/form_set.py | 8 +- rootly_sdk/models/form_set_condition.py | 9 +- rootly_sdk/models/form_set_condition_list.py | 35 +- .../form_set_condition_list_data_item.py | 13 +- .../models/form_set_condition_response.py | 33 +- .../form_set_condition_response_data.py | 13 +- rootly_sdk/models/form_set_list.py | 35 +- rootly_sdk/models/form_set_list_data_item.py | 10 +- rootly_sdk/models/form_set_response.py | 33 +- rootly_sdk/models/form_set_response_data.py | 10 +- rootly_sdk/models/functionality.py | 48 +- rootly_sdk/models/functionality_list.py | 35 +- .../models/functionality_list_data_item.py | 13 +- rootly_sdk/models/functionality_managed_by.py | 21 + .../functionality_properties_type_0_item.py | 5 +- rootly_sdk/models/functionality_response.py | 33 +- .../models/functionality_response_data.py | 13 +- ...functionality_slack_aliases_type_0_item.py | 5 +- ...unctionality_slack_channels_type_0_item.py | 5 +- ...ne_number_live_call_router_country_code.py | 3 +- rootly_sdk/models/get_alert_include.py | 4 + rootly_sdk/models/get_alerts_task_params.py | 18 +- ..._task_params_parent_message_thread_task.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../get_github_commits_task_params_type_0.py | 66 + .../get_github_commits_task_params_type_1.py | 66 + .../get_gitlab_commits_task_params_type_0.py | 66 + .../get_gitlab_commits_task_params_type_1.py | 66 + .../models/get_meeting_recording_include.py | 15 + rootly_sdk/models/get_pulses_task_params.py | 18 +- ..._task_params_parent_message_thread_task.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/get_team_include.py | 4 +- rootly_sdk/models/heartbeat.py | 29 +- rootly_sdk/models/heartbeat_list.py | 35 +- rootly_sdk/models/heartbeat_list_data_item.py | 10 +- rootly_sdk/models/heartbeat_response.py | 33 +- rootly_sdk/models/heartbeat_response_data.py | 10 +- rootly_sdk/models/http_client_task_params.py | 38 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/import_meeting_recording.py | 170 ++ .../import_meeting_recording_platform.py | 18 + .../models/import_meeting_recording_source.py | 15 + rootly_sdk/models/in_triage_incident.py | 8 +- rootly_sdk/models/in_triage_incident_data.py | 9 +- rootly_sdk/models/incident.py | 370 ++- rootly_sdk/models/incident_action_item.py | 36 +- .../models/incident_action_item_list.py | 35 +- .../incident_action_item_list_data_item.py | 13 +- .../models/incident_action_item_response.py | 33 +- .../incident_action_item_response_data.py | 13 +- .../models/incident_cancelled_by_type_0.py | 5 +- .../models/incident_closed_by_type_0.py | 5 +- .../models/incident_custom_field_selection.py | 6 +- .../incident_custom_field_selection_list.py | 35 +- ...t_custom_field_selection_list_data_item.py | 9 +- ...ncident_custom_field_selection_response.py | 33 +- ...nt_custom_field_selection_response_data.py | 9 +- rootly_sdk/models/incident_event.py | 9 +- .../models/incident_event_functionality.py | 13 +- .../incident_event_functionality_list.py | 35 +- ...dent_event_functionality_list_data_item.py | 9 +- .../incident_event_functionality_response.py | 33 +- ...ident_event_functionality_response_data.py | 9 +- rootly_sdk/models/incident_event_list.py | 35 +- .../models/incident_event_list_data_item.py | 13 +- rootly_sdk/models/incident_event_response.py | 33 +- .../models/incident_event_response_data.py | 13 +- rootly_sdk/models/incident_event_service.py | 10 +- .../models/incident_event_service_list.py | 35 +- .../incident_event_service_list_data_item.py | 13 +- .../models/incident_event_service_response.py | 33 +- .../incident_event_service_response_data.py | 13 +- rootly_sdk/models/incident_feedback.py | 9 +- rootly_sdk/models/incident_feedback_list.py | 35 +- .../incident_feedback_list_data_item.py | 13 +- .../models/incident_feedback_response.py | 33 +- .../models/incident_feedback_response_data.py | 13 +- .../models/incident_form_field_selection.py | 6 +- .../incident_form_field_selection_list.py | 35 +- ...ent_form_field_selection_list_data_item.py | 9 +- .../incident_form_field_selection_response.py | 33 +- ...dent_form_field_selection_response_data.py | 9 +- .../models/incident_in_triage_by_type_0.py | 5 +- rootly_sdk/models/incident_labels_type_0.py | 5 +- rootly_sdk/models/incident_list.py | 35 +- rootly_sdk/models/incident_list_data_item.py | 10 +- .../models/incident_mitigated_by_type_0.py | 5 +- rootly_sdk/models/incident_permission_set.py | 14 +- .../models/incident_permission_set_boolean.py | 12 +- .../incident_permission_set_boolean_list.py | 35 +- ...t_permission_set_boolean_list_data_item.py | 9 +- ...ncident_permission_set_boolean_response.py | 33 +- ...nt_permission_set_boolean_response_data.py | 9 +- .../models/incident_permission_set_list.py | 35 +- .../incident_permission_set_list_data_item.py | 13 +- .../incident_permission_set_resource.py | 12 +- .../incident_permission_set_resource_list.py | 35 +- ..._permission_set_resource_list_data_item.py | 9 +- ...cident_permission_set_resource_response.py | 33 +- ...t_permission_set_resource_response_data.py | 9 +- .../incident_permission_set_response.py | 33 +- .../incident_permission_set_response_data.py | 13 +- rootly_sdk/models/incident_post_mortem.py | 15 +- .../models/incident_post_mortem_list.py | 35 +- .../incident_post_mortem_list_data_item.py | 13 +- .../models/incident_post_mortem_response.py | 33 +- .../incident_post_mortem_response_data.py | 13 +- .../models/incident_resolved_by_type_0.py | 5 +- rootly_sdk/models/incident_response.py | 33 +- rootly_sdk/models/incident_response_data.py | 10 +- .../models/incident_retrospective_step.py | 12 +- .../incident_retrospective_step_response.py | 33 +- ...cident_retrospective_step_response_data.py | 13 +- rootly_sdk/models/incident_role.py | 6 +- rootly_sdk/models/incident_role_list.py | 35 +- .../models/incident_role_list_data_item.py | 13 +- rootly_sdk/models/incident_role_response.py | 33 +- .../models/incident_role_response_data.py | 13 +- rootly_sdk/models/incident_role_task.py | 9 +- rootly_sdk/models/incident_role_task_list.py | 35 +- .../incident_role_task_list_data_item.py | 13 +- .../models/incident_role_task_response.py | 33 +- .../incident_role_task_response_data.py | 13 +- .../models/incident_started_by_type_0.py | 5 +- .../models/incident_status_page_event.py | 12 +- .../models/incident_status_page_event_list.py | 35 +- ...cident_status_page_event_list_data_item.py | 13 +- .../incident_status_page_event_response.py | 33 +- ...ncident_status_page_event_response_data.py | 13 +- rootly_sdk/models/incident_sub_status.py | 6 +- rootly_sdk/models/incident_sub_status_list.py | 35 +- .../incident_sub_status_list_data_item.py | 13 +- .../models/incident_sub_status_response.py | 33 +- .../incident_sub_status_response_data.py | 13 +- rootly_sdk/models/incident_trigger_params.py | 452 ++-- ...rams_incident_condition_acknowledged_at.py | 22 + ...cident_condition_acknowledged_at_type_1.py | 22 - ..._params_incident_condition_detected_at.py} | 16 +- ...trigger_params_incident_condition_label.py | 29 + ...params_incident_condition_mitigated_at.py} | 16 +- ..._params_incident_condition_resolved_at.py} | 16 +- ...er_params_incident_condition_started_at.py | 20 + ...ms_incident_condition_started_at_type_1.py | 22 - ...igger_params_incident_condition_summary.py | 20 + ...arams_incident_condition_summary_type_1.py | 22 - ...params_incident_conditional_inactivity.py} | 16 +- rootly_sdk/models/incident_type.py | 9 +- rootly_sdk/models/incident_type_list.py | 35 +- .../models/incident_type_list_data_item.py | 13 +- .../models/incident_type_properties_item.py | 5 +- rootly_sdk/models/incident_type_response.py | 33 +- .../models/incident_type_response_data.py | 13 +- ...incident_type_slack_aliases_type_0_item.py | 5 +- ...ncident_type_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/incident_user_type_0.py | 5 +- ...ting_global_dial_in_numbers_type_0_item.py | 5 +- rootly_sdk/models/incidents_chart_response.py | 32 +- .../models/incidents_chart_response_data.py | 50 + ...invite_to_google_chat_space_task_params.py | 102 + ..._to_google_chat_space_task_params_space.py | 73 + ...google_chat_space_task_params_task_type.py | 19 + ...rosoft_teams_channel_rootly_task_params.py | 246 ++ ...eams_channel_rootly_task_params_channel.py | 73 + ...ly_task_params_escalation_policy_target.py | 73 + ...channel_rootly_task_params_group_target.py | 73 + ...nnel_rootly_task_params_schedule_target.py | 73 + ...annel_rootly_task_params_service_target.py | 73 + ...ms_channel_rootly_task_params_task_type.py | 21 + ...t_teams_channel_rootly_task_params_team.py | 73 + ..._channel_rootly_task_params_user_target.py | 73 + ..._to_microsoft_teams_channel_task_params.py | 16 +- ...osoft_teams_channel_task_params_channel.py | 5 +- ...icrosoft_teams_channel_task_params_team.py | 5 +- ...e_to_slack_channel_opsgenie_task_params.py | 16 +- ...nnel_opsgenie_task_params_channels_item.py | 5 +- ...k_channel_opsgenie_task_params_schedule.py | 5 +- ...ty_task_params_type_0_escalation_policy.py | 73 + ...l_pagerduty_task_params_type_1_schedule.py | 73 + ...ite_to_slack_channel_rootly_task_params.py | 26 +- ...hannel_rootly_task_params_channels_item.py | 5 +- ...ly_task_params_escalation_policy_target.py | 5 +- ...channel_rootly_task_params_group_target.py | 5 +- ...nnel_rootly_task_params_schedule_target.py | 5 +- ...annel_rootly_task_params_service_target.py | 5 +- ..._channel_rootly_task_params_user_target.py | 5 +- ...nel_task_params_type_0_slack_users_item.py | 73 + ...sk_params_type_1_slack_user_groups_item.py | 73 + ...ite_to_slack_channel_task_params_type_2.py | 64 + ...to_slack_channel_victor_ops_task_params.py | 16 +- ...el_victor_ops_task_params_channels_item.py | 5 +- ...ack_channel_victor_ops_task_params_team.py | 5 +- rootly_sdk/models/ip_ranges.py | 7 +- rootly_sdk/models/ip_ranges_response.py | 8 +- rootly_sdk/models/ip_ranges_response_data.py | 10 +- .../models/jsonapi_included_resource.py | 117 + .../jsonapi_included_resource_attributes.py | 50 + ...jsonapi_included_resource_relationships.py | 50 + rootly_sdk/models/links.py | 7 +- .../list_alert_events_feed_filteraction.py | 77 + .../list_alert_events_feed_filterkind.py | 39 + .../models/list_alert_events_feed_sort.py | 16 + rootly_sdk/models/list_alerts_include.py | 4 + .../list_escalation_paths_filterpath_type.py | 16 + .../models/list_incident_alerts_include.py | 4 + rootly_sdk/models/list_teams_include.py | 4 +- rootly_sdk/models/live_call_router.py | 90 +- .../models/live_call_router_country_code.py | 3 +- ...router_escalation_policy_trigger_params.py | 10 +- rootly_sdk/models/live_call_router_list.py | 35 +- .../models/live_call_router_list_data_item.py | 13 +- .../live_call_router_paging_targets_item.py | 12 +- .../models/live_call_router_response.py | 33 +- .../models/live_call_router_response_data.py | 13 +- rootly_sdk/models/meeting_recording.py | 101 +- rootly_sdk/models/meeting_recording_detail.py | 419 ++++ .../meeting_recording_detail_response.py | 73 + .../meeting_recording_detail_response_data.py | 91 + ...ing_recording_detail_response_data_type.py | 19 + ...ting_recording_detail_transcript_type_1.py | 50 + rootly_sdk/models/meeting_recording_list.py | 8 +- .../meeting_recording_list_data_item.py | 13 +- .../models/meeting_recording_response.py | 73 + .../models/meeting_recording_response_data.py | 91 + .../meeting_recording_response_data_type.py | 15 + .../meeting_recording_transcript_segment.py | 89 + .../meeting_recording_transcript_word.py | 84 + rootly_sdk/models/meta.py | 6 +- rootly_sdk/models/mitigate_incident.py | 8 +- rootly_sdk/models/mitigate_incident_data.py | 10 +- .../mitigate_incident_data_attributes.py | 7 +- rootly_sdk/models/new_alert.py | 8 +- rootly_sdk/models/new_alert_data.py | 10 +- .../models/new_alert_data_attributes.py | 136 +- ...ert_field_values_attributes_item_type_0.py | 5 +- .../new_alert_data_attributes_data_type_0.py | 5 +- ...lert_data_attributes_labels_item_type_0.py | 7 +- ...ata_attributes_notification_target_type.py | 3 +- ...ibutes_notification_targets_type_0_item.py | 63 + ...s_notification_targets_type_0_item_type.py | 27 + .../new_alert_data_attributes_source.py | 105 - rootly_sdk/models/new_alert_event.py | 8 +- rootly_sdk/models/new_alert_event_data.py | 10 +- .../models/new_alert_event_data_attributes.py | 13 +- rootly_sdk/models/new_alert_field.py | 8 +- rootly_sdk/models/new_alert_field_data.py | 10 +- .../models/new_alert_field_data_attributes.py | 6 +- rootly_sdk/models/new_alert_group.py | 8 +- rootly_sdk/models/new_alert_group_data.py | 10 +- .../models/new_alert_group_data_attributes.py | 22 +- ...t_group_data_attributes_attributes_item.py | 5 +- ...t_group_data_attributes_conditions_item.py | 18 +- ...lert_group_data_attributes_targets_item.py | 17 +- ...ata_attributes_targets_item_target_type.py | 3 +- rootly_sdk/models/new_alert_route.py | 7 +- rootly_sdk/models/new_alert_route_data.py | 10 +- .../models/new_alert_route_data_attributes.py | 9 +- ..._alert_route_data_attributes_rules_item.py | 12 +- ...ibutes_rules_item_condition_groups_item.py | 9 +- ...m_condition_groups_item_conditions_item.py | 20 +- ...attributes_rules_item_destinations_item.py | 12 +- rootly_sdk/models/new_alert_routing_rule.py | 8 +- .../models/new_alert_routing_rule_data.py | 13 +- .../new_alert_routing_rule_data_attributes.py | 19 +- ...ng_rule_data_attributes_conditions_item.py | 14 +- ...outing_rule_data_attributes_destination.py | 12 +- rootly_sdk/models/new_alert_urgency.py | 8 +- rootly_sdk/models/new_alert_urgency_data.py | 10 +- .../new_alert_urgency_data_attributes.py | 7 +- rootly_sdk/models/new_alerts_source.py | 8 +- rootly_sdk/models/new_alerts_source_data.py | 10 +- .../new_alerts_source_data_attributes.py | 30 +- ...tes_alert_source_fields_attributes_item.py | 6 +- ...rt_source_urgency_rules_attributes_item.py | 18 +- ...ibutes_alert_template_attributes_type_0.py | 6 +- ...butes_resolution_rule_attributes_type_0.py | 21 +- ...butes_type_0_conditions_attributes_item.py | 18 +- ...erts_source_data_attributes_source_type.py | 2 + ...attributes_sourceable_attributes_type_0.py | 9 +- ...s_type_0_field_mappings_attributes_item.py | 13 +- rootly_sdk/models/new_api_key.py | 8 +- rootly_sdk/models/new_api_key_data.py | 10 +- .../models/new_api_key_data_attributes.py | 17 +- rootly_sdk/models/new_authorization.py | 8 +- rootly_sdk/models/new_authorization_data.py | 10 +- .../new_authorization_data_attributes.py | 17 +- rootly_sdk/models/new_catalog.py | 8 +- .../models/new_catalog_checklist_template.py | 8 +- .../new_catalog_checklist_template_data.py | 13 +- ...alog_checklist_template_data_attributes.py | 20 +- ..._template_data_attributes_builtin_field.py | 10 +- ...t_template_data_attributes_custom_field.py | 10 +- ...late_data_attributes_owners_type_0_item.py | 10 +- rootly_sdk/models/new_catalog_data.py | 10 +- .../models/new_catalog_data_attributes.py | 33 +- rootly_sdk/models/new_catalog_entity.py | 8 +- rootly_sdk/models/new_catalog_entity_data.py | 10 +- .../new_catalog_entity_data_attributes.py | 51 +- ..._entity_data_attributes_properties_item.py | 5 +- .../models/new_catalog_entity_property.py | 8 +- .../new_catalog_entity_property_data.py | 13 +- ...catalog_entity_property_data_attributes.py | 9 +- rootly_sdk/models/new_catalog_field.py | 8 +- rootly_sdk/models/new_catalog_field_data.py | 10 +- .../new_catalog_field_data_attributes.py | 40 +- rootly_sdk/models/new_catalog_property.py | 8 +- .../models/new_catalog_property_data.py | 10 +- .../new_catalog_property_data_attributes.py | 36 +- rootly_sdk/models/new_cause.py | 8 +- rootly_sdk/models/new_cause_data.py | 10 +- .../models/new_cause_data_attributes.py | 8 +- ...w_cause_data_attributes_properties_item.py | 5 +- rootly_sdk/models/new_communications_group.py | 8 +- .../models/new_communications_group_data.py | 13 +- ...ew_communications_group_data_attributes.py | 17 +- ...tion_external_group_members_type_0_item.py | 5 +- ...munication_group_conditions_type_0_item.py | 10 +- rootly_sdk/models/new_communications_stage.py | 8 +- .../models/new_communications_stage_data.py | 13 +- ...ew_communications_stage_data_attributes.py | 7 +- .../models/new_communications_template.py | 8 +- .../new_communications_template_data.py | 13 +- ...communications_template_data_attributes.py | 10 +- ..._template_stages_attributes_type_0_item.py | 6 +- rootly_sdk/models/new_communications_type.py | 8 +- .../models/new_communications_type_data.py | 13 +- ...new_communications_type_data_attributes.py | 7 +- rootly_sdk/models/new_custom_field.py | 8 +- rootly_sdk/models/new_custom_field_data.py | 10 +- .../new_custom_field_data_attributes.py | 15 +- rootly_sdk/models/new_custom_field_option.py | 8 +- .../models/new_custom_field_option_data.py | 13 +- ...new_custom_field_option_data_attributes.py | 6 +- rootly_sdk/models/new_custom_form.py | 8 +- rootly_sdk/models/new_custom_form_data.py | 10 +- .../models/new_custom_form_data_attributes.py | 7 +- rootly_sdk/models/new_dashboard.py | 8 +- rootly_sdk/models/new_dashboard_data.py | 10 +- .../models/new_dashboard_data_attributes.py | 25 +- rootly_sdk/models/new_dashboard_panel.py | 8 +- rootly_sdk/models/new_dashboard_panel_data.py | 10 +- .../new_dashboard_panel_data_attributes.py | 7 +- ..._dashboard_panel_data_attributes_params.py | 17 +- ...panel_data_attributes_params_datalabels.py | 5 +- ...el_data_attributes_params_datasets_item.py | 12 +- ...s_params_datasets_item_aggregate_type_0.py | 10 +- ...ibutes_params_datasets_item_filter_item.py | 13 +- ...ms_datasets_item_filter_item_rules_item.py | 14 +- ...ms_datasets_item_group_by_type_1_type_0.py | 10 +- ...ard_panel_data_attributes_params_legend.py | 10 +- ...d_panel_data_attributes_position_type_0.py | 5 +- rootly_sdk/models/new_edge_connector.py | 8 +- .../models/new_edge_connector_action.py | 8 +- .../new_edge_connector_action_action.py | 13 +- ...w_edge_connector_action_action_metadata.py | 15 +- ..._action_metadata_parameters_type_0_item.py | 10 +- .../new_edge_connector_edge_connector.py | 12 +- rootly_sdk/models/new_environment.py | 8 +- rootly_sdk/models/new_environment_data.py | 10 +- .../models/new_environment_data_attributes.py | 34 +- ...ronment_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_escalation_policy.py | 8 +- .../models/new_escalation_policy_data.py | 10 +- .../new_escalation_policy_data_attributes.py | 6 +- ...y_data_attributes_business_hours_type_0.py | 14 +- ...ributes_business_hours_type_0_time_zone.py | 32 + .../models/new_escalation_policy_level.py | 8 +- .../new_escalation_policy_level_data.py | 13 +- ...escalation_policy_level_data_attributes.py | 14 +- ..._notification_target_params_item_type_0.py | 17 +- ...fication_target_params_item_type_0_type.py | 3 +- .../models/new_escalation_policy_path.py | 8 +- .../models/new_escalation_policy_path_data.py | 13 +- ..._escalation_policy_path_data_attributes.py | 210 +- ..._path_data_attributes_rules_item_type_0.py | 80 + ..._attributes_rules_item_type_0_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_1.py | 80 + ..._attributes_rules_item_type_1_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_2.py | 126 + ...a_attributes_rules_item_type_2_operator.py | 49 + ..._attributes_rules_item_type_2_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_3.py | 115 + ...a_attributes_rules_item_type_3_operator.py | 49 + ..._attributes_rules_item_type_3_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_4.py | 80 + ..._attributes_rules_item_type_4_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_5.py | 118 + ..._attributes_rules_item_type_5_rule_type.py | 21 + ...utes_rules_item_type_5_time_blocks_item.py | 166 ++ ..._attributes_rules_item_type_5_time_zone.py | 631 +++++ ..._path_data_attributes_rules_item_type_6.py | 94 + ...a_attributes_rules_item_type_6_operator.py | 24 + ..._attributes_rules_item_type_6_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_7.py | 87 + ...a_attributes_rules_item_type_7_operator.py | 22 + ..._attributes_rules_item_type_7_rule_type.py | 21 + ...a_attributes_time_restriction_time_zone.py | 32 + ..._data_attributes_time_restrictions_item.py | 14 +- rootly_sdk/models/new_form_field.py | 8 +- rootly_sdk/models/new_form_field_data.py | 10 +- .../models/new_form_field_data_attributes.py | 25 +- .../new_form_field_data_attributes_kind.py | 2 + rootly_sdk/models/new_form_field_option.py | 8 +- .../models/new_form_field_option_data.py | 10 +- .../new_form_field_option_data_attributes.py | 6 +- rootly_sdk/models/new_form_field_placement.py | 8 +- .../new_form_field_placement_condition.py | 8 +- ...new_form_field_placement_condition_data.py | 15 +- ...eld_placement_condition_data_attributes.py | 14 +- .../models/new_form_field_placement_data.py | 13 +- ...ew_form_field_placement_data_attributes.py | 14 +- rootly_sdk/models/new_form_field_position.py | 8 +- .../models/new_form_field_position_data.py | 13 +- ...new_form_field_position_data_attributes.py | 13 +- ...orm_field_position_data_attributes_form.py | 4 + rootly_sdk/models/new_form_set.py | 8 +- rootly_sdk/models/new_form_set_condition.py | 8 +- .../models/new_form_set_condition_data.py | 13 +- .../new_form_set_condition_data_attributes.py | 8 +- rootly_sdk/models/new_form_set_data.py | 10 +- .../models/new_form_set_data_attributes.py | 10 +- rootly_sdk/models/new_functionality.py | 8 +- rootly_sdk/models/new_functionality_data.py | 10 +- .../new_functionality_data_attributes.py | 40 +- ...onality_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_heartbeat.py | 8 +- rootly_sdk/models/new_heartbeat_data.py | 10 +- .../models/new_heartbeat_data_attributes.py | 26 +- rootly_sdk/models/new_incident.py | 8 +- rootly_sdk/models/new_incident_action_item.py | 8 +- .../models/new_incident_action_item_data.py | 13 +- ...ew_incident_action_item_data_attributes.py | 77 +- ...butes_form_field_selections_type_0_item.py | 209 ++ .../new_incident_custom_field_selection.py | 8 +- ...ew_incident_custom_field_selection_data.py | 15 +- ..._custom_field_selection_data_attributes.py | 7 +- rootly_sdk/models/new_incident_data.py | 10 +- .../models/new_incident_data_attributes.py | 18 +- ..._incident_data_attributes_labels_type_0.py | 5 +- rootly_sdk/models/new_incident_event.py | 8 +- rootly_sdk/models/new_incident_event_data.py | 10 +- .../new_incident_event_data_attributes.py | 13 +- .../new_incident_event_functionality.py | 8 +- .../new_incident_event_functionality_data.py | 15 +- ...ent_event_functionality_data_attributes.py | 11 +- .../models/new_incident_event_service.py | 8 +- .../models/new_incident_event_service_data.py | 13 +- ..._incident_event_service_data_attributes.py | 9 +- rootly_sdk/models/new_incident_feedback.py | 8 +- .../models/new_incident_feedback_data.py | 10 +- .../new_incident_feedback_data_attributes.py | 13 +- .../new_incident_form_field_selection.py | 8 +- .../new_incident_form_field_selection_data.py | 15 +- ...nt_form_field_selection_data_attributes.py | 7 +- .../models/new_incident_permission_set.py | 8 +- .../new_incident_permission_set_boolean.py | 8 +- ...ew_incident_permission_set_boolean_data.py | 15 +- ..._permission_set_boolean_data_attributes.py | 14 +- ...boolean_data_attributes_severity_params.py | 6 +- .../new_incident_permission_set_data.py | 13 +- ...incident_permission_set_data_attributes.py | 15 +- .../new_incident_permission_set_resource.py | 8 +- ...w_incident_permission_set_resource_data.py | 15 +- ...permission_set_resource_data_attributes.py | 14 +- ...esource_data_attributes_severity_params.py | 6 +- rootly_sdk/models/new_incident_role.py | 8 +- rootly_sdk/models/new_incident_role_data.py | 10 +- .../new_incident_role_data_attributes.py | 7 +- rootly_sdk/models/new_incident_role_task.py | 8 +- .../models/new_incident_role_task_data.py | 13 +- .../new_incident_role_task_data_attributes.py | 9 +- .../models/new_incident_status_page_event.py | 8 +- .../new_incident_status_page_event_data.py | 13 +- ...ident_status_page_event_data_attributes.py | 43 +- rootly_sdk/models/new_incident_sub_status.py | 8 +- .../models/new_incident_sub_status_data.py | 13 +- ...new_incident_sub_status_data_attributes.py | 7 +- rootly_sdk/models/new_incident_type.py | 8 +- rootly_sdk/models/new_incident_type_data.py | 10 +- .../new_incident_type_data_attributes.py | 16 +- ...nt_type_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_live_call_router.py | 8 +- .../models/new_live_call_router_data.py | 10 +- .../new_live_call_router_data_attributes.py | 92 +- ...all_router_data_attributes_country_code.py | 3 +- ...ibutes_escalation_policy_trigger_params.py | 10 +- ...ter_data_attributes_paging_targets_item.py | 10 +- rootly_sdk/models/new_on_call_pay_report.py | 8 +- .../models/new_on_call_pay_report_data.py | 10 +- .../new_on_call_pay_report_data_attributes.py | 31 +- rootly_sdk/models/new_on_call_role.py | 8 +- rootly_sdk/models/new_on_call_role_data.py | 10 +- .../new_on_call_role_data_attributes.py | 155 +- ...ta_attributes_catalogs_permissions_item.py | 24 + ...ibutes_functionalities_permissions_item.py | 24 + rootly_sdk/models/new_on_call_shadow.py | 8 +- rootly_sdk/models/new_on_call_shadow_data.py | 10 +- .../new_on_call_shadow_data_attributes.py | 13 +- rootly_sdk/models/new_override_shift.py | 8 +- rootly_sdk/models/new_override_shift_data.py | 10 +- .../new_override_shift_data_attributes.py | 10 +- rootly_sdk/models/new_playbook.py | 8 +- rootly_sdk/models/new_playbook_data.py | 10 +- .../models/new_playbook_data_attributes.py | 7 +- rootly_sdk/models/new_playbook_task.py | 8 +- rootly_sdk/models/new_playbook_task_data.py | 10 +- .../new_playbook_task_data_attributes.py | 7 +- rootly_sdk/models/new_post_mortem_template.py | 8 +- .../models/new_post_mortem_template_data.py | 13 +- ...ew_post_mortem_template_data_attributes.py | 9 +- rootly_sdk/models/new_pulse.py | 8 +- rootly_sdk/models/new_pulse_data.py | 10 +- .../models/new_pulse_data_attributes.py | 12 +- .../new_pulse_data_attributes_data_type_0.py | 5 +- ...ulse_data_attributes_labels_item_type_0.py | 5 +- ..._pulse_data_attributes_refs_item_type_0.py | 5 +- .../models/new_retrospective_process.py | 8 +- .../models/new_retrospective_process_data.py | 13 +- ...w_retrospective_process_data_attributes.py | 9 +- ...ective_process_matching_criteria_type_0.py | 8 +- ...ective_process_matching_criteria_type_1.py | 8 +- ...ective_process_matching_criteria_type_2.py | 8 +- .../models/new_retrospective_process_group.py | 8 +- .../new_retrospective_process_group_data.py | 13 +- ...ospective_process_group_data_attributes.py | 6 +- .../new_retrospective_process_group_step.py | 8 +- ...w_retrospective_process_group_step_data.py | 15 +- ...tive_process_group_step_data_attributes.py | 6 +- rootly_sdk/models/new_retrospective_step.py | 8 +- .../models/new_retrospective_step_data.py | 13 +- .../new_retrospective_step_data_attributes.py | 7 +- rootly_sdk/models/new_role.py | 8 +- rootly_sdk/models/new_role_data.py | 10 +- rootly_sdk/models/new_role_data_attributes.py | 107 +- rootly_sdk/models/new_schedule.py | 8 +- rootly_sdk/models/new_schedule_data.py | 10 +- .../models/new_schedule_data_attributes.py | 182 +- ...ata_attributes_shift_report_day_of_week.py | 27 + ...le_data_attributes_slack_channel_type_0.py | 5 +- ...hedule_data_attributes_slack_user_group.py | 5 +- rootly_sdk/models/new_schedule_rotation.py | 8 +- .../new_schedule_rotation_active_day.py | 8 +- .../new_schedule_rotation_active_day_data.py | 13 +- ...ule_rotation_active_day_data_attributes.py | 14 +- ..._attributes_active_time_attributes_item.py | 5 +- .../models/new_schedule_rotation_data.py | 10 +- .../new_schedule_rotation_data_attributes.py | 51 +- ..._attributes_active_time_attributes_item.py | 5 +- ...s_schedule_rotation_members_type_0_item.py | 10 +- ...schedule_rotationable_attributes_type_0.py | 6 +- ...schedule_rotationable_attributes_type_1.py | 11 +- ...schedule_rotationable_attributes_type_2.py | 11 +- ...schedule_rotationable_attributes_type_3.py | 11 +- .../models/new_schedule_rotation_user.py | 7 +- .../models/new_schedule_rotation_user_data.py | 13 +- ..._schedule_rotation_user_data_attributes.py | 6 +- rootly_sdk/models/new_secret.py | 8 +- rootly_sdk/models/new_secret_data.py | 10 +- .../models/new_secret_data_attributes.py | 10 +- rootly_sdk/models/new_service.py | 8 +- rootly_sdk/models/new_service_data.py | 10 +- .../models/new_service_data_attributes.py | 19 +- ...tributes_alert_broadcast_channel_type_0.py | 5 +- ...butes_incident_broadcast_channel_type_0.py | 5 +- ...service_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_severity.py | 8 +- rootly_sdk/models/new_severity_data.py | 10 +- .../models/new_severity_data_attributes.py | 19 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../models/new_shift_coverage_request.py | 73 + .../models/new_shift_coverage_request_data.py | 83 + ..._shift_coverage_request_data_attributes.py | 69 + .../new_shift_coverage_request_data_type.py | 15 + rootly_sdk/models/new_sla.py | 8 +- rootly_sdk/models/new_sla_data.py | 10 +- rootly_sdk/models/new_sla_data_attributes.py | 29 +- ...new_sla_data_attributes_conditions_item.py | 18 +- ...ibutes_notification_configurations_item.py | 10 +- rootly_sdk/models/new_status_page.py | 8 +- rootly_sdk/models/new_status_page_data.py | 10 +- .../models/new_status_page_data_attributes.py | 21 +- rootly_sdk/models/new_status_page_template.py | 8 +- .../models/new_status_page_template_data.py | 13 +- ...ew_status_page_template_data_attributes.py | 15 +- rootly_sdk/models/new_sub_status.py | 8 +- rootly_sdk/models/new_sub_status_data.py | 10 +- .../models/new_sub_status_data_attributes.py | 13 +- rootly_sdk/models/new_team.py | 8 +- rootly_sdk/models/new_team_data.py | 10 +- rootly_sdk/models/new_team_data_attributes.py | 35 +- ...tributes_alert_broadcast_channel_type_0.py | 5 +- ..._data_attributes_auto_add_members_scope.py | 22 + ...butes_incident_broadcast_channel_type_0.py | 5 +- ...ew_team_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_user_email_address.py | 8 +- .../models/new_user_email_address_data.py | 13 +- .../new_user_email_address_data_attributes.py | 6 +- .../models/new_user_notification_rule.py | 8 +- .../models/new_user_notification_rule_data.py | 13 +- ..._user_notification_rule_data_attributes.py | 11 +- ...a_attributes_enabled_contact_types_item.py | 3 +- rootly_sdk/models/new_user_phone_number.py | 8 +- .../models/new_user_phone_number_data.py | 10 +- .../new_user_phone_number_data_attributes.py | 6 +- rootly_sdk/models/new_webhooks_endpoint.py | 8 +- .../models/new_webhooks_endpoint_data.py | 10 +- .../new_webhooks_endpoint_data_attributes.py | 48 +- ...int_data_attributes_custom_headers_item.py | 54 + ...dpoint_data_attributes_event_types_item.py | 4 + rootly_sdk/models/new_workflow.py | 8 +- ...rkflow_action_item_form_field_condition.py | 77 + ...w_action_item_form_field_condition_data.py | 93 + ...em_form_field_condition_data_attributes.py | 178 ++ ...n_data_attributes_action_item_condition.py | 31 + ...ion_item_form_field_condition_data_type.py | 19 + .../new_workflow_custom_field_selection.py | 8 +- ...ew_workflow_custom_field_selection_data.py | 15 +- ..._custom_field_selection_data_attributes.py | 11 +- rootly_sdk/models/new_workflow_data.py | 10 +- .../models/new_workflow_data_attributes.py | 23 +- .../new_workflow_form_field_condition.py | 8 +- .../new_workflow_form_field_condition_data.py | 15 +- ...ow_form_field_condition_data_attributes.py | 11 +- rootly_sdk/models/new_workflow_group.py | 8 +- rootly_sdk/models/new_workflow_group_data.py | 10 +- .../new_workflow_group_data_attributes.py | 12 +- rootly_sdk/models/new_workflow_run.py | 8 +- rootly_sdk/models/new_workflow_run_data.py | 15 +- ...new_workflow_run_data_attributes_type_0.py | 7 +- ...flow_run_data_attributes_type_0_context.py | 5 +- ...new_workflow_run_data_attributes_type_1.py | 7 +- ...flow_run_data_attributes_type_1_context.py | 5 +- ...new_workflow_run_data_attributes_type_2.py | 7 +- ...flow_run_data_attributes_type_2_context.py | 5 +- ...new_workflow_run_data_attributes_type_3.py | 7 +- ...flow_run_data_attributes_type_3_context.py | 5 +- ...new_workflow_run_data_attributes_type_4.py | 7 +- ...flow_run_data_attributes_type_4_context.py | 5 +- ...new_workflow_run_data_attributes_type_5.py | 7 +- ...flow_run_data_attributes_type_5_context.py | 5 +- rootly_sdk/models/new_workflow_task.py | 8 +- rootly_sdk/models/new_workflow_task_data.py | 10 +- .../new_workflow_task_data_attributes.py | 1231 +++++++--- rootly_sdk/models/on_call_pay_report.py | 29 +- rootly_sdk/models/on_call_pay_report_list.py | 35 +- .../on_call_pay_report_list_data_item.py | 13 +- .../models/on_call_pay_report_response.py | 33 +- .../on_call_pay_report_response_data.py | 13 +- rootly_sdk/models/on_call_role.py | 166 +- .../on_call_role_catalogs_permissions_item.py | 18 + ...l_role_functionalities_permissions_item.py | 22 + rootly_sdk/models/on_call_role_list.py | 35 +- .../models/on_call_role_list_data_item.py | 10 +- .../models/on_call_role_relationship.py | 5 +- .../on_call_role_relationship_data_type_0.py | 12 +- rootly_sdk/models/on_call_role_response.py | 33 +- .../models/on_call_role_response_data.py | 10 +- rootly_sdk/models/on_call_shadow.py | 13 +- rootly_sdk/models/on_call_shadow_response.py | 33 +- .../models/on_call_shadow_response_data.py | 13 +- rootly_sdk/models/on_call_shadows_list.py | 35 +- .../models/on_call_shadows_list_data_item.py | 13 +- rootly_sdk/models/oncall.py | 228 ++ rootly_sdk/models/oncall_list.py | 106 + rootly_sdk/models/oncall_list_data_item.py | 111 + .../models/oncall_list_data_item_type.py | 15 + rootly_sdk/models/oncall_notification_type.py | 16 + rootly_sdk/models/oncall_relationships.py | 117 + .../oncall_relationships_escalation_policy.py | 98 + ...tionships_escalation_policy_data_type_0.py | 87 + ...hips_escalation_policy_data_type_0_type.py | 21 + .../models/oncall_relationships_schedule.py | 94 + ...call_relationships_schedule_data_type_0.py | 83 + ...relationships_schedule_data_type_0_type.py | 19 + .../models/oncall_relationships_user.py | 94 + .../oncall_relationships_user_data_type_0.py | 83 + ...all_relationships_user_data_type_0_type.py | 17 + rootly_sdk/models/override_shift.py | 8 +- rootly_sdk/models/override_shift_list.py | 35 +- .../models/override_shift_list_data_item.py | 13 +- rootly_sdk/models/override_shift_response.py | 33 +- .../models/override_shift_response_data.py | 13 +- ...e_jsmops_on_call_responders_task_params.py | 16 +- ..._call_responders_task_params_teams_item.py | 5 +- ..._call_responders_task_params_users_item.py | 5 +- ...opsgenie_on_call_responders_task_params.py | 20 +- ..._call_responders_task_params_teams_item.py | 5 +- ..._call_responders_task_params_users_item.py | 5 +- ...agerduty_on_call_responders_task_params.py | 23 +- ...rs_task_params_escalation_policies_item.py | 5 +- ..._on_call_responders_task_params_service.py | 5 +- ..._call_responders_task_params_users_item.py | 5 +- ...e_rootly_on_call_responders_task_params.py | 33 +- ...rs_task_params_escalation_policy_target.py | 5 +- ...onders_task_params_functionality_target.py | 5 +- ...all_responders_task_params_group_target.py | 5 +- ...l_responders_task_params_service_target.py | 5 +- ...call_responders_task_params_user_target.py | 5 +- ...esponders_task_params_type_0_users_item.py | 73 + ..._params_type_1_escalation_policies_item.py | 73 + rootly_sdk/models/patch_alert_route.py | 8 +- rootly_sdk/models/patch_alert_route_data.py | 10 +- .../patch_alert_route_data_attributes.py | 10 +- ..._alert_route_data_attributes_rules_item.py | 14 +- ...ibutes_rules_item_condition_groups_item.py | 11 +- ...m_condition_groups_item_conditions_item.py | 20 +- ...attributes_rules_item_destinations_item.py | 12 +- .../models/phone_verification_response.py | 5 +- rootly_sdk/models/playbook.py | 6 +- rootly_sdk/models/playbook_list.py | 35 +- rootly_sdk/models/playbook_list_data_item.py | 10 +- rootly_sdk/models/playbook_response.py | 33 +- rootly_sdk/models/playbook_response_data.py | 10 +- rootly_sdk/models/playbook_task.py | 6 +- rootly_sdk/models/playbook_task_list.py | 35 +- .../models/playbook_task_list_data_item.py | 13 +- rootly_sdk/models/playbook_task_response.py | 33 +- .../models/playbook_task_response_data.py | 13 +- rootly_sdk/models/post_mortem_template.py | 8 +- ...ost_mortem_template_content_json_type_0.py | 5 +- .../models/post_mortem_template_list.py | 35 +- .../post_mortem_template_list_data_item.py | 13 +- .../models/post_mortem_template_response.py | 33 +- .../post_mortem_template_response_data.py | 13 +- .../models/post_mortem_trigger_params.py | 472 ++-- ...rams_incident_condition_acknowledged_at.py | 22 + ...cident_condition_acknowledged_at_type_1.py | 22 - ..._params_incident_condition_detected_at.py} | 16 +- ...trigger_params_incident_condition_label.py | 29 + ..._params_incident_condition_mitigated_at.py | 22 + ..._incident_condition_mitigated_at_type_1.py | 22 - ..._params_incident_condition_resolved_at.py} | 16 +- ...r_params_incident_condition_started_at.py} | 16 +- ...igger_params_incident_condition_summary.py | 20 + ...arams_incident_condition_summary_type_1.py | 22 - ..._params_incident_conditional_inactivity.py | 21 + ..._incident_conditional_inactivity_type_1.py | 21 - rootly_sdk/models/print_task_params.py | 9 +- .../models/publish_incident_task_params.py | 22 +- .../publish_incident_task_params_incident.py | 5 +- ...cident_task_params_status_page_template.py | 5 +- rootly_sdk/models/pulse.py | 9 +- rootly_sdk/models/pulse_data_type_0.py | 5 +- rootly_sdk/models/pulse_labels_item_type_0.py | 5 +- rootly_sdk/models/pulse_list.py | 35 +- rootly_sdk/models/pulse_list_data_item.py | 10 +- rootly_sdk/models/pulse_refs_item_type_0.py | 5 +- rootly_sdk/models/pulse_response.py | 33 +- rootly_sdk/models/pulse_response_data.py | 10 +- rootly_sdk/models/pulse_trigger_params.py | 42 +- rootly_sdk/models/receipt.py | 105 + rootly_sdk/models/receipt_reason.py | 18 + rootly_sdk/models/receipt_state.py | 17 + rootly_sdk/models/redis_client_task_params.py | 15 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ove_google_docs_permissions_task_params.py | 12 +- rootly_sdk/models/remove_subscribers.py | 8 +- rootly_sdk/models/remove_subscribers_data.py | 10 +- .../remove_subscribers_data_attributes.py | 7 +- .../rename_google_chat_space_task_params.py | 100 + ...ame_google_chat_space_task_params_space.py | 73 + ...google_chat_space_task_params_task_type.py | 19 + ...ame_microsoft_teams_channel_task_params.py | 12 +- ...osoft_teams_channel_task_params_channel.py | 5 +- ...icrosoft_teams_channel_task_params_team.py | 5 +- .../rename_slack_channel_task_params.py | 13 +- ...ename_slack_channel_task_params_channel.py | 5 +- rootly_sdk/models/resolve_alert.py | 7 +- rootly_sdk/models/resolve_alert_data.py | 10 +- .../models/resolve_alert_data_attributes.py | 7 +- rootly_sdk/models/resolve_incident.py | 8 +- rootly_sdk/models/resolve_incident_data.py | 10 +- .../resolve_incident_data_attributes.py | 7 +- rootly_sdk/models/restart_incident.py | 8 +- rootly_sdk/models/restart_incident_data.py | 10 +- .../restart_incident_data_attributes.py | 6 +- .../models/retrospective_configuration.py | 12 +- .../retrospective_configuration_list.py | 33 +- ...rospective_configuration_list_data_item.py | 9 +- .../retrospective_configuration_response.py | 33 +- ...trospective_configuration_response_data.py | 13 +- rootly_sdk/models/retrospective_process.py | 12 +- .../models/retrospective_process_group.py | 5 +- .../retrospective_process_group_list.py | 35 +- ...rospective_process_group_list_data_item.py | 9 +- .../retrospective_process_group_response.py | 33 +- ...trospective_process_group_response_data.py | 13 +- .../retrospective_process_group_step.py | 5 +- .../retrospective_process_group_step_list.py | 35 +- ...ctive_process_group_step_list_data_item.py | 9 +- ...trospective_process_group_step_response.py | 33 +- ...ective_process_group_step_response_data.py | 9 +- .../models/retrospective_process_list.py | 35 +- .../retrospective_process_list_data_item.py | 13 +- .../models/retrospective_process_response.py | 33 +- .../retrospective_process_response_data.py | 13 +- ...ective_process_matching_criteria_type_0.py | 8 +- ...ective_process_matching_criteria_type_1.py | 8 +- ...ective_process_matching_criteria_type_2.py | 8 +- rootly_sdk/models/retrospective_step.py | 6 +- rootly_sdk/models/retrospective_step_list.py | 35 +- .../retrospective_step_list_data_item.py | 13 +- .../models/retrospective_step_response.py | 33 +- .../retrospective_step_response_data.py | 13 +- rootly_sdk/models/role.py | 156 +- rootly_sdk/models/role_list.py | 35 +- rootly_sdk/models/role_list_data_item.py | 10 +- rootly_sdk/models/role_relationship.py | 5 +- .../models/role_relationship_data_type_0.py | 12 +- rootly_sdk/models/role_response.py | 33 +- rootly_sdk/models/role_response_data.py | 10 +- rootly_sdk/models/rotate_api_key.py | 8 +- rootly_sdk/models/rotate_api_key_data.py | 10 +- .../models/rotate_api_key_data_attributes.py | 11 +- .../models/run_command_heroku_task_params.py | 21 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/schedule.py | 92 +- rootly_sdk/models/schedule_list.py | 35 +- rootly_sdk/models/schedule_list_data_item.py | 10 +- rootly_sdk/models/schedule_response.py | 33 +- rootly_sdk/models/schedule_response_data.py | 10 +- rootly_sdk/models/schedule_rotation.py | 55 +- .../models/schedule_rotation_active_day.py | 15 +- ..._active_day_active_time_attributes_item.py | 5 +- .../schedule_rotation_active_day_list.py | 35 +- ...dule_rotation_active_day_list_data_item.py | 9 +- .../schedule_rotation_active_day_response.py | 31 +- ...edule_rotation_active_day_response_data.py | 9 +- ...le_rotation_active_time_attributes_item.py | 5 +- rootly_sdk/models/schedule_rotation_list.py | 35 +- .../schedule_rotation_list_data_item.py | 13 +- .../models/schedule_rotation_response.py | 33 +- .../models/schedule_rotation_response_data.py | 13 +- ...schedule_rotationable_attributes_type_0.py | 6 +- ...schedule_rotationable_attributes_type_1.py | 11 +- ...schedule_rotationable_attributes_type_2.py | 11 +- ...schedule_rotationable_attributes_type_3.py | 11 +- rootly_sdk/models/schedule_rotation_user.py | 5 +- .../models/schedule_rotation_user_list.py | 35 +- .../schedule_rotation_user_list_data_item.py | 13 +- .../models/schedule_rotation_user_response.py | 33 +- .../schedule_rotation_user_response_data.py | 13 +- .../schedule_shift_report_day_of_week.py | 21 + .../models/schedule_slack_channel_type_0.py | 5 +- .../schedule_slack_user_group_type_0.py | 5 +- rootly_sdk/models/secret.py | 6 +- rootly_sdk/models/secret_list.py | 9 +- rootly_sdk/models/secret_list_data_item.py | 10 +- rootly_sdk/models/secret_response.py | 8 +- rootly_sdk/models/secret_response_data.py | 10 +- .../send_dashboard_report_task_params.py | 12 +- rootly_sdk/models/send_email_task_params.py | 12 +- ...end_google_chat_attachments_task_params.py | 116 + ...hat_attachments_task_params_spaces_item.py | 73 + ..._chat_attachments_task_params_task_type.py | 19 + .../send_google_chat_message_task_params.py | 129 + ...le_chat_message_task_params_spaces_item.py | 73 + ...ogle_chat_message_task_params_task_type.py | 19 + ...blocks_task_params_type_0_channels_item.py | 73 + ...icrosoft_teams_chat_message_task_params.py | 13 +- ...ams_chat_message_task_params_chats_item.py | 5 +- ...essage_task_params_type_0_channels_item.py | 73 + ...blocks_task_params_type_0_channels_item.py | 73 + ...cks_task_params_type_1_slack_users_item.py | 73 + ...sk_params_type_2_slack_user_groups_item.py | 73 + ...essage_task_params_type_0_channels_item.py | 73 + ...age_task_params_type_1_slack_users_item.py | 73 + ...sk_params_type_2_slack_user_groups_item.py | 73 + rootly_sdk/models/send_sms_task_params.py | 9 +- .../send_whatsapp_message_task_params.py | 12 +- rootly_sdk/models/service.py | 27 +- .../service_alert_broadcast_channel_type_0.py | 5 +- ...rvice_incident_broadcast_channel_type_0.py | 5 +- rootly_sdk/models/service_list.py | 35 +- rootly_sdk/models/service_list_data_item.py | 10 +- rootly_sdk/models/service_managed_by.py | 21 + .../models/service_properties_type_0_item.py | 5 +- rootly_sdk/models/service_response.py | 33 +- rootly_sdk/models/service_response_data.py | 10 +- .../service_slack_aliases_type_0_item.py | 5 +- .../service_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/severity.py | 11 +- rootly_sdk/models/severity_list.py | 35 +- rootly_sdk/models/severity_list_data_item.py | 10 +- rootly_sdk/models/severity_response.py | 33 +- rootly_sdk/models/severity_response_data.py | 10 +- .../severity_slack_aliases_type_0_item.py | 5 +- .../severity_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/shift.py | 6 +- rootly_sdk/models/shift_coverage_request.py | 202 ++ .../models/shift_coverage_request_list.py | 144 ++ .../shift_coverage_request_list_data_item.py | 91 + ...ft_coverage_request_list_data_item_type.py | 17 + .../models/shift_coverage_request_response.py | 98 + .../shift_coverage_request_response_data.py | 91 + ...ift_coverage_request_response_data_type.py | 15 + rootly_sdk/models/shift_list.py | 32 +- rootly_sdk/models/shift_list_data_item.py | 11 +- rootly_sdk/models/shift_override.py | 5 +- rootly_sdk/models/shift_override_response.py | 33 +- .../models/shift_override_response_data.py | 13 +- rootly_sdk/models/shift_relationships.py | 9 +- .../models/shift_relationships_assignee.py | 5 +- ...hift_relationships_assignee_data_type_0.py | 5 +- .../shift_relationships_shift_override.py | 5 +- ...elationships_shift_override_data_type_0.py | 8 +- rootly_sdk/models/shift_relationships_user.py | 5 +- .../shift_relationships_user_data_type_0.py | 12 +- rootly_sdk/models/simple_trigger_params.py | 18 +- rootly_sdk/models/sla.py | 16 +- rootly_sdk/models/sla_conditions_item.py | 14 +- rootly_sdk/models/sla_list.py | 35 +- rootly_sdk/models/sla_list_data_item.py | 10 +- .../sla_notification_configurations_item.py | 10 +- rootly_sdk/models/sla_response.py | 33 +- rootly_sdk/models/sla_response_data.py | 10 +- rootly_sdk/models/slack_channel.py | 104 + .../snapshot_datadog_graph_task_params.py | 18 +- ...tadog_graph_task_params_dashboards_item.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../snapshot_grafana_dashboard_task_params.py | 14 +- ...a_dashboard_task_params_dashboards_item.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../snapshot_looker_look_task_params.py | 16 +- ...looker_look_task_params_dashboards_item.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../snapshot_new_relic_graph_task_params.py | 17 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/snooze_alert.py | 73 + rootly_sdk/models/snooze_alert_data.py | 83 + .../models/snooze_alert_data_attributes.py | 46 + rootly_sdk/models/snooze_alert_data_type.py | 15 + rootly_sdk/models/start_session_request.py | 94 + .../models/start_session_request_platform.py | 18 + rootly_sdk/models/start_session_response.py | 79 + .../models/start_session_response_data.py | 82 + rootly_sdk/models/status.py | 6 +- rootly_sdk/models/status_list.py | 35 +- rootly_sdk/models/status_list_data_item.py | 10 +- rootly_sdk/models/status_page.py | 29 +- .../status_page_cname_records_type_0.py | 5 +- rootly_sdk/models/status_page_list.py | 35 +- .../models/status_page_list_data_item.py | 10 +- rootly_sdk/models/status_page_response.py | 33 +- .../models/status_page_response_data.py | 10 +- rootly_sdk/models/status_page_template.py | 9 +- .../models/status_page_template_list.py | 35 +- .../status_page_template_list_data_item.py | 13 +- .../models/status_page_template_response.py | 33 +- .../status_page_template_response_data.py | 13 +- rootly_sdk/models/status_response.py | 33 +- rootly_sdk/models/status_response_data.py | 10 +- rootly_sdk/models/sub_status.py | 9 +- rootly_sdk/models/sub_status_list.py | 35 +- .../models/sub_status_list_data_item.py | 10 +- rootly_sdk/models/sub_status_response.py | 33 +- rootly_sdk/models/sub_status_response_data.py | 10 +- rootly_sdk/models/team.py | 46 +- .../team_alert_broadcast_channel_type_0.py | 5 +- .../models/team_auto_add_members_scope.py | 18 + .../team_incident_broadcast_channel_type_0.py | 5 +- rootly_sdk/models/team_list.py | 35 +- rootly_sdk/models/team_list_data_item.py | 10 +- rootly_sdk/models/team_managed_by.py | 21 + .../models/team_properties_type_0_item.py | 5 +- rootly_sdk/models/team_response.py | 33 +- rootly_sdk/models/team_response_data.py | 10 +- .../models/team_slack_aliases_type_0_item.py | 5 +- .../models/team_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/tiptap_block_schema.py | 8 +- .../tiptap_block_schema_followup_component.py | 8 +- .../tiptap_block_schema_timeline_component.py | 5 +- .../models/trigger_workflow_task_params.py | 22 +- .../trigger_workflow_task_params_resource.py | 5 +- .../trigger_workflow_task_params_workflow.py | 5 +- .../tweet_twitter_message_task_params.py | 12 +- rootly_sdk/models/unassign_role_from_user.py | 8 +- .../models/unassign_role_from_user_data.py | 13 +- ...unassign_role_from_user_data_attributes.py | 6 +- .../models/update_action_item_task_params.py | 27 +- ...ction_item_task_params_assigned_to_user.py | 5 +- ...pdate_airtable_table_record_task_params.py | 8 +- rootly_sdk/models/update_alert.py | 8 +- rootly_sdk/models/update_alert_data.py | 33 +- .../models/update_alert_data_attributes.py | 69 +- ...ert_field_values_attributes_item_type_0.py | 5 +- ...pdate_alert_data_attributes_data_type_0.py | 5 +- ...lert_data_attributes_labels_item_type_0.py | 7 +- .../update_alert_data_attributes_source.py | 105 - rootly_sdk/models/update_alert_event.py | 8 +- rootly_sdk/models/update_alert_event_data.py | 10 +- .../update_alert_event_data_attributes.py | 6 +- rootly_sdk/models/update_alert_field.py | 8 +- rootly_sdk/models/update_alert_field_data.py | 10 +- .../update_alert_field_data_attributes.py | 6 +- rootly_sdk/models/update_alert_group.py | 8 +- rootly_sdk/models/update_alert_group_data.py | 10 +- .../update_alert_group_data_attributes.py | 24 +- ...t_group_data_attributes_attributes_item.py | 5 +- ...t_group_data_attributes_conditions_item.py | 18 +- ...lert_group_data_attributes_targets_item.py | 17 +- ...ata_attributes_targets_item_target_type.py | 3 +- rootly_sdk/models/update_alert_route.py | 8 +- rootly_sdk/models/update_alert_route_data.py | 10 +- .../update_alert_route_data_attributes.py | 10 +- ..._alert_route_data_attributes_rules_item.py | 12 +- ...ibutes_rules_item_condition_groups_item.py | 9 +- ...m_condition_groups_item_conditions_item.py | 20 +- ...attributes_rules_item_destinations_item.py | 12 +- .../models/update_alert_routing_rule.py | 8 +- .../models/update_alert_routing_rule_data.py | 13 +- ...date_alert_routing_rule_data_attributes.py | 19 +- ...ng_rule_data_attributes_conditions_item.py | 16 +- ...outing_rule_data_attributes_destination.py | 12 +- rootly_sdk/models/update_alert_urgency.py | 8 +- .../models/update_alert_urgency_data.py | 10 +- .../update_alert_urgency_data_attributes.py | 7 +- rootly_sdk/models/update_alerts_source.py | 8 +- .../models/update_alerts_source_data.py | 10 +- .../update_alerts_source_data_attributes.py | 34 +- ...tes_alert_source_fields_attributes_item.py | 6 +- ...rt_source_urgency_rules_attributes_item.py | 18 +- ...ibutes_alert_template_attributes_type_0.py | 6 +- ...butes_resolution_rule_attributes_type_0.py | 21 +- ...butes_type_0_conditions_attributes_item.py | 18 +- ...erts_source_data_attributes_source_type.py | 2 + ...attributes_sourceable_attributes_type_0.py | 9 +- ...s_type_0_field_mappings_attributes_item.py | 13 +- rootly_sdk/models/update_api_key.py | 8 +- rootly_sdk/models/update_api_key_data.py | 10 +- .../models/update_api_key_data_attributes.py | 11 +- .../models/update_asana_task_task_params.py | 15 +- ...pdate_asana_task_task_params_completion.py | 5 +- .../update_attached_alerts_task_params.py | 18 +- rootly_sdk/models/update_authorization.py | 8 +- .../models/update_authorization_data.py | 10 +- .../update_authorization_data_attributes.py | 11 +- rootly_sdk/models/update_catalog.py | 8 +- .../update_catalog_checklist_template.py | 8 +- .../update_catalog_checklist_template_data.py | 15 +- ...alog_checklist_template_data_attributes.py | 12 +- ..._template_data_attributes_builtin_field.py | 10 +- ...t_template_data_attributes_custom_field.py | 10 +- ...late_data_attributes_owners_type_0_item.py | 10 +- rootly_sdk/models/update_catalog_data.py | 10 +- .../models/update_catalog_data_attributes.py | 33 +- rootly_sdk/models/update_catalog_entity.py | 8 +- .../models/update_catalog_entity_data.py | 10 +- .../update_catalog_entity_data_attributes.py | 51 +- ..._entity_data_attributes_properties_item.py | 5 +- .../models/update_catalog_entity_property.py | 8 +- .../update_catalog_entity_property_data.py | 13 +- ...catalog_entity_property_data_attributes.py | 9 +- rootly_sdk/models/update_catalog_field.py | 8 +- .../models/update_catalog_field_data.py | 10 +- .../update_catalog_field_data_attributes.py | 36 +- rootly_sdk/models/update_catalog_property.py | 8 +- .../models/update_catalog_property_data.py | 13 +- ...update_catalog_property_data_attributes.py | 36 +- rootly_sdk/models/update_cause.py | 8 +- rootly_sdk/models/update_cause_data.py | 10 +- .../models/update_cause_data_attributes.py | 8 +- ...e_cause_data_attributes_properties_item.py | 5 +- .../models/update_clickup_task_task_params.py | 13 +- ...pdate_clickup_task_task_params_priority.py | 5 +- .../models/update_coda_page_task_params.py | 13 +- .../update_coda_page_task_params_template.py | 5 +- .../models/update_communications_group.py | 8 +- .../update_communications_group_data.py | 13 +- ...te_communications_group_data_attributes.py | 17 +- ...tion_external_group_members_type_0_item.py | 6 +- ...munication_group_conditions_type_0_item.py | 10 +- .../models/update_communications_stage.py | 8 +- .../update_communications_stage_data.py | 13 +- ...te_communications_stage_data_attributes.py | 7 +- .../models/update_communications_template.py | 8 +- .../update_communications_template_data.py | 13 +- ...communications_template_data_attributes.py | 10 +- ..._template_stages_attributes_type_0_item.py | 6 +- .../models/update_communications_type.py | 8 +- .../models/update_communications_type_data.py | 13 +- ...ate_communications_type_data_attributes.py | 7 +- .../update_confluence_page_task_params.py | 51 +- ...confluence_page_task_params_integration.py | 74 + ...te_confluence_page_task_params_template.py | 5 +- rootly_sdk/models/update_custom_field.py | 8 +- rootly_sdk/models/update_custom_field_data.py | 10 +- .../update_custom_field_data_attributes.py | 15 +- .../models/update_custom_field_option.py | 8 +- .../models/update_custom_field_option_data.py | 13 +- ...ate_custom_field_option_data_attributes.py | 6 +- rootly_sdk/models/update_custom_form.py | 8 +- rootly_sdk/models/update_custom_form_data.py | 10 +- .../update_custom_form_data_attributes.py | 7 +- rootly_sdk/models/update_dashboard.py | 8 +- rootly_sdk/models/update_dashboard_data.py | 10 +- .../update_dashboard_data_attributes.py | 25 +- rootly_sdk/models/update_dashboard_panel.py | 8 +- .../models/update_dashboard_panel_data.py | 13 +- .../update_dashboard_panel_data_attributes.py | 7 +- ..._dashboard_panel_data_attributes_params.py | 19 +- ...panel_data_attributes_params_datalabels.py | 5 +- ...el_data_attributes_params_datasets_item.py | 16 +- ...s_params_datasets_item_aggregate_type_0.py | 10 +- ...ibutes_params_datasets_item_filter_item.py | 13 +- ...ms_datasets_item_filter_item_rules_item.py | 14 +- ...ms_datasets_item_group_by_type_1_type_0.py | 10 +- ...ard_panel_data_attributes_params_legend.py | 10 +- ...d_panel_data_attributes_position_type_0.py | 5 +- .../update_datadog_notebook_task_params.py | 19 +- ...e_datadog_notebook_task_params_template.py | 5 +- .../update_dropbox_paper_page_task_params.py | 8 +- rootly_sdk/models/update_edge_connector.py | 8 +- .../models/update_edge_connector_action.py | 8 +- .../update_edge_connector_action_action.py | 9 +- ...e_edge_connector_action_action_metadata.py | 5 +- .../update_edge_connector_action_body.py | 7 +- ...pdate_edge_connector_action_body_action.py | 11 +- ...e_connector_action_body_action_metadata.py | 5 +- .../models/update_edge_connector_body.py | 7 +- .../models/update_edge_connector_body_data.py | 13 +- ...ate_edge_connector_body_data_attributes.py | 35 +- ..._connector_body_data_attributes_filters.py | 50 + .../update_edge_connector_edge_connector.py | 12 +- rootly_sdk/models/update_environment.py | 8 +- rootly_sdk/models/update_environment_data.py | 10 +- .../update_environment_data_attributes.py | 36 +- ...ronment_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/update_escalation_policy.py | 8 +- .../models/update_escalation_policy_data.py | 13 +- ...pdate_escalation_policy_data_attributes.py | 6 +- ...y_data_attributes_business_hours_type_0.py | 14 +- ...ributes_business_hours_type_0_time_zone.py | 32 + .../models/update_escalation_policy_level.py | 8 +- .../update_escalation_policy_level_data.py | 13 +- ...escalation_policy_level_data_attributes.py | 14 +- ..._notification_target_params_item_type_0.py | 14 +- ...fication_target_params_item_type_0_type.py | 3 +- .../models/update_escalation_policy_path.py | 8 +- .../update_escalation_policy_path_data.py | 13 +- ..._escalation_policy_path_data_attributes.py | 629 ++++- ..._path_data_attributes_rules_item_type_0.py | 80 + ..._attributes_rules_item_type_0_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_1.py | 80 + ..._attributes_rules_item_type_1_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_2.py | 126 + ...a_attributes_rules_item_type_2_operator.py | 49 + ..._attributes_rules_item_type_2_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_3.py | 115 + ...a_attributes_rules_item_type_3_operator.py | 49 + ..._attributes_rules_item_type_3_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_4.py | 80 + ..._attributes_rules_item_type_4_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_5.py | 118 + ..._attributes_rules_item_type_5_rule_type.py | 21 + ...utes_rules_item_type_5_time_blocks_item.py | 166 ++ ..._attributes_rules_item_type_5_time_zone.py | 631 +++++ ..._path_data_attributes_rules_item_type_6.py | 95 + ...a_attributes_rules_item_type_6_operator.py | 24 + ..._attributes_rules_item_type_6_rule_type.py | 21 + ..._path_data_attributes_rules_item_type_7.py | 87 + ...a_attributes_rules_item_type_7_operator.py | 22 + ..._attributes_rules_item_type_7_rule_type.py | 21 + ...ata_attributes_rules_item_type_8_type_0.py | 83 + ...utes_rules_item_type_8_type_0_rule_type.py | 21 + ...ata_attributes_rules_item_type_8_type_1.py | 83 + ...utes_rules_item_type_8_type_1_rule_type.py | 21 + ...ata_attributes_rules_item_type_8_type_2.py | 132 ++ ...butes_rules_item_type_8_type_2_operator.py | 49 + ...utes_rules_item_type_8_type_2_rule_type.py | 21 + ...ata_attributes_rules_item_type_8_type_3.py | 120 + ...butes_rules_item_type_8_type_3_operator.py | 49 + ...utes_rules_item_type_8_type_3_rule_type.py | 21 + ...ata_attributes_rules_item_type_8_type_4.py | 83 + ...utes_rules_item_type_8_type_4_rule_type.py | 21 + ...ata_attributes_rules_item_type_8_type_5.py | 124 + ...utes_rules_item_type_8_type_5_rule_type.py | 21 + ...les_item_type_8_type_5_time_blocks_item.py | 166 ++ ...utes_rules_item_type_8_type_5_time_zone.py | 631 +++++ ...ata_attributes_rules_item_type_8_type_6.py | 100 + ...butes_rules_item_type_8_type_6_operator.py | 26 + ...utes_rules_item_type_8_type_6_rule_type.py | 21 + ...ata_attributes_rules_item_type_8_type_7.py | 92 + ...butes_rules_item_type_8_type_7_operator.py | 22 + ...utes_rules_item_type_8_type_7_rule_type.py | 21 + ...ata_attributes_rules_item_type_9_type_0.py | 83 + ...utes_rules_item_type_9_type_0_rule_type.py | 21 + ...ata_attributes_rules_item_type_9_type_1.py | 83 + ...utes_rules_item_type_9_type_1_rule_type.py | 21 + ...ata_attributes_rules_item_type_9_type_2.py | 132 ++ ...butes_rules_item_type_9_type_2_operator.py | 49 + ...utes_rules_item_type_9_type_2_rule_type.py | 21 + ...ata_attributes_rules_item_type_9_type_3.py | 120 + ...butes_rules_item_type_9_type_3_operator.py | 49 + ...utes_rules_item_type_9_type_3_rule_type.py | 21 + ...ata_attributes_rules_item_type_9_type_4.py | 83 + ...utes_rules_item_type_9_type_4_rule_type.py | 21 + ...ata_attributes_rules_item_type_9_type_5.py | 124 + ...utes_rules_item_type_9_type_5_rule_type.py | 21 + ...les_item_type_9_type_5_time_blocks_item.py | 166 ++ ...utes_rules_item_type_9_type_5_time_zone.py | 631 +++++ ...ata_attributes_rules_item_type_9_type_6.py | 100 + ...butes_rules_item_type_9_type_6_operator.py | 26 + ...utes_rules_item_type_9_type_6_rule_type.py | 21 + ...ata_attributes_rules_item_type_9_type_7.py | 92 + ...butes_rules_item_type_9_type_7_operator.py | 22 + ...utes_rules_item_type_9_type_7_rule_type.py | 21 + ...a_attributes_time_restriction_time_zone.py | 32 + ..._data_attributes_time_restrictions_item.py | 14 +- rootly_sdk/models/update_form_field.py | 8 +- rootly_sdk/models/update_form_field_data.py | 10 +- .../update_form_field_data_attributes.py | 25 +- .../update_form_field_data_attributes_kind.py | 2 + rootly_sdk/models/update_form_field_option.py | 8 +- .../models/update_form_field_option_data.py | 13 +- ...pdate_form_field_option_data_attributes.py | 6 +- .../models/update_form_field_placement.py | 8 +- .../update_form_field_placement_condition.py | 8 +- ...ate_form_field_placement_condition_data.py | 11 +- ...eld_placement_condition_data_attributes.py | 15 +- .../update_form_field_placement_data.py | 13 +- ...te_form_field_placement_data_attributes.py | 15 +- .../models/update_form_field_position.py | 8 +- .../models/update_form_field_position_data.py | 13 +- ...ate_form_field_position_data_attributes.py | 9 +- ...orm_field_position_data_attributes_form.py | 4 + rootly_sdk/models/update_form_set.py | 8 +- .../models/update_form_set_condition.py | 8 +- .../models/update_form_set_condition_data.py | 13 +- ...date_form_set_condition_data_attributes.py | 9 +- rootly_sdk/models/update_form_set_data.py | 10 +- .../models/update_form_set_data_attributes.py | 10 +- rootly_sdk/models/update_functionality.py | 8 +- .../models/update_functionality_data.py | 10 +- .../update_functionality_data_attributes.py | 36 +- ...onality_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../models/update_github_issue_task_params.py | 56 +- ...ate_github_issue_task_params_completion.py | 5 +- ...ate_github_issue_task_params_issue_type.py | 5 +- ...te_github_issue_task_params_labels_item.py | 5 +- ...te_github_issue_task_params_labels_mode.py | 20 + ...ate_github_issue_task_params_repository.py | 5 +- .../models/update_gitlab_issue_task_params.py | 19 +- ...ate_gitlab_issue_task_params_completion.py | 5 +- ...pdate_google_calendar_event_task_params.py | 15 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ogle_chat_space_description_task_params.py | 110 + ...hat_space_description_task_params_space.py | 73 + ...space_description_task_params_task_type.py | 21 + .../update_google_docs_page_task_params.py | 30 +- rootly_sdk/models/update_heartbeat.py | 8 +- rootly_sdk/models/update_heartbeat_data.py | 10 +- .../update_heartbeat_data_attributes.py | 26 +- rootly_sdk/models/update_incident.py | 8 +- .../models/update_incident_action_item.py | 8 +- .../update_incident_action_item_data.py | 13 +- ...te_incident_action_item_data_attributes.py | 75 +- ...butes_form_field_selections_type_0_item.py | 209 ++ .../update_incident_custom_field_selection.py | 8 +- ...te_incident_custom_field_selection_data.py | 11 +- ..._custom_field_selection_data_attributes.py | 7 +- rootly_sdk/models/update_incident_data.py | 10 +- .../models/update_incident_data_attributes.py | 18 +- ..._incident_data_attributes_labels_type_0.py | 5 +- rootly_sdk/models/update_incident_event.py | 8 +- .../models/update_incident_event_data.py | 10 +- .../update_incident_event_data_attributes.py | 9 +- .../update_incident_event_functionality.py | 8 +- ...pdate_incident_event_functionality_data.py | 15 +- ...ent_event_functionality_data_attributes.py | 11 +- .../models/update_incident_event_service.py | 8 +- .../update_incident_event_service_data.py | 13 +- ..._incident_event_service_data_attributes.py | 9 +- rootly_sdk/models/update_incident_feedback.py | 8 +- .../models/update_incident_feedback_data.py | 13 +- ...pdate_incident_feedback_data_attributes.py | 9 +- .../update_incident_form_field_selection.py | 8 +- ...date_incident_form_field_selection_data.py | 15 +- ...nt_form_field_selection_data_attributes.py | 7 +- .../models/update_incident_permission_set.py | 8 +- .../update_incident_permission_set_boolean.py | 8 +- ...te_incident_permission_set_boolean_data.py | 11 +- ..._permission_set_boolean_data_attributes.py | 14 +- ...boolean_data_attributes_severity_params.py | 6 +- .../update_incident_permission_set_data.py | 13 +- ...incident_permission_set_data_attributes.py | 15 +- ...update_incident_permission_set_resource.py | 8 +- ...e_incident_permission_set_resource_data.py | 11 +- ...permission_set_resource_data_attributes.py | 14 +- ...esource_data_attributes_severity_params.py | 6 +- .../models/update_incident_post_mortem.py | 8 +- .../update_incident_post_mortem_data.py | 13 +- ...te_incident_post_mortem_data_attributes.py | 9 +- .../update_incident_postmortem_task_params.py | 8 +- .../update_incident_retrospective_step.py | 8 +- ...update_incident_retrospective_step_data.py | 15 +- ...dent_retrospective_step_data_attributes.py | 11 +- rootly_sdk/models/update_incident_role.py | 8 +- .../models/update_incident_role_data.py | 10 +- .../update_incident_role_data_attributes.py | 7 +- .../models/update_incident_role_task.py | 8 +- .../models/update_incident_role_task_data.py | 13 +- ...date_incident_role_task_data_attributes.py | 9 +- .../update_incident_status_page_event.py | 8 +- .../update_incident_status_page_event_data.py | 15 +- ...ident_status_page_event_data_attributes.py | 43 +- ...e_incident_status_timestamp_task_params.py | 10 +- .../models/update_incident_sub_status.py | 8 +- .../models/update_incident_sub_status_data.py | 13 +- ...ate_incident_sub_status_data_attributes.py | 7 +- .../models/update_incident_task_params.py | 14 +- rootly_sdk/models/update_incident_type.py | 8 +- .../models/update_incident_type_data.py | 10 +- .../update_incident_type_data_attributes.py | 16 +- ...nt_type_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../models/update_jira_issue_task_params.py | 34 +- ...date_jira_issue_task_params_integration.py | 74 + .../update_jira_issue_task_params_priority.py | 5 +- .../update_jira_issue_task_params_status.py | 5 +- .../models/update_linear_issue_task_params.py | 35 +- ...te_linear_issue_task_params_labels_item.py | 5 +- ...pdate_linear_issue_task_params_priority.py | 5 +- ...update_linear_issue_task_params_project.py | 5 +- ...e_linear_issue_task_params_state_type_0.py | 5 +- rootly_sdk/models/update_live_call_router.py | 8 +- .../models/update_live_call_router_data.py | 13 +- ...update_live_call_router_data_attributes.py | 92 +- ...all_router_data_attributes_country_code.py | 3 +- ...ibutes_escalation_policy_trigger_params.py | 10 +- ...ter_data_attributes_paging_targets_item.py | 10 +- .../models/update_motion_task_task_params.py | 13 +- ...update_motion_task_task_params_priority.py | 5 +- .../models/update_notion_page_task_params.py | 12 +- .../models/update_on_call_pay_report.py | 8 +- .../models/update_on_call_pay_report_data.py | 13 +- ...date_on_call_pay_report_data_attributes.py | 30 +- rootly_sdk/models/update_on_call_role.py | 8 +- rootly_sdk/models/update_on_call_role_data.py | 10 +- .../update_on_call_role_data_attributes.py | 155 +- ...ta_attributes_catalogs_permissions_item.py | 24 + ...ibutes_functionalities_permissions_item.py | 24 + rootly_sdk/models/update_on_call_shadow.py | 8 +- .../models/update_on_call_shadow_data.py | 10 +- .../update_on_call_shadow_data_attributes.py | 15 +- .../update_opsgenie_alert_task_params.py | 19 +- ...e_opsgenie_alert_task_params_completion.py | 5 +- .../update_opsgenie_incident_task_params.py | 24 +- rootly_sdk/models/update_override_shift.py | 8 +- .../models/update_override_shift_data.py | 10 +- .../update_override_shift_data_attributes.py | 6 +- .../update_pagerduty_incident_task_params.py | 20 +- .../update_pagertree_alert_task_params.py | 26 +- ..._pagertree_alert_task_params_teams_item.py | 5 +- ..._pagertree_alert_task_params_users_item.py | 5 +- rootly_sdk/models/update_playbook.py | 8 +- rootly_sdk/models/update_playbook_data.py | 10 +- .../models/update_playbook_data_attributes.py | 7 +- rootly_sdk/models/update_playbook_task.py | 8 +- .../models/update_playbook_task_data.py | 10 +- .../update_playbook_task_data_attributes.py | 7 +- .../models/update_post_mortem_template.py | 8 +- .../update_post_mortem_template_data.py | 13 +- ...te_post_mortem_template_data_attributes.py | 9 +- rootly_sdk/models/update_pulse.py | 8 +- rootly_sdk/models/update_pulse_data.py | 33 +- .../models/update_pulse_data_attributes.py | 14 +- ...pdate_pulse_data_attributes_data_type_0.py | 5 +- ...ulse_data_attributes_labels_item_type_0.py | 5 +- ..._pulse_data_attributes_refs_item_type_0.py | 5 +- .../models/update_quip_page_task_params.py | 12 +- .../update_retrospective_configuration.py | 8 +- ...update_retrospective_configuration_data.py | 15 +- ...ospective_configuration_data_attributes.py | 7 +- .../models/update_retrospective_process.py | 8 +- .../update_retrospective_process_data.py | 13 +- ...e_retrospective_process_data_attributes.py | 9 +- ...ective_process_matching_criteria_type_0.py | 8 +- ...ective_process_matching_criteria_type_1.py | 8 +- ...ective_process_matching_criteria_type_2.py | 8 +- .../update_retrospective_process_group.py | 8 +- ...update_retrospective_process_group_data.py | 15 +- ...ospective_process_group_data_attributes.py | 6 +- ...update_retrospective_process_group_step.py | 8 +- ...e_retrospective_process_group_step_data.py | 11 +- ...tive_process_group_step_data_attributes.py | 6 +- .../models/update_retrospective_step.py | 8 +- .../models/update_retrospective_step_data.py | 13 +- ...date_retrospective_step_data_attributes.py | 7 +- rootly_sdk/models/update_role.py | 8 +- rootly_sdk/models/update_role_data.py | 10 +- .../models/update_role_data_attributes.py | 117 +- rootly_sdk/models/update_schedule.py | 8 +- rootly_sdk/models/update_schedule_data.py | 10 +- .../models/update_schedule_data_attributes.py | 184 +- ...ata_attributes_shift_report_day_of_week.py | 29 + ...le_data_attributes_slack_channel_type_0.py | 5 +- ...hedule_data_attributes_slack_user_group.py | 5 +- rootly_sdk/models/update_schedule_rotation.py | 8 +- .../update_schedule_rotation_active_day.py | 8 +- ...pdate_schedule_rotation_active_day_data.py | 15 +- ...ule_rotation_active_day_data_attributes.py | 14 +- ..._attributes_active_time_attributes_item.py | 5 +- .../models/update_schedule_rotation_data.py | 13 +- ...pdate_schedule_rotation_data_attributes.py | 69 +- ..._attributes_active_time_attributes_item.py | 5 +- ...s_schedule_rotation_members_type_0_item.py | 10 +- ...schedule_rotationable_attributes_type_0.py | 6 +- ...schedule_rotationable_attributes_type_1.py | 11 +- ...schedule_rotationable_attributes_type_2.py | 11 +- ...schedule_rotationable_attributes_type_3.py | 11 +- .../models/update_schedule_rotation_user.py | 8 +- .../update_schedule_rotation_user_data.py | 13 +- ..._schedule_rotation_user_data_attributes.py | 6 +- rootly_sdk/models/update_secret.py | 8 +- rootly_sdk/models/update_secret_data.py | 10 +- .../models/update_secret_data_attributes.py | 7 +- rootly_sdk/models/update_service.py | 8 +- rootly_sdk/models/update_service_data.py | 10 +- .../models/update_service_data_attributes.py | 17 +- ...tributes_alert_broadcast_channel_type_0.py | 5 +- ...butes_incident_broadcast_channel_type_0.py | 5 +- ...service_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- ...update_service_now_incident_task_params.py | 12 +- ...ice_now_incident_task_params_completion.py | 5 +- ...rvice_now_incident_task_params_priority.py | 5 +- rootly_sdk/models/update_severity.py | 8 +- rootly_sdk/models/update_severity_data.py | 10 +- .../models/update_severity_data_attributes.py | 19 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../update_sharepoint_page_task_params.py | 12 +- .../update_shortcut_story_task_params.py | 13 +- ..._shortcut_story_task_params_archivation.py | 5 +- .../update_shortcut_task_task_params.py | 13 +- ...te_shortcut_task_task_params_completion.py | 5 +- rootly_sdk/models/update_sla.py | 8 +- rootly_sdk/models/update_sla_data.py | 10 +- .../models/update_sla_data_attributes.py | 27 +- ...ate_sla_data_attributes_conditions_item.py | 18 +- ...ibutes_notification_configurations_item.py | 10 +- .../update_slack_channel_topic_task_params.py | 9 +- ...slack_channel_topic_task_params_channel.py | 5 +- rootly_sdk/models/update_status_page.py | 8 +- rootly_sdk/models/update_status_page_data.py | 10 +- .../update_status_page_data_attributes.py | 23 +- .../models/update_status_page_template.py | 8 +- .../update_status_page_template_data.py | 13 +- ...te_status_page_template_data_attributes.py | 13 +- .../models/update_status_task_params.py | 18 +- rootly_sdk/models/update_sub_status.py | 8 +- rootly_sdk/models/update_sub_status_data.py | 10 +- .../update_sub_status_data_attributes.py | 7 +- rootly_sdk/models/update_team.py | 8 +- rootly_sdk/models/update_team_data.py | 10 +- .../models/update_team_data_attributes.py | 35 +- ...tributes_alert_broadcast_channel_type_0.py | 5 +- ..._data_attributes_auto_add_members_scope.py | 22 + ...butes_incident_broadcast_channel_type_0.py | 5 +- ...te_team_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../models/update_trello_card_task_params.py | 16 +- ...ate_trello_card_task_params_archivation.py | 5 +- .../update_trello_card_task_params_board.py | 5 +- ...ate_trello_card_task_params_labels_item.py | 5 +- .../update_trello_card_task_params_list.py | 5 +- rootly_sdk/models/update_user.py | 8 +- rootly_sdk/models/update_user_data.py | 10 +- .../models/update_user_data_attributes.py | 7 +- .../models/update_user_email_address.py | 8 +- .../models/update_user_email_address_data.py | 13 +- ...date_user_email_address_data_attributes.py | 6 +- .../models/update_user_notification_rule.py | 8 +- .../update_user_notification_rule_data.py | 13 +- ..._user_notification_rule_data_attributes.py | 11 +- ...a_attributes_enabled_contact_types_item.py | 3 +- rootly_sdk/models/update_user_phone_number.py | 8 +- .../models/update_user_phone_number_data.py | 13 +- ...pdate_user_phone_number_data_attributes.py | 6 +- .../update_victor_ops_incident_task_params.py | 14 +- rootly_sdk/models/update_webhooks_endpoint.py | 8 +- .../models/update_webhooks_endpoint_data.py | 13 +- ...pdate_webhooks_endpoint_data_attributes.py | 48 +- ...int_data_attributes_custom_headers_item.py | 54 + ...dpoint_data_attributes_event_types_item.py | 4 + rootly_sdk/models/update_workflow.py | 8 +- ...rkflow_action_item_form_field_condition.py | 79 + ...w_action_item_form_field_condition_data.py | 93 + ...em_form_field_condition_data_attributes.py | 175 ++ ...n_data_attributes_action_item_condition.py | 31 + ...ion_item_form_field_condition_data_type.py | 21 + .../update_workflow_custom_field_selection.py | 8 +- ...te_workflow_custom_field_selection_data.py | 11 +- ..._custom_field_selection_data_attributes.py | 11 +- rootly_sdk/models/update_workflow_data.py | 10 +- .../models/update_workflow_data_attributes.py | 11 +- .../update_workflow_form_field_condition.py | 8 +- ...date_workflow_form_field_condition_data.py | 15 +- ...ow_form_field_condition_data_attributes.py | 11 +- rootly_sdk/models/update_workflow_group.py | 8 +- .../models/update_workflow_group_data.py | 10 +- .../update_workflow_group_data_attributes.py | 12 +- rootly_sdk/models/update_workflow_task.py | 8 +- .../models/update_workflow_task_data.py | 10 +- .../update_workflow_task_data_attributes.py | 1232 +++++++--- .../update_zendesk_ticket_task_params.py | 14 +- ...e_zendesk_ticket_task_params_completion.py | 5 +- ...ate_zendesk_ticket_task_params_priority.py | 5 +- rootly_sdk/models/uptime_chart_response.py | 32 +- .../models/uptime_chart_response_data.py | 50 + rootly_sdk/models/user.py | 6 +- rootly_sdk/models/user_email_address.py | 5 +- rootly_sdk/models/user_email_address_list.py | 35 +- .../user_email_address_list_data_item.py | 13 +- .../models/user_email_address_response.py | 33 +- .../user_email_address_response_data.py | 13 +- rootly_sdk/models/user_flat_response.py | 113 +- rootly_sdk/models/user_list.py | 35 +- rootly_sdk/models/user_list_data_item.py | 11 +- rootly_sdk/models/user_notification_rule.py | 14 +- ...ication_rule_enabled_contact_types_item.py | 5 +- .../models/user_notification_rule_list.py | 35 +- .../user_notification_rule_list_data_item.py | 13 +- .../models/user_notification_rule_response.py | 33 +- .../user_notification_rule_response_data.py | 13 +- rootly_sdk/models/user_phone_number.py | 10 +- rootly_sdk/models/user_phone_number_list.py | 35 +- .../user_phone_number_list_data_item.py | 13 +- .../models/user_phone_number_response.py | 33 +- .../models/user_phone_number_response_data.py | 13 +- rootly_sdk/models/user_relationships.py | 8 +- rootly_sdk/models/user_response.py | 33 +- rootly_sdk/models/user_response_data.py | 11 +- .../models/verify_phone_number_request.py | 5 +- rootly_sdk/models/webhooks_delivery.py | 7 +- rootly_sdk/models/webhooks_delivery_list.py | 33 +- .../webhooks_delivery_list_data_item.py | 13 +- .../models/webhooks_delivery_response.py | 33 +- .../models/webhooks_delivery_response_data.py | 13 +- rootly_sdk/models/webhooks_endpoint.py | 41 +- .../webhooks_endpoint_custom_headers_item.py | 54 + .../webhooks_endpoint_event_types_item.py | 4 + rootly_sdk/models/webhooks_endpoint_list.py | 33 +- .../webhooks_endpoint_list_data_item.py | 13 +- .../models/webhooks_endpoint_response.py | 33 +- .../models/webhooks_endpoint_response_data.py | 13 +- rootly_sdk/models/workflow.py | 15 +- ...rkflow_action_item_form_field_condition.py | 193 ++ ...m_field_condition_action_item_condition.py | 31 + ...w_action_item_form_field_condition_list.py | 134 ++ ...tem_form_field_condition_list_data_item.py | 95 + ...orm_field_condition_list_data_item_type.py | 21 + ...tion_item_form_field_condition_response.py | 104 + ...item_form_field_condition_response_data.py | 95 + ...form_field_condition_response_data_type.py | 21 + .../models/workflow_custom_field_selection.py | 8 +- .../workflow_custom_field_selection_list.py | 35 +- ...w_custom_field_selection_list_data_item.py | 9 +- ...orkflow_custom_field_selection_response.py | 33 +- ...ow_custom_field_selection_response_data.py | 9 +- .../models/workflow_form_field_condition.py | 8 +- .../workflow_form_field_condition_list.py | 35 +- ...low_form_field_condition_list_data_item.py | 9 +- .../workflow_form_field_condition_response.py | 33 +- ...flow_form_field_condition_response_data.py | 9 +- rootly_sdk/models/workflow_group.py | 9 +- rootly_sdk/models/workflow_group_list.py | 35 +- .../models/workflow_group_list_data_item.py | 13 +- rootly_sdk/models/workflow_group_response.py | 33 +- .../models/workflow_group_response_data.py | 13 +- rootly_sdk/models/workflow_list.py | 35 +- rootly_sdk/models/workflow_list_data_item.py | 10 +- rootly_sdk/models/workflow_response.py | 33 +- rootly_sdk/models/workflow_response_data.py | 10 +- rootly_sdk/models/workflow_run.py | 13 +- rootly_sdk/models/workflow_run_context.py | 5 +- rootly_sdk/models/workflow_run_response.py | 33 +- .../models/workflow_run_response_data.py | 10 +- rootly_sdk/models/workflow_runs_list.py | 35 +- .../models/workflow_runs_list_data_item.py | 13 +- rootly_sdk/models/workflow_task.py | 1230 +++++++--- rootly_sdk/models/workflow_task_list.py | 35 +- .../models/workflow_task_list_data_item.py | 13 +- rootly_sdk/models/workflow_task_response.py | 33 +- .../models/workflow_task_response_data.py | 13 +- rootly_sdk/types.py | 11 +- 2951 files changed, 104976 insertions(+), 28422 deletions(-) create mode 100644 .serena/.gitignore create mode 100644 .serena/project.yml create mode 100644 rootly_sdk/api/ai_chat/__init__.py create mode 100644 rootly_sdk/api/ai_chat/create_ai_chat.py create mode 100644 rootly_sdk/api/ai_chat/delete_ai_chat_session.py create mode 100644 rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py create mode 100644 rootly_sdk/api/ai_chat/stream_ai_chat.py create mode 100644 rootly_sdk/api/alert_events/list_alert_events_feed.py create mode 100644 rootly_sdk/api/alerts/escalate_alert.py create mode 100644 rootly_sdk/api/alerts/get_receipt.py create mode 100644 rootly_sdk/api/alerts/snooze_alert.py create mode 100644 rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py create mode 100644 rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py create mode 100644 rootly_sdk/api/environments/bulk_delete_environments.py create mode 100644 rootly_sdk/api/environments/bulk_upsert_environments.py create mode 100644 rootly_sdk/api/functionalities/bulk_delete_functionalities.py create mode 100644 rootly_sdk/api/functionalities/bulk_upsert_functionalities.py create mode 100644 rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py create mode 100644 rootly_sdk/api/meeting_recordings/import_meeting_recording.py create mode 100644 rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py create mode 100644 rootly_sdk/api/meeting_recordings/start_recording_session.py create mode 100644 rootly_sdk/api/services/bulk_delete_services.py create mode 100644 rootly_sdk/api/services/bulk_upsert_services.py create mode 100644 rootly_sdk/api/shift_coverage_requests/__init__.py create mode 100644 rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py create mode 100644 rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py create mode 100644 rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py create mode 100644 rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py create mode 100644 rootly_sdk/api/teams/bulk_delete_groups.py create mode 100644 rootly_sdk/api/teams/bulk_upsert_groups.py create mode 100644 rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py create mode 100644 rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py create mode 100644 rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py create mode 100644 rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py create mode 100644 rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py create mode 100644 rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py create mode 100644 rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at.py delete mode 100644 rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at_type_1.py rename rootly_sdk/models/{action_item_trigger_params_incident_condition_detected_at_type_1.py => action_item_trigger_params_incident_condition_detected_at.py} (50%) create mode 100644 rootly_sdk/models/action_item_trigger_params_incident_condition_label.py create mode 100644 rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at.py delete mode 100644 rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at_type_1.py rename rootly_sdk/models/{action_item_trigger_params_incident_condition_resolved_at_type_1.py => action_item_trigger_params_incident_condition_resolved_at.py} (50%) rename rootly_sdk/models/{action_item_trigger_params_incident_condition_started_at_type_1.py => action_item_trigger_params_incident_condition_started_at.py} (50%) create mode 100644 rootly_sdk/models/action_item_trigger_params_incident_condition_summary.py delete mode 100644 rootly_sdk/models/action_item_trigger_params_incident_condition_summary_type_1.py create mode 100644 rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity.py delete mode 100644 rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity_type_1.py rename rootly_sdk/models/{alert_alert_field_values_attributes_item_type_0.py => add_microsoft_teams_tab_task_params_type_0.py} (58%) create mode 100644 rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py create mode 100644 rootly_sdk/models/add_slack_bookmark_task_params_type_0.py create mode 100644 rootly_sdk/models/add_slack_bookmark_task_params_type_1.py create mode 100644 rootly_sdk/models/ai_chat_response.py create mode 100644 rootly_sdk/models/ai_chat_response_data.py create mode 100644 rootly_sdk/models/ai_chat_response_data_attributes.py create mode 100644 rootly_sdk/models/ai_chat_response_data_attributes_status.py create mode 100644 rootly_sdk/models/ai_chat_response_data_type.py create mode 100644 rootly_sdk/models/ai_chat_session_message.py create mode 100644 rootly_sdk/models/ai_chat_session_message_list.py create mode 100644 rootly_sdk/models/ai_chat_session_message_list_meta.py create mode 100644 rootly_sdk/models/ai_chat_session_message_role.py create mode 100644 rootly_sdk/models/alert_alert_field_values_type_0_item.py create mode 100644 rootly_sdk/models/alert_alerting_targets_type_0_item.py create mode 100644 rootly_sdk/models/alert_event_escalation_target_type_0.py create mode 100644 rootly_sdk/models/alert_event_escalation_target_type_0_data.py create mode 100644 rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py create mode 100644 rootly_sdk/models/alert_event_feed_list.py create mode 100644 rootly_sdk/models/alert_event_feed_list_data_item.py create mode 100644 rootly_sdk/models/alert_event_feed_list_data_item_type.py create mode 100644 rootly_sdk/models/alert_event_feed_meta.py create mode 100644 rootly_sdk/models/alert_event_incident_type_0.py create mode 100644 rootly_sdk/models/alert_event_schedule_type_0.py create mode 100644 rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py create mode 100644 rootly_sdk/models/alert_event_user.py delete mode 100644 rootly_sdk/models/alert_list_data_item_source.py create mode 100644 rootly_sdk/models/alert_notification_target_type.py delete mode 100644 rootly_sdk/models/alert_response_data_source.py delete mode 100644 rootly_sdk/models/alert_source.py create mode 100644 rootly_sdk/models/archive_google_chat_spaces_task_params.py create mode 100644 rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py create mode 100644 rootly_sdk/models/archive_google_chat_spaces_task_params_task_type.py create mode 100644 rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py create mode 100644 rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py create mode 100644 rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_task_type.py create mode 100644 rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py create mode 100644 rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py create mode 100644 rootly_sdk/models/bulk_destroy_catalog_entities_response.py create mode 100644 rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py create mode 100644 rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py create mode 100644 rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py create mode 100644 rootly_sdk/models/bulk_destroy_catalog_entities_type_1_managed_by.py create mode 100644 rootly_sdk/models/bulk_destroy_environments_response.py create mode 100644 rootly_sdk/models/bulk_destroy_environments_response_data.py create mode 100644 rootly_sdk/models/bulk_destroy_environments_type_0.py create mode 100644 rootly_sdk/models/bulk_destroy_environments_type_1.py create mode 100644 rootly_sdk/models/bulk_destroy_environments_type_1_managed_by.py create mode 100644 rootly_sdk/models/bulk_destroy_functionalities_response.py create mode 100644 rootly_sdk/models/bulk_destroy_functionalities_response_data.py create mode 100644 rootly_sdk/models/bulk_destroy_functionalities_type_0.py create mode 100644 rootly_sdk/models/bulk_destroy_functionalities_type_1.py create mode 100644 rootly_sdk/models/bulk_destroy_functionalities_type_1_managed_by.py create mode 100644 rootly_sdk/models/bulk_destroy_services_response.py create mode 100644 rootly_sdk/models/bulk_destroy_services_response_data.py create mode 100644 rootly_sdk/models/bulk_destroy_services_type_0.py create mode 100644 rootly_sdk/models/bulk_destroy_services_type_1.py create mode 100644 rootly_sdk/models/bulk_destroy_services_type_1_managed_by.py create mode 100644 rootly_sdk/models/bulk_destroy_teams_response.py create mode 100644 rootly_sdk/models/bulk_destroy_teams_response_data.py create mode 100644 rootly_sdk/models/bulk_destroy_teams_type_0.py create mode 100644 rootly_sdk/models/bulk_destroy_teams_type_1.py create mode 100644 rootly_sdk/models/bulk_destroy_teams_type_1_managed_by.py create mode 100644 rootly_sdk/models/bulk_upsert_catalog_entities.py create mode 100644 rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py create mode 100644 rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py create mode 100644 rootly_sdk/models/bulk_upsert_catalog_entities_error.py create mode 100644 rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py create mode 100644 rootly_sdk/models/bulk_upsert_catalog_entities_response.py create mode 100644 rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py create mode 100644 rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item_type.py create mode 100644 rootly_sdk/models/bulk_upsert_environments.py create mode 100644 rootly_sdk/models/bulk_upsert_environments_entities_item.py create mode 100644 rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py create mode 100644 rootly_sdk/models/bulk_upsert_environments_error.py create mode 100644 rootly_sdk/models/bulk_upsert_environments_error_errors_item.py create mode 100644 rootly_sdk/models/bulk_upsert_environments_response.py create mode 100644 rootly_sdk/models/bulk_upsert_environments_response_data_item.py create mode 100644 rootly_sdk/models/bulk_upsert_environments_response_data_item_type.py create mode 100644 rootly_sdk/models/bulk_upsert_functionalities.py create mode 100644 rootly_sdk/models/bulk_upsert_functionalities_entities_item.py create mode 100644 rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py create mode 100644 rootly_sdk/models/bulk_upsert_functionalities_error.py create mode 100644 rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py create mode 100644 rootly_sdk/models/bulk_upsert_functionalities_response.py create mode 100644 rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py create mode 100644 rootly_sdk/models/bulk_upsert_functionalities_response_data_item_type.py create mode 100644 rootly_sdk/models/bulk_upsert_services.py create mode 100644 rootly_sdk/models/bulk_upsert_services_entities_item.py create mode 100644 rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py create mode 100644 rootly_sdk/models/bulk_upsert_services_error.py create mode 100644 rootly_sdk/models/bulk_upsert_services_error_errors_item.py create mode 100644 rootly_sdk/models/bulk_upsert_services_response.py create mode 100644 rootly_sdk/models/bulk_upsert_services_response_data_item.py create mode 100644 rootly_sdk/models/bulk_upsert_services_response_data_item_type.py create mode 100644 rootly_sdk/models/bulk_upsert_teams.py create mode 100644 rootly_sdk/models/bulk_upsert_teams_entities_item.py create mode 100644 rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py create mode 100644 rootly_sdk/models/bulk_upsert_teams_error.py create mode 100644 rootly_sdk/models/bulk_upsert_teams_error_errors_item.py create mode 100644 rootly_sdk/models/bulk_upsert_teams_response.py create mode 100644 rootly_sdk/models/bulk_upsert_teams_response_data_item.py create mode 100644 rootly_sdk/models/bulk_upsert_teams_response_data_item_type.py create mode 100644 rootly_sdk/models/catalog_entity_managed_by.py create mode 100644 rootly_sdk/models/catalog_field_managed_by.py create mode 100644 rootly_sdk/models/catalog_managed_by.py create mode 100644 rootly_sdk/models/catalog_property_managed_by.py create mode 100644 rootly_sdk/models/change_google_chat_space_privacy_task_params.py create mode 100644 rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py create mode 100644 rootly_sdk/models/change_google_chat_space_privacy_task_params_task_type.py create mode 100644 rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py create mode 100644 rootly_sdk/models/create_google_chat_space_task_params.py create mode 100644 rootly_sdk/models/create_google_chat_space_task_params_task_type.py create mode 100644 rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py create mode 100644 rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py create mode 100644 rootly_sdk/models/environment_managed_by.py create mode 100644 rootly_sdk/models/escalate_alert.py create mode 100644 rootly_sdk/models/escalate_alert_data.py create mode 100644 rootly_sdk/models/escalate_alert_data_attributes.py create mode 100644 rootly_sdk/models/escalate_alert_data_type.py delete mode 100644 rootly_sdk/models/escalation_path_rule_alert_urgency_rule_type.py delete mode 100644 rootly_sdk/models/escalation_path_rule_deferral_window.py delete mode 100644 rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py delete mode 100644 rootly_sdk/models/escalation_path_rule_deferral_window_time_blocks_item.py delete mode 100644 rootly_sdk/models/escalation_path_rule_field_rule_type.py delete mode 100644 rootly_sdk/models/escalation_path_rule_json_path_operator.py delete mode 100644 rootly_sdk/models/escalation_path_rule_json_path_rule_type.py delete mode 100644 rootly_sdk/models/escalation_path_rule_service_rule_type.py delete mode 100644 rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py rename rootly_sdk/models/{escalation_path_rule_alert_urgency.py => escalation_policy_path_rules_item_type_0.py} (62%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_0_rule_type.py rename rootly_sdk/models/{escalation_path_rule_working_hour.py => escalation_policy_path_rules_item_type_1.py} (63%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_1_rule_type.py rename rootly_sdk/models/{escalation_path_rule_json_path.py => escalation_policy_path_rules_item_type_2.py} (65%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_2_rule_type.py rename rootly_sdk/models/{escalation_path_rule_field.py => escalation_policy_path_rules_item_type_3.py} (61%) rename rootly_sdk/models/{escalation_path_rule_field_operator.py => escalation_policy_path_rules_item_type_3_operator.py} (51%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_3_rule_type.py rename rootly_sdk/models/{escalation_path_rule_service.py => escalation_policy_path_rules_item_type_4.py} (62%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_4_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 rename rootly_sdk/models/{escalation_path_rule_deferral_window_time_zone.py => escalation_policy_path_rules_item_type_5_time_zone.py} (90%) create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_6_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_7_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_zone.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_zone.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_rule_type.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_operator.py create mode 100644 rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_rule_type.py create mode 100644 rootly_sdk/models/functionality_managed_by.py create mode 100644 rootly_sdk/models/get_github_commits_task_params_type_0.py create mode 100644 rootly_sdk/models/get_github_commits_task_params_type_1.py create mode 100644 rootly_sdk/models/get_gitlab_commits_task_params_type_0.py create mode 100644 rootly_sdk/models/get_gitlab_commits_task_params_type_1.py create mode 100644 rootly_sdk/models/get_meeting_recording_include.py create mode 100644 rootly_sdk/models/import_meeting_recording.py create mode 100644 rootly_sdk/models/import_meeting_recording_platform.py create mode 100644 rootly_sdk/models/import_meeting_recording_source.py create mode 100644 rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at.py delete mode 100644 rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at_type_1.py rename rootly_sdk/models/{incident_trigger_params_incident_condition_detected_at_type_1.py => incident_trigger_params_incident_condition_detected_at.py} (50%) create mode 100644 rootly_sdk/models/incident_trigger_params_incident_condition_label.py rename rootly_sdk/models/{incident_trigger_params_incident_condition_mitigated_at_type_1.py => incident_trigger_params_incident_condition_mitigated_at.py} (50%) rename rootly_sdk/models/{incident_trigger_params_incident_condition_resolved_at_type_1.py => incident_trigger_params_incident_condition_resolved_at.py} (50%) create mode 100644 rootly_sdk/models/incident_trigger_params_incident_condition_started_at.py delete mode 100644 rootly_sdk/models/incident_trigger_params_incident_condition_started_at_type_1.py create mode 100644 rootly_sdk/models/incident_trigger_params_incident_condition_summary.py delete mode 100644 rootly_sdk/models/incident_trigger_params_incident_condition_summary_type_1.py rename rootly_sdk/models/{incident_trigger_params_incident_conditional_inactivity_type_1.py => incident_trigger_params_incident_conditional_inactivity.py} (50%) create mode 100644 rootly_sdk/models/incidents_chart_response_data.py create mode 100644 rootly_sdk/models/invite_to_google_chat_space_task_params.py create mode 100644 rootly_sdk/models/invite_to_google_chat_space_task_params_space.py create mode 100644 rootly_sdk/models/invite_to_google_chat_space_task_params_task_type.py create mode 100644 rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py create mode 100644 rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py create mode 100644 rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py create mode 100644 rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py create mode 100644 rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py create mode 100644 rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py create mode 100644 rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_task_type.py create mode 100644 rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py create mode 100644 rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py create mode 100644 rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py create mode 100644 rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py create mode 100644 rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py create mode 100644 rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py create mode 100644 rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py create mode 100644 rootly_sdk/models/jsonapi_included_resource.py create mode 100644 rootly_sdk/models/jsonapi_included_resource_attributes.py create mode 100644 rootly_sdk/models/jsonapi_included_resource_relationships.py create mode 100644 rootly_sdk/models/list_alert_events_feed_filteraction.py create mode 100644 rootly_sdk/models/list_alert_events_feed_filterkind.py create mode 100644 rootly_sdk/models/list_alert_events_feed_sort.py create mode 100644 rootly_sdk/models/list_escalation_paths_filterpath_type.py create mode 100644 rootly_sdk/models/meeting_recording_detail.py create mode 100644 rootly_sdk/models/meeting_recording_detail_response.py create mode 100644 rootly_sdk/models/meeting_recording_detail_response_data.py create mode 100644 rootly_sdk/models/meeting_recording_detail_response_data_type.py create mode 100644 rootly_sdk/models/meeting_recording_detail_transcript_type_1.py create mode 100644 rootly_sdk/models/meeting_recording_response.py create mode 100644 rootly_sdk/models/meeting_recording_response_data.py create mode 100644 rootly_sdk/models/meeting_recording_response_data_type.py create mode 100644 rootly_sdk/models/meeting_recording_transcript_segment.py create mode 100644 rootly_sdk/models/meeting_recording_transcript_word.py create mode 100644 rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py create mode 100644 rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item_type.py delete mode 100644 rootly_sdk/models/new_alert_data_attributes_source.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_operator.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_operator.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_operator.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_operator.py create mode 100644 rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py create mode 100644 rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py create mode 100644 rootly_sdk/models/new_on_call_role_data_attributes_catalogs_permissions_item.py create mode 100644 rootly_sdk/models/new_on_call_role_data_attributes_functionalities_permissions_item.py create mode 100644 rootly_sdk/models/new_schedule_data_attributes_shift_report_day_of_week.py create mode 100644 rootly_sdk/models/new_shift_coverage_request.py create mode 100644 rootly_sdk/models/new_shift_coverage_request_data.py create mode 100644 rootly_sdk/models/new_shift_coverage_request_data_attributes.py create mode 100644 rootly_sdk/models/new_shift_coverage_request_data_type.py create mode 100644 rootly_sdk/models/new_team_data_attributes_auto_add_members_scope.py create mode 100644 rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py create mode 100644 rootly_sdk/models/new_workflow_action_item_form_field_condition.py create mode 100644 rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py create mode 100644 rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py create mode 100644 rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py create mode 100644 rootly_sdk/models/new_workflow_action_item_form_field_condition_data_type.py create mode 100644 rootly_sdk/models/on_call_role_catalogs_permissions_item.py create mode 100644 rootly_sdk/models/on_call_role_functionalities_permissions_item.py create mode 100644 rootly_sdk/models/oncall.py create mode 100644 rootly_sdk/models/oncall_list.py create mode 100644 rootly_sdk/models/oncall_list_data_item.py create mode 100644 rootly_sdk/models/oncall_list_data_item_type.py create mode 100644 rootly_sdk/models/oncall_notification_type.py create mode 100644 rootly_sdk/models/oncall_relationships.py create mode 100644 rootly_sdk/models/oncall_relationships_escalation_policy.py create mode 100644 rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py create mode 100644 rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0_type.py create mode 100644 rootly_sdk/models/oncall_relationships_schedule.py create mode 100644 rootly_sdk/models/oncall_relationships_schedule_data_type_0.py create mode 100644 rootly_sdk/models/oncall_relationships_schedule_data_type_0_type.py create mode 100644 rootly_sdk/models/oncall_relationships_user.py create mode 100644 rootly_sdk/models/oncall_relationships_user_data_type_0.py create mode 100644 rootly_sdk/models/oncall_relationships_user_data_type_0_type.py create mode 100644 rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py create mode 100644 rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py create mode 100644 rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at.py delete mode 100644 rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at_type_1.py rename rootly_sdk/models/{post_mortem_trigger_params_incident_condition_detected_at_type_1.py => post_mortem_trigger_params_incident_condition_detected_at.py} (50%) create mode 100644 rootly_sdk/models/post_mortem_trigger_params_incident_condition_label.py create mode 100644 rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at.py delete mode 100644 rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at_type_1.py rename rootly_sdk/models/{post_mortem_trigger_params_incident_condition_resolved_at_type_1.py => post_mortem_trigger_params_incident_condition_resolved_at.py} (50%) rename rootly_sdk/models/{post_mortem_trigger_params_incident_condition_started_at_type_1.py => post_mortem_trigger_params_incident_condition_started_at.py} (50%) create mode 100644 rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary.py delete mode 100644 rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary_type_1.py create mode 100644 rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity.py delete mode 100644 rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity_type_1.py create mode 100644 rootly_sdk/models/receipt.py create mode 100644 rootly_sdk/models/receipt_reason.py create mode 100644 rootly_sdk/models/receipt_state.py create mode 100644 rootly_sdk/models/rename_google_chat_space_task_params.py create mode 100644 rootly_sdk/models/rename_google_chat_space_task_params_space.py create mode 100644 rootly_sdk/models/rename_google_chat_space_task_params_task_type.py create mode 100644 rootly_sdk/models/schedule_shift_report_day_of_week.py create mode 100644 rootly_sdk/models/send_google_chat_attachments_task_params.py create mode 100644 rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py create mode 100644 rootly_sdk/models/send_google_chat_attachments_task_params_task_type.py create mode 100644 rootly_sdk/models/send_google_chat_message_task_params.py create mode 100644 rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py create mode 100644 rootly_sdk/models/send_google_chat_message_task_params_task_type.py create mode 100644 rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py create mode 100644 rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py create mode 100644 rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py create mode 100644 rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py create mode 100644 rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py create mode 100644 rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py create mode 100644 rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py create mode 100644 rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py create mode 100644 rootly_sdk/models/service_managed_by.py create mode 100644 rootly_sdk/models/shift_coverage_request.py create mode 100644 rootly_sdk/models/shift_coverage_request_list.py create mode 100644 rootly_sdk/models/shift_coverage_request_list_data_item.py create mode 100644 rootly_sdk/models/shift_coverage_request_list_data_item_type.py create mode 100644 rootly_sdk/models/shift_coverage_request_response.py create mode 100644 rootly_sdk/models/shift_coverage_request_response_data.py create mode 100644 rootly_sdk/models/shift_coverage_request_response_data_type.py create mode 100644 rootly_sdk/models/slack_channel.py create mode 100644 rootly_sdk/models/snooze_alert.py create mode 100644 rootly_sdk/models/snooze_alert_data.py create mode 100644 rootly_sdk/models/snooze_alert_data_attributes.py create mode 100644 rootly_sdk/models/snooze_alert_data_type.py create mode 100644 rootly_sdk/models/start_session_request.py create mode 100644 rootly_sdk/models/start_session_request_platform.py create mode 100644 rootly_sdk/models/start_session_response.py create mode 100644 rootly_sdk/models/start_session_response_data.py create mode 100644 rootly_sdk/models/team_auto_add_members_scope.py create mode 100644 rootly_sdk/models/team_managed_by.py delete mode 100644 rootly_sdk/models/update_alert_data_attributes_source.py create mode 100644 rootly_sdk/models/update_confluence_page_task_params_integration.py create mode 100644 rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator.py create mode 100644 rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type.py create mode 100644 rootly_sdk/models/update_github_issue_task_params_labels_mode.py create mode 100644 rootly_sdk/models/update_google_chat_space_description_task_params.py create mode 100644 rootly_sdk/models/update_google_chat_space_description_task_params_space.py create mode 100644 rootly_sdk/models/update_google_chat_space_description_task_params_task_type.py create mode 100644 rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py create mode 100644 rootly_sdk/models/update_jira_issue_task_params_integration.py create mode 100644 rootly_sdk/models/update_on_call_role_data_attributes_catalogs_permissions_item.py create mode 100644 rootly_sdk/models/update_on_call_role_data_attributes_functionalities_permissions_item.py create mode 100644 rootly_sdk/models/update_schedule_data_attributes_shift_report_day_of_week.py create mode 100644 rootly_sdk/models/update_team_data_attributes_auto_add_members_scope.py create mode 100644 rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py create mode 100644 rootly_sdk/models/update_workflow_action_item_form_field_condition.py create mode 100644 rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py create mode 100644 rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py create mode 100644 rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py create mode 100644 rootly_sdk/models/update_workflow_action_item_form_field_condition_data_type.py create mode 100644 rootly_sdk/models/uptime_chart_response_data.py create mode 100644 rootly_sdk/models/webhooks_endpoint_custom_headers_item.py create mode 100644 rootly_sdk/models/workflow_action_item_form_field_condition.py create mode 100644 rootly_sdk/models/workflow_action_item_form_field_condition_action_item_condition.py create mode 100644 rootly_sdk/models/workflow_action_item_form_field_condition_list.py create mode 100644 rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py create mode 100644 rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item_type.py create mode 100644 rootly_sdk/models/workflow_action_item_form_field_condition_response.py create mode 100644 rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py create mode 100644 rootly_sdk/models/workflow_action_item_form_field_condition_response_data_type.py diff --git a/.serena/.gitignore b/.serena/.gitignore new file mode 100644 index 00000000..2e510aff --- /dev/null +++ b/.serena/.gitignore @@ -0,0 +1,2 @@ +/cache +/project.local.yml diff --git a/.serena/project.yml b/.serena/project.yml new file mode 100644 index 00000000..486989b6 --- /dev/null +++ b/.serena/project.yml @@ -0,0 +1,167 @@ +# the name by which the project can be referenced within Serena/when chatting with the LLM. +project_name: "yamoussoukro" + +# list of languages for which language servers are started (LSP backend only); choose from: +# ada al angular ansible bash +# bsl clojure cpp cpp_ccls crystal +# csharp csharp_omnisharp cue dart elixir +# elm erlang fortran fsharp gdscript +# go groovy haskell haxe hlsl +# html java json julia kotlin +# latex lean4 lua luau markdown +# matlab msl nix ocaml pascal +# perl php php_phpactor php_phpantom powershell +# python python_jedi python_pyrefly python_ty r +# rego ruby ruby_solargraph rust scala +# scss solidity svelte swift systemverilog +# terraform toml typescript typescript_vts vue +# yaml zig +# (This list may be outdated; generated with scripts/print_language_list.py; +# For the current list, see values of Language enum here: +# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py) +# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.) +# Note: +# - For C, use cpp +# - For JavaScript, use typescript +# - For Angular projects, use angular (subsumes typescript+html; requires `npm install` in the project root) +# - For Svelte projects, use svelte (subsumes typescript/javascript for .svelte projects; requires npm) +# - For SCSS / Sass / plain CSS, use scss (some-sass-language-server handles all three) +# - For Free Pascal/Lazarus, use pascal +# Special requirements: +# Some languages require additional setup/installations. +# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers +# When using multiple languages, the first language server that supports a given file will be used for that file. +# The first language is the default language and the respective language server will be used as a fallback. +# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored. +languages: +- python + +# the encoding used by text files in the project +# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings +encoding: "utf-8" + +# optional shell command to run before the language backend (LSP or JetBrains) is initialised. +# the command runs in the project root directory and is only executed if the project is trusted +# (see trusted_project_path_patterns in the global configuration). +# serena waits for the command to exit: a non-zero exit code is logged as an error but does not +# abort activation. a per-project timeout (activation_command_timeout, default 180s) is the safety +# backstop for non-terminating commands; on expiry the process is killed and activation continues. +# example: activation_command: "npx nx run-many -t build" +activation_command: + +# maximum time in seconds to wait for activation_command to complete before killing it (default 180s). +# must be a positive number. +activation_command_timeout: 180.0 + +# line ending convention to use when writing source files. +# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default) +# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings. +line_ending: + +# The language backend to use for this project. +# If not set, the global setting from serena_config.yml is used. +# Valid values: LSP, JetBrains +# Note: the backend is fixed at startup. If a project with a different backend +# is activated post-init, an error will be returned. +language_backend: + +# whether to use project's .gitignore files to ignore files +ignore_all_files_in_gitignore: true + +# advanced configuration option allowing to configure language server-specific options. +# Maps the language key to the options. +# The settings are considered only if the project is trusted (see global configuration to define trusted projects). +# See https://oraios.github.io/serena/02-usage/050_configuration.html#language-server-specific-settings +ls_specific_settings: {} + +# list of workspace folder paths (LSP backend only). +# These folders will be used to build up Serena's symbol index. +# Paths must be within the project root and should thus be relative to the project root. +# Furthermore, the paths should not be filtered by ignore settings. +# Default setting: The entire project root folder (".") is considered. +# In (large) monorepos, this can be used to index only subfolders of the project root, e.g. +# ls_workspace_folders: +# - "./subproject1" +# - "./subproject2" +ls_workspace_folders: +- "." + +# list of additional workspace folder paths for cross-package reference support. +# Paths can be absolute or relative to the project root. +# Each folder is registered as an LSP workspace folder, enabling language servers to discover +# symbols and references across package boundaries, but these folders are not indexed by Serena, +# i.e. the respective symbols will not be found using Serena's symbol search tools. +# Example: +# additional_workspace_folders: +# - ../sibling-package +# - ../shared-lib +ls_additional_workspace_folders: [] + +# list of additional paths to ignore in this project. +# Same syntax as gitignore, so you can use * and **. +# Important: quote patterns that start with `*`, otherwise YAML treats them as aliases. +# Example: +# ignored_paths: +# - "examples/**" +# - ".worktrees/**" +# - "**/bin/**" +# - "**/obj/**" +# Note: global ignored_paths from serena_config.yml are also applied additively. +ignored_paths: [] + +# whether the project is in read-only mode +# If set to true, all editing tools will be disabled and attempts to use them will result in an error +# Added on 2025-04-18 +read_only: false + +# list of tool names to exclude. +# This extends the existing exclusions (e.g. from the global configuration) +# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html +excluded_tools: [] + +# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default). +# This extends the existing inclusions (e.g. from the global configuration). +# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html +included_optional_tools: [] + +# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools. +# This cannot be combined with non-empty excluded_tools or included_optional_tools. +# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html +fixed_tools: [] + +# list of mode names that are to be activated by default, overriding the setting in the global configuration. +# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes. +# If the setting is undefined/empty, the default_modes from the global configuration (serena_config.yml) apply. +# Otherwise, this overrides the setting from the global configuration (serena_config.yml). +# Therefore, you can set this to [] if you do not want the default modes defined in the global config to apply +# for this project. +# This setting can, in turn, be overridden by CLI parameters (--mode). +# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes +default_modes: + +# list of mode names to be activated additionally for this project, e.g. ["query-projects"] +# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes. +# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes +added_modes: + +# initial prompt for the project. It will always be given to the LLM upon activating the project +# (contrary to the memories, which are loaded on demand). +initial_prompt: "" + +# time budget (seconds) per tool call for the retrieval of additional symbol information +# such as docstrings or parameter information. +# This overrides the corresponding setting in the global configuration; see the documentation there. +# If null or missing, use the setting from the global configuration. +symbol_info_budget: + +# list of regex patterns which, when matched, mark a memory entry as read‑only. +# Extends the list from the global configuration, merging the two lists. +read_only_memory_patterns: [] + +# list of regex patterns for memories to completely ignore. +# Matching memories will not appear in list_memories or activate_project output +# and cannot be accessed via read_memory or write_memory. +# To access ignored memory files, use the read_file tool on the raw file path. +# Extends the list from the global configuration, merging the two lists. +# Example: ["_archive/.*", "_episodes/.*"] +ignored_memory_patterns: [] diff --git a/pyproject.toml b/pyproject.toml index dc679cd7..4e0a618f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,23 +1,20 @@ [tool.poetry] name = "rootly" -version = "1.3.0" +version = "v1" description = "A client library for accessing Rootly API v1" authors = [] readme = "README.md" packages = [ { include = "rootly_sdk" }, ] -include = ["CHANGELOG.md", "rootly_sdk/py.typed"] +include = ["rootly_sdk/py.typed"] [tool.poetry.dependencies] python = "^3.10" -httpx = ">=0.20.0,<0.29.0" +httpx = ">=0.23.0,<0.29.0" attrs = ">=22.2.0" python-dateutil = "^2.8.0" -[tool.poetry.group.dev.dependencies] -ruff = ">=0.15.0" - [build-system] requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/rootly_sdk/__init__.py b/rootly_sdk/__init__.py index 99630356..a01e77a4 100644 --- a/rootly_sdk/__init__.py +++ b/rootly_sdk/__init__.py @@ -1,5 +1,5 @@ -"""A client library for accessing Rootly API v1""" +""" A client library for accessing Rootly API v1 """ from .client import AuthenticatedClient, Client __all__ = ( diff --git a/rootly_sdk/api/__init__.py b/rootly_sdk/api/__init__.py index 81f9fa24..dc035f4c 100644 --- a/rootly_sdk/api/__init__.py +++ b/rootly_sdk/api/__init__.py @@ -1 +1 @@ -"""Contains methods for accessing the API""" +""" Contains methods for accessing the API """ diff --git a/rootly_sdk/api/ai_chat/__init__.py b/rootly_sdk/api/ai_chat/__init__.py new file mode 100644 index 00000000..c9921b5f --- /dev/null +++ b/rootly_sdk/api/ai_chat/__init__.py @@ -0,0 +1 @@ +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/ai_chat/create_ai_chat.py b/rootly_sdk/api/ai_chat/create_ai_chat.py new file mode 100644 index 00000000..118ac0e8 --- /dev/null +++ b/rootly_sdk/api/ai_chat/create_ai_chat.py @@ -0,0 +1,259 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.ai_chat_response import AiChatResponse +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + + + +def _get_kwargs( + *, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, + +) -> dict[str, Any]: + + + + + params: dict[str, Any] = {} + + params["message"] = message + + json_session_id: str | Unset = UNSET + if not isinstance(session_id, Unset): + json_session_id = str(session_id) + params["session_id"] = json_session_id + + json_incident_id: str | Unset = UNSET + if not isinstance(incident_id, Unset): + json_incident_id = str(incident_id) + params["incident_id"] = json_incident_id + + json_alert_id: str | Unset = UNSET + if not isinstance(alert_id, Unset): + json_alert_id = str(alert_id) + params["alert_id"] = json_alert_id + + + 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/ai/chat", + "params": params, + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AiChatResponse | Any | None: + if response.status_code == 200: + response_200 = AiChatResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 403: + response_403 = cast(Any, None) + return response_403 + + 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[AiChatResponse | 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( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, + +) -> Response[AiChatResponse | Any]: + """ Send AI chat message + + Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation + to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API + key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | 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[AiChatResponse | Any] + """ + + + kwargs = _get_kwargs( + message=message, +session_id=session_id, +incident_id=incident_id, +alert_id=alert_id, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, + +) -> AiChatResponse | Any | None: + """ Send AI chat message + + Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation + to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API + key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | 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: + AiChatResponse | Any + """ + + + return sync_detailed( + client=client, +message=message, +session_id=session_id, +incident_id=incident_id, +alert_id=alert_id, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, + +) -> Response[AiChatResponse | Any]: + """ Send AI chat message + + Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation + to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API + key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | 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[AiChatResponse | Any] + """ + + + kwargs = _get_kwargs( + message=message, +session_id=session_id, +incident_id=incident_id, +alert_id=alert_id, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, + +) -> AiChatResponse | Any | None: + """ Send AI chat message + + Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation + to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API + key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | 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: + AiChatResponse | Any + """ + + + return (await asyncio_detailed( + client=client, +message=message, +session_id=session_id, +incident_id=incident_id, +alert_id=alert_id, + + )).parsed diff --git a/rootly_sdk/api/ai_chat/delete_ai_chat_session.py b/rootly_sdk/api/ai_chat/delete_ai_chat_session.py new file mode 100644 index 00000000..9efdeb2a --- /dev/null +++ b/rootly_sdk/api/ai_chat/delete_ai_chat_session.py @@ -0,0 +1,125 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from uuid import UUID + + + +def _get_kwargs( + id: UUID, + +) -> dict[str, Any]: + + + + + + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/ai/chat/sessions/{id}".format(id=quote(str(id), safe=""),), + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 204: + 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: UUID, + *, + client: AuthenticatedClient, + +) -> Response[Any]: + """ Delete AI chat session + + Permanently deletes an AI chat session and all its messages. Requires `ai.chat:write` OAuth scope or + an API key. + + 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[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: UUID, + *, + client: AuthenticatedClient, + +) -> Response[Any]: + """ Delete AI chat session + + Permanently deletes an AI chat session and all its messages. Requires `ai.chat:write` OAuth scope or + an API key. + + 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[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/ai_chat/list_ai_chat_session_messages.py b/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py new file mode 100644 index 00000000..6e6c1bbd --- /dev/null +++ b/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.ai_chat_session_message_list import AiChatSessionMessageList +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + + + +def _get_kwargs( + session_id: UUID, + *, + 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/ai/chat/sessions/{session_id}/messages".format(session_id=quote(str(session_id), safe=""),), + "params": params, + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AiChatSessionMessageList | Any | None: + if response.status_code == 200: + response_200 = AiChatSessionMessageList.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[AiChatSessionMessageList | 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( + session_id: UUID, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + +) -> Response[AiChatSessionMessageList | Any]: + """ List AI chat session messages + + Returns the user and assistant message history for a session, paginated and chronologically ordered. + Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. + + Args: + session_id (UUID): + 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[AiChatSessionMessageList | Any] + """ + + + kwargs = _get_kwargs( + session_id=session_id, +pagenumber=pagenumber, +pagesize=pagesize, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + session_id: UUID, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + +) -> AiChatSessionMessageList | Any | None: + """ List AI chat session messages + + Returns the user and assistant message history for a session, paginated and chronologically ordered. + Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. + + Args: + session_id (UUID): + 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: + AiChatSessionMessageList | Any + """ + + + return sync_detailed( + session_id=session_id, +client=client, +pagenumber=pagenumber, +pagesize=pagesize, + + ).parsed + +async def asyncio_detailed( + session_id: UUID, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + +) -> Response[AiChatSessionMessageList | Any]: + """ List AI chat session messages + + Returns the user and assistant message history for a session, paginated and chronologically ordered. + Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. + + Args: + session_id (UUID): + 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[AiChatSessionMessageList | Any] + """ + + + kwargs = _get_kwargs( + session_id=session_id, +pagenumber=pagenumber, +pagesize=pagesize, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + session_id: UUID, + *, + client: AuthenticatedClient, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + +) -> AiChatSessionMessageList | Any | None: + """ List AI chat session messages + + Returns the user and assistant message history for a session, paginated and chronologically ordered. + Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. + + Args: + session_id (UUID): + 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: + AiChatSessionMessageList | Any + """ + + + return (await asyncio_detailed( + session_id=session_id, +client=client, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/ai_chat/stream_ai_chat.py b/rootly_sdk/api/ai_chat/stream_ai_chat.py new file mode 100644 index 00000000..6691ad99 --- /dev/null +++ b/rootly_sdk/api/ai_chat/stream_ai_chat.py @@ -0,0 +1,174 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...types import UNSET, Unset +from uuid import UUID + + + +def _get_kwargs( + *, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, + +) -> dict[str, Any]: + + + + + params: dict[str, Any] = {} + + params["message"] = message + + json_session_id: str | Unset = UNSET + if not isinstance(session_id, Unset): + json_session_id = str(session_id) + params["session_id"] = json_session_id + + json_incident_id: str | Unset = UNSET + if not isinstance(incident_id, Unset): + json_incident_id = str(incident_id) + params["incident_id"] = json_incident_id + + json_alert_id: str | Unset = UNSET + if not isinstance(alert_id, Unset): + json_alert_id = str(alert_id) + params["alert_id"] = json_alert_id + + + 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/ai/chat/stream", + "params": params, + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 200: + return None + + if response.status_code == 403: + 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( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, + +) -> Response[Any]: + """ Stream AI chat response (SSE) + + Send a message and receive the AI response as a Server-Sent Events stream. Optionally bind to an + incident or alert for context. Events: `session_id` (initial), `text` (content chunks), + `task_update` (tool progress), `error`, `done` (terminal with status). Requires `ai.chat:write` + OAuth scope or an API key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | 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( + message=message, +session_id=session_id, +incident_id=incident_id, +alert_id=alert_id, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + message: str, + session_id: UUID | Unset = UNSET, + incident_id: UUID | Unset = UNSET, + alert_id: UUID | Unset = UNSET, + +) -> Response[Any]: + """ Stream AI chat response (SSE) + + Send a message and receive the AI response as a Server-Sent Events stream. Optionally bind to an + incident or alert for context. Events: `session_id` (initial), `text` (content chunks), + `task_update` (tool progress), `error`, `done` (terminal with status). Requires `ai.chat:write` + OAuth scope or an API key. + + Args: + message (str): + session_id (UUID | Unset): + incident_id (UUID | Unset): + alert_id (UUID | 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( + message=message, +session_id=session_id, +incident_id=incident_id, +alert_id=alert_id, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + diff --git a/rootly_sdk/api/alert_events/__init__.py b/rootly_sdk/api/alert_events/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/alert_events/__init__.py +++ b/rootly_sdk/api/alert_events/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/alert_events/create_alert_event.py b/rootly_sdk/api/alert_events/create_alert_event.py index 1ba1d753..51b7eae6 100644 --- a/rootly_sdk/api/alert_events/create_alert_event.py +++ b/rootly_sdk/api/alert_events/create_alert_event.py @@ -1,51 +1,64 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_event_response import AlertEventResponse from ...models.errors_list import ErrorsList from ...models.new_alert_event import NewAlertEvent -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( alert_id: str, *, body: NewAlertEvent | Unset = UNSET, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/alerts/{alert_id}/events".format( - alert_id=quote(str(alert_id), safe=""), - ), + "url": "/v1/alerts/{alert_id}/events".format(alert_id=quote(str(alert_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 -) -> AlertEventResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertEventResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertEventResponse.from_dict(response.json()) + + return response_201 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -54,9 +67,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertEventResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertEventResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +81,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertEvent | Unset = UNSET, + ) -> Response[AlertEventResponse | ErrorsList]: - """Create alert event + """ Create alert event Creates a new alert event @@ -85,11 +97,13 @@ def sync_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( alert_id=alert_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +112,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( alert_id: str, *, client: AuthenticatedClient, body: NewAlertEvent | Unset = UNSET, + ) -> AlertEventResponse | ErrorsList | None: - """Create alert event + """ Create alert event Creates a new alert event @@ -119,22 +133,24 @@ def sync( Returns: AlertEventResponse | ErrorsList - """ + """ + return sync_detailed( alert_id=alert_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient, body: NewAlertEvent | Unset = UNSET, + ) -> Response[AlertEventResponse | ErrorsList]: - """Create alert event + """ Create alert event Creates a new alert event @@ -148,25 +164,29 @@ async def asyncio_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( alert_id=alert_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( alert_id: str, *, client: AuthenticatedClient, body: NewAlertEvent | Unset = UNSET, + ) -> AlertEventResponse | ErrorsList | None: - """Create alert event + """ Create alert event Creates a new alert event @@ -180,12 +200,12 @@ async def asyncio( Returns: AlertEventResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - alert_id=alert_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + alert_id=alert_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_events/delete_alert_event.py b/rootly_sdk/api/alert_events/delete_alert_event.py index fa37ebdf..fc90bb96 100644 --- a/rootly_sdk/api/alert_events/delete_alert_event.py +++ b/rootly_sdk/api/alert_events/delete_alert_event.py @@ -4,26 +4,35 @@ import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_events/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_events/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -32,6 +41,8 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) + + return response_404 if client.raise_on_unexpected_status: @@ -53,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Delete alert event + """ Delete alert event Deletes a specific alert event. Only alert events with kind 'note' (user-created notes) can be deleted. System-generated events are immutable to maintain audit trail integrity. @@ -68,10 +80,12 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -80,13 +94,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Delete alert event + """ Delete alert event Deletes a specific alert event. Only alert events with kind 'note' (user-created notes) can be deleted. System-generated events are immutable to maintain audit trail integrity. @@ -100,20 +114,22 @@ def sync( Returns: Any | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Delete alert event + """ Delete alert event Deletes a specific alert event. Only alert events with kind 'note' (user-created notes) can be deleted. System-generated events are immutable to maintain audit trail integrity. @@ -127,23 +143,27 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Delete alert event + """ Delete alert event Deletes a specific alert event. Only alert events with kind 'note' (user-created notes) can be deleted. System-generated events are immutable to maintain audit trail integrity. @@ -157,11 +177,11 @@ async def asyncio( Returns: Any | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_events/get_alert_event.py b/rootly_sdk/api/alert_events/get_alert_event.py index 0c7b7f99..da732dc6 100644 --- a/rootly_sdk/api/alert_events/get_alert_event.py +++ b/rootly_sdk/api/alert_events/get_alert_event.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_event_response import AlertEventResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_events/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_events/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertEventResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertEventResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertEventResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertEventResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertEventResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertEventResponse | ErrorsList]: - """Retrieve alert event + """ Retrieve alert event Retrieves a specific alert_event by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> AlertEventResponse | ErrorsList | None: - """Retrieve alert event + """ Retrieve alert event Retrieves a specific alert_event by id @@ -104,20 +116,22 @@ def sync( Returns: AlertEventResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertEventResponse | ErrorsList]: - """Retrieve alert event + """ Retrieve alert event Retrieves a specific alert_event by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> AlertEventResponse | ErrorsList | None: - """Retrieve alert event + """ Retrieve alert event Retrieves a specific alert_event by id @@ -159,11 +177,11 @@ async def asyncio( Returns: AlertEventResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_events/list_alert_events.py b/rootly_sdk/api/alert_events/list_alert_events.py index cdbb09b0..2f1803a9 100644 --- a/rootly_sdk/api/alert_events/list_alert_events.py +++ b/rootly_sdk/api/alert_events/list_alert_events.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_event_list import AlertEventList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -18,7 +22,11 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -32,23 +40,27 @@ def _get_kwargs( params["filter[action]"] = filteraction + 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/alerts/{alert_id}/events".format( - alert_id=quote(str(alert_id), safe=""), - ), + "url": "/v1/alerts/{alert_id}/events".format(alert_id=quote(str(alert_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertEventList | None: if response.status_code == 200: response_200 = AlertEventList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -75,8 +87,9 @@ def sync_detailed( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, + ) -> Response[AlertEventList]: - """List alert events + """ List alert events List alert_events @@ -94,15 +107,17 @@ def sync_detailed( Returns: Response[AlertEventList] - """ + """ + kwargs = _get_kwargs( alert_id=alert_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filteraction=filteraction, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filteraction=filteraction, + ) response = client.get_httpx_client().request( @@ -111,7 +126,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( alert_id: str, *, @@ -121,8 +135,9 @@ def sync( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, + ) -> AlertEventList | None: - """List alert events + """ List alert events List alert_events @@ -140,18 +155,19 @@ def sync( Returns: AlertEventList - """ + """ + return sync_detailed( alert_id=alert_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filteraction=filteraction, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filteraction=filteraction, + ).parsed async def asyncio_detailed( alert_id: str, @@ -162,8 +178,9 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, + ) -> Response[AlertEventList]: - """List alert events + """ List alert events List alert_events @@ -181,22 +198,25 @@ async def asyncio_detailed( Returns: Response[AlertEventList] - """ + """ + kwargs = _get_kwargs( alert_id=alert_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filteraction=filteraction, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filteraction=filteraction, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( alert_id: str, *, @@ -206,8 +226,9 @@ async def asyncio( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, + ) -> AlertEventList | None: - """List alert events + """ List alert events List alert_events @@ -225,16 +246,16 @@ async def asyncio( Returns: AlertEventList - """ - - return ( - await asyncio_detailed( - alert_id=alert_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filteraction=filteraction, - ) - ).parsed + """ + + + return (await asyncio_detailed( + alert_id=alert_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filteraction=filteraction, + + )).parsed diff --git a/rootly_sdk/api/alert_events/list_alert_events_feed.py b/rootly_sdk/api/alert_events/list_alert_events_feed.py new file mode 100644 index 00000000..eda9a8ab --- /dev/null +++ b/rootly_sdk/api/alert_events/list_alert_events_feed.py @@ -0,0 +1,364 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.alert_event_feed_list import AlertEventFeedList +from ...models.list_alert_events_feed_filteraction import check_list_alert_events_feed_filteraction +from ...models.list_alert_events_feed_filteraction import ListAlertEventsFeedFilteraction +from ...models.list_alert_events_feed_filterkind import check_list_alert_events_feed_filterkind +from ...models.list_alert_events_feed_filterkind import ListAlertEventsFeedFilterkind +from ...models.list_alert_events_feed_sort import check_list_alert_events_feed_sort +from ...models.list_alert_events_feed_sort import ListAlertEventsFeedSort +from ...types import UNSET, Unset +from typing import cast + + + +def _get_kwargs( + *, + include: str | Unset = UNSET, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_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 + + params["page[size]"] = pagesize + + params["page[after]"] = pageafter + + json_sort: str | Unset = UNSET + if not isinstance(sort, Unset): + json_sort = sort + + params["sort"] = json_sort + + json_filterkind: str | Unset = UNSET + if not isinstance(filterkind, Unset): + json_filterkind = filterkind + + params["filter[kind]"] = json_filterkind + + json_filteraction: str | Unset = UNSET + if not isinstance(filteraction, Unset): + json_filteraction = filteraction + + params["filter[action]"] = json_filteraction + + params["filter[alert_id]"] = filteralert_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/alert_events", + "params": params, + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertEventFeedList | None: + if response.status_code == 200: + response_200 = AlertEventFeedList.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[AlertEventFeedList]: + 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, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_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[AlertEventFeedList]: + """ List alert events across alerts + + Returns a flat list of alert events across all alerts the requester can access. Designed for + periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to + stream forward. + + Args: + include (str | Unset): + pagesize (int | Unset): + pageafter (str | Unset): + sort (ListAlertEventsFeedSort | Unset): + filterkind (ListAlertEventsFeedFilterkind | Unset): + filteraction (ListAlertEventsFeedFilteraction | Unset): + filteralert_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[AlertEventFeedList] + """ + + + kwargs = _get_kwargs( + include=include, +pagesize=pagesize, +pageafter=pageafter, +sort=sort, +filterkind=filterkind, +filteraction=filteraction, +filteralert_id=filteralert_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, + include: str | Unset = UNSET, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + +) -> AlertEventFeedList | None: + """ List alert events across alerts + + Returns a flat list of alert events across all alerts the requester can access. Designed for + periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to + stream forward. + + Args: + include (str | Unset): + pagesize (int | Unset): + pageafter (str | Unset): + sort (ListAlertEventsFeedSort | Unset): + filterkind (ListAlertEventsFeedFilterkind | Unset): + filteraction (ListAlertEventsFeedFilteraction | Unset): + filteralert_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: + AlertEventFeedList + """ + + + return sync_detailed( + client=client, +include=include, +pagesize=pagesize, +pageafter=pageafter, +sort=sort, +filterkind=filterkind, +filteraction=filteraction, +filteralert_id=filteralert_id, +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, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_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[AlertEventFeedList]: + """ List alert events across alerts + + Returns a flat list of alert events across all alerts the requester can access. Designed for + periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to + stream forward. + + Args: + include (str | Unset): + pagesize (int | Unset): + pageafter (str | Unset): + sort (ListAlertEventsFeedSort | Unset): + filterkind (ListAlertEventsFeedFilterkind | Unset): + filteraction (ListAlertEventsFeedFilteraction | Unset): + filteralert_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[AlertEventFeedList] + """ + + + kwargs = _get_kwargs( + include=include, +pagesize=pagesize, +pageafter=pageafter, +sort=sort, +filterkind=filterkind, +filteraction=filteraction, +filteralert_id=filteralert_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, + include: str | Unset = UNSET, + pagesize: int | Unset = UNSET, + pageafter: str | Unset = UNSET, + sort: ListAlertEventsFeedSort | Unset = UNSET, + filterkind: ListAlertEventsFeedFilterkind | Unset = UNSET, + filteraction: ListAlertEventsFeedFilteraction | Unset = UNSET, + filteralert_id: str | Unset = UNSET, + filtercreated_atgt: str | Unset = UNSET, + filtercreated_atgte: str | Unset = UNSET, + filtercreated_atlt: str | Unset = UNSET, + filtercreated_atlte: str | Unset = UNSET, + +) -> AlertEventFeedList | None: + """ List alert events across alerts + + Returns a flat list of alert events across all alerts the requester can access. Designed for + periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to + stream forward. + + Args: + include (str | Unset): + pagesize (int | Unset): + pageafter (str | Unset): + sort (ListAlertEventsFeedSort | Unset): + filterkind (ListAlertEventsFeedFilterkind | Unset): + filteraction (ListAlertEventsFeedFilteraction | Unset): + filteralert_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: + AlertEventFeedList + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagesize=pagesize, +pageafter=pageafter, +sort=sort, +filterkind=filterkind, +filteraction=filteraction, +filteralert_id=filteralert_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + + )).parsed diff --git a/rootly_sdk/api/alert_events/update_alert_event.py b/rootly_sdk/api/alert_events/update_alert_event.py index ef172e7d..6367aee0 100644 --- a/rootly_sdk/api/alert_events/update_alert_event.py +++ b/rootly_sdk/api/alert_events/update_alert_event.py @@ -1,51 +1,64 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_event_response import AlertEventResponse from ...models.errors_list import ErrorsList from ...models.update_alert_event import UpdateAlertEvent -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, body: UpdateAlertEvent | Unset = UNSET, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/alert_events/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_events/{id}".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 -) -> AlertEventResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertEventResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertEventResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -54,9 +67,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertEventResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertEventResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +81,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertEvent | Unset = UNSET, + ) -> Response[AlertEventResponse | ErrorsList]: - """Update alert event + """ Update alert event Updates a specific alert event. Only alert events with kind 'note' (user-created notes) can be updated. System-generated events are immutable to maintain audit trail integrity. @@ -87,11 +99,13 @@ def sync_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -100,14 +114,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlertEvent | Unset = UNSET, + ) -> AlertEventResponse | ErrorsList | None: - """Update alert event + """ Update alert event Updates a specific alert event. Only alert events with kind 'note' (user-created notes) can be updated. System-generated events are immutable to maintain audit trail integrity. @@ -123,22 +137,24 @@ def sync( Returns: AlertEventResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlertEvent | Unset = UNSET, + ) -> Response[AlertEventResponse | ErrorsList]: - """Update alert event + """ Update alert event Updates a specific alert event. Only alert events with kind 'note' (user-created notes) can be updated. System-generated events are immutable to maintain audit trail integrity. @@ -154,25 +170,29 @@ async def asyncio_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlertEvent | Unset = UNSET, + ) -> AlertEventResponse | ErrorsList | None: - """Update alert event + """ Update alert event Updates a specific alert event. Only alert events with kind 'note' (user-created notes) can be updated. System-generated events are immutable to maintain audit trail integrity. @@ -188,12 +208,12 @@ async def asyncio( Returns: AlertEventResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_fields/__init__.py b/rootly_sdk/api/alert_fields/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/alert_fields/__init__.py +++ b/rootly_sdk/api/alert_fields/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/alert_fields/create_alert_field.py b/rootly_sdk/api/alert_fields/create_alert_field.py index 7d0b7150..1b3f5ac9 100644 --- a/rootly_sdk/api/alert_fields/create_alert_field.py +++ b/rootly_sdk/api/alert_fields/create_alert_field.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_field_response import AlertFieldResponse from ...models.errors_list import ErrorsList from ...models.new_alert_field import NewAlertField -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewAlertField, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_fields", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> AlertFieldResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertFieldResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertFieldResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertFieldResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertField, + ) -> Response[AlertFieldResponse | ErrorsList]: - """Creates an alert field + """ Creates an alert field Creates a new alert field from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewAlertField, + ) -> AlertFieldResponse | ErrorsList | None: - """Creates an alert field + """ Creates an alert field Creates a new alert field from provided data @@ -114,20 +131,22 @@ def sync( Returns: AlertFieldResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertField, + ) -> Response[AlertFieldResponse | ErrorsList]: - """Creates an alert field + """ Creates an alert field Creates a new alert field from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewAlertField, + ) -> AlertFieldResponse | ErrorsList | None: - """Creates an alert field + """ Creates an alert field Creates a new alert field from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: AlertFieldResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_fields/delete_alert_field.py b/rootly_sdk/api/alert_fields/delete_alert_field.py index 0b0984e0..d6852b7e 100644 --- a/rootly_sdk/api/alert_fields/delete_alert_field.py +++ b/rootly_sdk/api/alert_fields/delete_alert_field.py @@ -1,47 +1,60 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.alert_field_response import AlertFieldResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_fields/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_fields/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertFieldResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertFieldResponse.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: @@ -50,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertFieldResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,8 +76,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertFieldResponse | ErrorsList]: - """Delete an alert field + """ Delete an alert field Delete a specific alert field by id @@ -79,10 +91,12 @@ def sync_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -91,13 +105,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertFieldResponse | ErrorsList | None: - """Delete an alert field + """ Delete an alert field Delete a specific alert field by id @@ -110,20 +124,22 @@ def sync( Returns: AlertFieldResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertFieldResponse | ErrorsList]: - """Delete an alert field + """ Delete an alert field Delete a specific alert field by id @@ -136,23 +152,27 @@ async def asyncio_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertFieldResponse | ErrorsList | None: - """Delete an alert field + """ Delete an alert field Delete a specific alert field by id @@ -165,11 +185,11 @@ async def asyncio( Returns: AlertFieldResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_fields/get_alert_field.py b/rootly_sdk/api/alert_fields/get_alert_field.py index 10e2a4c9..c165fa24 100644 --- a/rootly_sdk/api/alert_fields/get_alert_field.py +++ b/rootly_sdk/api/alert_fields/get_alert_field.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.alert_field_response import AlertFieldResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_fields/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_fields/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertFieldResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertFieldResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertFieldResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertFieldResponse | ErrorsList]: - """Retrieves an alert field + """ Retrieves an alert field Retrieves a specific alert field by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertFieldResponse | ErrorsList | None: - """Retrieves an alert field + """ Retrieves an alert field Retrieves a specific alert field by id @@ -105,20 +117,22 @@ def sync( Returns: AlertFieldResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertFieldResponse | ErrorsList]: - """Retrieves an alert field + """ Retrieves an alert field Retrieves a specific alert field by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertFieldResponse | ErrorsList | None: - """Retrieves an alert field + """ Retrieves an alert field Retrieves a specific alert field by id @@ -160,11 +178,11 @@ async def asyncio( Returns: AlertFieldResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_fields/list_alert_fields.py b/rootly_sdk/api/alert_fields/list_alert_fields.py index 73d8a746..d6151f5c 100644 --- a/rootly_sdk/api/alert_fields/list_alert_fields.py +++ b/rootly_sdk/api/alert_fields/list_alert_fields.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_field_list import AlertFieldList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,8 +26,20 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -46,23 +63,45 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + 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/alert_fields", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertFieldList | None: if response.status_code == 200: response_200 = AlertFieldList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -93,9 +132,18 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertFieldList]: - """List alert fields + """ List alert fields List alert fields @@ -110,6 +158,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): sort (str | Unset): Raises: @@ -118,20 +174,30 @@ def sync_detailed( Returns: Response[AlertFieldList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterkind=filterkind, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -140,7 +206,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -154,9 +219,18 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertFieldList | None: - """List alert fields + """ List alert fields List alert fields @@ -171,6 +245,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): sort (str | Unset): Raises: @@ -179,23 +261,32 @@ def sync( Returns: AlertFieldList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterkind=filterkind, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -210,9 +301,18 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertFieldList]: - """List alert fields + """ List alert fields List alert fields @@ -227,6 +327,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): sort (str | Unset): Raises: @@ -235,27 +343,38 @@ async def asyncio_detailed( Returns: Response[AlertFieldList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterkind=filterkind, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -269,9 +388,18 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertFieldList | None: - """List alert fields + """ List alert fields List alert fields @@ -286,6 +414,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): sort (str | Unset): Raises: @@ -294,21 +430,29 @@ async def asyncio( Returns: AlertFieldList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterkind=filterkind, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/alert_fields/update_alert_field.py b/rootly_sdk/api/alert_fields/update_alert_field.py index a65a1e6f..8a8854a9 100644 --- a/rootly_sdk/api/alert_fields/update_alert_field.py +++ b/rootly_sdk/api/alert_fields/update_alert_field.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.alert_field_response import AlertFieldResponse from ...models.errors_list import ErrorsList from ...models.update_alert_field import UpdateAlertField -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateAlertField, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_fields/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_fields/{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 -) -> AlertFieldResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertFieldResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertFieldResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertField, + ) -> Response[AlertFieldResponse | ErrorsList]: - """Update an alert field + """ Update an alert field Update a specific alert field by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, + ) -> AlertFieldResponse | ErrorsList | None: - """Update an alert field + """ Update an alert field Update a specific alert field by id @@ -119,22 +131,24 @@ def sync( Returns: AlertFieldResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, + ) -> Response[AlertFieldResponse | ErrorsList]: - """Update an alert field + """ Update an alert field Update a specific alert field by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, + ) -> AlertFieldResponse | ErrorsList | None: - """Update an alert field + """ Update an alert field Update a specific alert field by id @@ -180,12 +198,12 @@ async def asyncio( Returns: AlertFieldResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_groups/__init__.py b/rootly_sdk/api/alert_groups/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/alert_groups/__init__.py +++ b/rootly_sdk/api/alert_groups/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/alert_groups/create_alert_group.py b/rootly_sdk/api/alert_groups/create_alert_group.py index fc100c79..0c2229cf 100644 --- a/rootly_sdk/api/alert_groups/create_alert_group.py +++ b/rootly_sdk/api/alert_groups/create_alert_group.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_group_response import AlertGroupResponse from ...models.errors_list import ErrorsList from ...models.new_alert_group import NewAlertGroup -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewAlertGroup, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_groups", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> AlertGroupResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertGroupResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertGroupResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertGroupResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertGroup, + ) -> Response[AlertGroupResponse | ErrorsList]: - """Creates an alert group + """ Creates an alert group Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -85,10 +100,12 @@ def sync_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -97,13 +114,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewAlertGroup, + ) -> AlertGroupResponse | ErrorsList | None: - """Creates an alert group + """ Creates an alert group Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -118,20 +135,22 @@ def sync( Returns: AlertGroupResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertGroup, + ) -> Response[AlertGroupResponse | ErrorsList]: - """Creates an alert group + """ Creates an alert group Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -146,23 +165,27 @@ async def asyncio_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewAlertGroup, + ) -> AlertGroupResponse | ErrorsList | None: - """Creates an alert group + """ Creates an alert group Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -177,11 +200,11 @@ async def asyncio( Returns: AlertGroupResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_groups/delete_alert_group.py b/rootly_sdk/api/alert_groups/delete_alert_group.py index e23900a9..93559631 100644 --- a/rootly_sdk/api/alert_groups/delete_alert_group.py +++ b/rootly_sdk/api/alert_groups/delete_alert_group.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.alert_group_response import AlertGroupResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_groups/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertGroupResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertGroupResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertGroupResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertGroupResponse | ErrorsList]: - """Delete an alert group + """ Delete an alert group Delete a specific alert group by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertGroupResponse | ErrorsList | None: - """Delete an alert group + """ Delete an alert group Delete a specific alert group by id @@ -105,20 +117,22 @@ def sync( Returns: AlertGroupResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertGroupResponse | ErrorsList]: - """Delete an alert group + """ Delete an alert group Delete a specific alert group by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertGroupResponse | ErrorsList | None: - """Delete an alert group + """ Delete an alert group Delete a specific alert group by id @@ -160,11 +178,11 @@ async def asyncio( Returns: AlertGroupResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_groups/get_alert_group.py b/rootly_sdk/api/alert_groups/get_alert_group.py index 67e96c43..c72fe872 100644 --- a/rootly_sdk/api/alert_groups/get_alert_group.py +++ b/rootly_sdk/api/alert_groups/get_alert_group.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.alert_group_response import AlertGroupResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_groups/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertGroupResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertGroupResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertGroupResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertGroupResponse | ErrorsList]: - """Retrieves an alert group + """ Retrieves an alert group Retrieves a specific alert group by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertGroupResponse | ErrorsList | None: - """Retrieves an alert group + """ Retrieves an alert group Retrieves a specific alert group by id @@ -105,20 +117,22 @@ def sync( Returns: AlertGroupResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertGroupResponse | ErrorsList]: - """Retrieves an alert group + """ Retrieves an alert group Retrieves a specific alert group by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertGroupResponse | ErrorsList | None: - """Retrieves an alert group + """ Retrieves an alert group Retrieves a specific alert group by id @@ -160,11 +178,11 @@ async def asyncio( Returns: AlertGroupResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_groups/list_alert_groups.py b/rootly_sdk/api/alert_groups/list_alert_groups.py index 0b409151..0f4dfbde 100644 --- a/rootly_sdk/api/alert_groups/list_alert_groups.py +++ b/rootly_sdk/api/alert_groups/list_alert_groups.py @@ -1,38 +1,77 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_group_list import AlertGroupList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( *, include: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} params["include"] = include + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + 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/alert_groups", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertGroupList | None: if response.status_code == 200: response_200 = AlertGroupList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -54,13 +93,30 @@ def sync_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> Response[AlertGroupList]: - """List alert groups + """ List alert groups List alert groups Args: include (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -68,10 +124,20 @@ def sync_detailed( Returns: Response[AlertGroupList] - """ + """ + kwargs = _get_kwargs( include=include, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + ) response = client.get_httpx_client().request( @@ -80,18 +146,34 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, include: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> AlertGroupList | None: - """List alert groups + """ List alert groups List alert groups Args: include (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -99,25 +181,51 @@ def sync( Returns: AlertGroupList - """ + """ + return sync_detailed( client=client, - include=include, - ).parsed +include=include, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> Response[AlertGroupList]: - """List alert groups + """ List alert groups List alert groups Args: include (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -125,28 +233,56 @@ async def asyncio_detailed( Returns: Response[AlertGroupList] - """ + """ + kwargs = _get_kwargs( include=include, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> AlertGroupList | None: - """List alert groups + """ List alert groups List alert groups Args: include (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -154,11 +290,19 @@ async def asyncio( Returns: AlertGroupList - """ + """ - return ( - await asyncio_detailed( - client=client, - include=include, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +include=include, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + + )).parsed diff --git a/rootly_sdk/api/alert_groups/update_alert_group.py b/rootly_sdk/api/alert_groups/update_alert_group.py index 34654d17..c914c775 100644 --- a/rootly_sdk/api/alert_groups/update_alert_group.py +++ b/rootly_sdk/api/alert_groups/update_alert_group.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.alert_group_response import AlertGroupResponse from ...models.errors_list import ErrorsList from ...models.update_alert_group import UpdateAlertGroup -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateAlertGroup, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/alert_groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_groups/{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 -) -> AlertGroupResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertGroupResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertGroupResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertGroup, + ) -> Response[AlertGroupResponse | ErrorsList]: - """Update an alert group + """ Update an alert group Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -87,11 +97,13 @@ def sync_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -100,14 +112,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, + ) -> AlertGroupResponse | ErrorsList | None: - """Update an alert group + """ Update an alert group Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -123,22 +135,24 @@ def sync( Returns: AlertGroupResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, + ) -> Response[AlertGroupResponse | ErrorsList]: - """Update an alert group + """ Update an alert group Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -154,25 +168,29 @@ async def asyncio_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, + ) -> AlertGroupResponse | ErrorsList | None: - """Update an alert group + """ Update an alert group Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -188,12 +206,12 @@ async def asyncio( Returns: AlertGroupResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_routes/__init__.py b/rootly_sdk/api/alert_routes/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/alert_routes/__init__.py +++ b/rootly_sdk/api/alert_routes/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/alert_routes/create_alert_route.py b/rootly_sdk/api/alert_routes/create_alert_route.py index 26d162de..00786819 100644 --- a/rootly_sdk/api/alert_routes/create_alert_route.py +++ b/rootly_sdk/api/alert_routes/create_alert_route.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_route_response import AlertRouteResponse from ...models.errors_list import ErrorsList from ...models.new_alert_route import NewAlertRoute -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewAlertRoute, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_routes", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> AlertRouteResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRouteResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertRouteResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRouteResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertRoute, + ) -> Response[AlertRouteResponse | ErrorsList]: - """Creates an alert route + """ Creates an alert route Creates a new alert route from provided data. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly @@ -97,10 +112,12 @@ def sync_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -109,13 +126,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewAlertRoute, + ) -> AlertRouteResponse | ErrorsList | None: - """Creates an alert route + """ Creates an alert route Creates a new alert route from provided data. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly @@ -142,20 +159,22 @@ def sync( Returns: AlertRouteResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertRoute, + ) -> Response[AlertRouteResponse | ErrorsList]: - """Creates an alert route + """ Creates an alert route Creates a new alert route from provided data. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly @@ -182,23 +201,27 @@ async def asyncio_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewAlertRoute, + ) -> AlertRouteResponse | ErrorsList | None: - """Creates an alert route + """ Creates an alert route Creates a new alert route from provided data. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly @@ -225,11 +248,11 @@ async def asyncio( Returns: AlertRouteResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_routes/delete_alert_route.py b/rootly_sdk/api/alert_routes/delete_alert_route.py index 013c2d58..80f207b4 100644 --- a/rootly_sdk/api/alert_routes/delete_alert_route.py +++ b/rootly_sdk/api/alert_routes/delete_alert_route.py @@ -1,51 +1,66 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.delete_alert_route_response_200 import DeleteAlertRouteResponse200 from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_routes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_routes/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> DeleteAlertRouteResponse200 | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DeleteAlertRouteResponse200 | ErrorsList | None: if response.status_code == 200: response_200 = DeleteAlertRouteResponse200.from_dict(response.json()) + + 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -54,9 +69,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DeleteAlertRouteResponse200 | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DeleteAlertRouteResponse200 | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +82,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[DeleteAlertRouteResponse200 | ErrorsList]: - """Delete an alert route + """ Delete an alert route Delete a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -85,10 +99,12 @@ def sync_detailed( Returns: Response[DeleteAlertRouteResponse200 | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -97,13 +113,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> DeleteAlertRouteResponse200 | ErrorsList | None: - """Delete an alert route + """ Delete an alert route Delete a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -118,20 +134,22 @@ def sync( Returns: DeleteAlertRouteResponse200 | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[DeleteAlertRouteResponse200 | ErrorsList]: - """Delete an alert route + """ Delete an alert route Delete a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -146,23 +164,27 @@ async def asyncio_detailed( Returns: Response[DeleteAlertRouteResponse200 | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> DeleteAlertRouteResponse200 | ErrorsList | None: - """Delete an alert route + """ Delete an alert route Delete a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -177,11 +199,11 @@ async def asyncio( Returns: DeleteAlertRouteResponse200 | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_routes/get_alert_route.py b/rootly_sdk/api/alert_routes/get_alert_route.py index 72f3fec8..520c5c11 100644 --- a/rootly_sdk/api/alert_routes/get_alert_route.py +++ b/rootly_sdk/api/alert_routes/get_alert_route.py @@ -1,46 +1,59 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_route_response import AlertRouteResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_routes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_routes/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertRouteResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRouteResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRouteResponse.from_dict(response.json()) + + 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: @@ -49,9 +62,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRouteResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +75,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertRouteResponse | ErrorsList]: - """Get an alert route + """ Get an alert route Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -87,10 +99,12 @@ def sync_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -99,13 +113,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> AlertRouteResponse | ErrorsList | None: - """Get an alert route + """ Get an alert route Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -127,20 +141,22 @@ def sync( Returns: AlertRouteResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertRouteResponse | ErrorsList]: - """Get an alert route + """ Get an alert route Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -162,23 +178,27 @@ async def asyncio_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> AlertRouteResponse | ErrorsList | None: - """Get an alert route + """ Get an alert route Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -200,11 +220,11 @@ async def asyncio( Returns: AlertRouteResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_routes/list_alert_routes.py b/rootly_sdk/api/alert_routes/list_alert_routes.py index 5bc4f2e3..eeafefbb 100644 --- a/rootly_sdk/api/alert_routes/list_alert_routes.py +++ b/rootly_sdk/api/alert_routes/list_alert_routes.py @@ -1,13 +1,18 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_route_list import AlertRouteList from ...models.errors_list import ErrorsList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,8 +21,20 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,30 +46,52 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + 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/alert_routes", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertRouteList | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRouteList | ErrorsList | None: if response.status_code == 200: response_200 = AlertRouteList.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: @@ -61,9 +100,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRouteList | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +116,18 @@ def sync_detailed( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertRouteList | ErrorsList]: - """List alert routes + """ List alert routes List all alert routes for the current team with filtering and pagination. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, @@ -92,6 +138,14 @@ def sync_detailed( pagesize (int | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -100,14 +154,24 @@ def sync_detailed( Returns: Response[AlertRouteList | ErrorsList] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -116,7 +180,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -124,9 +187,18 @@ def sync( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertRouteList | ErrorsList | None: - """List alert routes + """ List alert routes List all alert routes for the current team with filtering and pagination. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, @@ -137,6 +209,14 @@ def sync( pagesize (int | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -145,17 +225,26 @@ def sync( Returns: AlertRouteList | ErrorsList - """ + """ + return sync_detailed( client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - sort=sort, - ).parsed +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -164,9 +253,18 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertRouteList | ErrorsList]: - """List alert routes + """ List alert routes List all alert routes for the current team with filtering and pagination. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, @@ -177,6 +275,14 @@ async def asyncio_detailed( pagesize (int | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -185,21 +291,32 @@ async def asyncio_detailed( Returns: Response[AlertRouteList | ErrorsList] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -207,9 +324,18 @@ async def asyncio( pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertRouteList | ErrorsList | None: - """List alert routes + """ List alert routes List all alert routes for the current team with filtering and pagination. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, @@ -220,6 +346,14 @@ async def asyncio( pagesize (int | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -228,15 +362,23 @@ async def asyncio( Returns: AlertRouteList | ErrorsList - """ - - return ( - await asyncio_detailed( - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/alert_routes/patch_alert_route.py b/rootly_sdk/api/alert_routes/patch_alert_route.py index a8c0c4a9..247e75a1 100644 --- a/rootly_sdk/api/alert_routes/patch_alert_route.py +++ b/rootly_sdk/api/alert_routes/patch_alert_route.py @@ -1,60 +1,75 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_route_response import AlertRouteResponse from ...models.errors_list import ErrorsList from ...models.patch_alert_route import PatchAlertRoute -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: PatchAlertRoute, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/alert_routes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_routes/{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 -) -> AlertRouteResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRouteResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRouteResponse.from_dict(response.json()) + + 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -63,9 +78,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRouteResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,8 +92,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: PatchAlertRoute, + ) -> Response[AlertRouteResponse | ErrorsList]: - """Update an alert route + """ Update an alert route Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -95,11 +109,13 @@ def sync_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -108,14 +124,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: PatchAlertRoute, + ) -> AlertRouteResponse | ErrorsList | None: - """Update an alert route + """ Update an alert route Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -130,22 +146,24 @@ def sync( Returns: AlertRouteResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: PatchAlertRoute, + ) -> Response[AlertRouteResponse | ErrorsList]: - """Update an alert route + """ Update an alert route Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -160,25 +178,29 @@ async def asyncio_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: PatchAlertRoute, + ) -> AlertRouteResponse | ErrorsList | None: - """Update an alert route + """ Update an alert route Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -193,12 +215,12 @@ async def asyncio( Returns: AlertRouteResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_routes/update_alert_route.py b/rootly_sdk/api/alert_routes/update_alert_route.py index 5a47cf35..dcf2501d 100644 --- a/rootly_sdk/api/alert_routes/update_alert_route.py +++ b/rootly_sdk/api/alert_routes/update_alert_route.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_route_response import AlertRouteResponse from ...models.errors_list import ErrorsList from ...models.update_alert_route import UpdateAlertRoute -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateAlertRoute, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_routes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_routes/{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 -) -> AlertRouteResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRouteResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRouteResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRouteResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertRoute, + ) -> Response[AlertRouteResponse | ErrorsList]: - """Update an alert route + """ Update an alert route Update a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -103,11 +115,13 @@ def sync_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -116,14 +130,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlertRoute, + ) -> AlertRouteResponse | ErrorsList | None: - """Update an alert route + """ Update an alert route Update a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -151,22 +165,24 @@ def sync( Returns: AlertRouteResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlertRoute, + ) -> Response[AlertRouteResponse | ErrorsList]: - """Update an alert route + """ Update an alert route Update a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -194,25 +210,29 @@ async def asyncio_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlertRoute, + ) -> AlertRouteResponse | ErrorsList | None: - """Update an alert route + """ Update an alert route Update a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -240,12 +260,12 @@ async def asyncio( Returns: AlertRouteResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_routing_rules/__init__.py b/rootly_sdk/api/alert_routing_rules/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/alert_routing_rules/__init__.py +++ b/rootly_sdk/api/alert_routing_rules/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 55f243d7..951127f1 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 @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_routing_rule_response import AlertRoutingRuleResponse from ...models.errors_list import ErrorsList from ...models.new_alert_routing_rule import NewAlertRoutingRule -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewAlertRoutingRule, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_routing_rules", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> AlertRoutingRuleResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRoutingRuleResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertRoutingRuleResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRoutingRuleResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertRoutingRule, + ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """Creates an alert routing rule + """ Creates an alert routing rule Creates a new alert routing rule from provided data. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether @@ -85,10 +100,12 @@ def sync_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -97,13 +114,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewAlertRoutingRule, + ) -> AlertRoutingRuleResponse | ErrorsList | None: - """Creates an alert routing rule + """ Creates an alert routing rule Creates a new alert routing rule from provided data. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether @@ -118,20 +135,22 @@ def sync( Returns: AlertRoutingRuleResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertRoutingRule, + ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """Creates an alert routing rule + """ Creates an alert routing rule Creates a new alert routing rule from provided data. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether @@ -146,23 +165,27 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewAlertRoutingRule, + ) -> AlertRoutingRuleResponse | ErrorsList | None: - """Creates an alert routing rule + """ Creates an alert routing rule Creates a new alert routing rule from provided data. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether @@ -177,11 +200,11 @@ async def asyncio( Returns: AlertRoutingRuleResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed 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 9a0263e6..d2fbf40f 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,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.alert_routing_rule_response import AlertRoutingRuleResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_routing_rules/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_routing_rules/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertRoutingRuleResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRoutingRuleResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRoutingRuleResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRoutingRuleResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """Delete an alert routing rule + """ Delete an alert routing rule Delete a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -76,10 +86,12 @@ def sync_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -88,13 +100,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertRoutingRuleResponse | ErrorsList | None: - """Delete an alert routing rule + """ Delete an alert routing rule Delete a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -109,20 +121,22 @@ def sync( Returns: AlertRoutingRuleResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """Delete an alert routing rule + """ Delete an alert routing rule Delete a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -137,23 +151,27 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertRoutingRuleResponse | ErrorsList | None: - """Delete an alert routing rule + """ Delete an alert routing rule Delete a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -168,11 +186,11 @@ async def asyncio( Returns: AlertRoutingRuleResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 5946c97a..149039e1 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,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.alert_routing_rule_response import AlertRoutingRuleResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_routing_rules/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_routing_rules/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertRoutingRuleResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRoutingRuleResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRoutingRuleResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRoutingRuleResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """Retrieves an alert routing rule + """ Retrieves an alert routing rule Retrieves a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are @@ -76,10 +86,12 @@ def sync_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -88,13 +100,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertRoutingRuleResponse | ErrorsList | None: - """Retrieves an alert routing rule + """ Retrieves an alert routing rule Retrieves a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are @@ -109,20 +121,22 @@ def sync( Returns: AlertRoutingRuleResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """Retrieves an alert routing rule + """ Retrieves an alert routing rule Retrieves a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are @@ -137,23 +151,27 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> AlertRoutingRuleResponse | ErrorsList | None: - """Retrieves an alert routing rule + """ Retrieves an alert routing rule Retrieves a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are @@ -168,11 +186,11 @@ async def asyncio( Returns: AlertRoutingRuleResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 fa385d56..e6717b1f 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 @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_routing_rule_list import AlertRoutingRuleList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -20,8 +25,20 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -43,23 +60,45 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + 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/alert_routing_rules", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRoutingRuleList | None: if response.status_code == 200: response_200 = AlertRoutingRuleList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -68,9 +107,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRoutingRuleList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -91,9 +128,18 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertRoutingRuleList]: - """List alert routing rules + """ List alert routing rules List alert routing rules. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an advanced user, @@ -109,6 +155,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -117,19 +171,29 @@ def sync_detailed( Returns: Response[AlertRoutingRuleList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -138,7 +202,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -151,9 +214,18 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertRoutingRuleList | None: - """List alert routing rules + """ List alert routing rules List alert routing rules. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an advanced user, @@ -169,6 +241,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -177,22 +257,31 @@ def sync( Returns: AlertRoutingRuleList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -206,9 +295,18 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertRoutingRuleList]: - """List alert routing rules + """ List alert routing rules List alert routing rules. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an advanced user, @@ -224,6 +322,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -232,26 +338,37 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -264,9 +381,18 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertRoutingRuleList | None: - """List alert routing rules + """ List alert routing rules List alert routing rules. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an advanced user, @@ -282,6 +408,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -290,20 +424,28 @@ async def asyncio( Returns: AlertRoutingRuleList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + + )).parsed 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 6bc038cd..bcfe96b7 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,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.alert_routing_rule_response import AlertRoutingRuleResponse from ...models.errors_list import ErrorsList from ...models.update_alert_routing_rule import UpdateAlertRoutingRule -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateAlertRoutingRule, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_routing_rules/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_routing_rules/{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 -) -> AlertRoutingRuleResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRoutingRuleResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRoutingRuleResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertRoutingRuleResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, + ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """Update an alert routing rule + """ Update an alert routing rule Update a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -87,11 +97,13 @@ def sync_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -100,14 +112,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, + ) -> AlertRoutingRuleResponse | ErrorsList | None: - """Update an alert routing rule + """ Update an alert routing rule Update a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -123,22 +135,24 @@ def sync( Returns: AlertRoutingRuleResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, + ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """Update an alert routing rule + """ Update an alert routing rule Update a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -154,25 +168,29 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, + ) -> AlertRoutingRuleResponse | ErrorsList | None: - """Update an alert routing rule + """ Update an alert routing rule Update a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -188,12 +206,12 @@ async def asyncio( Returns: AlertRoutingRuleResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_sources/__init__.py b/rootly_sdk/api/alert_sources/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/alert_sources/__init__.py +++ b/rootly_sdk/api/alert_sources/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/alert_sources/create_alerts_source.py b/rootly_sdk/api/alert_sources/create_alerts_source.py index 893eb998..d7c3a053 100644 --- a/rootly_sdk/api/alert_sources/create_alerts_source.py +++ b/rootly_sdk/api/alert_sources/create_alerts_source.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alerts_source_response import AlertsSourceResponse from ...models.errors_list import ErrorsList from ...models.new_alerts_source import NewAlertsSource -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewAlertsSource, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_sources", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> AlertsSourceResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertsSourceResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertsSourceResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertsSourceResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertsSourceResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertsSource, + ) -> Response[AlertsSourceResponse | ErrorsList]: - """Creates an alert source + """ Creates an alert source Creates a new alert source from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewAlertsSource, + ) -> AlertsSourceResponse | ErrorsList | None: - """Creates an alert source + """ Creates an alert source Creates a new alert source from provided data @@ -114,20 +131,22 @@ def sync( Returns: AlertsSourceResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertsSource, + ) -> Response[AlertsSourceResponse | ErrorsList]: - """Creates an alert source + """ Creates an alert source Creates a new alert source from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewAlertsSource, + ) -> AlertsSourceResponse | ErrorsList | None: - """Creates an alert source + """ Creates an alert source Creates a new alert source from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: AlertsSourceResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_sources/delete_alerts_source.py b/rootly_sdk/api/alert_sources/delete_alerts_source.py index 24e0748d..e899cabc 100644 --- a/rootly_sdk/api/alert_sources/delete_alerts_source.py +++ b/rootly_sdk/api/alert_sources/delete_alerts_source.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alerts_source_response import AlertsSourceResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_sources/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_sources/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertsSourceResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertsSourceResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertsSourceResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertsSourceResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertsSourceResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertsSourceResponse | ErrorsList]: - """Delete an alert source + """ Delete an alert source Delete a specific alert source by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> AlertsSourceResponse | ErrorsList | None: - """Delete an alert source + """ Delete an alert source Delete a specific alert source by id @@ -104,20 +116,22 @@ def sync( Returns: AlertsSourceResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertsSourceResponse | ErrorsList]: - """Delete an alert source + """ Delete an alert source Delete a specific alert source by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> AlertsSourceResponse | ErrorsList | None: - """Delete an alert source + """ Delete an alert source Delete a specific alert source by id @@ -159,11 +177,11 @@ async def asyncio( Returns: AlertsSourceResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_sources/get_alerts_source.py b/rootly_sdk/api/alert_sources/get_alerts_source.py index e3617a5a..92b5fd0e 100644 --- a/rootly_sdk/api/alert_sources/get_alerts_source.py +++ b/rootly_sdk/api/alert_sources/get_alerts_source.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alerts_source_response import AlertsSourceResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_sources/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_sources/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertsSourceResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertsSourceResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertsSourceResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertsSourceResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertsSourceResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertsSourceResponse | ErrorsList]: - """Retrieves an alert source + """ Retrieves an alert source Retrieves a specific alert source by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> AlertsSourceResponse | ErrorsList | None: - """Retrieves an alert source + """ Retrieves an alert source Retrieves a specific alert source by id @@ -104,20 +116,22 @@ def sync( Returns: AlertsSourceResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertsSourceResponse | ErrorsList]: - """Retrieves an alert source + """ Retrieves an alert source Retrieves a specific alert source by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> AlertsSourceResponse | ErrorsList | None: - """Retrieves an alert source + """ Retrieves an alert source Retrieves a specific alert source by id @@ -159,11 +177,11 @@ async def asyncio( Returns: AlertsSourceResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_sources/list_alerts_sources.py b/rootly_sdk/api/alert_sources/list_alerts_sources.py index c055971e..0e7e7dd4 100644 --- a/rootly_sdk/api/alert_sources/list_alerts_sources.py +++ b/rootly_sdk/api/alert_sources/list_alerts_sources.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alerts_source_list import AlertsSourceList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -18,8 +23,13 @@ def _get_kwargs( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -37,23 +47,31 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[enabled]"] = filterenabled + 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/alert_sources", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertsSourceList | None: if response.status_code == 200: response_200 = AlertsSourceList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -81,9 +99,11 @@ def sync_detailed( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertsSourceList]: - """List alert sources + """ List alert sources List alert sources @@ -95,6 +115,7 @@ def sync_detailed( filterstatuses (str | Unset): filtersource_types (str | Unset): filtername (str | Unset): + filterenabled (bool | Unset): sort (str | Unset): Raises: @@ -103,17 +124,20 @@ def sync_detailed( Returns: Response[AlertsSourceList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterstatuses=filterstatuses, - filtersource_types=filtersource_types, - filtername=filtername, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterstatuses=filterstatuses, +filtersource_types=filtersource_types, +filtername=filtername, +filterenabled=filterenabled, +sort=sort, + ) response = client.get_httpx_client().request( @@ -122,7 +146,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -133,9 +156,11 @@ def sync( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertsSourceList | None: - """List alert sources + """ List alert sources List alert sources @@ -147,6 +172,7 @@ def sync( filterstatuses (str | Unset): filtersource_types (str | Unset): filtername (str | Unset): + filterenabled (bool | Unset): sort (str | Unset): Raises: @@ -155,20 +181,22 @@ def sync( Returns: AlertsSourceList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterstatuses=filterstatuses, - filtersource_types=filtersource_types, - filtername=filtername, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterstatuses=filterstatuses, +filtersource_types=filtersource_types, +filtername=filtername, +filterenabled=filterenabled, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -180,9 +208,11 @@ async def asyncio_detailed( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertsSourceList]: - """List alert sources + """ List alert sources List alert sources @@ -194,6 +224,7 @@ async def asyncio_detailed( filterstatuses (str | Unset): filtersource_types (str | Unset): filtername (str | Unset): + filterenabled (bool | Unset): sort (str | Unset): Raises: @@ -202,24 +233,28 @@ async def asyncio_detailed( Returns: Response[AlertsSourceList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterstatuses=filterstatuses, - filtersource_types=filtersource_types, - filtername=filtername, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterstatuses=filterstatuses, +filtersource_types=filtersource_types, +filtername=filtername, +filterenabled=filterenabled, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -230,9 +265,11 @@ async def asyncio( filterstatuses: str | Unset = UNSET, filtersource_types: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertsSourceList | None: - """List alert sources + """ List alert sources List alert sources @@ -244,6 +281,7 @@ async def asyncio( filterstatuses (str | Unset): filtersource_types (str | Unset): filtername (str | Unset): + filterenabled (bool | Unset): sort (str | Unset): Raises: @@ -252,18 +290,19 @@ async def asyncio( Returns: AlertsSourceList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterstatuses=filterstatuses, - filtersource_types=filtersource_types, - filtername=filtername, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterstatuses=filterstatuses, +filtersource_types=filtersource_types, +filtername=filtername, +filterenabled=filterenabled, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/alert_sources/update_alerts_source.py b/rootly_sdk/api/alert_sources/update_alerts_source.py index 32c1f348..ca9bfc4d 100644 --- a/rootly_sdk/api/alert_sources/update_alerts_source.py +++ b/rootly_sdk/api/alert_sources/update_alerts_source.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alerts_source_response import AlertsSourceResponse from ...models.errors_list import ErrorsList from ...models.update_alerts_source import UpdateAlertsSource -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateAlertsSource, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_sources/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_sources/{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 -) -> AlertsSourceResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertsSourceResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertsSourceResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertsSourceResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertsSourceResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertsSource, + ) -> Response[AlertsSourceResponse | ErrorsList]: - """Update an alert source + """ Update an alert source Update a specific alert source by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlertsSource, + ) -> AlertsSourceResponse | ErrorsList | None: - """Update an alert source + """ Update an alert source Update a specific alert source by id @@ -118,22 +130,24 @@ def sync( Returns: AlertsSourceResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlertsSource, + ) -> Response[AlertsSourceResponse | ErrorsList]: - """Update an alert source + """ Update an alert source Update a specific alert source by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlertsSource, + ) -> AlertsSourceResponse | ErrorsList | None: - """Update an alert source + """ Update an alert source Update a specific alert source by id @@ -179,12 +197,12 @@ async def asyncio( Returns: AlertsSourceResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_urgencies/__init__.py b/rootly_sdk/api/alert_urgencies/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/alert_urgencies/__init__.py +++ b/rootly_sdk/api/alert_urgencies/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/alert_urgencies/create_alert_urgency.py b/rootly_sdk/api/alert_urgencies/create_alert_urgency.py index d44f0d38..2b2c2c49 100644 --- a/rootly_sdk/api/alert_urgencies/create_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/create_alert_urgency.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_urgency_response import AlertUrgencyResponse from ...models.errors_list import ErrorsList from ...models.new_alert_urgency import NewAlertUrgency -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewAlertUrgency, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_urgencies", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> AlertUrgencyResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertUrgencyResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertUrgencyResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertUrgencyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertUrgencyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertUrgency, + ) -> Response[AlertUrgencyResponse | ErrorsList]: - """Creates an alert urgency + """ Creates an alert urgency Creates a new alert urgency from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewAlertUrgency, + ) -> AlertUrgencyResponse | ErrorsList | None: - """Creates an alert urgency + """ Creates an alert urgency Creates a new alert urgency from provided data @@ -114,20 +131,22 @@ def sync( Returns: AlertUrgencyResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertUrgency, + ) -> Response[AlertUrgencyResponse | ErrorsList]: - """Creates an alert urgency + """ Creates an alert urgency Creates a new alert urgency from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewAlertUrgency, + ) -> AlertUrgencyResponse | ErrorsList | None: - """Creates an alert urgency + """ Creates an alert urgency Creates a new alert urgency from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: AlertUrgencyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py b/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py index 46ed88c4..b1e5abc7 100644 --- a/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_urgency_response import AlertUrgencyResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_urgencies/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_urgencies/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertUrgencyResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertUrgencyResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertUrgencyResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertUrgencyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertUrgencyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertUrgencyResponse | ErrorsList]: - """Delete an alert urgency + """ Delete an alert urgency Delete a specific alert urgency by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> AlertUrgencyResponse | ErrorsList | None: - """Delete an alert urgency + """ Delete an alert urgency Delete a specific alert urgency by id @@ -104,20 +116,22 @@ def sync( Returns: AlertUrgencyResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertUrgencyResponse | ErrorsList]: - """Delete an alert urgency + """ Delete an alert urgency Delete a specific alert urgency by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> AlertUrgencyResponse | ErrorsList | None: - """Delete an alert urgency + """ Delete an alert urgency Delete a specific alert urgency by id @@ -159,11 +177,11 @@ async def asyncio( Returns: AlertUrgencyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_urgencies/get_alert_urgency.py b/rootly_sdk/api/alert_urgencies/get_alert_urgency.py index 947f8dd9..8d5fc04f 100644 --- a/rootly_sdk/api/alert_urgencies/get_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/get_alert_urgency.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_urgency_response import AlertUrgencyResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_urgencies/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_urgencies/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertUrgencyResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertUrgencyResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertUrgencyResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertUrgencyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertUrgencyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertUrgencyResponse | ErrorsList]: - """Retrieves an alert urgency + """ Retrieves an alert urgency Retrieves a specific alert urgency by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> AlertUrgencyResponse | ErrorsList | None: - """Retrieves an alert urgency + """ Retrieves an alert urgency Retrieves a specific alert urgency by id @@ -104,20 +116,22 @@ def sync( Returns: AlertUrgencyResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertUrgencyResponse | ErrorsList]: - """Retrieves an alert urgency + """ Retrieves an alert urgency Retrieves a specific alert urgency by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> AlertUrgencyResponse | ErrorsList | None: - """Retrieves an alert urgency + """ Retrieves an alert urgency Retrieves a specific alert urgency by id @@ -159,11 +177,11 @@ async def asyncio( Returns: AlertUrgencyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py index e29c4393..784a3881 100644 --- a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py +++ b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_urgency_list import AlertUrgencyList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -20,8 +25,16 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -43,23 +56,37 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + 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/alert_urgencies", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertUrgencyList | None: if response.status_code == 200: response_200 = AlertUrgencyList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -89,9 +116,14 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertUrgencyList]: - """List alert urgencies + """ List alert urgencies List alert urgencies @@ -105,6 +137,10 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -113,19 +149,25 @@ def sync_detailed( Returns: Response[AlertUrgencyList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -134,7 +176,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -147,9 +188,14 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertUrgencyList | None: - """List alert urgencies + """ List alert urgencies List alert urgencies @@ -163,6 +209,10 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -171,22 +221,27 @@ def sync( Returns: AlertUrgencyList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -200,9 +255,14 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AlertUrgencyList]: - """List alert urgencies + """ List alert urgencies List alert urgencies @@ -216,6 +276,10 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -224,26 +288,33 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -256,9 +327,14 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AlertUrgencyList | None: - """List alert urgencies + """ List alert urgencies List alert urgencies @@ -272,6 +348,10 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -280,20 +360,24 @@ async def asyncio( Returns: AlertUrgencyList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/alert_urgencies/update_alert_urgency.py b/rootly_sdk/api/alert_urgencies/update_alert_urgency.py index 2bef0a08..985f301b 100644 --- a/rootly_sdk/api/alert_urgencies/update_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/update_alert_urgency.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_urgency_response import AlertUrgencyResponse from ...models.errors_list import ErrorsList from ...models.update_alert_urgency import UpdateAlertUrgency -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateAlertUrgency, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_urgencies/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alert_urgencies/{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 -) -> AlertUrgencyResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertUrgencyResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertUrgencyResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertUrgencyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertUrgencyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertUrgency, + ) -> Response[AlertUrgencyResponse | ErrorsList]: - """Update an alert urgency + """ Update an alert urgency Update a specific alert urgency by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlertUrgency, + ) -> AlertUrgencyResponse | ErrorsList | None: - """Update an alert urgency + """ Update an alert urgency Update a specific alert urgency by id @@ -118,22 +130,24 @@ def sync( Returns: AlertUrgencyResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlertUrgency, + ) -> Response[AlertUrgencyResponse | ErrorsList]: - """Update an alert urgency + """ Update an alert urgency Update a specific alert urgency by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlertUrgency, + ) -> AlertUrgencyResponse | ErrorsList | None: - """Update an alert urgency + """ Update an alert urgency Update a specific alert urgency by id @@ -179,12 +197,12 @@ async def asyncio( Returns: AlertUrgencyResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alerts/__init__.py b/rootly_sdk/api/alerts/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/alerts/__init__.py +++ b/rootly_sdk/api/alerts/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/alerts/acknowledge_alert.py b/rootly_sdk/api/alerts/acknowledge_alert.py index be8c6611..2856d58f 100644 --- a/rootly_sdk/api/alerts/acknowledge_alert.py +++ b/rootly_sdk/api/alerts/acknowledge_alert.py @@ -1,46 +1,59 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/alerts/{id}/acknowledge".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alerts/{id}/acknowledge".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.from_dict(response.json()) + + return response_200 if response.status_code == 400: response_400 = ErrorsList.from_dict(response.json()) + + return response_400 if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) + + return response_404 if client.raise_on_unexpected_status: @@ -49,9 +62,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +75,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertResponse | ErrorsList]: - """Acknowledges an alert + """ Acknowledges an alert Acknowledges a specific alert by id @@ -78,10 +90,12 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -90,13 +104,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> AlertResponse | ErrorsList | None: - """Acknowledges an alert + """ Acknowledges an alert Acknowledges a specific alert by id @@ -109,20 +123,22 @@ def sync( Returns: AlertResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AlertResponse | ErrorsList]: - """Acknowledges an alert + """ Acknowledges an alert Acknowledges a specific alert by id @@ -135,23 +151,27 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> AlertResponse | ErrorsList | None: - """Acknowledges an alert + """ Acknowledges an alert Acknowledges a specific alert by id @@ -164,11 +184,11 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alerts/attach_alert.py b/rootly_sdk/api/alerts/attach_alert.py index 3f0911e6..bc5408f3 100644 --- a/rootly_sdk/api/alerts/attach_alert.py +++ b/rootly_sdk/api/alerts/attach_alert.py @@ -1,48 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_list import AlertList from ...models.attach_alert import AttachAlert from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( incident_id: str, *, body: AttachAlert, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/alerts".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/alerts".format(incident_id=quote(str(incident_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) -> AlertList | ErrorsList | None: if response.status_code == 200: response_200 = AlertList.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: @@ -51,9 +64,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertList | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: AttachAlert, + ) -> Response[AlertList | ErrorsList]: - """Attach alerts to an incident + """ Attach alerts to an incident Attach alerts to an incident from provided data @@ -82,11 +94,13 @@ def sync_detailed( Returns: Response[AlertList | ErrorsList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -95,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, client: AuthenticatedClient, body: AttachAlert, + ) -> AlertList | ErrorsList | None: - """Attach alerts to an incident + """ Attach alerts to an incident Attach alerts to an incident from provided data @@ -116,22 +130,24 @@ def sync( Returns: AlertList | ErrorsList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: AttachAlert, + ) -> Response[AlertList | ErrorsList]: - """Attach alerts to an incident + """ Attach alerts to an incident Attach alerts to an incident from provided data @@ -145,25 +161,29 @@ async def asyncio_detailed( Returns: Response[AlertList | ErrorsList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: AttachAlert, + ) -> AlertList | ErrorsList | None: - """Attach alerts to an incident + """ Attach alerts to an incident Attach alerts to an incident from provided data @@ -177,12 +197,12 @@ async def asyncio( Returns: AlertList | ErrorsList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alerts/create_alert.py b/rootly_sdk/api/alerts/create_alert.py index e7ef6e59..1ccb281c 100644 --- a/rootly_sdk/api/alerts/create_alert.py +++ b/rootly_sdk/api/alerts/create_alert.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.new_alert import NewAlert -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewAlert, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alerts", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> AlertResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlert, + ) -> Response[AlertResponse | ErrorsList]: - """Creates an alert + """ Creates an alert Creates a new alert from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewAlert, + ) -> AlertResponse | ErrorsList | None: - """Creates an alert + """ Creates an alert Creates a new alert from provided data @@ -114,20 +131,22 @@ def sync( Returns: AlertResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlert, + ) -> Response[AlertResponse | ErrorsList]: - """Creates an alert + """ Creates an alert Creates a new alert from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewAlert, + ) -> AlertResponse | ErrorsList | None: - """Creates an alert + """ Creates an alert Creates a new alert from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alerts/escalate_alert.py b/rootly_sdk/api/alerts/escalate_alert.py new file mode 100644 index 00000000..5e6486a4 --- /dev/null +++ b/rootly_sdk/api/alerts/escalate_alert.py @@ -0,0 +1,225 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.alert_response import AlertResponse +from ...models.errors_list import ErrorsList +from ...models.escalate_alert import EscalateAlert +from ...types import UNSET, Unset +from typing import cast + + + +def _get_kwargs( + id: str, + *, + body: EscalateAlert | Unset = UNSET, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/alerts/{id}/escalate".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) -> AlertResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = AlertResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 400: + response_400 = ErrorsList.from_dict(response.json()) + + + + return response_400 + + 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[AlertResponse | 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: EscalateAlert | Unset = UNSET, + +) -> Response[AlertResponse | ErrorsList]: + """ Escalates an alert + + Escalates a specific alert to the next or specified level in its escalation policy + + Args: + id (str): + body (EscalateAlert | 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[AlertResponse | 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: EscalateAlert | Unset = UNSET, + +) -> AlertResponse | ErrorsList | None: + """ Escalates an alert + + Escalates a specific alert to the next or specified level in its escalation policy + + Args: + id (str): + body (EscalateAlert | 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: + AlertResponse | ErrorsList + """ + + + return sync_detailed( + id=id, +client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: EscalateAlert | Unset = UNSET, + +) -> Response[AlertResponse | ErrorsList]: + """ Escalates an alert + + Escalates a specific alert to the next or specified level in its escalation policy + + Args: + id (str): + body (EscalateAlert | 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[AlertResponse | 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: EscalateAlert | Unset = UNSET, + +) -> AlertResponse | ErrorsList | None: + """ Escalates an alert + + Escalates a specific alert to the next or specified level in its escalation policy + + Args: + id (str): + body (EscalateAlert | 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: + AlertResponse | ErrorsList + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alerts/get_alert.py b/rootly_sdk/api/alerts/get_alert.py index 20a1c7fd..11db3cd3 100644 --- a/rootly_sdk/api/alerts/get_alert.py +++ b/rootly_sdk/api/alerts/get_alert.py @@ -1,22 +1,31 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList +from ...models.get_alert_include import check_get_alert_include from ...models.get_alert_include import GetAlertInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetAlertInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,30 +35,34 @@ def _get_kwargs( params["include"] = json_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/alerts/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alerts/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AlertResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetAlertInclude | Unset = UNSET, + ) -> Response[AlertResponse | ErrorsList]: - """Retrieves an alert + """ Retrieves an alert Retrieves a specific alert by id @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetAlertInclude | Unset = UNSET, + ) -> AlertResponse | ErrorsList | None: - """Retrieves an alert + """ Retrieves an alert Retrieves a specific alert by id @@ -123,22 +137,24 @@ def sync( Returns: AlertResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetAlertInclude | Unset = UNSET, + ) -> Response[AlertResponse | ErrorsList]: - """Retrieves an alert + """ Retrieves an alert Retrieves a specific alert by id @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetAlertInclude | Unset = UNSET, + ) -> AlertResponse | ErrorsList | None: - """Retrieves an alert + """ Retrieves an alert Retrieves a specific alert by id @@ -184,12 +204,12 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/alerts/get_receipt.py b/rootly_sdk/api/alerts/get_receipt.py new file mode 100644 index 00000000..8f2b0be2 --- /dev/null +++ b/rootly_sdk/api/alerts/get_receipt.py @@ -0,0 +1,187 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.receipt import Receipt +from typing import cast + + + +def _get_kwargs( + id: str, + +) -> dict[str, Any]: + + + + + + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/alerts/receipts/{id}".format(id=quote(str(id), safe=""),), + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | Receipt | None: + if response.status_code == 200: + response_200 = Receipt.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 | Receipt]: + 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 | Receipt]: + """ Get a receipt + + Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) + failure reason and referenced resource. + + 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 | Receipt] + """ + + + 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, + +) -> Any | Receipt | None: + """ Get a receipt + + Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) + failure reason and referenced resource. + + 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: + Any | Receipt + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + +) -> Response[Any | Receipt]: + """ Get a receipt + + Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) + failure reason and referenced resource. + + 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 | Receipt] + """ + + + 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, + +) -> Any | Receipt | None: + """ Get a receipt + + Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) + failure reason and referenced resource. + + 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: + Any | Receipt + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/alerts/list_alerts.py b/rootly_sdk/api/alerts/list_alerts.py index 02d855d6..5f253564 100644 --- a/rootly_sdk/api/alerts/list_alerts.py +++ b/rootly_sdk/api/alerts/list_alerts.py @@ -1,13 +1,19 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_list import AlertList +from ...models.list_alerts_include import check_list_alerts_include from ...models.list_alerts_include import ListAlertsInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -31,10 +37,42 @@ def _get_kwargs( 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, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -80,27 +118,89 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[updated_at][gt]"] = filterupdated_atgt + + params["filter[updated_at][gte]"] = filterupdated_atgte + + params["filter[updated_at][lt]"] = filterupdated_atlt + + params["filter[updated_at][lte]"] = filterupdated_atlte + + params["filter[status][eq]"] = filterstatuseq + + params["filter[status][not_eq]"] = filterstatusnot_eq + + params["filter[status][in]"] = filterstatusin + + params["filter[status][not_in]"] = filterstatusnot_in + + params["filter[source][eq]"] = filtersourceeq + + params["filter[source][not_eq]"] = filtersourcenot_eq + + params["filter[source][in]"] = filtersourcein + + params["filter[source][not_in]"] = filtersourcenot_in + + params["filter[services][eq]"] = filterserviceseq + + params["filter[services][not_eq]"] = filterservicesnot_eq + + params["filter[services][in]"] = filterservicesin + + params["filter[services][not_in]"] = filterservicesnot_in + + params["filter[groups][eq]"] = filtergroupseq + + params["filter[groups][not_eq]"] = filtergroupsnot_eq + + params["filter[groups][in]"] = filtergroupsin + + params["filter[groups][not_in]"] = filtergroupsnot_in + + params["filter[environments][eq]"] = filterenvironmentseq + + params["filter[environments][not_eq]"] = filterenvironmentsnot_eq + + params["filter[environments][in]"] = filterenvironmentsin + + params["filter[environments][not_in]"] = filterenvironmentsnot_in + + params["filter[labels][eq]"] = filterlabelseq + + params["filter[labels][not_eq]"] = filterlabelsnot_eq + + params["filter[labels][in]"] = filterlabelsin + + params["filter[labels][not_in]"] = filterlabelsnot_in + params["page[after]"] = pageafter 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/alerts", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertList | None: if response.status_code == 200: response_200 = AlertList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -140,11 +240,40 @@ def sync_detailed( 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, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[AlertList]: - """List alerts + """ List alerts List alerts @@ -168,6 +297,34 @@ def sync_detailed( 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): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filtergroupseq (str | Unset): + filtergroupsnot_eq (str | Unset): + filtergroupsin (str | Unset): + filtergroupsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -178,31 +335,61 @@ def sync_detailed( Returns: Response[AlertList] - """ + """ + kwargs = _get_kwargs( include=include, - filterstatus=filterstatus, - filtersource=filtersource, - filterservices=filterservices, - filterenvironments=filterenvironments, - filtergroups=filtergroups, - filterlabels=filterlabels, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterended_atgt=filterended_atgt, - filterended_atgte=filterended_atgte, - filterended_atlt=filterended_atlt, - filterended_atlte=filterended_atlte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pageafter=pageafter, - pagenumber=pagenumber, - pagesize=pagesize, +filterstatus=filterstatus, +filtersource=filtersource, +filterservices=filterservices, +filterenvironments=filterenvironments, +filtergroups=filtergroups, +filterlabels=filterlabels, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterended_atgt=filterended_atgt, +filterended_atgte=filterended_atgte, +filterended_atlt=filterended_atlt, +filterended_atlte=filterended_atlte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterupdated_atgt=filterupdated_atgt, +filterupdated_atgte=filterupdated_atgte, +filterupdated_atlt=filterupdated_atlt, +filterupdated_atlte=filterupdated_atlte, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filtergroupseq=filtergroupseq, +filtergroupsnot_eq=filtergroupsnot_eq, +filtergroupsin=filtergroupsin, +filtergroupsnot_in=filtergroupsnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +pageafter=pageafter, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -211,7 +398,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -234,11 +420,40 @@ def sync( 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, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> AlertList | None: - """List alerts + """ List alerts List alerts @@ -262,6 +477,34 @@ def sync( 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): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filtergroupseq (str | Unset): + filtergroupsnot_eq (str | Unset): + filtergroupsin (str | Unset): + filtergroupsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -272,34 +515,63 @@ def sync( Returns: AlertList - """ + """ + return sync_detailed( client=client, - include=include, - filterstatus=filterstatus, - filtersource=filtersource, - filterservices=filterservices, - filterenvironments=filterenvironments, - filtergroups=filtergroups, - filterlabels=filterlabels, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterended_atgt=filterended_atgt, - filterended_atgte=filterended_atgte, - filterended_atlt=filterended_atlt, - filterended_atlte=filterended_atlte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pageafter=pageafter, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +filterstatus=filterstatus, +filtersource=filtersource, +filterservices=filterservices, +filterenvironments=filterenvironments, +filtergroups=filtergroups, +filterlabels=filterlabels, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterended_atgt=filterended_atgt, +filterended_atgte=filterended_atgte, +filterended_atlt=filterended_atlt, +filterended_atlte=filterended_atlte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterupdated_atgt=filterupdated_atgt, +filterupdated_atgte=filterupdated_atgte, +filterupdated_atlt=filterupdated_atlt, +filterupdated_atlte=filterupdated_atlte, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filtergroupseq=filtergroupseq, +filtergroupsnot_eq=filtergroupsnot_eq, +filtergroupsin=filtergroupsin, +filtergroupsnot_in=filtergroupsnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +pageafter=pageafter, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -323,11 +595,40 @@ async def asyncio_detailed( 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, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[AlertList]: - """List alerts + """ List alerts List alerts @@ -351,6 +652,34 @@ async def asyncio_detailed( 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): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filtergroupseq (str | Unset): + filtergroupsnot_eq (str | Unset): + filtergroupsin (str | Unset): + filtergroupsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -361,38 +690,69 @@ async def asyncio_detailed( Returns: Response[AlertList] - """ + """ + kwargs = _get_kwargs( include=include, - filterstatus=filterstatus, - filtersource=filtersource, - filterservices=filterservices, - filterenvironments=filterenvironments, - filtergroups=filtergroups, - filterlabels=filterlabels, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterended_atgt=filterended_atgt, - filterended_atgte=filterended_atgte, - filterended_atlt=filterended_atlt, - filterended_atlte=filterended_atlte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pageafter=pageafter, - pagenumber=pagenumber, - pagesize=pagesize, +filterstatus=filterstatus, +filtersource=filtersource, +filterservices=filterservices, +filterenvironments=filterenvironments, +filtergroups=filtergroups, +filterlabels=filterlabels, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterended_atgt=filterended_atgt, +filterended_atgte=filterended_atgte, +filterended_atlt=filterended_atlt, +filterended_atlte=filterended_atlte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterupdated_atgt=filterupdated_atgt, +filterupdated_atgte=filterupdated_atgte, +filterupdated_atlt=filterupdated_atlt, +filterupdated_atlte=filterupdated_atlte, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filtergroupseq=filtergroupseq, +filtergroupsnot_eq=filtergroupsnot_eq, +filtergroupsin=filtergroupsin, +filtergroupsnot_in=filtergroupsnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +pageafter=pageafter, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -415,11 +775,40 @@ async def asyncio( 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, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filtergroupseq: str | Unset = UNSET, + filtergroupsnot_eq: str | Unset = UNSET, + filtergroupsin: str | Unset = UNSET, + filtergroupsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> AlertList | None: - """List alerts + """ List alerts List alerts @@ -443,6 +832,34 @@ async def asyncio( 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): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filtergroupseq (str | Unset): + filtergroupsnot_eq (str | Unset): + filtergroupsin (str | Unset): + filtergroupsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -453,32 +870,60 @@ async def asyncio( Returns: AlertList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - filterstatus=filterstatus, - filtersource=filtersource, - filterservices=filterservices, - filterenvironments=filterenvironments, - filtergroups=filtergroups, - filterlabels=filterlabels, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterended_atgt=filterended_atgt, - filterended_atgte=filterended_atgte, - filterended_atlt=filterended_atlt, - filterended_atlte=filterended_atlte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pageafter=pageafter, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +filterstatus=filterstatus, +filtersource=filtersource, +filterservices=filterservices, +filterenvironments=filterenvironments, +filtergroups=filtergroups, +filterlabels=filterlabels, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterended_atgt=filterended_atgt, +filterended_atgte=filterended_atgte, +filterended_atlt=filterended_atlt, +filterended_atlte=filterended_atlte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterupdated_atgt=filterupdated_atgt, +filterupdated_atgte=filterupdated_atgte, +filterupdated_atlt=filterupdated_atlt, +filterupdated_atlte=filterupdated_atlte, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filtergroupseq=filtergroupseq, +filtergroupsnot_eq=filtergroupsnot_eq, +filtergroupsin=filtergroupsin, +filtergroupsnot_in=filtergroupsnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +pageafter=pageafter, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/alerts/list_incident_alerts.py b/rootly_sdk/api/alerts/list_incident_alerts.py index 4358b186..964e7b7f 100644 --- a/rootly_sdk/api/alerts/list_incident_alerts.py +++ b/rootly_sdk/api/alerts/list_incident_alerts.py @@ -1,21 +1,30 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_list import AlertList +from ...models.list_incident_alerts_include import check_list_incident_alerts_include from ...models.list_incident_alerts_include import ListIncidentAlertsInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( incident_id: str, *, include: ListIncidentAlertsInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -25,23 +34,27 @@ def _get_kwargs( params["include"] = json_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/incidents/{incident_id}/alerts".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/alerts".format(incident_id=quote(str(incident_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertList | None: if response.status_code == 200: response_200 = AlertList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -64,8 +77,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: ListIncidentAlertsInclude | Unset = UNSET, + ) -> Response[AlertList]: - """List Incident alerts + """ List Incident alerts List incident alerts @@ -79,11 +93,13 @@ def sync_detailed( Returns: Response[AlertList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -92,14 +108,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, client: AuthenticatedClient, include: ListIncidentAlertsInclude | Unset = UNSET, + ) -> AlertList | None: - """List Incident alerts + """ List Incident alerts List incident alerts @@ -113,22 +129,24 @@ def sync( Returns: AlertList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, include: ListIncidentAlertsInclude | Unset = UNSET, + ) -> Response[AlertList]: - """List Incident alerts + """ List Incident alerts List incident alerts @@ -142,25 +160,29 @@ async def asyncio_detailed( Returns: Response[AlertList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, client: AuthenticatedClient, include: ListIncidentAlertsInclude | Unset = UNSET, + ) -> AlertList | None: - """List Incident alerts + """ List Incident alerts List incident alerts @@ -174,12 +196,12 @@ async def asyncio( Returns: AlertList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/alerts/resolve_alert.py b/rootly_sdk/api/alerts/resolve_alert.py index 66ec0165..3d6d7255 100644 --- a/rootly_sdk/api/alerts/resolve_alert.py +++ b/rootly_sdk/api/alerts/resolve_alert.py @@ -1,51 +1,64 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.resolve_alert import ResolveAlert -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, body: ResolveAlert | Unset = UNSET, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/alerts/{id}/resolve".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alerts/{id}/resolve".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 -) -> AlertResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.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: @@ -54,9 +67,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +81,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: ResolveAlert | Unset = UNSET, + ) -> Response[AlertResponse | ErrorsList]: - """Resolves an alert + """ Resolves an alert Resolves a specific alert by id @@ -85,11 +97,13 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +112,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: ResolveAlert | Unset = UNSET, + ) -> AlertResponse | ErrorsList | None: - """Resolves an alert + """ Resolves an alert Resolves a specific alert by id @@ -119,22 +133,24 @@ def sync( Returns: AlertResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: ResolveAlert | Unset = UNSET, + ) -> Response[AlertResponse | ErrorsList]: - """Resolves an alert + """ Resolves an alert Resolves a specific alert by id @@ -148,25 +164,29 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: ResolveAlert | Unset = UNSET, + ) -> AlertResponse | ErrorsList | None: - """Resolves an alert + """ Resolves an alert Resolves a specific alert by id @@ -180,12 +200,12 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alerts/snooze_alert.py b/rootly_sdk/api/alerts/snooze_alert.py new file mode 100644 index 00000000..0ce44220 --- /dev/null +++ b/rootly_sdk/api/alerts/snooze_alert.py @@ -0,0 +1,222 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.alert_response import AlertResponse +from ...models.errors_list import ErrorsList +from ...models.snooze_alert import SnoozeAlert +from typing import cast + + + +def _get_kwargs( + id: str, + *, + body: SnoozeAlert, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/alerts/{id}/snooze".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) -> AlertResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = AlertResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 400: + response_400 = ErrorsList.from_dict(response.json()) + + + + return response_400 + + 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[AlertResponse | 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: SnoozeAlert, + +) -> Response[AlertResponse | ErrorsList]: + """ Snoozes an alert + + Snoozes a specific alert by id, extending the acknowledgment timeout + + Args: + id (str): + body (SnoozeAlert): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AlertResponse | 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: SnoozeAlert, + +) -> AlertResponse | ErrorsList | None: + """ Snoozes an alert + + Snoozes a specific alert by id, extending the acknowledgment timeout + + Args: + id (str): + body (SnoozeAlert): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AlertResponse | ErrorsList + """ + + + return sync_detailed( + id=id, +client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: SnoozeAlert, + +) -> Response[AlertResponse | ErrorsList]: + """ Snoozes an alert + + Snoozes a specific alert by id, extending the acknowledgment timeout + + Args: + id (str): + body (SnoozeAlert): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[AlertResponse | 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: SnoozeAlert, + +) -> AlertResponse | ErrorsList | None: + """ Snoozes an alert + + Snoozes a specific alert by id, extending the acknowledgment timeout + + Args: + id (str): + body (SnoozeAlert): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + AlertResponse | ErrorsList + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/alerts/update_alert.py b/rootly_sdk/api/alerts/update_alert.py index 5a60b818..b4ade548 100644 --- a/rootly_sdk/api/alerts/update_alert.py +++ b/rootly_sdk/api/alerts/update_alert.py @@ -1,51 +1,64 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.update_alert import UpdateAlert -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, body: UpdateAlert | Unset = UNSET, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/alerts/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/alerts/{id}".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 -) -> AlertResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -54,9 +67,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AlertResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +81,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlert | Unset = UNSET, + ) -> Response[AlertResponse | ErrorsList]: - """Update alert + """ Update alert Updates an alert @@ -85,11 +97,13 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +112,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlert | Unset = UNSET, + ) -> AlertResponse | ErrorsList | None: - """Update alert + """ Update alert Updates an alert @@ -119,22 +133,24 @@ def sync( Returns: AlertResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlert | Unset = UNSET, + ) -> Response[AlertResponse | ErrorsList]: - """Update alert + """ Update alert Updates an alert @@ -148,25 +164,29 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlert | Unset = UNSET, + ) -> AlertResponse | ErrorsList | None: - """Update alert + """ Update alert Updates an alert @@ -180,12 +200,12 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/api_keys/__init__.py b/rootly_sdk/api/api_keys/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/api_keys/__init__.py +++ b/rootly_sdk/api/api_keys/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/api_keys/create_api_key.py b/rootly_sdk/api/api_keys/create_api_key.py index 6573821d..4556ab3e 100644 --- a/rootly_sdk/api/api_keys/create_api_key.py +++ b/rootly_sdk/api/api_keys/create_api_key.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from typing import cast + def _get_kwargs( *, body: NewApiKey, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/api_keys", @@ -24,28 +34,34 @@ def _get_kwargs( _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: + +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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ApiKeyWithTokenResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyWithTokenResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewApiKey, + ) -> Response[ApiKeyWithTokenResponse | ErrorsList]: - """Creates an API key + """ 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. @@ -94,10 +109,12 @@ def sync_detailed( Returns: Response[ApiKeyWithTokenResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -106,13 +123,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewApiKey, + ) -> ApiKeyWithTokenResponse | ErrorsList | None: - """Creates an API key + """ 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. @@ -136,20 +153,22 @@ def sync( Returns: ApiKeyWithTokenResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewApiKey, + ) -> Response[ApiKeyWithTokenResponse | ErrorsList]: - """Creates an API key + """ 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. @@ -173,23 +192,27 @@ async def asyncio_detailed( Returns: Response[ApiKeyWithTokenResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 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. @@ -213,11 +236,11 @@ async def asyncio( Returns: ApiKeyWithTokenResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + 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 index 948015a0..4e9ff9fc 100644 --- a/rootly_sdk/api/api_keys/delete_api_key.py +++ b/rootly_sdk/api/api_keys/delete_api_key.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.api_key_response import ApiKeyResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + 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=""), - ), + "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: + +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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ApiKeyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: UUID, *, client: AuthenticatedClient, + ) -> Response[ApiKeyResponse | ErrorsList]: - """Revoke an API key + """ 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. @@ -78,10 +88,12 @@ def sync_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -90,13 +102,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: UUID, *, client: AuthenticatedClient, + ) -> ApiKeyResponse | ErrorsList | None: - """Revoke an API key + """ 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. @@ -113,20 +125,22 @@ def sync( Returns: ApiKeyResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: UUID, *, client: AuthenticatedClient, + ) -> Response[ApiKeyResponse | ErrorsList]: - """Revoke an API key + """ 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. @@ -143,23 +157,27 @@ async def asyncio_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 Revoke an API key. The key is immediately invalidated and can no longer be used for authentication. This action cannot be undone. @@ -176,11 +194,11 @@ async def asyncio( Returns: ApiKeyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + 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 index 6ba239a8..56e8e996 100644 --- a/rootly_sdk/api/api_keys/get_api_key.py +++ b/rootly_sdk/api/api_keys/get_api_key.py @@ -1,51 +1,63 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.api_key_response import ApiKeyResponse from ...models.errors_list import ErrorsList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + 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=""), - ), + "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: + +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: @@ -54,9 +66,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ApiKeyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +80,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, + ) -> Response[ApiKeyResponse | ErrorsList]: - """Retrieves an API key + """ 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. @@ -86,11 +97,13 @@ def sync_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -99,14 +112,14 @@ def sync_detailed( 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 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. @@ -121,22 +134,24 @@ def sync( Returns: ApiKeyResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +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 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. @@ -151,25 +166,29 @@ async def asyncio_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 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. @@ -184,12 +203,12 @@ async def asyncio( Returns: ApiKeyResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + 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 index 6f057d91..23b27274 100644 --- a/rootly_sdk/api/api_keys/list_api_keys.py +++ b/rootly_sdk/api/api_keys/list_api_keys.py @@ -1,13 +1,18 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.api_key_list import ApiKeyList from ...models.errors_list import ErrorsList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -36,7 +41,11 @@ def _get_kwargs( filterlast_used_atlt: str | Unset = UNSET, filterlast_used_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -88,28 +97,34 @@ def _get_kwargs( 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: + +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: @@ -118,9 +133,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ApiKeyList | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -156,8 +169,9 @@ def sync_detailed( 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 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. @@ -209,33 +223,35 @@ def sync_detailed( 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, +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( @@ -244,7 +260,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -272,8 +287,9 @@ def sync( 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 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. @@ -325,36 +341,37 @@ def sync( 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 +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( *, @@ -383,8 +400,9 @@ async def asyncio_detailed( 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 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. @@ -436,40 +454,43 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -497,8 +518,9 @@ async def asyncio( 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 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. @@ -550,34 +572,34 @@ async def asyncio( 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 + """ + + + 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 index 9bdb2773..cdf03e64 100644 --- a/rootly_sdk/api/api_keys/rotate_api_key.py +++ b/rootly_sdk/api/api_keys/rotate_api_key.py @@ -1,51 +1,64 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from ...types import UNSET, Unset +from typing import cast + 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=""), - ), + "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: + +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: @@ -54,9 +67,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ApiKeyWithTokenResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyWithTokenResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +81,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: RotateApiKey | Unset = UNSET, + ) -> Response[ApiKeyWithTokenResponse | ErrorsList]: - """Rotate an API key + """ 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. @@ -104,11 +116,13 @@ def sync_detailed( Returns: Response[ApiKeyWithTokenResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -117,14 +131,14 @@ def sync_detailed( 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 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. @@ -157,22 +171,24 @@ def sync( Returns: ApiKeyWithTokenResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +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 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. @@ -205,25 +221,29 @@ async def asyncio_detailed( Returns: Response[ApiKeyWithTokenResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 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. @@ -256,12 +276,12 @@ async def asyncio( Returns: ApiKeyWithTokenResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + 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 index 94cebad5..e9cdd493 100644 --- a/rootly_sdk/api/api_keys/update_api_key.py +++ b/rootly_sdk/api/api_keys/update_api_key.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.api_key_response import ApiKeyResponse from ...models.errors_list import ErrorsList from ...models.update_api_key import UpdateApiKey -from ...types import Response +from typing import cast +from uuid import UUID + 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=""), - ), + "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: + +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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ApiKeyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateApiKey, + ) -> Response[ApiKeyResponse | ErrorsList]: - """Update an API key + """ Update an API key Update an API key's mutable attributes: `name`, `description`, and `expires_at`. @@ -91,11 +101,13 @@ def sync_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -104,14 +116,14 @@ def sync_detailed( 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 Update an API key's mutable attributes: `name`, `description`, and `expires_at`. @@ -131,22 +143,24 @@ def sync( Returns: ApiKeyResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +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 Update an API key's mutable attributes: `name`, `description`, and `expires_at`. @@ -166,25 +180,29 @@ async def asyncio_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 Update an API key's mutable attributes: `name`, `description`, and `expires_at`. @@ -204,12 +222,12 @@ async def asyncio( Returns: ApiKeyResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/audits/__init__.py b/rootly_sdk/api/audits/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/audits/__init__.py +++ b/rootly_sdk/api/audits/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/audits/list_audits.py b/rootly_sdk/api/audits/list_audits.py index d4d6bab5..99c0eb60 100644 --- a/rootly_sdk/api/audits/list_audits.py +++ b/rootly_sdk/api/audits/list_audits.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.audits_list import AuditsList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,8 +27,28 @@ def _get_kwargs( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -49,23 +74,61 @@ def _get_kwargs( params["filter[item_type]"] = filteritem_type + params["filter[user_id][eq]"] = filteruser_ideq + + params["filter[user_id][not_eq]"] = filteruser_idnot_eq + + params["filter[user_id][in]"] = filteruser_idin + + params["filter[user_id][not_in]"] = filteruser_idnot_in + + params["filter[api_key_id][eq]"] = filterapi_key_ideq + + params["filter[api_key_id][not_eq]"] = filterapi_key_idnot_eq + + params["filter[api_key_id][in]"] = filterapi_key_idin + + params["filter[api_key_id][not_in]"] = filterapi_key_idnot_in + + params["filter[source][eq]"] = filtersourceeq + + params["filter[source][not_eq]"] = filtersourcenot_eq + + params["filter[source][in]"] = filtersourcein + + params["filter[source][not_in]"] = filtersourcenot_in + + params["filter[item_type][eq]"] = filteritem_typeeq + + params["filter[item_type][not_eq]"] = filteritem_typenot_eq + + params["filter[item_type][in]"] = filteritem_typein + + params["filter[item_type][not_in]"] = filteritem_typenot_in + 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/audits", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuditsList | None: if response.status_code == 200: response_200 = AuditsList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -97,9 +160,26 @@ def sync_detailed( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AuditsList]: - """List audits + """ List audits List audits @@ -115,6 +195,22 @@ def sync_detailed( filterapi_key_id (str | Unset): filtersource (str | Unset): filteritem_type (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterapi_key_ideq (str | Unset): + filterapi_key_idnot_eq (str | Unset): + filterapi_key_idin (str | Unset): + filterapi_key_idnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filteritem_typeeq (str | Unset): + filteritem_typenot_eq (str | Unset): + filteritem_typein (str | Unset): + filteritem_typenot_in (str | Unset): sort (str | Unset): Raises: @@ -123,21 +219,39 @@ def sync_detailed( Returns: Response[AuditsList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - filteruser_id=filteruser_id, - filterapi_key_id=filterapi_key_id, - filtersource=filtersource, - filteritem_type=filteritem_type, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filteruser_id=filteruser_id, +filterapi_key_id=filterapi_key_id, +filtersource=filtersource, +filteritem_type=filteritem_type, +filteruser_ideq=filteruser_ideq, +filteruser_idnot_eq=filteruser_idnot_eq, +filteruser_idin=filteruser_idin, +filteruser_idnot_in=filteruser_idnot_in, +filterapi_key_ideq=filterapi_key_ideq, +filterapi_key_idnot_eq=filterapi_key_idnot_eq, +filterapi_key_idin=filterapi_key_idin, +filterapi_key_idnot_in=filterapi_key_idnot_in, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filteritem_typeeq=filteritem_typeeq, +filteritem_typenot_eq=filteritem_typenot_eq, +filteritem_typein=filteritem_typein, +filteritem_typenot_in=filteritem_typenot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -146,7 +260,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -161,9 +274,26 @@ def sync( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AuditsList | None: - """List audits + """ List audits List audits @@ -179,6 +309,22 @@ def sync( filterapi_key_id (str | Unset): filtersource (str | Unset): filteritem_type (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterapi_key_ideq (str | Unset): + filterapi_key_idnot_eq (str | Unset): + filterapi_key_idin (str | Unset): + filterapi_key_idnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filteritem_typeeq (str | Unset): + filteritem_typenot_eq (str | Unset): + filteritem_typein (str | Unset): + filteritem_typenot_in (str | Unset): sort (str | Unset): Raises: @@ -187,24 +333,41 @@ def sync( Returns: AuditsList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - filteruser_id=filteruser_id, - filterapi_key_id=filterapi_key_id, - filtersource=filtersource, - filteritem_type=filteritem_type, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filteruser_id=filteruser_id, +filterapi_key_id=filterapi_key_id, +filtersource=filtersource, +filteritem_type=filteritem_type, +filteruser_ideq=filteruser_ideq, +filteruser_idnot_eq=filteruser_idnot_eq, +filteruser_idin=filteruser_idin, +filteruser_idnot_in=filteruser_idnot_in, +filterapi_key_ideq=filterapi_key_ideq, +filterapi_key_idnot_eq=filterapi_key_idnot_eq, +filterapi_key_idin=filterapi_key_idin, +filterapi_key_idnot_in=filterapi_key_idnot_in, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filteritem_typeeq=filteritem_typeeq, +filteritem_typenot_eq=filteritem_typenot_eq, +filteritem_typein=filteritem_typein, +filteritem_typenot_in=filteritem_typenot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -220,9 +383,26 @@ async def asyncio_detailed( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AuditsList]: - """List audits + """ List audits List audits @@ -238,6 +418,22 @@ async def asyncio_detailed( filterapi_key_id (str | Unset): filtersource (str | Unset): filteritem_type (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterapi_key_ideq (str | Unset): + filterapi_key_idnot_eq (str | Unset): + filterapi_key_idin (str | Unset): + filterapi_key_idnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filteritem_typeeq (str | Unset): + filteritem_typenot_eq (str | Unset): + filteritem_typein (str | Unset): + filteritem_typenot_in (str | Unset): sort (str | Unset): Raises: @@ -246,28 +442,47 @@ async def asyncio_detailed( Returns: Response[AuditsList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - filteruser_id=filteruser_id, - filterapi_key_id=filterapi_key_id, - filtersource=filtersource, - filteritem_type=filteritem_type, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filteruser_id=filteruser_id, +filterapi_key_id=filterapi_key_id, +filtersource=filtersource, +filteritem_type=filteritem_type, +filteruser_ideq=filteruser_ideq, +filteruser_idnot_eq=filteruser_idnot_eq, +filteruser_idin=filteruser_idin, +filteruser_idnot_in=filteruser_idnot_in, +filterapi_key_ideq=filterapi_key_ideq, +filterapi_key_idnot_eq=filterapi_key_idnot_eq, +filterapi_key_idin=filterapi_key_idin, +filterapi_key_idnot_in=filterapi_key_idnot_in, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filteritem_typeeq=filteritem_typeeq, +filteritem_typenot_eq=filteritem_typenot_eq, +filteritem_typein=filteritem_typein, +filteritem_typenot_in=filteritem_typenot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -282,9 +497,26 @@ async def asyncio( filterapi_key_id: str | Unset = UNSET, filtersource: str | Unset = UNSET, filteritem_type: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterapi_key_ideq: str | Unset = UNSET, + filterapi_key_idnot_eq: str | Unset = UNSET, + filterapi_key_idin: str | Unset = UNSET, + filterapi_key_idnot_in: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filteritem_typeeq: str | Unset = UNSET, + filteritem_typenot_eq: str | Unset = UNSET, + filteritem_typein: str | Unset = UNSET, + filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AuditsList | None: - """List audits + """ List audits List audits @@ -300,6 +532,22 @@ async def asyncio( filterapi_key_id (str | Unset): filtersource (str | Unset): filteritem_type (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterapi_key_ideq (str | Unset): + filterapi_key_idnot_eq (str | Unset): + filterapi_key_idin (str | Unset): + filterapi_key_idnot_in (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filteritem_typeeq (str | Unset): + filteritem_typenot_eq (str | Unset): + filteritem_typein (str | Unset): + filteritem_typenot_in (str | Unset): sort (str | Unset): Raises: @@ -308,22 +556,38 @@ async def asyncio( Returns: AuditsList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - filteruser_id=filteruser_id, - filterapi_key_id=filterapi_key_id, - filtersource=filtersource, - filteritem_type=filteritem_type, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filteruser_id=filteruser_id, +filterapi_key_id=filterapi_key_id, +filtersource=filtersource, +filteritem_type=filteritem_type, +filteruser_ideq=filteruser_ideq, +filteruser_idnot_eq=filteruser_idnot_eq, +filteruser_idin=filteruser_idin, +filteruser_idnot_in=filteruser_idnot_in, +filterapi_key_ideq=filterapi_key_ideq, +filterapi_key_idnot_eq=filterapi_key_idnot_eq, +filterapi_key_idin=filterapi_key_idin, +filterapi_key_idnot_in=filterapi_key_idnot_in, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filteritem_typeeq=filteritem_typeeq, +filteritem_typenot_eq=filteritem_typenot_eq, +filteritem_typein=filteritem_typein, +filteritem_typenot_in=filteritem_typenot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/authorizations/__init__.py b/rootly_sdk/api/authorizations/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/authorizations/__init__.py +++ b/rootly_sdk/api/authorizations/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/authorizations/create_authorization.py b/rootly_sdk/api/authorizations/create_authorization.py index 2d0bfee5..4e88a6ac 100644 --- a/rootly_sdk/api/authorizations/create_authorization.py +++ b/rootly_sdk/api/authorizations/create_authorization.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.authorization_response import AuthorizationResponse from ...models.errors_list import ErrorsList from ...models.new_authorization import NewAuthorization -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewAuthorization, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/authorizations", @@ -24,23 +34,27 @@ def _get_kwargs( _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 -) -> AuthorizationResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuthorizationResponse | ErrorsList | None: if response.status_code == 201: response_201 = AuthorizationResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -49,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AuthorizationResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AuthorizationResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +76,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAuthorization, + ) -> Response[AuthorizationResponse | ErrorsList]: - """Creates an authorization + """ Creates an authorization Creates a new authorization from provided data @@ -78,10 +91,12 @@ def sync_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -90,13 +105,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewAuthorization, + ) -> AuthorizationResponse | ErrorsList | None: - """Creates an authorization + """ Creates an authorization Creates a new authorization from provided data @@ -109,20 +124,22 @@ def sync( Returns: AuthorizationResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAuthorization, + ) -> Response[AuthorizationResponse | ErrorsList]: - """Creates an authorization + """ Creates an authorization Creates a new authorization from provided data @@ -135,23 +152,27 @@ async def asyncio_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewAuthorization, + ) -> AuthorizationResponse | ErrorsList | None: - """Creates an authorization + """ Creates an authorization Creates a new authorization from provided data @@ -164,11 +185,11 @@ async def asyncio( Returns: AuthorizationResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/authorizations/delete_authorization.py b/rootly_sdk/api/authorizations/delete_authorization.py index 9fed121b..84f4e538 100644 --- a/rootly_sdk/api/authorizations/delete_authorization.py +++ b/rootly_sdk/api/authorizations/delete_authorization.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.authorization_response import AuthorizationResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/authorizations/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/authorizations/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AuthorizationResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuthorizationResponse | ErrorsList | None: if response.status_code == 200: response_200 = AuthorizationResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AuthorizationResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AuthorizationResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AuthorizationResponse | ErrorsList]: - """Delete an authorization + """ Delete an authorization Delete a specific authorization by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> AuthorizationResponse | ErrorsList | None: - """Delete an authorization + """ Delete an authorization Delete a specific authorization by id @@ -104,20 +116,22 @@ def sync( Returns: AuthorizationResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AuthorizationResponse | ErrorsList]: - """Delete an authorization + """ Delete an authorization Delete a specific authorization by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> AuthorizationResponse | ErrorsList | None: - """Delete an authorization + """ Delete an authorization Delete a specific authorization by id @@ -159,11 +177,11 @@ async def asyncio( Returns: AuthorizationResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/authorizations/get_authorization.py b/rootly_sdk/api/authorizations/get_authorization.py index c58b0704..9e148f83 100644 --- a/rootly_sdk/api/authorizations/get_authorization.py +++ b/rootly_sdk/api/authorizations/get_authorization.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.authorization_response import AuthorizationResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/authorizations/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/authorizations/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> AuthorizationResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuthorizationResponse | ErrorsList | None: if response.status_code == 200: response_200 = AuthorizationResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AuthorizationResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AuthorizationResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AuthorizationResponse | ErrorsList]: - """Retrieves an authorization + """ Retrieves an authorization Retrieves a specific authorization by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> AuthorizationResponse | ErrorsList | None: - """Retrieves an authorization + """ Retrieves an authorization Retrieves a specific authorization by id @@ -104,20 +116,22 @@ def sync( Returns: AuthorizationResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[AuthorizationResponse | ErrorsList]: - """Retrieves an authorization + """ Retrieves an authorization Retrieves a specific authorization by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> AuthorizationResponse | ErrorsList | None: - """Retrieves an authorization + """ Retrieves an authorization Retrieves a specific authorization by id @@ -159,11 +177,11 @@ async def asyncio( Returns: AuthorizationResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/authorizations/list_authorizations.py b/rootly_sdk/api/authorizations/list_authorizations.py index 46d7343d..74b7c03e 100644 --- a/rootly_sdk/api/authorizations/list_authorizations.py +++ b/rootly_sdk/api/authorizations/list_authorizations.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.authorization_list import AuthorizationList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -23,7 +28,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -51,21 +60,27 @@ def _get_kwargs( 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/authorizations", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuthorizationList | None: if response.status_code == 200: response_200 = AuthorizationList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -98,8 +113,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AuthorizationList]: - """List authorizations + """ List authorizations List authorizations @@ -123,21 +139,23 @@ def sync_detailed( Returns: Response[AuthorizationList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterauthorizable_id=filterauthorizable_id, - filterauthorizable_type=filterauthorizable_type, - filtergrantee_id=filtergrantee_id, - filtergrantee_type=filtergrantee_type, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterauthorizable_id=filterauthorizable_id, +filterauthorizable_type=filterauthorizable_type, +filtergrantee_id=filtergrantee_id, +filtergrantee_type=filtergrantee_type, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -146,7 +164,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -162,8 +179,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AuthorizationList | None: - """List authorizations + """ List authorizations List authorizations @@ -187,24 +205,25 @@ def sync( Returns: AuthorizationList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterauthorizable_id=filterauthorizable_id, - filterauthorizable_type=filterauthorizable_type, - filtergrantee_id=filtergrantee_id, - filtergrantee_type=filtergrantee_type, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterauthorizable_id=filterauthorizable_id, +filterauthorizable_type=filterauthorizable_type, +filtergrantee_id=filtergrantee_id, +filtergrantee_type=filtergrantee_type, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -221,8 +240,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[AuthorizationList]: - """List authorizations + """ List authorizations List authorizations @@ -246,28 +266,31 @@ async def asyncio_detailed( Returns: Response[AuthorizationList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterauthorizable_id=filterauthorizable_id, - filterauthorizable_type=filterauthorizable_type, - filtergrantee_id=filtergrantee_id, - filtergrantee_type=filtergrantee_type, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterauthorizable_id=filterauthorizable_id, +filterauthorizable_type=filterauthorizable_type, +filtergrantee_id=filtergrantee_id, +filtergrantee_type=filtergrantee_type, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -283,8 +306,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> AuthorizationList | None: - """List authorizations + """ List authorizations List authorizations @@ -308,22 +332,22 @@ async def asyncio( Returns: AuthorizationList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterauthorizable_id=filterauthorizable_id, - filterauthorizable_type=filterauthorizable_type, - filtergrantee_id=filtergrantee_id, - filtergrantee_type=filtergrantee_type, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterauthorizable_id=filterauthorizable_id, +filterauthorizable_type=filterauthorizable_type, +filtergrantee_id=filtergrantee_id, +filtergrantee_type=filtergrantee_type, +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/authorizations/update_authorization.py b/rootly_sdk/api/authorizations/update_authorization.py index 958e25ad..1fa2af64 100644 --- a/rootly_sdk/api/authorizations/update_authorization.py +++ b/rootly_sdk/api/authorizations/update_authorization.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.authorization_response import AuthorizationResponse from ...models.errors_list import ErrorsList from ...models.update_authorization import UpdateAuthorization -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateAuthorization, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/authorizations/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/authorizations/{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 -) -> AuthorizationResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuthorizationResponse | ErrorsList | None: if response.status_code == 200: response_200 = AuthorizationResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[AuthorizationResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AuthorizationResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAuthorization, + ) -> Response[AuthorizationResponse | ErrorsList]: - """Update an authorization + """ Update an authorization Update a specific authorization by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateAuthorization, + ) -> AuthorizationResponse | ErrorsList | None: - """Update an authorization + """ Update an authorization Update a specific authorization by id @@ -118,22 +130,24 @@ def sync( Returns: AuthorizationResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAuthorization, + ) -> Response[AuthorizationResponse | ErrorsList]: - """Update an authorization + """ Update an authorization Update a specific authorization by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAuthorization, + ) -> AuthorizationResponse | ErrorsList | None: - """Update an authorization + """ Update an authorization Update a specific authorization by id @@ -179,12 +197,12 @@ async def asyncio( Returns: AuthorizationResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/catalog_checklist_templates/__init__.py b/rootly_sdk/api/catalog_checklist_templates/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/catalog_checklist_templates/__init__.py +++ b/rootly_sdk/api/catalog_checklist_templates/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" 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 index a0c9a8cf..8fe6dcbd 100644 --- a/rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from typing import cast + def _get_kwargs( *, body: NewCatalogChecklistTemplate, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/catalog_checklist_templates", @@ -24,28 +34,34 @@ def _get_kwargs( _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: + +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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogChecklistTemplate, + ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """Creates a catalog checklist template + """ Creates a catalog checklist template Creates a new catalog checklist template @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCatalogChecklistTemplate, + ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """Creates a catalog checklist template + """ Creates a catalog checklist template Creates a new catalog checklist template @@ -114,20 +131,22 @@ def sync( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogChecklistTemplate, + ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """Creates a catalog checklist template + """ Creates a catalog checklist template Creates a new catalog checklist template @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 catalog checklist template Creates a new catalog checklist template @@ -169,11 +192,11 @@ async def asyncio( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + 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 index e96022f3..9451bd5a 100644 --- a/rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + 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=""), - ), + "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: + +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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """Delete a catalog checklist template + """ Delete a catalog checklist template Delete a specific catalog checklist template by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """Delete a catalog checklist template + """ Delete a catalog checklist template Delete a specific catalog checklist template by id @@ -105,20 +117,22 @@ def sync( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """Delete a catalog checklist template + """ Delete a catalog checklist template Delete a specific catalog checklist template by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 catalog checklist template Delete a specific catalog checklist template by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + 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 index baaac4c8..f828e28b 100644 --- a/rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + 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=""), - ), + "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: + +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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """Retrieves a catalog checklist template + """ Retrieves a catalog checklist template Retrieves a specific catalog checklist template by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """Retrieves a catalog checklist template + """ Retrieves a catalog checklist template Retrieves a specific catalog checklist template by id @@ -105,20 +117,22 @@ def sync( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """Retrieves a catalog checklist template + """ Retrieves a catalog checklist template Retrieves a specific catalog checklist template by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 catalog checklist template Retrieves a specific catalog checklist template by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + 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 index 4b04ef57..c98a1a77 100644 --- a/rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py +++ b/rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py @@ -1,18 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from ...models.list_catalog_checklist_templates_include import check_list_catalog_checklist_templates_include +from ...models.list_catalog_checklist_templates_include import ListCatalogChecklistTemplatesInclude +from ...models.list_catalog_checklist_templates_sort import check_list_catalog_checklist_templates_sort +from ...models.list_catalog_checklist_templates_sort import ListCatalogChecklistTemplatesSort +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -29,7 +32,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -65,23 +72,27 @@ def _get_kwargs( 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: + +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: @@ -90,9 +101,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogChecklistTemplateList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -116,8 +125,9 @@ def sync_detailed( 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 List catalog checklist templates @@ -141,21 +151,23 @@ def sync_detailed( 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, +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( @@ -164,7 +176,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -180,8 +191,9 @@ def sync( 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 List catalog checklist templates @@ -205,24 +217,25 @@ def sync( 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 +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( *, @@ -239,8 +252,9 @@ async def asyncio_detailed( 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 List catalog checklist templates @@ -264,28 +278,31 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -301,8 +318,9 @@ async def asyncio( 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 List catalog checklist templates @@ -326,22 +344,22 @@ async def asyncio( 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 + """ + + + 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 index 03363ecf..731ccd60 100644 --- a/rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py @@ -1,30 +1,39 @@ 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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + 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=""), - ), + "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) @@ -33,6 +42,8 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) + + return response_404 if client.raise_on_unexpected_status: @@ -54,8 +65,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Trigger an audit for a catalog checklist template + """ Trigger an audit for a catalog checklist template Triggers an audit for all applicable entities of the checklist template @@ -68,10 +80,12 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -80,13 +94,13 @@ def sync_detailed( 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 + """ Trigger an audit for a catalog checklist template Triggers an audit for all applicable entities of the checklist template @@ -99,20 +113,22 @@ def sync( Returns: Any | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Trigger an audit for a catalog checklist template + """ Trigger an audit for a catalog checklist template Triggers an audit for all applicable entities of the checklist template @@ -125,23 +141,27 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 + """ Trigger an audit for a catalog checklist template Triggers an audit for all applicable entities of the checklist template @@ -154,11 +174,11 @@ async def asyncio( Returns: Any | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py b/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py index 180d4b3c..f153a6c6 100644 --- a/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse from ...models.errors_list import ErrorsList from ...models.update_catalog_checklist_template import UpdateCatalogChecklistTemplate -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateCatalogChecklistTemplate, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/catalog_checklist_templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalog_checklist_templates/{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 -) -> CatalogChecklistTemplateResponse | ErrorsList | None: + +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 == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalogChecklistTemplate, + ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """Update a catalog checklist template + """ Update a catalog checklist template Update a specific catalog checklist template by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogChecklistTemplate, + ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """Update a catalog checklist template + """ Update a catalog checklist template Update a specific catalog checklist template by id @@ -119,22 +131,24 @@ def sync( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogChecklistTemplate, + ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """Update a catalog checklist template + """ Update a catalog checklist template Update a specific catalog checklist template by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogChecklistTemplate, + ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """Update a catalog checklist template + """ Update a catalog checklist template Update a specific catalog checklist template by id @@ -180,12 +198,12 @@ async def asyncio( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/catalog_entities/__init__.py b/rootly_sdk/api/catalog_entities/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/catalog_entities/__init__.py +++ b/rootly_sdk/api/catalog_entities/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py b/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py new file mode 100644 index 00000000..efeef068 --- /dev/null +++ b/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py @@ -0,0 +1,250 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_destroy_catalog_entities_response import BulkDestroyCatalogEntitiesResponse +from ...models.bulk_destroy_catalog_entities_type_0 import BulkDestroyCatalogEntitiesType0 +from ...models.bulk_destroy_catalog_entities_type_1 import BulkDestroyCatalogEntitiesType1 +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + catalog_id: str, + *, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/catalogs/{catalog_id}/entities/bulk_delete".format(catalog_id=quote(str(catalog_id), safe=""),), + } + + + if isinstance(body, BulkDestroyCatalogEntitiesType0): + _kwargs["json"] = body.to_dict() + else: + _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) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyCatalogEntitiesResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyCatalogEntitiesResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyCatalogEntitiesResponse.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | 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( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, + +) -> Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList]: + """ Bulk delete Catalog Entities + + Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + catalog_id (str): + body (BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific entities) or + managed_by (prune all managed entities not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList] + """ + + + kwargs = _get_kwargs( + catalog_id=catalog_id, +body=body, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, + +) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Catalog Entities + + Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + catalog_id (str): + body (BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific entities) or + managed_by (prune all managed entities not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList + """ + + + return sync_detailed( + catalog_id=catalog_id, +client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, + +) -> Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList]: + """ Bulk delete Catalog Entities + + Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + catalog_id (str): + body (BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific entities) or + managed_by (prune all managed entities not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList] + """ + + + 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) + +async def asyncio( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, + +) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Catalog Entities + + Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + catalog_id (str): + body (BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific entities) or + managed_by (prune all managed entities not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList + """ + + + return (await asyncio_detailed( + catalog_id=catalog_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py b/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py new file mode 100644 index 00000000..127601a4 --- /dev/null +++ b/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py @@ -0,0 +1,237 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_upsert_catalog_entities import BulkUpsertCatalogEntities +from ...models.bulk_upsert_catalog_entities_error import BulkUpsertCatalogEntitiesError +from ...models.bulk_upsert_catalog_entities_response import BulkUpsertCatalogEntitiesResponse +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + catalog_id: str, + *, + body: BulkUpsertCatalogEntities, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/catalogs/{catalog_id}/entities/bulk_upsert".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) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertCatalogEntitiesResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertCatalogEntitiesError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertCatalogEntitiesError.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | 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( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkUpsertCatalogEntities, + +) -> Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList]: + """ Bulk upsert Catalog Entities + + Create or update multiple catalog entities by external_id. Only attributes present in the payload + are written (managed-fields semantics). Transactional: all succeed or all fail. + + Args: + catalog_id (str): + body (BulkUpsertCatalogEntities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList] + """ + + + kwargs = _get_kwargs( + catalog_id=catalog_id, +body=body, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkUpsertCatalogEntities, + +) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: + """ Bulk upsert Catalog Entities + + Create or update multiple catalog entities by external_id. Only attributes present in the payload + are written (managed-fields semantics). Transactional: all succeed or all fail. + + Args: + catalog_id (str): + body (BulkUpsertCatalogEntities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList + """ + + + return sync_detailed( + catalog_id=catalog_id, +client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkUpsertCatalogEntities, + +) -> Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList]: + """ Bulk upsert Catalog Entities + + Create or update multiple catalog entities by external_id. Only attributes present in the payload + are written (managed-fields semantics). Transactional: all succeed or all fail. + + Args: + catalog_id (str): + body (BulkUpsertCatalogEntities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList] + """ + + + 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) + +async def asyncio( + catalog_id: str, + *, + client: AuthenticatedClient, + body: BulkUpsertCatalogEntities, + +) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: + """ Bulk upsert Catalog Entities + + Create or update multiple catalog entities by external_id. Only attributes present in the payload + are written (managed-fields semantics). Transactional: all succeed or all fail. + + Args: + catalog_id (str): + body (BulkUpsertCatalogEntities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList + """ + + + return (await asyncio_detailed( + catalog_id=catalog_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/catalog_entities/create_catalog_entity.py b/rootly_sdk/api/catalog_entities/create_catalog_entity.py index 37fa998e..fad5f2ca 100644 --- a/rootly_sdk/api/catalog_entities/create_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/create_catalog_entity.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_response import CatalogEntityResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_entity import NewCatalogEntity -from ...types import Response +from typing import cast + def _get_kwargs( catalog_id: str, *, body: NewCatalogEntity, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/catalogs/{catalog_id}/entities".format( - catalog_id=quote(str(catalog_id), safe=""), - ), + "url": "/v1/catalogs/{catalog_id}/entities".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 -) -> CatalogEntityResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityResponse | ErrorsList | None: if response.status_code == 201: response_201 = CatalogEntityResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogEntity, + ) -> Response[CatalogEntityResponse | ErrorsList]: - """Creates a Catalog Entity + """ Creates a Catalog Entity Creates a new Catalog Entity from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( catalog_id=catalog_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( catalog_id: str, *, client: AuthenticatedClient, body: NewCatalogEntity, + ) -> CatalogEntityResponse | ErrorsList | None: - """Creates a Catalog Entity + """ Creates a Catalog Entity Creates a new Catalog Entity from provided data @@ -123,22 +137,24 @@ def sync( Returns: CatalogEntityResponse | ErrorsList - """ + """ + return sync_detailed( catalog_id=catalog_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( catalog_id: str, *, client: AuthenticatedClient, body: NewCatalogEntity, + ) -> Response[CatalogEntityResponse | ErrorsList]: - """Creates a Catalog Entity + """ Creates a Catalog Entity Creates a new Catalog Entity from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( catalog_id=catalog_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( catalog_id: str, *, client: AuthenticatedClient, body: NewCatalogEntity, + ) -> CatalogEntityResponse | ErrorsList | None: - """Creates a Catalog Entity + """ Creates a Catalog Entity Creates a new Catalog Entity from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: CatalogEntityResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - catalog_id=catalog_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + catalog_id=catalog_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/catalog_entities/delete_catalog_entity.py b/rootly_sdk/api/catalog_entities/delete_catalog_entity.py index f256d19c..09e30559 100644 --- a/rootly_sdk/api/catalog_entities/delete_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/delete_catalog_entity.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_response import CatalogEntityResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/catalog_entities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalog_entities/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogEntityResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogEntityResponse | ErrorsList]: - """Delete a Catalog Entity + """ Delete a Catalog Entity Delete a specific Catalog Entity by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> CatalogEntityResponse | ErrorsList | None: - """Delete a Catalog Entity + """ Delete a Catalog Entity Delete a specific Catalog Entity by id @@ -105,20 +117,22 @@ def sync( Returns: CatalogEntityResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogEntityResponse | ErrorsList]: - """Delete a Catalog Entity + """ Delete a Catalog Entity Delete a specific Catalog Entity by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> CatalogEntityResponse | ErrorsList | None: - """Delete a Catalog Entity + """ Delete a Catalog Entity Delete a specific Catalog Entity by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CatalogEntityResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/catalog_entities/get_catalog_entity.py b/rootly_sdk/api/catalog_entities/get_catalog_entity.py index a2b59694..6e969416 100644 --- a/rootly_sdk/api/catalog_entities/get_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/get_catalog_entity.py @@ -1,23 +1,32 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_response import CatalogEntityResponse from ...models.errors_list import ErrorsList +from ...models.get_catalog_entity_include import check_get_catalog_entity_include from ...models.get_catalog_entity_include import GetCatalogEntityInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, include: GetCatalogEntityInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -27,30 +36,34 @@ def _get_kwargs( params["include"] = json_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/catalog_entities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalog_entities/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogEntityResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityResponse.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: @@ -59,9 +72,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +86,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetCatalogEntityInclude | Unset = UNSET, + ) -> Response[CatalogEntityResponse | ErrorsList]: - """Retrieves a Catalog Entity + """ Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetCatalogEntityInclude | Unset = UNSET, + ) -> CatalogEntityResponse | ErrorsList | None: - """Retrieves a Catalog Entity + """ Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id @@ -124,22 +138,24 @@ def sync( Returns: CatalogEntityResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetCatalogEntityInclude | Unset = UNSET, + ) -> Response[CatalogEntityResponse | ErrorsList]: - """Retrieves a Catalog Entity + """ Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id @@ -153,25 +169,29 @@ async def asyncio_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetCatalogEntityInclude | Unset = UNSET, + ) -> CatalogEntityResponse | ErrorsList | None: - """Retrieves a Catalog Entity + """ Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id @@ -185,12 +205,12 @@ async def asyncio( Returns: CatalogEntityResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/catalog_entities/list_catalog_entities.py b/rootly_sdk/api/catalog_entities/list_catalog_entities.py index f9685565..ec050ded 100644 --- a/rootly_sdk/api/catalog_entities/list_catalog_entities.py +++ b/rootly_sdk/api/catalog_entities/list_catalog_entities.py @@ -1,15 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_list import CatalogEntityList +from ...models.list_catalog_entities_include import check_list_catalog_entities_include from ...models.list_catalog_entities_include import ListCatalogEntitiesInclude +from ...models.list_catalog_entities_sort import check_list_catalog_entities_sort from ...models.list_catalog_entities_sort import ListCatalogEntitiesSort -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,11 +28,30 @@ def _get_kwargs( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -52,6 +77,12 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[backstage_id]"] = filterbackstage_id + + params["filter[external_id]"] = filterexternal_id + + params["filter[managed_by]"] = filtermanaged_by + params["filter[created_at][gt]"] = filtercreated_atgt params["filter[created_at][gte]"] = filtercreated_atgte @@ -60,23 +91,51 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[managed_by][eq]"] = filtermanaged_byeq + + params["filter[managed_by][not_eq]"] = filtermanaged_bynot_eq + + params["filter[managed_by][in]"] = filtermanaged_byin + + params["filter[managed_by][not_in]"] = filtermanaged_bynot_in + + 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/catalogs/{catalog_id}/entities".format( - catalog_id=quote(str(catalog_id), safe=""), - ), + "url": "/v1/catalogs/{catalog_id}/entities".format(catalog_id=quote(str(catalog_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityList | None: if response.status_code == 200: response_200 = CatalogEntityList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -105,12 +164,28 @@ def sync_detailed( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> Response[CatalogEntityList]: - """List Catalog Entities + """ List Catalog Entities List Catalog Entities @@ -123,10 +198,25 @@ def sync_detailed( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterbackstage_id (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -134,21 +224,38 @@ def sync_detailed( Returns: Response[CatalogEntityList] - """ + """ + kwargs = _get_kwargs( catalog_id=catalog_id, - include=include, - sort=sort, - 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, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filterexternal_id=filterexternal_id, +filtermanaged_by=filtermanaged_by, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtermanaged_byeq=filtermanaged_byeq, +filtermanaged_bynot_eq=filtermanaged_bynot_eq, +filtermanaged_byin=filtermanaged_byin, +filtermanaged_bynot_in=filtermanaged_bynot_in, + ) response = client.get_httpx_client().request( @@ -157,7 +264,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( catalog_id: str, *, @@ -169,12 +275,28 @@ def sync( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> CatalogEntityList | None: - """List Catalog Entities + """ List Catalog Entities List Catalog Entities @@ -187,10 +309,25 @@ def sync( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterbackstage_id (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -198,24 +335,40 @@ def sync( Returns: CatalogEntityList - """ + """ + return sync_detailed( catalog_id=catalog_id, - client=client, - include=include, - sort=sort, - 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, - ).parsed +client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filterexternal_id=filterexternal_id, +filtermanaged_by=filtermanaged_by, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtermanaged_byeq=filtermanaged_byeq, +filtermanaged_bynot_eq=filtermanaged_bynot_eq, +filtermanaged_byin=filtermanaged_byin, +filtermanaged_bynot_in=filtermanaged_bynot_in, + ).parsed async def asyncio_detailed( catalog_id: str, @@ -228,12 +381,28 @@ async def asyncio_detailed( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> Response[CatalogEntityList]: - """List Catalog Entities + """ List Catalog Entities List Catalog Entities @@ -246,10 +415,25 @@ async def asyncio_detailed( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterbackstage_id (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -257,28 +441,46 @@ async def asyncio_detailed( Returns: Response[CatalogEntityList] - """ + """ + kwargs = _get_kwargs( catalog_id=catalog_id, - include=include, - sort=sort, - 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, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filterexternal_id=filterexternal_id, +filtermanaged_by=filtermanaged_by, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtermanaged_byeq=filtermanaged_byeq, +filtermanaged_bynot_eq=filtermanaged_bynot_eq, +filtermanaged_byin=filtermanaged_byin, +filtermanaged_bynot_in=filtermanaged_bynot_in, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( catalog_id: str, *, @@ -290,12 +492,28 @@ async def asyncio( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterbackstage_id: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> CatalogEntityList | None: - """List Catalog Entities + """ List Catalog Entities List Catalog Entities @@ -308,10 +526,25 @@ async def asyncio( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterbackstage_id (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -319,22 +552,37 @@ async def asyncio( Returns: CatalogEntityList - """ - - return ( - await asyncio_detailed( - catalog_id=catalog_id, - client=client, - include=include, - sort=sort, - 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, - ) - ).parsed + """ + + + return (await asyncio_detailed( + catalog_id=catalog_id, +client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filterexternal_id=filterexternal_id, +filtermanaged_by=filtermanaged_by, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtermanaged_byeq=filtermanaged_byeq, +filtermanaged_bynot_eq=filtermanaged_bynot_eq, +filtermanaged_byin=filtermanaged_byin, +filtermanaged_bynot_in=filtermanaged_bynot_in, + + )).parsed diff --git a/rootly_sdk/api/catalog_entities/update_catalog_entity.py b/rootly_sdk/api/catalog_entities/update_catalog_entity.py index 6613d141..6775e51e 100644 --- a/rootly_sdk/api/catalog_entities/update_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/update_catalog_entity.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_response import CatalogEntityResponse from ...models.errors_list import ErrorsList from ...models.update_catalog_entity import UpdateCatalogEntity -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateCatalogEntity, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/catalog_entities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalog_entities/{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 -) -> CatalogEntityResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalogEntity, + ) -> Response[CatalogEntityResponse | ErrorsList]: - """Update a Catalog Entity + """ Update a Catalog Entity Update a specific Catalog Entity by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, + ) -> CatalogEntityResponse | ErrorsList | None: - """Update a Catalog Entity + """ Update a Catalog Entity Update a specific Catalog Entity by id @@ -119,22 +131,24 @@ def sync( Returns: CatalogEntityResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, + ) -> Response[CatalogEntityResponse | ErrorsList]: - """Update a Catalog Entity + """ Update a Catalog Entity Update a specific Catalog Entity by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, + ) -> CatalogEntityResponse | ErrorsList | None: - """Update a Catalog Entity + """ Update a Catalog Entity Update a specific Catalog Entity by id @@ -180,12 +198,12 @@ async def asyncio( Returns: CatalogEntityResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/catalog_entity_checklists/__init__.py b/rootly_sdk/api/catalog_entity_checklists/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/catalog_entity_checklists/__init__.py +++ b/rootly_sdk/api/catalog_entity_checklists/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" 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 index b1dacf13..31de002c 100644 --- a/rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py +++ b/rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_checklist_response import CatalogEntityChecklistResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + 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=""), - ), + "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: + +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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityChecklistResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityChecklistResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogEntityChecklistResponse | ErrorsList]: - """Retrieves a catalog entity checklist + """ Retrieves a catalog entity checklist Retrieves a specific catalog entity checklist by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CatalogEntityChecklistResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: UUID, *, client: AuthenticatedClient, + ) -> CatalogEntityChecklistResponse | ErrorsList | None: - """Retrieves a catalog entity checklist + """ Retrieves a catalog entity checklist Retrieves a specific catalog entity checklist by id @@ -105,20 +117,22 @@ def sync( Returns: CatalogEntityChecklistResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogEntityChecklistResponse | ErrorsList]: - """Retrieves a catalog entity checklist + """ Retrieves a catalog entity checklist Retrieves a specific catalog entity checklist by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CatalogEntityChecklistResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 catalog entity checklist Retrieves a specific catalog entity checklist by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CatalogEntityChecklistResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + 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 index 63fefcf6..4478cbec 100644 --- a/rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py +++ b/rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_checklist_list import CatalogEntityChecklistList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,7 +26,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -45,23 +54,27 @@ def _get_kwargs( 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: + +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: @@ -70,9 +83,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityChecklistList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityChecklistList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -94,8 +105,9 @@ def sync_detailed( 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 List catalog entity checklists @@ -117,19 +129,21 @@ def sync_detailed( 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, +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( @@ -138,7 +152,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -152,8 +165,9 @@ def sync( 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 List catalog entity checklists @@ -175,22 +189,23 @@ def sync( 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 +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( *, @@ -205,8 +220,9 @@ async def asyncio_detailed( 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 List catalog entity checklists @@ -228,26 +244,29 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -261,8 +280,9 @@ async def asyncio( 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 List catalog entity checklists @@ -284,20 +304,20 @@ async def asyncio( 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 + """ + + + 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/__init__.py b/rootly_sdk/api/catalog_entity_properties/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/catalog_entity_properties/__init__.py +++ b/rootly_sdk/api/catalog_entity_properties/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 3c834928..6b4c4323 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_property_response import CatalogEntityPropertyResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_entity_property import NewCatalogEntityProperty -from ...types import Response +from typing import cast + def _get_kwargs( catalog_entity_id: str, *, body: NewCatalogEntityProperty, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/catalog_entities/{catalog_entity_id}/properties".format( - catalog_entity_id=quote(str(catalog_entity_id), safe=""), - ), + "url": "/v1/catalog_entities/{catalog_entity_id}/properties".format(catalog_entity_id=quote(str(catalog_entity_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 -) -> CatalogEntityPropertyResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityPropertyResponse | ErrorsList | None: if response.status_code == 201: response_201 = CatalogEntityPropertyResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogEntityProperty, + ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """Creates a Catalog Entity Property + """ Creates a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -95,11 +107,13 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( catalog_entity_id=catalog_entity_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -108,14 +122,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( catalog_entity_id: str, *, client: AuthenticatedClient, body: NewCatalogEntityProperty, + ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """Creates a Catalog Entity Property + """ Creates a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -135,22 +149,24 @@ def sync( Returns: CatalogEntityPropertyResponse | ErrorsList - """ + """ + return sync_detailed( catalog_entity_id=catalog_entity_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( catalog_entity_id: str, *, client: AuthenticatedClient, body: NewCatalogEntityProperty, + ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """Creates a Catalog Entity Property + """ Creates a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -170,25 +186,29 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( catalog_entity_id=catalog_entity_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( catalog_entity_id: str, *, client: AuthenticatedClient, body: NewCatalogEntityProperty, + ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """Creates a Catalog Entity Property + """ Creates a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -208,12 +228,12 @@ async def asyncio( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - catalog_entity_id=catalog_entity_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + catalog_entity_id=catalog_entity_id, +client=client, +body=body, + + )).parsed 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 5fb2acac..705f72fb 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_property_response import CatalogEntityPropertyResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/catalog_entity_properties/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalog_entity_properties/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogEntityPropertyResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityPropertyResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityPropertyResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """Delete a Catalog Entity Property + """ Delete a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -77,10 +87,12 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -89,13 +101,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """Delete a Catalog Entity Property + """ Delete a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -112,20 +124,22 @@ def sync( Returns: CatalogEntityPropertyResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """Delete a Catalog Entity Property + """ Delete a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -142,23 +156,27 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """Delete a Catalog Entity Property + """ Delete a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -175,11 +193,11 @@ async def asyncio( Returns: CatalogEntityPropertyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 698b1a78..dafecc9a 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,24 +1,31 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_property_response import CatalogEntityPropertyResponse from ...models.errors_list import ErrorsList -from ...models.get_catalog_entity_property_include import ( - GetCatalogEntityPropertyInclude, -) -from ...types import UNSET, Response, Unset +from ...models.get_catalog_entity_property_include import check_get_catalog_entity_property_include +from ...models.get_catalog_entity_property_include import GetCatalogEntityPropertyInclude +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetCatalogEntityPropertyInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -28,30 +35,34 @@ def _get_kwargs( params["include"] = json_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/catalog_entity_properties/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalog_entity_properties/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogEntityPropertyResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityPropertyResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityPropertyResponse.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: @@ -60,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetCatalogEntityPropertyInclude | Unset = UNSET, + ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """Retrieves a Catalog Entity Property + """ Retrieves a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -95,11 +105,13 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -108,14 +120,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetCatalogEntityPropertyInclude | Unset = UNSET, + ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """Retrieves a Catalog Entity Property + """ Retrieves a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -133,22 +145,24 @@ def sync( Returns: CatalogEntityPropertyResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetCatalogEntityPropertyInclude | Unset = UNSET, + ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """Retrieves a Catalog Entity Property + """ Retrieves a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -166,25 +180,29 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetCatalogEntityPropertyInclude | Unset = UNSET, + ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """Retrieves a Catalog Entity Property + """ Retrieves a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -202,12 +220,12 @@ async def asyncio( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed 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 f4183034..2a588ab0 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,19 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_property_list import CatalogEntityPropertyList -from ...models.list_catalog_entity_properties_include import ( - ListCatalogEntityPropertiesInclude, -) -from ...models.list_catalog_entity_properties_sort import ( - ListCatalogEntityPropertiesSort, -) -from ...types import UNSET, Response, Unset +from ...models.list_catalog_entity_properties_include import check_list_catalog_entity_properties_include +from ...models.list_catalog_entity_properties_include import ListCatalogEntityPropertiesInclude +from ...models.list_catalog_entity_properties_sort import check_list_catalog_entity_properties_sort +from ...models.list_catalog_entity_properties_sort import ListCatalogEntityPropertiesSort +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -29,7 +31,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -61,25 +67,27 @@ def _get_kwargs( 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_entities/{catalog_entity_id}/properties".format( - catalog_entity_id=quote(str(catalog_entity_id), safe=""), - ), + "url": "/v1/catalog_entities/{catalog_entity_id}/properties".format(catalog_entity_id=quote(str(catalog_entity_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogEntityPropertyList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityPropertyList | None: if response.status_code == 200: response_200 = CatalogEntityPropertyList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -88,9 +96,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityPropertyList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -113,8 +119,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogEntityPropertyList]: - """List catalog properties + """ List catalog properties **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -141,20 +148,22 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyList] - """ + """ + kwargs = _get_kwargs( catalog_entity_id=catalog_entity_id, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtercatalog_field_id=filtercatalog_field_id, - filterkey=filterkey, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtercatalog_field_id=filtercatalog_field_id, +filterkey=filterkey, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ) response = client.get_httpx_client().request( @@ -163,7 +172,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( catalog_entity_id: str, *, @@ -178,8 +186,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogEntityPropertyList | None: - """List catalog properties + """ List catalog properties **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -206,23 +215,24 @@ def sync( Returns: CatalogEntityPropertyList - """ + """ + return sync_detailed( catalog_entity_id=catalog_entity_id, - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtercatalog_field_id=filtercatalog_field_id, - filterkey=filterkey, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtercatalog_field_id=filtercatalog_field_id, +filterkey=filterkey, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ).parsed async def asyncio_detailed( catalog_entity_id: str, @@ -238,8 +248,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogEntityPropertyList]: - """List catalog properties + """ List catalog properties **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -266,27 +277,30 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyList] - """ + """ + kwargs = _get_kwargs( catalog_entity_id=catalog_entity_id, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtercatalog_field_id=filtercatalog_field_id, - filterkey=filterkey, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtercatalog_field_id=filtercatalog_field_id, +filterkey=filterkey, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( catalog_entity_id: str, *, @@ -301,8 +315,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogEntityPropertyList | None: - """List catalog properties + """ List catalog properties **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -329,21 +344,21 @@ async def asyncio( Returns: CatalogEntityPropertyList - """ - - return ( - await asyncio_detailed( - catalog_entity_id=catalog_entity_id, - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtercatalog_field_id=filtercatalog_field_id, - filterkey=filterkey, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + catalog_entity_id=catalog_entity_id, +client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtercatalog_field_id=filtercatalog_field_id, +filterkey=filterkey, +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/update_catalog_entity_property.py b/rootly_sdk/api/catalog_entity_properties/update_catalog_entity_property.py index 5d1cc4b3..749c5694 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_entity_property_response import CatalogEntityPropertyResponse from ...models.errors_list import ErrorsList from ...models.update_catalog_entity_property import UpdateCatalogEntityProperty -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateCatalogEntityProperty, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/catalog_entity_properties/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalog_entity_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 -) -> CatalogEntityPropertyResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityPropertyResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityPropertyResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogEntityPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalogEntityProperty, + ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """Update a Catalog Entity Property + """ Update a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -91,11 +101,13 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -104,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateCatalogEntityProperty, + ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """Update a Catalog Entity Property + """ Update a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -132,22 +144,24 @@ def sync( Returns: CatalogEntityPropertyResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCatalogEntityProperty, + ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """Update a Catalog Entity Property + """ Update a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -168,25 +182,29 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCatalogEntityProperty, + ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """Update a Catalog Entity Property + """ Update a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -207,12 +225,12 @@ async def asyncio( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/catalog_properties/__init__.py b/rootly_sdk/api/catalog_properties/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/catalog_properties/__init__.py +++ b/rootly_sdk/api/catalog_properties/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" 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 index ce8b71c5..771f58cc 100644 --- a/rootly_sdk/api/catalog_properties/create_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/create_catalog_property.py @@ -1,37 +1,46 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.new_catalog_field import NewCatalogField -from ...types import Response +from typing import cast + 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=""), - ), + "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 @@ -56,8 +65,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogField, + ) -> Response[Any]: - """Creates a Catalog Property (alias for field) + """ Creates a Catalog Property (alias for field) Creates a new Catalog Property - returns catalog_properties type @@ -71,11 +81,13 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( catalog_id=catalog_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -90,8 +102,9 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogField, + ) -> Response[Any]: - """Creates a Catalog Property (alias for field) + """ Creates a Catalog Property (alias for field) Creates a new Catalog Property - returns catalog_properties type @@ -105,13 +118,18 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( catalog_id=catalog_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 index b08c47da..97f25493 100644 --- a/rootly_sdk/api/catalog_properties/delete_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/delete_catalog_property.py @@ -1,28 +1,36 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + + 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=""), - ), + "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 @@ -46,8 +54,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Delete a catalog_property + """ Delete a catalog_property Delete a specific catalog_property by id - returns catalog_properties type @@ -60,10 +69,12 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -77,8 +88,9 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Delete a catalog_property + """ Delete a catalog_property Delete a specific catalog_property by id - returns catalog_properties type @@ -91,12 +103,17 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 index e42871f8..d98ebc18 100644 --- a/rootly_sdk/api/catalog_properties/get_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/get_catalog_property.py @@ -1,28 +1,36 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + + 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=""), - ), + "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 @@ -46,8 +54,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Retrieves a Catalog Property (alias for field) + """ Retrieves a Catalog Property (alias for field) Retrieves a specific Catalog Property by id - returns catalog_properties type @@ -60,10 +69,12 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -77,8 +88,9 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Retrieves a Catalog Property (alias for field) + """ Retrieves a Catalog Property (alias for field) Retrieves a specific Catalog Property by id - returns catalog_properties type @@ -91,12 +103,17 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 index 4d717126..43b51bdd 100644 --- a/rootly_sdk/api/catalog_properties/list_catalog_properties.py +++ b/rootly_sdk/api/catalog_properties/list_catalog_properties.py @@ -1,28 +1,36 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + + 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=""), - ), + "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 @@ -46,8 +54,9 @@ def sync_detailed( catalog_id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """List Catalog Properties (alias for fields) + """ List Catalog Properties (alias for fields) List Catalog Properties - returns catalog_properties type @@ -60,10 +69,12 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( catalog_id=catalog_id, + ) response = client.get_httpx_client().request( @@ -77,8 +88,9 @@ async def asyncio_detailed( catalog_id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """List Catalog Properties (alias for fields) + """ List Catalog Properties (alias for fields) List Catalog Properties - returns catalog_properties type @@ -91,12 +103,17 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( catalog_id=catalog_id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 index 2847e350..1b0b75e4 100644 --- a/rootly_sdk/api/catalog_properties/update_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/update_catalog_property.py @@ -1,37 +1,46 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.update_catalog_field import UpdateCatalogField -from ...types import Response +from typing import cast + 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=""), - ), + "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 @@ -56,8 +65,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalogField, + ) -> Response[Any]: - """Update a catalog_property (alias for field) + """ Update a catalog_property (alias for field) Update a specific catalog_property by id - returns catalog_properties type @@ -71,11 +81,13 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -90,8 +102,9 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateCatalogField, + ) -> Response[Any]: - """Update a catalog_property (alias for field) + """ Update a catalog_property (alias for field) Update a specific catalog_property by id - returns catalog_properties type @@ -105,13 +118,18 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + diff --git a/rootly_sdk/api/catalogs/__init__.py b/rootly_sdk/api/catalogs/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/catalogs/__init__.py +++ b/rootly_sdk/api/catalogs/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/catalogs/create_catalog.py b/rootly_sdk/api/catalogs/create_catalog.py index 736014b9..f9e660f3 100644 --- a/rootly_sdk/api/catalogs/create_catalog.py +++ b/rootly_sdk/api/catalogs/create_catalog.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_response import CatalogResponse from ...models.errors_list import ErrorsList from ...models.new_catalog import NewCatalog -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCatalog, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/catalogs", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> CatalogResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogResponse | ErrorsList | None: if response.status_code == 201: response_201 = CatalogResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalog, + ) -> Response[CatalogResponse | ErrorsList]: - """Creates a catalog + """ Creates a catalog Creates a new catalog from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCatalog, + ) -> CatalogResponse | ErrorsList | None: - """Creates a catalog + """ Creates a catalog Creates a new catalog from provided data @@ -114,20 +131,22 @@ def sync( Returns: CatalogResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalog, + ) -> Response[CatalogResponse | ErrorsList]: - """Creates a catalog + """ Creates a catalog Creates a new catalog from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewCatalog, + ) -> CatalogResponse | ErrorsList | None: - """Creates a catalog + """ Creates a catalog Creates a new catalog from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CatalogResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/catalogs/delete_catalog.py b/rootly_sdk/api/catalogs/delete_catalog.py index eeebd62e..8e858477 100644 --- a/rootly_sdk/api/catalogs/delete_catalog.py +++ b/rootly_sdk/api/catalogs/delete_catalog.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_response import CatalogResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/catalogs/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalogs/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogResponse | ErrorsList]: - """Delete a catalog + """ Delete a catalog Delete a specific catalog by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> CatalogResponse | ErrorsList | None: - """Delete a catalog + """ Delete a catalog Delete a specific catalog by id @@ -105,20 +117,22 @@ def sync( Returns: CatalogResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogResponse | ErrorsList]: - """Delete a catalog + """ Delete a catalog Delete a specific catalog by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> CatalogResponse | ErrorsList | None: - """Delete a catalog + """ Delete a catalog Delete a specific catalog by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CatalogResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/catalogs/get_catalog.py b/rootly_sdk/api/catalogs/get_catalog.py index 146cb1a4..331b1a0e 100644 --- a/rootly_sdk/api/catalogs/get_catalog.py +++ b/rootly_sdk/api/catalogs/get_catalog.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_response import CatalogResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/catalogs/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalogs/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CatalogResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogResponse | ErrorsList]: - """Retrieves a catalog + """ Retrieves a catalog Retrieves a specific catalog by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> CatalogResponse | ErrorsList | None: - """Retrieves a catalog + """ Retrieves a catalog Retrieves a specific catalog by id @@ -105,20 +117,22 @@ def sync( Returns: CatalogResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CatalogResponse | ErrorsList]: - """Retrieves a catalog + """ Retrieves a catalog Retrieves a specific catalog by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> CatalogResponse | ErrorsList | None: - """Retrieves a catalog + """ Retrieves a catalog Retrieves a specific catalog by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CatalogResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/catalogs/list_catalogs.py b/rootly_sdk/api/catalogs/list_catalogs.py index 8305bec5..8ad79c0b 100644 --- a/rootly_sdk/api/catalogs/list_catalogs.py +++ b/rootly_sdk/api/catalogs/list_catalogs.py @@ -1,14 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_list import CatalogList +from ...models.list_catalogs_include import check_list_catalogs_include from ...models.list_catalogs_include import ListCatalogsInclude +from ...models.list_catalogs_sort import check_list_catalogs_sort from ...models.list_catalogs_sort import ListCatalogsSort -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -20,11 +27,29 @@ def _get_kwargs( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -50,6 +75,10 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[external_id]"] = filterexternal_id + + params["filter[managed_by]"] = filtermanaged_by + params["filter[created_at][gt]"] = filtercreated_atgt params["filter[created_at][gte]"] = filtercreated_atgte @@ -58,21 +87,51 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[managed_by][eq]"] = filtermanaged_byeq + + params["filter[managed_by][not_eq]"] = filtermanaged_bynot_eq + + params["filter[managed_by][in]"] = filtermanaged_byin + + params["filter[managed_by][not_in]"] = filtermanaged_bynot_in + + 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/catalogs", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogList | None: if response.status_code == 200: response_200 = CatalogList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -100,12 +159,27 @@ def sync_detailed( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> Response[CatalogList]: - """List catalogs + """ List catalogs List catalogs @@ -117,10 +191,24 @@ def sync_detailed( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -128,20 +216,36 @@ def sync_detailed( Returns: Response[CatalogList] - """ + """ + kwargs = _get_kwargs( include=include, - sort=sort, - 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, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterexternal_id=filterexternal_id, +filtermanaged_by=filtermanaged_by, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtermanaged_byeq=filtermanaged_byeq, +filtermanaged_bynot_eq=filtermanaged_bynot_eq, +filtermanaged_byin=filtermanaged_byin, +filtermanaged_bynot_in=filtermanaged_bynot_in, + ) response = client.get_httpx_client().request( @@ -150,7 +254,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -161,12 +264,27 @@ def sync( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> CatalogList | None: - """List catalogs + """ List catalogs List catalogs @@ -178,10 +296,24 @@ def sync( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -189,23 +321,38 @@ def sync( Returns: CatalogList - """ + """ + return sync_detailed( client=client, - include=include, - sort=sort, - 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, - ).parsed +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterexternal_id=filterexternal_id, +filtermanaged_by=filtermanaged_by, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtermanaged_byeq=filtermanaged_byeq, +filtermanaged_bynot_eq=filtermanaged_bynot_eq, +filtermanaged_byin=filtermanaged_byin, +filtermanaged_bynot_in=filtermanaged_bynot_in, + ).parsed async def asyncio_detailed( *, @@ -217,12 +364,27 @@ async def asyncio_detailed( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> Response[CatalogList]: - """List catalogs + """ List catalogs List catalogs @@ -234,10 +396,24 @@ async def asyncio_detailed( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -245,27 +421,44 @@ async def asyncio_detailed( Returns: Response[CatalogList] - """ + """ + kwargs = _get_kwargs( include=include, - sort=sort, - 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, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterexternal_id=filterexternal_id, +filtermanaged_by=filtermanaged_by, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtermanaged_byeq=filtermanaged_byeq, +filtermanaged_bynot_eq=filtermanaged_bynot_eq, +filtermanaged_byin=filtermanaged_byin, +filtermanaged_bynot_in=filtermanaged_bynot_in, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -276,12 +469,27 @@ async def asyncio( filtersearch: str | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterexternal_id: str | Unset = UNSET, + filtermanaged_by: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtermanaged_byeq: str | Unset = UNSET, + filtermanaged_bynot_eq: str | Unset = UNSET, + filtermanaged_byin: str | Unset = UNSET, + filtermanaged_bynot_in: str | Unset = UNSET, + ) -> CatalogList | None: - """List catalogs + """ List catalogs List catalogs @@ -293,10 +501,24 @@ async def asyncio( filtersearch (str | Unset): filterslug (str | Unset): filtername (str | Unset): + filterexternal_id (str | Unset): + filtermanaged_by (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtermanaged_byeq (str | Unset): + filtermanaged_bynot_eq (str | Unset): + filtermanaged_byin (str | Unset): + filtermanaged_bynot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -304,21 +526,35 @@ async def asyncio( Returns: CatalogList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - sort=sort, - 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, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterexternal_id=filterexternal_id, +filtermanaged_by=filtermanaged_by, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtermanaged_byeq=filtermanaged_byeq, +filtermanaged_bynot_eq=filtermanaged_bynot_eq, +filtermanaged_byin=filtermanaged_byin, +filtermanaged_bynot_in=filtermanaged_bynot_in, + + )).parsed diff --git a/rootly_sdk/api/catalogs/update_catalog.py b/rootly_sdk/api/catalogs/update_catalog.py index 47da6eea..db5a215e 100644 --- a/rootly_sdk/api/catalogs/update_catalog.py +++ b/rootly_sdk/api/catalogs/update_catalog.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.catalog_response import CatalogResponse from ...models.errors_list import ErrorsList from ...models.update_catalog import UpdateCatalog -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateCatalog, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/catalogs/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/catalogs/{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 -) -> CatalogResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalog, + ) -> Response[CatalogResponse | ErrorsList]: - """Update a catalog + """ Update a catalog Update a specific catalog by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, + ) -> CatalogResponse | ErrorsList | None: - """Update a catalog + """ Update a catalog Update a specific catalog by id @@ -119,22 +131,24 @@ def sync( Returns: CatalogResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, + ) -> Response[CatalogResponse | ErrorsList]: - """Update a catalog + """ Update a catalog Update a specific catalog by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, + ) -> CatalogResponse | ErrorsList | None: - """Update a catalog + """ Update a catalog Update a specific catalog by id @@ -180,12 +198,12 @@ async def asyncio( Returns: CatalogResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/causes/__init__.py b/rootly_sdk/api/causes/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/causes/__init__.py +++ b/rootly_sdk/api/causes/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/causes/create_cause.py b/rootly_sdk/api/causes/create_cause.py index c1e704a0..fa14841d 100644 --- a/rootly_sdk/api/causes/create_cause.py +++ b/rootly_sdk/api/causes/create_cause.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.cause_response import CauseResponse from ...models.errors_list import ErrorsList from ...models.new_cause import NewCause -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCause, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/causes", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> CauseResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CauseResponse | ErrorsList | None: if response.status_code == 201: response_201 = CauseResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CauseResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CauseResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCause, + ) -> Response[CauseResponse | ErrorsList]: - """Creates a cause + """ Creates a cause Creates a new cause from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CauseResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCause, + ) -> CauseResponse | ErrorsList | None: - """Creates a cause + """ Creates a cause Creates a new cause from provided data @@ -114,20 +131,22 @@ def sync( Returns: CauseResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCause, + ) -> Response[CauseResponse | ErrorsList]: - """Creates a cause + """ Creates a cause Creates a new cause from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CauseResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewCause, + ) -> CauseResponse | ErrorsList | None: - """Creates a cause + """ Creates a cause Creates a new cause from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CauseResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/causes/create_cause_catalog_property.py b/rootly_sdk/api/causes/create_cause_catalog_property.py index 6e2bf436..e6c83011 100644 --- a/rootly_sdk/api/causes/create_cause_catalog_property.py +++ b/rootly_sdk/api/causes/create_cause_catalog_property.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_property import NewCatalogProperty -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCatalogProperty, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/causes/properties", @@ -24,28 +34,34 @@ def _get_kwargs( _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: + +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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> CatalogPropertyResponse | ErrorsList | None: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -114,20 +131,22 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/causes/delete_cause.py b/rootly_sdk/api/causes/delete_cause.py index 3edaf3a4..1f1e84a4 100644 --- a/rootly_sdk/api/causes/delete_cause.py +++ b/rootly_sdk/api/causes/delete_cause.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.cause_response import CauseResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/causes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/causes/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CauseResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CauseResponse | ErrorsList | None: if response.status_code == 200: response_200 = CauseResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CauseResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CauseResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CauseResponse | ErrorsList]: - """Delete a cause + """ Delete a cause Delete a specific cause by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CauseResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> CauseResponse | ErrorsList | None: - """Delete a cause + """ Delete a cause Delete a specific cause by id @@ -105,20 +117,22 @@ def sync( Returns: CauseResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CauseResponse | ErrorsList]: - """Delete a cause + """ Delete a cause Delete a specific cause by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CauseResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> CauseResponse | ErrorsList | None: - """Delete a cause + """ Delete a cause Delete a specific cause by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CauseResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/causes/get_cause.py b/rootly_sdk/api/causes/get_cause.py index e8c8bff7..ea732c54 100644 --- a/rootly_sdk/api/causes/get_cause.py +++ b/rootly_sdk/api/causes/get_cause.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.cause_response import CauseResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/causes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/causes/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CauseResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CauseResponse | ErrorsList | None: if response.status_code == 200: response_200 = CauseResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CauseResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CauseResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CauseResponse | ErrorsList]: - """Retrieves a cause + """ Retrieves a cause Retrieves a specific cause by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CauseResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> CauseResponse | ErrorsList | None: - """Retrieves a cause + """ Retrieves a cause Retrieves a specific cause by id @@ -105,20 +117,22 @@ def sync( Returns: CauseResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CauseResponse | ErrorsList]: - """Retrieves a cause + """ Retrieves a cause Retrieves a specific cause by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CauseResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> CauseResponse | ErrorsList | None: - """Retrieves a cause + """ Retrieves a cause Retrieves a specific cause by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CauseResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/causes/list_cause_catalog_properties.py b/rootly_sdk/api/causes/list_cause_catalog_properties.py index 56923dc0..42d3f937 100644 --- a/rootly_sdk/api/causes/list_cause_catalog_properties.py +++ b/rootly_sdk/api/causes/list_cause_catalog_properties.py @@ -1,18 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from ...models.list_cause_catalog_properties_include import check_list_cause_catalog_properties_include +from ...models.list_cause_catalog_properties_include import ListCauseCatalogPropertiesInclude +from ...models.list_cause_catalog_properties_sort import check_list_cause_catalog_properties_sort +from ...models.list_cause_catalog_properties_sort import ListCauseCatalogPropertiesSort +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -28,7 +31,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -62,21 +69,27 @@ def _get_kwargs( 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: @@ -108,8 +121,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Cause Catalog Properties @@ -132,20 +146,22 @@ def sync_detailed( 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, +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( @@ -154,7 +170,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -169,8 +184,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Cause Catalog Properties @@ -193,23 +209,24 @@ def sync( 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 +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( *, @@ -225,8 +242,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Cause Catalog Properties @@ -249,27 +267,30 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -284,8 +305,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Cause Catalog Properties @@ -308,21 +330,21 @@ async def asyncio( 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 + """ + + + 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 4c7ee7f4..968992b6 100644 --- a/rootly_sdk/api/causes/list_causes.py +++ b/rootly_sdk/api/causes/list_causes.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.cause_list import CauseList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,7 +26,19 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -45,21 +62,43 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + 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", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CauseList | None: if response.status_code == 200: response_200 = CauseList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -90,8 +129,17 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> Response[CauseList]: - """List causes + """ List causes List causes @@ -106,6 +154,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -113,19 +169,29 @@ def sync_detailed( Returns: Response[CauseList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + ) response = client.get_httpx_client().request( @@ -134,7 +200,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -148,8 +213,17 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> CauseList | None: - """List causes + """ List causes List causes @@ -164,6 +238,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -171,22 +253,31 @@ def sync( Returns: CauseList - """ + """ + return sync_detailed( client=client, - include=include, - 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, - ).parsed +include=include, +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, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + ).parsed async def asyncio_detailed( *, @@ -201,8 +292,17 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> Response[CauseList]: - """List causes + """ List causes List causes @@ -217,6 +317,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -224,26 +332,37 @@ async def asyncio_detailed( Returns: Response[CauseList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -257,8 +376,17 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> CauseList | None: - """List causes + """ List causes List causes @@ -273,6 +401,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -280,20 +416,28 @@ async def asyncio( Returns: CauseList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - 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, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +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, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + + )).parsed diff --git a/rootly_sdk/api/causes/update_cause.py b/rootly_sdk/api/causes/update_cause.py index 46e11dce..86ad6763 100644 --- a/rootly_sdk/api/causes/update_cause.py +++ b/rootly_sdk/api/causes/update_cause.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.cause_response import CauseResponse from ...models.errors_list import ErrorsList from ...models.update_cause import UpdateCause -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateCause, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/causes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/causes/{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 -) -> CauseResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CauseResponse | ErrorsList | None: if response.status_code == 200: response_200 = CauseResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CauseResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CauseResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCause, + ) -> Response[CauseResponse | ErrorsList]: - """Update a cause + """ Update a cause Update a specific cause by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[CauseResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, + ) -> CauseResponse | ErrorsList | None: - """Update a cause + """ Update a cause Update a specific cause by id @@ -119,22 +131,24 @@ def sync( Returns: CauseResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, + ) -> Response[CauseResponse | ErrorsList]: - """Update a cause + """ Update a cause Update a specific cause by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[CauseResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, + ) -> CauseResponse | ErrorsList | None: - """Update a cause + """ Update a cause Update a specific cause by id @@ -180,12 +198,12 @@ async def asyncio( Returns: CauseResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/communications_groups/__init__.py b/rootly_sdk/api/communications_groups/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/communications_groups/__init__.py +++ b/rootly_sdk/api/communications_groups/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/communications_groups/create_communications_group.py b/rootly_sdk/api/communications_groups/create_communications_group.py index 84fa7b89..9506bca9 100644 --- a/rootly_sdk/api/communications_groups/create_communications_group.py +++ b/rootly_sdk/api/communications_groups/create_communications_group.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_group_response import CommunicationsGroupResponse from ...models.errors_list import ErrorsList from ...models.new_communications_group import NewCommunicationsGroup -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCommunicationsGroup, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/communications/groups", @@ -24,23 +34,27 @@ def _get_kwargs( _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 -) -> CommunicationsGroupResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsGroupResponse | ErrorsList | None: if response.status_code == 201: response_201 = CommunicationsGroupResponse.from_dict(response.json()) + + return response_201 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -49,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsGroupResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +76,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCommunicationsGroup, + ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """Creates a communications group + """ Creates a communications group Creates a new communications group from provided data @@ -78,10 +91,12 @@ def sync_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -90,13 +105,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCommunicationsGroup, + ) -> CommunicationsGroupResponse | ErrorsList | None: - """Creates a communications group + """ Creates a communications group Creates a new communications group from provided data @@ -109,20 +124,22 @@ def sync( Returns: CommunicationsGroupResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCommunicationsGroup, + ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """Creates a communications group + """ Creates a communications group Creates a new communications group from provided data @@ -135,23 +152,27 @@ async def asyncio_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewCommunicationsGroup, + ) -> CommunicationsGroupResponse | ErrorsList | None: - """Creates a communications group + """ Creates a communications group Creates a new communications group from provided data @@ -164,11 +185,11 @@ async def asyncio( Returns: CommunicationsGroupResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/communications_groups/delete_communications_group.py b/rootly_sdk/api/communications_groups/delete_communications_group.py index 7bb4306a..516530d4 100644 --- a/rootly_sdk/api/communications_groups/delete_communications_group.py +++ b/rootly_sdk/api/communications_groups/delete_communications_group.py @@ -4,26 +4,35 @@ import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/communications/groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/groups/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -32,6 +41,8 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) + + return response_404 if client.raise_on_unexpected_status: @@ -53,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Deletes a communications group + """ Deletes a communications group Deletes a communications group @@ -67,10 +79,12 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -79,13 +93,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Deletes a communications group + """ Deletes a communications group Deletes a communications group @@ -98,20 +112,22 @@ def sync( Returns: Any | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Deletes a communications group + """ Deletes a communications group Deletes a communications group @@ -124,23 +140,27 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Deletes a communications group + """ Deletes a communications group Deletes a communications group @@ -153,11 +173,11 @@ async def asyncio( Returns: Any | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/communications_groups/get_communications_group.py b/rootly_sdk/api/communications_groups/get_communications_group.py index 9c1e74ef..b71dad26 100644 --- a/rootly_sdk/api/communications_groups/get_communications_group.py +++ b/rootly_sdk/api/communications_groups/get_communications_group.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_group_response import CommunicationsGroupResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/communications/groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/groups/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CommunicationsGroupResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsGroupResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsGroupResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """Shows a communications group + """ Shows a communications group Shows details of a communications group @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> CommunicationsGroupResponse | ErrorsList | None: - """Shows a communications group + """ Shows a communications group Shows details of a communications group @@ -104,20 +116,22 @@ def sync( Returns: CommunicationsGroupResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """Shows a communications group + """ Shows a communications group Shows details of a communications group @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> CommunicationsGroupResponse | ErrorsList | None: - """Shows a communications group + """ Shows a communications group Shows details of a communications group @@ -159,11 +177,11 @@ async def asyncio( Returns: CommunicationsGroupResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/communications_groups/list_communications_groups.py b/rootly_sdk/api/communications_groups/list_communications_groups.py index 880eea27..c97f8d22 100644 --- a/rootly_sdk/api/communications_groups/list_communications_groups.py +++ b/rootly_sdk/api/communications_groups/list_communications_groups.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_groups_response import CommunicationsGroupsResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -24,7 +29,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -54,23 +63,27 @@ def _get_kwargs( 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/communications/groups", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CommunicationsGroupsResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsGroupsResponse | None: if response.status_code == 200: response_200 = CommunicationsGroupsResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -79,9 +92,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsGroupsResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsGroupsResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -106,8 +117,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CommunicationsGroupsResponse]: - """Lists communications groups + """ Lists communications groups Lists communications groups @@ -132,22 +144,24 @@ def sync_detailed( Returns: Response[CommunicationsGroupsResponse] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filteris_private=filteris_private, - filtercommunication_type_id=filtercommunication_type_id, - filtercondition_type=filtercondition_type, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filteris_private=filteris_private, +filtercommunication_type_id=filtercommunication_type_id, +filtercondition_type=filtercondition_type, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -156,7 +170,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -173,8 +186,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CommunicationsGroupsResponse | None: - """Lists communications groups + """ Lists communications groups Lists communications groups @@ -199,25 +213,26 @@ def sync( Returns: CommunicationsGroupsResponse - """ + """ + return sync_detailed( client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filteris_private=filteris_private, - filtercommunication_type_id=filtercommunication_type_id, - filtercondition_type=filtercondition_type, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filteris_private=filteris_private, +filtercommunication_type_id=filtercommunication_type_id, +filtercondition_type=filtercondition_type, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -235,8 +250,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CommunicationsGroupsResponse]: - """Lists communications groups + """ Lists communications groups Lists communications groups @@ -261,29 +277,32 @@ async def asyncio_detailed( Returns: Response[CommunicationsGroupsResponse] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filteris_private=filteris_private, - filtercommunication_type_id=filtercommunication_type_id, - filtercondition_type=filtercondition_type, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filteris_private=filteris_private, +filtercommunication_type_id=filtercommunication_type_id, +filtercondition_type=filtercondition_type, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -300,8 +319,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CommunicationsGroupsResponse | None: - """Lists communications groups + """ Lists communications groups Lists communications groups @@ -326,23 +346,23 @@ async def asyncio( Returns: CommunicationsGroupsResponse - """ - - return ( - await asyncio_detailed( - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filteris_private=filteris_private, - filtercommunication_type_id=filtercommunication_type_id, - filtercondition_type=filtercondition_type, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filteris_private=filteris_private, +filtercommunication_type_id=filtercommunication_type_id, +filtercondition_type=filtercondition_type, +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/communications_groups/update_communications_group.py b/rootly_sdk/api/communications_groups/update_communications_group.py index 56751baf..8d6af593 100644 --- a/rootly_sdk/api/communications_groups/update_communications_group.py +++ b/rootly_sdk/api/communications_groups/update_communications_group.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_group_response import CommunicationsGroupResponse from ...models.errors_list import ErrorsList from ...models.update_communications_group import UpdateCommunicationsGroup -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateCommunicationsGroup, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/communications/groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/groups/{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 -) -> CommunicationsGroupResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsGroupResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsGroupResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCommunicationsGroup, + ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """Updates a communications group + """ Updates a communications group Updates a communications group @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsGroup, + ) -> CommunicationsGroupResponse | ErrorsList | None: - """Updates a communications group + """ Updates a communications group Updates a communications group @@ -118,22 +130,24 @@ def sync( Returns: CommunicationsGroupResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsGroup, + ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """Updates a communications group + """ Updates a communications group Updates a communications group @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsGroup, + ) -> CommunicationsGroupResponse | ErrorsList | None: - """Updates a communications group + """ Updates a communications group Updates a communications group @@ -179,12 +197,12 @@ async def asyncio( Returns: CommunicationsGroupResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/communications_stages/__init__.py b/rootly_sdk/api/communications_stages/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/communications_stages/__init__.py +++ b/rootly_sdk/api/communications_stages/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/communications_stages/create_communications_stage.py b/rootly_sdk/api/communications_stages/create_communications_stage.py index 9e90afde..fca2dfe8 100644 --- a/rootly_sdk/api/communications_stages/create_communications_stage.py +++ b/rootly_sdk/api/communications_stages/create_communications_stage.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_stage_response import CommunicationsStageResponse from ...models.errors_list import ErrorsList from ...models.new_communications_stage import NewCommunicationsStage -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCommunicationsStage, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/communications/stages", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> CommunicationsStageResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsStageResponse | ErrorsList | None: if response.status_code == 201: response_201 = CommunicationsStageResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsStageResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsStageResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCommunicationsStage, + ) -> Response[CommunicationsStageResponse | ErrorsList]: - """Creates a communications stage + """ Creates a communications stage Creates a new communications stage from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCommunicationsStage, + ) -> CommunicationsStageResponse | ErrorsList | None: - """Creates a communications stage + """ Creates a communications stage Creates a new communications stage from provided data @@ -114,20 +131,22 @@ def sync( Returns: CommunicationsStageResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCommunicationsStage, + ) -> Response[CommunicationsStageResponse | ErrorsList]: - """Creates a communications stage + """ Creates a communications stage Creates a new communications stage from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewCommunicationsStage, + ) -> CommunicationsStageResponse | ErrorsList | None: - """Creates a communications stage + """ Creates a communications stage Creates a new communications stage from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CommunicationsStageResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/communications_stages/delete_communications_stage.py b/rootly_sdk/api/communications_stages/delete_communications_stage.py index b5921be8..bef4696d 100644 --- a/rootly_sdk/api/communications_stages/delete_communications_stage.py +++ b/rootly_sdk/api/communications_stages/delete_communications_stage.py @@ -4,26 +4,35 @@ import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/communications/stages/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/stages/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -32,6 +41,8 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) + + return response_404 if client.raise_on_unexpected_status: @@ -53,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Deletes a communications stage + """ Deletes a communications stage Deletes a communications stage @@ -67,10 +79,12 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -79,13 +93,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Deletes a communications stage + """ Deletes a communications stage Deletes a communications stage @@ -98,20 +112,22 @@ def sync( Returns: Any | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Deletes a communications stage + """ Deletes a communications stage Deletes a communications stage @@ -124,23 +140,27 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Deletes a communications stage + """ Deletes a communications stage Deletes a communications stage @@ -153,11 +173,11 @@ async def asyncio( Returns: Any | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/communications_stages/get_communications_stage.py b/rootly_sdk/api/communications_stages/get_communications_stage.py index 477e0d9a..f863a724 100644 --- a/rootly_sdk/api/communications_stages/get_communications_stage.py +++ b/rootly_sdk/api/communications_stages/get_communications_stage.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_stage_response import CommunicationsStageResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/communications/stages/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/stages/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CommunicationsStageResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsStageResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsStageResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsStageResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsStageResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CommunicationsStageResponse | ErrorsList]: - """Shows a communications stage + """ Shows a communications stage Shows details of a communications stage @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> CommunicationsStageResponse | ErrorsList | None: - """Shows a communications stage + """ Shows a communications stage Shows details of a communications stage @@ -104,20 +116,22 @@ def sync( Returns: CommunicationsStageResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CommunicationsStageResponse | ErrorsList]: - """Shows a communications stage + """ Shows a communications stage Shows details of a communications stage @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> CommunicationsStageResponse | ErrorsList | None: - """Shows a communications stage + """ Shows a communications stage Shows details of a communications stage @@ -159,11 +177,11 @@ async def asyncio( Returns: CommunicationsStageResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/communications_stages/list_communications_stages.py b/rootly_sdk/api/communications_stages/list_communications_stages.py index 174a6873..9b0bda8f 100644 --- a/rootly_sdk/api/communications_stages/list_communications_stages.py +++ b/rootly_sdk/api/communications_stages/list_communications_stages.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_stages_response import CommunicationsStagesResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,7 +26,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -45,23 +54,27 @@ def _get_kwargs( 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/communications/stages", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CommunicationsStagesResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsStagesResponse | None: if response.status_code == 200: response_200 = CommunicationsStagesResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -70,9 +83,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsStagesResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsStagesResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -94,8 +105,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CommunicationsStagesResponse]: - """Lists communications stages + """ Lists communications stages Lists communications stages @@ -117,19 +129,21 @@ def sync_detailed( Returns: Response[CommunicationsStagesResponse] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -138,7 +152,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -152,8 +165,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CommunicationsStagesResponse | None: - """Lists communications stages + """ Lists communications stages Lists communications stages @@ -175,22 +189,23 @@ def sync( Returns: CommunicationsStagesResponse - """ + """ + return sync_detailed( client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -205,8 +220,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CommunicationsStagesResponse]: - """Lists communications stages + """ Lists communications stages Lists communications stages @@ -228,26 +244,29 @@ async def asyncio_detailed( Returns: Response[CommunicationsStagesResponse] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -261,8 +280,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CommunicationsStagesResponse | None: - """Lists communications stages + """ Lists communications stages Lists communications stages @@ -284,20 +304,20 @@ async def asyncio( Returns: CommunicationsStagesResponse - """ - - return ( - await asyncio_detailed( - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +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/communications_stages/update_communications_stage.py b/rootly_sdk/api/communications_stages/update_communications_stage.py index 13ed4698..0f6cca44 100644 --- a/rootly_sdk/api/communications_stages/update_communications_stage.py +++ b/rootly_sdk/api/communications_stages/update_communications_stage.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_stage_response import CommunicationsStageResponse from ...models.errors_list import ErrorsList from ...models.update_communications_stage import UpdateCommunicationsStage -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateCommunicationsStage, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/communications/stages/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/stages/{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 -) -> CommunicationsStageResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsStageResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsStageResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsStageResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsStageResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCommunicationsStage, + ) -> Response[CommunicationsStageResponse | ErrorsList]: - """Updates a communications stage + """ Updates a communications stage Updates a communications stage @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsStage, + ) -> CommunicationsStageResponse | ErrorsList | None: - """Updates a communications stage + """ Updates a communications stage Updates a communications stage @@ -118,22 +130,24 @@ def sync( Returns: CommunicationsStageResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsStage, + ) -> Response[CommunicationsStageResponse | ErrorsList]: - """Updates a communications stage + """ Updates a communications stage Updates a communications stage @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsStage, + ) -> CommunicationsStageResponse | ErrorsList | None: - """Updates a communications stage + """ Updates a communications stage Updates a communications stage @@ -179,12 +197,12 @@ async def asyncio( Returns: CommunicationsStageResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/communications_templates/__init__.py b/rootly_sdk/api/communications_templates/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/communications_templates/__init__.py +++ b/rootly_sdk/api/communications_templates/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/communications_templates/create_communications_template.py b/rootly_sdk/api/communications_templates/create_communications_template.py index 5c62ff97..75de326c 100644 --- a/rootly_sdk/api/communications_templates/create_communications_template.py +++ b/rootly_sdk/api/communications_templates/create_communications_template.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_template_response import CommunicationsTemplateResponse from ...models.errors_list import ErrorsList from ...models.new_communications_template import NewCommunicationsTemplate -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCommunicationsTemplate, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/communications/templates", @@ -24,23 +34,27 @@ def _get_kwargs( _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 -) -> CommunicationsTemplateResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTemplateResponse | ErrorsList | None: if response.status_code == 201: response_201 = CommunicationsTemplateResponse.from_dict(response.json()) + + return response_201 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -49,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsTemplateResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +76,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCommunicationsTemplate, + ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """Creates a communications template + """ Creates a communications template Creates a new communications template from provided data @@ -78,10 +91,12 @@ def sync_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -90,13 +105,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCommunicationsTemplate, + ) -> CommunicationsTemplateResponse | ErrorsList | None: - """Creates a communications template + """ Creates a communications template Creates a new communications template from provided data @@ -109,20 +124,22 @@ def sync( Returns: CommunicationsTemplateResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCommunicationsTemplate, + ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """Creates a communications template + """ Creates a communications template Creates a new communications template from provided data @@ -135,23 +152,27 @@ async def asyncio_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewCommunicationsTemplate, + ) -> CommunicationsTemplateResponse | ErrorsList | None: - """Creates a communications template + """ Creates a communications template Creates a new communications template from provided data @@ -164,11 +185,11 @@ async def asyncio( Returns: CommunicationsTemplateResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/communications_templates/delete_communications_template.py b/rootly_sdk/api/communications_templates/delete_communications_template.py index 5750a7a4..3f846853 100644 --- a/rootly_sdk/api/communications_templates/delete_communications_template.py +++ b/rootly_sdk/api/communications_templates/delete_communications_template.py @@ -4,26 +4,35 @@ import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/communications/templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/templates/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -32,6 +41,8 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) + + return response_404 if client.raise_on_unexpected_status: @@ -53,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Deletes a communications template + """ Deletes a communications template Deletes a communications template @@ -67,10 +79,12 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -79,13 +93,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Deletes a communications template + """ Deletes a communications template Deletes a communications template @@ -98,20 +112,22 @@ def sync( Returns: Any | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Deletes a communications template + """ Deletes a communications template Deletes a communications template @@ -124,23 +140,27 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Deletes a communications template + """ Deletes a communications template Deletes a communications template @@ -153,11 +173,11 @@ async def asyncio( Returns: Any | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/communications_templates/get_communications_template.py b/rootly_sdk/api/communications_templates/get_communications_template.py index 84eda309..72af6c33 100644 --- a/rootly_sdk/api/communications_templates/get_communications_template.py +++ b/rootly_sdk/api/communications_templates/get_communications_template.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_template_response import CommunicationsTemplateResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/communications/templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/templates/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CommunicationsTemplateResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTemplateResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsTemplateResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsTemplateResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """Shows a communications template + """ Shows a communications template Shows details of a communications template @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> CommunicationsTemplateResponse | ErrorsList | None: - """Shows a communications template + """ Shows a communications template Shows details of a communications template @@ -104,20 +116,22 @@ def sync( Returns: CommunicationsTemplateResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """Shows a communications template + """ Shows a communications template Shows details of a communications template @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> CommunicationsTemplateResponse | ErrorsList | None: - """Shows a communications template + """ Shows a communications template Shows details of a communications template @@ -159,11 +177,11 @@ async def asyncio( Returns: CommunicationsTemplateResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/communications_templates/list_communications_templates.py b/rootly_sdk/api/communications_templates/list_communications_templates.py index 8d3f4fb0..f830e2e1 100644 --- a/rootly_sdk/api/communications_templates/list_communications_templates.py +++ b/rootly_sdk/api/communications_templates/list_communications_templates.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_templates_response import CommunicationsTemplatesResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,7 +27,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -48,23 +57,27 @@ def _get_kwargs( 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/communications/templates", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CommunicationsTemplatesResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTemplatesResponse | None: if response.status_code == 200: response_200 = CommunicationsTemplatesResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -73,9 +86,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsTemplatesResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTemplatesResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -98,8 +109,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CommunicationsTemplatesResponse]: - """Lists communications templates + """ Lists communications templates Lists communications templates @@ -122,20 +134,22 @@ def sync_detailed( Returns: Response[CommunicationsTemplatesResponse] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercommunication_type_id=filtercommunication_type_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercommunication_type_id=filtercommunication_type_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -144,7 +158,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -159,8 +172,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CommunicationsTemplatesResponse | None: - """Lists communications templates + """ Lists communications templates Lists communications templates @@ -183,23 +197,24 @@ def sync( Returns: CommunicationsTemplatesResponse - """ + """ + return sync_detailed( client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercommunication_type_id=filtercommunication_type_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercommunication_type_id=filtercommunication_type_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -215,8 +230,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CommunicationsTemplatesResponse]: - """Lists communications templates + """ Lists communications templates Lists communications templates @@ -239,27 +255,30 @@ async def asyncio_detailed( Returns: Response[CommunicationsTemplatesResponse] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercommunication_type_id=filtercommunication_type_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercommunication_type_id=filtercommunication_type_id, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -274,8 +293,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CommunicationsTemplatesResponse | None: - """Lists communications templates + """ Lists communications templates Lists communications templates @@ -298,21 +318,21 @@ async def asyncio( Returns: CommunicationsTemplatesResponse - """ - - return ( - await asyncio_detailed( - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercommunication_type_id=filtercommunication_type_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercommunication_type_id=filtercommunication_type_id, +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/communications_templates/update_communications_template.py b/rootly_sdk/api/communications_templates/update_communications_template.py index d3b3b5a0..6f985263 100644 --- a/rootly_sdk/api/communications_templates/update_communications_template.py +++ b/rootly_sdk/api/communications_templates/update_communications_template.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_template_response import CommunicationsTemplateResponse from ...models.errors_list import ErrorsList from ...models.update_communications_template import UpdateCommunicationsTemplate -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateCommunicationsTemplate, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/communications/templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/templates/{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 -) -> CommunicationsTemplateResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTemplateResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsTemplateResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsTemplateResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCommunicationsTemplate, + ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """Updates a communications template + """ Updates a communications template Updates a communications template @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsTemplate, + ) -> CommunicationsTemplateResponse | ErrorsList | None: - """Updates a communications template + """ Updates a communications template Updates a communications template @@ -118,22 +130,24 @@ def sync( Returns: CommunicationsTemplateResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsTemplate, + ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """Updates a communications template + """ Updates a communications template Updates a communications template @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsTemplate, + ) -> CommunicationsTemplateResponse | ErrorsList | None: - """Updates a communications template + """ Updates a communications template Updates a communications template @@ -179,12 +197,12 @@ async def asyncio( Returns: CommunicationsTemplateResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/communications_types/__init__.py b/rootly_sdk/api/communications_types/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/communications_types/__init__.py +++ b/rootly_sdk/api/communications_types/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/communications_types/create_communications_type.py b/rootly_sdk/api/communications_types/create_communications_type.py index 873b6e89..7d2806f4 100644 --- a/rootly_sdk/api/communications_types/create_communications_type.py +++ b/rootly_sdk/api/communications_types/create_communications_type.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_type_response import CommunicationsTypeResponse from ...models.errors_list import ErrorsList from ...models.new_communications_type import NewCommunicationsType -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCommunicationsType, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/communications/types", @@ -24,23 +34,27 @@ def _get_kwargs( _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 -) -> CommunicationsTypeResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTypeResponse | ErrorsList | None: if response.status_code == 201: response_201 = CommunicationsTypeResponse.from_dict(response.json()) + + return response_201 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -49,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsTypeResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTypeResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +76,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCommunicationsType, + ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """Creates a communications type + """ Creates a communications type Creates a new communications type from provided data @@ -78,10 +91,12 @@ def sync_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -90,13 +105,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCommunicationsType, + ) -> CommunicationsTypeResponse | ErrorsList | None: - """Creates a communications type + """ Creates a communications type Creates a new communications type from provided data @@ -109,20 +124,22 @@ def sync( Returns: CommunicationsTypeResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCommunicationsType, + ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """Creates a communications type + """ Creates a communications type Creates a new communications type from provided data @@ -135,23 +152,27 @@ async def asyncio_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewCommunicationsType, + ) -> CommunicationsTypeResponse | ErrorsList | None: - """Creates a communications type + """ Creates a communications type Creates a new communications type from provided data @@ -164,11 +185,11 @@ async def asyncio( Returns: CommunicationsTypeResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/communications_types/delete_communications_type.py b/rootly_sdk/api/communications_types/delete_communications_type.py index c14a941b..2460bf07 100644 --- a/rootly_sdk/api/communications_types/delete_communications_type.py +++ b/rootly_sdk/api/communications_types/delete_communications_type.py @@ -4,26 +4,35 @@ import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/communications/types/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/types/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -32,6 +41,8 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) + + return response_404 if client.raise_on_unexpected_status: @@ -53,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Deletes a communications type + """ Deletes a communications type Deletes a communications type @@ -67,10 +79,12 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -79,13 +93,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Deletes a communications type + """ Deletes a communications type Deletes a communications type @@ -98,20 +112,22 @@ def sync( Returns: Any | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Deletes a communications type + """ Deletes a communications type Deletes a communications type @@ -124,23 +140,27 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Deletes a communications type + """ Deletes a communications type Deletes a communications type @@ -153,11 +173,11 @@ async def asyncio( Returns: Any | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/communications_types/get_communications_type.py b/rootly_sdk/api/communications_types/get_communications_type.py index 1326081e..4f558e6a 100644 --- a/rootly_sdk/api/communications_types/get_communications_type.py +++ b/rootly_sdk/api/communications_types/get_communications_type.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_type_response import CommunicationsTypeResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/communications/types/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/types/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CommunicationsTypeResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTypeResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsTypeResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsTypeResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTypeResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """Shows a communications type + """ Shows a communications type Shows details of a communications type @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> CommunicationsTypeResponse | ErrorsList | None: - """Shows a communications type + """ Shows a communications type Shows details of a communications type @@ -104,20 +116,22 @@ def sync( Returns: CommunicationsTypeResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """Shows a communications type + """ Shows a communications type Shows details of a communications type @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> CommunicationsTypeResponse | ErrorsList | None: - """Shows a communications type + """ Shows a communications type Shows details of a communications type @@ -159,11 +177,11 @@ async def asyncio( Returns: CommunicationsTypeResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/communications_types/list_communications_types.py b/rootly_sdk/api/communications_types/list_communications_types.py index fdbac8ae..4522a426 100644 --- a/rootly_sdk/api/communications_types/list_communications_types.py +++ b/rootly_sdk/api/communications_types/list_communications_types.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_types_response import CommunicationsTypesResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,7 +26,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -45,23 +54,27 @@ def _get_kwargs( 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/communications/types", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CommunicationsTypesResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTypesResponse | None: if response.status_code == 200: response_200 = CommunicationsTypesResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -70,9 +83,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsTypesResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTypesResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -94,8 +105,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CommunicationsTypesResponse]: - """Lists communications types + """ Lists communications types Lists communications types @@ -117,19 +129,21 @@ def sync_detailed( Returns: Response[CommunicationsTypesResponse] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -138,7 +152,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -152,8 +165,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CommunicationsTypesResponse | None: - """Lists communications types + """ Lists communications types Lists communications types @@ -175,22 +189,23 @@ def sync( Returns: CommunicationsTypesResponse - """ + """ + return sync_detailed( client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -205,8 +220,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CommunicationsTypesResponse]: - """Lists communications types + """ Lists communications types Lists communications types @@ -228,26 +244,29 @@ async def asyncio_detailed( Returns: Response[CommunicationsTypesResponse] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -261,8 +280,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CommunicationsTypesResponse | None: - """Lists communications types + """ Lists communications types Lists communications types @@ -284,20 +304,20 @@ async def asyncio( Returns: CommunicationsTypesResponse - """ - - return ( - await asyncio_detailed( - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +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/communications_types/update_communications_type.py b/rootly_sdk/api/communications_types/update_communications_type.py index 7e463b14..e5475fdc 100644 --- a/rootly_sdk/api/communications_types/update_communications_type.py +++ b/rootly_sdk/api/communications_types/update_communications_type.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.communications_type_response import CommunicationsTypeResponse from ...models.errors_list import ErrorsList from ...models.update_communications_type import UpdateCommunicationsType -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateCommunicationsType, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/communications/types/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/communications/types/{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 -) -> CommunicationsTypeResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTypeResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsTypeResponse.from_dict(response.json()) + + return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CommunicationsTypeResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTypeResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCommunicationsType, + ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """Updates a communications type + """ Updates a communications type Updates a communications type @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsType, + ) -> CommunicationsTypeResponse | ErrorsList | None: - """Updates a communications type + """ Updates a communications type Updates a communications type @@ -118,22 +130,24 @@ def sync( Returns: CommunicationsTypeResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsType, + ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """Updates a communications type + """ Updates a communications type Updates a communications type @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsType, + ) -> CommunicationsTypeResponse | ErrorsList | None: - """Updates a communications type + """ Updates a communications type Updates a communications type @@ -179,12 +197,12 @@ async def asyncio( Returns: CommunicationsTypeResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/custom_forms/__init__.py b/rootly_sdk/api/custom_forms/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/custom_forms/__init__.py +++ b/rootly_sdk/api/custom_forms/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/custom_forms/create_custom_form.py b/rootly_sdk/api/custom_forms/create_custom_form.py index 3ce9ad7d..f3f56427 100644 --- a/rootly_sdk/api/custom_forms/create_custom_form.py +++ b/rootly_sdk/api/custom_forms/create_custom_form.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_form_response import CustomFormResponse from ...models.errors_list import ErrorsList from ...models.new_custom_form import NewCustomForm -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCustomForm, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/custom_forms", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> CustomFormResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFormResponse | ErrorsList | None: if response.status_code == 201: response_201 = CustomFormResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFormResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCustomForm, + ) -> Response[CustomFormResponse | ErrorsList]: - """Creates a custom form + """ Creates a custom form Creates a new custom form from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCustomForm, + ) -> CustomFormResponse | ErrorsList | None: - """Creates a custom form + """ Creates a custom form Creates a new custom form from provided data @@ -114,20 +131,22 @@ def sync( Returns: CustomFormResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCustomForm, + ) -> Response[CustomFormResponse | ErrorsList]: - """Creates a custom form + """ Creates a custom form Creates a new custom form from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewCustomForm, + ) -> CustomFormResponse | ErrorsList | None: - """Creates a custom form + """ Creates a custom form Creates a new custom form from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CustomFormResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/custom_forms/delete_custom_form.py b/rootly_sdk/api/custom_forms/delete_custom_form.py index 596f17a9..b649af70 100644 --- a/rootly_sdk/api/custom_forms/delete_custom_form.py +++ b/rootly_sdk/api/custom_forms/delete_custom_form.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.custom_form_response import CustomFormResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/custom_forms/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/custom_forms/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CustomFormResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFormResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFormResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFormResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CustomFormResponse | ErrorsList]: - """Delete a custom form + """ Delete a custom form Delete a specific custom form by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> CustomFormResponse | ErrorsList | None: - """Delete a custom form + """ Delete a custom form Delete a specific custom form by id @@ -105,20 +117,22 @@ def sync( Returns: CustomFormResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CustomFormResponse | ErrorsList]: - """Delete a custom form + """ Delete a custom form Delete a specific custom form by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> CustomFormResponse | ErrorsList | None: - """Delete a custom form + """ Delete a custom form Delete a specific custom form by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CustomFormResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/custom_forms/get_custom_form.py b/rootly_sdk/api/custom_forms/get_custom_form.py index bddf53a7..bea2c487 100644 --- a/rootly_sdk/api/custom_forms/get_custom_form.py +++ b/rootly_sdk/api/custom_forms/get_custom_form.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.custom_form_response import CustomFormResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/custom_forms/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/custom_forms/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CustomFormResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFormResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFormResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFormResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CustomFormResponse | ErrorsList]: - """Retrieves a custom form + """ Retrieves a custom form Retrieves a specific custom form by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> CustomFormResponse | ErrorsList | None: - """Retrieves a custom form + """ Retrieves a custom form Retrieves a specific custom form by id @@ -105,20 +117,22 @@ def sync( Returns: CustomFormResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[CustomFormResponse | ErrorsList]: - """Retrieves a custom form + """ Retrieves a custom form Retrieves a specific custom form by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> CustomFormResponse | ErrorsList | None: - """Retrieves a custom form + """ Retrieves a custom form Retrieves a specific custom form by id @@ -160,11 +178,11 @@ async def asyncio( Returns: CustomFormResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/custom_forms/list_custom_forms.py b/rootly_sdk/api/custom_forms/list_custom_forms.py index 0308a583..eb7f6a98 100644 --- a/rootly_sdk/api/custom_forms/list_custom_forms.py +++ b/rootly_sdk/api/custom_forms/list_custom_forms.py @@ -1,13 +1,18 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_form_list import CustomFormList from ...models.errors_list import ErrorsList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -23,7 +28,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -49,28 +58,34 @@ def _get_kwargs( 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/custom_forms", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CustomFormList | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFormList | ErrorsList | None: if response.status_code == 200: response_200 = CustomFormList.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: @@ -79,9 +94,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFormList | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -104,8 +117,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CustomFormList | ErrorsList]: - """List custom forms + """ List custom forms List custom forms @@ -128,20 +142,22 @@ def sync_detailed( Returns: Response[CustomFormList | ErrorsList] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercommand=filtercommand, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercommand=filtercommand, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -150,7 +166,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -165,8 +180,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CustomFormList | ErrorsList | None: - """List custom forms + """ List custom forms List custom forms @@ -189,23 +205,24 @@ def sync( Returns: CustomFormList | ErrorsList - """ + """ + return sync_detailed( client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercommand=filtercommand, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercommand=filtercommand, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -221,8 +238,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[CustomFormList | ErrorsList]: - """List custom forms + """ List custom forms List custom forms @@ -245,27 +263,30 @@ async def asyncio_detailed( Returns: Response[CustomFormList | ErrorsList] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercommand=filtercommand, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercommand=filtercommand, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -280,8 +301,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> CustomFormList | ErrorsList | None: - """List custom forms + """ List custom forms List custom forms @@ -304,21 +326,21 @@ async def asyncio( Returns: CustomFormList | ErrorsList - """ - - return ( - await asyncio_detailed( - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercommand=filtercommand, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercommand=filtercommand, +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/custom_forms/update_custom_form.py b/rootly_sdk/api/custom_forms/update_custom_form.py index 1b640d81..b9a95a04 100644 --- a/rootly_sdk/api/custom_forms/update_custom_form.py +++ b/rootly_sdk/api/custom_forms/update_custom_form.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.custom_form_response import CustomFormResponse from ...models.errors_list import ErrorsList from ...models.update_custom_form import UpdateCustomForm -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateCustomForm, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/custom_forms/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/custom_forms/{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 -) -> CustomFormResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFormResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFormResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFormResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCustomForm, + ) -> Response[CustomFormResponse | ErrorsList]: - """Update a custom form + """ Update a custom form Update a specific custom form by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, + ) -> CustomFormResponse | ErrorsList | None: - """Update a custom form + """ Update a custom form Update a specific custom form by id @@ -119,22 +131,24 @@ def sync( Returns: CustomFormResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, + ) -> Response[CustomFormResponse | ErrorsList]: - """Update a custom form + """ Update a custom form Update a specific custom form by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, + ) -> CustomFormResponse | ErrorsList | None: - """Update a custom form + """ Update a custom form Update a specific custom form by id @@ -180,12 +198,12 @@ async def asyncio( Returns: CustomFormResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/dashboard_panels/__init__.py b/rootly_sdk/api/dashboard_panels/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/dashboard_panels/__init__.py +++ b/rootly_sdk/api/dashboard_panels/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py index 89a6b704..89493adb 100644 --- a/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.dashboard_panel_response import DashboardPanelResponse from ...models.errors_list import ErrorsList from ...models.new_dashboard_panel import NewDashboardPanel -from ...types import Response +from typing import cast + def _get_kwargs( dashboard_id: str, *, body: NewDashboardPanel, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/dashboards/{dashboard_id}/panels".format( - dashboard_id=quote(str(dashboard_id), safe=""), - ), + "url": "/v1/dashboards/{dashboard_id}/panels".format(dashboard_id=quote(str(dashboard_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 -) -> DashboardPanelResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardPanelResponse | ErrorsList | None: if response.status_code == 201: response_201 = DashboardPanelResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardPanelResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewDashboardPanel, + ) -> Response[DashboardPanelResponse | ErrorsList]: - """Creates a dashboard panel + """ Creates a dashboard panel Creates a new dashboard panel from provided data @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[DashboardPanelResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( dashboard_id=dashboard_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( dashboard_id: str, *, client: AuthenticatedClient, body: NewDashboardPanel, + ) -> DashboardPanelResponse | ErrorsList | None: - """Creates a dashboard panel + """ Creates a dashboard panel Creates a new dashboard panel from provided data @@ -118,22 +130,24 @@ def sync( Returns: DashboardPanelResponse | ErrorsList - """ + """ + return sync_detailed( dashboard_id=dashboard_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( dashboard_id: str, *, client: AuthenticatedClient, body: NewDashboardPanel, + ) -> Response[DashboardPanelResponse | ErrorsList]: - """Creates a dashboard panel + """ Creates a dashboard panel Creates a new dashboard panel from provided data @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( dashboard_id=dashboard_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( dashboard_id: str, *, client: AuthenticatedClient, body: NewDashboardPanel, + ) -> DashboardPanelResponse | ErrorsList | None: - """Creates a dashboard panel + """ Creates a dashboard panel Creates a new dashboard panel from provided data @@ -179,12 +197,12 @@ async def asyncio( Returns: DashboardPanelResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - dashboard_id=dashboard_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + dashboard_id=dashboard_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py index d630d717..1edd0a41 100644 --- a/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py @@ -1,33 +1,44 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.dashboard_panel_response import DashboardPanelResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/dashboard_panels/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/dashboard_panels/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardPanelResponse | None: if response.status_code == 200: response_200 = DashboardPanelResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -36,9 +47,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardPanelResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -51,8 +60,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[DashboardPanelResponse]: - """Delete a dashboard panel + """ Delete a dashboard panel Delete a specific dashboard panel by id @@ -65,10 +75,12 @@ def sync_detailed( Returns: Response[DashboardPanelResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -77,13 +89,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> DashboardPanelResponse | None: - """Delete a dashboard panel + """ Delete a dashboard panel Delete a specific dashboard panel by id @@ -96,20 +108,22 @@ def sync( Returns: DashboardPanelResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[DashboardPanelResponse]: - """Delete a dashboard panel + """ Delete a dashboard panel Delete a specific dashboard panel by id @@ -122,23 +136,27 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> DashboardPanelResponse | None: - """Delete a dashboard panel + """ Delete a dashboard panel Delete a specific dashboard panel by id @@ -151,11 +169,11 @@ async def asyncio( Returns: DashboardPanelResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py index 825e1ab8..c90c415e 100644 --- a/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.dashboard_panel_response import DashboardPanelResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/dashboard_panels/{id}/duplicate".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/dashboard_panels/{id}/duplicate".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> DashboardPanelResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardPanelResponse | ErrorsList | None: if response.status_code == 201: response_201 = DashboardPanelResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardPanelResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[DashboardPanelResponse | ErrorsList]: - """Duplicates a dashboard panel + """ Duplicates a dashboard panel Duplicates a dashboard panel @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[DashboardPanelResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> DashboardPanelResponse | ErrorsList | None: - """Duplicates a dashboard panel + """ Duplicates a dashboard panel Duplicates a dashboard panel @@ -104,20 +116,22 @@ def sync( Returns: DashboardPanelResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[DashboardPanelResponse | ErrorsList]: - """Duplicates a dashboard panel + """ Duplicates a dashboard panel Duplicates a dashboard panel @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> DashboardPanelResponse | ErrorsList | None: - """Duplicates a dashboard panel + """ Duplicates a dashboard panel Duplicates a dashboard panel @@ -159,11 +177,11 @@ async def asyncio( Returns: DashboardPanelResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py index 9bee49b7..dfe43d2f 100644 --- a/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.dashboard_panel_response import DashboardPanelResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( params["time_zone"] = time_zone + 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/dashboard_panels/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/dashboard_panels/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardPanelResponse | None: if response.status_code == 200: response_200 = DashboardPanelResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -51,9 +63,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardPanelResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +79,9 @@ def sync_detailed( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, + ) -> Response[DashboardPanelResponse]: - """Retrieves a dashboard panel + """ Retrieves a dashboard panel Retrieves a specific dashboard panel by id @@ -86,13 +97,15 @@ def sync_detailed( Returns: Response[DashboardPanelResponse] - """ + """ + kwargs = _get_kwargs( id=id, - range_=range_, - period=period, - time_zone=time_zone, +range_=range_, +period=period, +time_zone=time_zone, + ) response = client.get_httpx_client().request( @@ -101,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, @@ -109,8 +121,9 @@ def sync( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, + ) -> DashboardPanelResponse | None: - """Retrieves a dashboard panel + """ Retrieves a dashboard panel Retrieves a specific dashboard panel by id @@ -126,16 +139,17 @@ def sync( Returns: DashboardPanelResponse - """ + """ + return sync_detailed( id=id, - client=client, - range_=range_, - period=period, - time_zone=time_zone, - ).parsed +client=client, +range_=range_, +period=period, +time_zone=time_zone, + ).parsed async def asyncio_detailed( id: str, @@ -144,8 +158,9 @@ async def asyncio_detailed( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, + ) -> Response[DashboardPanelResponse]: - """Retrieves a dashboard panel + """ Retrieves a dashboard panel Retrieves a specific dashboard panel by id @@ -161,20 +176,23 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse] - """ + """ + kwargs = _get_kwargs( id=id, - range_=range_, - period=period, - time_zone=time_zone, +range_=range_, +period=period, +time_zone=time_zone, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, @@ -182,8 +200,9 @@ async def asyncio( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, + ) -> DashboardPanelResponse | None: - """Retrieves a dashboard panel + """ Retrieves a dashboard panel Retrieves a specific dashboard panel by id @@ -199,14 +218,14 @@ async def asyncio( Returns: DashboardPanelResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - range_=range_, - period=period, - time_zone=time_zone, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +range_=range_, +period=period, +time_zone=time_zone, + + )).parsed diff --git a/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py b/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py index d807646c..98c004c6 100644 --- a/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py +++ b/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.dashboard_panel_list import DashboardPanelList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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/dashboards/{dashboard_id}/panels".format( - dashboard_id=quote(str(dashboard_id), safe=""), - ), + "url": "/v1/dashboards/{dashboard_id}/panels".format(dashboard_id=quote(str(dashboard_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardPanelList | None: if response.status_code == 200: response_200 = DashboardPanelList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -67,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[DashboardPanelList]: - """List dashboard panels + """ List dashboard panels List dashboard panels @@ -84,13 +97,15 @@ def sync_detailed( Returns: Response[DashboardPanelList] - """ + """ + kwargs = _get_kwargs( dashboard_id=dashboard_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -99,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( dashboard_id: str, *, @@ -107,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> DashboardPanelList | None: - """List dashboard panels + """ List dashboard panels List dashboard panels @@ -124,16 +139,17 @@ def sync( Returns: DashboardPanelList - """ + """ + return sync_detailed( dashboard_id=dashboard_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( dashboard_id: str, @@ -142,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[DashboardPanelList]: - """List dashboard panels + """ List dashboard panels List dashboard panels @@ -159,20 +176,23 @@ async def asyncio_detailed( Returns: Response[DashboardPanelList] - """ + """ + kwargs = _get_kwargs( dashboard_id=dashboard_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( dashboard_id: str, *, @@ -180,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> DashboardPanelList | None: - """List dashboard panels + """ List dashboard panels List dashboard panels @@ -197,14 +218,14 @@ async def asyncio( Returns: DashboardPanelList - """ - - return ( - await asyncio_detailed( - dashboard_id=dashboard_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + dashboard_id=dashboard_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py index 8c15920b..de7e9262 100644 --- a/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.dashboard_panel_response import DashboardPanelResponse from ...models.update_dashboard_panel import UpdateDashboardPanel -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateDashboardPanel, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/dashboard_panels/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/dashboard_panels/{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) -> DashboardPanelResponse | None: if response.status_code == 200: response_200 = DashboardPanelResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -45,9 +56,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardPanelResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -61,8 +70,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateDashboardPanel, + ) -> Response[DashboardPanelResponse]: - """Update a dashboard panel + """ Update a dashboard panel Update a specific dashboard panel by id @@ -76,11 +86,13 @@ def sync_detailed( Returns: Response[DashboardPanelResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -89,14 +101,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateDashboardPanel, + ) -> DashboardPanelResponse | None: - """Update a dashboard panel + """ Update a dashboard panel Update a specific dashboard panel by id @@ -110,22 +122,24 @@ def sync( Returns: DashboardPanelResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateDashboardPanel, + ) -> Response[DashboardPanelResponse]: - """Update a dashboard panel + """ Update a dashboard panel Update a specific dashboard panel by id @@ -139,25 +153,29 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateDashboardPanel, + ) -> DashboardPanelResponse | None: - """Update a dashboard panel + """ Update a dashboard panel Update a specific dashboard panel by id @@ -171,12 +189,12 @@ async def asyncio( Returns: DashboardPanelResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/dashboards/__init__.py b/rootly_sdk/api/dashboards/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/dashboards/__init__.py +++ b/rootly_sdk/api/dashboards/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/dashboards/create_dashboard.py b/rootly_sdk/api/dashboards/create_dashboard.py index 32bb4589..8a2db4b3 100644 --- a/rootly_sdk/api/dashboards/create_dashboard.py +++ b/rootly_sdk/api/dashboards/create_dashboard.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList from ...models.new_dashboard import NewDashboard -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewDashboard, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/dashboards", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> DashboardResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: if response.status_code == 201: response_201 = DashboardResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewDashboard, + ) -> Response[DashboardResponse | ErrorsList]: - """Creates a dashboard + """ Creates a dashboard Creates a new dashboard from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewDashboard, + ) -> DashboardResponse | ErrorsList | None: - """Creates a dashboard + """ Creates a dashboard Creates a new dashboard from provided data @@ -114,20 +131,22 @@ def sync( Returns: DashboardResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewDashboard, + ) -> Response[DashboardResponse | ErrorsList]: - """Creates a dashboard + """ Creates a dashboard Creates a new dashboard from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewDashboard, + ) -> DashboardResponse | ErrorsList | None: - """Creates a dashboard + """ Creates a dashboard Creates a new dashboard from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/dashboards/delete_dashboard.py b/rootly_sdk/api/dashboards/delete_dashboard.py index e16a82d5..dcbb7fd2 100644 --- a/rootly_sdk/api/dashboards/delete_dashboard.py +++ b/rootly_sdk/api/dashboards/delete_dashboard.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/dashboards/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/dashboards/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> DashboardResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: if response.status_code == 200: response_200 = DashboardResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[DashboardResponse | ErrorsList]: - """Delete a dashboard + """ Delete a dashboard Delete a specific dashboard by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> DashboardResponse | ErrorsList | None: - """Delete a dashboard + """ Delete a dashboard Delete a specific dashboard by id @@ -105,20 +117,22 @@ def sync( Returns: DashboardResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[DashboardResponse | ErrorsList]: - """Delete a dashboard + """ Delete a dashboard Delete a specific dashboard by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> DashboardResponse | ErrorsList | None: - """Delete a dashboard + """ Delete a dashboard Delete a specific dashboard by id @@ -160,11 +178,11 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/dashboards/duplicate_dashboard.py b/rootly_sdk/api/dashboards/duplicate_dashboard.py index 2c874a17..666275ab 100644 --- a/rootly_sdk/api/dashboards/duplicate_dashboard.py +++ b/rootly_sdk/api/dashboards/duplicate_dashboard.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/dashboards/{id}/duplicate".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/dashboards/{id}/duplicate".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> DashboardResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: if response.status_code == 201: response_201 = DashboardResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[DashboardResponse | ErrorsList]: - """Duplicates a dashboard + """ Duplicates a dashboard Duplicates a dashboard @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> DashboardResponse | ErrorsList | None: - """Duplicates a dashboard + """ Duplicates a dashboard Duplicates a dashboard @@ -105,20 +117,22 @@ def sync( Returns: DashboardResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[DashboardResponse | ErrorsList]: - """Duplicates a dashboard + """ Duplicates a dashboard Duplicates a dashboard @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> DashboardResponse | ErrorsList | None: - """Duplicates a dashboard + """ Duplicates a dashboard Duplicates a dashboard @@ -160,11 +178,11 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/dashboards/get_dashboard.py b/rootly_sdk/api/dashboards/get_dashboard.py index f20260b3..2a38c62a 100644 --- a/rootly_sdk/api/dashboards/get_dashboard.py +++ b/rootly_sdk/api/dashboards/get_dashboard.py @@ -1,23 +1,32 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList +from ...models.get_dashboard_include import check_get_dashboard_include from ...models.get_dashboard_include import GetDashboardInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, include: GetDashboardInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -27,30 +36,34 @@ def _get_kwargs( params["include"] = json_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/dashboards/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/dashboards/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> DashboardResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: if response.status_code == 200: response_200 = DashboardResponse.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: @@ -59,9 +72,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +86,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetDashboardInclude | Unset = UNSET, + ) -> Response[DashboardResponse | ErrorsList]: - """Retrieves a dashboard + """ Retrieves a dashboard Retrieves a specific dashboard by id @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetDashboardInclude | Unset = UNSET, + ) -> DashboardResponse | ErrorsList | None: - """Retrieves a dashboard + """ Retrieves a dashboard Retrieves a specific dashboard by id @@ -124,22 +138,24 @@ def sync( Returns: DashboardResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetDashboardInclude | Unset = UNSET, + ) -> Response[DashboardResponse | ErrorsList]: - """Retrieves a dashboard + """ Retrieves a dashboard Retrieves a specific dashboard by id @@ -153,25 +169,29 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetDashboardInclude | Unset = UNSET, + ) -> DashboardResponse | ErrorsList | None: - """Retrieves a dashboard + """ Retrieves a dashboard Retrieves a specific dashboard by id @@ -185,12 +205,12 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/dashboards/list_dashboards.py b/rootly_sdk/api/dashboards/list_dashboards.py index c0c41cd8..f94d1f4e 100644 --- a/rootly_sdk/api/dashboards/list_dashboards.py +++ b/rootly_sdk/api/dashboards/list_dashboards.py @@ -1,13 +1,19 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.dashboard_list import DashboardList +from ...models.list_dashboards_include import check_list_dashboards_include from ...models.list_dashboards_include import ListDashboardsInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -15,7 +21,11 @@ def _get_kwargs( include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,21 +39,27 @@ def _get_kwargs( 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/dashboards", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardList | None: if response.status_code == 200: response_200 = DashboardList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -67,8 +83,9 @@ def sync_detailed( include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[DashboardList]: - """List dashboards + """ List dashboards List dashboards @@ -83,12 +100,14 @@ def sync_detailed( Returns: Response[DashboardList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -97,15 +116,15 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> DashboardList | None: - """List dashboards + """ List dashboards List dashboards @@ -120,15 +139,16 @@ def sync( Returns: DashboardList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -136,8 +156,9 @@ async def asyncio_detailed( include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[DashboardList]: - """List dashboards + """ List dashboards List dashboards @@ -152,27 +173,31 @@ async def asyncio_detailed( Returns: Response[DashboardList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> DashboardList | None: - """List dashboards + """ List dashboards List dashboards @@ -187,13 +212,13 @@ async def asyncio( Returns: DashboardList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/dashboards/set_default_dashboard.py b/rootly_sdk/api/dashboards/set_default_dashboard.py index 7cf3246d..72113a45 100644 --- a/rootly_sdk/api/dashboards/set_default_dashboard.py +++ b/rootly_sdk/api/dashboards/set_default_dashboard.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/dashboards/{id}/set_default".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/dashboards/{id}/set_default".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> DashboardResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: if response.status_code == 200: response_200 = DashboardResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[DashboardResponse | ErrorsList]: - """Sets dashboard to user default + """ Sets dashboard to user default Sets dashboard to user default @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> DashboardResponse | ErrorsList | None: - """Sets dashboard to user default + """ Sets dashboard to user default Sets dashboard to user default @@ -105,20 +117,22 @@ def sync( Returns: DashboardResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[DashboardResponse | ErrorsList]: - """Sets dashboard to user default + """ Sets dashboard to user default Sets dashboard to user default @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> DashboardResponse | ErrorsList | None: - """Sets dashboard to user default + """ Sets dashboard to user default Sets dashboard to user default @@ -160,11 +178,11 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/dashboards/update_dashboard.py b/rootly_sdk/api/dashboards/update_dashboard.py index 56ac6566..59a90137 100644 --- a/rootly_sdk/api/dashboards/update_dashboard.py +++ b/rootly_sdk/api/dashboards/update_dashboard.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList from ...models.update_dashboard import UpdateDashboard -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateDashboard, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/dashboards/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/dashboards/{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 -) -> DashboardResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: if response.status_code == 200: response_200 = DashboardResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[DashboardResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateDashboard, + ) -> Response[DashboardResponse | ErrorsList]: - """Update a dashboard + """ Update a dashboard Update a specific dashboard by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, + ) -> DashboardResponse | ErrorsList | None: - """Update a dashboard + """ Update a dashboard Update a specific dashboard by id @@ -119,22 +131,24 @@ def sync( Returns: DashboardResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, + ) -> Response[DashboardResponse | ErrorsList]: - """Update a dashboard + """ Update a dashboard Update a specific dashboard by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, + ) -> DashboardResponse | ErrorsList | None: - """Update a dashboard + """ Update a dashboard Update a specific dashboard by id @@ -180,12 +198,12 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/deprecated_custom_field_options/__init__.py b/rootly_sdk/api/deprecated_custom_field_options/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/deprecated_custom_field_options/__init__.py +++ b/rootly_sdk/api/deprecated_custom_field_options/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 65314afc..df9fb399 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_option_response import CustomFieldOptionResponse from ...models.errors_list import ErrorsList from ...models.new_custom_field_option import NewCustomFieldOption -from ...types import Response +from typing import cast + def _get_kwargs( custom_field_id: str, *, body: NewCustomFieldOption, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/custom_fields/{custom_field_id}/options".format( - custom_field_id=quote(str(custom_field_id), safe=""), - ), + "url": "/v1/custom_fields/{custom_field_id}/options".format(custom_field_id=quote(str(custom_field_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 -) -> CustomFieldOptionResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldOptionResponse | ErrorsList | None: if response.status_code == 201: response_201 = CustomFieldOptionResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFieldOptionResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCustomFieldOption, + ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """[DEPRECATED] Creates a custom field option + """ [DEPRECATED] Creates a custom field option [DEPRECATED] Use form field endpoints instead. Creates a new custom field option from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( custom_field_id=custom_field_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( custom_field_id: str, *, client: AuthenticatedClient, body: NewCustomFieldOption, + ) -> CustomFieldOptionResponse | ErrorsList | None: - """[DEPRECATED] Creates a custom field option + """ [DEPRECATED] Creates a custom field option [DEPRECATED] Use form field endpoints instead. Creates a new custom field option from provided data @@ -123,22 +137,24 @@ def sync( Returns: CustomFieldOptionResponse | ErrorsList - """ + """ + return sync_detailed( custom_field_id=custom_field_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( custom_field_id: str, *, client: AuthenticatedClient, body: NewCustomFieldOption, + ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """[DEPRECATED] Creates a custom field option + """ [DEPRECATED] Creates a custom field option [DEPRECATED] Use form field endpoints instead. Creates a new custom field option from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( custom_field_id=custom_field_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( custom_field_id: str, *, client: AuthenticatedClient, body: NewCustomFieldOption, + ) -> CustomFieldOptionResponse | ErrorsList | None: - """[DEPRECATED] Creates a custom field option + """ [DEPRECATED] Creates a custom field option [DEPRECATED] Use form field endpoints instead. Creates a new custom field option from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: CustomFieldOptionResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - custom_field_id=custom_field_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + custom_field_id=custom_field_id, +client=client, +body=body, + + )).parsed 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 3968cd4d..5878bd33 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_option_response import CustomFieldOptionResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/custom_field_options/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/custom_field_options/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CustomFieldOptionResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldOptionResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldOptionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFieldOptionResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """[DEPRECATED] Delete a custom field option + """ [DEPRECATED] Delete a custom field option [DEPRECATED] Use form field endpoints instead. Delete a specific Custom Field Option by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> CustomFieldOptionResponse | ErrorsList | None: - """[DEPRECATED] Delete a custom field option + """ [DEPRECATED] Delete a custom field option [DEPRECATED] Use form field endpoints instead. Delete a specific Custom Field Option by id @@ -104,20 +116,22 @@ def sync( Returns: CustomFieldOptionResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """[DEPRECATED] Delete a custom field option + """ [DEPRECATED] Delete a custom field option [DEPRECATED] Use form field endpoints instead. Delete a specific Custom Field Option by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> CustomFieldOptionResponse | ErrorsList | None: - """[DEPRECATED] Delete a custom field option + """ [DEPRECATED] Delete a custom field option [DEPRECATED] Use form field endpoints instead. Delete a specific Custom Field Option by id @@ -159,11 +177,11 @@ async def asyncio( Returns: CustomFieldOptionResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 afdda05c..9146f885 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_option_response import CustomFieldOptionResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/custom_field_options/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/custom_field_options/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CustomFieldOptionResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldOptionResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldOptionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFieldOptionResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """[DEPRECATED] Retrieves a custom field option + """ [DEPRECATED] Retrieves a custom field option [DEPRECATED] Use form field endpoints instead. Retrieves a specific custom field option by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> CustomFieldOptionResponse | ErrorsList | None: - """[DEPRECATED] Retrieves a custom field option + """ [DEPRECATED] Retrieves a custom field option [DEPRECATED] Use form field endpoints instead. Retrieves a specific custom field option by id @@ -104,20 +116,22 @@ def sync( Returns: CustomFieldOptionResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """[DEPRECATED] Retrieves a custom field option + """ [DEPRECATED] Retrieves a custom field option [DEPRECATED] Use form field endpoints instead. Retrieves a specific custom field option by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> CustomFieldOptionResponse | ErrorsList | None: - """[DEPRECATED] Retrieves a custom field option + """ [DEPRECATED] Retrieves a custom field option [DEPRECATED] Use form field endpoints instead. Retrieves a specific custom field option by id @@ -159,11 +177,11 @@ async def asyncio( Returns: CustomFieldOptionResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 bca688b3..f0971722 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_option_list import CustomFieldOptionList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -18,7 +22,11 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -32,23 +40,27 @@ def _get_kwargs( params["filter[color]"] = filtercolor + 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/custom_fields/{custom_field_id}/options".format( - custom_field_id=quote(str(custom_field_id), safe=""), - ), + "url": "/v1/custom_fields/{custom_field_id}/options".format(custom_field_id=quote(str(custom_field_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldOptionList | None: if response.status_code == 200: response_200 = CustomFieldOptionList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -57,9 +69,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFieldOptionList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -77,8 +87,9 @@ def sync_detailed( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> Response[CustomFieldOptionList]: - """[DEPRECATED] List custom field options + """ [DEPRECATED] List custom field options [DEPRECATED] Use form field endpoints instead. List custom field options @@ -96,15 +107,17 @@ def sync_detailed( Returns: Response[CustomFieldOptionList] - """ + """ + kwargs = _get_kwargs( custom_field_id=custom_field_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtervalue=filtervalue, - filtercolor=filtercolor, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtervalue=filtervalue, +filtercolor=filtercolor, + ) response = client.get_httpx_client().request( @@ -113,7 +126,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( custom_field_id: str, *, @@ -123,8 +135,9 @@ def sync( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> CustomFieldOptionList | None: - """[DEPRECATED] List custom field options + """ [DEPRECATED] List custom field options [DEPRECATED] Use form field endpoints instead. List custom field options @@ -142,18 +155,19 @@ def sync( Returns: CustomFieldOptionList - """ + """ + return sync_detailed( custom_field_id=custom_field_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtervalue=filtervalue, - filtercolor=filtercolor, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtervalue=filtervalue, +filtercolor=filtercolor, + ).parsed async def asyncio_detailed( custom_field_id: str, @@ -164,8 +178,9 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> Response[CustomFieldOptionList]: - """[DEPRECATED] List custom field options + """ [DEPRECATED] List custom field options [DEPRECATED] Use form field endpoints instead. List custom field options @@ -183,22 +198,25 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionList] - """ + """ + kwargs = _get_kwargs( custom_field_id=custom_field_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtervalue=filtervalue, - filtercolor=filtercolor, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtervalue=filtervalue, +filtercolor=filtercolor, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( custom_field_id: str, *, @@ -208,8 +226,9 @@ async def asyncio( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> CustomFieldOptionList | None: - """[DEPRECATED] List custom field options + """ [DEPRECATED] List custom field options [DEPRECATED] Use form field endpoints instead. List custom field options @@ -227,16 +246,16 @@ async def asyncio( Returns: CustomFieldOptionList - """ - - return ( - await asyncio_detailed( - custom_field_id=custom_field_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtervalue=filtervalue, - filtercolor=filtercolor, - ) - ).parsed + """ + + + return (await asyncio_detailed( + custom_field_id=custom_field_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtervalue=filtervalue, +filtercolor=filtercolor, + + )).parsed 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 394362f8..feb8b807 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_option_response import CustomFieldOptionResponse from ...models.errors_list import ErrorsList from ...models.update_custom_field_option import UpdateCustomFieldOption -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateCustomFieldOption, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/custom_field_options/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/custom_field_options/{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 -) -> CustomFieldOptionResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldOptionResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldOptionResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFieldOptionResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCustomFieldOption, + ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """[DEPRECATED] Update a custom field option + """ [DEPRECATED] Update a custom field option [DEPRECATED] Use form field endpoints instead. Update a specific custom field option by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateCustomFieldOption, + ) -> CustomFieldOptionResponse | ErrorsList | None: - """[DEPRECATED] Update a custom field option + """ [DEPRECATED] Update a custom field option [DEPRECATED] Use form field endpoints instead. Update a specific custom field option by id @@ -118,22 +130,24 @@ def sync( Returns: CustomFieldOptionResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCustomFieldOption, + ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """[DEPRECATED] Update a custom field option + """ [DEPRECATED] Update a custom field option [DEPRECATED] Use form field endpoints instead. Update a specific custom field option by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCustomFieldOption, + ) -> CustomFieldOptionResponse | ErrorsList | None: - """[DEPRECATED] Update a custom field option + """ [DEPRECATED] Update a custom field option [DEPRECATED] Use form field endpoints instead. Update a specific custom field option by id @@ -179,12 +197,12 @@ async def asyncio( Returns: CustomFieldOptionResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/deprecated_custom_fields/__init__.py b/rootly_sdk/api/deprecated_custom_fields/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/deprecated_custom_fields/__init__.py +++ b/rootly_sdk/api/deprecated_custom_fields/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 d4ca5660..68023e0b 100644 --- a/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_response import CustomFieldResponse from ...models.errors_list import ErrorsList from ...models.new_custom_field import NewCustomField -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCustomField, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/custom_fields", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> CustomFieldResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldResponse | ErrorsList | None: if response.status_code == 201: response_201 = CustomFieldResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFieldResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCustomField, + ) -> Response[CustomFieldResponse | ErrorsList]: - """[DEPRECATED] Creates a Custom Field + """ [DEPRECATED] Creates a Custom Field [DEPRECATED] Use form field endpoints instead. Creates a new custom field from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCustomField, + ) -> CustomFieldResponse | ErrorsList | None: - """[DEPRECATED] Creates a Custom Field + """ [DEPRECATED] Creates a Custom Field [DEPRECATED] Use form field endpoints instead. Creates a new custom field from provided data @@ -114,20 +131,22 @@ def sync( Returns: CustomFieldResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCustomField, + ) -> Response[CustomFieldResponse | ErrorsList]: - """[DEPRECATED] Creates a Custom Field + """ [DEPRECATED] Creates a Custom Field [DEPRECATED] Use form field endpoints instead. Creates a new custom field from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewCustomField, + ) -> CustomFieldResponse | ErrorsList | None: - """[DEPRECATED] Creates a Custom Field + """ [DEPRECATED] Creates a Custom Field [DEPRECATED] Use form field endpoints instead. Creates a new custom field from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CustomFieldResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed 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 9fa62894..6eafe34b 100644 --- a/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_response import CustomFieldResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/custom_fields/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/custom_fields/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CustomFieldResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFieldResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CustomFieldResponse | ErrorsList]: - """[DEPRECATED] Delete a Custom Field + """ [DEPRECATED] Delete a Custom Field [DEPRECATED] Use form field endpoints instead. Delete a specific custom field by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> CustomFieldResponse | ErrorsList | None: - """[DEPRECATED] Delete a Custom Field + """ [DEPRECATED] Delete a Custom Field [DEPRECATED] Use form field endpoints instead. Delete a specific custom field by id @@ -104,20 +116,22 @@ def sync( Returns: CustomFieldResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[CustomFieldResponse | ErrorsList]: - """[DEPRECATED] Delete a Custom Field + """ [DEPRECATED] Delete a Custom Field [DEPRECATED] Use form field endpoints instead. Delete a specific custom field by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> CustomFieldResponse | ErrorsList | None: - """[DEPRECATED] Delete a Custom Field + """ [DEPRECATED] Delete a Custom Field [DEPRECATED] Use form field endpoints instead. Delete a specific custom field by id @@ -159,11 +177,11 @@ async def asyncio( Returns: CustomFieldResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 3ee224fc..97fcf0e6 100644 --- a/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py @@ -1,22 +1,31 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_response import CustomFieldResponse from ...models.errors_list import ErrorsList +from ...models.get_custom_field_include import check_get_custom_field_include from ...models.get_custom_field_include import GetCustomFieldInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetCustomFieldInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,30 +35,34 @@ def _get_kwargs( params["include"] = json_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/custom_fields/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/custom_fields/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> CustomFieldResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFieldResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetCustomFieldInclude | Unset = UNSET, + ) -> Response[CustomFieldResponse | ErrorsList]: - """[DEPRECATED] Retrieves a Custom Field + """ [DEPRECATED] Retrieves a Custom Field Retrieves a specific custom_field by id @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetCustomFieldInclude | Unset = UNSET, + ) -> CustomFieldResponse | ErrorsList | None: - """[DEPRECATED] Retrieves a Custom Field + """ [DEPRECATED] Retrieves a Custom Field Retrieves a specific custom_field by id @@ -123,22 +137,24 @@ def sync( Returns: CustomFieldResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetCustomFieldInclude | Unset = UNSET, + ) -> Response[CustomFieldResponse | ErrorsList]: - """[DEPRECATED] Retrieves a Custom Field + """ [DEPRECATED] Retrieves a Custom Field Retrieves a specific custom_field by id @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetCustomFieldInclude | Unset = UNSET, + ) -> CustomFieldResponse | ErrorsList | None: - """[DEPRECATED] Retrieves a Custom Field + """ [DEPRECATED] Retrieves a Custom Field Retrieves a specific custom_field by id @@ -184,12 +204,12 @@ async def asyncio( Returns: CustomFieldResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed 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 a31e3002..11281eb7 100644 --- a/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py +++ b/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py @@ -1,14 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_list import CustomFieldList +from ...models.list_custom_fields_include import check_list_custom_fields_include from ...models.list_custom_fields_include import ListCustomFieldsInclude +from ...models.list_custom_fields_sort import check_list_custom_fields_sort from ...models.list_custom_fields_sort import ListCustomFieldsSort -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -25,7 +32,27 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -61,21 +88,59 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[label][eq]"] = filterlabeleq + + params["filter[label][not_eq]"] = filterlabelnot_eq + + params["filter[label][in]"] = filterlabelin + + params["filter[label][not_in]"] = filterlabelnot_in + + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + + params["filter[enabled][eq]"] = filterenabledeq + + params["filter[enabled][not_eq]"] = filterenablednot_eq + + params["filter[enabled][in]"] = filterenabledin + + params["filter[enabled][not_in]"] = filterenablednot_in + + 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/custom_fields", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldList | None: if response.status_code == 200: response_200 = CustomFieldList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -108,8 +173,25 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> Response[CustomFieldList]: - """[DEPRECATED] List Custom Fields + """ [DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields @@ -126,6 +208,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filterlabeleq (str | Unset): + filterlabelnot_eq (str | Unset): + filterlabelin (str | Unset): + filterlabelnot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -133,21 +231,39 @@ def sync_detailed( Returns: Response[CustomFieldList] - """ + """ + kwargs = _get_kwargs( include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filterlabel=filterlabel, - filterkind=filterkind, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filterlabel=filterlabel, +filterkind=filterkind, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filterlabeleq=filterlabeleq, +filterlabelnot_eq=filterlabelnot_eq, +filterlabelin=filterlabelin, +filterlabelnot_in=filterlabelnot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, + ) response = client.get_httpx_client().request( @@ -156,7 +272,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -172,8 +287,25 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> CustomFieldList | None: - """[DEPRECATED] List Custom Fields + """ [DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields @@ -190,6 +322,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filterlabeleq (str | Unset): + filterlabelnot_eq (str | Unset): + filterlabelin (str | Unset): + filterlabelnot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -197,24 +345,41 @@ def sync( Returns: CustomFieldList - """ + """ + return sync_detailed( client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filterlabel=filterlabel, - filterkind=filterkind, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filterlabel=filterlabel, +filterkind=filterkind, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filterlabeleq=filterlabeleq, +filterlabelnot_eq=filterlabelnot_eq, +filterlabelin=filterlabelin, +filterlabelnot_in=filterlabelnot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, + ).parsed async def asyncio_detailed( *, @@ -231,8 +396,25 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> Response[CustomFieldList]: - """[DEPRECATED] List Custom Fields + """ [DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields @@ -249,6 +431,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filterlabeleq (str | Unset): + filterlabelnot_eq (str | Unset): + filterlabelin (str | Unset): + filterlabelnot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -256,28 +454,47 @@ async def asyncio_detailed( Returns: Response[CustomFieldList] - """ + """ + kwargs = _get_kwargs( include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filterlabel=filterlabel, - filterkind=filterkind, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filterlabel=filterlabel, +filterkind=filterkind, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filterlabeleq=filterlabeleq, +filterlabelnot_eq=filterlabelnot_eq, +filterlabelin=filterlabelin, +filterlabelnot_in=filterlabelnot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -293,8 +510,25 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filterlabeleq: str | Unset = UNSET, + filterlabelnot_eq: str | Unset = UNSET, + filterlabelin: str | Unset = UNSET, + filterlabelnot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> CustomFieldList | None: - """[DEPRECATED] List Custom Fields + """ [DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields @@ -311,6 +545,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filterlabeleq (str | Unset): + filterlabelnot_eq (str | Unset): + filterlabelin (str | Unset): + filterlabelnot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -318,22 +568,38 @@ async def asyncio( Returns: CustomFieldList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filterlabel=filterlabel, - filterkind=filterkind, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filterlabel=filterlabel, +filterkind=filterkind, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filterlabeleq=filterlabeleq, +filterlabelnot_eq=filterlabelnot_eq, +filterlabelin=filterlabelin, +filterlabelnot_in=filterlabelnot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, + + )).parsed 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 6c03fcb7..a58c79c2 100644 --- a/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.custom_field_response import CustomFieldResponse from ...models.errors_list import ErrorsList from ...models.update_custom_field import UpdateCustomField -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateCustomField, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/custom_fields/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/custom_fields/{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 -) -> CustomFieldResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CustomFieldResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCustomField, + ) -> Response[CustomFieldResponse | ErrorsList]: - """[DEPRECATED] Update a Custom Field + """ [DEPRECATED] Update a Custom Field [DEPRECATED] Use form field endpoints instead. Update a specific custom field by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateCustomField, + ) -> CustomFieldResponse | ErrorsList | None: - """[DEPRECATED] Update a Custom Field + """ [DEPRECATED] Update a Custom Field [DEPRECATED] Use form field endpoints instead. Update a specific custom field by id @@ -118,22 +130,24 @@ def sync( Returns: CustomFieldResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCustomField, + ) -> Response[CustomFieldResponse | ErrorsList]: - """[DEPRECATED] Update a Custom Field + """ [DEPRECATED] Update a Custom Field [DEPRECATED] Use form field endpoints instead. Update a specific custom field by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCustomField, + ) -> CustomFieldResponse | ErrorsList | None: - """[DEPRECATED] Update a Custom Field + """ [DEPRECATED] Update a Custom Field [DEPRECATED] Use form field endpoints instead. Update a specific custom field by id @@ -179,12 +197,12 @@ async def asyncio( Returns: CustomFieldResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/deprecated_incident_custom_field_selections/__init__.py b/rootly_sdk/api/deprecated_incident_custom_field_selections/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/deprecated_incident_custom_field_selections/__init__.py +++ b/rootly_sdk/api/deprecated_incident_custom_field_selections/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 656ce720..ae593549 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_custom_field_selection_response import IncidentCustomFieldSelectionResponse from ...models.new_incident_custom_field_selection import NewIncidentCustomFieldSelection -from ...types import Response +from typing import cast + def _get_kwargs( incident_id: str, *, body: NewIncidentCustomFieldSelection, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/custom_field_selections".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/custom_field_selections".format(incident_id=quote(str(incident_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 | IncidentCustomFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: if response.status_code == 201: response_201 = IncidentCustomFieldSelectionResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentCustomFieldSelection, + ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """[DEPRECATED] Creates an incident custom field selection + """ [DEPRECATED] Creates an incident custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new incident custom field selection from provided data @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentCustomFieldSelection, + ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """[DEPRECATED] Creates an incident custom field selection + """ [DEPRECATED] Creates an incident custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new incident custom field selection from provided data @@ -125,22 +139,24 @@ def sync( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentCustomFieldSelection, + ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """[DEPRECATED] Creates an incident custom field selection + """ [DEPRECATED] Creates an incident custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new incident custom field selection from provided data @@ -155,25 +171,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentCustomFieldSelection, + ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """[DEPRECATED] Creates an incident custom field selection + """ [DEPRECATED] Creates an incident custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new incident custom field selection from provided data @@ -188,12 +208,12 @@ async def asyncio( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +body=body, + + )).parsed 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 b96d8ac0..e85c6d46 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_custom_field_selection_response import IncidentCustomFieldSelectionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_custom_field_selections/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentCustomFieldSelectionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """[DEPRECATED] Delete an incident custom field selection + """ [DEPRECATED] Delete an incident custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific incident custom field selection by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """[DEPRECATED] Delete an incident custom field selection + """ [DEPRECATED] Delete an incident custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific incident custom field selection by id @@ -106,20 +118,22 @@ def sync( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """[DEPRECATED] Delete an incident custom field selection + """ [DEPRECATED] Delete an incident custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific incident custom field selection by id @@ -133,23 +147,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """[DEPRECATED] Delete an incident custom field selection + """ [DEPRECATED] Delete an incident custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific incident custom field selection by id @@ -163,11 +181,11 @@ async def asyncio( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 51ee55a3..3cc4aac1 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_custom_field_selection_response import IncidentCustomFieldSelectionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_custom_field_selections/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentCustomFieldSelectionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """[DEPRECATED] Retrieves an incident custom field selection + """ [DEPRECATED] Retrieves an incident custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific incident custom field selection by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """[DEPRECATED] Retrieves an incident custom field selection + """ [DEPRECATED] Retrieves an incident custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific incident custom field selection by id @@ -106,20 +118,22 @@ def sync( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """[DEPRECATED] Retrieves an incident custom field selection + """ [DEPRECATED] Retrieves an incident custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific incident custom field selection by id @@ -133,23 +147,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """[DEPRECATED] Retrieves an incident custom field selection + """ [DEPRECATED] Retrieves an incident custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific incident custom field selection by id @@ -163,11 +181,11 @@ async def asyncio( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 5e6f60d6..5e90c061 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_custom_field_selection_list import IncidentCustomFieldSelectionList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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}/custom_field_selections".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/custom_field_selections".format(incident_id=quote(str(incident_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> IncidentCustomFieldSelectionList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentCustomFieldSelectionList | None: if response.status_code == 200: response_200 = IncidentCustomFieldSelectionList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentCustomFieldSelectionList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentCustomFieldSelectionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentCustomFieldSelectionList]: - """[DEPRECATED] List incident custom field selections + """ [DEPRECATED] List incident custom field selections [DEPRECATED] Use form field endpoints instead. List incident custom field selections @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[IncidentCustomFieldSelectionList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentCustomFieldSelectionList | None: - """[DEPRECATED] List incident custom field selections + """ [DEPRECATED] List incident custom field selections [DEPRECATED] Use form field endpoints instead. List incident custom field selections @@ -128,16 +139,17 @@ def sync( Returns: IncidentCustomFieldSelectionList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentCustomFieldSelectionList]: - """[DEPRECATED] List incident custom field selections + """ [DEPRECATED] List incident custom field selections [DEPRECATED] Use form field endpoints instead. List incident custom field selections @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[IncidentCustomFieldSelectionList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentCustomFieldSelectionList | None: - """[DEPRECATED] List incident custom field selections + """ [DEPRECATED] List incident custom field selections [DEPRECATED] Use form field endpoints instead. List incident custom field selections @@ -201,14 +218,14 @@ async def asyncio( Returns: IncidentCustomFieldSelectionList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 b94030b8..9d295756 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_custom_field_selection_response import IncidentCustomFieldSelectionResponse from ...models.update_incident_custom_field_selection import UpdateIncidentCustomFieldSelection -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentCustomFieldSelection, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_custom_field_selections/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_custom_field_selections/{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 | IncidentCustomFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentCustomFieldSelectionResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentCustomFieldSelection, + ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """[DEPRECATED] Update an incident custom field selection + """ [DEPRECATED] Update an incident custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific incident custom field selection by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentCustomFieldSelection, + ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """[DEPRECATED] Update an incident custom field selection + """ [DEPRECATED] Update an incident custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific incident custom field selection by id @@ -120,22 +132,24 @@ def sync( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentCustomFieldSelection, + ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """[DEPRECATED] Update an incident custom field selection + """ [DEPRECATED] Update an incident custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific incident custom field selection by id @@ -150,25 +164,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentCustomFieldSelection, + ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """[DEPRECATED] Update an incident custom field selection + """ [DEPRECATED] Update an incident custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific incident custom field selection by id @@ -183,12 +201,12 @@ async def asyncio( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/deprecated_workflow_custom_field_selections/__init__.py b/rootly_sdk/api/deprecated_workflow_custom_field_selections/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/deprecated_workflow_custom_field_selections/__init__.py +++ b/rootly_sdk/api/deprecated_workflow_custom_field_selections/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 60ac3c5d..2feb751e 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_workflow_custom_field_selection import NewWorkflowCustomFieldSelection from ...models.workflow_custom_field_selection_response import WorkflowCustomFieldSelectionResponse -from ...types import Response +from typing import cast + def _get_kwargs( workflow_id: str, *, body: NewWorkflowCustomFieldSelection, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/workflows/{workflow_id}/custom_field_selections".format( - workflow_id=quote(str(workflow_id), safe=""), - ), + "url": "/v1/workflows/{workflow_id}/custom_field_selections".format(workflow_id=quote(str(workflow_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 | WorkflowCustomFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: if response.status_code == 201: response_201 = WorkflowCustomFieldSelectionResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowCustomFieldSelection, + ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """[DEPRECATED] Creates a workflow custom field selection + """ [DEPRECATED] Creates a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new workflow custom field selection from provided data @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowCustomFieldSelection, + ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """[DEPRECATED] Creates a workflow custom field selection + """ [DEPRECATED] Creates a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new workflow custom field selection from provided data @@ -120,22 +132,24 @@ def sync( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ + """ + return sync_detailed( workflow_id=workflow_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowCustomFieldSelection, + ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """[DEPRECATED] Creates a workflow custom field selection + """ [DEPRECATED] Creates a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new workflow custom field selection from provided data @@ -150,25 +164,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowCustomFieldSelection, + ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """[DEPRECATED] Creates a workflow custom field selection + """ [DEPRECATED] Creates a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new workflow custom field selection from provided data @@ -183,12 +201,12 @@ async def asyncio( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +body=body, + + )).parsed 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 c41ac11d..dc9d28c2 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.workflow_custom_field_selection_response import WorkflowCustomFieldSelectionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflow_custom_field_selections/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = WorkflowCustomFieldSelectionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """[DEPRECATED] Delete a workflow custom field selection + """ [DEPRECATED] Delete a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific workflow custom field selection by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """[DEPRECATED] Delete a workflow custom field selection + """ [DEPRECATED] Delete a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific workflow custom field selection by id @@ -106,20 +118,22 @@ def sync( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """[DEPRECATED] Delete a workflow custom field selection + """ [DEPRECATED] Delete a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific workflow custom field selection by id @@ -133,23 +147,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """[DEPRECATED] Delete a workflow custom field selection + """ [DEPRECATED] Delete a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific workflow custom field selection by id @@ -163,11 +181,11 @@ async def asyncio( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 30f721e6..1ec23f7e 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.workflow_custom_field_selection_response import WorkflowCustomFieldSelectionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/workflow_custom_field_selections/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = WorkflowCustomFieldSelectionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """[DEPRECATED] Retrieves a workflow custom field selection + """ [DEPRECATED] Retrieves a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific workflow custom field selection by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """[DEPRECATED] Retrieves a workflow custom field selection + """ [DEPRECATED] Retrieves a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific workflow custom field selection by id @@ -106,20 +118,22 @@ def sync( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """[DEPRECATED] Retrieves a workflow custom field selection + """ [DEPRECATED] Retrieves a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific workflow custom field selection by id @@ -133,23 +147,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """[DEPRECATED] Retrieves a workflow custom field selection + """ [DEPRECATED] Retrieves a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific workflow custom field selection by id @@ -163,11 +181,11 @@ async def asyncio( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 764381f7..02bd027c 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.workflow_custom_field_selection_list import WorkflowCustomFieldSelectionList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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/workflows/{workflow_id}/custom_field_selections".format( - workflow_id=quote(str(workflow_id), safe=""), - ), + "url": "/v1/workflows/{workflow_id}/custom_field_selections".format(workflow_id=quote(str(workflow_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> WorkflowCustomFieldSelectionList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowCustomFieldSelectionList | None: if response.status_code == 200: response_200 = WorkflowCustomFieldSelectionList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[WorkflowCustomFieldSelectionList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WorkflowCustomFieldSelectionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[WorkflowCustomFieldSelectionList]: - """[DEPRECATED] List workflow custom field selections + """ [DEPRECATED] List workflow custom field selections [DEPRECATED] Use form field endpoints instead. List workflow custom field selections @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[WorkflowCustomFieldSelectionList] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( workflow_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> WorkflowCustomFieldSelectionList | None: - """[DEPRECATED] List workflow custom field selections + """ [DEPRECATED] List workflow custom field selections [DEPRECATED] Use form field endpoints instead. List workflow custom field selections @@ -128,16 +139,17 @@ def sync( Returns: WorkflowCustomFieldSelectionList - """ + """ + return sync_detailed( workflow_id=workflow_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( workflow_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[WorkflowCustomFieldSelectionList]: - """[DEPRECATED] List workflow custom field selections + """ [DEPRECATED] List workflow custom field selections [DEPRECATED] Use form field endpoints instead. List workflow custom field selections @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[WorkflowCustomFieldSelectionList] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( workflow_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> WorkflowCustomFieldSelectionList | None: - """[DEPRECATED] List workflow custom field selections + """ [DEPRECATED] List workflow custom field selections [DEPRECATED] Use form field endpoints instead. List workflow custom field selections @@ -201,14 +218,14 @@ async def asyncio( Returns: WorkflowCustomFieldSelectionList - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 5f683704..8fa2f5d9 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_workflow_custom_field_selection import UpdateWorkflowCustomFieldSelection from ...models.workflow_custom_field_selection_response import WorkflowCustomFieldSelectionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateWorkflowCustomFieldSelection, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflow_custom_field_selections/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_custom_field_selections/{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 | WorkflowCustomFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = WorkflowCustomFieldSelectionResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflowCustomFieldSelection, + ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """[DEPRECATED] Update a workflow custom field selection + """ [DEPRECATED] Update a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific workflow custom field selection by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowCustomFieldSelection, + ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """[DEPRECATED] Update a workflow custom field selection + """ [DEPRECATED] Update a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific workflow custom field selection by id @@ -120,22 +132,24 @@ def sync( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowCustomFieldSelection, + ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """[DEPRECATED] Update a workflow custom field selection + """ [DEPRECATED] Update a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific workflow custom field selection by id @@ -150,25 +164,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowCustomFieldSelection, + ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """[DEPRECATED] Update a workflow custom field selection + """ [DEPRECATED] Update a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific workflow custom field selection by id @@ -183,12 +201,12 @@ async def asyncio( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/edge_connector_actions/__init__.py b/rootly_sdk/api/edge_connector_actions/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/edge_connector_actions/__init__.py +++ b/rootly_sdk/api/edge_connector_actions/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 2fab426e..868af55b 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,38 +1,49 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.create_edge_connector_action_body import CreateEdgeConnectorActionBody -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( edge_connector_id: str, *, body: CreateEdgeConnectorActionBody | Unset = UNSET, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/edge_connectors/{edge_connector_id}/actions".format( - edge_connector_id=quote(str(edge_connector_id), safe=""), - ), + "url": "/v1/edge_connectors/{edge_connector_id}/actions".format(edge_connector_id=quote(str(edge_connector_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) -> Any | None: if response.status_code == 201: return None @@ -60,8 +71,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateEdgeConnectorActionBody | Unset = UNSET, + ) -> Response[Any]: - """Create edge connector action + """ Create edge connector action Args: edge_connector_id (str): @@ -73,11 +85,13 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -92,8 +106,9 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateEdgeConnectorActionBody | Unset = UNSET, + ) -> Response[Any]: - """Create edge connector action + """ Create edge connector action Args: edge_connector_id (str): @@ -105,13 +120,18 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + 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 bcad29a3..9e7ea56d 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,31 +1,39 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response +from ...types import Response, UNSET +from ... import errors + +from typing import cast +from uuid import UUID + def _get_kwargs( edge_connector_id: str, id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format( - edge_connector_id=quote(str(edge_connector_id), safe=""), - id=quote(str(id), safe=""), - ), + "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 + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 200: return None @@ -50,8 +58,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Delete edge connector action + """ Delete edge connector action Args: edge_connector_id (str): @@ -63,11 +72,13 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - id=id, +id=id, + ) response = client.get_httpx_client().request( @@ -82,8 +93,9 @@ async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Delete edge connector action + """ Delete edge connector action Args: edge_connector_id (str): @@ -95,13 +107,18 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - id=id, +id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + 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 35449bd3..54986417 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,31 +1,39 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response +from ...types import Response, UNSET +from ... import errors + +from typing import cast +from uuid import UUID + def _get_kwargs( edge_connector_id: str, id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format( - edge_connector_id=quote(str(edge_connector_id), safe=""), - id=quote(str(id), safe=""), - ), + "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 + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 200: return None @@ -53,8 +61,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Show edge connector action + """ Show edge connector action Args: edge_connector_id (str): @@ -66,11 +75,13 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - id=id, +id=id, + ) response = client.get_httpx_client().request( @@ -85,8 +96,9 @@ async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Show edge connector action + """ Show edge connector action Args: edge_connector_id (str): @@ -98,13 +110,18 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - id=id, +id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + 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 ac27ce42..8d433357 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,28 +1,36 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + + def _get_kwargs( edge_connector_id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/edge_connectors/{edge_connector_id}/actions".format( - edge_connector_id=quote(str(edge_connector_id), safe=""), - ), + "url": "/v1/edge_connectors/{edge_connector_id}/actions".format(edge_connector_id=quote(str(edge_connector_id), safe=""),), } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 200: return None @@ -49,8 +57,9 @@ def sync_detailed( edge_connector_id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """List edge connector actions + """ List edge connector actions Args: edge_connector_id (str): @@ -61,10 +70,12 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, + ) response = client.get_httpx_client().request( @@ -78,8 +89,9 @@ async def asyncio_detailed( edge_connector_id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """List edge connector actions + """ List edge connector actions Args: edge_connector_id (str): @@ -90,12 +102,17 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + 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 9be920e7..73c3b584 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,14 +1,18 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.update_edge_connector_action_body import UpdateEdgeConnectorActionBody -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + def _get_kwargs( @@ -16,26 +20,32 @@ def _get_kwargs( id: str | UUID, *, body: UpdateEdgeConnectorActionBody | Unset = UNSET, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format( - edge_connector_id=quote(str(edge_connector_id), safe=""), - id=quote(str(id), safe=""), - ), + "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format(edge_connector_id=quote(str(edge_connector_id), safe=""),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) -> Any | None: if response.status_code == 200: return None @@ -61,8 +71,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEdgeConnectorActionBody | Unset = UNSET, + ) -> Response[Any]: - """Update edge connector action + """ Update edge connector action Args: edge_connector_id (str): @@ -75,12 +86,14 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - id=id, - body=body, +id=id, +body=body, + ) response = client.get_httpx_client().request( @@ -96,8 +109,9 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateEdgeConnectorActionBody | Unset = UNSET, + ) -> Response[Any]: - """Update edge connector action + """ Update edge connector action Args: edge_connector_id (str): @@ -110,14 +124,19 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - id=id, - body=body, +id=id, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + diff --git a/rootly_sdk/api/edge_connectors/__init__.py b/rootly_sdk/api/edge_connectors/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/edge_connectors/__init__.py +++ b/rootly_sdk/api/edge_connectors/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/edge_connectors/create_edge_connector.py b/rootly_sdk/api/edge_connectors/create_edge_connector.py index 4fd4237e..a1df019c 100644 --- a/rootly_sdk/api/edge_connectors/create_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/create_edge_connector.py @@ -1,34 +1,48 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.create_edge_connector_body import CreateEdgeConnectorBody -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( *, body: CreateEdgeConnectorBody | Unset = UNSET, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/edge_connectors", } + 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) -> Any | None: if response.status_code == 201: return None @@ -55,8 +69,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateEdgeConnectorBody | Unset = UNSET, + ) -> Response[Any]: - """Create edge connector + """ Create edge connector Args: body (CreateEdgeConnectorBody | Unset): @@ -67,10 +82,12 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -84,8 +101,9 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateEdgeConnectorBody | Unset = UNSET, + ) -> Response[Any]: - """Create edge connector + """ Create edge connector Args: body (CreateEdgeConnectorBody | Unset): @@ -96,12 +114,17 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + diff --git a/rootly_sdk/api/edge_connectors/delete_edge_connector.py b/rootly_sdk/api/edge_connectors/delete_edge_connector.py index a289f349..f8bba5fd 100644 --- a/rootly_sdk/api/edge_connectors/delete_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/delete_edge_connector.py @@ -1,28 +1,36 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/edge_connectors/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/edge_connectors/{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 @@ -46,8 +54,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Delete edge connector + """ Delete edge connector Args: id (str): @@ -58,10 +67,12 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -75,8 +86,9 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Delete edge connector + """ Delete edge connector Args: id (str): @@ -87,12 +99,17 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + diff --git a/rootly_sdk/api/edge_connectors/get_edge_connector.py b/rootly_sdk/api/edge_connectors/get_edge_connector.py index ce73bfe0..38fbc866 100644 --- a/rootly_sdk/api/edge_connectors/get_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/get_edge_connector.py @@ -1,28 +1,36 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/edge_connectors/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/edge_connectors/{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 @@ -49,8 +57,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Show edge connector + """ Show edge connector Args: id (str): @@ -61,10 +70,12 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -78,8 +89,9 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[Any]: - """Show edge connector + """ Show edge connector Args: id (str): @@ -90,12 +102,17 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + diff --git a/rootly_sdk/api/edge_connectors/list_edge_connectors.py b/rootly_sdk/api/edge_connectors/list_edge_connectors.py index e24a0844..e089abd0 100644 --- a/rootly_sdk/api/edge_connectors/list_edge_connectors.py +++ b/rootly_sdk/api/edge_connectors/list_edge_connectors.py @@ -1,11 +1,15 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import UNSET, Response, Unset +from ...types import Response, UNSET +from ... import errors + +from ...types import UNSET, Unset + def _get_kwargs( @@ -14,7 +18,11 @@ def _get_kwargs( per_page: int | Unset = UNSET, status: str | Unset = UNSET, name: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,17 +34,21 @@ def _get_kwargs( params["name"] = name + 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/edge_connectors", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 200: return None @@ -63,8 +75,9 @@ def sync_detailed( per_page: int | Unset = UNSET, status: str | Unset = UNSET, name: str | Unset = UNSET, + ) -> Response[Any]: - """List edge connectors + """ List edge connectors Args: page (int | Unset): @@ -78,13 +91,15 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( page=page, - per_page=per_page, - status=status, - name=name, +per_page=per_page, +status=status, +name=name, + ) response = client.get_httpx_client().request( @@ -101,8 +116,9 @@ async def asyncio_detailed( per_page: int | Unset = UNSET, status: str | Unset = UNSET, name: str | Unset = UNSET, + ) -> Response[Any]: - """List edge connectors + """ List edge connectors Args: page (int | Unset): @@ -116,15 +132,20 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( page=page, - per_page=per_page, - status=status, - name=name, +per_page=per_page, +status=status, +name=name, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + diff --git a/rootly_sdk/api/edge_connectors/update_edge_connector.py b/rootly_sdk/api/edge_connectors/update_edge_connector.py index df27a0bb..4e85655f 100644 --- a/rootly_sdk/api/edge_connectors/update_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/update_edge_connector.py @@ -1,38 +1,49 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.update_edge_connector_body import UpdateEdgeConnectorBody -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, body: UpdateEdgeConnectorBody | Unset = UNSET, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/edge_connectors/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/edge_connectors/{id}".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) -> Any | None: if response.status_code == 200: return None @@ -60,8 +71,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEdgeConnectorBody | Unset = UNSET, + ) -> Response[Any]: - """Update edge connector + """ Update edge connector Args: id (str): @@ -73,11 +85,13 @@ def sync_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -92,8 +106,9 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateEdgeConnectorBody | Unset = UNSET, + ) -> Response[Any]: - """Update edge connector + """ Update edge connector Args: id (str): @@ -105,13 +120,18 @@ async def asyncio_detailed( Returns: Response[Any] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + diff --git a/rootly_sdk/api/environments/__init__.py b/rootly_sdk/api/environments/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/environments/__init__.py +++ b/rootly_sdk/api/environments/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/environments/bulk_delete_environments.py b/rootly_sdk/api/environments/bulk_delete_environments.py new file mode 100644 index 00000000..929fb48c --- /dev/null +++ b/rootly_sdk/api/environments/bulk_delete_environments.py @@ -0,0 +1,237 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_destroy_environments_response import BulkDestroyEnvironmentsResponse +from ...models.bulk_destroy_environments_type_0 import BulkDestroyEnvironmentsType0 +from ...models.bulk_destroy_environments_type_1 import BulkDestroyEnvironmentsType1 +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + *, + body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/environments/bulk_delete", + } + + + if isinstance(body, BulkDestroyEnvironmentsType0): + _kwargs["json"] = body.to_dict() + else: + _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) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyEnvironmentsResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyEnvironmentsResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyEnvironmentsResponse.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | 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: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, + +) -> Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList]: + """ Bulk delete Environments + + Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1): Two mutually exclusive + modes. Pass exactly one of: external_ids (delete specific records) or managed_by (prune + all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | 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: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, + +) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Environments + + Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1): Two mutually exclusive + modes. Pass exactly one of: external_ids (delete specific records) or managed_by (prune + all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, + +) -> Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList]: + """ Bulk delete Environments + + Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1): Two mutually exclusive + modes. Pass exactly one of: external_ids (delete specific records) or managed_by (prune + all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | 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: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, + +) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Environments + + Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1): Two mutually exclusive + modes. Pass exactly one of: external_ids (delete specific records) or managed_by (prune + all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/environments/bulk_upsert_environments.py b/rootly_sdk/api/environments/bulk_upsert_environments.py new file mode 100644 index 00000000..c2ab1fdf --- /dev/null +++ b/rootly_sdk/api/environments/bulk_upsert_environments.py @@ -0,0 +1,236 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_upsert_environments import BulkUpsertEnvironments +from ...models.bulk_upsert_environments_error import BulkUpsertEnvironmentsError +from ...models.bulk_upsert_environments_response import BulkUpsertEnvironmentsResponse +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + *, + body: BulkUpsertEnvironments, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/environments/bulk_upsert", + } + + _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) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertEnvironmentsResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertEnvironmentsError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertEnvironmentsError.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | 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: BulkUpsertEnvironments, + +) -> Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList]: + """ Bulk upsert Environments + + Create or update multiple environments by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertEnvironments): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | 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: BulkUpsertEnvironments, + +) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: + """ Bulk upsert Environments + + Create or update multiple environments by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertEnvironments): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertEnvironments, + +) -> Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList]: + """ Bulk upsert Environments + + Create or update multiple environments by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertEnvironments): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | 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: BulkUpsertEnvironments, + +) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: + """ Bulk upsert Environments + + Create or update multiple environments by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertEnvironments): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/environments/create_environment.py b/rootly_sdk/api/environments/create_environment.py index a12a138c..8555b183 100644 --- a/rootly_sdk/api/environments/create_environment.py +++ b/rootly_sdk/api/environments/create_environment.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.environment_response import EnvironmentResponse from ...models.errors_list import ErrorsList from ...models.new_environment import NewEnvironment -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewEnvironment, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/environments", @@ -24,28 +34,34 @@ def _get_kwargs( _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 -) -> EnvironmentResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EnvironmentResponse | ErrorsList | None: if response.status_code == 201: response_201 = EnvironmentResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[EnvironmentResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EnvironmentResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEnvironment, + ) -> Response[EnvironmentResponse | ErrorsList]: - """Creates an environment + """ Creates an environment Creates a new environment from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewEnvironment, + ) -> EnvironmentResponse | ErrorsList | None: - """Creates an environment + """ Creates an environment Creates a new environment from provided data @@ -114,20 +131,22 @@ def sync( Returns: EnvironmentResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewEnvironment, + ) -> Response[EnvironmentResponse | ErrorsList]: - """Creates an environment + """ Creates an environment Creates a new environment from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewEnvironment, + ) -> EnvironmentResponse | ErrorsList | None: - """Creates an environment + """ Creates an environment Creates a new environment from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: EnvironmentResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/environments/create_environment_catalog_property.py b/rootly_sdk/api/environments/create_environment_catalog_property.py index d3a415ba..e996cb06 100644 --- a/rootly_sdk/api/environments/create_environment_catalog_property.py +++ b/rootly_sdk/api/environments/create_environment_catalog_property.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_property import NewCatalogProperty -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCatalogProperty, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/environments/properties", @@ -24,28 +34,34 @@ def _get_kwargs( _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: + +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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> CatalogPropertyResponse | ErrorsList | None: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -114,20 +131,22 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/environments/delete_environment.py b/rootly_sdk/api/environments/delete_environment.py index 48221a57..99da46aa 100644 --- a/rootly_sdk/api/environments/delete_environment.py +++ b/rootly_sdk/api/environments/delete_environment.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.environment_response import EnvironmentResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/environments/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/environments/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> EnvironmentResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EnvironmentResponse | ErrorsList | None: if response.status_code == 200: response_200 = EnvironmentResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[EnvironmentResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EnvironmentResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[EnvironmentResponse | ErrorsList]: - """Delete an environment + """ Delete an environment Delete a specific environment by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> EnvironmentResponse | ErrorsList | None: - """Delete an environment + """ Delete an environment Delete a specific environment by id @@ -105,20 +117,22 @@ def sync( Returns: EnvironmentResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[EnvironmentResponse | ErrorsList]: - """Delete an environment + """ Delete an environment Delete a specific environment by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> EnvironmentResponse | ErrorsList | None: - """Delete an environment + """ Delete an environment Delete a specific environment by id @@ -160,11 +178,11 @@ async def asyncio( Returns: EnvironmentResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/environments/get_environment.py b/rootly_sdk/api/environments/get_environment.py index 2fb16213..843161c0 100644 --- a/rootly_sdk/api/environments/get_environment.py +++ b/rootly_sdk/api/environments/get_environment.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.environment_response import EnvironmentResponse from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/environments/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/environments/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> EnvironmentResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EnvironmentResponse | ErrorsList | None: if response.status_code == 200: response_200 = EnvironmentResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[EnvironmentResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EnvironmentResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[EnvironmentResponse | ErrorsList]: - """Retrieves an environment + """ Retrieves an environment Retrieves a specific environment by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> EnvironmentResponse | ErrorsList | None: - """Retrieves an environment + """ Retrieves an environment Retrieves a specific environment by id @@ -105,20 +117,22 @@ def sync( Returns: EnvironmentResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[EnvironmentResponse | ErrorsList]: - """Retrieves an environment + """ Retrieves an environment Retrieves a specific environment by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> EnvironmentResponse | ErrorsList | None: - """Retrieves an environment + """ Retrieves an environment Retrieves a specific environment by id @@ -160,11 +178,11 @@ async def asyncio( Returns: EnvironmentResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/environments/list_environment_catalog_properties.py b/rootly_sdk/api/environments/list_environment_catalog_properties.py index cb526165..88e8fd4a 100644 --- a/rootly_sdk/api/environments/list_environment_catalog_properties.py +++ b/rootly_sdk/api/environments/list_environment_catalog_properties.py @@ -1,18 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from ...models.list_environment_catalog_properties_include import check_list_environment_catalog_properties_include +from ...models.list_environment_catalog_properties_include import ListEnvironmentCatalogPropertiesInclude +from ...models.list_environment_catalog_properties_sort import check_list_environment_catalog_properties_sort +from ...models.list_environment_catalog_properties_sort import ListEnvironmentCatalogPropertiesSort +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -28,7 +31,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -62,21 +69,27 @@ def _get_kwargs( 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: @@ -108,8 +121,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Environment Catalog Properties @@ -132,20 +146,22 @@ def sync_detailed( 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, +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( @@ -154,7 +170,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -169,8 +184,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Environment Catalog Properties @@ -193,23 +209,24 @@ def sync( 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 +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( *, @@ -225,8 +242,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Environment Catalog Properties @@ -249,27 +267,30 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -284,8 +305,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Environment Catalog Properties @@ -308,21 +330,21 @@ async def asyncio( 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 + """ + + + 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 00b27f3b..439e91bc 100644 --- a/rootly_sdk/api/environments/list_environments.py +++ b/rootly_sdk/api/environments/list_environments.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.environment_list import EnvironmentList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,8 +27,24 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -49,23 +70,53 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[color][eq]"] = filtercoloreq + + params["filter[color][not_eq]"] = filtercolornot_eq + + params["filter[color][in]"] = filtercolorin + + params["filter[color][not_in]"] = filtercolornot_in + 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/environments", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EnvironmentList | None: if response.status_code == 200: response_200 = EnvironmentList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -97,9 +148,22 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[EnvironmentList]: - """List environments + """ List environments List environments @@ -115,6 +179,18 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -123,21 +199,35 @@ def sync_detailed( Returns: Response[EnvironmentList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -146,7 +236,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -161,9 +250,22 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> EnvironmentList | None: - """List environments + """ List environments List environments @@ -179,6 +281,18 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -187,24 +301,37 @@ def sync( Returns: EnvironmentList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -220,9 +347,22 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[EnvironmentList]: - """List environments + """ List environments List environments @@ -238,6 +378,18 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -246,28 +398,43 @@ async def asyncio_detailed( Returns: Response[EnvironmentList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -282,9 +449,22 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> EnvironmentList | None: - """List environments + """ List environments List environments @@ -300,6 +480,18 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -308,22 +500,34 @@ async def asyncio( Returns: EnvironmentList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/environments/update_environment.py b/rootly_sdk/api/environments/update_environment.py index 6e9348d0..1299e5a2 100644 --- a/rootly_sdk/api/environments/update_environment.py +++ b/rootly_sdk/api/environments/update_environment.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.environment_response import EnvironmentResponse from ...models.errors_list import ErrorsList from ...models.update_environment import UpdateEnvironment -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateEnvironment, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/environments/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/environments/{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 -) -> EnvironmentResponse | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EnvironmentResponse | ErrorsList | None: if response.status_code == 200: response_200 = EnvironmentResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[EnvironmentResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EnvironmentResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEnvironment, + ) -> Response[EnvironmentResponse | ErrorsList]: - """Update an environment + """ Update an environment Update a specific environment by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, + ) -> EnvironmentResponse | ErrorsList | None: - """Update an environment + """ Update an environment Update a specific environment by id @@ -119,22 +131,24 @@ def sync( Returns: EnvironmentResponse | ErrorsList - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, + ) -> Response[EnvironmentResponse | ErrorsList]: - """Update an environment + """ Update an environment Update a specific environment by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, + ) -> EnvironmentResponse | ErrorsList | None: - """Update an environment + """ Update an environment Update a specific environment by id @@ -180,12 +198,12 @@ async def asyncio( Returns: EnvironmentResponse | ErrorsList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/escalation_levels/__init__.py b/rootly_sdk/api/escalation_levels/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/escalation_levels/__init__.py +++ b/rootly_sdk/api/escalation_levels/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/escalation_levels/delete_escalation_level.py b/rootly_sdk/api/escalation_levels/delete_escalation_level.py index 957eb67f..fa1fef59 100644 --- a/rootly_sdk/api/escalation_levels/delete_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/delete_escalation_level.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/escalation_levels/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/escalation_levels/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | EscalationPolicyLevelResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 200: response_200 = EscalationPolicyLevelResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Delete an escalation level + """ Delete an escalation level Delete a specific escalation level by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Delete an escalation level + """ Delete an escalation level Delete a specific escalation level by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Delete an escalation level + """ Delete an escalation level Delete a specific escalation level by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Delete an escalation level + """ Delete an escalation level Delete a specific escalation level by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/escalation_levels/get_escalation_level.py b/rootly_sdk/api/escalation_levels/get_escalation_level.py index b8da372a..aa1ce98e 100644 --- a/rootly_sdk/api/escalation_levels/get_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/get_escalation_level.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/escalation_levels/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/escalation_levels/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | EscalationPolicyLevelResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 200: response_200 = EscalationPolicyLevelResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Retrieves an escalation level + """ Retrieves an escalation level Retrieves a specific escalation level by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Retrieves an escalation level + """ Retrieves an escalation level Retrieves a specific escalation level by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Retrieves an escalation level + """ Retrieves an escalation level Retrieves a specific escalation level by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Retrieves an escalation level + """ Retrieves an escalation level Retrieves a specific escalation level by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/escalation_levels/update_escalation_level.py b/rootly_sdk/api/escalation_levels/update_escalation_level.py index 880d0415..61cea6f7 100644 --- a/rootly_sdk/api/escalation_levels/update_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/update_escalation_level.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse from ...models.update_escalation_policy_level import UpdateEscalationPolicyLevel -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateEscalationPolicyLevel, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/escalation_levels/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/escalation_levels/{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 | EscalationPolicyLevelResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 200: response_200 = EscalationPolicyLevelResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEscalationPolicyLevel, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Update an escalation level + """ Update an escalation level Update a specific escalation level by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyLevel, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Update an escalation level + """ Update an escalation level Update a specific escalation level by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyLevel, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Update an escalation level + """ Update an escalation level Update a specific escalation level by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyLevel, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Update an escalation level + """ Update an escalation level Update a specific escalation level by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/escalation_levels_path/__init__.py b/rootly_sdk/api/escalation_levels_path/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/escalation_levels_path/__init__.py +++ b/rootly_sdk/api/escalation_levels_path/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 9527978d..de796cb9 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse from ...models.new_escalation_policy_level import NewEscalationPolicyLevel -from ...types import Response +from typing import cast + def _get_kwargs( escalation_policy_path_id: str, *, body: NewEscalationPolicyLevel, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/escalation_paths/{escalation_policy_path_id}/escalation_levels".format( - escalation_policy_path_id=quote(str(escalation_policy_path_id), safe=""), - ), + "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() + headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | EscalationPolicyLevelResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 201: response_201 = EscalationPolicyLevelResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Creates an escalation level for an Escalation Path + """ Creates an escalation level for an Escalation Path Creates a new escalation level from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( escalation_policy_path_id=escalation_policy_path_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( escalation_policy_path_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Creates an escalation level for an Escalation Path + """ Creates an escalation level for an Escalation Path Creates a new escalation level from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ + """ + return sync_detailed( escalation_policy_path_id=escalation_policy_path_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( escalation_policy_path_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Creates an escalation level for an Escalation Path + """ Creates an escalation level for an Escalation Path Creates a new escalation level from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( escalation_policy_path_id=escalation_policy_path_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( escalation_policy_path_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Creates an escalation level for an Escalation Path + """ Creates an escalation level for an Escalation Path Creates a new escalation level from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - - return ( - await asyncio_detailed( - escalation_policy_path_id=escalation_policy_path_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + escalation_policy_path_id=escalation_policy_path_id, +client=client, +body=body, + + )).parsed 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 362d2739..b91a1307 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.escalation_policy_level_list import EscalationPolicyLevelList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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/escalation_paths/{escalation_policy_path_id}/escalation_levels".format( - escalation_policy_path_id=quote(str(escalation_policy_path_id), safe=""), - ), + "url": "/v1/escalation_paths/{escalation_policy_path_id}/escalation_levels".format(escalation_policy_path_id=quote(str(escalation_policy_path_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> EscalationPolicyLevelList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EscalationPolicyLevelList | None: if response.status_code == 200: response_200 = EscalationPolicyLevelList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[EscalationPolicyLevelList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EscalationPolicyLevelList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[EscalationPolicyLevelList]: - """List escalation levels for an Escalation Path + """ List escalation levels for an Escalation Path List escalation levels @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[EscalationPolicyLevelList] - """ + """ + kwargs = _get_kwargs( escalation_policy_path_id=escalation_policy_path_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( escalation_policy_path_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> EscalationPolicyLevelList | None: - """List escalation levels for an Escalation Path + """ List escalation levels for an Escalation Path List escalation levels @@ -128,16 +139,17 @@ def sync( Returns: EscalationPolicyLevelList - """ + """ + return sync_detailed( escalation_policy_path_id=escalation_policy_path_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( escalation_policy_path_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[EscalationPolicyLevelList]: - """List escalation levels for an Escalation Path + """ List escalation levels for an Escalation Path List escalation levels @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[EscalationPolicyLevelList] - """ + """ + kwargs = _get_kwargs( escalation_policy_path_id=escalation_policy_path_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( escalation_policy_path_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> EscalationPolicyLevelList | None: - """List escalation levels for an Escalation Path + """ List escalation levels for an Escalation Path List escalation levels @@ -201,14 +218,14 @@ async def asyncio( Returns: EscalationPolicyLevelList - """ - - return ( - await asyncio_detailed( - escalation_policy_path_id=escalation_policy_path_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + escalation_policy_path_id=escalation_policy_path_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/escalation_levels_policies/__init__.py b/rootly_sdk/api/escalation_levels_policies/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/escalation_levels_policies/__init__.py +++ b/rootly_sdk/api/escalation_levels_policies/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 4132bf34..6b3f382b 100644 --- a/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py +++ b/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse from ...models.new_escalation_policy_level import NewEscalationPolicyLevel -from ...types import Response +from typing import cast + def _get_kwargs( escalation_policy_id: str, *, body: NewEscalationPolicyLevel, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_levels".format( - escalation_policy_id=quote(str(escalation_policy_id), safe=""), - ), + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_levels".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 | EscalationPolicyLevelResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 201: response_201 = EscalationPolicyLevelResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Creates an escalation level for an Escalation Policy + """ Creates an escalation level for an Escalation Policy Creates a new escalation level from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( escalation_policy_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Creates an escalation level for an Escalation Policy + """ Creates an escalation level for an Escalation Policy Creates a new escalation level from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ + """ + return sync_detailed( escalation_policy_id=escalation_policy_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( escalation_policy_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, + ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """Creates an escalation level for an Escalation Policy + """ Creates an escalation level for an Escalation Policy Creates a new escalation level from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ + """ + kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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: NewEscalationPolicyLevel, + ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """Creates an escalation level for an Escalation Policy + """ Creates an escalation level for an Escalation Policy Creates a new escalation level from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - - return ( - await asyncio_detailed( - escalation_policy_id=escalation_policy_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + escalation_policy_id=escalation_policy_id, +client=client, +body=body, + + )).parsed 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 b6baf965..486e6e69 100644 --- a/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py +++ b/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.escalation_policy_level_list import EscalationPolicyLevelList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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/escalation_policies/{escalation_policy_id}/escalation_levels".format( - escalation_policy_id=quote(str(escalation_policy_id), safe=""), - ), + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_levels".format(escalation_policy_id=quote(str(escalation_policy_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> EscalationPolicyLevelList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EscalationPolicyLevelList | None: if response.status_code == 200: response_200 = EscalationPolicyLevelList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[EscalationPolicyLevelList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EscalationPolicyLevelList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[EscalationPolicyLevelList]: - """List escalation levels for an Escalation Policy + """ List escalation levels for an Escalation Policy List escalation levels @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[EscalationPolicyLevelList] - """ + """ + kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( escalation_policy_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> EscalationPolicyLevelList | None: - """List escalation levels for an Escalation Policy + """ List escalation levels for an Escalation Policy List escalation levels @@ -128,16 +139,17 @@ def sync( Returns: EscalationPolicyLevelList - """ + """ + return sync_detailed( escalation_policy_id=escalation_policy_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( escalation_policy_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[EscalationPolicyLevelList]: - """List escalation levels for an Escalation Policy + """ List escalation levels for an Escalation Policy List escalation levels @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[EscalationPolicyLevelList] - """ + """ + kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( escalation_policy_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> EscalationPolicyLevelList | None: - """List escalation levels for an Escalation Policy + """ List escalation levels for an Escalation Policy List escalation levels @@ -201,14 +218,14 @@ async def asyncio( Returns: EscalationPolicyLevelList - """ - - return ( - await asyncio_detailed( - escalation_policy_id=escalation_policy_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + escalation_policy_id=escalation_policy_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/escalation_paths/__init__.py b/rootly_sdk/api/escalation_paths/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/escalation_paths/__init__.py +++ b/rootly_sdk/api/escalation_paths/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/escalation_paths/create_escalation_path.py b/rootly_sdk/api/escalation_paths/create_escalation_path.py index 169f479f..b97453aa 100644 --- a/rootly_sdk/api/escalation_paths/create_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/create_escalation_path.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from typing import cast + 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=""), - ), + "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: + +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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyPathResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyPathResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicyPath, + ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """Creates an escalation path + """ Creates an escalation path Creates a new escalation path from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ + """ + kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( 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 an escalation path Creates a new escalation path from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | EscalationPolicyPathResponse - """ + """ + return sync_detailed( escalation_policy_id=escalation_policy_id, - client=client, - body=body, - ).parsed +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 an escalation path Creates a new escalation path from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ + """ + kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 an escalation path Creates a new escalation path from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyPathResponse - """ - - return ( - await asyncio_detailed( - escalation_policy_id=escalation_policy_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + escalation_policy_id=escalation_policy_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/escalation_paths/delete_escalation_path.py b/rootly_sdk/api/escalation_paths/delete_escalation_path.py index 8162cca8..bb74bc35 100644 --- a/rootly_sdk/api/escalation_paths/delete_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/delete_escalation_path.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_path_response import EscalationPolicyPathResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/escalation_paths/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/escalation_paths/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | EscalationPolicyPathResponse | None: + +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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyPathResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyPathResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """Delete an escalation path + """ Delete an escalation path Delete a specific escalation path by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | EscalationPolicyPathResponse | None: - """Delete an escalation path + """ Delete an escalation path Delete a specific escalation path by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | EscalationPolicyPathResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """Delete an escalation path + """ Delete an escalation path Delete a specific escalation path by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | EscalationPolicyPathResponse | None: - """Delete an escalation path + """ Delete an escalation path Delete a specific escalation path by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyPathResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/escalation_paths/get_escalation_path.py b/rootly_sdk/api/escalation_paths/get_escalation_path.py index 1735ff2f..d4152307 100644 --- a/rootly_sdk/api/escalation_paths/get_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/get_escalation_path.py @@ -1,22 +1,31 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_path_response import EscalationPolicyPathResponse +from ...models.get_escalation_path_include import check_get_escalation_path_include from ...models.get_escalation_path_include import GetEscalationPathInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetEscalationPathInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,30 +35,34 @@ def _get_kwargs( params["include"] = json_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/escalation_paths/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/escalation_paths/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | EscalationPolicyPathResponse | None: + +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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyPathResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyPathResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetEscalationPathInclude | Unset = UNSET, + ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """Retrieves an escalation path + """ Retrieves an escalation path Retrieves a specific escalation path by id @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetEscalationPathInclude | Unset = UNSET, + ) -> ErrorsList | EscalationPolicyPathResponse | None: - """Retrieves an escalation path + """ Retrieves an escalation path Retrieves a specific escalation path by id @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | EscalationPolicyPathResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetEscalationPathInclude | Unset = UNSET, + ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """Retrieves an escalation path + """ Retrieves an escalation path Retrieves a specific escalation path by id @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetEscalationPathInclude | Unset = UNSET, + ) -> ErrorsList | EscalationPolicyPathResponse | None: - """Retrieves an escalation path + """ Retrieves an escalation path Retrieves a specific escalation path by id @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyPathResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/escalation_paths/list_escalation_paths.py b/rootly_sdk/api/escalation_paths/list_escalation_paths.py index 9f958994..211b1939 100644 --- a/rootly_sdk/api/escalation_paths/list_escalation_paths.py +++ b/rootly_sdk/api/escalation_paths/list_escalation_paths.py @@ -1,23 +1,35 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.escalation_policy_path_list import EscalationPolicyPathList +from ...models.list_escalation_paths_filterpath_type import check_list_escalation_paths_filterpath_type +from ...models.list_escalation_paths_filterpath_type import ListEscalationPathsFilterpathType +from ...models.list_escalation_paths_include import check_list_escalation_paths_include from ...models.list_escalation_paths_include import ListEscalationPathsInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( escalation_policy_id: str, *, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -27,29 +39,37 @@ def _get_kwargs( params["include"] = json_include + json_filterpath_type: str | Unset = UNSET + if not isinstance(filterpath_type, Unset): + json_filterpath_type = filterpath_type + + params["filter[path_type]"] = json_filterpath_type + 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/escalation_policies/{escalation_policy_id}/escalation_paths".format( - escalation_policy_id=quote(str(escalation_policy_id), safe=""), - ), + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_paths".format(escalation_policy_id=quote(str(escalation_policy_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> EscalationPolicyPathList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EscalationPolicyPathList | None: if response.status_code == 200: response_200 = EscalationPolicyPathList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -58,9 +78,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[EscalationPolicyPathList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EscalationPolicyPathList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,16 +92,19 @@ def sync_detailed( *, client: AuthenticatedClient, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[EscalationPolicyPathList]: - """List escalation paths + """ List escalation paths List escalation paths Args: escalation_policy_id (str): include (ListEscalationPathsInclude | Unset): + filterpath_type (ListEscalationPathsFilterpathType | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -93,13 +114,16 @@ def sync_detailed( Returns: Response[EscalationPolicyPathList] - """ + """ + kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +filterpath_type=filterpath_type, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -108,22 +132,24 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( escalation_policy_id: str, *, client: AuthenticatedClient, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> EscalationPolicyPathList | None: - """List escalation paths + """ List escalation paths List escalation paths Args: escalation_policy_id (str): include (ListEscalationPathsInclude | Unset): + filterpath_type (ListEscalationPathsFilterpathType | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -133,32 +159,37 @@ def sync( Returns: EscalationPolicyPathList - """ + """ + return sync_detailed( escalation_policy_id=escalation_policy_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +filterpath_type=filterpath_type, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( escalation_policy_id: str, *, client: AuthenticatedClient, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[EscalationPolicyPathList]: - """List escalation paths + """ List escalation paths List escalation paths Args: escalation_policy_id (str): include (ListEscalationPathsInclude | Unset): + filterpath_type (ListEscalationPathsFilterpathType | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -168,35 +199,42 @@ async def asyncio_detailed( Returns: Response[EscalationPolicyPathList] - """ + """ + kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +filterpath_type=filterpath_type, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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, include: ListEscalationPathsInclude | Unset = UNSET, + filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> EscalationPolicyPathList | None: - """List escalation paths + """ List escalation paths List escalation paths Args: escalation_policy_id (str): include (ListEscalationPathsInclude | Unset): + filterpath_type (ListEscalationPathsFilterpathType | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -206,14 +244,15 @@ async def asyncio( Returns: EscalationPolicyPathList - """ - - return ( - await asyncio_detailed( - escalation_policy_id=escalation_policy_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + escalation_policy_id=escalation_policy_id, +client=client, +include=include, +filterpath_type=filterpath_type, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/escalation_paths/update_escalation_path.py b/rootly_sdk/api/escalation_paths/update_escalation_path.py index ccbf345f..7c607b5a 100644 --- a/rootly_sdk/api/escalation_paths/update_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/update_escalation_path.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from typing import cast + 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=""), - ), + "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: + +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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyPathResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyPathResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEscalationPolicyPath, + ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """Update an escalation path + """ Update an escalation path Update a specific escalation path by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyPath, + ) -> ErrorsList | EscalationPolicyPathResponse | None: - """Update an escalation path + """ Update an escalation path Update a specific escalation path by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | EscalationPolicyPathResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyPath, + ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """Update an escalation path + """ Update an escalation path Update a specific escalation path by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 an escalation path Update a specific escalation path by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyPathResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/escalation_policies/__init__.py b/rootly_sdk/api/escalation_policies/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/escalation_policies/__init__.py +++ b/rootly_sdk/api/escalation_policies/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/escalation_policies/create_escalation_policy.py b/rootly_sdk/api/escalation_policies/create_escalation_policy.py index 714b4503..519d5058 100644 --- a/rootly_sdk/api/escalation_policies/create_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/create_escalation_policy.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_response import EscalationPolicyResponse from ...models.new_escalation_policy import NewEscalationPolicy -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewEscalationPolicy, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/escalation_policies", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | EscalationPolicyResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyResponse | None: if response.status_code == 201: response_201 = EscalationPolicyResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicy, + ) -> Response[ErrorsList | EscalationPolicyResponse]: - """Creates an escalation policy + """ Creates an escalation policy Creates a new escalation policy from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewEscalationPolicy, + ) -> ErrorsList | EscalationPolicyResponse | None: - """Creates an escalation policy + """ Creates an escalation policy Creates a new escalation policy from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | EscalationPolicyResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicy, + ) -> Response[ErrorsList | EscalationPolicyResponse]: - """Creates an escalation policy + """ Creates an escalation policy Creates a new escalation policy from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewEscalationPolicy, + ) -> ErrorsList | EscalationPolicyResponse | None: - """Creates an escalation policy + """ Creates an escalation policy Creates a new escalation policy from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/escalation_policies/delete_escalation_policy.py b/rootly_sdk/api/escalation_policies/delete_escalation_policy.py index 2c40b934..b246f56c 100644 --- a/rootly_sdk/api/escalation_policies/delete_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/delete_escalation_policy.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_response import EscalationPolicyResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/escalation_policies/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/escalation_policies/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | EscalationPolicyResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyResponse | None: if response.status_code == 200: response_200 = EscalationPolicyResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | EscalationPolicyResponse]: - """Delete an escalation policy + """ Delete an escalation policy Delete a specific escalation policy by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | EscalationPolicyResponse | None: - """Delete an escalation policy + """ Delete an escalation policy Delete a specific escalation policy by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | EscalationPolicyResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | EscalationPolicyResponse]: - """Delete an escalation policy + """ Delete an escalation policy Delete a specific escalation policy by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | EscalationPolicyResponse | None: - """Delete an escalation policy + """ Delete an escalation policy Delete a specific escalation policy by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/escalation_policies/get_escalation_policy.py b/rootly_sdk/api/escalation_policies/get_escalation_policy.py index e17a0ca0..95f20aa2 100644 --- a/rootly_sdk/api/escalation_policies/get_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/get_escalation_policy.py @@ -1,22 +1,31 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_response import EscalationPolicyResponse +from ...models.get_escalation_policy_include import check_get_escalation_policy_include from ...models.get_escalation_policy_include import GetEscalationPolicyInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetEscalationPolicyInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,30 +35,34 @@ def _get_kwargs( params["include"] = json_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/escalation_policies/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/escalation_policies/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | EscalationPolicyResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyResponse | None: if response.status_code == 200: response_200 = EscalationPolicyResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetEscalationPolicyInclude | Unset = UNSET, + ) -> Response[ErrorsList | EscalationPolicyResponse]: - """Retrieves an escalation policy + """ Retrieves an escalation policy Retrieves a specific escalation policy by id @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetEscalationPolicyInclude | Unset = UNSET, + ) -> ErrorsList | EscalationPolicyResponse | None: - """Retrieves an escalation policy + """ Retrieves an escalation policy Retrieves a specific escalation policy by id @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | EscalationPolicyResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetEscalationPolicyInclude | Unset = UNSET, + ) -> Response[ErrorsList | EscalationPolicyResponse]: - """Retrieves an escalation policy + """ Retrieves an escalation policy Retrieves a specific escalation policy by id @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetEscalationPolicyInclude | Unset = UNSET, + ) -> ErrorsList | EscalationPolicyResponse | None: - """Retrieves an escalation policy + """ Retrieves an escalation policy Retrieves a specific escalation policy by id @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/escalation_policies/list_escalation_policies.py b/rootly_sdk/api/escalation_policies/list_escalation_policies.py index f30361c9..37f84d7a 100644 --- a/rootly_sdk/api/escalation_policies/list_escalation_policies.py +++ b/rootly_sdk/api/escalation_policies/list_escalation_policies.py @@ -1,15 +1,19 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.escalation_policy_list import EscalationPolicyList -from ...models.list_escalation_policies_include import ( - ListEscalationPoliciesInclude, -) -from ...types import UNSET, Response, Unset +from ...models.list_escalation_policies_include import check_list_escalation_policies_include +from ...models.list_escalation_policies_include import ListEscalationPoliciesInclude +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -17,13 +21,26 @@ def _get_kwargs( include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -37,6 +54,8 @@ def _get_kwargs( params["filter[name]"] = filtername + params["filter[team_ids]"] = filterteam_ids + params["filter[created_at][gt]"] = filtercreated_atgt params["filter[created_at][gte]"] = filtercreated_atgte @@ -45,25 +64,47 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[team_ids][eq]"] = filterteam_idseq + + params["filter[team_ids][not_eq]"] = filterteam_idsnot_eq + + params["filter[team_ids][in]"] = filterteam_idsin + + params["filter[team_ids][not_in]"] = filterteam_idsnot_in + 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/escalation_policies", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EscalationPolicyList | None: if response.status_code == 200: response_200 = EscalationPolicyList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -72,9 +113,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[EscalationPolicyList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EscalationPolicyList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,14 +128,24 @@ def sync_detailed( include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[EscalationPolicyList]: - """List escalation policies + """ List escalation policies List escalation policies @@ -104,10 +153,19 @@ def sync_detailed( include (ListEscalationPoliciesInclude | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterteam_ids (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -117,18 +175,29 @@ def sync_detailed( Returns: Response[EscalationPolicyList] - """ + """ + kwargs = _get_kwargs( include=include, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterteam_ids=filterteam_ids, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterteam_idseq=filterteam_idseq, +filterteam_idsnot_eq=filterteam_idsnot_eq, +filterteam_idsin=filterteam_idsin, +filterteam_idsnot_in=filterteam_idsnot_in, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -137,21 +206,30 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> EscalationPolicyList | None: - """List escalation policies + """ List escalation policies List escalation policies @@ -159,10 +237,19 @@ def sync( include (ListEscalationPoliciesInclude | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterteam_ids (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -172,21 +259,31 @@ def sync( Returns: EscalationPolicyList - """ + """ + return sync_detailed( client=client, - include=include, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +filtersearch=filtersearch, +filtername=filtername, +filterteam_ids=filterteam_ids, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterteam_idseq=filterteam_idseq, +filterteam_idsnot_eq=filterteam_idsnot_eq, +filterteam_idsin=filterteam_idsin, +filterteam_idsnot_in=filterteam_idsnot_in, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -194,14 +291,24 @@ async def asyncio_detailed( include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[EscalationPolicyList]: - """List escalation policies + """ List escalation policies List escalation policies @@ -209,10 +316,19 @@ async def asyncio_detailed( include (ListEscalationPoliciesInclude | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterteam_ids (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -222,39 +338,61 @@ async def asyncio_detailed( Returns: Response[EscalationPolicyList] - """ + """ + kwargs = _get_kwargs( include=include, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterteam_ids=filterteam_ids, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterteam_idseq=filterteam_idseq, +filterteam_idsnot_eq=filterteam_idsnot_eq, +filterteam_idsin=filterteam_idsin, +filterteam_idsnot_in=filterteam_idsnot_in, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, include: ListEscalationPoliciesInclude | Unset = UNSET, filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, + filterteam_ids: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> EscalationPolicyList | None: - """List escalation policies + """ List escalation policies List escalation policies @@ -262,10 +400,19 @@ async def asyncio( include (ListEscalationPoliciesInclude | Unset): filtersearch (str | Unset): filtername (str | Unset): + filterteam_ids (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -275,19 +422,28 @@ async def asyncio( Returns: EscalationPolicyList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +filtersearch=filtersearch, +filtername=filtername, +filterteam_ids=filterteam_ids, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterteam_idseq=filterteam_idseq, +filterteam_idsnot_eq=filterteam_idsnot_eq, +filterteam_idsin=filterteam_idsin, +filterteam_idsnot_in=filterteam_idsnot_in, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/escalation_policies/update_escalation_policy.py b/rootly_sdk/api/escalation_policies/update_escalation_policy.py index d779d41b..b29467cf 100644 --- a/rootly_sdk/api/escalation_policies/update_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/update_escalation_policy.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.escalation_policy_response import EscalationPolicyResponse from ...models.update_escalation_policy import UpdateEscalationPolicy -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateEscalationPolicy, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/escalation_policies/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/escalation_policies/{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 | EscalationPolicyResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyResponse | None: if response.status_code == 200: response_200 = EscalationPolicyResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | EscalationPolicyResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEscalationPolicy, + ) -> Response[ErrorsList | EscalationPolicyResponse]: - """Update an escalation policy + """ Update an escalation policy Update a specific escalation policy by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicy, + ) -> ErrorsList | EscalationPolicyResponse | None: - """Update an escalation policy + """ Update an escalation policy Update a specific escalation policy by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | EscalationPolicyResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicy, + ) -> Response[ErrorsList | EscalationPolicyResponse]: - """Update an escalation policy + """ Update an escalation policy Update a specific escalation policy by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicy, + ) -> ErrorsList | EscalationPolicyResponse | None: - """Update an escalation policy + """ Update an escalation policy Update a specific escalation policy by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/form_field_options/__init__.py b/rootly_sdk/api/form_field_options/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/form_field_options/__init__.py +++ b/rootly_sdk/api/form_field_options/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 f403634b..e1147cb0 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_option_response import FormFieldOptionResponse from ...models.new_form_field_option import NewFormFieldOption -from ...types import Response +from typing import cast + def _get_kwargs( form_field_id: str, *, body: NewFormFieldOption, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_fields/{form_field_id}/options".format( - form_field_id=quote(str(form_field_id), safe=""), - ), + "url": "/v1/form_fields/{form_field_id}/options".format(form_field_id=quote(str(form_field_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 | FormFieldOptionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldOptionResponse | None: if response.status_code == 201: response_201 = FormFieldOptionResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldOptionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldOptionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormFieldOption, + ) -> Response[ErrorsList | FormFieldOptionResponse]: - """Creates FormField Options + """ Creates FormField Options Creates a new form_field_option from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldOption, + ) -> ErrorsList | FormFieldOptionResponse | None: - """Creates FormField Options + """ Creates FormField Options Creates a new form_field_option from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | FormFieldOptionResponse - """ + """ + return sync_detailed( form_field_id=form_field_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldOption, + ) -> Response[ErrorsList | FormFieldOptionResponse]: - """Creates FormField Options + """ Creates FormField Options Creates a new form_field_option from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldOption, + ) -> ErrorsList | FormFieldOptionResponse | None: - """Creates FormField Options + """ Creates FormField Options Creates a new form_field_option from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | FormFieldOptionResponse - """ - - return ( - await asyncio_detailed( - form_field_id=form_field_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_field_id=form_field_id, +client=client, +body=body, + + )).parsed 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 7475c4c1..5488a705 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_option_response import FormFieldOptionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_field_options/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_options/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldOptionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldOptionResponse | None: if response.status_code == 200: response_200 = FormFieldOptionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldOptionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldOptionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldOptionResponse]: - """Delete FormField Options + """ Delete FormField Options Delete a specific form_field_option by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldOptionResponse | None: - """Delete FormField Options + """ Delete FormField Options Delete a specific form_field_option by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormFieldOptionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldOptionResponse]: - """Delete FormField Options + """ Delete FormField Options Delete a specific form_field_option by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldOptionResponse | None: - """Delete FormField Options + """ Delete FormField Options Delete a specific form_field_option by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormFieldOptionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 6b07adca..7f068d7b 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_option_response import FormFieldOptionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_field_options/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_options/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldOptionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldOptionResponse | None: if response.status_code == 200: response_200 = FormFieldOptionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldOptionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldOptionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldOptionResponse]: - """Retrieves FormField Options + """ Retrieves FormField Options Retrieves a specific form_field_option by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldOptionResponse | None: - """Retrieves FormField Options + """ Retrieves FormField Options Retrieves a specific form_field_option by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormFieldOptionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldOptionResponse]: - """Retrieves FormField Options + """ Retrieves FormField Options Retrieves a specific form_field_option by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldOptionResponse | None: - """Retrieves FormField Options + """ Retrieves FormField Options Retrieves a specific form_field_option by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormFieldOptionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 9acb8d0b..6b6e13b6 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.form_field_option_list import FormFieldOptionList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -18,7 +22,11 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -32,23 +40,27 @@ def _get_kwargs( params["filter[color]"] = filtercolor + 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/form_fields/{form_field_id}/options".format( - form_field_id=quote(str(form_field_id), safe=""), - ), + "url": "/v1/form_fields/{form_field_id}/options".format(form_field_id=quote(str(form_field_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldOptionList | None: if response.status_code == 200: response_200 = FormFieldOptionList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -75,8 +87,9 @@ def sync_detailed( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> Response[FormFieldOptionList]: - """List FormField Options + """ List FormField Options List form_field_options @@ -94,15 +107,17 @@ def sync_detailed( Returns: Response[FormFieldOptionList] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtervalue=filtervalue, - filtercolor=filtercolor, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtervalue=filtervalue, +filtercolor=filtercolor, + ) response = client.get_httpx_client().request( @@ -111,7 +126,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_field_id: str, *, @@ -121,8 +135,9 @@ def sync( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> FormFieldOptionList | None: - """List FormField Options + """ List FormField Options List form_field_options @@ -140,18 +155,19 @@ def sync( Returns: FormFieldOptionList - """ + """ + return sync_detailed( form_field_id=form_field_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtervalue=filtervalue, - filtercolor=filtercolor, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtervalue=filtervalue, +filtercolor=filtercolor, + ).parsed async def asyncio_detailed( form_field_id: str, @@ -162,8 +178,9 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> Response[FormFieldOptionList]: - """List FormField Options + """ List FormField Options List form_field_options @@ -181,22 +198,25 @@ async def asyncio_detailed( Returns: Response[FormFieldOptionList] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtervalue=filtervalue, - filtercolor=filtercolor, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtervalue=filtervalue, +filtercolor=filtercolor, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_field_id: str, *, @@ -206,8 +226,9 @@ async def asyncio( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, + ) -> FormFieldOptionList | None: - """List FormField Options + """ List FormField Options List form_field_options @@ -225,16 +246,16 @@ async def asyncio( Returns: FormFieldOptionList - """ - - return ( - await asyncio_detailed( - form_field_id=form_field_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtervalue=filtervalue, - filtercolor=filtercolor, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_field_id=form_field_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtervalue=filtervalue, +filtercolor=filtercolor, + + )).parsed 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 246e39f3..da8ac582 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_option_response import FormFieldOptionResponse from ...models.update_form_field_option import UpdateFormFieldOption -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateFormFieldOption, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_field_options/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_options/{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 | FormFieldOptionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldOptionResponse | None: if response.status_code == 200: response_200 = FormFieldOptionResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldOptionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldOptionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormFieldOption, + ) -> Response[ErrorsList | FormFieldOptionResponse]: - """Update FormField Options + """ Update FormField Options Update a specific form_field_option by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldOption, + ) -> ErrorsList | FormFieldOptionResponse | None: - """Update FormField Options + """ Update FormField Options Update a specific form_field_option by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | FormFieldOptionResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldOption, + ) -> Response[ErrorsList | FormFieldOptionResponse]: - """Update FormField Options + """ Update FormField Options Update a specific form_field_option by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldOption, + ) -> ErrorsList | FormFieldOptionResponse | None: - """Update FormField Options + """ Update FormField Options Update a specific form_field_option by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | FormFieldOptionResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/form_field_placement_conditions/__init__.py b/rootly_sdk/api/form_field_placement_conditions/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/form_field_placement_conditions/__init__.py +++ b/rootly_sdk/api/form_field_placement_conditions/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 014965e1..746f10f4 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_placement_condition_response import FormFieldPlacementConditionResponse from ...models.new_form_field_placement_condition import NewFormFieldPlacementCondition -from ...types import Response +from typing import cast + def _get_kwargs( form_field_placement_id: str, *, body: NewFormFieldPlacementCondition, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_field_placements/{form_field_placement_id}/conditions".format( - form_field_placement_id=quote(str(form_field_placement_id), safe=""), - ), + "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() + headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldPlacementConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementConditionResponse | None: if response.status_code == 201: response_201 = FormFieldPlacementConditionResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormFieldPlacementCondition, + ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """Creates a Form Set Condition + """ Creates a Form Set Condition Creates a new form_field_placement_condition from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ + """ + kwargs = _get_kwargs( form_field_placement_id=form_field_placement_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_field_placement_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacementCondition, + ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """Creates a Form Set Condition + """ Creates a Form Set Condition Creates a new form_field_placement_condition from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ + """ + return sync_detailed( form_field_placement_id=form_field_placement_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( form_field_placement_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacementCondition, + ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """Creates a Form Set Condition + """ Creates a Form Set Condition Creates a new form_field_placement_condition from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ + """ + kwargs = _get_kwargs( form_field_placement_id=form_field_placement_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_field_placement_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacementCondition, + ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """Creates a Form Set Condition + """ Creates a Form Set Condition Creates a new form_field_placement_condition from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - - return ( - await asyncio_detailed( - form_field_placement_id=form_field_placement_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_field_placement_id=form_field_placement_id, +client=client, +body=body, + + )).parsed 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 568253ab..a7501f2e 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_placement_condition_response import FormFieldPlacementConditionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_field_placement_conditions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_placement_conditions/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldPlacementConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementConditionResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementConditionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """Delete a Form Set Condition + """ Delete a Form Set Condition Delete a specific form_field_placement_condition by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """Delete a Form Set Condition + """ Delete a Form Set Condition Delete a specific form_field_placement_condition by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """Delete a Form Set Condition + """ Delete a Form Set Condition Delete a specific form_field_placement_condition by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """Delete a Form Set Condition + """ Delete a Form Set Condition Delete a specific form_field_placement_condition by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 8d6e2170..7d480c02 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_placement_condition_response import FormFieldPlacementConditionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_field_placement_conditions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_placement_conditions/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldPlacementConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementConditionResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementConditionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """Retrieves a Form Set Condition + """ Retrieves a Form Set Condition Retrieves a specific form_field_placement_condition by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """Retrieves a Form Set Condition + """ Retrieves a Form Set Condition Retrieves a specific form_field_placement_condition by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """Retrieves a Form Set Condition + """ Retrieves a Form Set Condition Retrieves a specific form_field_placement_condition by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """Retrieves a Form Set Condition + """ Retrieves a Form Set Condition Retrieves a specific form_field_placement_condition by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 5730bb1d..7683e5c4 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.form_field_placement_condition_list import FormFieldPlacementConditionList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -17,7 +21,11 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,25 +37,27 @@ def _get_kwargs( params["filter[form_field_id]"] = filterform_field_id + 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/form_field_placements/{form_field_placement_id}/conditions".format( - form_field_placement_id=quote(str(form_field_placement_id), safe=""), - ), + "url": "/v1/form_field_placements/{form_field_placement_id}/conditions".format(form_field_placement_id=quote(str(form_field_placement_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> FormFieldPlacementConditionList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldPlacementConditionList | None: if response.status_code == 200: response_200 = FormFieldPlacementConditionList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -56,9 +66,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[FormFieldPlacementConditionList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[FormFieldPlacementConditionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +83,9 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> Response[FormFieldPlacementConditionList]: - """List Form Set Conditions + """ List Form Set Conditions List form_field_placement_conditions @@ -93,14 +102,16 @@ def sync_detailed( Returns: Response[FormFieldPlacementConditionList] - """ + """ + kwargs = _get_kwargs( form_field_placement_id=form_field_placement_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + ) response = client.get_httpx_client().request( @@ -109,7 +120,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_field_placement_id: str, *, @@ -118,8 +128,9 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> FormFieldPlacementConditionList | None: - """List Form Set Conditions + """ List Form Set Conditions List form_field_placement_conditions @@ -136,17 +147,18 @@ def sync( Returns: FormFieldPlacementConditionList - """ + """ + return sync_detailed( form_field_placement_id=form_field_placement_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + ).parsed async def asyncio_detailed( form_field_placement_id: str, @@ -156,8 +168,9 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> Response[FormFieldPlacementConditionList]: - """List Form Set Conditions + """ List Form Set Conditions List form_field_placement_conditions @@ -174,21 +187,24 @@ async def asyncio_detailed( Returns: Response[FormFieldPlacementConditionList] - """ + """ + kwargs = _get_kwargs( form_field_placement_id=form_field_placement_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_field_placement_id: str, *, @@ -197,8 +213,9 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> FormFieldPlacementConditionList | None: - """List Form Set Conditions + """ List Form Set Conditions List form_field_placement_conditions @@ -215,15 +232,15 @@ async def asyncio( Returns: FormFieldPlacementConditionList - """ - - return ( - await asyncio_detailed( - form_field_placement_id=form_field_placement_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_field_placement_id=form_field_placement_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + + )).parsed 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 a9fe050c..92d19b55 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_placement_condition_response import FormFieldPlacementConditionResponse from ...models.update_form_field_placement_condition import UpdateFormFieldPlacementCondition -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateFormFieldPlacementCondition, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_field_placement_conditions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_placement_conditions/{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 | FormFieldPlacementConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementConditionResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementConditionResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormFieldPlacementCondition, + ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """Update a Form Set Condition + """ Update a Form Set Condition Update a specific form_field_placement_condition by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacementCondition, + ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """Update a Form Set Condition + """ Update a Form Set Condition Update a specific form_field_placement_condition by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacementCondition, + ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """Update a Form Set Condition + """ Update a Form Set Condition Update a specific form_field_placement_condition by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacementCondition, + ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """Update a Form Set Condition + """ Update a Form Set Condition Update a specific form_field_placement_condition by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/form_field_placements/__init__.py b/rootly_sdk/api/form_field_placements/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/form_field_placements/__init__.py +++ b/rootly_sdk/api/form_field_placements/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 247a26a7..59556c64 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_placement_response import FormFieldPlacementResponse from ...models.new_form_field_placement import NewFormFieldPlacement -from ...types import Response +from typing import cast + def _get_kwargs( form_field_id: str, *, body: NewFormFieldPlacement, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_fields/{form_field_id}/placements".format( - form_field_id=quote(str(form_field_id), safe=""), - ), + "url": "/v1/form_fields/{form_field_id}/placements".format(form_field_id=quote(str(form_field_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 | FormFieldPlacementResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementResponse | None: if response.status_code == 201: response_201 = FormFieldPlacementResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldPlacementResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormFieldPlacement, + ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """Creates a Form Field Placement + """ Creates a Form Field Placement Creates a new form_field_placement from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacement, + ) -> ErrorsList | FormFieldPlacementResponse | None: - """Creates a Form Field Placement + """ Creates a Form Field Placement Creates a new form_field_placement from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | FormFieldPlacementResponse - """ + """ + return sync_detailed( form_field_id=form_field_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacement, + ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """Creates a Form Field Placement + """ Creates a Form Field Placement Creates a new form_field_placement from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacement, + ) -> ErrorsList | FormFieldPlacementResponse | None: - """Creates a Form Field Placement + """ Creates a Form Field Placement Creates a new form_field_placement from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementResponse - """ - - return ( - await asyncio_detailed( - form_field_id=form_field_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_field_id=form_field_id, +client=client, +body=body, + + )).parsed 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 424eeaa0..73e7fc9b 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_placement_response import FormFieldPlacementResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_field_placements/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_placements/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldPlacementResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldPlacementResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """Delete a Form Field Placement + """ Delete a Form Field Placement Delete a specific form_field_placement by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPlacementResponse | None: - """Delete a Form Field Placement + """ Delete a Form Field Placement Delete a specific form_field_placement by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormFieldPlacementResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """Delete a Form Field Placement + """ Delete a Form Field Placement Delete a specific form_field_placement by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPlacementResponse | None: - """Delete a Form Field Placement + """ Delete a Form Field Placement Delete a specific form_field_placement by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 0d9e7d4e..f5d8e959 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_placement_response import FormFieldPlacementResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_field_placements/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_placements/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldPlacementResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldPlacementResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """Retrieves a Form Field Placement + """ Retrieves a Form Field Placement Retrieves a specific form_field_placement by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPlacementResponse | None: - """Retrieves a Form Field Placement + """ Retrieves a Form Field Placement Retrieves a specific form_field_placement by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormFieldPlacementResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """Retrieves a Form Field Placement + """ Retrieves a Form Field Placement Retrieves a specific form_field_placement by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPlacementResponse | None: - """Retrieves a Form Field Placement + """ Retrieves a Form Field Placement Retrieves a specific form_field_placement by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 cfc35101..34a8fbba 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.form_field_placement_list import FormFieldPlacementList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -17,7 +21,11 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,23 +37,27 @@ def _get_kwargs( params["filter[form_field_id]"] = filterform_field_id + 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/form_fields/{form_field_id}/placements".format( - form_field_id=quote(str(form_field_id), safe=""), - ), + "url": "/v1/form_fields/{form_field_id}/placements".format(form_field_id=quote(str(form_field_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldPlacementList | None: if response.status_code == 200: response_200 = FormFieldPlacementList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -54,9 +66,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[FormFieldPlacementList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[FormFieldPlacementList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,8 +83,9 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> Response[FormFieldPlacementList]: - """List Form Field Placements + """ List Form Field Placements List form_field_placements @@ -91,14 +102,16 @@ def sync_detailed( Returns: Response[FormFieldPlacementList] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + ) response = client.get_httpx_client().request( @@ -107,7 +120,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_field_id: str, *, @@ -116,8 +128,9 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> FormFieldPlacementList | None: - """List Form Field Placements + """ List Form Field Placements List form_field_placements @@ -134,17 +147,18 @@ def sync( Returns: FormFieldPlacementList - """ + """ + return sync_detailed( form_field_id=form_field_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + ).parsed async def asyncio_detailed( form_field_id: str, @@ -154,8 +168,9 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> Response[FormFieldPlacementList]: - """List Form Field Placements + """ List Form Field Placements List form_field_placements @@ -172,21 +187,24 @@ async def asyncio_detailed( Returns: Response[FormFieldPlacementList] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_field_id: str, *, @@ -195,8 +213,9 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> FormFieldPlacementList | None: - """List Form Field Placements + """ List Form Field Placements List form_field_placements @@ -213,15 +232,15 @@ async def asyncio( Returns: FormFieldPlacementList - """ - - return ( - await asyncio_detailed( - form_field_id=form_field_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_field_id=form_field_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + + )).parsed 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 441e2ba2..a680a91e 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,61 +1,77 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_placement_response import FormFieldPlacementResponse from ...models.update_form_field_placement import UpdateFormFieldPlacement -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateFormFieldPlacement, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_field_placements/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_placements/{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 | FormFieldPlacementResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementResponse.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 | FormFieldPlacementResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormFieldPlacement, + ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """Update a Form Field Placement + """ Update a Form Field Placement Update a specific form_field_placement by id @@ -84,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacement, + ) -> ErrorsList | FormFieldPlacementResponse | None: - """Update a Form Field Placement + """ Update a Form Field Placement Update a specific form_field_placement by id @@ -118,22 +137,24 @@ def sync( Returns: ErrorsList | FormFieldPlacementResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacement, + ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """Update a Form Field Placement + """ Update a Form Field Placement Update a specific form_field_placement by id @@ -147,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacement, + ) -> ErrorsList | FormFieldPlacementResponse | None: - """Update a Form Field Placement + """ Update a Form Field Placement Update a specific form_field_placement by id @@ -179,12 +204,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/form_field_positions/__init__.py b/rootly_sdk/api/form_field_positions/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/form_field_positions/__init__.py +++ b/rootly_sdk/api/form_field_positions/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 efd7a94f..faf711b5 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,61 +1,77 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_position_response import FormFieldPositionResponse from ...models.new_form_field_position import NewFormFieldPosition -from ...types import Response +from typing import cast + def _get_kwargs( form_field_id: str, *, body: NewFormFieldPosition, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_fields/{form_field_id}/positions".format( - form_field_id=quote(str(form_field_id), safe=""), - ), + "url": "/v1/form_fields/{form_field_id}/positions".format(form_field_id=quote(str(form_field_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 | FormFieldPositionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPositionResponse | None: if response.status_code == 201: response_201 = FormFieldPositionResponse.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 | FormFieldPositionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPositionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormFieldPosition, + ) -> Response[ErrorsList | FormFieldPositionResponse]: - """Creates FormField Positions + """ Creates FormField Positions Creates a new form field_position from provided data @@ -84,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPosition, + ) -> ErrorsList | FormFieldPositionResponse | None: - """Creates FormField Positions + """ Creates FormField Positions Creates a new form field_position from provided data @@ -118,22 +137,24 @@ def sync( Returns: ErrorsList | FormFieldPositionResponse - """ + """ + return sync_detailed( form_field_id=form_field_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPosition, + ) -> Response[ErrorsList | FormFieldPositionResponse]: - """Creates FormField Positions + """ Creates FormField Positions Creates a new form field_position from provided data @@ -147,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPosition, + ) -> ErrorsList | FormFieldPositionResponse | None: - """Creates FormField Positions + """ Creates FormField Positions Creates a new form field_position from provided data @@ -179,12 +204,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPositionResponse - """ - - return ( - await asyncio_detailed( - form_field_id=form_field_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_field_id=form_field_id, +client=client, +body=body, + + )).parsed 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 e4c0d5a2..7a93195d 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_position_response import FormFieldPositionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_field_positions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_positions/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldPositionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPositionResponse | None: if response.status_code == 200: response_200 = FormFieldPositionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldPositionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPositionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPositionResponse]: - """Delete a FormFieldPosition + """ Delete a FormFieldPosition Delete a specific form_field position by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPositionResponse | None: - """Delete a FormFieldPosition + """ Delete a FormFieldPosition Delete a specific form_field position by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormFieldPositionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPositionResponse]: - """Delete a FormFieldPosition + """ Delete a FormFieldPosition Delete a specific form_field position by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPositionResponse | None: - """Delete a FormFieldPosition + """ Delete a FormFieldPosition Delete a specific form_field position by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPositionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 999abfae..6dbcafc7 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_position_response import FormFieldPositionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_field_positions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_positions/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldPositionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPositionResponse | None: if response.status_code == 200: response_200 = FormFieldPositionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldPositionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPositionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPositionResponse]: - """Retrieves a FormFieldPosition + """ Retrieves a FormFieldPosition Retrieves a specific form field_position by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPositionResponse | None: - """Retrieves a FormFieldPosition + """ Retrieves a FormFieldPosition Retrieves a specific form field_position by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormFieldPositionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldPositionResponse]: - """Retrieves a FormFieldPosition + """ Retrieves a FormFieldPosition Retrieves a specific form field_position by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldPositionResponse | None: - """Retrieves a FormFieldPosition + """ Retrieves a FormFieldPosition Retrieves a specific form field_position by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPositionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 cb81b62a..4d0a0b61 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.form_field_position_list import FormFieldPositionList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -17,7 +21,11 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,23 +37,27 @@ def _get_kwargs( params["filter[form]"] = filterform + 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/form_fields/{form_field_id}/positions".format( - form_field_id=quote(str(form_field_id), safe=""), - ), + "url": "/v1/form_fields/{form_field_id}/positions".format(form_field_id=quote(str(form_field_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldPositionList | None: if response.status_code == 200: response_200 = FormFieldPositionList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -54,9 +66,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[FormFieldPositionList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[FormFieldPositionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,8 +83,9 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, + ) -> Response[FormFieldPositionList]: - """List FormField Position + """ List FormField Position List form field positions @@ -91,14 +102,16 @@ def sync_detailed( Returns: Response[FormFieldPositionList] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform=filterform, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform=filterform, + ) response = client.get_httpx_client().request( @@ -107,7 +120,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_field_id: str, *, @@ -116,8 +128,9 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, + ) -> FormFieldPositionList | None: - """List FormField Position + """ List FormField Position List form field positions @@ -134,17 +147,18 @@ def sync( Returns: FormFieldPositionList - """ + """ + return sync_detailed( form_field_id=form_field_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform=filterform, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform=filterform, + ).parsed async def asyncio_detailed( form_field_id: str, @@ -154,8 +168,9 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, + ) -> Response[FormFieldPositionList]: - """List FormField Position + """ List FormField Position List form field positions @@ -172,21 +187,24 @@ async def asyncio_detailed( Returns: Response[FormFieldPositionList] - """ + """ + kwargs = _get_kwargs( form_field_id=form_field_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform=filterform, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform=filterform, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_field_id: str, *, @@ -195,8 +213,9 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, + ) -> FormFieldPositionList | None: - """List FormField Position + """ List FormField Position List form field positions @@ -213,15 +232,15 @@ async def asyncio( Returns: FormFieldPositionList - """ - - return ( - await asyncio_detailed( - form_field_id=form_field_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform=filterform, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_field_id=form_field_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform=filterform, + + )).parsed 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 3500e73b..c47c23d2 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,61 +1,77 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_position_response import FormFieldPositionResponse from ...models.update_form_field_position import UpdateFormFieldPosition -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateFormFieldPosition, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_field_positions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_field_positions/{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 | FormFieldPositionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPositionResponse | None: if response.status_code == 200: response_200 = FormFieldPositionResponse.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 | FormFieldPositionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPositionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormFieldPosition, + ) -> Response[ErrorsList | FormFieldPositionResponse]: - """Update a FormFieldPosition + """ Update a FormFieldPosition Update a specific form_field position by id @@ -84,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPosition, + ) -> ErrorsList | FormFieldPositionResponse | None: - """Update a FormFieldPosition + """ Update a FormFieldPosition Update a specific form_field position by id @@ -118,22 +137,24 @@ def sync( Returns: ErrorsList | FormFieldPositionResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPosition, + ) -> Response[ErrorsList | FormFieldPositionResponse]: - """Update a FormFieldPosition + """ Update a FormFieldPosition Update a specific form_field position by id @@ -147,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPosition, + ) -> ErrorsList | FormFieldPositionResponse | None: - """Update a FormFieldPosition + """ Update a FormFieldPosition Update a specific form_field position by id @@ -179,12 +204,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPositionResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/form_fields/__init__.py b/rootly_sdk/api/form_fields/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/form_fields/__init__.py +++ b/rootly_sdk/api/form_fields/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/form_fields/create_form_field.py b/rootly_sdk/api/form_fields/create_form_field.py index c2069472..84d8f949 100644 --- a/rootly_sdk/api/form_fields/create_form_field.py +++ b/rootly_sdk/api/form_fields/create_form_field.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_response import FormFieldResponse from ...models.new_form_field import NewFormField -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewFormField, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/form_fields", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | FormFieldResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldResponse | None: if response.status_code == 201: response_201 = FormFieldResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormField, + ) -> Response[ErrorsList | FormFieldResponse]: - """Creates a Form Field + """ Creates a Form Field Creates a new form_field from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewFormField, + ) -> ErrorsList | FormFieldResponse | None: - """Creates a Form Field + """ Creates a Form Field Creates a new form_field from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | FormFieldResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewFormField, + ) -> Response[ErrorsList | FormFieldResponse]: - """Creates a Form Field + """ Creates a Form Field Creates a new form_field from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewFormField, + ) -> ErrorsList | FormFieldResponse | None: - """Creates a Form Field + """ Creates a Form Field Creates a new form_field from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | FormFieldResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/form_fields/delete_form_field.py b/rootly_sdk/api/form_fields/delete_form_field.py index 40362583..810c36dc 100644 --- a/rootly_sdk/api/form_fields/delete_form_field.py +++ b/rootly_sdk/api/form_fields/delete_form_field.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_response import FormFieldResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_fields/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_fields/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldResponse | None: if response.status_code == 200: response_200 = FormFieldResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldResponse]: - """Delete a Form Field + """ Delete a Form Field Delete a specific form_field by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldResponse | None: - """Delete a Form Field + """ Delete a Form Field Delete a specific form_field by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | FormFieldResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormFieldResponse]: - """Delete a Form Field + """ Delete a Form Field Delete a specific form_field by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FormFieldResponse | None: - """Delete a Form Field + """ Delete a Form Field Delete a specific form_field by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | FormFieldResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/form_fields/get_form_field.py b/rootly_sdk/api/form_fields/get_form_field.py index b6fcd5f0..126f212b 100644 --- a/rootly_sdk/api/form_fields/get_form_field.py +++ b/rootly_sdk/api/form_fields/get_form_field.py @@ -1,23 +1,32 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_response import FormFieldResponse +from ...models.get_form_field_include import check_get_form_field_include from ...models.get_form_field_include import GetFormFieldInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, include: GetFormFieldInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -27,30 +36,34 @@ def _get_kwargs( params["include"] = json_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/form_fields/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_fields/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormFieldResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldResponse | None: if response.status_code == 200: response_200 = FormFieldResponse.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: @@ -59,9 +72,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +86,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetFormFieldInclude | Unset = UNSET, + ) -> Response[ErrorsList | FormFieldResponse]: - """Retrieves a Form Field + """ Retrieves a Form Field Retrieves a specific form_field by id @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetFormFieldInclude | Unset = UNSET, + ) -> ErrorsList | FormFieldResponse | None: - """Retrieves a Form Field + """ Retrieves a Form Field Retrieves a specific form_field by id @@ -124,22 +138,24 @@ def sync( Returns: ErrorsList | FormFieldResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetFormFieldInclude | Unset = UNSET, + ) -> Response[ErrorsList | FormFieldResponse]: - """Retrieves a Form Field + """ Retrieves a Form Field Retrieves a specific form_field by id @@ -153,25 +169,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetFormFieldInclude | Unset = UNSET, + ) -> ErrorsList | FormFieldResponse | None: - """Retrieves a Form Field + """ Retrieves a Form Field Retrieves a specific form_field by id @@ -185,12 +205,12 @@ async def asyncio( Returns: ErrorsList | FormFieldResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/form_fields/list_form_fields.py b/rootly_sdk/api/form_fields/list_form_fields.py index 71e05703..e9ac7abb 100644 --- a/rootly_sdk/api/form_fields/list_form_fields.py +++ b/rootly_sdk/api/form_fields/list_form_fields.py @@ -1,13 +1,19 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.form_field_list import FormFieldList +from ...models.list_form_fields_include import check_list_form_fields_include from ...models.list_form_fields_include import ListFormFieldsInclude -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -24,7 +30,27 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -56,21 +82,59 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + + params["filter[enabled][eq]"] = filterenabledeq + + params["filter[enabled][not_eq]"] = filterenablednot_eq + + params["filter[enabled][in]"] = filterenabledin + + params["filter[enabled][not_in]"] = filterenablednot_in + + 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/form_fields", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldList | None: if response.status_code == 200: response_200 = FormFieldList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -103,8 +167,25 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> Response[FormFieldList]: - """List Form Fields + """ List Form Fields List form_fields @@ -121,6 +202,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -128,21 +225,39 @@ def sync_detailed( Returns: Response[FormFieldList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterkind=filterkind, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, + ) response = client.get_httpx_client().request( @@ -151,7 +266,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -167,8 +281,25 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> FormFieldList | None: - """List Form Fields + """ List Form Fields List form_fields @@ -185,6 +316,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -192,24 +339,41 @@ def sync( Returns: FormFieldList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterkind=filterkind, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, + ).parsed async def asyncio_detailed( *, @@ -226,8 +390,25 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> Response[FormFieldList]: - """List Form Fields + """ List Form Fields List form_fields @@ -244,6 +425,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -251,28 +448,47 @@ async def asyncio_detailed( Returns: Response[FormFieldList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterkind=filterkind, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -288,8 +504,25 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, + ) -> FormFieldList | None: - """List Form Fields + """ List Form Fields List form_fields @@ -306,6 +539,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -313,22 +562,38 @@ async def asyncio( Returns: FormFieldList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterkind=filterkind, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterkind=filterkind, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, + + )).parsed diff --git a/rootly_sdk/api/form_fields/update_form_field.py b/rootly_sdk/api/form_fields/update_form_field.py index 2aa102db..2f32140b 100644 --- a/rootly_sdk/api/form_fields/update_form_field.py +++ b/rootly_sdk/api/form_fields/update_form_field.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_field_response import FormFieldResponse from ...models.update_form_field import UpdateFormField -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateFormField, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_fields/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_fields/{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 | FormFieldResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldResponse | None: if response.status_code == 200: response_200 = FormFieldResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormFieldResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormField, + ) -> Response[ErrorsList | FormFieldResponse]: - """Update a Form Field + """ Update a Form Field Update a specific form_field by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, + ) -> ErrorsList | FormFieldResponse | None: - """Update a Form Field + """ Update a Form Field Update a specific form_field by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | FormFieldResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, + ) -> Response[ErrorsList | FormFieldResponse]: - """Update a Form Field + """ Update a Form Field Update a specific form_field by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, + ) -> ErrorsList | FormFieldResponse | None: - """Update a Form Field + """ Update a Form Field Update a specific form_field by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | FormFieldResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/form_set_conditions/__init__.py b/rootly_sdk/api/form_set_conditions/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/form_set_conditions/__init__.py +++ b/rootly_sdk/api/form_set_conditions/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 09e9bfec..e2db3a03 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_set_condition_response import FormSetConditionResponse from ...models.new_form_set_condition import NewFormSetCondition -from ...types import Response +from typing import cast + def _get_kwargs( form_set_id: str, *, body: NewFormSetCondition, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_sets/{form_set_id}/conditions".format( - form_set_id=quote(str(form_set_id), safe=""), - ), + "url": "/v1/form_sets/{form_set_id}/conditions".format(form_set_id=quote(str(form_set_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 | FormSetConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetConditionResponse | None: if response.status_code == 201: response_201 = FormSetConditionResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormSetConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormSetCondition, + ) -> Response[ErrorsList | FormSetConditionResponse]: - """Creates a Form Set Condition + """ Creates a Form Set Condition Creates a new form_set_condition from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ + """ + kwargs = _get_kwargs( form_set_id=form_set_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_set_id: str, *, client: AuthenticatedClient, body: NewFormSetCondition, + ) -> ErrorsList | FormSetConditionResponse | None: - """Creates a Form Set Condition + """ Creates a Form Set Condition Creates a new form_set_condition from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | FormSetConditionResponse - """ + """ + return sync_detailed( form_set_id=form_set_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( form_set_id: str, *, client: AuthenticatedClient, body: NewFormSetCondition, + ) -> Response[ErrorsList | FormSetConditionResponse]: - """Creates a Form Set Condition + """ Creates a Form Set Condition Creates a new form_set_condition from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ + """ + kwargs = _get_kwargs( form_set_id=form_set_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_set_id: str, *, client: AuthenticatedClient, body: NewFormSetCondition, + ) -> ErrorsList | FormSetConditionResponse | None: - """Creates a Form Set Condition + """ Creates a Form Set Condition Creates a new form_set_condition from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | FormSetConditionResponse - """ - - return ( - await asyncio_detailed( - form_set_id=form_set_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_set_id=form_set_id, +client=client, +body=body, + + )).parsed 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 ba34efc2..931a168b 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_set_condition_response import FormSetConditionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_set_conditions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_set_conditions/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormSetConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetConditionResponse | None: if response.status_code == 200: response_200 = FormSetConditionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormSetConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormSetConditionResponse]: - """Delete a Form Set Condition + """ Delete a Form Set Condition Delete a specific form_set_condition by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormSetConditionResponse | None: - """Delete a Form Set Condition + """ Delete a Form Set Condition Delete a specific form_set_condition by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormSetConditionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormSetConditionResponse]: - """Delete a Form Set Condition + """ Delete a Form Set Condition Delete a specific form_set_condition by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormSetConditionResponse | None: - """Delete a Form Set Condition + """ Delete a Form Set Condition Delete a specific form_set_condition by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormSetConditionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 e84846b0..c7305f18 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_set_condition_response import FormSetConditionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_set_conditions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_set_conditions/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormSetConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetConditionResponse | None: if response.status_code == 200: response_200 = FormSetConditionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormSetConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormSetConditionResponse]: - """Retrieves a Form Set Condition + """ Retrieves a Form Set Condition Retrieves a specific form_set_condition by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormSetConditionResponse | None: - """Retrieves a Form Set Condition + """ Retrieves a Form Set Condition Retrieves a specific form_set_condition by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | FormSetConditionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormSetConditionResponse]: - """Retrieves a Form Set Condition + """ Retrieves a Form Set Condition Retrieves a specific form_set_condition by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | FormSetConditionResponse | None: - """Retrieves a Form Set Condition + """ Retrieves a Form Set Condition Retrieves a specific form_set_condition by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | FormSetConditionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 c12eaca5..8df325a5 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.form_set_condition_list import FormSetConditionList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -17,7 +21,11 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,23 +37,27 @@ def _get_kwargs( params["filter[form_field_id]"] = filterform_field_id + 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/form_sets/{form_set_id}/conditions".format( - form_set_id=quote(str(form_set_id), safe=""), - ), + "url": "/v1/form_sets/{form_set_id}/conditions".format(form_set_id=quote(str(form_set_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormSetConditionList | None: if response.status_code == 200: response_200 = FormSetConditionList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -54,9 +66,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[FormSetConditionList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[FormSetConditionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,8 +83,9 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> Response[FormSetConditionList]: - """List Form Set Conditions + """ List Form Set Conditions List form_set_conditions @@ -91,14 +102,16 @@ def sync_detailed( Returns: Response[FormSetConditionList] - """ + """ + kwargs = _get_kwargs( form_set_id=form_set_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + ) response = client.get_httpx_client().request( @@ -107,7 +120,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( form_set_id: str, *, @@ -116,8 +128,9 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> FormSetConditionList | None: - """List Form Set Conditions + """ List Form Set Conditions List form_set_conditions @@ -134,17 +147,18 @@ def sync( Returns: FormSetConditionList - """ + """ + return sync_detailed( form_set_id=form_set_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + ).parsed async def asyncio_detailed( form_set_id: str, @@ -154,8 +168,9 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> Response[FormSetConditionList]: - """List Form Set Conditions + """ List Form Set Conditions List form_set_conditions @@ -172,21 +187,24 @@ async def asyncio_detailed( Returns: Response[FormSetConditionList] - """ + """ + kwargs = _get_kwargs( form_set_id=form_set_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( form_set_id: str, *, @@ -195,8 +213,9 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, + ) -> FormSetConditionList | None: - """List Form Set Conditions + """ List Form Set Conditions List form_set_conditions @@ -213,15 +232,15 @@ async def asyncio( Returns: FormSetConditionList - """ - - return ( - await asyncio_detailed( - form_set_id=form_set_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterform_field_id=filterform_field_id, - ) - ).parsed + """ + + + return (await asyncio_detailed( + form_set_id=form_set_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterform_field_id=filterform_field_id, + + )).parsed 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 e1ad30f4..7a98e915 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_set_condition_response import FormSetConditionResponse from ...models.update_form_set_condition import UpdateFormSetCondition -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateFormSetCondition, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_set_conditions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_set_conditions/{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 | FormSetConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetConditionResponse | None: if response.status_code == 200: response_200 = FormSetConditionResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormSetConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormSetCondition, + ) -> Response[ErrorsList | FormSetConditionResponse]: - """Update a Form Set Condition + """ Update a Form Set Condition Update a specific form_set_condition by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormSetCondition, + ) -> ErrorsList | FormSetConditionResponse | None: - """Update a Form Set Condition + """ Update a Form Set Condition Update a specific form_set_condition by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | FormSetConditionResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormSetCondition, + ) -> Response[ErrorsList | FormSetConditionResponse]: - """Update a Form Set Condition + """ Update a Form Set Condition Update a specific form_set_condition by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormSetCondition, + ) -> ErrorsList | FormSetConditionResponse | None: - """Update a Form Set Condition + """ Update a Form Set Condition Update a specific form_set_condition by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | FormSetConditionResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/form_sets/__init__.py b/rootly_sdk/api/form_sets/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/form_sets/__init__.py +++ b/rootly_sdk/api/form_sets/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/form_sets/create_form_set.py b/rootly_sdk/api/form_sets/create_form_set.py index b1132cef..4b496371 100644 --- a/rootly_sdk/api/form_sets/create_form_set.py +++ b/rootly_sdk/api/form_sets/create_form_set.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_set_response import FormSetResponse from ...models.new_form_set import NewFormSet -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewFormSet, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/form_sets", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | FormSetResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetResponse | None: if response.status_code == 201: response_201 = FormSetResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormSetResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormSet, + ) -> Response[ErrorsList | FormSetResponse]: - """Creates a Form Set + """ Creates a Form Set Creates a new form_set from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewFormSet, + ) -> ErrorsList | FormSetResponse | None: - """Creates a Form Set + """ Creates a Form Set Creates a new form_set from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | FormSetResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewFormSet, + ) -> Response[ErrorsList | FormSetResponse]: - """Creates a Form Set + """ Creates a Form Set Creates a new form_set from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewFormSet, + ) -> ErrorsList | FormSetResponse | None: - """Creates a Form Set + """ Creates a Form Set Creates a new form_set from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | FormSetResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/form_sets/delete_form_set.py b/rootly_sdk/api/form_sets/delete_form_set.py index 8f5e77e5..7a004e52 100644 --- a/rootly_sdk/api/form_sets/delete_form_set.py +++ b/rootly_sdk/api/form_sets/delete_form_set.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_set_response import FormSetResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_sets/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_sets/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormSetResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetResponse | None: if response.status_code == 200: response_200 = FormSetResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormSetResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormSetResponse]: - """Delete a Form Set + """ Delete a Form Set Delete a specific form_set by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FormSetResponse | None: - """Delete a Form Set + """ Delete a Form Set Delete a specific form_set by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | FormSetResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormSetResponse]: - """Delete a Form Set + """ Delete a Form Set Delete a specific form_set by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FormSetResponse | None: - """Delete a Form Set + """ Delete a Form Set Delete a specific form_set by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | FormSetResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/form_sets/get_form_set.py b/rootly_sdk/api/form_sets/get_form_set.py index 6028ddb4..da2ea311 100644 --- a/rootly_sdk/api/form_sets/get_form_set.py +++ b/rootly_sdk/api/form_sets/get_form_set.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_set_response import FormSetResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_sets/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_sets/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FormSetResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetResponse | None: if response.status_code == 200: response_200 = FormSetResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormSetResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormSetResponse]: - """Retrieves a Form Set + """ Retrieves a Form Set Retrieves a specific form_set by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FormSetResponse | None: - """Retrieves a Form Set + """ Retrieves a Form Set Retrieves a specific form_set by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | FormSetResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FormSetResponse]: - """Retrieves a Form Set + """ Retrieves a Form Set Retrieves a specific form_set by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FormSetResponse | None: - """Retrieves a Form Set + """ Retrieves a Form Set Retrieves a specific form_set by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | FormSetResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/form_sets/list_form_sets.py b/rootly_sdk/api/form_sets/list_form_sets.py index 794d9d24..c6623b77 100644 --- a/rootly_sdk/api/form_sets/list_form_sets.py +++ b/rootly_sdk/api/form_sets/list_form_sets.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.form_set_list import FormSetList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -20,7 +25,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -42,21 +51,27 @@ def _get_kwargs( 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/form_sets", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormSetList | None: if response.status_code == 200: response_200 = FormSetList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -86,8 +101,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[FormSetList]: - """List Form Sets + """ List Form Sets List form_sets @@ -108,18 +124,20 @@ def sync_detailed( Returns: Response[FormSetList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filteris_default=filteris_default, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filteris_default=filteris_default, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ) response = client.get_httpx_client().request( @@ -128,7 +146,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -141,8 +158,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> FormSetList | None: - """List Form Sets + """ List Form Sets List form_sets @@ -163,21 +181,22 @@ def sync( Returns: FormSetList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filteris_default=filteris_default, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filteris_default=filteris_default, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ).parsed async def asyncio_detailed( *, @@ -191,8 +210,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[FormSetList]: - """List Form Sets + """ List Form Sets List form_sets @@ -213,25 +233,28 @@ async def asyncio_detailed( Returns: Response[FormSetList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filteris_default=filteris_default, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filteris_default=filteris_default, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -244,8 +267,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> FormSetList | None: - """List Form Sets + """ List Form Sets List form_sets @@ -266,19 +290,19 @@ async def asyncio( Returns: FormSetList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filteris_default=filteris_default, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filteris_default=filteris_default, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + + )).parsed diff --git a/rootly_sdk/api/form_sets/update_form_set.py b/rootly_sdk/api/form_sets/update_form_set.py index 1fd4b788..b8ca09e8 100644 --- a/rootly_sdk/api/form_sets/update_form_set.py +++ b/rootly_sdk/api/form_sets/update_form_set.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.form_set_response import FormSetResponse from ...models.update_form_set import UpdateFormSet -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateFormSet, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_sets/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/form_sets/{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 | FormSetResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetResponse | None: if response.status_code == 200: response_200 = FormSetResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FormSetResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormSet, + ) -> Response[ErrorsList | FormSetResponse]: - """Update a Form Set + """ Update a Form Set Update a specific form_set by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, + ) -> ErrorsList | FormSetResponse | None: - """Update a Form Set + """ Update a Form Set Update a specific form_set by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | FormSetResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, + ) -> Response[ErrorsList | FormSetResponse]: - """Update a Form Set + """ Update a Form Set Update a specific form_set by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, + ) -> ErrorsList | FormSetResponse | None: - """Update a Form Set + """ Update a Form Set Update a specific form_set by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | FormSetResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/functionalities/__init__.py b/rootly_sdk/api/functionalities/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/functionalities/__init__.py +++ b/rootly_sdk/api/functionalities/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/functionalities/bulk_delete_functionalities.py b/rootly_sdk/api/functionalities/bulk_delete_functionalities.py new file mode 100644 index 00000000..86dd250a --- /dev/null +++ b/rootly_sdk/api/functionalities/bulk_delete_functionalities.py @@ -0,0 +1,237 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_destroy_functionalities_response import BulkDestroyFunctionalitiesResponse +from ...models.bulk_destroy_functionalities_type_0 import BulkDestroyFunctionalitiesType0 +from ...models.bulk_destroy_functionalities_type_1 import BulkDestroyFunctionalitiesType1 +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + *, + body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/functionalities/bulk_delete", + } + + + if isinstance(body, BulkDestroyFunctionalitiesType0): + _kwargs["json"] = body.to_dict() + else: + _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) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyFunctionalitiesResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyFunctionalitiesResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyFunctionalitiesResponse.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | 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: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, + +) -> Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList]: + """ Bulk delete Functionalities + + Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific records) or managed_by + (prune all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | 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: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, + +) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Functionalities + + Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific records) or managed_by + (prune all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, + +) -> Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList]: + """ Bulk delete Functionalities + + Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific records) or managed_by + (prune all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | 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: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, + +) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Functionalities + + Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive + modes. + + Args: + body (BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1): Two mutually + exclusive modes. Pass exactly one of: external_ids (delete specific records) or managed_by + (prune all managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py b/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py new file mode 100644 index 00000000..0dfc0dfd --- /dev/null +++ b/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py @@ -0,0 +1,236 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_upsert_functionalities import BulkUpsertFunctionalities +from ...models.bulk_upsert_functionalities_error import BulkUpsertFunctionalitiesError +from ...models.bulk_upsert_functionalities_response import BulkUpsertFunctionalitiesResponse +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + *, + body: BulkUpsertFunctionalities, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/functionalities/bulk_upsert", + } + + _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) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertFunctionalitiesResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertFunctionalitiesError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertFunctionalitiesError.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | 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: BulkUpsertFunctionalities, + +) -> Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList]: + """ Bulk upsert Functionalities + + Create or update multiple functionalities by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertFunctionalities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | 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: BulkUpsertFunctionalities, + +) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: + """ Bulk upsert Functionalities + + Create or update multiple functionalities by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertFunctionalities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertFunctionalities, + +) -> Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList]: + """ Bulk upsert Functionalities + + Create or update multiple functionalities by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertFunctionalities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | 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: BulkUpsertFunctionalities, + +) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: + """ Bulk upsert Functionalities + + Create or update multiple functionalities by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertFunctionalities): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/functionalities/create_functionality.py b/rootly_sdk/api/functionalities/create_functionality.py index 1f7ef099..6aa5c741 100644 --- a/rootly_sdk/api/functionalities/create_functionality.py +++ b/rootly_sdk/api/functionalities/create_functionality.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.functionality_response import FunctionalityResponse from ...models.new_functionality import NewFunctionality -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewFunctionality, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/functionalities", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | FunctionalityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FunctionalityResponse | None: if response.status_code == 201: response_201 = FunctionalityResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FunctionalityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFunctionality, + ) -> Response[ErrorsList | FunctionalityResponse]: - """Creates a functionality + """ Creates a functionality Creates a new functionality from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewFunctionality, + ) -> ErrorsList | FunctionalityResponse | None: - """Creates a functionality + """ Creates a functionality Creates a new functionality from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | FunctionalityResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewFunctionality, + ) -> Response[ErrorsList | FunctionalityResponse]: - """Creates a functionality + """ Creates a functionality Creates a new functionality from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewFunctionality, + ) -> ErrorsList | FunctionalityResponse | None: - """Creates a functionality + """ Creates a functionality Creates a new functionality from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | FunctionalityResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/functionalities/create_functionality_catalog_property.py b/rootly_sdk/api/functionalities/create_functionality_catalog_property.py index ffaecab2..2506f8e9 100644 --- a/rootly_sdk/api/functionalities/create_functionality_catalog_property.py +++ b/rootly_sdk/api/functionalities/create_functionality_catalog_property.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_property import NewCatalogProperty -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCatalogProperty, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/functionalities/properties", @@ -24,28 +34,34 @@ def _get_kwargs( _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: + +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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> CatalogPropertyResponse | ErrorsList | None: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -114,20 +131,22 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + 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 fe3cb866..8adb5070 100644 --- a/rootly_sdk/api/functionalities/delete_functionality.py +++ b/rootly_sdk/api/functionalities/delete_functionality.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.functionality_response import FunctionalityResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/functionalities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/functionalities/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FunctionalityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FunctionalityResponse | None: if response.status_code == 200: response_200 = FunctionalityResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FunctionalityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FunctionalityResponse]: - """Delete a functionality + """ Delete a functionality Delete a specific functionality by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FunctionalityResponse | None: - """Delete a functionality + """ Delete a functionality Delete a specific functionality by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | FunctionalityResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FunctionalityResponse]: - """Delete a functionality + """ Delete a functionality Delete a specific functionality by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FunctionalityResponse | None: - """Delete a functionality + """ Delete a functionality Delete a specific functionality by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | FunctionalityResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/functionalities/get_functionality.py b/rootly_sdk/api/functionalities/get_functionality.py index 746c5e60..c092b072 100644 --- a/rootly_sdk/api/functionalities/get_functionality.py +++ b/rootly_sdk/api/functionalities/get_functionality.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.functionality_response import FunctionalityResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/functionalities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/functionalities/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | FunctionalityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FunctionalityResponse | None: if response.status_code == 200: response_200 = FunctionalityResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FunctionalityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FunctionalityResponse]: - """Retrieves a functionality + """ Retrieves a functionality Retrieves a specific functionality by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FunctionalityResponse | None: - """Retrieves a functionality + """ Retrieves a functionality Retrieves a specific functionality by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | FunctionalityResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | FunctionalityResponse]: - """Retrieves a functionality + """ Retrieves a functionality Retrieves a specific functionality by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | FunctionalityResponse | None: - """Retrieves a functionality + """ Retrieves a functionality Retrieves a specific functionality by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | FunctionalityResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py b/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py index 0ebccfaf..e02310c7 100644 --- a/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py +++ b/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incidents_chart_response import IncidentsChartResponse -from ...types import UNSET, Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, period: str, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} params["period"] = period + 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/{id}/incidents_chart".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/functionalities/{id}/incidents_chart".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentsChartResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentsChartResponse | None: if response.status_code == 200: response_200 = IncidentsChartResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentsChartResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentsChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, period: str, + ) -> Response[ErrorsList | IncidentsChartResponse]: - """Get functionality incidents chart + """ Get functionality incidents chart Get functionality incidents chart @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, period: str, + ) -> ErrorsList | IncidentsChartResponse | None: - """Get functionality incidents chart + """ Get functionality incidents chart Get functionality incidents chart @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentsChartResponse - """ + """ + return sync_detailed( id=id, - client=client, - period=period, - ).parsed +client=client, +period=period, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, period: str, + ) -> Response[ErrorsList | IncidentsChartResponse]: - """Get functionality incidents chart + """ Get functionality incidents chart Get functionality incidents chart @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, period: str, + ) -> ErrorsList | IncidentsChartResponse | None: - """Get functionality incidents chart + """ Get functionality incidents chart Get functionality incidents chart @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentsChartResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - period=period, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +period=period, + + )).parsed diff --git a/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py b/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py index 6fa744af..6e353a05 100644 --- a/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py +++ b/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py @@ -1,51 +1,63 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.uptime_chart_response import UptimeChartResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, period: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} params["period"] = period + 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/{id}/uptime_chart".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/functionalities/{id}/uptime_chart".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UptimeChartResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UptimeChartResponse | None: if response.status_code == 200: response_200 = UptimeChartResponse.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: @@ -54,9 +66,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UptimeChartResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UptimeChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +80,9 @@ def sync_detailed( *, client: AuthenticatedClient, period: str | Unset = UNSET, + ) -> Response[ErrorsList | UptimeChartResponse]: - """Get functionality uptime chart + """ Get functionality uptime chart Get functionality uptime chart @@ -85,11 +96,13 @@ def sync_detailed( Returns: Response[ErrorsList | UptimeChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) response = client.get_httpx_client().request( @@ -98,14 +111,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, + ) -> ErrorsList | UptimeChartResponse | None: - """Get functionality uptime chart + """ Get functionality uptime chart Get functionality uptime chart @@ -119,22 +132,24 @@ def sync( Returns: ErrorsList | UptimeChartResponse - """ + """ + return sync_detailed( id=id, - client=client, - period=period, - ).parsed +client=client, +period=period, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, + ) -> Response[ErrorsList | UptimeChartResponse]: - """Get functionality uptime chart + """ Get functionality uptime chart Get functionality uptime chart @@ -148,25 +163,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UptimeChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, + ) -> ErrorsList | UptimeChartResponse | None: - """Get functionality uptime chart + """ Get functionality uptime chart Get functionality uptime chart @@ -180,12 +199,12 @@ async def asyncio( Returns: ErrorsList | UptimeChartResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - period=period, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +period=period, + + )).parsed diff --git a/rootly_sdk/api/functionalities/list_functionalities.py b/rootly_sdk/api/functionalities/list_functionalities.py index 173cc880..4802aa3e 100644 --- a/rootly_sdk/api/functionalities/list_functionalities.py +++ b/rootly_sdk/api/functionalities/list_functionalities.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.functionality_list import FunctionalityList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -25,8 +30,20 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -58,23 +75,45 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + 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/functionalities", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FunctionalityList | None: if response.status_code == 200: response_200 = FunctionalityList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -109,9 +148,18 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[FunctionalityList]: - """List functionalities + """ List functionalities List functionalities @@ -130,6 +178,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -138,24 +194,34 @@ def sync_detailed( Returns: Response[FunctionalityList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -164,7 +230,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -182,9 +247,18 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> FunctionalityList | None: - """List functionalities + """ List functionalities List functionalities @@ -203,6 +277,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -211,27 +293,36 @@ def sync( Returns: FunctionalityList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -250,9 +341,18 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[FunctionalityList]: - """List functionalities + """ List functionalities List functionalities @@ -271,6 +371,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -279,31 +387,42 @@ async def asyncio_detailed( Returns: Response[FunctionalityList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -321,9 +440,18 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> FunctionalityList | None: - """List functionalities + """ List functionalities List functionalities @@ -342,6 +470,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -350,25 +486,33 @@ async def asyncio( Returns: FunctionalityList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py b/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py index 80b13adb..0a1c7691 100644 --- a/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py +++ b/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py @@ -1,18 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from ...models.list_functionality_catalog_properties_include import check_list_functionality_catalog_properties_include +from ...models.list_functionality_catalog_properties_include import ListFunctionalityCatalogPropertiesInclude +from ...models.list_functionality_catalog_properties_sort import check_list_functionality_catalog_properties_sort +from ...models.list_functionality_catalog_properties_sort import ListFunctionalityCatalogPropertiesSort +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -28,7 +31,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -62,21 +69,27 @@ def _get_kwargs( 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: @@ -108,8 +121,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Functionality Catalog Properties @@ -132,20 +146,22 @@ def sync_detailed( 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, +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( @@ -154,7 +170,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -169,8 +184,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Functionality Catalog Properties @@ -193,23 +209,24 @@ def sync( 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 +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( *, @@ -225,8 +242,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Functionality Catalog Properties @@ -249,27 +267,30 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -284,8 +305,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Functionality Catalog Properties @@ -308,21 +330,21 @@ async def asyncio( 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 + """ + + + 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 5098e9df..9b41a925 100644 --- a/rootly_sdk/api/functionalities/update_functionality.py +++ b/rootly_sdk/api/functionalities/update_functionality.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.functionality_response import FunctionalityResponse from ...models.update_functionality import UpdateFunctionality -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateFunctionality, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/functionalities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/functionalities/{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 | FunctionalityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FunctionalityResponse | None: if response.status_code == 200: response_200 = FunctionalityResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | FunctionalityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFunctionality, + ) -> Response[ErrorsList | FunctionalityResponse]: - """Update a functionality + """ Update a functionality Update a specific functionality by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, + ) -> ErrorsList | FunctionalityResponse | None: - """Update a functionality + """ Update a functionality Update a specific functionality by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | FunctionalityResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, + ) -> Response[ErrorsList | FunctionalityResponse]: - """Update a functionality + """ Update a functionality Update a specific functionality by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, + ) -> ErrorsList | FunctionalityResponse | None: - """Update a functionality + """ Update a functionality Update a specific functionality by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | FunctionalityResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/heartbeats/__init__.py b/rootly_sdk/api/heartbeats/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/heartbeats/__init__.py +++ b/rootly_sdk/api/heartbeats/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/heartbeats/create_heartbeat.py b/rootly_sdk/api/heartbeats/create_heartbeat.py index c03eed95..659ae78a 100644 --- a/rootly_sdk/api/heartbeats/create_heartbeat.py +++ b/rootly_sdk/api/heartbeats/create_heartbeat.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.heartbeat_response import HeartbeatResponse from ...models.new_heartbeat import NewHeartbeat -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewHeartbeat, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/heartbeats", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | HeartbeatResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | HeartbeatResponse | None: if response.status_code == 201: response_201 = HeartbeatResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | HeartbeatResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | HeartbeatResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewHeartbeat, + ) -> Response[ErrorsList | HeartbeatResponse]: - """Creates a heartbeat + """ Creates a heartbeat Creates a new heartbeat from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewHeartbeat, + ) -> ErrorsList | HeartbeatResponse | None: - """Creates a heartbeat + """ Creates a heartbeat Creates a new heartbeat from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | HeartbeatResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewHeartbeat, + ) -> Response[ErrorsList | HeartbeatResponse]: - """Creates a heartbeat + """ Creates a heartbeat Creates a new heartbeat from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewHeartbeat, + ) -> ErrorsList | HeartbeatResponse | None: - """Creates a heartbeat + """ Creates a heartbeat Creates a new heartbeat from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | HeartbeatResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/heartbeats/delete_heartbeat.py b/rootly_sdk/api/heartbeats/delete_heartbeat.py index 674106f9..373b567c 100644 --- a/rootly_sdk/api/heartbeats/delete_heartbeat.py +++ b/rootly_sdk/api/heartbeats/delete_heartbeat.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.heartbeat_response import HeartbeatResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/heartbeats/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/heartbeats/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | HeartbeatResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | HeartbeatResponse | None: if response.status_code == 200: response_200 = HeartbeatResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | HeartbeatResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | HeartbeatResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | HeartbeatResponse]: - """Delete a heartbeat + """ Delete a heartbeat Delete a specific heartbeat by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | HeartbeatResponse | None: - """Delete a heartbeat + """ Delete a heartbeat Delete a specific heartbeat by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | HeartbeatResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | HeartbeatResponse]: - """Delete a heartbeat + """ Delete a heartbeat Delete a specific heartbeat by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | HeartbeatResponse | None: - """Delete a heartbeat + """ Delete a heartbeat Delete a specific heartbeat by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | HeartbeatResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/heartbeats/get_heartbeat.py b/rootly_sdk/api/heartbeats/get_heartbeat.py index 8ab9ac45..48cb4013 100644 --- a/rootly_sdk/api/heartbeats/get_heartbeat.py +++ b/rootly_sdk/api/heartbeats/get_heartbeat.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.heartbeat_response import HeartbeatResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/heartbeats/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/heartbeats/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | HeartbeatResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | HeartbeatResponse | None: if response.status_code == 200: response_200 = HeartbeatResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | HeartbeatResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | HeartbeatResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | HeartbeatResponse]: - """Retrieves a heartbeat + """ Retrieves a heartbeat Retrieves a specific heartbeat by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | HeartbeatResponse | None: - """Retrieves a heartbeat + """ Retrieves a heartbeat Retrieves a specific heartbeat by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | HeartbeatResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | HeartbeatResponse]: - """Retrieves a heartbeat + """ Retrieves a heartbeat Retrieves a specific heartbeat by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | HeartbeatResponse | None: - """Retrieves a heartbeat + """ Retrieves a heartbeat Retrieves a specific heartbeat by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | HeartbeatResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/heartbeats/list_heartbeats.py b/rootly_sdk/api/heartbeats/list_heartbeats.py index 19af7d67..bcd3892d 100644 --- a/rootly_sdk/api/heartbeats/list_heartbeats.py +++ b/rootly_sdk/api/heartbeats/list_heartbeats.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.heartbeat_list import HeartbeatList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,7 +26,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -45,21 +54,27 @@ def _get_kwargs( 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/heartbeats", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> HeartbeatList | None: if response.status_code == 200: response_200 = HeartbeatList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -90,8 +105,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[HeartbeatList]: - """List heartbeats + """ List heartbeats List heartbeats @@ -113,19 +129,21 @@ def sync_detailed( Returns: Response[HeartbeatList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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, + ) response = client.get_httpx_client().request( @@ -134,7 +152,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -148,8 +165,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> HeartbeatList | None: - """List heartbeats + """ List heartbeats List heartbeats @@ -171,22 +189,23 @@ def sync( Returns: HeartbeatList - """ + """ + return sync_detailed( client=client, - include=include, - 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, - ).parsed +include=include, +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, + ).parsed async def asyncio_detailed( *, @@ -201,8 +220,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[HeartbeatList]: - """List heartbeats + """ List heartbeats List heartbeats @@ -224,26 +244,29 @@ async def asyncio_detailed( Returns: Response[HeartbeatList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -257,8 +280,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> HeartbeatList | None: - """List heartbeats + """ List heartbeats List heartbeats @@ -280,20 +304,20 @@ async def asyncio( Returns: HeartbeatList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - 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, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +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, + + )).parsed diff --git a/rootly_sdk/api/heartbeats/ping_heartbeat.py b/rootly_sdk/api/heartbeats/ping_heartbeat.py index 786ca9cc..20531477 100644 --- a/rootly_sdk/api/heartbeats/ping_heartbeat.py +++ b/rootly_sdk/api/heartbeats/ping_heartbeat.py @@ -4,26 +4,35 @@ import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...types import Response +from typing import cast + def _get_kwargs( heartbeat_id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/heartbeats/{heartbeat_id}/ping".format( - heartbeat_id=quote(str(heartbeat_id), safe=""), - ), + "url": "/v1/heartbeats/{heartbeat_id}/ping".format(heartbeat_id=quote(str(heartbeat_id), safe=""),), } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 204: response_204 = cast(Any, None) @@ -32,6 +41,8 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) + + return response_404 if client.raise_on_unexpected_status: @@ -53,8 +64,9 @@ def sync_detailed( heartbeat_id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Ping a heartbeat + """ Ping a heartbeat Ping a specific heartbeat by id @@ -67,10 +79,12 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( heartbeat_id=heartbeat_id, + ) response = client.get_httpx_client().request( @@ -79,13 +93,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( heartbeat_id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Ping a heartbeat + """ Ping a heartbeat Ping a specific heartbeat by id @@ -98,20 +112,22 @@ def sync( Returns: Any | ErrorsList - """ + """ + return sync_detailed( heartbeat_id=heartbeat_id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( heartbeat_id: str, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList]: - """Ping a heartbeat + """ Ping a heartbeat Ping a specific heartbeat by id @@ -124,23 +140,27 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( heartbeat_id=heartbeat_id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( heartbeat_id: str, *, client: AuthenticatedClient, + ) -> Any | ErrorsList | None: - """Ping a heartbeat + """ Ping a heartbeat Ping a specific heartbeat by id @@ -153,11 +173,11 @@ async def asyncio( Returns: Any | ErrorsList - """ + """ - return ( - await asyncio_detailed( - heartbeat_id=heartbeat_id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + heartbeat_id=heartbeat_id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/heartbeats/update_heartbeat.py b/rootly_sdk/api/heartbeats/update_heartbeat.py index 533b0dfb..35f1c463 100644 --- a/rootly_sdk/api/heartbeats/update_heartbeat.py +++ b/rootly_sdk/api/heartbeats/update_heartbeat.py @@ -1,56 +1,69 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.heartbeat_response import HeartbeatResponse from ...models.update_heartbeat import UpdateHeartbeat -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateHeartbeat, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/heartbeats/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/heartbeats/{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 | HeartbeatResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | HeartbeatResponse | None: if response.status_code == 200: response_200 = HeartbeatResponse.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: @@ -59,9 +72,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | HeartbeatResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | HeartbeatResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +86,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateHeartbeat, + ) -> Response[ErrorsList | HeartbeatResponse]: - """Update a heartbeat + """ Update a heartbeat Update a specific heartbeat by id @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, + ) -> ErrorsList | HeartbeatResponse | None: - """Update a heartbeat + """ Update a heartbeat Update a specific heartbeat by id @@ -124,22 +138,24 @@ def sync( Returns: ErrorsList | HeartbeatResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, + ) -> Response[ErrorsList | HeartbeatResponse]: - """Update a heartbeat + """ Update a heartbeat Update a specific heartbeat by id @@ -153,25 +169,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, + ) -> ErrorsList | HeartbeatResponse | None: - """Update a heartbeat + """ Update a heartbeat Update a specific heartbeat by id @@ -185,12 +205,12 @@ async def asyncio( Returns: ErrorsList | HeartbeatResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_action_items/__init__.py b/rootly_sdk/api/incident_action_items/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_action_items/__init__.py +++ b/rootly_sdk/api/incident_action_items/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 8eefa46c..fc1362c8 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_action_item_response import IncidentActionItemResponse from ...models.new_incident_action_item import NewIncidentActionItem -from ...types import Response +from typing import cast + def _get_kwargs( incident_id: str, *, body: NewIncidentActionItem, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/action_items".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/action_items".format(incident_id=quote(str(incident_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 | IncidentActionItemResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentActionItemResponse | None: if response.status_code == 201: response_201 = IncidentActionItemResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentActionItemResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentActionItemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentActionItem, + ) -> Response[ErrorsList | IncidentActionItemResponse]: - """Creates an incident action item + """ Creates an incident action item Creates a new action item from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentActionItem, + ) -> ErrorsList | IncidentActionItemResponse | None: - """Creates an incident action item + """ Creates an incident action item Creates a new action item from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentActionItemResponse - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentActionItem, + ) -> Response[ErrorsList | IncidentActionItemResponse]: - """Creates an incident action item + """ Creates an incident action item Creates a new action item from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentActionItem, + ) -> ErrorsList | IncidentActionItemResponse | None: - """Creates an incident action item + """ Creates an incident action item Creates a new action item from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentActionItemResponse - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +body=body, + + )).parsed 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 3c58343a..871be069 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_action_item_response import IncidentActionItemResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/action_items/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/action_items/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentActionItemResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentActionItemResponse | None: if response.status_code == 200: response_200 = IncidentActionItemResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentActionItemResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentActionItemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentActionItemResponse]: - """Delete an incident action item + """ Delete an incident action item Delete a specific incident action item by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentActionItemResponse | None: - """Delete an incident action item + """ Delete an incident action item Delete a specific incident action item by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentActionItemResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentActionItemResponse]: - """Delete an incident action item + """ Delete an incident action item Delete a specific incident action item by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentActionItemResponse | None: - """Delete an incident action item + """ Delete an incident action item Delete a specific incident action item by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentActionItemResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 978d0899..1b53fa85 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_action_item_response import IncidentActionItemResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/action_items/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/action_items/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentActionItemResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentActionItemResponse | None: if response.status_code == 200: response_200 = IncidentActionItemResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentActionItemResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentActionItemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentActionItemResponse]: - """Retrieves an incident action item + """ Retrieves an incident action item Retrieves a specific incident_action_item by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentActionItemResponse | None: - """Retrieves an incident action item + """ Retrieves an incident action item Retrieves a specific incident_action_item by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentActionItemResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentActionItemResponse]: - """Retrieves an incident action item + """ Retrieves an incident action item Retrieves a specific incident_action_item by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentActionItemResponse | None: - """Retrieves an incident action item + """ Retrieves an incident action item Retrieves a specific incident_action_item by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentActionItemResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 3e7f1a04..4b44e418 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 @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_action_item_list import IncidentActionItemList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -30,8 +35,28 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -73,23 +98,61 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + + params["filter[priority][eq]"] = filterpriorityeq + + params["filter[priority][not_eq]"] = filterprioritynot_eq + + params["filter[priority][in]"] = filterpriorityin + + params["filter[priority][not_in]"] = filterprioritynot_in + + params["filter[status][eq]"] = filterstatuseq + + params["filter[status][not_eq]"] = filterstatusnot_eq + + params["filter[status][in]"] = filterstatusin + + params["filter[status][not_in]"] = filterstatusnot_in + + params["filter[incident_status][eq]"] = filterincident_statuseq + + params["filter[incident_status][not_eq]"] = filterincident_statusnot_eq + + params["filter[incident_status][in]"] = filterincident_statusin + + params["filter[incident_status][not_in]"] = filterincident_statusnot_in + 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/action_items", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentActionItemList | None: if response.status_code == 200: response_200 = IncidentActionItemList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -98,9 +161,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentActionItemList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentActionItemList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -131,9 +192,26 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentActionItemList]: - """List all action items for an organization + """ List all action items for an organization List all action items for an organization @@ -157,6 +235,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterpriorityeq (str | Unset): + filterprioritynot_eq (str | Unset): + filterpriorityin (str | Unset): + filterprioritynot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterincident_statuseq (str | Unset): + filterincident_statusnot_eq (str | Unset): + filterincident_statusin (str | Unset): + filterincident_statusnot_in (str | Unset): sort (str | Unset): Raises: @@ -165,29 +259,47 @@ def sync_detailed( Returns: Response[IncidentActionItemList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filterpriority=filterpriority, - filterstatus=filterstatus, - filterincident_status=filterincident_status, - filterincident_created_atgt=filterincident_created_atgt, - filterincident_created_atgte=filterincident_created_atgte, - filterincident_created_atlt=filterincident_created_atlt, - filterincident_created_atlte=filterincident_created_atlte, - filterdue_dategt=filterdue_dategt, - filterdue_dategte=filterdue_dategte, - filterdue_datelt=filterdue_datelt, - filterdue_datelte=filterdue_datelte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filterpriority=filterpriority, +filterstatus=filterstatus, +filterincident_status=filterincident_status, +filterincident_created_atgt=filterincident_created_atgt, +filterincident_created_atgte=filterincident_created_atgte, +filterincident_created_atlt=filterincident_created_atlt, +filterincident_created_atlte=filterincident_created_atlte, +filterdue_dategt=filterdue_dategt, +filterdue_dategte=filterdue_dategte, +filterdue_datelt=filterdue_datelt, +filterdue_datelte=filterdue_datelte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterpriorityeq=filterpriorityeq, +filterprioritynot_eq=filterprioritynot_eq, +filterpriorityin=filterpriorityin, +filterprioritynot_in=filterprioritynot_in, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filterincident_statuseq=filterincident_statuseq, +filterincident_statusnot_eq=filterincident_statusnot_eq, +filterincident_statusin=filterincident_statusin, +filterincident_statusnot_in=filterincident_statusnot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -196,7 +308,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -219,9 +330,26 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentActionItemList | None: - """List all action items for an organization + """ List all action items for an organization List all action items for an organization @@ -245,6 +373,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterpriorityeq (str | Unset): + filterprioritynot_eq (str | Unset): + filterpriorityin (str | Unset): + filterprioritynot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterincident_statuseq (str | Unset): + filterincident_statusnot_eq (str | Unset): + filterincident_statusin (str | Unset): + filterincident_statusnot_in (str | Unset): sort (str | Unset): Raises: @@ -253,32 +397,49 @@ def sync( Returns: IncidentActionItemList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filterpriority=filterpriority, - filterstatus=filterstatus, - filterincident_status=filterincident_status, - filterincident_created_atgt=filterincident_created_atgt, - filterincident_created_atgte=filterincident_created_atgte, - filterincident_created_atlt=filterincident_created_atlt, - filterincident_created_atlte=filterincident_created_atlte, - filterdue_dategt=filterdue_dategt, - filterdue_dategte=filterdue_dategte, - filterdue_datelt=filterdue_datelt, - filterdue_datelte=filterdue_datelte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filterpriority=filterpriority, +filterstatus=filterstatus, +filterincident_status=filterincident_status, +filterincident_created_atgt=filterincident_created_atgt, +filterincident_created_atgte=filterincident_created_atgte, +filterincident_created_atlt=filterincident_created_atlt, +filterincident_created_atlte=filterincident_created_atlte, +filterdue_dategt=filterdue_dategt, +filterdue_dategte=filterdue_dategte, +filterdue_datelt=filterdue_datelt, +filterdue_datelte=filterdue_datelte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterpriorityeq=filterpriorityeq, +filterprioritynot_eq=filterprioritynot_eq, +filterpriorityin=filterpriorityin, +filterprioritynot_in=filterprioritynot_in, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filterincident_statuseq=filterincident_statuseq, +filterincident_statusnot_eq=filterincident_statusnot_eq, +filterincident_statusin=filterincident_statusin, +filterincident_statusnot_in=filterincident_statusnot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -302,9 +463,26 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentActionItemList]: - """List all action items for an organization + """ List all action items for an organization List all action items for an organization @@ -328,6 +506,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterpriorityeq (str | Unset): + filterprioritynot_eq (str | Unset): + filterpriorityin (str | Unset): + filterprioritynot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterincident_statuseq (str | Unset): + filterincident_statusnot_eq (str | Unset): + filterincident_statusin (str | Unset): + filterincident_statusnot_in (str | Unset): sort (str | Unset): Raises: @@ -336,36 +530,55 @@ async def asyncio_detailed( Returns: Response[IncidentActionItemList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filterpriority=filterpriority, - filterstatus=filterstatus, - filterincident_status=filterincident_status, - filterincident_created_atgt=filterincident_created_atgt, - filterincident_created_atgte=filterincident_created_atgte, - filterincident_created_atlt=filterincident_created_atlt, - filterincident_created_atlte=filterincident_created_atlte, - filterdue_dategt=filterdue_dategt, - filterdue_dategte=filterdue_dategte, - filterdue_datelt=filterdue_datelt, - filterdue_datelte=filterdue_datelte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filterpriority=filterpriority, +filterstatus=filterstatus, +filterincident_status=filterincident_status, +filterincident_created_atgt=filterincident_created_atgt, +filterincident_created_atgte=filterincident_created_atgte, +filterincident_created_atlt=filterincident_created_atlt, +filterincident_created_atlte=filterincident_created_atlte, +filterdue_dategt=filterdue_dategt, +filterdue_dategte=filterdue_dategte, +filterdue_datelt=filterdue_datelt, +filterdue_datelte=filterdue_datelte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterpriorityeq=filterpriorityeq, +filterprioritynot_eq=filterprioritynot_eq, +filterpriorityin=filterpriorityin, +filterprioritynot_in=filterprioritynot_in, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filterincident_statuseq=filterincident_statuseq, +filterincident_statusnot_eq=filterincident_statusnot_eq, +filterincident_statusin=filterincident_statusin, +filterincident_statusnot_in=filterincident_statusnot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -388,9 +601,26 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterpriorityeq: str | Unset = UNSET, + filterprioritynot_eq: str | Unset = UNSET, + filterpriorityin: str | Unset = UNSET, + filterprioritynot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterincident_statuseq: str | Unset = UNSET, + filterincident_statusnot_eq: str | Unset = UNSET, + filterincident_statusin: str | Unset = UNSET, + filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentActionItemList | None: - """List all action items for an organization + """ List all action items for an organization List all action items for an organization @@ -414,6 +644,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterpriorityeq (str | Unset): + filterprioritynot_eq (str | Unset): + filterpriorityin (str | Unset): + filterprioritynot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterincident_statuseq (str | Unset): + filterincident_statusnot_eq (str | Unset): + filterincident_statusin (str | Unset): + filterincident_statusnot_in (str | Unset): sort (str | Unset): Raises: @@ -422,30 +668,46 @@ async def asyncio( Returns: IncidentActionItemList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filterpriority=filterpriority, - filterstatus=filterstatus, - filterincident_status=filterincident_status, - filterincident_created_atgt=filterincident_created_atgt, - filterincident_created_atgte=filterincident_created_atgte, - filterincident_created_atlt=filterincident_created_atlt, - filterincident_created_atlte=filterincident_created_atlte, - filterdue_dategt=filterdue_dategt, - filterdue_dategte=filterdue_dategte, - filterdue_datelt=filterdue_datelt, - filterdue_datelte=filterdue_datelte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filterpriority=filterpriority, +filterstatus=filterstatus, +filterincident_status=filterincident_status, +filterincident_created_atgt=filterincident_created_atgt, +filterincident_created_atgte=filterincident_created_atgte, +filterincident_created_atlt=filterincident_created_atlt, +filterincident_created_atlte=filterincident_created_atlte, +filterdue_dategt=filterdue_dategt, +filterdue_dategte=filterdue_dategte, +filterdue_datelt=filterdue_datelt, +filterdue_datelte=filterdue_datelte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterpriorityeq=filterpriorityeq, +filterprioritynot_eq=filterprioritynot_eq, +filterpriorityin=filterpriorityin, +filterprioritynot_in=filterprioritynot_in, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filterincident_statuseq=filterincident_statuseq, +filterincident_statusnot_eq=filterincident_statusnot_eq, +filterincident_statusin=filterincident_statusin, +filterincident_statusnot_in=filterincident_statusnot_in, +sort=sort, + + )).parsed 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 da0cf81e..3fab3a06 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_action_item_list import IncidentActionItemList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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}/action_items".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/action_items".format(incident_id=quote(str(incident_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentActionItemList | None: if response.status_code == 200: response_200 = IncidentActionItemList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -51,9 +63,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentActionItemList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentActionItemList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentActionItemList]: - """List incident action items + """ List incident action items List incident action items @@ -86,13 +97,15 @@ def sync_detailed( Returns: Response[IncidentActionItemList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -101,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, @@ -109,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentActionItemList | None: - """List incident action items + """ List incident action items List incident action items @@ -126,16 +139,17 @@ def sync( Returns: IncidentActionItemList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_id: str, @@ -144,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentActionItemList]: - """List incident action items + """ List incident action items List incident action items @@ -161,20 +176,23 @@ async def asyncio_detailed( Returns: Response[IncidentActionItemList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, @@ -182,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentActionItemList | None: - """List incident action items + """ List incident action items List incident action items @@ -199,14 +218,14 @@ async def asyncio( Returns: IncidentActionItemList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 709c5962..c2afc72b 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_action_item_response import IncidentActionItemResponse from ...models.update_incident_action_item import UpdateIncidentActionItem -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentActionItem, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/action_items/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/action_items/{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 | IncidentActionItemResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentActionItemResponse | None: if response.status_code == 200: response_200 = IncidentActionItemResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentActionItemResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentActionItemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentActionItem, + ) -> Response[ErrorsList | IncidentActionItemResponse]: - """Update an incident action item + """ Update an incident action item Update a specific incident action item by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentActionItem, + ) -> ErrorsList | IncidentActionItemResponse | None: - """Update an incident action item + """ Update an incident action item Update a specific incident action item by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentActionItemResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentActionItem, + ) -> Response[ErrorsList | IncidentActionItemResponse]: - """Update an incident action item + """ Update an incident action item Update a specific incident action item by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentActionItem, + ) -> ErrorsList | IncidentActionItemResponse | None: - """Update an incident action item + """ Update an incident action item Update a specific incident action item by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentActionItemResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_event_functionalities/__init__.py b/rootly_sdk/api/incident_event_functionalities/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_event_functionalities/__init__.py +++ b/rootly_sdk/api/incident_event_functionalities/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 44067ca5..b59aac0e 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_functionality_response import IncidentEventFunctionalityResponse from ...models.new_incident_event_functionality import NewIncidentEventFunctionality -from ...types import Response +from typing import cast + def _get_kwargs( incident_event_id: str, *, body: NewIncidentEventFunctionality, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/events/{incident_event_id}/functionalities".format( - incident_event_id=quote(str(incident_event_id), safe=""), - ), + "url": "/v1/events/{incident_event_id}/functionalities".format(incident_event_id=quote(str(incident_event_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 | IncidentEventFunctionalityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventFunctionalityResponse | None: if response.status_code == 201: response_201 = IncidentEventFunctionalityResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentEventFunctionality, + ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """Creates an incident event functionality + """ Creates an incident event functionality Creates a new event functionality from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ + """ + kwargs = _get_kwargs( incident_event_id=incident_event_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventFunctionality, + ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """Creates an incident event functionality + """ Creates an incident event functionality Creates a new event functionality from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ + """ + return sync_detailed( incident_event_id=incident_event_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventFunctionality, + ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """Creates an incident event functionality + """ Creates an incident event functionality Creates a new event functionality from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ + """ + kwargs = _get_kwargs( incident_event_id=incident_event_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventFunctionality, + ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """Creates an incident event functionality + """ Creates an incident event functionality Creates a new event functionality from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - - return ( - await asyncio_detailed( - incident_event_id=incident_event_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_event_id=incident_event_id, +client=client, +body=body, + + )).parsed 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 31be22c6..bd603432 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_functionality_response import IncidentEventFunctionalityResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_event_functionalities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_event_functionalities/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentEventFunctionalityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventFunctionalityResponse | None: if response.status_code == 200: response_200 = IncidentEventFunctionalityResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """Delete an incident event functionality + """ Delete an incident event functionality Delete a specific incident event functionality by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """Delete an incident event functionality + """ Delete an incident event functionality Delete a specific incident event functionality by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """Delete an incident event functionality + """ Delete an incident event functionality Delete a specific incident event functionality by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """Delete an incident event functionality + """ Delete an incident event functionality Delete a specific incident event functionality by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 5b698657..e8e826dc 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_functionality_response import IncidentEventFunctionalityResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_event_functionalities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_event_functionalities/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentEventFunctionalityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventFunctionalityResponse | None: if response.status_code == 200: response_200 = IncidentEventFunctionalityResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """Retrieves an incident event functionality + """ Retrieves an incident event functionality Retrieves a specific incident_event_functionality by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """Retrieves an incident event functionality + """ Retrieves an incident event functionality Retrieves a specific incident_event_functionality by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """Retrieves an incident event functionality + """ Retrieves an incident event functionality Retrieves a specific incident_event_functionality by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """Retrieves an incident event functionality + """ Retrieves an incident event functionality Retrieves a specific incident_event_functionality by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 805eeb7a..d7a9779c 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_event_functionality_list import IncidentEventFunctionalityList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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/events/{incident_event_id}/functionalities".format( - incident_event_id=quote(str(incident_event_id), safe=""), - ), + "url": "/v1/events/{incident_event_id}/functionalities".format(incident_event_id=quote(str(incident_event_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> IncidentEventFunctionalityList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentEventFunctionalityList | None: if response.status_code == 200: response_200 = IncidentEventFunctionalityList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentEventFunctionalityList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentEventFunctionalityList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentEventFunctionalityList]: - """List incident event functionalities + """ List incident event functionalities List incident event functionalities @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[IncidentEventFunctionalityList] - """ + """ + kwargs = _get_kwargs( incident_event_id=incident_event_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_event_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentEventFunctionalityList | None: - """List incident event functionalities + """ List incident event functionalities List incident event functionalities @@ -128,16 +139,17 @@ def sync( Returns: IncidentEventFunctionalityList - """ + """ + return sync_detailed( incident_event_id=incident_event_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_event_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentEventFunctionalityList]: - """List incident event functionalities + """ List incident event functionalities List incident event functionalities @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[IncidentEventFunctionalityList] - """ + """ + kwargs = _get_kwargs( incident_event_id=incident_event_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_event_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentEventFunctionalityList | None: - """List incident event functionalities + """ List incident event functionalities List incident event functionalities @@ -201,14 +218,14 @@ async def asyncio( Returns: IncidentEventFunctionalityList - """ - - return ( - await asyncio_detailed( - incident_event_id=incident_event_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_event_id=incident_event_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 3f2bf2b7..602dd8bf 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_functionality_response import IncidentEventFunctionalityResponse from ...models.update_incident_event_functionality import UpdateIncidentEventFunctionality -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentEventFunctionality, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_event_functionalities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_event_functionalities/{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 | IncidentEventFunctionalityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventFunctionalityResponse | None: if response.status_code == 200: response_200 = IncidentEventFunctionalityResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentEventFunctionality, + ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """Update an incident event + """ Update an incident event Update a specific incident event functionality by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventFunctionality, + ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """Update an incident event + """ Update an incident event Update a specific incident event functionality by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventFunctionality, + ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """Update an incident event + """ Update an incident event Update a specific incident event functionality by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventFunctionality, + ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """Update an incident event + """ Update an incident event Update a specific incident event functionality by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_event_services/__init__.py b/rootly_sdk/api/incident_event_services/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_event_services/__init__.py +++ b/rootly_sdk/api/incident_event_services/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 e1b7f48f..0a5608e5 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_service_response import IncidentEventServiceResponse from ...models.new_incident_event_service import NewIncidentEventService -from ...types import Response +from typing import cast + def _get_kwargs( incident_event_id: str, *, body: NewIncidentEventService, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/events/{incident_event_id}/services".format( - incident_event_id=quote(str(incident_event_id), safe=""), - ), + "url": "/v1/events/{incident_event_id}/services".format(incident_event_id=quote(str(incident_event_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 | IncidentEventServiceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventServiceResponse | None: if response.status_code == 201: response_201 = IncidentEventServiceResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventServiceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentEventService, + ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """Creates an incident event service + """ Creates an incident event service Creates a new event service from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ + """ + kwargs = _get_kwargs( incident_event_id=incident_event_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventService, + ) -> ErrorsList | IncidentEventServiceResponse | None: - """Creates an incident event service + """ Creates an incident event service Creates a new event service from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentEventServiceResponse - """ + """ + return sync_detailed( incident_event_id=incident_event_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventService, + ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """Creates an incident event service + """ Creates an incident event service Creates a new event service from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ + """ + kwargs = _get_kwargs( incident_event_id=incident_event_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventService, + ) -> ErrorsList | IncidentEventServiceResponse | None: - """Creates an incident event service + """ Creates an incident event service Creates a new event service from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventServiceResponse - """ - - return ( - await asyncio_detailed( - incident_event_id=incident_event_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_event_id=incident_event_id, +client=client, +body=body, + + )).parsed 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 e4ce309c..98572707 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_service_response import IncidentEventServiceResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_event_services/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_event_services/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentEventServiceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventServiceResponse | None: if response.status_code == 200: response_200 = IncidentEventServiceResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventServiceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """Delete an incident event functionalitu + """ Delete an incident event functionalitu Delete a specific incident event service by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventServiceResponse | None: - """Delete an incident event functionalitu + """ Delete an incident event functionalitu Delete a specific incident event service by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentEventServiceResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """Delete an incident event functionalitu + """ Delete an incident event functionalitu Delete a specific incident event service by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventServiceResponse | None: - """Delete an incident event functionalitu + """ Delete an incident event functionalitu Delete a specific incident event service by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventServiceResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 83c948c2..30c7dc65 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_service_response import IncidentEventServiceResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_event_services/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_event_services/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentEventServiceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventServiceResponse | None: if response.status_code == 200: response_200 = IncidentEventServiceResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventServiceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """Retrieves an incident event service + """ Retrieves an incident event service Retrieves a specific incident_event_service by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventServiceResponse | None: - """Retrieves an incident event service + """ Retrieves an incident event service Retrieves a specific incident_event_service by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentEventServiceResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """Retrieves an incident event service + """ Retrieves an incident event service Retrieves a specific incident_event_service by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventServiceResponse | None: - """Retrieves an incident event service + """ Retrieves an incident event service Retrieves a specific incident_event_service by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventServiceResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 5087b62e..c8bf6953 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_event_service_list import IncidentEventServiceList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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/events/{incident_event_id}/services".format( - incident_event_id=quote(str(incident_event_id), safe=""), - ), + "url": "/v1/events/{incident_event_id}/services".format(incident_event_id=quote(str(incident_event_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> IncidentEventServiceList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentEventServiceList | None: if response.status_code == 200: response_200 = IncidentEventServiceList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentEventServiceList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentEventServiceList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentEventServiceList]: - """List incident event services + """ List incident event services List incident event services @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[IncidentEventServiceList] - """ + """ + kwargs = _get_kwargs( incident_event_id=incident_event_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_event_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentEventServiceList | None: - """List incident event services + """ List incident event services List incident event services @@ -128,16 +139,17 @@ def sync( Returns: IncidentEventServiceList - """ + """ + return sync_detailed( incident_event_id=incident_event_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_event_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentEventServiceList]: - """List incident event services + """ List incident event services List incident event services @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[IncidentEventServiceList] - """ + """ + kwargs = _get_kwargs( incident_event_id=incident_event_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_event_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentEventServiceList | None: - """List incident event services + """ List incident event services List incident event services @@ -201,14 +218,14 @@ async def asyncio( Returns: IncidentEventServiceList - """ - - return ( - await asyncio_detailed( - incident_event_id=incident_event_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_event_id=incident_event_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 11e2528f..6090ca8c 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_service_response import IncidentEventServiceResponse from ...models.update_incident_event_service import UpdateIncidentEventService -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentEventService, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_event_services/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_event_services/{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 | IncidentEventServiceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventServiceResponse | None: if response.status_code == 200: response_200 = IncidentEventServiceResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventServiceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentEventService, + ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """Update an incident event + """ Update an incident event Update a specific incident event service by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventService, + ) -> ErrorsList | IncidentEventServiceResponse | None: - """Update an incident event + """ Update an incident event Update a specific incident event service by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentEventServiceResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventService, + ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """Update an incident event + """ Update an incident event Update a specific incident event service by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventService, + ) -> ErrorsList | IncidentEventServiceResponse | None: - """Update an incident event + """ Update an incident event Update a specific incident event service by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventServiceResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_events/__init__.py b/rootly_sdk/api/incident_events/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_events/__init__.py +++ b/rootly_sdk/api/incident_events/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/incident_events/create_incident_event.py b/rootly_sdk/api/incident_events/create_incident_event.py index 443576f9..16414f40 100644 --- a/rootly_sdk/api/incident_events/create_incident_event.py +++ b/rootly_sdk/api/incident_events/create_incident_event.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_response import IncidentEventResponse from ...models.new_incident_event import NewIncidentEvent -from ...types import Response +from typing import cast + def _get_kwargs( incident_id: str, *, body: NewIncidentEvent, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/events".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/events".format(incident_id=quote(str(incident_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 | IncidentEventResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventResponse | None: if response.status_code == 201: response_201 = IncidentEventResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentEvent, + ) -> Response[ErrorsList | IncidentEventResponse]: - """Creates an incident event + """ Creates an incident event Creates a new event from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentEvent, + ) -> ErrorsList | IncidentEventResponse | None: - """Creates an incident event + """ Creates an incident event Creates a new event from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentEventResponse - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentEvent, + ) -> Response[ErrorsList | IncidentEventResponse]: - """Creates an incident event + """ Creates an incident event Creates a new event from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentEvent, + ) -> ErrorsList | IncidentEventResponse | None: - """Creates an incident event + """ Creates an incident event Creates a new event from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventResponse - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_events/delete_incident_event.py b/rootly_sdk/api/incident_events/delete_incident_event.py index 906602f5..0ab2f973 100644 --- a/rootly_sdk/api/incident_events/delete_incident_event.py +++ b/rootly_sdk/api/incident_events/delete_incident_event.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_response import IncidentEventResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/events/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/events/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentEventResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventResponse | None: if response.status_code == 200: response_200 = IncidentEventResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventResponse]: - """Delete an incident event + """ Delete an incident event Delete a specific incident event by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventResponse | None: - """Delete an incident event + """ Delete an incident event Delete a specific incident event by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentEventResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventResponse]: - """Delete an incident event + """ Delete an incident event Delete a specific incident event by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventResponse | None: - """Delete an incident event + """ Delete an incident event Delete a specific incident event by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/incident_events/get_incident_events.py b/rootly_sdk/api/incident_events/get_incident_events.py index 092a2816..fe29704a 100644 --- a/rootly_sdk/api/incident_events/get_incident_events.py +++ b/rootly_sdk/api/incident_events/get_incident_events.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_response import IncidentEventResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/events/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/events/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentEventResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventResponse | None: if response.status_code == 200: response_200 = IncidentEventResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventResponse]: - """Retrieves an incident event + """ Retrieves an incident event Retrieves a specific incident_event by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventResponse | None: - """Retrieves an incident event + """ Retrieves an incident event Retrieves a specific incident_event by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentEventResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentEventResponse]: - """Retrieves an incident event + """ Retrieves an incident event Retrieves a specific incident_event by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentEventResponse | None: - """Retrieves an incident event + """ Retrieves an incident event Retrieves a specific incident_event by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/incident_events/list_incident_events.py b/rootly_sdk/api/incident_events/list_incident_events.py index ddd02177..cbcdf984 100644 --- a/rootly_sdk/api/incident_events/list_incident_events.py +++ b/rootly_sdk/api/incident_events/list_incident_events.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_event_list import IncidentEventList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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}/events".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/events".format(incident_id=quote(str(incident_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentEventList | None: if response.status_code == 200: response_200 = IncidentEventList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -67,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentEventList]: - """List incident events + """ List incident events List incident events @@ -84,13 +97,15 @@ def sync_detailed( Returns: Response[IncidentEventList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -99,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, @@ -107,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentEventList | None: - """List incident events + """ List incident events List incident events @@ -124,16 +139,17 @@ def sync( Returns: IncidentEventList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_id: str, @@ -142,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentEventList]: - """List incident events + """ List incident events List incident events @@ -159,20 +176,23 @@ async def asyncio_detailed( Returns: Response[IncidentEventList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, @@ -180,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentEventList | None: - """List incident events + """ List incident events List incident events @@ -197,14 +218,14 @@ async def asyncio( Returns: IncidentEventList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/incident_events/update_incident_event.py b/rootly_sdk/api/incident_events/update_incident_event.py index 6e364970..ed2c364b 100644 --- a/rootly_sdk/api/incident_events/update_incident_event.py +++ b/rootly_sdk/api/incident_events/update_incident_event.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_event_response import IncidentEventResponse from ...models.update_incident_event import UpdateIncidentEvent -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentEvent, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/events/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/events/{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 | IncidentEventResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventResponse | None: if response.status_code == 200: response_200 = IncidentEventResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentEventResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentEvent, + ) -> Response[ErrorsList | IncidentEventResponse]: - """Update an incident event + """ Update an incident event Update a specific incident event by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEvent, + ) -> ErrorsList | IncidentEventResponse | None: - """Update an incident event + """ Update an incident event Update a specific incident event by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentEventResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEvent, + ) -> Response[ErrorsList | IncidentEventResponse]: - """Update an incident event + """ Update an incident event Update a specific incident event by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEvent, + ) -> ErrorsList | IncidentEventResponse | None: - """Update an incident event + """ Update an incident event Update a specific incident event by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_feedbacks/__init__.py b/rootly_sdk/api/incident_feedbacks/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_feedbacks/__init__.py +++ b/rootly_sdk/api/incident_feedbacks/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py b/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py index 3a29fbc2..78b9fcf5 100644 --- a/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py +++ b/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_feedback_response import IncidentFeedbackResponse from ...models.new_incident_feedback import NewIncidentFeedback -from ...types import Response +from typing import cast + def _get_kwargs( incident_id: str, *, body: NewIncidentFeedback, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/feedbacks".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/feedbacks".format(incident_id=quote(str(incident_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 | IncidentFeedbackResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFeedbackResponse | None: if response.status_code == 201: response_201 = IncidentFeedbackResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentFeedbackResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFeedbackResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentFeedback, + ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """Creates an incident feedback + """ Creates an incident feedback Creates a new feedback from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFeedback, + ) -> ErrorsList | IncidentFeedbackResponse | None: - """Creates an incident feedback + """ Creates an incident feedback Creates a new feedback from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentFeedbackResponse - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFeedback, + ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """Creates an incident feedback + """ Creates an incident feedback Creates a new feedback from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFeedback, + ) -> ErrorsList | IncidentFeedbackResponse | None: - """Creates an incident feedback + """ Creates an incident feedback Creates a new feedback from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentFeedbackResponse - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py b/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py index 6c834602..cbb6f361 100644 --- a/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py +++ b/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_feedback_response import IncidentFeedbackResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/feedbacks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/feedbacks/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentFeedbackResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFeedbackResponse | None: if response.status_code == 200: response_200 = IncidentFeedbackResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentFeedbackResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFeedbackResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """Retrieves an incident feedback + """ Retrieves an incident feedback Retrieves a specific incident_feedback by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentFeedbackResponse | None: - """Retrieves an incident feedback + """ Retrieves an incident feedback Retrieves a specific incident_feedback by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentFeedbackResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """Retrieves an incident feedback + """ Retrieves an incident feedback Retrieves a specific incident_feedback by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentFeedbackResponse | None: - """Retrieves an incident feedback + """ Retrieves an incident feedback Retrieves a specific incident_feedback by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentFeedbackResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py b/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py index e9606100..74fdfc8a 100644 --- a/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py +++ b/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_feedback_list import IncidentFeedbackList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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}/feedbacks".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/feedbacks".format(incident_id=quote(str(incident_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentFeedbackList | None: if response.status_code == 200: response_200 = IncidentFeedbackList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -51,9 +63,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentFeedbackList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentFeedbackList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentFeedbackList]: - """List incident feedbacks + """ List incident feedbacks List incident feedbacks @@ -86,13 +97,15 @@ def sync_detailed( Returns: Response[IncidentFeedbackList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -101,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, @@ -109,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentFeedbackList | None: - """List incident feedbacks + """ List incident feedbacks List incident feedbacks @@ -126,16 +139,17 @@ def sync( Returns: IncidentFeedbackList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_id: str, @@ -144,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentFeedbackList]: - """List incident feedbacks + """ List incident feedbacks List incident feedbacks @@ -161,20 +176,23 @@ async def asyncio_detailed( Returns: Response[IncidentFeedbackList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, @@ -182,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentFeedbackList | None: - """List incident feedbacks + """ List incident feedbacks List incident feedbacks @@ -199,14 +218,14 @@ async def asyncio( Returns: IncidentFeedbackList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py b/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py index 95e97705..46c9539d 100644 --- a/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py +++ b/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_feedback_response import IncidentFeedbackResponse from ...models.update_incident_feedback import UpdateIncidentFeedback -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentFeedback, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/feedbacks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/feedbacks/{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 | IncidentFeedbackResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFeedbackResponse | None: if response.status_code == 200: response_200 = IncidentFeedbackResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentFeedbackResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFeedbackResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentFeedback, + ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """Update an incident feedback + """ Update an incident feedback Update a specific incident feedback by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFeedback, + ) -> ErrorsList | IncidentFeedbackResponse | None: - """Update an incident feedback + """ Update an incident feedback Update a specific incident feedback by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentFeedbackResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFeedback, + ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """Update an incident feedback + """ Update an incident feedback Update a specific incident feedback by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFeedback, + ) -> ErrorsList | IncidentFeedbackResponse | None: - """Update an incident feedback + """ Update an incident feedback Update a specific incident feedback by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentFeedbackResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_form_field_selections/__init__.py b/rootly_sdk/api/incident_form_field_selections/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_form_field_selections/__init__.py +++ b/rootly_sdk/api/incident_form_field_selections/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 a24a4d0c..54f60a94 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_form_field_selection_response import IncidentFormFieldSelectionResponse from ...models.new_incident_form_field_selection import NewIncidentFormFieldSelection -from ...types import Response +from typing import cast + def _get_kwargs( incident_id: str, *, body: NewIncidentFormFieldSelection, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/form_field_selections".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/form_field_selections".format(incident_id=quote(str(incident_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 | IncidentFormFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFormFieldSelectionResponse | None: if response.status_code == 201: response_201 = IncidentFormFieldSelectionResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentFormFieldSelection, + ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """Creates an incident form field selection + """ Creates an incident form field selection Creates a new incident form field selection from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFormFieldSelection, + ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """Creates an incident form field selection + """ Creates an incident form field selection Creates a new incident form field selection from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFormFieldSelection, + ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """Creates an incident form field selection + """ Creates an incident form field selection Creates a new incident form field selection from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFormFieldSelection, + ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """Creates an incident form field selection + """ Creates an incident form field selection Creates a new incident form field selection from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +body=body, + + )).parsed 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 e1158bcf..4433c29b 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_form_field_selection_response import IncidentFormFieldSelectionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_form_field_selections/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_form_field_selections/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentFormFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFormFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentFormFieldSelectionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """Delete an incident form field selection + """ Delete an incident form field selection Delete a specific incident form field selection by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """Delete an incident form field selection + """ Delete an incident form field selection Delete a specific incident form field selection by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """Delete an incident form field selection + """ Delete an incident form field selection Delete a specific incident form field selection by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """Delete an incident form field selection + """ Delete an incident form field selection Delete a specific incident form field selection by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 7649c119..9acae791 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_form_field_selection_response import IncidentFormFieldSelectionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_form_field_selections/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_form_field_selections/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentFormFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFormFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentFormFieldSelectionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """Retrieves an incident form field selection + """ Retrieves an incident form field selection Retrieves a specific incident form field selection by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """Retrieves an incident form field selection + """ Retrieves an incident form field selection Retrieves a specific incident form field selection by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """Retrieves an incident form field selection + """ Retrieves an incident form field selection Retrieves a specific incident form field selection by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """Retrieves an incident form field selection + """ Retrieves an incident form field selection Retrieves a specific incident form field selection by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 8da161a7..c557606c 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_form_field_selection_list import IncidentFormFieldSelectionList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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}/form_field_selections".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/form_field_selections".format(incident_id=quote(str(incident_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> IncidentFormFieldSelectionList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentFormFieldSelectionList | None: if response.status_code == 200: response_200 = IncidentFormFieldSelectionList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentFormFieldSelectionList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentFormFieldSelectionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentFormFieldSelectionList]: - """List incident form field selections + """ List incident form field selections List incident form field selections @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[IncidentFormFieldSelectionList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentFormFieldSelectionList | None: - """List incident form field selections + """ List incident form field selections List incident form field selections @@ -128,16 +139,17 @@ def sync( Returns: IncidentFormFieldSelectionList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentFormFieldSelectionList]: - """List incident form field selections + """ List incident form field selections List incident form field selections @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[IncidentFormFieldSelectionList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentFormFieldSelectionList | None: - """List incident form field selections + """ List incident form field selections List incident form field selections @@ -201,14 +218,14 @@ async def asyncio( Returns: IncidentFormFieldSelectionList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 8d933d3b..7583768b 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_form_field_selection_response import IncidentFormFieldSelectionResponse from ...models.update_incident_form_field_selection import UpdateIncidentFormFieldSelection -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentFormFieldSelection, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_form_field_selections/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_form_field_selections/{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 | IncidentFormFieldSelectionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFormFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentFormFieldSelectionResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentFormFieldSelection, + ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """Update an incident form field selection + """ Update an incident form field selection Update a specific incident form field selection by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFormFieldSelection, + ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """Update an incident form field selection + """ Update an incident form field selection Update a specific incident form field selection by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFormFieldSelection, + ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """Update an incident form field selection + """ Update an incident form field selection Update a specific incident form field selection by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFormFieldSelection, + ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """Update an incident form field selection + """ Update an incident form field selection Update a specific incident form field selection by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_permission_set_booleans/__init__.py b/rootly_sdk/api/incident_permission_set_booleans/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_permission_set_booleans/__init__.py +++ b/rootly_sdk/api/incident_permission_set_booleans/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 b2923285..30622787 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_boolean_response import IncidentPermissionSetBooleanResponse from ...models.new_incident_permission_set_boolean import NewIncidentPermissionSetBoolean -from ...types import Response +from typing import cast + def _get_kwargs( incident_permission_set_id: str, *, body: NewIncidentPermissionSetBoolean, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incident_permission_sets/{incident_permission_set_id}/booleans".format( - incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), - ), + "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() + headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: if response.status_code == 201: response_201 = IncidentPermissionSetBooleanResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentPermissionSetBoolean, + ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """Creates an incident_permission_set_boolean + """ Creates an incident_permission_set_boolean Creates a new incident_permission_set_boolean from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ + """ + kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetBoolean, + ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """Creates an incident_permission_set_boolean + """ Creates an incident_permission_set_boolean Creates a new incident_permission_set_boolean from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ + """ + return sync_detailed( incident_permission_set_id=incident_permission_set_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetBoolean, + ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """Creates an incident_permission_set_boolean + """ Creates an incident_permission_set_boolean Creates a new incident_permission_set_boolean from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ + """ + kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetBoolean, + ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """Creates an incident_permission_set_boolean + """ Creates an incident_permission_set_boolean Creates a new incident_permission_set_boolean from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - - return ( - await asyncio_detailed( - incident_permission_set_id=incident_permission_set_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_permission_set_id=incident_permission_set_id, +client=client, +body=body, + + )).parsed 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 2597380c..7090a597 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_boolean_response import IncidentPermissionSetBooleanResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_permission_set_booleans/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_permission_set_booleans/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetBooleanResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """Delete an incident_permission_set_boolean + """ Delete an incident_permission_set_boolean Delete a specific incident_permission_set_boolean by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """Delete an incident_permission_set_boolean + """ Delete an incident_permission_set_boolean Delete a specific incident_permission_set_boolean by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """Delete an incident_permission_set_boolean + """ Delete an incident_permission_set_boolean Delete a specific incident_permission_set_boolean by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """Delete an incident_permission_set_boolean + """ Delete an incident_permission_set_boolean Delete a specific incident_permission_set_boolean by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 fd412645..d2e47554 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_boolean_response import IncidentPermissionSetBooleanResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_permission_set_booleans/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_permission_set_booleans/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetBooleanResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """Retrieves an incident_permission_set_boolean + """ Retrieves an incident_permission_set_boolean Retrieves a specific incident_permission_set_boolean by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """Retrieves an incident_permission_set_boolean + """ Retrieves an incident_permission_set_boolean Retrieves a specific incident_permission_set_boolean by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """Retrieves an incident_permission_set_boolean + """ Retrieves an incident_permission_set_boolean Retrieves a specific incident_permission_set_boolean by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """Retrieves an incident_permission_set_boolean + """ Retrieves an incident_permission_set_boolean Retrieves a specific incident_permission_set_boolean by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 4f640b28..e19139b6 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_permission_set_boolean_list import IncidentPermissionSetBooleanList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,7 +26,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -44,25 +52,27 @@ def _get_kwargs( 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/incident_permission_sets/{incident_permission_set_id}/booleans".format( - incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), - ), + "url": "/v1/incident_permission_sets/{incident_permission_set_id}/booleans".format(incident_permission_set_id=quote(str(incident_permission_set_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> IncidentPermissionSetBooleanList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentPermissionSetBooleanList | None: if response.status_code == 200: response_200 = IncidentPermissionSetBooleanList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -71,9 +81,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentPermissionSetBooleanList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentPermissionSetBooleanList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -95,8 +103,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentPermissionSetBooleanList]: - """List incident_permission_set_booleans + """ List incident_permission_set_booleans List incident_permission_set_booleans @@ -118,19 +127,21 @@ def sync_detailed( Returns: Response[IncidentPermissionSetBooleanList] - """ + """ + kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -139,7 +150,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_permission_set_id: str, *, @@ -153,8 +163,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentPermissionSetBooleanList | None: - """List incident_permission_set_booleans + """ List incident_permission_set_booleans List incident_permission_set_booleans @@ -176,22 +187,23 @@ def sync( Returns: IncidentPermissionSetBooleanList - """ + """ + return sync_detailed( incident_permission_set_id=incident_permission_set_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ).parsed async def asyncio_detailed( incident_permission_set_id: str, @@ -206,8 +218,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentPermissionSetBooleanList]: - """List incident_permission_set_booleans + """ List incident_permission_set_booleans List incident_permission_set_booleans @@ -229,26 +242,29 @@ async def asyncio_detailed( Returns: Response[IncidentPermissionSetBooleanList] - """ + """ + kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_permission_set_id: str, *, @@ -262,8 +278,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentPermissionSetBooleanList | None: - """List incident_permission_set_booleans + """ List incident_permission_set_booleans List incident_permission_set_booleans @@ -285,20 +302,20 @@ async def asyncio( Returns: IncidentPermissionSetBooleanList - """ - - return ( - await asyncio_detailed( - incident_permission_set_id=incident_permission_set_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_permission_set_id=incident_permission_set_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +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/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 cd4630de..c915f66c 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_boolean_response import IncidentPermissionSetBooleanResponse from ...models.update_incident_permission_set_boolean import UpdateIncidentPermissionSetBoolean -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentPermissionSetBoolean, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_permission_set_booleans/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_permission_set_booleans/{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 | IncidentPermissionSetBooleanResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetBooleanResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetBoolean, + ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """Update an incident_permission_set_boolean + """ Update an incident_permission_set_boolean Update a specific incident_permission_set_boolean by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetBoolean, + ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """Update an incident_permission_set_boolean + """ Update an incident_permission_set_boolean Update a specific incident_permission_set_boolean by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetBoolean, + ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """Update an incident_permission_set_boolean + """ Update an incident_permission_set_boolean Update a specific incident_permission_set_boolean by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetBoolean, + ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """Update an incident_permission_set_boolean + """ Update an incident_permission_set_boolean Update a specific incident_permission_set_boolean by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_permission_set_resources/__init__.py b/rootly_sdk/api/incident_permission_set_resources/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_permission_set_resources/__init__.py +++ b/rootly_sdk/api/incident_permission_set_resources/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 1c90322b..49c9d87e 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_resource_response import IncidentPermissionSetResourceResponse from ...models.new_incident_permission_set_resource import NewIncidentPermissionSetResource -from ...types import Response +from typing import cast + def _get_kwargs( incident_permission_set_id: str, *, body: NewIncidentPermissionSetResource, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incident_permission_sets/{incident_permission_set_id}/resources".format( - incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), - ), + "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() + headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentPermissionSetResourceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResourceResponse | None: if response.status_code == 201: response_201 = IncidentPermissionSetResourceResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentPermissionSetResource, + ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """Creates an incident_permission_set_resource + """ Creates an incident_permission_set_resource Creates a new incident_permission_set_resource from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ + """ + kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetResource, + ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """Creates an incident_permission_set_resource + """ Creates an incident_permission_set_resource Creates a new incident_permission_set_resource from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ + """ + return sync_detailed( incident_permission_set_id=incident_permission_set_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetResource, + ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """Creates an incident_permission_set_resource + """ Creates an incident_permission_set_resource Creates a new incident_permission_set_resource from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ + """ + kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetResource, + ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """Creates an incident_permission_set_resource + """ Creates an incident_permission_set_resource Creates a new incident_permission_set_resource from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - - return ( - await asyncio_detailed( - incident_permission_set_id=incident_permission_set_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_permission_set_id=incident_permission_set_id, +client=client, +body=body, + + )).parsed 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 b0df5cea..1c193c48 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_resource_response import IncidentPermissionSetResourceResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_permission_set_resources/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_permission_set_resources/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentPermissionSetResourceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResourceResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResourceResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """Delete an incident_permission_set_resource + """ Delete an incident_permission_set_resource Delete a specific incident_permission_set_resource by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """Delete an incident_permission_set_resource + """ Delete an incident_permission_set_resource Delete a specific incident_permission_set_resource by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """Delete an incident_permission_set_resource + """ Delete an incident_permission_set_resource Delete a specific incident_permission_set_resource by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """Delete an incident_permission_set_resource + """ Delete an incident_permission_set_resource Delete a specific incident_permission_set_resource by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 3ecc6bcb..c7416ba0 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_resource_response import IncidentPermissionSetResourceResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_permission_set_resources/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_permission_set_resources/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentPermissionSetResourceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResourceResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResourceResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """Retrieves an incident_permission_set_resource + """ Retrieves an incident_permission_set_resource Retrieves a specific incident_permission_set_resource by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """Retrieves an incident_permission_set_resource + """ Retrieves an incident_permission_set_resource Retrieves a specific incident_permission_set_resource by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """Retrieves an incident_permission_set_resource + """ Retrieves an incident_permission_set_resource Retrieves a specific incident_permission_set_resource by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """Retrieves an incident_permission_set_resource + """ Retrieves an incident_permission_set_resource Retrieves a specific incident_permission_set_resource by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 7be18300..b181e857 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_permission_set_resource_list import IncidentPermissionSetResourceList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,7 +26,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -44,25 +52,27 @@ def _get_kwargs( 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/incident_permission_sets/{incident_permission_set_id}/resources".format( - incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), - ), + "url": "/v1/incident_permission_sets/{incident_permission_set_id}/resources".format(incident_permission_set_id=quote(str(incident_permission_set_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> IncidentPermissionSetResourceList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentPermissionSetResourceList | None: if response.status_code == 200: response_200 = IncidentPermissionSetResourceList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -71,9 +81,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentPermissionSetResourceList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentPermissionSetResourceList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -95,8 +103,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentPermissionSetResourceList]: - """List incident_permission_set_resources + """ List incident_permission_set_resources List incident_permission_set_resources @@ -118,19 +127,21 @@ def sync_detailed( Returns: Response[IncidentPermissionSetResourceList] - """ + """ + kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -139,7 +150,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_permission_set_id: str, *, @@ -153,8 +163,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentPermissionSetResourceList | None: - """List incident_permission_set_resources + """ List incident_permission_set_resources List incident_permission_set_resources @@ -176,22 +187,23 @@ def sync( Returns: IncidentPermissionSetResourceList - """ + """ + return sync_detailed( incident_permission_set_id=incident_permission_set_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ).parsed async def asyncio_detailed( incident_permission_set_id: str, @@ -206,8 +218,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentPermissionSetResourceList]: - """List incident_permission_set_resources + """ List incident_permission_set_resources List incident_permission_set_resources @@ -229,26 +242,29 @@ async def asyncio_detailed( Returns: Response[IncidentPermissionSetResourceList] - """ + """ + kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_permission_set_id: str, *, @@ -262,8 +278,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentPermissionSetResourceList | None: - """List incident_permission_set_resources + """ List incident_permission_set_resources List incident_permission_set_resources @@ -285,20 +302,20 @@ async def asyncio( Returns: IncidentPermissionSetResourceList - """ - - return ( - await asyncio_detailed( - incident_permission_set_id=incident_permission_set_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_permission_set_id=incident_permission_set_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, +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/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 9448553c..463642de 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_resource_response import IncidentPermissionSetResourceResponse from ...models.update_incident_permission_set_resource import UpdateIncidentPermissionSetResource -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentPermissionSetResource, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_permission_set_resources/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_permission_set_resources/{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 | IncidentPermissionSetResourceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResourceResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResourceResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetResource, + ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """Update an incident_permission_set_resource + """ Update an incident_permission_set_resource Update a specific incident_permission_set_resource by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetResource, + ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """Update an incident_permission_set_resource + """ Update an incident_permission_set_resource Update a specific incident_permission_set_resource by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetResource, + ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """Update an incident_permission_set_resource + """ Update an incident_permission_set_resource Update a specific incident_permission_set_resource by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetResource, + ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """Update an incident_permission_set_resource + """ Update an incident_permission_set_resource Update a specific incident_permission_set_resource by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_permission_sets/__init__.py b/rootly_sdk/api/incident_permission_sets/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_permission_sets/__init__.py +++ b/rootly_sdk/api/incident_permission_sets/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 72ee39ce..aea0f9d1 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 @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_response import IncidentPermissionSetResponse from ...models.new_incident_permission_set import NewIncidentPermissionSet -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewIncidentPermissionSet, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incident_permission_sets", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | IncidentPermissionSetResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResponse | None: if response.status_code == 201: response_201 = IncidentPermissionSetResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentPermissionSet, + ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """Creates an incident_permission_set + """ Creates an incident_permission_set Creates a new incident_permission_set from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewIncidentPermissionSet, + ) -> ErrorsList | IncidentPermissionSetResponse | None: - """Creates an incident_permission_set + """ Creates an incident_permission_set Creates a new incident_permission_set from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewIncidentPermissionSet, + ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """Creates an incident_permission_set + """ Creates an incident_permission_set Creates a new incident_permission_set from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewIncidentPermissionSet, + ) -> ErrorsList | IncidentPermissionSetResponse | None: - """Creates an incident_permission_set + """ Creates an incident_permission_set Creates a new incident_permission_set from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed 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 e4a987ec..95f527e9 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,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_response import IncidentPermissionSetResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_permission_sets/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_permission_sets/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentPermissionSetResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """Delete an incident_permission_set + """ Delete an incident_permission_set Delete a specific incident_permission_set by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetResponse | None: - """Delete an incident_permission_set + """ Delete an incident_permission_set Delete a specific incident_permission_set by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """Delete an incident_permission_set + """ Delete an incident_permission_set Delete a specific incident_permission_set by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetResponse | None: - """Delete an incident_permission_set + """ Delete an incident_permission_set Delete a specific incident_permission_set by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 6ceccff2..96f9c524 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,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_response import IncidentPermissionSetResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_permission_sets/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_permission_sets/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentPermissionSetResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """Retrieves an incident_permission_set + """ Retrieves an incident_permission_set Retrieves a specific incident_permission_set by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetResponse | None: - """Retrieves an incident_permission_set + """ Retrieves an incident_permission_set Retrieves a specific incident_permission_set by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """Retrieves an incident_permission_set + """ Retrieves an incident_permission_set Retrieves a specific incident_permission_set by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPermissionSetResponse | None: - """Retrieves an incident_permission_set + """ Retrieves an incident_permission_set Retrieves a specific incident_permission_set by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 cd7a2c18..06a0f872 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 @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_permission_set_list import IncidentPermissionSetList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,7 +27,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -48,23 +57,27 @@ def _get_kwargs( 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/incident_permission_sets", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> IncidentPermissionSetList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentPermissionSetList | None: if response.status_code == 200: response_200 = IncidentPermissionSetList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -73,9 +86,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentPermissionSetList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentPermissionSetList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -98,8 +109,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentPermissionSetList]: - """List incident_permission_sets + """ List incident_permission_sets List incident_permission_sets @@ -122,20 +134,22 @@ def sync_detailed( Returns: Response[IncidentPermissionSetList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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( @@ -144,7 +158,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -159,8 +172,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentPermissionSetList | None: - """List incident_permission_sets + """ List incident_permission_sets List incident_permission_sets @@ -183,23 +197,24 @@ def sync( Returns: IncidentPermissionSetList - """ + """ + return sync_detailed( client=client, - include=include, - 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 +include=include, +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( *, @@ -215,8 +230,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentPermissionSetList]: - """List incident_permission_sets + """ List incident_permission_sets List incident_permission_sets @@ -239,27 +255,30 @@ async def asyncio_detailed( Returns: Response[IncidentPermissionSetList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -274,8 +293,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentPermissionSetList | None: - """List incident_permission_sets + """ List incident_permission_sets List incident_permission_sets @@ -298,21 +318,21 @@ async def asyncio( Returns: IncidentPermissionSetList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - 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 + """ + + + return (await asyncio_detailed( + client=client, +include=include, +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/incident_permission_sets/update_incident_permission_set.py b/rootly_sdk/api/incident_permission_sets/update_incident_permission_set.py index 32f42235..59929f9e 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,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_permission_set_response import IncidentPermissionSetResponse from ...models.update_incident_permission_set import UpdateIncidentPermissionSet -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateIncidentPermissionSet, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_permission_sets/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_permission_sets/{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 | IncidentPermissionSetResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPermissionSetResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, + ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """Update an incident_permission_set + """ Update an incident_permission_set Update a specific incident_permission_set by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, + ) -> ErrorsList | IncidentPermissionSetResponse | None: - """Update an incident_permission_set + """ Update an incident_permission_set Update a specific incident_permission_set by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, + ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """Update an incident_permission_set + """ Update an incident_permission_set Update a specific incident_permission_set by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, + ) -> ErrorsList | IncidentPermissionSetResponse | None: - """Update an incident_permission_set + """ Update an incident_permission_set Update a specific incident_permission_set by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_retrospective_steps/__init__.py b/rootly_sdk/api/incident_retrospective_steps/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_retrospective_steps/__init__.py +++ b/rootly_sdk/api/incident_retrospective_steps/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 ab0153d1..56038245 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_retrospective_step_response import IncidentRetrospectiveStepResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_retrospective_steps/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_retrospective_steps/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentRetrospectiveStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRetrospectiveStepResponse | None: if response.status_code == 200: response_200 = IncidentRetrospectiveStepResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: - """Retrieves an incident retrospective step + """ Retrieves an incident retrospective step Retrieves a specific incident retrospective step by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRetrospectiveStepResponse | None: - """Retrieves an incident retrospective step + """ Retrieves an incident retrospective step Retrieves a specific incident retrospective step by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentRetrospectiveStepResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: - """Retrieves an incident retrospective step + """ Retrieves an incident retrospective step Retrieves a specific incident retrospective step by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRetrospectiveStepResponse | None: - """Retrieves an incident retrospective step + """ Retrieves an incident retrospective step Retrieves a specific incident retrospective step by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentRetrospectiveStepResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 8956c7c5..4ba7ebaf 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_retrospective_step_response import IncidentRetrospectiveStepResponse from ...models.update_incident_retrospective_step import UpdateIncidentRetrospectiveStep -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentRetrospectiveStep, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_retrospective_steps/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_retrospective_steps/{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 | IncidentRetrospectiveStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRetrospectiveStepResponse | None: if response.status_code == 200: response_200 = IncidentRetrospectiveStepResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentRetrospectiveStep, + ) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: - """Update an incident retrospective step + """ Update an incident retrospective step Update a specific incident retrospective step by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRetrospectiveStep, + ) -> ErrorsList | IncidentRetrospectiveStepResponse | None: - """Update an incident retrospective step + """ Update an incident retrospective step Update a specific incident retrospective step by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentRetrospectiveStepResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRetrospectiveStep, + ) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: - """Update an incident retrospective step + """ Update an incident retrospective step Update a specific incident retrospective step by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRetrospectiveStep, + ) -> ErrorsList | IncidentRetrospectiveStepResponse | None: - """Update an incident retrospective step + """ Update an incident retrospective step Update a specific incident retrospective step by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentRetrospectiveStepResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_retrospectives/__init__.py b/rootly_sdk/api/incident_retrospectives/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_retrospectives/__init__.py +++ b/rootly_sdk/api/incident_retrospectives/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 1c183c5c..a820473e 100644 --- a/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py +++ b/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_post_mortem_list import IncidentPostMortemList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -48,7 +53,11 @@ def _get_kwargs( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -126,21 +135,27 @@ def _get_kwargs( 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/post_mortems", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentPostMortemList | None: if response.status_code == 200: response_200 = IncidentPostMortemList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -149,9 +164,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentPostMortemList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentPostMortemList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -200,8 +213,9 @@ def sync_detailed( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentPostMortemList]: - """List incident retrospectives + """ List incident retrospectives List incident retrospectives @@ -250,46 +264,48 @@ def sync_detailed( Returns: Response[IncidentPostMortemList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterstatus=filterstatus, - filterseverity=filterseverity, - filtertype=filtertype, - filteruser_id=filteruser_id, - filtertypes=filtertypes, - filtertype_ids=filtertype_ids, - filterenvironments=filterenvironments, - filterenvironment_ids=filterenvironment_ids, - filterfunctionalities=filterfunctionalities, - filterfunctionality_ids=filterfunctionality_ids, - filterservices=filterservices, - filterservice_ids=filterservice_ids, - filterteams=filterteams, - filterteam_ids=filterteam_ids, - filtercauses=filtercauses, - filtercause_ids=filtercause_ids, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filtermitigated_atgt=filtermitigated_atgt, - filtermitigated_atgte=filtermitigated_atgte, - filtermitigated_atlt=filtermitigated_atlt, - filtermitigated_atlte=filtermitigated_atlte, - filterresolved_atgt=filterresolved_atgt, - filterresolved_atgte=filterresolved_atgte, - filterresolved_atlt=filterresolved_atlt, - filterresolved_atlte=filterresolved_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterstatus=filterstatus, +filterseverity=filterseverity, +filtertype=filtertype, +filteruser_id=filteruser_id, +filtertypes=filtertypes, +filtertype_ids=filtertype_ids, +filterenvironments=filterenvironments, +filterenvironment_ids=filterenvironment_ids, +filterfunctionalities=filterfunctionalities, +filterfunctionality_ids=filterfunctionality_ids, +filterservices=filterservices, +filterservice_ids=filterservice_ids, +filterteams=filterteams, +filterteam_ids=filterteam_ids, +filtercauses=filtercauses, +filtercause_ids=filtercause_ids, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filtermitigated_atgt=filtermitigated_atgt, +filtermitigated_atgte=filtermitigated_atgte, +filtermitigated_atlt=filtermitigated_atlt, +filtermitigated_atlte=filtermitigated_atlte, +filterresolved_atgt=filterresolved_atgt, +filterresolved_atgte=filterresolved_atgte, +filterresolved_atlt=filterresolved_atlt, +filterresolved_atlte=filterresolved_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -298,7 +314,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -339,8 +354,9 @@ def sync( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentPostMortemList | None: - """List incident retrospectives + """ List incident retrospectives List incident retrospectives @@ -389,49 +405,50 @@ def sync( Returns: IncidentPostMortemList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterstatus=filterstatus, - filterseverity=filterseverity, - filtertype=filtertype, - filteruser_id=filteruser_id, - filtertypes=filtertypes, - filtertype_ids=filtertype_ids, - filterenvironments=filterenvironments, - filterenvironment_ids=filterenvironment_ids, - filterfunctionalities=filterfunctionalities, - filterfunctionality_ids=filterfunctionality_ids, - filterservices=filterservices, - filterservice_ids=filterservice_ids, - filterteams=filterteams, - filterteam_ids=filterteam_ids, - filtercauses=filtercauses, - filtercause_ids=filtercause_ids, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filtermitigated_atgt=filtermitigated_atgt, - filtermitigated_atgte=filtermitigated_atgte, - filtermitigated_atlt=filtermitigated_atlt, - filtermitigated_atlte=filtermitigated_atlte, - filterresolved_atgt=filterresolved_atgt, - filterresolved_atgte=filterresolved_atgte, - filterresolved_atlt=filterresolved_atlt, - filterresolved_atlte=filterresolved_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterstatus=filterstatus, +filterseverity=filterseverity, +filtertype=filtertype, +filteruser_id=filteruser_id, +filtertypes=filtertypes, +filtertype_ids=filtertype_ids, +filterenvironments=filterenvironments, +filterenvironment_ids=filterenvironment_ids, +filterfunctionalities=filterfunctionalities, +filterfunctionality_ids=filterfunctionality_ids, +filterservices=filterservices, +filterservice_ids=filterservice_ids, +filterteams=filterteams, +filterteam_ids=filterteam_ids, +filtercauses=filtercauses, +filtercause_ids=filtercause_ids, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filtermitigated_atgt=filtermitigated_atgt, +filtermitigated_atgte=filtermitigated_atgte, +filtermitigated_atlt=filtermitigated_atlt, +filtermitigated_atlte=filtermitigated_atlte, +filterresolved_atgt=filterresolved_atgt, +filterresolved_atgte=filterresolved_atgte, +filterresolved_atlt=filterresolved_atlt, +filterresolved_atlte=filterresolved_atlte, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -473,8 +490,9 @@ async def asyncio_detailed( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentPostMortemList]: - """List incident retrospectives + """ List incident retrospectives List incident retrospectives @@ -523,53 +541,56 @@ async def asyncio_detailed( Returns: Response[IncidentPostMortemList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterstatus=filterstatus, - filterseverity=filterseverity, - filtertype=filtertype, - filteruser_id=filteruser_id, - filtertypes=filtertypes, - filtertype_ids=filtertype_ids, - filterenvironments=filterenvironments, - filterenvironment_ids=filterenvironment_ids, - filterfunctionalities=filterfunctionalities, - filterfunctionality_ids=filterfunctionality_ids, - filterservices=filterservices, - filterservice_ids=filterservice_ids, - filterteams=filterteams, - filterteam_ids=filterteam_ids, - filtercauses=filtercauses, - filtercause_ids=filtercause_ids, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filtermitigated_atgt=filtermitigated_atgt, - filtermitigated_atgte=filtermitigated_atgte, - filtermitigated_atlt=filtermitigated_atlt, - filtermitigated_atlte=filtermitigated_atlte, - filterresolved_atgt=filterresolved_atgt, - filterresolved_atgte=filterresolved_atgte, - filterresolved_atlt=filterresolved_atlt, - filterresolved_atlte=filterresolved_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterstatus=filterstatus, +filterseverity=filterseverity, +filtertype=filtertype, +filteruser_id=filteruser_id, +filtertypes=filtertypes, +filtertype_ids=filtertype_ids, +filterenvironments=filterenvironments, +filterenvironment_ids=filterenvironment_ids, +filterfunctionalities=filterfunctionalities, +filterfunctionality_ids=filterfunctionality_ids, +filterservices=filterservices, +filterservice_ids=filterservice_ids, +filterteams=filterteams, +filterteam_ids=filterteam_ids, +filtercauses=filtercauses, +filtercause_ids=filtercause_ids, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filtermitigated_atgt=filtermitigated_atgt, +filtermitigated_atgte=filtermitigated_atgte, +filtermitigated_atlt=filtermitigated_atlt, +filtermitigated_atlte=filtermitigated_atlte, +filterresolved_atgt=filterresolved_atgt, +filterresolved_atgte=filterresolved_atgte, +filterresolved_atlt=filterresolved_atlt, +filterresolved_atlte=filterresolved_atlte, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -610,8 +631,9 @@ async def asyncio( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentPostMortemList | None: - """List incident retrospectives + """ List incident retrospectives List incident retrospectives @@ -660,47 +682,47 @@ async def asyncio( Returns: IncidentPostMortemList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterstatus=filterstatus, - filterseverity=filterseverity, - filtertype=filtertype, - filteruser_id=filteruser_id, - filtertypes=filtertypes, - filtertype_ids=filtertype_ids, - filterenvironments=filterenvironments, - filterenvironment_ids=filterenvironment_ids, - filterfunctionalities=filterfunctionalities, - filterfunctionality_ids=filterfunctionality_ids, - filterservices=filterservices, - filterservice_ids=filterservice_ids, - filterteams=filterteams, - filterteam_ids=filterteam_ids, - filtercauses=filtercauses, - filtercause_ids=filtercause_ids, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filtermitigated_atgt=filtermitigated_atgt, - filtermitigated_atgte=filtermitigated_atgte, - filtermitigated_atlt=filtermitigated_atlt, - filtermitigated_atlte=filtermitigated_atlte, - filterresolved_atgt=filterresolved_atgt, - filterresolved_atgte=filterresolved_atgte, - filterresolved_atlt=filterresolved_atlt, - filterresolved_atlte=filterresolved_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterstatus=filterstatus, +filterseverity=filterseverity, +filtertype=filtertype, +filteruser_id=filteruser_id, +filtertypes=filtertypes, +filtertype_ids=filtertype_ids, +filterenvironments=filterenvironments, +filterenvironment_ids=filterenvironment_ids, +filterfunctionalities=filterfunctionalities, +filterfunctionality_ids=filterfunctionality_ids, +filterservices=filterservices, +filterservice_ids=filterservice_ids, +filterteams=filterteams, +filterteam_ids=filterteam_ids, +filtercauses=filtercauses, +filtercause_ids=filtercause_ids, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filtermitigated_atgt=filtermitigated_atgt, +filtermitigated_atgte=filtermitigated_atgte, +filtermitigated_atlt=filtermitigated_atlt, +filtermitigated_atlte=filtermitigated_atlte, +filterresolved_atgt=filterresolved_atgt, +filterresolved_atgte=filterresolved_atgte, +filterresolved_atlt=filterresolved_atlt, +filterresolved_atlte=filterresolved_atlte, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py b/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py index 0914afba..600ca77b 100644 --- a/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py +++ b/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_post_mortem_response import IncidentPostMortemResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/post_mortems/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/post_mortems/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentPostMortemResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPostMortemResponse | None: if response.status_code == 200: response_200 = IncidentPostMortemResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPostMortemResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPostMortemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPostMortemResponse]: - """Retrieves an incident retrospective + """ Retrieves an incident retrospective List incidents retrospectives @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPostMortemResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPostMortemResponse | None: - """Retrieves an incident retrospective + """ Retrieves an incident retrospective List incidents retrospectives @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | IncidentPostMortemResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentPostMortemResponse]: - """Retrieves an incident retrospective + """ Retrieves an incident retrospective List incidents retrospectives @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPostMortemResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentPostMortemResponse | None: - """Retrieves an incident retrospective + """ Retrieves an incident retrospective List incidents retrospectives @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | IncidentPostMortemResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py b/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py index 226bb3b4..bf338595 100644 --- a/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py +++ b/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_post_mortem_response import IncidentPostMortemResponse from ...models.update_incident_post_mortem import UpdateIncidentPostMortem -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateIncidentPostMortem, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/post_mortems/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/post_mortems/{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 | IncidentPostMortemResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPostMortemResponse | None: if response.status_code == 200: response_200 = IncidentPostMortemResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentPostMortemResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPostMortemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, + ) -> Response[ErrorsList | IncidentPostMortemResponse]: - """Update an incident retrospective + """ Update an incident retrospective Update a specific incident retrospective by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPostMortemResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, + ) -> ErrorsList | IncidentPostMortemResponse | None: - """Update an incident retrospective + """ Update an incident retrospective Update a specific incident retrospective by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentPostMortemResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, + ) -> Response[ErrorsList | IncidentPostMortemResponse]: - """Update an incident retrospective + """ Update an incident retrospective Update a specific incident retrospective by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPostMortemResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, + ) -> ErrorsList | IncidentPostMortemResponse | None: - """Update an incident retrospective + """ Update an incident retrospective Update a specific incident retrospective by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentPostMortemResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_role_tasks/__init__.py b/rootly_sdk/api/incident_role_tasks/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_role_tasks/__init__.py +++ b/rootly_sdk/api/incident_role_tasks/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 ee4e706e..f9b6ea0c 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_role_task_response import IncidentRoleTaskResponse from ...models.new_incident_role_task import NewIncidentRoleTask -from ...types import Response +from typing import cast + def _get_kwargs( incident_role_id: str, *, body: NewIncidentRoleTask, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incident_roles/{incident_role_id}/incident_role_tasks".format( - incident_role_id=quote(str(incident_role_id), safe=""), - ), + "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() + headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentRoleTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleTaskResponse | None: if response.status_code == 201: response_201 = IncidentRoleTaskResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRoleTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentRoleTask, + ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """Creates an incident role task + """ Creates an incident role task Creates a new task from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ + """ + kwargs = _get_kwargs( incident_role_id=incident_role_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_role_id: str, *, client: AuthenticatedClient, body: NewIncidentRoleTask, + ) -> ErrorsList | IncidentRoleTaskResponse | None: - """Creates an incident role task + """ Creates an incident role task Creates a new task from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentRoleTaskResponse - """ + """ + return sync_detailed( incident_role_id=incident_role_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_role_id: str, *, client: AuthenticatedClient, body: NewIncidentRoleTask, + ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """Creates an incident role task + """ Creates an incident role task Creates a new task from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ + """ + kwargs = _get_kwargs( incident_role_id=incident_role_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_role_id: str, *, client: AuthenticatedClient, body: NewIncidentRoleTask, + ) -> ErrorsList | IncidentRoleTaskResponse | None: - """Creates an incident role task + """ Creates an incident role task Creates a new task from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentRoleTaskResponse - """ - - return ( - await asyncio_detailed( - incident_role_id=incident_role_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_role_id=incident_role_id, +client=client, +body=body, + + )).parsed 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 d4271588..f4bbf584 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_role_task_response import IncidentRoleTaskResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_role_tasks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_role_tasks/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentRoleTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleTaskResponse | None: if response.status_code == 200: response_200 = IncidentRoleTaskResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRoleTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """Delete an incident role task + """ Delete an incident role task Delete a specific incident_role task by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRoleTaskResponse | None: - """Delete an incident role task + """ Delete an incident role task Delete a specific incident_role task by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentRoleTaskResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """Delete an incident role task + """ Delete an incident role task Delete a specific incident_role task by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRoleTaskResponse | None: - """Delete an incident role task + """ Delete an incident role task Delete a specific incident_role task by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleTaskResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 8c240008..7fc1a514 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_role_task_response import IncidentRoleTaskResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_role_tasks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_role_tasks/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentRoleTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleTaskResponse | None: if response.status_code == 200: response_200 = IncidentRoleTaskResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRoleTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """Retrieves an incident role task + """ Retrieves an incident role task Retrieves a specific incident_role_task by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRoleTaskResponse | None: - """Retrieves an incident role task + """ Retrieves an incident role task Retrieves a specific incident_role_task by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentRoleTaskResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """Retrieves an incident role task + """ Retrieves an incident role task Retrieves a specific incident_role_task by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRoleTaskResponse | None: - """Retrieves an incident role task + """ Retrieves an incident role task Retrieves a specific incident_role_task by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleTaskResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 c5d8a805..794326ce 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_role_task_list import IncidentRoleTaskList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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/incident_roles/{incident_role_id}/incident_role_tasks".format( - incident_role_id=quote(str(incident_role_id), safe=""), - ), + "url": "/v1/incident_roles/{incident_role_id}/incident_role_tasks".format(incident_role_id=quote(str(incident_role_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentRoleTaskList | None: if response.status_code == 200: response_200 = IncidentRoleTaskList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -51,9 +63,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentRoleTaskList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentRoleTaskList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentRoleTaskList]: - """List incident role tasks + """ List incident role tasks List incident_role tasks @@ -86,13 +97,15 @@ def sync_detailed( Returns: Response[IncidentRoleTaskList] - """ + """ + kwargs = _get_kwargs( incident_role_id=incident_role_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -101,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_role_id: str, *, @@ -109,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentRoleTaskList | None: - """List incident role tasks + """ List incident role tasks List incident_role tasks @@ -126,16 +139,17 @@ def sync( Returns: IncidentRoleTaskList - """ + """ + return sync_detailed( incident_role_id=incident_role_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_role_id: str, @@ -144,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentRoleTaskList]: - """List incident role tasks + """ List incident role tasks List incident_role tasks @@ -161,20 +176,23 @@ async def asyncio_detailed( Returns: Response[IncidentRoleTaskList] - """ + """ + kwargs = _get_kwargs( incident_role_id=incident_role_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_role_id: str, *, @@ -182,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentRoleTaskList | None: - """List incident role tasks + """ List incident role tasks List incident_role tasks @@ -199,14 +218,14 @@ async def asyncio( Returns: IncidentRoleTaskList - """ - - return ( - await asyncio_detailed( - incident_role_id=incident_role_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_role_id=incident_role_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 0ab3fb0a..1347d12a 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_role_task_response import IncidentRoleTaskResponse from ...models.update_incident_role_task import UpdateIncidentRoleTask -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentRoleTask, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_role_tasks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_role_tasks/{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 | IncidentRoleTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleTaskResponse | None: if response.status_code == 200: response_200 = IncidentRoleTaskResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRoleTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentRoleTask, + ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """Update an incident role task + """ Update an incident role task Update a specific incident_role task by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRoleTask, + ) -> ErrorsList | IncidentRoleTaskResponse | None: - """Update an incident role task + """ Update an incident role task Update a specific incident_role task by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentRoleTaskResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRoleTask, + ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """Update an incident role task + """ Update an incident role task Update a specific incident_role task by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRoleTask, + ) -> ErrorsList | IncidentRoleTaskResponse | None: - """Update an incident role task + """ Update an incident role task Update a specific incident_role task by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentRoleTaskResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_roles/__init__.py b/rootly_sdk/api/incident_roles/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_roles/__init__.py +++ b/rootly_sdk/api/incident_roles/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/incident_roles/create_incident_role.py b/rootly_sdk/api/incident_roles/create_incident_role.py index 6b747e39..8854e377 100644 --- a/rootly_sdk/api/incident_roles/create_incident_role.py +++ b/rootly_sdk/api/incident_roles/create_incident_role.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_role_response import IncidentRoleResponse from ...models.new_incident_role import NewIncidentRole -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewIncidentRole, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incident_roles", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | IncidentRoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleResponse | None: if response.status_code == 201: response_201 = IncidentRoleResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentRole, + ) -> Response[ErrorsList | IncidentRoleResponse]: - """Creates an incident role + """ Creates an incident role Creates a new incident role from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewIncidentRole, + ) -> ErrorsList | IncidentRoleResponse | None: - """Creates an incident role + """ Creates an incident role Creates a new incident role from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | IncidentRoleResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewIncidentRole, + ) -> Response[ErrorsList | IncidentRoleResponse]: - """Creates an incident role + """ Creates an incident role Creates a new incident role from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewIncidentRole, + ) -> ErrorsList | IncidentRoleResponse | None: - """Creates an incident role + """ Creates an incident role Creates a new incident role from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_roles/delete_incident_role.py b/rootly_sdk/api/incident_roles/delete_incident_role.py index 82e614df..0f514452 100644 --- a/rootly_sdk/api/incident_roles/delete_incident_role.py +++ b/rootly_sdk/api/incident_roles/delete_incident_role.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_role_response import IncidentRoleResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_roles/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_roles/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentRoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleResponse | None: if response.status_code == 200: response_200 = IncidentRoleResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRoleResponse]: - """Delete an incident role + """ Delete an incident role Delete a specific incident_role by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRoleResponse | None: - """Delete an incident role + """ Delete an incident role Delete a specific incident_role by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | IncidentRoleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRoleResponse]: - """Delete an incident role + """ Delete an incident role Delete a specific incident_role by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRoleResponse | None: - """Delete an incident role + """ Delete an incident role Delete a specific incident_role by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/incident_roles/get_incident_role.py b/rootly_sdk/api/incident_roles/get_incident_role.py index 17763838..f4ca4ba8 100644 --- a/rootly_sdk/api/incident_roles/get_incident_role.py +++ b/rootly_sdk/api/incident_roles/get_incident_role.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_role_response import IncidentRoleResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_roles/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_roles/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentRoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleResponse | None: if response.status_code == 200: response_200 = IncidentRoleResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRoleResponse]: - """Retrieves an incident role + """ Retrieves an incident role Retrieves a specific incident_role by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRoleResponse | None: - """Retrieves an incident role + """ Retrieves an incident role Retrieves a specific incident_role by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | IncidentRoleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentRoleResponse]: - """Retrieves an incident role + """ Retrieves an incident role Retrieves a specific incident_role by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentRoleResponse | None: - """Retrieves an incident role + """ Retrieves an incident role Retrieves a specific incident_role by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/incident_roles/list_incident_roles.py b/rootly_sdk/api/incident_roles/list_incident_roles.py index d89b6966..7e056274 100644 --- a/rootly_sdk/api/incident_roles/list_incident_roles.py +++ b/rootly_sdk/api/incident_roles/list_incident_roles.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_role_list import IncidentRoleList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,8 +26,24 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -46,23 +67,53 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[enabled][eq]"] = filterenabledeq + + params["filter[enabled][not_eq]"] = filterenablednot_eq + + params["filter[enabled][in]"] = filterenabledin + + params["filter[enabled][not_in]"] = filterenablednot_in + 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/incident_roles", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentRoleList | None: if response.status_code == 200: response_200 = IncidentRoleList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -93,9 +144,22 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentRoleList]: - """List incident roles + """ List incident roles List incident roles @@ -110,6 +174,18 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): sort (str | Unset): Raises: @@ -118,20 +194,34 @@ def sync_detailed( Returns: Response[IncidentRoleList] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -140,7 +230,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -154,9 +243,22 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentRoleList | None: - """List incident roles + """ List incident roles List incident roles @@ -171,6 +273,18 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): sort (str | Unset): Raises: @@ -179,23 +293,36 @@ def sync( Returns: IncidentRoleList - """ + """ + return sync_detailed( client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -210,9 +337,22 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentRoleList]: - """List incident roles + """ List incident roles List incident roles @@ -227,6 +367,18 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): sort (str | Unset): Raises: @@ -235,27 +387,42 @@ async def asyncio_detailed( Returns: Response[IncidentRoleList] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -269,9 +436,22 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterenabledeq: str | Unset = UNSET, + filterenablednot_eq: str | Unset = UNSET, + filterenabledin: str | Unset = UNSET, + filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentRoleList | None: - """List incident roles + """ List incident roles List incident roles @@ -286,6 +466,18 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterenabledeq (str | Unset): + filterenablednot_eq (str | Unset): + filterenabledin (str | Unset): + filterenablednot_in (str | Unset): sort (str | Unset): Raises: @@ -294,21 +486,33 @@ async def asyncio( Returns: IncidentRoleList - """ - - return ( - await asyncio_detailed( - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterenabledeq=filterenabledeq, +filterenablednot_eq=filterenablednot_eq, +filterenabledin=filterenabledin, +filterenablednot_in=filterenablednot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/incident_roles/update_incident_role.py b/rootly_sdk/api/incident_roles/update_incident_role.py index e9c102f3..06eefbef 100644 --- a/rootly_sdk/api/incident_roles/update_incident_role.py +++ b/rootly_sdk/api/incident_roles/update_incident_role.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_role_response import IncidentRoleResponse from ...models.update_incident_role import UpdateIncidentRole -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateIncidentRole, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_roles/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_roles/{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 | IncidentRoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleResponse | None: if response.status_code == 200: response_200 = IncidentRoleResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentRoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentRole, + ) -> Response[ErrorsList | IncidentRoleResponse]: - """Update an incident role + """ Update an incident role Update a specific incident_role by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, + ) -> ErrorsList | IncidentRoleResponse | None: - """Update an incident role + """ Update an incident role Update a specific incident_role by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentRoleResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, + ) -> Response[ErrorsList | IncidentRoleResponse]: - """Update an incident role + """ Update an incident role Update a specific incident_role by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, + ) -> ErrorsList | IncidentRoleResponse | None: - """Update an incident role + """ Update an incident role Update a specific incident_role by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentRoleResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_status_page_events/__init__.py b/rootly_sdk/api/incident_status_page_events/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_status_page_events/__init__.py +++ b/rootly_sdk/api/incident_status_page_events/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 8372e2da..fd5a8de2 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_status_page_event_response import IncidentStatusPageEventResponse from ...models.new_incident_status_page_event import NewIncidentStatusPageEvent -from ...types import Response +from typing import cast + def _get_kwargs( incident_id: str, *, body: NewIncidentStatusPageEvent, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/status-page-events".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/status-page-events".format(incident_id=quote(str(incident_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 | IncidentStatusPageEventResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentStatusPageEventResponse | None: if response.status_code == 201: response_201 = IncidentStatusPageEventResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentStatusPageEventResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentStatusPageEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentStatusPageEvent, + ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """Creates an incident status page event + """ Creates an incident status page event Creates a new event from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentStatusPageEvent, + ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """Creates an incident status page event + """ Creates an incident status page event Creates a new event from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | IncidentStatusPageEventResponse - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentStatusPageEvent, + ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """Creates an incident status page event + """ Creates an incident status page event Creates a new event from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentStatusPageEvent, + ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """Creates an incident status page event + """ Creates an incident status page event Creates a new event from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +body=body, + + )).parsed 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 8dd1c6e7..268db79f 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_status_page_event_response import IncidentStatusPageEventResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/status-page-events/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/status-page-events/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentStatusPageEventResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentStatusPageEventResponse | None: if response.status_code == 200: response_200 = IncidentStatusPageEventResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentStatusPageEventResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentStatusPageEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """Delete an incident status page event + """ Delete an incident status page event Delete a specific incident status page event by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """Delete an incident status page event + """ Delete an incident status page event Delete a specific incident status page event by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentStatusPageEventResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """Delete an incident status page event + """ Delete an incident status page event Delete a specific incident status page event by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """Delete an incident status page event + """ Delete an incident status page event Delete a specific incident status page event by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentStatusPageEventResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 d7df3eea..f54398af 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_status_page_event_response import IncidentStatusPageEventResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/status-page-events/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/status-page-events/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentStatusPageEventResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentStatusPageEventResponse | None: if response.status_code == 200: response_200 = IncidentStatusPageEventResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentStatusPageEventResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentStatusPageEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """Retrieves an incident status page event + """ Retrieves an incident status page event Retrieves a specific incident_status_page_event by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """Retrieves an incident status page event + """ Retrieves an incident status page event Retrieves a specific incident_status_page_event by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentStatusPageEventResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """Retrieves an incident status page event + """ Retrieves an incident status page event Retrieves a specific incident_status_page_event by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """Retrieves an incident status page event + """ Retrieves an incident status page event Retrieves a specific incident_status_page_event by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentStatusPageEventResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 e247949f..edc058ad 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_status_page_event_list import IncidentStatusPageEventList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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}/status-page-events".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/status-page-events".format(incident_id=quote(str(incident_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> IncidentStatusPageEventList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentStatusPageEventList | None: if response.status_code == 200: response_200 = IncidentStatusPageEventList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentStatusPageEventList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentStatusPageEventList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentStatusPageEventList]: - """List incident status page events + """ List incident status page events List incident status page events @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[IncidentStatusPageEventList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentStatusPageEventList | None: - """List incident status page events + """ List incident status page events List incident status page events @@ -128,16 +139,17 @@ def sync( Returns: IncidentStatusPageEventList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[IncidentStatusPageEventList]: - """List incident status page events + """ List incident status page events List incident status page events @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[IncidentStatusPageEventList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> IncidentStatusPageEventList | None: - """List incident status page events + """ List incident status page events List incident status page events @@ -201,14 +218,14 @@ async def asyncio( Returns: IncidentStatusPageEventList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 acd3ab5f..445606d0 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_status_page_event_response import IncidentStatusPageEventResponse from ...models.update_incident_status_page_event import UpdateIncidentStatusPageEvent -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentStatusPageEvent, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/status-page-events/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/status-page-events/{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 | IncidentStatusPageEventResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentStatusPageEventResponse | None: if response.status_code == 200: response_200 = IncidentStatusPageEventResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentStatusPageEventResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentStatusPageEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentStatusPageEvent, + ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """Update an incident status page event + """ Update an incident status page event Update a specific incident status page event by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentStatusPageEvent, + ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """Update an incident status page event + """ Update an incident status page event Update a specific incident status page event by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentStatusPageEventResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentStatusPageEvent, + ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """Update an incident status page event + """ Update an incident status page event Update a specific incident status page event by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentStatusPageEvent, + ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """Update an incident status page event + """ Update an incident status page event Update a specific incident status page event by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_sub_statuses/__init__.py b/rootly_sdk/api/incident_sub_statuses/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_sub_statuses/__init__.py +++ b/rootly_sdk/api/incident_sub_statuses/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 005343b0..9458a130 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_sub_status_response import IncidentSubStatusResponse from ...models.new_incident_sub_status import NewIncidentSubStatus -from ...types import Response +from typing import cast + def _get_kwargs( incident_id: str, *, body: NewIncidentSubStatus, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/sub_statuses".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/sub_statuses".format(incident_id=quote(str(incident_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 | IncidentSubStatusResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentSubStatusResponse | None: if response.status_code == 201: response_201 = IncidentSubStatusResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentSubStatusResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentSubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentSubStatus, + ) -> Response[ErrorsList | IncidentSubStatusResponse]: - """Creates a sub-status assignment + """ Creates a sub-status assignment Creates a new sub-status assignment from provided data @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentSubStatusResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentSubStatus, + ) -> ErrorsList | IncidentSubStatusResponse | None: - """Creates a sub-status assignment + """ Creates a sub-status assignment Creates a new sub-status assignment from provided data @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentSubStatusResponse - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentSubStatus, + ) -> Response[ErrorsList | IncidentSubStatusResponse]: - """Creates a sub-status assignment + """ Creates a sub-status assignment Creates a new sub-status assignment from provided data @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentSubStatusResponse] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentSubStatus, + ) -> ErrorsList | IncidentSubStatusResponse | None: - """Creates a sub-status assignment + """ Creates a sub-status assignment Creates a new sub-status assignment from provided data @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentSubStatusResponse - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +body=body, + + )).parsed 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 d0ede7b9..2aa71526 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_sub_status_response import IncidentSubStatusResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_sub_statuses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_sub_statuses/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentSubStatusResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentSubStatusResponse | None: if response.status_code == 200: response_200 = IncidentSubStatusResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentSubStatusResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentSubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentSubStatusResponse]: - """Delete an incident_sub_status + """ Delete an incident_sub_status Delete a specific incident_sub_status by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentSubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentSubStatusResponse | None: - """Delete an incident_sub_status + """ Delete an incident_sub_status Delete a specific incident_sub_status by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | IncidentSubStatusResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentSubStatusResponse]: - """Delete an incident_sub_status + """ Delete an incident_sub_status Delete a specific incident_sub_status by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentSubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentSubStatusResponse | None: - """Delete an incident_sub_status + """ Delete an incident_sub_status Delete a specific incident_sub_status by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | IncidentSubStatusResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 8c79545a..a807317d 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,21 +1,30 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.get_incident_sub_status_include import check_get_incident_sub_status_include from ...models.get_incident_sub_status_include import GetIncidentSubStatusInclude from ...models.incident_sub_status_response import IncidentSubStatusResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetIncidentSubStatusInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -25,25 +34,27 @@ def _get_kwargs( params["include"] = json_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/incident_sub_statuses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_sub_statuses/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> IncidentSubStatusResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentSubStatusResponse | None: if response.status_code == 200: response_200 = IncidentSubStatusResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -52,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentSubStatusResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentSubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -68,8 +77,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetIncidentSubStatusInclude | Unset = UNSET, + ) -> Response[IncidentSubStatusResponse]: - """Retrieves incident_sub_status + """ Retrieves incident_sub_status Retrieves a specific incident_sub_status by id @@ -83,11 +93,13 @@ def sync_detailed( Returns: Response[IncidentSubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -96,14 +108,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetIncidentSubStatusInclude | Unset = UNSET, + ) -> IncidentSubStatusResponse | None: - """Retrieves incident_sub_status + """ Retrieves incident_sub_status Retrieves a specific incident_sub_status by id @@ -117,22 +129,24 @@ def sync( Returns: IncidentSubStatusResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetIncidentSubStatusInclude | Unset = UNSET, + ) -> Response[IncidentSubStatusResponse]: - """Retrieves incident_sub_status + """ Retrieves incident_sub_status Retrieves a specific incident_sub_status by id @@ -146,25 +160,29 @@ async def asyncio_detailed( Returns: Response[IncidentSubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetIncidentSubStatusInclude | Unset = UNSET, + ) -> IncidentSubStatusResponse | None: - """Retrieves incident_sub_status + """ Retrieves incident_sub_status Retrieves a specific incident_sub_status by id @@ -178,12 +196,12 @@ async def asyncio( Returns: IncidentSubStatusResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed 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 9baf07e2..69b413ec 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,17 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_sub_status_list import IncidentSubStatusList -from ...models.list_incident_sub_statuses_include import ( - ListIncidentSubStatusesInclude, -) +from ...models.list_incident_sub_statuses_include import check_list_incident_sub_statuses_include +from ...models.list_incident_sub_statuses_include import ListIncidentSubStatusesInclude +from ...models.list_incident_sub_statuses_sort import check_list_incident_sub_statuses_sort from ...models.list_incident_sub_statuses_sort import ListIncidentSubStatusesSort -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -26,7 +30,11 @@ def _get_kwargs( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -56,23 +64,27 @@ def _get_kwargs( params["filter[assigned_at][lte]"] = filterassigned_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/incidents/{incident_id}/sub_statuses".format( - incident_id=quote(str(incident_id), safe=""), - ), + "url": "/v1/incidents/{incident_id}/sub_statuses".format(incident_id=quote(str(incident_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentSubStatusList | None: if response.status_code == 200: response_200 = IncidentSubStatusList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -81,9 +93,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentSubStatusList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentSubStatusList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -105,8 +115,9 @@ def sync_detailed( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, + ) -> Response[IncidentSubStatusList]: - """List incident_sub_statuses + """ List incident_sub_statuses List incident_sub_statuses @@ -128,19 +139,21 @@ def sync_detailed( Returns: Response[IncidentSubStatusList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersub_status_id=filtersub_status_id, - filterassigned_atgt=filterassigned_atgt, - filterassigned_atgte=filterassigned_atgte, - filterassigned_atlt=filterassigned_atlt, - filterassigned_atlte=filterassigned_atlte, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersub_status_id=filtersub_status_id, +filterassigned_atgt=filterassigned_atgt, +filterassigned_atgte=filterassigned_atgte, +filterassigned_atlt=filterassigned_atlt, +filterassigned_atlte=filterassigned_atlte, + ) response = client.get_httpx_client().request( @@ -149,7 +162,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( incident_id: str, *, @@ -163,8 +175,9 @@ def sync( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, + ) -> IncidentSubStatusList | None: - """List incident_sub_statuses + """ List incident_sub_statuses List incident_sub_statuses @@ -186,22 +199,23 @@ def sync( Returns: IncidentSubStatusList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersub_status_id=filtersub_status_id, - filterassigned_atgt=filterassigned_atgt, - filterassigned_atgte=filterassigned_atgte, - filterassigned_atlt=filterassigned_atlt, - filterassigned_atlte=filterassigned_atlte, - ).parsed +client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersub_status_id=filtersub_status_id, +filterassigned_atgt=filterassigned_atgt, +filterassigned_atgte=filterassigned_atgte, +filterassigned_atlt=filterassigned_atlt, +filterassigned_atlte=filterassigned_atlte, + ).parsed async def asyncio_detailed( incident_id: str, @@ -216,8 +230,9 @@ async def asyncio_detailed( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, + ) -> Response[IncidentSubStatusList]: - """List incident_sub_statuses + """ List incident_sub_statuses List incident_sub_statuses @@ -239,26 +254,29 @@ async def asyncio_detailed( Returns: Response[IncidentSubStatusList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersub_status_id=filtersub_status_id, - filterassigned_atgt=filterassigned_atgt, - filterassigned_atgte=filterassigned_atgte, - filterassigned_atlt=filterassigned_atlt, - filterassigned_atlte=filterassigned_atlte, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersub_status_id=filtersub_status_id, +filterassigned_atgt=filterassigned_atgt, +filterassigned_atgte=filterassigned_atgte, +filterassigned_atlt=filterassigned_atlt, +filterassigned_atlte=filterassigned_atlte, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( incident_id: str, *, @@ -272,8 +290,9 @@ async def asyncio( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, + ) -> IncidentSubStatusList | None: - """List incident_sub_statuses + """ List incident_sub_statuses List incident_sub_statuses @@ -295,20 +314,20 @@ async def asyncio( Returns: IncidentSubStatusList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersub_status_id=filtersub_status_id, - filterassigned_atgt=filterassigned_atgt, - filterassigned_atgte=filterassigned_atgte, - filterassigned_atlt=filterassigned_atlt, - filterassigned_atlte=filterassigned_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersub_status_id=filtersub_status_id, +filterassigned_atgt=filterassigned_atgt, +filterassigned_atgte=filterassigned_atgte, +filterassigned_atlt=filterassigned_atlt, +filterassigned_atlte=filterassigned_atlte, + + )).parsed 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 a2e84f7f..07482ab5 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,44 +1,53 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_sub_status_response import IncidentSubStatusResponse from ...models.update_incident_sub_status import UpdateIncidentSubStatus -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateIncidentSubStatus, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_sub_statuses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_sub_statuses/{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 -) -> IncidentSubStatusResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentSubStatusResponse | None: if response.status_code == 200: response_200 = IncidentSubStatusResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -47,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[IncidentSubStatusResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentSubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -63,8 +70,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentSubStatus, + ) -> Response[IncidentSubStatusResponse]: - """Update incident_sub_status + """ Update incident_sub_status Update a specific incident_sub_status by id @@ -78,11 +86,13 @@ def sync_detailed( Returns: Response[IncidentSubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -91,14 +101,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentSubStatus, + ) -> IncidentSubStatusResponse | None: - """Update incident_sub_status + """ Update incident_sub_status Update a specific incident_sub_status by id @@ -112,22 +122,24 @@ def sync( Returns: IncidentSubStatusResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentSubStatus, + ) -> Response[IncidentSubStatusResponse]: - """Update incident_sub_status + """ Update incident_sub_status Update a specific incident_sub_status by id @@ -141,25 +153,29 @@ async def asyncio_detailed( Returns: Response[IncidentSubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentSubStatus, + ) -> IncidentSubStatusResponse | None: - """Update incident_sub_status + """ Update incident_sub_status Update a specific incident_sub_status by id @@ -173,12 +189,12 @@ async def asyncio( Returns: IncidentSubStatusResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incident_types/__init__.py b/rootly_sdk/api/incident_types/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incident_types/__init__.py +++ b/rootly_sdk/api/incident_types/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/incident_types/create_incident_type.py b/rootly_sdk/api/incident_types/create_incident_type.py index d54679eb..067acff1 100644 --- a/rootly_sdk/api/incident_types/create_incident_type.py +++ b/rootly_sdk/api/incident_types/create_incident_type.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_type_response import IncidentTypeResponse from ...models.new_incident_type import NewIncidentType -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewIncidentType, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incident_types", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | IncidentTypeResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentTypeResponse | None: if response.status_code == 201: response_201 = IncidentTypeResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentTypeResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentTypeResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentType, + ) -> Response[ErrorsList | IncidentTypeResponse]: - """Creates an incident type + """ Creates an incident type Creates a new incident_type from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewIncidentType, + ) -> ErrorsList | IncidentTypeResponse | None: - """Creates an incident type + """ Creates an incident type Creates a new incident_type from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | IncidentTypeResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewIncidentType, + ) -> Response[ErrorsList | IncidentTypeResponse]: - """Creates an incident type + """ Creates an incident type Creates a new incident_type from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewIncidentType, + ) -> ErrorsList | IncidentTypeResponse | None: - """Creates an incident type + """ Creates an incident type Creates a new incident_type from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | IncidentTypeResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed 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 index 7a8b50ab..ee3f30e9 100644 --- a/rootly_sdk/api/incident_types/create_incident_type_catalog_property.py +++ b/rootly_sdk/api/incident_types/create_incident_type_catalog_property.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_property import NewCatalogProperty -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCatalogProperty, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incident_types/properties", @@ -24,28 +34,34 @@ def _get_kwargs( _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: + +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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> CatalogPropertyResponse | ErrorsList | None: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -114,20 +131,22 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + 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 c6f0addd..72660f46 100644 --- a/rootly_sdk/api/incident_types/delete_incident_type.py +++ b/rootly_sdk/api/incident_types/delete_incident_type.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_type_response import IncidentTypeResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_types/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_types/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentTypeResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentTypeResponse | None: if response.status_code == 200: response_200 = IncidentTypeResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentTypeResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentTypeResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentTypeResponse]: - """Delete an incident type + """ Delete an incident type Delete a specific incident_type by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentTypeResponse | None: - """Delete an incident type + """ Delete an incident type Delete a specific incident_type by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | IncidentTypeResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentTypeResponse]: - """Delete an incident type + """ Delete an incident type Delete a specific incident_type by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentTypeResponse | None: - """Delete an incident type + """ Delete an incident type Delete a specific incident_type by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | IncidentTypeResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/incident_types/get_incident_type.py b/rootly_sdk/api/incident_types/get_incident_type.py index 598b47e2..0e6fe06c 100644 --- a/rootly_sdk/api/incident_types/get_incident_type.py +++ b/rootly_sdk/api/incident_types/get_incident_type.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_type_response import IncidentTypeResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_types/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_types/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentTypeResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentTypeResponse | None: if response.status_code == 200: response_200 = IncidentTypeResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentTypeResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentTypeResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentTypeResponse]: - """Retrieves an incident type + """ Retrieves an incident type Retrieves a specific incident_type by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentTypeResponse | None: - """Retrieves an incident type + """ Retrieves an incident type Retrieves a specific incident_type by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | IncidentTypeResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentTypeResponse]: - """Retrieves an incident type + """ Retrieves an incident type Retrieves a specific incident_type by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentTypeResponse | None: - """Retrieves an incident type + """ Retrieves an incident type Retrieves a specific incident_type by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | IncidentTypeResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).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 index 322d4536..aa728cab 100644 --- a/rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py +++ b/rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py @@ -1,18 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from ...models.list_incident_type_catalog_properties_include import check_list_incident_type_catalog_properties_include +from ...models.list_incident_type_catalog_properties_include import ListIncidentTypeCatalogPropertiesInclude +from ...models.list_incident_type_catalog_properties_sort import check_list_incident_type_catalog_properties_sort +from ...models.list_incident_type_catalog_properties_sort import ListIncidentTypeCatalogPropertiesSort +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -28,7 +31,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -62,21 +69,27 @@ def _get_kwargs( 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: @@ -108,8 +121,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List IncidentType Catalog Properties @@ -132,20 +146,22 @@ def sync_detailed( 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, +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( @@ -154,7 +170,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -169,8 +184,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List IncidentType Catalog Properties @@ -193,23 +209,24 @@ def sync( 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 +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( *, @@ -225,8 +242,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List IncidentType Catalog Properties @@ -249,27 +267,30 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -284,8 +305,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List IncidentType Catalog Properties @@ -308,21 +330,21 @@ async def asyncio( 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 + """ + + + 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 6dc328d1..60a59ff6 100644 --- a/rootly_sdk/api/incident_types/list_incident_types.py +++ b/rootly_sdk/api/incident_types/list_incident_types.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.incident_type_list import IncidentTypeList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,8 +26,24 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -46,23 +67,53 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[color][eq]"] = filtercoloreq + + params["filter[color][not_eq]"] = filtercolornot_eq + + params["filter[color][in]"] = filtercolorin + + params["filter[color][not_in]"] = filtercolornot_in + 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/incident_types", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentTypeList | None: if response.status_code == 200: response_200 = IncidentTypeList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -93,9 +144,22 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentTypeList]: - """List incident types + """ List incident types List incident types @@ -110,6 +174,18 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -118,20 +194,34 @@ def sync_detailed( Returns: Response[IncidentTypeList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -140,7 +230,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -154,9 +243,22 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentTypeList | None: - """List incident types + """ List incident types List incident types @@ -171,6 +273,18 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -179,23 +293,36 @@ def sync( Returns: IncidentTypeList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -210,9 +337,22 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[IncidentTypeList]: - """List incident types + """ List incident types List incident types @@ -227,6 +367,18 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -235,27 +387,42 @@ async def asyncio_detailed( Returns: Response[IncidentTypeList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -269,9 +436,22 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> IncidentTypeList | None: - """List incident types + """ List incident types List incident types @@ -286,6 +466,18 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -294,21 +486,33 @@ async def asyncio( Returns: IncidentTypeList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/incident_types/update_incident_type.py b/rootly_sdk/api/incident_types/update_incident_type.py index 3df712c1..97338974 100644 --- a/rootly_sdk/api/incident_types/update_incident_type.py +++ b/rootly_sdk/api/incident_types/update_incident_type.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_type_response import IncidentTypeResponse from ...models.update_incident_type import UpdateIncidentType -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateIncidentType, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_types/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incident_types/{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 | IncidentTypeResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentTypeResponse | None: if response.status_code == 200: response_200 = IncidentTypeResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentTypeResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentTypeResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentType, + ) -> Response[ErrorsList | IncidentTypeResponse]: - """Update an incident type + """ Update an incident type Update a specific incident_type by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, + ) -> ErrorsList | IncidentTypeResponse | None: - """Update an incident type + """ Update an incident type Update a specific incident_type by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentTypeResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, + ) -> Response[ErrorsList | IncidentTypeResponse]: - """Update an incident type + """ Update an incident type Update a specific incident_type by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, + ) -> ErrorsList | IncidentTypeResponse | None: - """Update an incident type + """ Update an incident type Update a specific incident_type by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentTypeResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/__init__.py b/rootly_sdk/api/incidents/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/incidents/__init__.py +++ b/rootly_sdk/api/incidents/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/incidents/add_subscribers_to_incident.py b/rootly_sdk/api/incidents/add_subscribers_to_incident.py index d652ab8a..881f5ce1 100644 --- a/rootly_sdk/api/incidents/add_subscribers_to_incident.py +++ b/rootly_sdk/api/incidents/add_subscribers_to_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.add_subscribers import AddSubscribers from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: AddSubscribers, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{id}/add_subscribers".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/add_subscribers".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: AddSubscribers, + ) -> Response[ErrorsList | IncidentResponse]: - """Add subscribers to incident + """ Add subscribers to incident Add subscribers to incident @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, + ) -> ErrorsList | IncidentResponse | None: - """Add subscribers to incident + """ Add subscribers to incident Add subscribers to incident @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, + ) -> Response[ErrorsList | IncidentResponse]: - """Add subscribers to incident + """ Add subscribers to incident Add subscribers to incident @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, + ) -> ErrorsList | IncidentResponse | None: - """Add subscribers to incident + """ Add subscribers to incident Add subscribers to incident @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/assign_user_to_incident.py b/rootly_sdk/api/incidents/assign_user_to_incident.py index 183ed7ec..3eef1012 100644 --- a/rootly_sdk/api/incidents/assign_user_to_incident.py +++ b/rootly_sdk/api/incidents/assign_user_to_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.assign_role_to_user import AssignRoleToUser from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: AssignRoleToUser, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{id}/assign_role_to_user".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/assign_role_to_user".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: AssignRoleToUser, + ) -> Response[ErrorsList | IncidentResponse]: - """Assign user to incident + """ Assign user to incident Assign user to incident @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, + ) -> ErrorsList | IncidentResponse | None: - """Assign user to incident + """ Assign user to incident Assign user to incident @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, + ) -> Response[ErrorsList | IncidentResponse]: - """Assign user to incident + """ Assign user to incident Assign user to incident @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, + ) -> ErrorsList | IncidentResponse | None: - """Assign user to incident + """ Assign user to incident Assign user to incident @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/cancel_incident.py b/rootly_sdk/api/incidents/cancel_incident.py index acdcb056..b8aa2318 100644 --- a/rootly_sdk/api/incidents/cancel_incident.py +++ b/rootly_sdk/api/incidents/cancel_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.cancel_incident import CancelIncident from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: CancelIncident, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/cancel".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/cancel".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: CancelIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Cancel an incident + """ Cancel an incident Cancel a specific incident by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, + ) -> ErrorsList | IncidentResponse | None: - """Cancel an incident + """ Cancel an incident Cancel a specific incident by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Cancel an incident + """ Cancel an incident Cancel a specific incident by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, + ) -> ErrorsList | IncidentResponse | None: - """Cancel an incident + """ Cancel an incident Cancel a specific incident by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/create_incident.py b/rootly_sdk/api/incidents/create_incident.py index 5e580107..65152542 100644 --- a/rootly_sdk/api/incidents/create_incident.py +++ b/rootly_sdk/api/incidents/create_incident.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.new_incident import NewIncident -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewIncident, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incidents", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentResponse | None: if response.status_code == 201: response_201 = IncidentResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Creates an incident + """ Creates an incident Creates a new incident from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewIncident, + ) -> ErrorsList | IncidentResponse | None: - """Creates an incident + """ Creates an incident Creates a new incident from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Creates an incident + """ Creates an incident Creates a new incident from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewIncident, + ) -> ErrorsList | IncidentResponse | None: - """Creates an incident + """ Creates an incident Creates a new incident from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/delete_incident.py b/rootly_sdk/api/incidents/delete_incident.py index 93326984..1597002e 100644 --- a/rootly_sdk/api/incidents/delete_incident.py +++ b/rootly_sdk/api/incidents/delete_incident.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incidents/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentResponse]: - """Delete an incident + """ Delete an incident Delete a specific incident by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentResponse | None: - """Delete an incident + """ Delete an incident Delete a specific incident by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | IncidentResponse]: - """Delete an incident + """ Delete an incident Delete a specific incident by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | IncidentResponse | None: - """Delete an incident + """ Delete an incident Delete a specific incident by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/incidents/detach_from_parent_incident.py b/rootly_sdk/api/incidents/detach_from_parent_incident.py index 97f2e681..581aa70d 100644 --- a/rootly_sdk/api/incidents/detach_from_parent_incident.py +++ b/rootly_sdk/api/incidents/detach_from_parent_incident.py @@ -1,42 +1,53 @@ 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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from ...types import Response +from typing import cast +from uuid import UUID + 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=""), - ), + "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: + +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: @@ -49,9 +60,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[Any | ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +73,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList | IncidentResponse]: - """Detach an incident from its parent + """ Detach an incident from its parent Detach a sub-incident from its parent incident @@ -78,10 +88,12 @@ def sync_detailed( Returns: Response[Any | ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -90,13 +102,13 @@ def sync_detailed( 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 an incident from its parent Detach a sub-incident from its parent incident @@ -109,20 +121,22 @@ def sync( Returns: Any | ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList | IncidentResponse]: - """Detach an incident from its parent + """ Detach an incident from its parent Detach a sub-incident from its parent incident @@ -135,23 +149,27 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 an incident from its parent Detach a sub-incident from its parent incident @@ -164,11 +182,11 @@ async def asyncio( Returns: Any | ErrorsList | IncidentResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + 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 60b93b84..0eb70124 100644 --- a/rootly_sdk/api/incidents/get_incident.py +++ b/rootly_sdk/api/incidents/get_incident.py @@ -1,23 +1,32 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList +from ...models.get_incident_include import check_get_incident_include from ...models.get_incident_include import GetIncidentInclude from ...models.incident_response import IncidentResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, include: GetIncidentInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -27,30 +36,34 @@ def _get_kwargs( params["include"] = json_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/incidents/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -59,9 +72,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +86,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetIncidentInclude | Unset = UNSET, + ) -> Response[ErrorsList | IncidentResponse]: - """Retrieves an incident + """ Retrieves an incident Retrieves a specific incident by id @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetIncidentInclude | Unset = UNSET, + ) -> ErrorsList | IncidentResponse | None: - """Retrieves an incident + """ Retrieves an incident Retrieves a specific incident by id @@ -124,22 +138,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetIncidentInclude | Unset = UNSET, + ) -> Response[ErrorsList | IncidentResponse]: - """Retrieves an incident + """ Retrieves an incident Retrieves a specific incident by id @@ -153,25 +169,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetIncidentInclude | Unset = UNSET, + ) -> ErrorsList | IncidentResponse | None: - """Retrieves an incident + """ Retrieves an incident Retrieves a specific incident by id @@ -185,12 +205,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/incidents/list_incidents.py b/rootly_sdk/api/incidents/list_incidents.py index 7def7400..d6d7e5dd 100644 --- a/rootly_sdk/api/incidents/list_incidents.py +++ b/rootly_sdk/api/incidents/list_incidents.py @@ -1,18 +1,27 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.errors_list import ErrorsList from ...models.incident_list import IncidentList +from ...models.list_incidents_include import check_list_incidents_include from ...models.list_incidents_include import ListIncidentsInclude +from ...models.list_incidents_sort import check_list_incidents_sort from ...models.list_incidents_sort import ListIncidentsSort -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( *, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -40,6 +49,7 @@ def _get_kwargs( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -76,12 +86,114 @@ def _get_kwargs( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} + params["page[after]"] = pageafter + params["page[number]"] = pagenumber params["page[size]"] = pagesize @@ -136,6 +248,8 @@ def _get_kwargs( params["filter[slack_channel_id]"] = filterslack_channel_id + params["filter[sequential_id]"] = filtersequential_id + params["filter[created_at][gt]"] = filtercreated_atgt params["filter[created_at][gte]"] = filtercreated_atgte @@ -208,6 +322,198 @@ def _get_kwargs( params["filter[in_triage_at][lte]"] = filterin_triage_atlte + params["filter[kind][eq]"] = filterkindeq + + params["filter[kind][not_eq]"] = filterkindnot_eq + + params["filter[kind][in]"] = filterkindin + + params["filter[kind][not_in]"] = filterkindnot_in + + params["filter[status][eq]"] = filterstatuseq + + params["filter[status][not_eq]"] = filterstatusnot_eq + + params["filter[status][in]"] = filterstatusin + + params["filter[status][not_in]"] = filterstatusnot_in + + params["filter[private][eq]"] = filterprivateeq + + params["filter[private][not_eq]"] = filterprivatenot_eq + + params["filter[private][in]"] = filterprivatein + + params["filter[private][not_in]"] = filterprivatenot_in + + params["filter[user_id][eq]"] = filteruser_ideq + + params["filter[user_id][not_eq]"] = filteruser_idnot_eq + + params["filter[user_id][in]"] = filteruser_idin + + params["filter[user_id][not_in]"] = filteruser_idnot_in + + params["filter[severity][eq]"] = filterseverityeq + + params["filter[severity][not_eq]"] = filterseveritynot_eq + + params["filter[severity][in]"] = filterseverityin + + params["filter[severity][not_in]"] = filterseveritynot_in + + params["filter[severity_id][eq]"] = filterseverity_ideq + + params["filter[severity_id][not_eq]"] = filterseverity_idnot_eq + + params["filter[severity_id][in]"] = filterseverity_idin + + params["filter[severity_id][not_in]"] = filterseverity_idnot_in + + params["filter[labels][eq]"] = filterlabelseq + + params["filter[labels][not_eq]"] = filterlabelsnot_eq + + params["filter[labels][in]"] = filterlabelsin + + params["filter[labels][not_in]"] = filterlabelsnot_in + + params["filter[zendesk_ticket_id][eq]"] = filterzendesk_ticket_ideq + + params["filter[zendesk_ticket_id][not_eq]"] = filterzendesk_ticket_idnot_eq + + params["filter[zendesk_ticket_id][in]"] = filterzendesk_ticket_idin + + params["filter[zendesk_ticket_id][not_in]"] = filterzendesk_ticket_idnot_in + + params["filter[sequential_id][eq]"] = filtersequential_ideq + + params["filter[sequential_id][not_eq]"] = filtersequential_idnot_eq + + params["filter[sequential_id][in]"] = filtersequential_idin + + params["filter[sequential_id][not_in]"] = filtersequential_idnot_in + + params["filter[types][eq]"] = filtertypeseq + + params["filter[types][not_eq]"] = filtertypesnot_eq + + params["filter[types][in]"] = filtertypesin + + params["filter[types][not_in]"] = filtertypesnot_in + + params["filter[type_ids][eq]"] = filtertype_idseq + + params["filter[type_ids][not_eq]"] = filtertype_idsnot_eq + + params["filter[type_ids][in]"] = filtertype_idsin + + params["filter[type_ids][not_in]"] = filtertype_idsnot_in + + params["filter[environments][eq]"] = filterenvironmentseq + + params["filter[environments][not_eq]"] = filterenvironmentsnot_eq + + params["filter[environments][in]"] = filterenvironmentsin + + params["filter[environments][not_in]"] = filterenvironmentsnot_in + + params["filter[environment_ids][eq]"] = filterenvironment_idseq + + params["filter[environment_ids][not_eq]"] = filterenvironment_idsnot_eq + + params["filter[environment_ids][in]"] = filterenvironment_idsin + + params["filter[environment_ids][not_in]"] = filterenvironment_idsnot_in + + params["filter[services][eq]"] = filterserviceseq + + params["filter[services][not_eq]"] = filterservicesnot_eq + + params["filter[services][in]"] = filterservicesin + + params["filter[services][not_in]"] = filterservicesnot_in + + params["filter[service_ids][eq]"] = filterservice_idseq + + params["filter[service_ids][not_eq]"] = filterservice_idsnot_eq + + params["filter[service_ids][in]"] = filterservice_idsin + + params["filter[service_ids][not_in]"] = filterservice_idsnot_in + + params["filter[service_names][eq]"] = filterservice_nameseq + + params["filter[service_names][not_eq]"] = filterservice_namesnot_eq + + params["filter[service_names][in]"] = filterservice_namesin + + params["filter[service_names][not_in]"] = filterservice_namesnot_in + + params["filter[functionalities][eq]"] = filterfunctionalitieseq + + params["filter[functionalities][not_eq]"] = filterfunctionalitiesnot_eq + + params["filter[functionalities][in]"] = filterfunctionalitiesin + + params["filter[functionalities][not_in]"] = filterfunctionalitiesnot_in + + params["filter[functionality_ids][eq]"] = filterfunctionality_idseq + + params["filter[functionality_ids][not_eq]"] = filterfunctionality_idsnot_eq + + params["filter[functionality_ids][in]"] = filterfunctionality_idsin + + params["filter[functionality_ids][not_in]"] = filterfunctionality_idsnot_in + + params["filter[functionality_names][eq]"] = filterfunctionality_nameseq + + params["filter[functionality_names][not_eq]"] = filterfunctionality_namesnot_eq + + params["filter[functionality_names][in]"] = filterfunctionality_namesin + + params["filter[functionality_names][not_in]"] = filterfunctionality_namesnot_in + + params["filter[causes][eq]"] = filtercauseseq + + params["filter[causes][not_eq]"] = filtercausesnot_eq + + params["filter[causes][in]"] = filtercausesin + + params["filter[causes][not_in]"] = filtercausesnot_in + + params["filter[cause_ids][eq]"] = filtercause_idseq + + params["filter[cause_ids][not_eq]"] = filtercause_idsnot_eq + + params["filter[cause_ids][in]"] = filtercause_idsin + + params["filter[cause_ids][not_in]"] = filtercause_idsnot_in + + params["filter[teams][eq]"] = filterteamseq + + params["filter[teams][not_eq]"] = filterteamsnot_eq + + params["filter[teams][in]"] = filterteamsin + + params["filter[teams][not_in]"] = filterteamsnot_in + + params["filter[team_ids][eq]"] = filterteam_idseq + + params["filter[team_ids][not_eq]"] = filterteam_idsnot_eq + + params["filter[team_ids][in]"] = filterteam_idsin + + params["filter[team_ids][not_in]"] = filterteam_idsnot_in + + params["filter[team_names][eq]"] = filterteam_nameseq + + params["filter[team_names][not_eq]"] = filterteam_namesnot_eq + + params["filter[team_names][in]"] = filterteam_namesin + + params["filter[team_names][not_in]"] = filterteam_namesnot_in + json_sort: str | Unset = UNSET if not isinstance(sort, Unset): json_sort = sort @@ -220,30 +526,43 @@ def _get_kwargs( params["include"] = json_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/incidents", "params": params, } + return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentList | None: if response.status_code == 200: response_200 = IncidentList.from_dict(response.json()) + + return response_200 + if response.status_code == 400: + response_400 = ErrorsList.from_dict(response.json()) + + + + return response_400 + 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[IncidentList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -255,6 +574,7 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -282,6 +602,7 @@ def sync_detailed( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -318,14 +639,112 @@ def sync_detailed( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, -) -> Response[IncidentList]: - """List incidents + +) -> Response[ErrorsList | IncidentList]: + """ List incidents List incidents Args: + pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): filtersearch (str | Unset): @@ -353,6 +772,7 @@ def sync_detailed( filtercause_ids (str | Unset): filtercustom_field_selected_option_ids (str | Unset): filterslack_channel_id (str | Unset): + filtersequential_id (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): @@ -389,6 +809,102 @@ def sync_detailed( filterin_triage_atgte (str | Unset): filterin_triage_atlt (str | Unset): filterin_triage_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterprivateeq (str | Unset): + filterprivatenot_eq (str | Unset): + filterprivatein (str | Unset): + filterprivatenot_in (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filterseverity_ideq (str | Unset): + filterseverity_idnot_eq (str | Unset): + filterseverity_idin (str | Unset): + filterseverity_idnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterzendesk_ticket_ideq (str | Unset): + filterzendesk_ticket_idnot_eq (str | Unset): + filterzendesk_ticket_idin (str | Unset): + filterzendesk_ticket_idnot_in (str | Unset): + filtersequential_ideq (str | Unset): + filtersequential_idnot_eq (str | Unset): + filtersequential_idin (str | Unset): + filtersequential_idnot_in (str | Unset): + filtertypeseq (str | Unset): + filtertypesnot_eq (str | Unset): + filtertypesin (str | Unset): + filtertypesnot_in (str | Unset): + filtertype_idseq (str | Unset): + filtertype_idsnot_eq (str | Unset): + filtertype_idsin (str | Unset): + filtertype_idsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterenvironment_idseq (str | Unset): + filterenvironment_idsnot_eq (str | Unset): + filterenvironment_idsin (str | Unset): + filterenvironment_idsnot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterservice_idseq (str | Unset): + filterservice_idsnot_eq (str | Unset): + filterservice_idsin (str | Unset): + filterservice_idsnot_in (str | Unset): + filterservice_nameseq (str | Unset): + filterservice_namesnot_eq (str | Unset): + filterservice_namesin (str | Unset): + filterservice_namesnot_in (str | Unset): + filterfunctionalitieseq (str | Unset): + filterfunctionalitiesnot_eq (str | Unset): + filterfunctionalitiesin (str | Unset): + filterfunctionalitiesnot_in (str | Unset): + filterfunctionality_idseq (str | Unset): + filterfunctionality_idsnot_eq (str | Unset): + filterfunctionality_idsin (str | Unset): + filterfunctionality_idsnot_in (str | Unset): + filterfunctionality_nameseq (str | Unset): + filterfunctionality_namesnot_eq (str | Unset): + filterfunctionality_namesin (str | Unset): + filterfunctionality_namesnot_in (str | Unset): + filtercauseseq (str | Unset): + filtercausesnot_eq (str | Unset): + filtercausesin (str | Unset): + filtercausesnot_in (str | Unset): + filtercause_idseq (str | Unset): + filtercause_idsnot_eq (str | Unset): + filtercause_idsin (str | Unset): + filtercause_idsnot_in (str | Unset): + filterteamseq (str | Unset): + filterteamsnot_eq (str | Unset): + filterteamsin (str | Unset): + filterteamsnot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): + filterteam_nameseq (str | Unset): + filterteam_namesnot_eq (str | Unset): + filterteam_namesin (str | Unset): + filterteam_namesnot_in (str | Unset): sort (ListIncidentsSort | Unset): include (ListIncidentsInclude | Unset): @@ -397,75 +913,175 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[IncidentList] - """ + Response[ErrorsList | IncidentList] + """ + kwargs = _get_kwargs( - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterkind=filterkind, - filterstatus=filterstatus, - filterprivate=filterprivate, - filteruser_id=filteruser_id, - filterseverity=filterseverity, - filterseverity_id=filterseverity_id, - filterlabels=filterlabels, - filtertypes=filtertypes, - filtertype_ids=filtertype_ids, - filterenvironments=filterenvironments, - filterenvironment_ids=filterenvironment_ids, - filterfunctionalities=filterfunctionalities, - filterfunctionality_ids=filterfunctionality_ids, - filterfunctionality_names=filterfunctionality_names, - filterservices=filterservices, - filterservice_ids=filterservice_ids, - filterservice_names=filterservice_names, - filterteams=filterteams, - filterteam_ids=filterteam_ids, - filterteam_names=filterteam_names, - 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, - filtercreated_atlte=filtercreated_atlte, - filterupdated_atgt=filterupdated_atgt, - filterupdated_atgte=filterupdated_atgte, - filterupdated_atlt=filterupdated_atlt, - filterupdated_atlte=filterupdated_atlte, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterdetected_atgt=filterdetected_atgt, - filterdetected_atgte=filterdetected_atgte, - filterdetected_atlt=filterdetected_atlt, - filterdetected_atlte=filterdetected_atlte, - filteracknowledged_atgt=filteracknowledged_atgt, - filteracknowledged_atgte=filteracknowledged_atgte, - filteracknowledged_atlt=filteracknowledged_atlt, - filteracknowledged_atlte=filteracknowledged_atlte, - filtermitigated_atgt=filtermitigated_atgt, - filtermitigated_atgte=filtermitigated_atgte, - filtermitigated_atlt=filtermitigated_atlt, - filtermitigated_atlte=filtermitigated_atlte, - filterresolved_atgt=filterresolved_atgt, - filterresolved_atgte=filterresolved_atgte, - filterresolved_atlt=filterresolved_atlt, - filterresolved_atlte=filterresolved_atlte, - filterclosed_atgt=filterclosed_atgt, - filterclosed_atgte=filterclosed_atgte, - filterclosed_atlt=filterclosed_atlt, - filterclosed_atlte=filterclosed_atlte, - filterin_triage_atgt=filterin_triage_atgt, - filterin_triage_atgte=filterin_triage_atgte, - filterin_triage_atlt=filterin_triage_atlt, - filterin_triage_atlte=filterin_triage_atlte, - sort=sort, - include=include, + pageafter=pageafter, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterkind=filterkind, +filterstatus=filterstatus, +filterprivate=filterprivate, +filteruser_id=filteruser_id, +filterseverity=filterseverity, +filterseverity_id=filterseverity_id, +filterlabels=filterlabels, +filtertypes=filtertypes, +filtertype_ids=filtertype_ids, +filterenvironments=filterenvironments, +filterenvironment_ids=filterenvironment_ids, +filterfunctionalities=filterfunctionalities, +filterfunctionality_ids=filterfunctionality_ids, +filterfunctionality_names=filterfunctionality_names, +filterservices=filterservices, +filterservice_ids=filterservice_ids, +filterservice_names=filterservice_names, +filterteams=filterteams, +filterteam_ids=filterteam_ids, +filterteam_names=filterteam_names, +filtercause=filtercause, +filtercause_ids=filtercause_ids, +filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, +filterslack_channel_id=filterslack_channel_id, +filtersequential_id=filtersequential_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterupdated_atgt=filterupdated_atgt, +filterupdated_atgte=filterupdated_atgte, +filterupdated_atlt=filterupdated_atlt, +filterupdated_atlte=filterupdated_atlte, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterdetected_atgt=filterdetected_atgt, +filterdetected_atgte=filterdetected_atgte, +filterdetected_atlt=filterdetected_atlt, +filterdetected_atlte=filterdetected_atlte, +filteracknowledged_atgt=filteracknowledged_atgt, +filteracknowledged_atgte=filteracknowledged_atgte, +filteracknowledged_atlt=filteracknowledged_atlt, +filteracknowledged_atlte=filteracknowledged_atlte, +filtermitigated_atgt=filtermitigated_atgt, +filtermitigated_atgte=filtermitigated_atgte, +filtermitigated_atlt=filtermitigated_atlt, +filtermitigated_atlte=filtermitigated_atlte, +filterresolved_atgt=filterresolved_atgt, +filterresolved_atgte=filterresolved_atgte, +filterresolved_atlt=filterresolved_atlt, +filterresolved_atlte=filterresolved_atlte, +filterclosed_atgt=filterclosed_atgt, +filterclosed_atgte=filterclosed_atgte, +filterclosed_atlt=filterclosed_atlt, +filterclosed_atlte=filterclosed_atlte, +filterin_triage_atgt=filterin_triage_atgt, +filterin_triage_atgte=filterin_triage_atgte, +filterin_triage_atlt=filterin_triage_atlt, +filterin_triage_atlte=filterin_triage_atlte, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filterprivateeq=filterprivateeq, +filterprivatenot_eq=filterprivatenot_eq, +filterprivatein=filterprivatein, +filterprivatenot_in=filterprivatenot_in, +filteruser_ideq=filteruser_ideq, +filteruser_idnot_eq=filteruser_idnot_eq, +filteruser_idin=filteruser_idin, +filteruser_idnot_in=filteruser_idnot_in, +filterseverityeq=filterseverityeq, +filterseveritynot_eq=filterseveritynot_eq, +filterseverityin=filterseverityin, +filterseveritynot_in=filterseveritynot_in, +filterseverity_ideq=filterseverity_ideq, +filterseverity_idnot_eq=filterseverity_idnot_eq, +filterseverity_idin=filterseverity_idin, +filterseverity_idnot_in=filterseverity_idnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, +filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, +filterzendesk_ticket_idin=filterzendesk_ticket_idin, +filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, +filtersequential_ideq=filtersequential_ideq, +filtersequential_idnot_eq=filtersequential_idnot_eq, +filtersequential_idin=filtersequential_idin, +filtersequential_idnot_in=filtersequential_idnot_in, +filtertypeseq=filtertypeseq, +filtertypesnot_eq=filtertypesnot_eq, +filtertypesin=filtertypesin, +filtertypesnot_in=filtertypesnot_in, +filtertype_idseq=filtertype_idseq, +filtertype_idsnot_eq=filtertype_idsnot_eq, +filtertype_idsin=filtertype_idsin, +filtertype_idsnot_in=filtertype_idsnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterenvironment_idseq=filterenvironment_idseq, +filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, +filterenvironment_idsin=filterenvironment_idsin, +filterenvironment_idsnot_in=filterenvironment_idsnot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filterservice_idseq=filterservice_idseq, +filterservice_idsnot_eq=filterservice_idsnot_eq, +filterservice_idsin=filterservice_idsin, +filterservice_idsnot_in=filterservice_idsnot_in, +filterservice_nameseq=filterservice_nameseq, +filterservice_namesnot_eq=filterservice_namesnot_eq, +filterservice_namesin=filterservice_namesin, +filterservice_namesnot_in=filterservice_namesnot_in, +filterfunctionalitieseq=filterfunctionalitieseq, +filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, +filterfunctionalitiesin=filterfunctionalitiesin, +filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, +filterfunctionality_idseq=filterfunctionality_idseq, +filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, +filterfunctionality_idsin=filterfunctionality_idsin, +filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, +filterfunctionality_nameseq=filterfunctionality_nameseq, +filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, +filterfunctionality_namesin=filterfunctionality_namesin, +filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, +filtercauseseq=filtercauseseq, +filtercausesnot_eq=filtercausesnot_eq, +filtercausesin=filtercausesin, +filtercausesnot_in=filtercausesnot_in, +filtercause_idseq=filtercause_idseq, +filtercause_idsnot_eq=filtercause_idsnot_eq, +filtercause_idsin=filtercause_idsin, +filtercause_idsnot_in=filtercause_idsnot_in, +filterteamseq=filterteamseq, +filterteamsnot_eq=filterteamsnot_eq, +filterteamsin=filterteamsin, +filterteamsnot_in=filterteamsnot_in, +filterteam_idseq=filterteam_idseq, +filterteam_idsnot_eq=filterteam_idsnot_eq, +filterteam_idsin=filterteam_idsin, +filterteam_idsnot_in=filterteam_idsnot_in, +filterteam_nameseq=filterteam_nameseq, +filterteam_namesnot_eq=filterteam_namesnot_eq, +filterteam_namesin=filterteam_namesin, +filterteam_namesnot_in=filterteam_namesnot_in, +sort=sort, +include=include, + ) response = client.get_httpx_client().request( @@ -474,10 +1090,10 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -505,6 +1121,7 @@ def sync( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -541,14 +1158,112 @@ def sync( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, -) -> IncidentList | None: - """List incidents + +) -> ErrorsList | IncidentList | None: + """ List incidents List incidents Args: + pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): filtersearch (str | Unset): @@ -576,6 +1291,7 @@ def sync( filtercause_ids (str | Unset): filtercustom_field_selected_option_ids (str | Unset): filterslack_channel_id (str | Unset): + filtersequential_id (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): @@ -612,6 +1328,102 @@ def sync( filterin_triage_atgte (str | Unset): filterin_triage_atlt (str | Unset): filterin_triage_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterprivateeq (str | Unset): + filterprivatenot_eq (str | Unset): + filterprivatein (str | Unset): + filterprivatenot_in (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filterseverity_ideq (str | Unset): + filterseverity_idnot_eq (str | Unset): + filterseverity_idin (str | Unset): + filterseverity_idnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterzendesk_ticket_ideq (str | Unset): + filterzendesk_ticket_idnot_eq (str | Unset): + filterzendesk_ticket_idin (str | Unset): + filterzendesk_ticket_idnot_in (str | Unset): + filtersequential_ideq (str | Unset): + filtersequential_idnot_eq (str | Unset): + filtersequential_idin (str | Unset): + filtersequential_idnot_in (str | Unset): + filtertypeseq (str | Unset): + filtertypesnot_eq (str | Unset): + filtertypesin (str | Unset): + filtertypesnot_in (str | Unset): + filtertype_idseq (str | Unset): + filtertype_idsnot_eq (str | Unset): + filtertype_idsin (str | Unset): + filtertype_idsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterenvironment_idseq (str | Unset): + filterenvironment_idsnot_eq (str | Unset): + filterenvironment_idsin (str | Unset): + filterenvironment_idsnot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterservice_idseq (str | Unset): + filterservice_idsnot_eq (str | Unset): + filterservice_idsin (str | Unset): + filterservice_idsnot_in (str | Unset): + filterservice_nameseq (str | Unset): + filterservice_namesnot_eq (str | Unset): + filterservice_namesin (str | Unset): + filterservice_namesnot_in (str | Unset): + filterfunctionalitieseq (str | Unset): + filterfunctionalitiesnot_eq (str | Unset): + filterfunctionalitiesin (str | Unset): + filterfunctionalitiesnot_in (str | Unset): + filterfunctionality_idseq (str | Unset): + filterfunctionality_idsnot_eq (str | Unset): + filterfunctionality_idsin (str | Unset): + filterfunctionality_idsnot_in (str | Unset): + filterfunctionality_nameseq (str | Unset): + filterfunctionality_namesnot_eq (str | Unset): + filterfunctionality_namesin (str | Unset): + filterfunctionality_namesnot_in (str | Unset): + filtercauseseq (str | Unset): + filtercausesnot_eq (str | Unset): + filtercausesin (str | Unset): + filtercausesnot_in (str | Unset): + filtercause_idseq (str | Unset): + filtercause_idsnot_eq (str | Unset): + filtercause_idsin (str | Unset): + filtercause_idsnot_in (str | Unset): + filterteamseq (str | Unset): + filterteamsnot_eq (str | Unset): + filterteamsin (str | Unset): + filterteamsnot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): + filterteam_nameseq (str | Unset): + filterteam_namesnot_eq (str | Unset): + filterteam_namesin (str | Unset): + filterteam_namesnot_in (str | Unset): sort (ListIncidentsSort | Unset): include (ListIncidentsInclude | Unset): @@ -620,82 +1432,182 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - IncidentList - """ + ErrorsList | IncidentList + """ + return sync_detailed( client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterkind=filterkind, - filterstatus=filterstatus, - filterprivate=filterprivate, - filteruser_id=filteruser_id, - filterseverity=filterseverity, - filterseverity_id=filterseverity_id, - filterlabels=filterlabels, - filtertypes=filtertypes, - filtertype_ids=filtertype_ids, - filterenvironments=filterenvironments, - filterenvironment_ids=filterenvironment_ids, - filterfunctionalities=filterfunctionalities, - filterfunctionality_ids=filterfunctionality_ids, - filterfunctionality_names=filterfunctionality_names, - filterservices=filterservices, - filterservice_ids=filterservice_ids, - filterservice_names=filterservice_names, - filterteams=filterteams, - filterteam_ids=filterteam_ids, - filterteam_names=filterteam_names, - 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, - filtercreated_atlte=filtercreated_atlte, - filterupdated_atgt=filterupdated_atgt, - filterupdated_atgte=filterupdated_atgte, - filterupdated_atlt=filterupdated_atlt, - filterupdated_atlte=filterupdated_atlte, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterdetected_atgt=filterdetected_atgt, - filterdetected_atgte=filterdetected_atgte, - filterdetected_atlt=filterdetected_atlt, - filterdetected_atlte=filterdetected_atlte, - filteracknowledged_atgt=filteracknowledged_atgt, - filteracknowledged_atgte=filteracknowledged_atgte, - filteracknowledged_atlt=filteracknowledged_atlt, - filteracknowledged_atlte=filteracknowledged_atlte, - filtermitigated_atgt=filtermitigated_atgt, - filtermitigated_atgte=filtermitigated_atgte, - filtermitigated_atlt=filtermitigated_atlt, - filtermitigated_atlte=filtermitigated_atlte, - filterresolved_atgt=filterresolved_atgt, - filterresolved_atgte=filterresolved_atgte, - filterresolved_atlt=filterresolved_atlt, - filterresolved_atlte=filterresolved_atlte, - filterclosed_atgt=filterclosed_atgt, - filterclosed_atgte=filterclosed_atgte, - filterclosed_atlt=filterclosed_atlt, - filterclosed_atlte=filterclosed_atlte, - filterin_triage_atgt=filterin_triage_atgt, - filterin_triage_atgte=filterin_triage_atgte, - filterin_triage_atlt=filterin_triage_atlt, - filterin_triage_atlte=filterin_triage_atlte, - sort=sort, - include=include, - ).parsed +pageafter=pageafter, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterkind=filterkind, +filterstatus=filterstatus, +filterprivate=filterprivate, +filteruser_id=filteruser_id, +filterseverity=filterseverity, +filterseverity_id=filterseverity_id, +filterlabels=filterlabels, +filtertypes=filtertypes, +filtertype_ids=filtertype_ids, +filterenvironments=filterenvironments, +filterenvironment_ids=filterenvironment_ids, +filterfunctionalities=filterfunctionalities, +filterfunctionality_ids=filterfunctionality_ids, +filterfunctionality_names=filterfunctionality_names, +filterservices=filterservices, +filterservice_ids=filterservice_ids, +filterservice_names=filterservice_names, +filterteams=filterteams, +filterteam_ids=filterteam_ids, +filterteam_names=filterteam_names, +filtercause=filtercause, +filtercause_ids=filtercause_ids, +filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, +filterslack_channel_id=filterslack_channel_id, +filtersequential_id=filtersequential_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterupdated_atgt=filterupdated_atgt, +filterupdated_atgte=filterupdated_atgte, +filterupdated_atlt=filterupdated_atlt, +filterupdated_atlte=filterupdated_atlte, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterdetected_atgt=filterdetected_atgt, +filterdetected_atgte=filterdetected_atgte, +filterdetected_atlt=filterdetected_atlt, +filterdetected_atlte=filterdetected_atlte, +filteracknowledged_atgt=filteracknowledged_atgt, +filteracknowledged_atgte=filteracknowledged_atgte, +filteracknowledged_atlt=filteracknowledged_atlt, +filteracknowledged_atlte=filteracknowledged_atlte, +filtermitigated_atgt=filtermitigated_atgt, +filtermitigated_atgte=filtermitigated_atgte, +filtermitigated_atlt=filtermitigated_atlt, +filtermitigated_atlte=filtermitigated_atlte, +filterresolved_atgt=filterresolved_atgt, +filterresolved_atgte=filterresolved_atgte, +filterresolved_atlt=filterresolved_atlt, +filterresolved_atlte=filterresolved_atlte, +filterclosed_atgt=filterclosed_atgt, +filterclosed_atgte=filterclosed_atgte, +filterclosed_atlt=filterclosed_atlt, +filterclosed_atlte=filterclosed_atlte, +filterin_triage_atgt=filterin_triage_atgt, +filterin_triage_atgte=filterin_triage_atgte, +filterin_triage_atlt=filterin_triage_atlt, +filterin_triage_atlte=filterin_triage_atlte, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filterprivateeq=filterprivateeq, +filterprivatenot_eq=filterprivatenot_eq, +filterprivatein=filterprivatein, +filterprivatenot_in=filterprivatenot_in, +filteruser_ideq=filteruser_ideq, +filteruser_idnot_eq=filteruser_idnot_eq, +filteruser_idin=filteruser_idin, +filteruser_idnot_in=filteruser_idnot_in, +filterseverityeq=filterseverityeq, +filterseveritynot_eq=filterseveritynot_eq, +filterseverityin=filterseverityin, +filterseveritynot_in=filterseveritynot_in, +filterseverity_ideq=filterseverity_ideq, +filterseverity_idnot_eq=filterseverity_idnot_eq, +filterseverity_idin=filterseverity_idin, +filterseverity_idnot_in=filterseverity_idnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, +filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, +filterzendesk_ticket_idin=filterzendesk_ticket_idin, +filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, +filtersequential_ideq=filtersequential_ideq, +filtersequential_idnot_eq=filtersequential_idnot_eq, +filtersequential_idin=filtersequential_idin, +filtersequential_idnot_in=filtersequential_idnot_in, +filtertypeseq=filtertypeseq, +filtertypesnot_eq=filtertypesnot_eq, +filtertypesin=filtertypesin, +filtertypesnot_in=filtertypesnot_in, +filtertype_idseq=filtertype_idseq, +filtertype_idsnot_eq=filtertype_idsnot_eq, +filtertype_idsin=filtertype_idsin, +filtertype_idsnot_in=filtertype_idsnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterenvironment_idseq=filterenvironment_idseq, +filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, +filterenvironment_idsin=filterenvironment_idsin, +filterenvironment_idsnot_in=filterenvironment_idsnot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filterservice_idseq=filterservice_idseq, +filterservice_idsnot_eq=filterservice_idsnot_eq, +filterservice_idsin=filterservice_idsin, +filterservice_idsnot_in=filterservice_idsnot_in, +filterservice_nameseq=filterservice_nameseq, +filterservice_namesnot_eq=filterservice_namesnot_eq, +filterservice_namesin=filterservice_namesin, +filterservice_namesnot_in=filterservice_namesnot_in, +filterfunctionalitieseq=filterfunctionalitieseq, +filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, +filterfunctionalitiesin=filterfunctionalitiesin, +filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, +filterfunctionality_idseq=filterfunctionality_idseq, +filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, +filterfunctionality_idsin=filterfunctionality_idsin, +filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, +filterfunctionality_nameseq=filterfunctionality_nameseq, +filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, +filterfunctionality_namesin=filterfunctionality_namesin, +filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, +filtercauseseq=filtercauseseq, +filtercausesnot_eq=filtercausesnot_eq, +filtercausesin=filtercausesin, +filtercausesnot_in=filtercausesnot_in, +filtercause_idseq=filtercause_idseq, +filtercause_idsnot_eq=filtercause_idsnot_eq, +filtercause_idsin=filtercause_idsin, +filtercause_idsnot_in=filtercause_idsnot_in, +filterteamseq=filterteamseq, +filterteamsnot_eq=filterteamsnot_eq, +filterteamsin=filterteamsin, +filterteamsnot_in=filterteamsnot_in, +filterteam_idseq=filterteam_idseq, +filterteam_idsnot_eq=filterteam_idsnot_eq, +filterteam_idsin=filterteam_idsin, +filterteam_idsnot_in=filterteam_idsnot_in, +filterteam_nameseq=filterteam_nameseq, +filterteam_namesnot_eq=filterteam_namesnot_eq, +filterteam_namesin=filterteam_namesin, +filterteam_namesnot_in=filterteam_namesnot_in, +sort=sort, +include=include, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -723,6 +1635,7 @@ async def asyncio_detailed( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -759,14 +1672,112 @@ async def asyncio_detailed( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, -) -> Response[IncidentList]: - """List incidents + +) -> Response[ErrorsList | IncidentList]: + """ List incidents List incidents Args: + pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): filtersearch (str | Unset): @@ -794,6 +1805,7 @@ async def asyncio_detailed( filtercause_ids (str | Unset): filtercustom_field_selected_option_ids (str | Unset): filterslack_channel_id (str | Unset): + filtersequential_id (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): @@ -830,6 +1842,102 @@ async def asyncio_detailed( filterin_triage_atgte (str | Unset): filterin_triage_atlt (str | Unset): filterin_triage_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterprivateeq (str | Unset): + filterprivatenot_eq (str | Unset): + filterprivatein (str | Unset): + filterprivatenot_in (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filterseverity_ideq (str | Unset): + filterseverity_idnot_eq (str | Unset): + filterseverity_idin (str | Unset): + filterseverity_idnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterzendesk_ticket_ideq (str | Unset): + filterzendesk_ticket_idnot_eq (str | Unset): + filterzendesk_ticket_idin (str | Unset): + filterzendesk_ticket_idnot_in (str | Unset): + filtersequential_ideq (str | Unset): + filtersequential_idnot_eq (str | Unset): + filtersequential_idin (str | Unset): + filtersequential_idnot_in (str | Unset): + filtertypeseq (str | Unset): + filtertypesnot_eq (str | Unset): + filtertypesin (str | Unset): + filtertypesnot_in (str | Unset): + filtertype_idseq (str | Unset): + filtertype_idsnot_eq (str | Unset): + filtertype_idsin (str | Unset): + filtertype_idsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterenvironment_idseq (str | Unset): + filterenvironment_idsnot_eq (str | Unset): + filterenvironment_idsin (str | Unset): + filterenvironment_idsnot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterservice_idseq (str | Unset): + filterservice_idsnot_eq (str | Unset): + filterservice_idsin (str | Unset): + filterservice_idsnot_in (str | Unset): + filterservice_nameseq (str | Unset): + filterservice_namesnot_eq (str | Unset): + filterservice_namesin (str | Unset): + filterservice_namesnot_in (str | Unset): + filterfunctionalitieseq (str | Unset): + filterfunctionalitiesnot_eq (str | Unset): + filterfunctionalitiesin (str | Unset): + filterfunctionalitiesnot_in (str | Unset): + filterfunctionality_idseq (str | Unset): + filterfunctionality_idsnot_eq (str | Unset): + filterfunctionality_idsin (str | Unset): + filterfunctionality_idsnot_in (str | Unset): + filterfunctionality_nameseq (str | Unset): + filterfunctionality_namesnot_eq (str | Unset): + filterfunctionality_namesin (str | Unset): + filterfunctionality_namesnot_in (str | Unset): + filtercauseseq (str | Unset): + filtercausesnot_eq (str | Unset): + filtercausesin (str | Unset): + filtercausesnot_in (str | Unset): + filtercause_idseq (str | Unset): + filtercause_idsnot_eq (str | Unset): + filtercause_idsin (str | Unset): + filtercause_idsnot_in (str | Unset): + filterteamseq (str | Unset): + filterteamsnot_eq (str | Unset): + filterteamsin (str | Unset): + filterteamsnot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): + filterteam_nameseq (str | Unset): + filterteam_namesnot_eq (str | Unset): + filterteam_namesin (str | Unset): + filterteam_namesnot_in (str | Unset): sort (ListIncidentsSort | Unset): include (ListIncidentsInclude | Unset): @@ -838,85 +1946,187 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[IncidentList] - """ + Response[ErrorsList | IncidentList] + """ + kwargs = _get_kwargs( - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterkind=filterkind, - filterstatus=filterstatus, - filterprivate=filterprivate, - filteruser_id=filteruser_id, - filterseverity=filterseverity, - filterseverity_id=filterseverity_id, - filterlabels=filterlabels, - filtertypes=filtertypes, - filtertype_ids=filtertype_ids, - filterenvironments=filterenvironments, - filterenvironment_ids=filterenvironment_ids, - filterfunctionalities=filterfunctionalities, - filterfunctionality_ids=filterfunctionality_ids, - filterfunctionality_names=filterfunctionality_names, - filterservices=filterservices, - filterservice_ids=filterservice_ids, - filterservice_names=filterservice_names, - filterteams=filterteams, - filterteam_ids=filterteam_ids, - filterteam_names=filterteam_names, - 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, - filtercreated_atlte=filtercreated_atlte, - filterupdated_atgt=filterupdated_atgt, - filterupdated_atgte=filterupdated_atgte, - filterupdated_atlt=filterupdated_atlt, - filterupdated_atlte=filterupdated_atlte, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterdetected_atgt=filterdetected_atgt, - filterdetected_atgte=filterdetected_atgte, - filterdetected_atlt=filterdetected_atlt, - filterdetected_atlte=filterdetected_atlte, - filteracknowledged_atgt=filteracknowledged_atgt, - filteracknowledged_atgte=filteracknowledged_atgte, - filteracknowledged_atlt=filteracknowledged_atlt, - filteracknowledged_atlte=filteracknowledged_atlte, - filtermitigated_atgt=filtermitigated_atgt, - filtermitigated_atgte=filtermitigated_atgte, - filtermitigated_atlt=filtermitigated_atlt, - filtermitigated_atlte=filtermitigated_atlte, - filterresolved_atgt=filterresolved_atgt, - filterresolved_atgte=filterresolved_atgte, - filterresolved_atlt=filterresolved_atlt, - filterresolved_atlte=filterresolved_atlte, - filterclosed_atgt=filterclosed_atgt, - filterclosed_atgte=filterclosed_atgte, - filterclosed_atlt=filterclosed_atlt, - filterclosed_atlte=filterclosed_atlte, - filterin_triage_atgt=filterin_triage_atgt, - filterin_triage_atgte=filterin_triage_atgte, - filterin_triage_atlt=filterin_triage_atlt, - filterin_triage_atlte=filterin_triage_atlte, - sort=sort, - include=include, + pageafter=pageafter, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterkind=filterkind, +filterstatus=filterstatus, +filterprivate=filterprivate, +filteruser_id=filteruser_id, +filterseverity=filterseverity, +filterseverity_id=filterseverity_id, +filterlabels=filterlabels, +filtertypes=filtertypes, +filtertype_ids=filtertype_ids, +filterenvironments=filterenvironments, +filterenvironment_ids=filterenvironment_ids, +filterfunctionalities=filterfunctionalities, +filterfunctionality_ids=filterfunctionality_ids, +filterfunctionality_names=filterfunctionality_names, +filterservices=filterservices, +filterservice_ids=filterservice_ids, +filterservice_names=filterservice_names, +filterteams=filterteams, +filterteam_ids=filterteam_ids, +filterteam_names=filterteam_names, +filtercause=filtercause, +filtercause_ids=filtercause_ids, +filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, +filterslack_channel_id=filterslack_channel_id, +filtersequential_id=filtersequential_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterupdated_atgt=filterupdated_atgt, +filterupdated_atgte=filterupdated_atgte, +filterupdated_atlt=filterupdated_atlt, +filterupdated_atlte=filterupdated_atlte, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterdetected_atgt=filterdetected_atgt, +filterdetected_atgte=filterdetected_atgte, +filterdetected_atlt=filterdetected_atlt, +filterdetected_atlte=filterdetected_atlte, +filteracknowledged_atgt=filteracknowledged_atgt, +filteracknowledged_atgte=filteracknowledged_atgte, +filteracknowledged_atlt=filteracknowledged_atlt, +filteracknowledged_atlte=filteracknowledged_atlte, +filtermitigated_atgt=filtermitigated_atgt, +filtermitigated_atgte=filtermitigated_atgte, +filtermitigated_atlt=filtermitigated_atlt, +filtermitigated_atlte=filtermitigated_atlte, +filterresolved_atgt=filterresolved_atgt, +filterresolved_atgte=filterresolved_atgte, +filterresolved_atlt=filterresolved_atlt, +filterresolved_atlte=filterresolved_atlte, +filterclosed_atgt=filterclosed_atgt, +filterclosed_atgte=filterclosed_atgte, +filterclosed_atlt=filterclosed_atlt, +filterclosed_atlte=filterclosed_atlte, +filterin_triage_atgt=filterin_triage_atgt, +filterin_triage_atgte=filterin_triage_atgte, +filterin_triage_atlt=filterin_triage_atlt, +filterin_triage_atlte=filterin_triage_atlte, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filterprivateeq=filterprivateeq, +filterprivatenot_eq=filterprivatenot_eq, +filterprivatein=filterprivatein, +filterprivatenot_in=filterprivatenot_in, +filteruser_ideq=filteruser_ideq, +filteruser_idnot_eq=filteruser_idnot_eq, +filteruser_idin=filteruser_idin, +filteruser_idnot_in=filteruser_idnot_in, +filterseverityeq=filterseverityeq, +filterseveritynot_eq=filterseveritynot_eq, +filterseverityin=filterseverityin, +filterseveritynot_in=filterseveritynot_in, +filterseverity_ideq=filterseverity_ideq, +filterseverity_idnot_eq=filterseverity_idnot_eq, +filterseverity_idin=filterseverity_idin, +filterseverity_idnot_in=filterseverity_idnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, +filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, +filterzendesk_ticket_idin=filterzendesk_ticket_idin, +filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, +filtersequential_ideq=filtersequential_ideq, +filtersequential_idnot_eq=filtersequential_idnot_eq, +filtersequential_idin=filtersequential_idin, +filtersequential_idnot_in=filtersequential_idnot_in, +filtertypeseq=filtertypeseq, +filtertypesnot_eq=filtertypesnot_eq, +filtertypesin=filtertypesin, +filtertypesnot_in=filtertypesnot_in, +filtertype_idseq=filtertype_idseq, +filtertype_idsnot_eq=filtertype_idsnot_eq, +filtertype_idsin=filtertype_idsin, +filtertype_idsnot_in=filtertype_idsnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterenvironment_idseq=filterenvironment_idseq, +filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, +filterenvironment_idsin=filterenvironment_idsin, +filterenvironment_idsnot_in=filterenvironment_idsnot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filterservice_idseq=filterservice_idseq, +filterservice_idsnot_eq=filterservice_idsnot_eq, +filterservice_idsin=filterservice_idsin, +filterservice_idsnot_in=filterservice_idsnot_in, +filterservice_nameseq=filterservice_nameseq, +filterservice_namesnot_eq=filterservice_namesnot_eq, +filterservice_namesin=filterservice_namesin, +filterservice_namesnot_in=filterservice_namesnot_in, +filterfunctionalitieseq=filterfunctionalitieseq, +filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, +filterfunctionalitiesin=filterfunctionalitiesin, +filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, +filterfunctionality_idseq=filterfunctionality_idseq, +filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, +filterfunctionality_idsin=filterfunctionality_idsin, +filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, +filterfunctionality_nameseq=filterfunctionality_nameseq, +filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, +filterfunctionality_namesin=filterfunctionality_namesin, +filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, +filtercauseseq=filtercauseseq, +filtercausesnot_eq=filtercausesnot_eq, +filtercausesin=filtercausesin, +filtercausesnot_in=filtercausesnot_in, +filtercause_idseq=filtercause_idseq, +filtercause_idsnot_eq=filtercause_idsnot_eq, +filtercause_idsin=filtercause_idsin, +filtercause_idsnot_in=filtercause_idsnot_in, +filterteamseq=filterteamseq, +filterteamsnot_eq=filterteamsnot_eq, +filterteamsin=filterteamsin, +filterteamsnot_in=filterteamsnot_in, +filterteam_idseq=filterteam_idseq, +filterteam_idsnot_eq=filterteam_idsnot_eq, +filterteam_idsin=filterteam_idsin, +filterteam_idsnot_in=filterteam_idsnot_in, +filterteam_nameseq=filterteam_nameseq, +filterteam_namesnot_eq=filterteam_namesnot_eq, +filterteam_namesin=filterteam_namesin, +filterteam_namesnot_in=filterteam_namesnot_in, +sort=sort, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, + pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filtersearch: str | Unset = UNSET, @@ -944,6 +2154,7 @@ async def asyncio( filtercause_ids: str | Unset = UNSET, filtercustom_field_selected_option_ids: str | Unset = UNSET, filterslack_channel_id: str | Unset = UNSET, + filtersequential_id: str | Unset = UNSET, filtercreated_atgt: str | Unset = UNSET, filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, @@ -980,14 +2191,112 @@ async def asyncio( filterin_triage_atgte: str | Unset = UNSET, filterin_triage_atlt: str | Unset = UNSET, filterin_triage_atlte: str | Unset = UNSET, + filterkindeq: str | Unset = UNSET, + filterkindnot_eq: str | Unset = UNSET, + filterkindin: str | Unset = UNSET, + filterkindnot_in: str | Unset = UNSET, + filterstatuseq: str | Unset = UNSET, + filterstatusnot_eq: str | Unset = UNSET, + filterstatusin: str | Unset = UNSET, + filterstatusnot_in: str | Unset = UNSET, + filterprivateeq: str | Unset = UNSET, + filterprivatenot_eq: str | Unset = UNSET, + filterprivatein: str | Unset = UNSET, + filterprivatenot_in: str | Unset = UNSET, + filteruser_ideq: str | Unset = UNSET, + filteruser_idnot_eq: str | Unset = UNSET, + filteruser_idin: str | Unset = UNSET, + filteruser_idnot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filterseverity_ideq: str | Unset = UNSET, + filterseverity_idnot_eq: str | Unset = UNSET, + filterseverity_idin: str | Unset = UNSET, + filterseverity_idnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterzendesk_ticket_ideq: str | Unset = UNSET, + filterzendesk_ticket_idnot_eq: str | Unset = UNSET, + filterzendesk_ticket_idin: str | Unset = UNSET, + filterzendesk_ticket_idnot_in: str | Unset = UNSET, + filtersequential_ideq: str | Unset = UNSET, + filtersequential_idnot_eq: str | Unset = UNSET, + filtersequential_idin: str | Unset = UNSET, + filtersequential_idnot_in: str | Unset = UNSET, + filtertypeseq: str | Unset = UNSET, + filtertypesnot_eq: str | Unset = UNSET, + filtertypesin: str | Unset = UNSET, + filtertypesnot_in: str | Unset = UNSET, + filtertype_idseq: str | Unset = UNSET, + filtertype_idsnot_eq: str | Unset = UNSET, + filtertype_idsin: str | Unset = UNSET, + filtertype_idsnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterenvironment_idseq: str | Unset = UNSET, + filterenvironment_idsnot_eq: str | Unset = UNSET, + filterenvironment_idsin: str | Unset = UNSET, + filterenvironment_idsnot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterservice_idseq: str | Unset = UNSET, + filterservice_idsnot_eq: str | Unset = UNSET, + filterservice_idsin: str | Unset = UNSET, + filterservice_idsnot_in: str | Unset = UNSET, + filterservice_nameseq: str | Unset = UNSET, + filterservice_namesnot_eq: str | Unset = UNSET, + filterservice_namesin: str | Unset = UNSET, + filterservice_namesnot_in: str | Unset = UNSET, + filterfunctionalitieseq: str | Unset = UNSET, + filterfunctionalitiesnot_eq: str | Unset = UNSET, + filterfunctionalitiesin: str | Unset = UNSET, + filterfunctionalitiesnot_in: str | Unset = UNSET, + filterfunctionality_idseq: str | Unset = UNSET, + filterfunctionality_idsnot_eq: str | Unset = UNSET, + filterfunctionality_idsin: str | Unset = UNSET, + filterfunctionality_idsnot_in: str | Unset = UNSET, + filterfunctionality_nameseq: str | Unset = UNSET, + filterfunctionality_namesnot_eq: str | Unset = UNSET, + filterfunctionality_namesin: str | Unset = UNSET, + filterfunctionality_namesnot_in: str | Unset = UNSET, + filtercauseseq: str | Unset = UNSET, + filtercausesnot_eq: str | Unset = UNSET, + filtercausesin: str | Unset = UNSET, + filtercausesnot_in: str | Unset = UNSET, + filtercause_idseq: str | Unset = UNSET, + filtercause_idsnot_eq: str | Unset = UNSET, + filtercause_idsin: str | Unset = UNSET, + filtercause_idsnot_in: str | Unset = UNSET, + filterteamseq: str | Unset = UNSET, + filterteamsnot_eq: str | Unset = UNSET, + filterteamsin: str | Unset = UNSET, + filterteamsnot_in: str | Unset = UNSET, + filterteam_idseq: str | Unset = UNSET, + filterteam_idsnot_eq: str | Unset = UNSET, + filterteam_idsin: str | Unset = UNSET, + filterteam_idsnot_in: str | Unset = UNSET, + filterteam_nameseq: str | Unset = UNSET, + filterteam_namesnot_eq: str | Unset = UNSET, + filterteam_namesin: str | Unset = UNSET, + filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, -) -> IncidentList | None: - """List incidents + +) -> ErrorsList | IncidentList | None: + """ List incidents List incidents Args: + pageafter (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): filtersearch (str | Unset): @@ -1015,6 +2324,7 @@ async def asyncio( filtercause_ids (str | Unset): filtercustom_field_selected_option_ids (str | Unset): filterslack_channel_id (str | Unset): + filtersequential_id (str | Unset): filtercreated_atgt (str | Unset): filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): @@ -1051,6 +2361,102 @@ async def asyncio( filterin_triage_atgte (str | Unset): filterin_triage_atlt (str | Unset): filterin_triage_atlte (str | Unset): + filterkindeq (str | Unset): + filterkindnot_eq (str | Unset): + filterkindin (str | Unset): + filterkindnot_in (str | Unset): + filterstatuseq (str | Unset): + filterstatusnot_eq (str | Unset): + filterstatusin (str | Unset): + filterstatusnot_in (str | Unset): + filterprivateeq (str | Unset): + filterprivatenot_eq (str | Unset): + filterprivatein (str | Unset): + filterprivatenot_in (str | Unset): + filteruser_ideq (str | Unset): + filteruser_idnot_eq (str | Unset): + filteruser_idin (str | Unset): + filteruser_idnot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filterseverity_ideq (str | Unset): + filterseverity_idnot_eq (str | Unset): + filterseverity_idin (str | Unset): + filterseverity_idnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterzendesk_ticket_ideq (str | Unset): + filterzendesk_ticket_idnot_eq (str | Unset): + filterzendesk_ticket_idin (str | Unset): + filterzendesk_ticket_idnot_in (str | Unset): + filtersequential_ideq (str | Unset): + filtersequential_idnot_eq (str | Unset): + filtersequential_idin (str | Unset): + filtersequential_idnot_in (str | Unset): + filtertypeseq (str | Unset): + filtertypesnot_eq (str | Unset): + filtertypesin (str | Unset): + filtertypesnot_in (str | Unset): + filtertype_idseq (str | Unset): + filtertype_idsnot_eq (str | Unset): + filtertype_idsin (str | Unset): + filtertype_idsnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterenvironment_idseq (str | Unset): + filterenvironment_idsnot_eq (str | Unset): + filterenvironment_idsin (str | Unset): + filterenvironment_idsnot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterservice_idseq (str | Unset): + filterservice_idsnot_eq (str | Unset): + filterservice_idsin (str | Unset): + filterservice_idsnot_in (str | Unset): + filterservice_nameseq (str | Unset): + filterservice_namesnot_eq (str | Unset): + filterservice_namesin (str | Unset): + filterservice_namesnot_in (str | Unset): + filterfunctionalitieseq (str | Unset): + filterfunctionalitiesnot_eq (str | Unset): + filterfunctionalitiesin (str | Unset): + filterfunctionalitiesnot_in (str | Unset): + filterfunctionality_idseq (str | Unset): + filterfunctionality_idsnot_eq (str | Unset): + filterfunctionality_idsin (str | Unset): + filterfunctionality_idsnot_in (str | Unset): + filterfunctionality_nameseq (str | Unset): + filterfunctionality_namesnot_eq (str | Unset): + filterfunctionality_namesin (str | Unset): + filterfunctionality_namesnot_in (str | Unset): + filtercauseseq (str | Unset): + filtercausesnot_eq (str | Unset): + filtercausesin (str | Unset): + filtercausesnot_in (str | Unset): + filtercause_idseq (str | Unset): + filtercause_idsnot_eq (str | Unset): + filtercause_idsin (str | Unset): + filtercause_idsnot_in (str | Unset): + filterteamseq (str | Unset): + filterteamsnot_eq (str | Unset): + filterteamsin (str | Unset): + filterteamsnot_in (str | Unset): + filterteam_idseq (str | Unset): + filterteam_idsnot_eq (str | Unset): + filterteam_idsin (str | Unset): + filterteam_idsnot_in (str | Unset): + filterteam_nameseq (str | Unset): + filterteam_namesnot_eq (str | Unset): + filterteam_namesin (str | Unset): + filterteam_namesnot_in (str | Unset): sort (ListIncidentsSort | Unset): include (ListIncidentsInclude | Unset): @@ -1059,76 +2465,174 @@ async def asyncio( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - IncidentList - """ - - return ( - await asyncio_detailed( - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterkind=filterkind, - filterstatus=filterstatus, - filterprivate=filterprivate, - filteruser_id=filteruser_id, - filterseverity=filterseverity, - filterseverity_id=filterseverity_id, - filterlabels=filterlabels, - filtertypes=filtertypes, - filtertype_ids=filtertype_ids, - filterenvironments=filterenvironments, - filterenvironment_ids=filterenvironment_ids, - filterfunctionalities=filterfunctionalities, - filterfunctionality_ids=filterfunctionality_ids, - filterfunctionality_names=filterfunctionality_names, - filterservices=filterservices, - filterservice_ids=filterservice_ids, - filterservice_names=filterservice_names, - filterteams=filterteams, - filterteam_ids=filterteam_ids, - filterteam_names=filterteam_names, - 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, - filtercreated_atlte=filtercreated_atlte, - filterupdated_atgt=filterupdated_atgt, - filterupdated_atgte=filterupdated_atgte, - filterupdated_atlt=filterupdated_atlt, - filterupdated_atlte=filterupdated_atlte, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterdetected_atgt=filterdetected_atgt, - filterdetected_atgte=filterdetected_atgte, - filterdetected_atlt=filterdetected_atlt, - filterdetected_atlte=filterdetected_atlte, - filteracknowledged_atgt=filteracknowledged_atgt, - filteracknowledged_atgte=filteracknowledged_atgte, - filteracknowledged_atlt=filteracknowledged_atlt, - filteracknowledged_atlte=filteracknowledged_atlte, - filtermitigated_atgt=filtermitigated_atgt, - filtermitigated_atgte=filtermitigated_atgte, - filtermitigated_atlt=filtermitigated_atlt, - filtermitigated_atlte=filtermitigated_atlte, - filterresolved_atgt=filterresolved_atgt, - filterresolved_atgte=filterresolved_atgte, - filterresolved_atlt=filterresolved_atlt, - filterresolved_atlte=filterresolved_atlte, - filterclosed_atgt=filterclosed_atgt, - filterclosed_atgte=filterclosed_atgte, - filterclosed_atlt=filterclosed_atlt, - filterclosed_atlte=filterclosed_atlte, - filterin_triage_atgt=filterin_triage_atgt, - filterin_triage_atgte=filterin_triage_atgte, - filterin_triage_atlt=filterin_triage_atlt, - filterin_triage_atlte=filterin_triage_atlte, - sort=sort, - include=include, - ) - ).parsed + ErrorsList | IncidentList + """ + + + return (await asyncio_detailed( + client=client, +pageafter=pageafter, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterkind=filterkind, +filterstatus=filterstatus, +filterprivate=filterprivate, +filteruser_id=filteruser_id, +filterseverity=filterseverity, +filterseverity_id=filterseverity_id, +filterlabels=filterlabels, +filtertypes=filtertypes, +filtertype_ids=filtertype_ids, +filterenvironments=filterenvironments, +filterenvironment_ids=filterenvironment_ids, +filterfunctionalities=filterfunctionalities, +filterfunctionality_ids=filterfunctionality_ids, +filterfunctionality_names=filterfunctionality_names, +filterservices=filterservices, +filterservice_ids=filterservice_ids, +filterservice_names=filterservice_names, +filterteams=filterteams, +filterteam_ids=filterteam_ids, +filterteam_names=filterteam_names, +filtercause=filtercause, +filtercause_ids=filtercause_ids, +filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, +filterslack_channel_id=filterslack_channel_id, +filtersequential_id=filtersequential_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterupdated_atgt=filterupdated_atgt, +filterupdated_atgte=filterupdated_atgte, +filterupdated_atlt=filterupdated_atlt, +filterupdated_atlte=filterupdated_atlte, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterdetected_atgt=filterdetected_atgt, +filterdetected_atgte=filterdetected_atgte, +filterdetected_atlt=filterdetected_atlt, +filterdetected_atlte=filterdetected_atlte, +filteracknowledged_atgt=filteracknowledged_atgt, +filteracknowledged_atgte=filteracknowledged_atgte, +filteracknowledged_atlt=filteracknowledged_atlt, +filteracknowledged_atlte=filteracknowledged_atlte, +filtermitigated_atgt=filtermitigated_atgt, +filtermitigated_atgte=filtermitigated_atgte, +filtermitigated_atlt=filtermitigated_atlt, +filtermitigated_atlte=filtermitigated_atlte, +filterresolved_atgt=filterresolved_atgt, +filterresolved_atgte=filterresolved_atgte, +filterresolved_atlt=filterresolved_atlt, +filterresolved_atlte=filterresolved_atlte, +filterclosed_atgt=filterclosed_atgt, +filterclosed_atgte=filterclosed_atgte, +filterclosed_atlt=filterclosed_atlt, +filterclosed_atlte=filterclosed_atlte, +filterin_triage_atgt=filterin_triage_atgt, +filterin_triage_atgte=filterin_triage_atgte, +filterin_triage_atlt=filterin_triage_atlt, +filterin_triage_atlte=filterin_triage_atlte, +filterkindeq=filterkindeq, +filterkindnot_eq=filterkindnot_eq, +filterkindin=filterkindin, +filterkindnot_in=filterkindnot_in, +filterstatuseq=filterstatuseq, +filterstatusnot_eq=filterstatusnot_eq, +filterstatusin=filterstatusin, +filterstatusnot_in=filterstatusnot_in, +filterprivateeq=filterprivateeq, +filterprivatenot_eq=filterprivatenot_eq, +filterprivatein=filterprivatein, +filterprivatenot_in=filterprivatenot_in, +filteruser_ideq=filteruser_ideq, +filteruser_idnot_eq=filteruser_idnot_eq, +filteruser_idin=filteruser_idin, +filteruser_idnot_in=filteruser_idnot_in, +filterseverityeq=filterseverityeq, +filterseveritynot_eq=filterseveritynot_eq, +filterseverityin=filterseverityin, +filterseveritynot_in=filterseveritynot_in, +filterseverity_ideq=filterseverity_ideq, +filterseverity_idnot_eq=filterseverity_idnot_eq, +filterseverity_idin=filterseverity_idin, +filterseverity_idnot_in=filterseverity_idnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, +filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, +filterzendesk_ticket_idin=filterzendesk_ticket_idin, +filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, +filtersequential_ideq=filtersequential_ideq, +filtersequential_idnot_eq=filtersequential_idnot_eq, +filtersequential_idin=filtersequential_idin, +filtersequential_idnot_in=filtersequential_idnot_in, +filtertypeseq=filtertypeseq, +filtertypesnot_eq=filtertypesnot_eq, +filtertypesin=filtertypesin, +filtertypesnot_in=filtertypesnot_in, +filtertype_idseq=filtertype_idseq, +filtertype_idsnot_eq=filtertype_idsnot_eq, +filtertype_idsin=filtertype_idsin, +filtertype_idsnot_in=filtertype_idsnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterenvironment_idseq=filterenvironment_idseq, +filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, +filterenvironment_idsin=filterenvironment_idsin, +filterenvironment_idsnot_in=filterenvironment_idsnot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filterservice_idseq=filterservice_idseq, +filterservice_idsnot_eq=filterservice_idsnot_eq, +filterservice_idsin=filterservice_idsin, +filterservice_idsnot_in=filterservice_idsnot_in, +filterservice_nameseq=filterservice_nameseq, +filterservice_namesnot_eq=filterservice_namesnot_eq, +filterservice_namesin=filterservice_namesin, +filterservice_namesnot_in=filterservice_namesnot_in, +filterfunctionalitieseq=filterfunctionalitieseq, +filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, +filterfunctionalitiesin=filterfunctionalitiesin, +filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, +filterfunctionality_idseq=filterfunctionality_idseq, +filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, +filterfunctionality_idsin=filterfunctionality_idsin, +filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, +filterfunctionality_nameseq=filterfunctionality_nameseq, +filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, +filterfunctionality_namesin=filterfunctionality_namesin, +filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, +filtercauseseq=filtercauseseq, +filtercausesnot_eq=filtercausesnot_eq, +filtercausesin=filtercausesin, +filtercausesnot_in=filtercausesnot_in, +filtercause_idseq=filtercause_idseq, +filtercause_idsnot_eq=filtercause_idsnot_eq, +filtercause_idsin=filtercause_idsin, +filtercause_idsnot_in=filtercause_idsnot_in, +filterteamseq=filterteamseq, +filterteamsnot_eq=filterteamsnot_eq, +filterteamsin=filterteamsin, +filterteamsnot_in=filterteamsnot_in, +filterteam_idseq=filterteam_idseq, +filterteam_idsnot_eq=filterteam_idsnot_eq, +filterteam_idsin=filterteam_idsin, +filterteam_idsnot_in=filterteam_idsnot_in, +filterteam_nameseq=filterteam_nameseq, +filterteam_namesnot_eq=filterteam_namesnot_eq, +filterteam_namesin=filterteam_namesin, +filterteam_namesnot_in=filterteam_namesnot_in, +sort=sort, +include=include, + + )).parsed diff --git a/rootly_sdk/api/incidents/mark_as_duplicate_incident.py b/rootly_sdk/api/incidents/mark_as_duplicate_incident.py index e93e2b46..0c888a8d 100644 --- a/rootly_sdk/api/incidents/mark_as_duplicate_incident.py +++ b/rootly_sdk/api/incidents/mark_as_duplicate_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.resolve_incident import ResolveIncident -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: ResolveIncident, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/duplicate".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/duplicate".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: ResolveIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Mark an incident as a duplicate + """ Mark an incident as a duplicate Mark an incident as a duplicate @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, + ) -> ErrorsList | IncidentResponse | None: - """Mark an incident as a duplicate + """ Mark an incident as a duplicate Mark an incident as a duplicate @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Mark an incident as a duplicate + """ Mark an incident as a duplicate Mark an incident as a duplicate @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, + ) -> ErrorsList | IncidentResponse | None: - """Mark an incident as a duplicate + """ Mark an incident as a duplicate Mark an incident as a duplicate @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/mitigate_incident.py b/rootly_sdk/api/incidents/mitigate_incident.py index 4c713578..b61d6d2f 100644 --- a/rootly_sdk/api/incidents/mitigate_incident.py +++ b/rootly_sdk/api/incidents/mitigate_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.mitigate_incident import MitigateIncident -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: MitigateIncident, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/mitigate".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/mitigate".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: MitigateIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Mitigate an incident + """ Mitigate an incident Mitigate a specific incident by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, + ) -> ErrorsList | IncidentResponse | None: - """Mitigate an incident + """ Mitigate an incident Mitigate a specific incident by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Mitigate an incident + """ Mitigate an incident Mitigate a specific incident by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, + ) -> ErrorsList | IncidentResponse | None: - """Mitigate an incident + """ Mitigate an incident Mitigate a specific incident by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed 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 c86e1ec4..366824bb 100644 --- a/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py +++ b/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.unassign_role_from_user import UnassignRoleFromUser -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UnassignRoleFromUser, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incidents/{id}/unassign_role_from_user".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/unassign_role_from_user".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UnassignRoleFromUser, + ) -> Response[ErrorsList | IncidentResponse]: - """Remove assigned user from incident + """ Remove assigned user from incident Remove assigned user from incident @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, + ) -> ErrorsList | IncidentResponse | None: - """Remove assigned user from incident + """ Remove assigned user from incident Remove assigned user from incident @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, + ) -> Response[ErrorsList | IncidentResponse]: - """Remove assigned user from incident + """ Remove assigned user from incident Remove assigned user from incident @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, + ) -> ErrorsList | IncidentResponse | None: - """Remove assigned user from incident + """ Remove assigned user from incident Remove assigned user from incident @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/remove_subscribers_to_incident.py b/rootly_sdk/api/incidents/remove_subscribers_to_incident.py index 0be005da..6d01a221 100644 --- a/rootly_sdk/api/incidents/remove_subscribers_to_incident.py +++ b/rootly_sdk/api/incidents/remove_subscribers_to_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.remove_subscribers import RemoveSubscribers -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: RemoveSubscribers, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incidents/{id}/remove_subscribers".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/remove_subscribers".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: RemoveSubscribers, + ) -> Response[ErrorsList | IncidentResponse]: - """Remove subscribers from incident + """ Remove subscribers from incident Remove subscribers to incident @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, + ) -> ErrorsList | IncidentResponse | None: - """Remove subscribers from incident + """ Remove subscribers from incident Remove subscribers to incident @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, + ) -> Response[ErrorsList | IncidentResponse]: - """Remove subscribers from incident + """ Remove subscribers from incident Remove subscribers to incident @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, + ) -> ErrorsList | IncidentResponse | None: - """Remove subscribers from incident + """ Remove subscribers from incident Remove subscribers to incident @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/resolve_incident.py b/rootly_sdk/api/incidents/resolve_incident.py index 094ca943..55c86759 100644 --- a/rootly_sdk/api/incidents/resolve_incident.py +++ b/rootly_sdk/api/incidents/resolve_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.resolve_incident import ResolveIncident -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: ResolveIncident, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/resolve".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/resolve".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: ResolveIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Resolve an incident + """ Resolve an incident Resolve a specific incident by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, + ) -> ErrorsList | IncidentResponse | None: - """Resolve an incident + """ Resolve an incident Resolve a specific incident by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Resolve an incident + """ Resolve an incident Resolve a specific incident by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, + ) -> ErrorsList | IncidentResponse | None: - """Resolve an incident + """ Resolve an incident Resolve a specific incident by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/restart_incident.py b/rootly_sdk/api/incidents/restart_incident.py index 45953fc9..bf17b280 100644 --- a/rootly_sdk/api/incidents/restart_incident.py +++ b/rootly_sdk/api/incidents/restart_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.restart_incident import RestartIncident -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: RestartIncident, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/restart".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/restart".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: RestartIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Restart an incident + """ Restart an incident Restart a specific incident by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, + ) -> ErrorsList | IncidentResponse | None: - """Restart an incident + """ Restart an incident Restart a specific incident by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Restart an incident + """ Restart an incident Restart a specific incident by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, + ) -> ErrorsList | IncidentResponse | None: - """Restart an incident + """ Restart an incident Restart a specific incident by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/triage_incident.py b/rootly_sdk/api/incidents/triage_incident.py index 819bedd0..3c34a6ca 100644 --- a/rootly_sdk/api/incidents/triage_incident.py +++ b/rootly_sdk/api/incidents/triage_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.in_triage_incident import InTriageIncident from ...models.incident_response import IncidentResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: InTriageIncident, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/in_triage".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{id}/in_triage".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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: InTriageIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Triage an incident + """ Triage an incident Set a specific incident by ID to triage state @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, + ) -> ErrorsList | IncidentResponse | None: - """Triage an incident + """ Triage an incident Set a specific incident by ID to triage state @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Triage an incident + """ Triage an incident Set a specific incident by ID to triage state @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, + ) -> ErrorsList | IncidentResponse | None: - """Triage an incident + """ Triage an incident Set a specific incident by ID to triage state @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py b/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py index d5a053f8..d206ada9 100644 --- a/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py +++ b/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py @@ -1,42 +1,53 @@ 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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from ...types import Response +from typing import cast +from uuid import UUID + 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=""), - ), + "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: + +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: @@ -49,9 +60,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[Any | ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +73,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList | IncidentResponse]: - """Remove duplicate marking from an incident + """ Remove duplicate marking from an incident Remove the duplicate marking from an incident @@ -78,10 +88,12 @@ def sync_detailed( Returns: Response[Any | ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -90,13 +102,13 @@ def sync_detailed( 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 duplicate marking from an incident Remove the duplicate marking from an incident @@ -109,20 +121,22 @@ def sync( Returns: Any | ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[Any | ErrorsList | IncidentResponse]: - """Remove duplicate marking from an incident + """ Remove duplicate marking from an incident Remove the duplicate marking from an incident @@ -135,23 +149,27 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 duplicate marking from an incident Remove the duplicate marking from an incident @@ -164,11 +182,11 @@ async def asyncio( Returns: Any | ErrorsList | IncidentResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + 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 470c044e..dbc519ae 100644 --- a/rootly_sdk/api/incidents/update_incident.py +++ b/rootly_sdk/api/incidents/update_incident.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.update_incident import UpdateIncident -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateIncident, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/incidents/{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 | IncidentResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> 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 client.raise_on_unexpected_status: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Update an incident + """ Update an incident Update a specific incident by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, + ) -> ErrorsList | IncidentResponse | None: - """Update an incident + """ Update an incident Update a specific incident by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, + ) -> Response[ErrorsList | IncidentResponse]: - """Update an incident + """ Update an incident Update a specific incident by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, + ) -> ErrorsList | IncidentResponse | None: - """Update an incident + """ Update an incident Update a specific incident by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/ip_ranges/__init__.py b/rootly_sdk/api/ip_ranges/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/ip_ranges/__init__.py +++ b/rootly_sdk/api/ip_ranges/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/ip_ranges/get_ip_ranges.py b/rootly_sdk/api/ip_ranges/get_ip_ranges.py index 1c8c7d81..58ba7f20 100644 --- a/rootly_sdk/api/ip_ranges/get_ip_ranges.py +++ b/rootly_sdk/api/ip_ranges/get_ip_ranges.py @@ -1,28 +1,43 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.ip_ranges_response import IpRangesResponse -from ...types import Response +from typing import cast + -def _get_kwargs() -> dict[str, Any]: +def _get_kwargs( + +) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/ip_ranges", } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IpRangesResponse | None: if response.status_code == 200: response_200 = IpRangesResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -43,8 +58,9 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, + ) -> Response[IpRangesResponse]: - """Retrieves IP ranges + """ Retrieves IP ranges Retrieves the IP ranges for rootly.com services @@ -54,9 +70,12 @@ def sync_detailed( Returns: Response[IpRangesResponse] - """ + """ - kwargs = _get_kwargs() + + kwargs = _get_kwargs( + + ) response = client.get_httpx_client().request( **kwargs, @@ -64,12 +83,12 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, + ) -> IpRangesResponse | None: - """Retrieves IP ranges + """ Retrieves IP ranges Retrieves the IP ranges for rootly.com services @@ -79,18 +98,20 @@ def sync( Returns: IpRangesResponse - """ + """ + return sync_detailed( client=client, - ).parsed + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, + ) -> Response[IpRangesResponse]: - """Retrieves IP ranges + """ Retrieves IP ranges Retrieves the IP ranges for rootly.com services @@ -100,20 +121,25 @@ async def asyncio_detailed( Returns: Response[IpRangesResponse] - """ + """ - kwargs = _get_kwargs() - response = await client.get_async_httpx_client().request(**kwargs) + kwargs = _get_kwargs( + + ) - return _build_response(client=client, response=response) + response = await client.get_async_httpx_client().request( + **kwargs + ) + return _build_response(client=client, response=response) async def asyncio( *, client: AuthenticatedClient, + ) -> IpRangesResponse | None: - """Retrieves IP ranges + """ Retrieves IP ranges Retrieves the IP ranges for rootly.com services @@ -123,10 +149,10 @@ async def asyncio( Returns: IpRangesResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - ) - ).parsed + + return (await asyncio_detailed( + client=client, + + )).parsed diff --git a/rootly_sdk/api/live_call_routers/__init__.py b/rootly_sdk/api/live_call_routers/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/live_call_routers/__init__.py +++ b/rootly_sdk/api/live_call_routers/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 3411697b..6c520c4f 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 @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.live_call_router_response import LiveCallRouterResponse from ...models.new_live_call_router import NewLiveCallRouter -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewLiveCallRouter, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/live_call_routers", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | LiveCallRouterResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | LiveCallRouterResponse | None: if response.status_code == 201: response_201 = LiveCallRouterResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | LiveCallRouterResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | LiveCallRouterResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewLiveCallRouter, + ) -> Response[ErrorsList | LiveCallRouterResponse]: - """Creates a Live Call Router + """ Creates a Live Call Router Creates a new Live Call Router from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewLiveCallRouter, + ) -> ErrorsList | LiveCallRouterResponse | None: - """Creates a Live Call Router + """ Creates a Live Call Router Creates a new Live Call Router from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | LiveCallRouterResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewLiveCallRouter, + ) -> Response[ErrorsList | LiveCallRouterResponse]: - """Creates a Live Call Router + """ Creates a Live Call Router Creates a new Live Call Router from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewLiveCallRouter, + ) -> ErrorsList | LiveCallRouterResponse | None: - """Creates a Live Call Router + """ Creates a Live Call Router Creates a new Live Call Router from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | LiveCallRouterResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed 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 599d3193..38b2da00 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.live_call_router_response import LiveCallRouterResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/live_call_routers/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/live_call_routers/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | LiveCallRouterResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | LiveCallRouterResponse | None: if response.status_code == 200: response_200 = LiveCallRouterResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | LiveCallRouterResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | LiveCallRouterResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | LiveCallRouterResponse]: - """Delete a Live Call Router + """ Delete a Live Call Router Delete a specific Live Call Router by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | LiveCallRouterResponse | None: - """Delete a Live Call Router + """ Delete a Live Call Router Delete a specific Live Call Router by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | LiveCallRouterResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | LiveCallRouterResponse]: - """Delete a Live Call Router + """ Delete a Live Call Router Delete a specific Live Call Router by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | LiveCallRouterResponse | None: - """Delete a Live Call Router + """ Delete a Live Call Router Delete a specific Live Call Router by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | LiveCallRouterResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 f9a03d53..8e531cd4 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 @@ -1,25 +1,31 @@ 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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...models.generate_phone_number_live_call_router_country_code import ( - GeneratePhoneNumberLiveCallRouterCountryCode, -) -from ...models.generate_phone_number_live_call_router_phone_type import ( - GeneratePhoneNumberLiveCallRouterPhoneType, -) -from ...types import UNSET, Response +from ...models.generate_phone_number_live_call_router_country_code import check_generate_phone_number_live_call_router_country_code +from ...models.generate_phone_number_live_call_router_country_code import GeneratePhoneNumberLiveCallRouterCountryCode +from ...models.generate_phone_number_live_call_router_phone_type import check_generate_phone_number_live_call_router_phone_type +from ...models.generate_phone_number_live_call_router_phone_type import GeneratePhoneNumberLiveCallRouterPhoneType +from typing import cast + def _get_kwargs( *, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,17 +35,21 @@ def _get_kwargs( json_phone_type: str = phone_type params["phone_type"] = json_phone_type + 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/live_call_routers/generate_phone_number", "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) @@ -48,6 +58,8 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -70,8 +82,9 @@ def sync_detailed( client: AuthenticatedClient, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, + ) -> Response[Any | ErrorsList]: - """Generates a phone number for Live Call Router + """ Generates a phone number for Live Call Router Generates a phone number for Live Call Router @@ -85,11 +98,13 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( country_code=country_code, - phone_type=phone_type, +phone_type=phone_type, + ) response = client.get_httpx_client().request( @@ -98,14 +113,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, + ) -> Any | ErrorsList | None: - """Generates a phone number for Live Call Router + """ Generates a phone number for Live Call Router Generates a phone number for Live Call Router @@ -119,22 +134,24 @@ def sync( Returns: Any | ErrorsList - """ + """ + return sync_detailed( client=client, - country_code=country_code, - phone_type=phone_type, - ).parsed +country_code=country_code, +phone_type=phone_type, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, + ) -> Response[Any | ErrorsList]: - """Generates a phone number for Live Call Router + """ Generates a phone number for Live Call Router Generates a phone number for Live Call Router @@ -148,25 +165,29 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ + """ + kwargs = _get_kwargs( country_code=country_code, - phone_type=phone_type, +phone_type=phone_type, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, + ) -> Any | ErrorsList | None: - """Generates a phone number for Live Call Router + """ Generates a phone number for Live Call Router Generates a phone number for Live Call Router @@ -180,12 +201,12 @@ async def asyncio( Returns: Any | ErrorsList - """ - - return ( - await asyncio_detailed( - client=client, - country_code=country_code, - phone_type=phone_type, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +country_code=country_code, +phone_type=phone_type, + + )).parsed 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 df6f8458..419bc333 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.live_call_router_response import LiveCallRouterResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/live_call_routers/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/live_call_routers/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | LiveCallRouterResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | LiveCallRouterResponse | None: if response.status_code == 200: response_200 = LiveCallRouterResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | LiveCallRouterResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | LiveCallRouterResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | LiveCallRouterResponse]: - """Retrieves a Live Call Router + """ Retrieves a Live Call Router Retrieves a specific Live Call Router by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | LiveCallRouterResponse | None: - """Retrieves a Live Call Router + """ Retrieves a Live Call Router Retrieves a specific Live Call Router by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | LiveCallRouterResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | LiveCallRouterResponse]: - """Retrieves a Live Call Router + """ Retrieves a Live Call Router Retrieves a specific Live Call Router by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | LiveCallRouterResponse | None: - """Retrieves a Live Call Router + """ Retrieves a Live Call Router Retrieves a specific Live Call Router by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | LiveCallRouterResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 fe5ad768..d66879c5 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 @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.live_call_router_list import LiveCallRouterList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,7 +27,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -48,21 +57,27 @@ def _get_kwargs( 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/live_call_routers", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> LiveCallRouterList | None: if response.status_code == 200: response_200 = LiveCallRouterList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -94,8 +109,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[LiveCallRouterList]: - """List Live Call Routers + """ List Live Call Routers List Live Call Routers @@ -118,20 +134,22 @@ def sync_detailed( Returns: Response[LiveCallRouterList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ) response = client.get_httpx_client().request( @@ -140,7 +158,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -155,8 +172,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> LiveCallRouterList | None: - """List Live Call Routers + """ List Live Call Routers List Live Call Routers @@ -179,23 +197,24 @@ def sync( Returns: LiveCallRouterList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -211,8 +230,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[LiveCallRouterList]: - """List Live Call Routers + """ List Live Call Routers List Live Call Routers @@ -235,27 +255,30 @@ async def asyncio_detailed( Returns: Response[LiveCallRouterList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -270,8 +293,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> LiveCallRouterList | None: - """List Live Call Routers + """ List Live Call Routers List Live Call Routers @@ -294,21 +318,21 @@ async def asyncio( Returns: LiveCallRouterList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +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/live_call_routers/update_live_call_router.py b/rootly_sdk/api/live_call_routers/update_live_call_router.py index 8fd9e6f4..6b41b392 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.live_call_router_response import LiveCallRouterResponse from ...models.update_live_call_router import UpdateLiveCallRouter -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateLiveCallRouter, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/live_call_routers/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/live_call_routers/{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 | LiveCallRouterResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | LiveCallRouterResponse | None: if response.status_code == 200: response_200 = LiveCallRouterResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | LiveCallRouterResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | LiveCallRouterResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateLiveCallRouter, + ) -> Response[ErrorsList | LiveCallRouterResponse]: - """Update a Live Call Router + """ Update a Live Call Router Update a specific Live Call Router by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateLiveCallRouter, + ) -> ErrorsList | LiveCallRouterResponse | None: - """Update a Live Call Router + """ Update a Live Call Router Update a specific Live Call Router by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | LiveCallRouterResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateLiveCallRouter, + ) -> Response[ErrorsList | LiveCallRouterResponse]: - """Update a Live Call Router + """ Update a Live Call Router Update a specific Live Call Router by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateLiveCallRouter, + ) -> ErrorsList | LiveCallRouterResponse | None: - """Update a Live Call Router + """ Update a Live Call Router Update a specific Live Call Router by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | LiveCallRouterResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/__init__.py b/rootly_sdk/api/meeting_recordings/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/meeting_recordings/__init__.py +++ b/rootly_sdk/api/meeting_recordings/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" 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 index c4235f68..de4ab1b2 100644 --- a/rootly_sdk/api/meeting_recordings/create_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/create_meeting_recording.py @@ -1,22 +1,30 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast 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 +from ...types import Response, UNSET +from ... import errors + +from ...models.create_meeting_recording_platform import check_create_meeting_recording_platform +from ...models.create_meeting_recording_platform import CreateMeetingRecordingPlatform +from ...models.meeting_recording_response import MeetingRecordingResponse +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( incident_id: str, *, platform: CreateMeetingRecordingPlatform | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,32 @@ def _get_kwargs( 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=""), - ), + "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: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: if response.status_code == 201: - return None + response_201 = MeetingRecordingResponse.from_dict(response.json()) + + + + return response_201 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -52,7 +67,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,8 +81,9 @@ def sync_detailed( *, client: AuthenticatedClient, platform: CreateMeetingRecordingPlatform | Unset = UNSET, -) -> Response[Any]: - """Create meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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). @@ -82,12 +98,14 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( incident_id=incident_id, - platform=platform, +platform=platform, + ) response = client.get_httpx_client().request( @@ -96,14 +114,47 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + incident_id: str, + *, + client: AuthenticatedClient, + platform: CreateMeetingRecordingPlatform | Unset = UNSET, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return sync_detailed( + incident_id=incident_id, +client=client, +platform=platform, + + ).parsed async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, platform: CreateMeetingRecordingPlatform | Unset = UNSET, -) -> Response[Any]: - """Create meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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). @@ -118,14 +169,51 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( incident_id=incident_id, - platform=platform, +platform=platform, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + +async def asyncio( + incident_id: str, + *, + client: AuthenticatedClient, + platform: CreateMeetingRecordingPlatform | Unset = UNSET, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +platform=platform, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py index 2197b87e..dd8b7960 100644 --- a/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py @@ -1,34 +1,49 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + +from ...models.meeting_recording_response import MeetingRecordingResponse +from typing import cast + 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=""), - ), + "url": "/v1/meeting_recordings/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +51,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Delete a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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. @@ -63,11 +79,13 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -76,13 +94,42 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Delete a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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. @@ -95,13 +142,46 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py index 70ad4341..2bb7ae2d 100644 --- a/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py @@ -1,34 +1,49 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + +from ...models.meeting_recording_response import MeetingRecordingResponse +from typing import cast + 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=""), - ), + "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: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +51,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Delete video from a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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. @@ -63,11 +79,13 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -76,13 +94,42 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Delete video from a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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. @@ -95,13 +142,46 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py b/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py new file mode 100644 index 00000000..8c48949c --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py @@ -0,0 +1,129 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + + + + +def _get_kwargs( + id: str, + +) -> dict[str, Any]: + + + + + + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/meeting_recordings/{id}/delete_session".format(id=quote(str(id), safe=""),), + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + if response.status_code == 204: + return None + + if response.status_code == 404: + 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 standalone meeting recording + + Delete a standalone meeting recording (not linked to an incident). Only the recording owner can + delete it. Active recordings (pending, recording, paused) must be stopped first. Returns 404 for + incident-linked recordings or recordings owned by another user. + + 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 standalone meeting recording + + Delete a standalone meeting recording (not linked to an incident). Only the recording owner can + delete it. Active recordings (pending, recording, paused) must be stopped first. Returns 404 for + incident-linked recordings or recordings owned by another user. + + 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 index b1cfebd0..211f793e 100644 --- a/rootly_sdk/api/meeting_recordings/get_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/get_meeting_recording.py @@ -1,34 +1,65 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + +from ...models.get_meeting_recording_include import check_get_meeting_recording_include +from ...models.get_meeting_recording_include import GetMeetingRecordingInclude +from ...models.meeting_recording_response import MeetingRecordingResponse +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, + *, + include: GetMeetingRecordingInclude | 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 = {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/meeting_recordings/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/meeting_recordings/{id}".format(id=quote(str(id), safe=""),), + "params": params, } + return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + + + return response_200 if response.status_code == 404: - return None + response_404 = cast(Any, None) + return response_404 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +67,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,25 +80,31 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Get a meeting recording + include: GetMeetingRecordingInclude | Unset = UNSET, + +) -> Response[Any | MeetingRecordingResponse]: + """ Get a meeting recording Retrieve a single meeting recording session including its status, duration, speaker count, word count, and transcript summary. Args: id (str): + include (GetMeetingRecordingInclude | 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] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, +include=include, + ) response = client.get_httpx_client().request( @@ -76,32 +113,103 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, + include: GetMeetingRecordingInclude | Unset = UNSET, + +) -> Any | MeetingRecordingResponse | None: + """ Get a meeting recording + + Retrieve a single meeting recording session including its status, duration, speaker count, word + count, and transcript summary. + + Args: + id (str): + include (GetMeetingRecordingInclude | 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 | MeetingRecordingResponse + """ + + + return sync_detailed( + id=id, +client=client, +include=include, + + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Get a meeting recording + include: GetMeetingRecordingInclude | Unset = UNSET, + +) -> Response[Any | MeetingRecordingResponse]: + """ Get a meeting recording Retrieve a single meeting recording session including its status, duration, speaker count, word count, and transcript summary. Args: id (str): + include (GetMeetingRecordingInclude | 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] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + include: GetMeetingRecordingInclude | Unset = UNSET, + +) -> Any | MeetingRecordingResponse | None: + """ Get a meeting recording + + Retrieve a single meeting recording session including its status, duration, speaker count, word + count, and transcript summary. + + Args: + id (str): + include (GetMeetingRecordingInclude | 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 | MeetingRecordingResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/import_meeting_recording.py b/rootly_sdk/api/meeting_recordings/import_meeting_recording.py new file mode 100644 index 00000000..9780509b --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/import_meeting_recording.py @@ -0,0 +1,219 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.import_meeting_recording import ImportMeetingRecording +from ...models.meeting_recording_response import MeetingRecordingResponse +from ...types import UNSET, Unset +from typing import cast + + + +def _get_kwargs( + incident_id: str, + *, + body: ImportMeetingRecording | Unset = UNSET, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/incidents/{incident_id}/meeting_recordings/import".format(incident_id=quote(str(incident_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) -> Any | MeetingRecordingResponse | None: + if response.status_code == 201: + response_201 = MeetingRecordingResponse.from_dict(response.json()) + + + + return response_201 + + 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 | MeetingRecordingResponse]: + 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, + body: ImportMeetingRecording | Unset = UNSET, + +) -> Response[Any | MeetingRecordingResponse]: + """ Import a meeting recording + + Import an externally captured meeting recording and attach it to an incident. Video and transcript + are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings + endpoint invites a bot — this endpoint handles recordings that were captured outside of the bot + flow. + + Args: + incident_id (str): + body (ImportMeetingRecording | 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 | MeetingRecordingResponse] + """ + + + kwargs = _get_kwargs( + incident_id=incident_id, +body=body, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + incident_id: str, + *, + client: AuthenticatedClient, + body: ImportMeetingRecording | Unset = UNSET, + +) -> Any | MeetingRecordingResponse | None: + """ Import a meeting recording + + Import an externally captured meeting recording and attach it to an incident. Video and transcript + are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings + endpoint invites a bot — this endpoint handles recordings that were captured outside of the bot + flow. + + Args: + incident_id (str): + body (ImportMeetingRecording | 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 | MeetingRecordingResponse + """ + + + return sync_detailed( + incident_id=incident_id, +client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + incident_id: str, + *, + client: AuthenticatedClient, + body: ImportMeetingRecording | Unset = UNSET, + +) -> Response[Any | MeetingRecordingResponse]: + """ Import a meeting recording + + Import an externally captured meeting recording and attach it to an incident. Video and transcript + are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings + endpoint invites a bot — this endpoint handles recordings that were captured outside of the bot + flow. + + Args: + incident_id (str): + body (ImportMeetingRecording | 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 | MeetingRecordingResponse] + """ + + + kwargs = _get_kwargs( + incident_id=incident_id, +body=body, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + incident_id: str, + *, + client: AuthenticatedClient, + body: ImportMeetingRecording | Unset = UNSET, + +) -> Any | MeetingRecordingResponse | None: + """ Import a meeting recording + + Import an externally captured meeting recording and attach it to an incident. Video and transcript + are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings + endpoint invites a bot — this endpoint handles recordings that were captured outside of the bot + flow. + + Args: + incident_id (str): + body (ImportMeetingRecording | 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 | MeetingRecordingResponse + """ + + + return (await asyncio_detailed( + incident_id=incident_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py index 28c334a2..3c28bf3d 100644 --- a/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py @@ -1,34 +1,49 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + +from ...models.meeting_recording_response import MeetingRecordingResponse +from typing import cast + 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=""), - ), + "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: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +51,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Leave a meeting call + +) -> Response[Any | MeetingRecordingResponse]: + """ 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 @@ -64,11 +80,13 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -77,13 +95,43 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Leave a meeting call + +) -> Response[Any | MeetingRecordingResponse]: + """ 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 @@ -97,13 +145,47 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py b/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py new file mode 100644 index 00000000..9b940071 --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py @@ -0,0 +1,226 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.meeting_recording_list import MeetingRecordingList +from ...types import UNSET, Unset +from typing import cast + + + +def _get_kwargs( + *, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, + +) -> dict[str, Any]: + + + + + params: dict[str, Any] = {} + + params["status"] = status + + params["platform"] = platform + + params["created_by"] = created_by + + + 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/meeting_recordings", + "params": params, + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> MeetingRecordingList | None: + if response.status_code == 200: + response_200 = MeetingRecordingList.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[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( + *, + client: AuthenticatedClient, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, + +) -> Response[MeetingRecordingList]: + """ List all meeting recordings + + List meeting recordings across the organization. Returns the current user's standalone recordings + plus incident-backed recordings the user can access. Supports filtering by status, platform, and + created_by. + + Args: + status (str | Unset): + platform (str | Unset): + created_by (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[MeetingRecordingList] + """ + + + kwargs = _get_kwargs( + status=status, +platform=platform, +created_by=created_by, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + *, + client: AuthenticatedClient, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, + +) -> MeetingRecordingList | None: + """ List all meeting recordings + + List meeting recordings across the organization. Returns the current user's standalone recordings + plus incident-backed recordings the user can access. Supports filtering by status, platform, and + created_by. + + Args: + status (str | Unset): + platform (str | Unset): + created_by (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: + MeetingRecordingList + """ + + + return sync_detailed( + client=client, +status=status, +platform=platform, +created_by=created_by, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, + +) -> Response[MeetingRecordingList]: + """ List all meeting recordings + + List meeting recordings across the organization. Returns the current user's standalone recordings + plus incident-backed recordings the user can access. Supports filtering by status, platform, and + created_by. + + Args: + status (str | Unset): + platform (str | Unset): + created_by (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[MeetingRecordingList] + """ + + + kwargs = _get_kwargs( + status=status, +platform=platform, +created_by=created_by, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + *, + client: AuthenticatedClient, + status: str | Unset = UNSET, + platform: str | Unset = UNSET, + created_by: str | Unset = UNSET, + +) -> MeetingRecordingList | None: + """ List all meeting recordings + + List meeting recordings across the organization. Returns the current user's standalone recordings + plus incident-backed recordings the user can access. Supports filtering by status, platform, and + created_by. + + Args: + status (str | Unset): + platform (str | Unset): + created_by (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: + MeetingRecordingList + """ + + + return (await asyncio_detailed( + client=client, +status=status, +platform=platform, +created_by=created_by, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py b/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py index 891b4d58..42379e74 100644 --- a/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py +++ b/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py @@ -4,10 +4,14 @@ import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.meeting_recording_list import MeetingRecordingList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -15,7 +19,11 @@ def _get_kwargs( *, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -23,25 +31,27 @@ def _get_kwargs( 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=""), - ), + "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: + +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: @@ -54,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[Any | MeetingRecordingList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( client: AuthenticatedClient, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[Any | MeetingRecordingList]: - """List meeting recordings + """ 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. @@ -88,12 +97,14 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -102,15 +113,15 @@ def sync_detailed( 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 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. @@ -126,15 +137,16 @@ def sync( Returns: Any | MeetingRecordingList - """ + """ + return sync_detailed( incident_id=incident_id, - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( incident_id: str, @@ -142,8 +154,9 @@ async def asyncio_detailed( client: AuthenticatedClient, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[Any | MeetingRecordingList]: - """List meeting recordings + """ 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. @@ -159,27 +172,31 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingList] - """ + """ + kwargs = _get_kwargs( incident_id=incident_id, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 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. @@ -195,13 +212,13 @@ async def asyncio( Returns: Any | MeetingRecordingList - """ - - return ( - await asyncio_detailed( - incident_id=incident_id, - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + 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 index 5deca74e..8451a9e8 100644 --- a/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py @@ -1,34 +1,49 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + +from ...models.meeting_recording_response import MeetingRecordingResponse +from typing import cast + 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=""), - ), + "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: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +51,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Pause a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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. @@ -63,11 +79,13 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -76,13 +94,42 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Pause a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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. @@ -95,13 +142,46 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py index 11c21c66..83489e61 100644 --- a/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py @@ -1,34 +1,49 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + +from ...models.meeting_recording_response import MeetingRecordingResponse +from typing import cast + 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=""), - ), + "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: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +51,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Resume a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ Resume a meeting recording Resume a paused recording session. The bot continues capturing audio/video from the meeting. @@ -62,11 +78,13 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -75,13 +93,41 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Resume a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ Resume a meeting recording Resume a paused recording session. The bot continues capturing audio/video from the meeting. @@ -93,13 +139,45 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/start_recording_session.py b/rootly_sdk/api/meeting_recordings/start_recording_session.py new file mode 100644 index 00000000..e9cc8a9d --- /dev/null +++ b/rootly_sdk/api/meeting_recordings/start_recording_session.py @@ -0,0 +1,202 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.start_session_request import StartSessionRequest +from ...models.start_session_response import StartSessionResponse +from ...types import UNSET, Unset +from typing import cast + + + +def _get_kwargs( + *, + body: StartSessionRequest | Unset = UNSET, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/meeting_recordings/start_session", + } + + + 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) -> Any | StartSessionResponse | None: + if response.status_code == 201: + response_201 = StartSessionResponse.from_dict(response.json()) + + + + return response_201 + + 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 | StartSessionResponse]: + 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: StartSessionRequest | Unset = UNSET, + +) -> Response[Any | StartSessionResponse]: + """ Start a recording session + + Start a new desktop recording session. The server creates a recording record and returns a stream + token the desktop client uses to send audio. No provider-specific configuration is needed from the + client. + + Args: + body (StartSessionRequest | 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 | StartSessionResponse] + """ + + + kwargs = _get_kwargs( + body=body, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + *, + client: AuthenticatedClient, + body: StartSessionRequest | Unset = UNSET, + +) -> Any | StartSessionResponse | None: + """ Start a recording session + + Start a new desktop recording session. The server creates a recording record and returns a stream + token the desktop client uses to send audio. No provider-specific configuration is needed from the + client. + + Args: + body (StartSessionRequest | 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 | StartSessionResponse + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: StartSessionRequest | Unset = UNSET, + +) -> Response[Any | StartSessionResponse]: + """ Start a recording session + + Start a new desktop recording session. The server creates a recording record and returns a stream + token the desktop client uses to send audio. No provider-specific configuration is needed from the + client. + + Args: + body (StartSessionRequest | 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 | StartSessionResponse] + """ + + + 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: StartSessionRequest | Unset = UNSET, + +) -> Any | StartSessionResponse | None: + """ Start a recording session + + Start a new desktop recording session. The server creates a recording record and returns a stream + token the desktop client uses to send audio. No provider-specific configuration is needed from the + client. + + Args: + body (StartSessionRequest | 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 | StartSessionResponse + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py index d17057a9..c8b5129c 100644 --- a/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py @@ -1,34 +1,49 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...types import Response +from ...types import Response, UNSET +from ... import errors + +from ...models.meeting_recording_response import MeetingRecordingResponse +from typing import cast + 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=""), - ), + "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: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: - return None + response_200 = MeetingRecordingResponse.from_dict(response.json()) + + + + return response_200 if response.status_code == 422: - return None + response_422 = cast(Any, None) + return response_422 if client.raise_on_unexpected_status: raise errors.UnexpectedStatus(response.status_code, response.content) @@ -36,7 +51,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -49,8 +64,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Stop a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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 @@ -64,11 +80,13 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -77,13 +95,43 @@ def sync_detailed( return _build_response(client=client, response=response) +def sync( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, -) -> Response[Any]: - """Stop a meeting recording + +) -> Response[Any | MeetingRecordingResponse]: + """ 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 @@ -97,13 +145,47 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any] - """ + Response[Any | MeetingRecordingResponse] + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) + +async def asyncio( + id: str, + *, + client: AuthenticatedClient, + +) -> Any | MeetingRecordingResponse | None: + """ 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: + Any | MeetingRecordingResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/on_call_pay_reports/__init__.py b/rootly_sdk/api/on_call_pay_reports/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/on_call_pay_reports/__init__.py +++ b/rootly_sdk/api/on_call_pay_reports/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" 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 index cf078832..cbd1e7a7 100644 --- 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 @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from typing import cast + def _get_kwargs( *, body: NewOnCallPayReport, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/on_call_pay_reports", @@ -24,28 +34,34 @@ def _get_kwargs( _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: + +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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallPayReportResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallPayReportResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewOnCallPayReport, + ) -> Response[ErrorsList | OnCallPayReportResponse]: - """Creates an On-Call Pay Report + """ Creates an On-Call Pay Report Generates a new on-call pay report for the given date range. The report is generated asynchronously. @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewOnCallPayReport, + ) -> ErrorsList | OnCallPayReportResponse | None: - """Creates an On-Call Pay Report + """ Creates an On-Call Pay Report Generates a new on-call pay report for the given date range. The report is generated asynchronously. @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | OnCallPayReportResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewOnCallPayReport, + ) -> Response[ErrorsList | OnCallPayReportResponse]: - """Creates an On-Call Pay Report + """ Creates an On-Call Pay Report Generates a new on-call pay report for the given date range. The report is generated asynchronously. @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 + """ Creates an On-Call Pay Report Generates a new on-call pay report for the given date range. The report is generated asynchronously. @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | OnCallPayReportResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py b/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py index e367d8f4..063465a6 100644 --- a/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py +++ b/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py @@ -1,50 +1,62 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.on_call_pay_report_response import OnCallPayReportResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, 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/on_call_pay_reports/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/on_call_pay_reports/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | OnCallPayReportResponse | None: + +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: @@ -53,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallPayReportResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallPayReportResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, + ) -> Response[ErrorsList | OnCallPayReportResponse]: - """Retrieves an On-Call Pay Report + """ Retrieves an On-Call Pay Report Retrieves a specific on-call pay report by id @@ -84,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -97,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: str | Unset = UNSET, + ) -> ErrorsList | OnCallPayReportResponse | None: - """Retrieves an On-Call Pay Report + """ Retrieves an On-Call Pay Report Retrieves a specific on-call pay report by id @@ -118,22 +131,24 @@ def sync( Returns: ErrorsList | OnCallPayReportResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: str | Unset = UNSET, + ) -> Response[ErrorsList | OnCallPayReportResponse]: - """Retrieves an On-Call Pay Report + """ Retrieves an On-Call Pay Report Retrieves a specific on-call pay report by id @@ -147,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: str | Unset = UNSET, + ) -> ErrorsList | OnCallPayReportResponse | None: - """Retrieves an On-Call Pay Report + """ Retrieves an On-Call Pay Report Retrieves a specific on-call pay report by id @@ -179,12 +198,12 @@ async def asyncio( Returns: ErrorsList | OnCallPayReportResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed 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 index b365e4b4..f4663fa4 100644 --- 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 @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.on_call_pay_report_list import OnCallPayReportList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -19,7 +24,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -39,21 +48,27 @@ def _get_kwargs( 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: @@ -82,8 +97,9 @@ def sync_detailed( 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 List on-call pay reports @@ -103,17 +119,19 @@ def sync_detailed( 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, +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( @@ -122,7 +140,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -134,8 +151,9 @@ def sync( 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 List on-call pay reports @@ -155,20 +173,21 @@ def sync( 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 +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( *, @@ -181,8 +200,9 @@ async def asyncio_detailed( 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 List on-call pay reports @@ -202,24 +222,27 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -231,8 +254,9 @@ async def asyncio( 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 List on-call pay reports @@ -252,18 +276,18 @@ async def asyncio( 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 + """ + + + 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 index a1d72c27..e5bbbefc 100644 --- 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 @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.on_call_pay_report_response import OnCallPayReportResponse -from ...types import Response +from typing import cast + 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=""), - ), + "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: + +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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallPayReportResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallPayReportResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallPayReportResponse]: - """Regenerate an On-Call Pay Report + """ Regenerate an On-Call Pay Report Triggers regeneration of an existing on-call pay report. @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OnCallPayReportResponse | None: - """Regenerate an On-Call Pay Report + """ Regenerate an On-Call Pay Report Triggers regeneration of an existing on-call pay report. @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | OnCallPayReportResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallPayReportResponse]: - """Regenerate an On-Call Pay Report + """ Regenerate an On-Call Pay Report Triggers regeneration of an existing on-call pay report. @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 + """ Regenerate an On-Call Pay Report Triggers regeneration of an existing on-call pay report. @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | OnCallPayReportResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + 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 index 7939e005..08a75e6f 100644 --- 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 @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from typing import cast + 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=""), - ), + "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: + +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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallPayReportResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallPayReportResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateOnCallPayReport, + ) -> Response[ErrorsList | OnCallPayReportResponse]: - """Update an On-Call Pay Report + """ Update an On-Call Pay Report Update a specific on-call pay report by id. Triggers report regeneration. @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( 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 an On-Call Pay Report Update a specific on-call pay report by id. Triggers report regeneration. @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | OnCallPayReportResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +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 an On-Call Pay Report Update a specific on-call pay report by id. Triggers report regeneration. @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 an On-Call Pay Report Update a specific on-call pay report by id. Triggers report regeneration. @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | OnCallPayReportResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/on_call_roles/__init__.py b/rootly_sdk/api/on_call_roles/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/on_call_roles/__init__.py +++ b/rootly_sdk/api/on_call_roles/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 322f9107..7ba8ee25 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 @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_on_call_role import NewOnCallRole from ...models.on_call_role_response import OnCallRoleResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewOnCallRole, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/on_call_roles", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | OnCallRoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallRoleResponse | None: if response.status_code == 201: response_201 = OnCallRoleResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallRoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewOnCallRole, + ) -> Response[ErrorsList | OnCallRoleResponse]: - """Creates an On-Call Role + """ Creates an On-Call Role Creates a new On-Call Role from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewOnCallRole, + ) -> ErrorsList | OnCallRoleResponse | None: - """Creates an On-Call Role + """ Creates an On-Call Role Creates a new On-Call Role from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | OnCallRoleResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewOnCallRole, + ) -> Response[ErrorsList | OnCallRoleResponse]: - """Creates an On-Call Role + """ Creates an On-Call Role Creates a new On-Call Role from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewOnCallRole, + ) -> ErrorsList | OnCallRoleResponse | None: - """Creates an On-Call Role + """ Creates an On-Call Role Creates a new On-Call Role from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | OnCallRoleResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed 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 3fe85371..9837a18e 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.on_call_role_response import OnCallRoleResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/on_call_roles/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/on_call_roles/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | OnCallRoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallRoleResponse | None: if response.status_code == 200: response_200 = OnCallRoleResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallRoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallRoleResponse]: - """Delete an On-Call Role + """ Delete an On-Call Role Delete a specific On-Call Role by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OnCallRoleResponse | None: - """Delete an On-Call Role + """ Delete an On-Call Role Delete a specific On-Call Role by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | OnCallRoleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallRoleResponse]: - """Delete an On-Call Role + """ Delete an On-Call Role Delete a specific On-Call Role by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OnCallRoleResponse | None: - """Delete an On-Call Role + """ Delete an On-Call Role Delete a specific On-Call Role by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | OnCallRoleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 b58a3457..4a77f349 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.on_call_role_response import OnCallRoleResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/on_call_roles/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/on_call_roles/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | OnCallRoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallRoleResponse | None: if response.status_code == 200: response_200 = OnCallRoleResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallRoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallRoleResponse]: - """Retrieves an On-Call Role + """ Retrieves an On-Call Role Retrieves a specific On-Call Role by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OnCallRoleResponse | None: - """Retrieves an On-Call Role + """ Retrieves an On-Call Role Retrieves a specific On-Call Role by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | OnCallRoleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallRoleResponse]: - """Retrieves an On-Call Role + """ Retrieves an On-Call Role Retrieves a specific On-Call Role by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OnCallRoleResponse | None: - """Retrieves an On-Call Role + """ Retrieves an On-Call Role Retrieves a specific On-Call Role by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | OnCallRoleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 cee91de5..b683999c 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 @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.on_call_role_list import OnCallRoleList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,7 +27,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -48,21 +57,27 @@ def _get_kwargs( 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/on_call_roles", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> OnCallRoleList | None: if response.status_code == 200: response_200 = OnCallRoleList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -94,8 +109,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[OnCallRoleList]: - """List On-Call Roles + """ List On-Call Roles List On-Call Roles @@ -118,20 +134,22 @@ def sync_detailed( Returns: Response[OnCallRoleList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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( @@ -140,7 +158,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -155,8 +172,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> OnCallRoleList | None: - """List On-Call Roles + """ List On-Call Roles List On-Call Roles @@ -179,23 +197,24 @@ def sync( Returns: OnCallRoleList - """ + """ + return sync_detailed( client=client, - include=include, - 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 +include=include, +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( *, @@ -211,8 +230,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[OnCallRoleList]: - """List On-Call Roles + """ List On-Call Roles List On-Call Roles @@ -235,27 +255,30 @@ async def asyncio_detailed( Returns: Response[OnCallRoleList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -270,8 +293,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> OnCallRoleList | None: - """List On-Call Roles + """ List On-Call Roles List On-Call Roles @@ -294,21 +318,21 @@ async def asyncio( Returns: OnCallRoleList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - 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 + """ + + + return (await asyncio_detailed( + client=client, +include=include, +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/on_call_roles/update_on_call_role.py b/rootly_sdk/api/on_call_roles/update_on_call_role.py index 9fc73101..c59ff1f5 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.on_call_role_response import OnCallRoleResponse from ...models.update_on_call_role import UpdateOnCallRole -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateOnCallRole, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/on_call_roles/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/on_call_roles/{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 | OnCallRoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallRoleResponse | None: if response.status_code == 200: response_200 = OnCallRoleResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallRoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateOnCallRole, + ) -> Response[ErrorsList | OnCallRoleResponse]: - """Update an On-Call Role + """ Update an On-Call Role Update a specific On-Call Role by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateOnCallRole, + ) -> ErrorsList | OnCallRoleResponse | None: - """Update an On-Call Role + """ Update an On-Call Role Update a specific On-Call Role by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | OnCallRoleResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateOnCallRole, + ) -> Response[ErrorsList | OnCallRoleResponse]: - """Update an On-Call Role + """ Update an On-Call Role Update a specific On-Call Role by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateOnCallRole, + ) -> ErrorsList | OnCallRoleResponse | None: - """Update an On-Call Role + """ Update an On-Call Role Update a specific On-Call Role by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | OnCallRoleResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/on_call_shadows/__init__.py b/rootly_sdk/api/on_call_shadows/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/on_call_shadows/__init__.py +++ b/rootly_sdk/api/on_call_shadows/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 e1038ade..328cc227 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_on_call_shadow import NewOnCallShadow from ...models.on_call_shadow_response import OnCallShadowResponse -from ...types import Response +from typing import cast + def _get_kwargs( schedule_id: str, *, body: NewOnCallShadow, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedules/{schedule_id}/on_call_shadows".format( - schedule_id=quote(str(schedule_id), safe=""), - ), + "url": "/v1/schedules/{schedule_id}/on_call_shadows".format(schedule_id=quote(str(schedule_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 | OnCallShadowResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallShadowResponse | None: if response.status_code == 201: response_201 = OnCallShadowResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallShadowResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallShadowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewOnCallShadow, + ) -> Response[ErrorsList | OnCallShadowResponse]: - """creates an shadow configuration + """ creates an shadow configuration Creates a new on call shadow configuration from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_id: str, *, client: AuthenticatedClient, body: NewOnCallShadow, + ) -> ErrorsList | OnCallShadowResponse | None: - """creates an shadow configuration + """ creates an shadow configuration Creates a new on call shadow configuration from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | OnCallShadowResponse - """ + """ + return sync_detailed( schedule_id=schedule_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, body: NewOnCallShadow, + ) -> Response[ErrorsList | OnCallShadowResponse]: - """creates an shadow configuration + """ creates an shadow configuration Creates a new on call shadow configuration from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_id: str, *, client: AuthenticatedClient, body: NewOnCallShadow, + ) -> ErrorsList | OnCallShadowResponse | None: - """creates an shadow configuration + """ creates an shadow configuration Creates a new on call shadow configuration from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | OnCallShadowResponse - """ - - return ( - await asyncio_detailed( - schedule_id=schedule_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_id=schedule_id, +client=client, +body=body, + + )).parsed 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 3892b844..847043ca 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.on_call_shadow_response import OnCallShadowResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/on_call_shadows/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/on_call_shadows/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | OnCallShadowResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallShadowResponse | None: if response.status_code == 200: response_200 = OnCallShadowResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallShadowResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallShadowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallShadowResponse]: - """Retrieves an On Call Shadow configuration by ID + """ Retrieves an On Call Shadow configuration by ID Retrieves a specific On Call Shadow configuration by ID @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OnCallShadowResponse | None: - """Retrieves an On Call Shadow configuration by ID + """ Retrieves an On Call Shadow configuration by ID Retrieves a specific On Call Shadow configuration by ID @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | OnCallShadowResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallShadowResponse]: - """Retrieves an On Call Shadow configuration by ID + """ Retrieves an On Call Shadow configuration by ID Retrieves a specific On Call Shadow configuration by ID @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OnCallShadowResponse | None: - """Retrieves an On Call Shadow configuration by ID + """ Retrieves an On Call Shadow configuration by ID Retrieves a specific On Call Shadow configuration by ID @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | OnCallShadowResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 310cdcf4..c2d218a5 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.on_call_shadows_list import OnCallShadowsList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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/schedules/{schedule_id}/on_call_shadows".format( - schedule_id=quote(str(schedule_id), safe=""), - ), + "url": "/v1/schedules/{schedule_id}/on_call_shadows".format(schedule_id=quote(str(schedule_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> OnCallShadowsList | None: if response.status_code == 200: response_200 = OnCallShadowsList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -67,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[OnCallShadowsList]: - """List On Call Shadows for Shift + """ List On Call Shadows for Shift List shadow shifts for schedule @@ -84,13 +97,15 @@ def sync_detailed( Returns: Response[OnCallShadowsList] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -99,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_id: str, *, @@ -107,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> OnCallShadowsList | None: - """List On Call Shadows for Shift + """ List On Call Shadows for Shift List shadow shifts for schedule @@ -124,16 +139,17 @@ def sync( Returns: OnCallShadowsList - """ + """ + return sync_detailed( schedule_id=schedule_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( schedule_id: str, @@ -142,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[OnCallShadowsList]: - """List On Call Shadows for Shift + """ List On Call Shadows for Shift List shadow shifts for schedule @@ -159,20 +176,23 @@ async def asyncio_detailed( Returns: Response[OnCallShadowsList] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_id: str, *, @@ -180,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> OnCallShadowsList | None: - """List On Call Shadows for Shift + """ List On Call Shadows for Shift List shadow shifts for schedule @@ -197,14 +218,14 @@ async def asyncio( Returns: OnCallShadowsList - """ - - return ( - await asyncio_detailed( - schedule_id=schedule_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_id=schedule_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 cbaeedb7..b03bb0ef 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.on_call_shadow_response import OnCallShadowResponse from ...models.update_on_call_shadow import UpdateOnCallShadow -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateOnCallShadow, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/on_call_shadows/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/on_call_shadows/{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 | OnCallShadowResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallShadowResponse | None: if response.status_code == 200: response_200 = OnCallShadowResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallShadowResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallShadowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateOnCallShadow, + ) -> Response[ErrorsList | OnCallShadowResponse]: - """Update an On Call Shadow configuration + """ Update an On Call Shadow configuration Update a specific on call shadow configuration by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateOnCallShadow, + ) -> ErrorsList | OnCallShadowResponse | None: - """Update an On Call Shadow configuration + """ Update an On Call Shadow configuration Update a specific on call shadow configuration by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | OnCallShadowResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateOnCallShadow, + ) -> Response[ErrorsList | OnCallShadowResponse]: - """Update an On Call Shadow configuration + """ Update an On Call Shadow configuration Update a specific on call shadow configuration by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateOnCallShadow, + ) -> ErrorsList | OnCallShadowResponse | None: - """Update an On Call Shadow configuration + """ Update an On Call Shadow configuration Update a specific on call shadow configuration by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | OnCallShadowResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/on_calls/__init__.py b/rootly_sdk/api/on_calls/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/on_calls/__init__.py +++ b/rootly_sdk/api/on_calls/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" 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 index 16c945b8..7e3312a9 100644 --- a/rootly_sdk/api/on_calls/list_oncalls.py +++ b/rootly_sdk/api/on_calls/list_oncalls.py @@ -1,13 +1,20 @@ 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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList +from ...models.list_oncalls_include import check_list_oncalls_include from ...models.list_oncalls_include import ListOncallsInclude -from ...types import UNSET, Response, Unset +from ...models.oncall_list import OncallList +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -23,7 +30,11 @@ def _get_kwargs( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -53,30 +64,41 @@ def _get_kwargs( 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] = { "method": "get", "url": "/v1/oncalls", "params": params, } + return _kwargs -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OncallList | None: if response.status_code == 200: - response_200 = cast(Any, None) + response_200 = OncallList.from_dict(response.json()) + + + 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: @@ -85,7 +107,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OncallList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -108,8 +130,9 @@ def sync_detailed( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, -) -> Response[Any | ErrorsList]: - """List on-calls + +) -> Response[ErrorsList | OncallList]: + """ 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. @@ -132,21 +155,23 @@ def sync_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any | ErrorsList] - """ + Response[ErrorsList | OncallList] + """ + 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, - filternotification_types=filternotification_types, +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, +filternotification_types=filternotification_types, + ) response = client.get_httpx_client().request( @@ -155,7 +180,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -170,8 +194,9 @@ def sync( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, -) -> Any | ErrorsList | None: - """List on-calls + +) -> ErrorsList | OncallList | 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. @@ -194,24 +219,25 @@ def sync( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Any | ErrorsList - """ + ErrorsList | OncallList + """ + 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, - filternotification_types=filternotification_types, - ).parsed +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, +filternotification_types=filternotification_types, + ).parsed async def asyncio_detailed( *, @@ -227,8 +253,9 @@ async def asyncio_detailed( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, -) -> Response[Any | ErrorsList]: - """List on-calls + +) -> Response[ErrorsList | OncallList]: + """ 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. @@ -251,28 +278,31 @@ async def asyncio_detailed( httpx.TimeoutException: If the request takes longer than Client.timeout. Returns: - Response[Any | ErrorsList] - """ + Response[ErrorsList | OncallList] + """ + 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, - filternotification_types=filternotification_types, +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, +filternotification_types=filternotification_types, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -287,8 +317,9 @@ async def asyncio( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, -) -> Any | ErrorsList | None: - """List on-calls + +) -> ErrorsList | OncallList | 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. @@ -311,22 +342,22 @@ async def asyncio( 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, - filternotification_types=filternotification_types, - ) - ).parsed + ErrorsList | OncallList + """ + + + 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, +filternotification_types=filternotification_types, + + )).parsed diff --git a/rootly_sdk/api/override_shifts/__init__.py b/rootly_sdk/api/override_shifts/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/override_shifts/__init__.py +++ b/rootly_sdk/api/override_shifts/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/override_shifts/create_override_shift.py b/rootly_sdk/api/override_shifts/create_override_shift.py index e208220a..c761020c 100644 --- a/rootly_sdk/api/override_shifts/create_override_shift.py +++ b/rootly_sdk/api/override_shifts/create_override_shift.py @@ -1,55 +1,75 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_override_shift import NewOverrideShift from ...models.override_shift_response import OverrideShiftResponse -from ...types import Response +from typing import cast + def _get_kwargs( schedule_id: str, *, body: NewOverrideShift, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedules/{schedule_id}/override_shifts".format( - schedule_id=quote(str(schedule_id), safe=""), - ), + "url": "/v1/schedules/{schedule_id}/override_shifts".format(schedule_id=quote(str(schedule_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 | OverrideShiftResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OverrideShiftResponse | None: + if response.status_code == 200: + response_200 = OverrideShiftResponse.from_dict(response.json()) + + + + return response_200 + if response.status_code == 201: response_201 = OverrideShiftResponse.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: @@ -58,9 +78,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OverrideShiftResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OverrideShiftResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,11 +92,14 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewOverrideShift, + ) -> Response[ErrorsList | OverrideShiftResponse]: - """creates an override shift + """ creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the - specified time range, they will be automatically deleted and replaced by the new override. + specified time range, they will be automatically deleted and replaced by the new override. This + endpoint is idempotent: re-sending an identical override (same user and same start/end time) returns + the existing override with a 200 status and does not recreate it. Args: schedule_id (str): @@ -90,11 +111,13 @@ def sync_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -103,17 +126,19 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_id: str, *, client: AuthenticatedClient, body: NewOverrideShift, + ) -> ErrorsList | OverrideShiftResponse | None: - """creates an override shift + """ creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the - specified time range, they will be automatically deleted and replaced by the new override. + specified time range, they will be automatically deleted and replaced by the new override. This + endpoint is idempotent: re-sending an identical override (same user and same start/end time) returns + the existing override with a 200 status and does not recreate it. Args: schedule_id (str): @@ -125,25 +150,29 @@ def sync( Returns: ErrorsList | OverrideShiftResponse - """ + """ + return sync_detailed( schedule_id=schedule_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, body: NewOverrideShift, + ) -> Response[ErrorsList | OverrideShiftResponse]: - """creates an override shift + """ creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the - specified time range, they will be automatically deleted and replaced by the new override. + specified time range, they will be automatically deleted and replaced by the new override. This + endpoint is idempotent: re-sending an identical override (same user and same start/end time) returns + the existing override with a 200 status and does not recreate it. Args: schedule_id (str): @@ -155,28 +184,34 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_id: str, *, client: AuthenticatedClient, body: NewOverrideShift, + ) -> ErrorsList | OverrideShiftResponse | None: - """creates an override shift + """ creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the - specified time range, they will be automatically deleted and replaced by the new override. + specified time range, they will be automatically deleted and replaced by the new override. This + endpoint is idempotent: re-sending an identical override (same user and same start/end time) returns + the existing override with a 200 status and does not recreate it. Args: schedule_id (str): @@ -188,12 +223,12 @@ async def asyncio( Returns: ErrorsList | OverrideShiftResponse - """ - - return ( - await asyncio_detailed( - schedule_id=schedule_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_id=schedule_id, +client=client, +body=body, + + )).parsed 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 ee1f2e0d..8b0d9613 100644 --- a/rootly_sdk/api/override_shifts/delete_on_call_shadow.py +++ b/rootly_sdk/api/override_shifts/delete_on_call_shadow.py @@ -1,46 +1,59 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.on_call_shadow_response import OnCallShadowResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/on_call_shadows/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/on_call_shadows/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | OnCallShadowResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallShadowResponse | None: if response.status_code == 200: response_200 = OnCallShadowResponse.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: @@ -49,9 +62,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OnCallShadowResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallShadowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +75,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallShadowResponse]: - """Delete an on call shadow configuration + """ Delete an on call shadow configuration 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. @@ -79,10 +91,12 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -91,13 +105,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OnCallShadowResponse | None: - """Delete an on call shadow configuration + """ Delete an on call shadow configuration 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. @@ -111,20 +125,22 @@ def sync( Returns: ErrorsList | OnCallShadowResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OnCallShadowResponse]: - """Delete an on call shadow configuration + """ Delete an on call shadow configuration 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. @@ -138,23 +154,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OnCallShadowResponse | None: - """Delete an on call shadow configuration + """ Delete an on call shadow configuration 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. @@ -168,11 +188,11 @@ async def asyncio( Returns: ErrorsList | OnCallShadowResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/override_shifts/delete_override_shift.py b/rootly_sdk/api/override_shifts/delete_override_shift.py index 200bc1a1..6165f554 100644 --- a/rootly_sdk/api/override_shifts/delete_override_shift.py +++ b/rootly_sdk/api/override_shifts/delete_override_shift.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.override_shift_response import OverrideShiftResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/override_shifts/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/override_shifts/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | OverrideShiftResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OverrideShiftResponse | None: if response.status_code == 200: response_200 = OverrideShiftResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OverrideShiftResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OverrideShiftResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OverrideShiftResponse]: - """Delete an override shift + """ Delete an override shift Delete a specific override shift by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OverrideShiftResponse | None: - """Delete an override shift + """ Delete an override shift Delete a specific override shift by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | OverrideShiftResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OverrideShiftResponse]: - """Delete an override shift + """ Delete an override shift Delete a specific override shift by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OverrideShiftResponse | None: - """Delete an override shift + """ Delete an override shift Delete a specific override shift by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | OverrideShiftResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/override_shifts/get_override_shift.py b/rootly_sdk/api/override_shifts/get_override_shift.py index 1116f33d..322a7566 100644 --- a/rootly_sdk/api/override_shifts/get_override_shift.py +++ b/rootly_sdk/api/override_shifts/get_override_shift.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.override_shift_response import OverrideShiftResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/override_shifts/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/override_shifts/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | OverrideShiftResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OverrideShiftResponse | None: if response.status_code == 200: response_200 = OverrideShiftResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OverrideShiftResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OverrideShiftResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OverrideShiftResponse]: - """Retrieves an override shift + """ Retrieves an override shift Retrieves a specific override shift by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OverrideShiftResponse | None: - """Retrieves an override shift + """ Retrieves an override shift Retrieves a specific override shift by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | OverrideShiftResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | OverrideShiftResponse]: - """Retrieves an override shift + """ Retrieves an override shift Retrieves a specific override shift by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | OverrideShiftResponse | None: - """Retrieves an override shift + """ Retrieves an override shift Retrieves a specific override shift by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | OverrideShiftResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/override_shifts/list_override_shifts.py b/rootly_sdk/api/override_shifts/list_override_shifts.py index 8370ff93..c28117bc 100644 --- a/rootly_sdk/api/override_shifts/list_override_shifts.py +++ b/rootly_sdk/api/override_shifts/list_override_shifts.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.override_shift_list import OverrideShiftList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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/schedules/{schedule_id}/override_shifts".format( - schedule_id=quote(str(schedule_id), safe=""), - ), + "url": "/v1/schedules/{schedule_id}/override_shifts".format(schedule_id=quote(str(schedule_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> OverrideShiftList | None: if response.status_code == 200: response_200 = OverrideShiftList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -67,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[OverrideShiftList]: - """List override shifts + """ List override shifts List override shifts @@ -84,13 +97,15 @@ def sync_detailed( Returns: Response[OverrideShiftList] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -99,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_id: str, *, @@ -107,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> OverrideShiftList | None: - """List override shifts + """ List override shifts List override shifts @@ -124,16 +139,17 @@ def sync( Returns: OverrideShiftList - """ + """ + return sync_detailed( schedule_id=schedule_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( schedule_id: str, @@ -142,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[OverrideShiftList]: - """List override shifts + """ List override shifts List override shifts @@ -159,20 +176,23 @@ async def asyncio_detailed( Returns: Response[OverrideShiftList] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_id: str, *, @@ -180,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> OverrideShiftList | None: - """List override shifts + """ List override shifts List override shifts @@ -197,14 +218,14 @@ async def asyncio( Returns: OverrideShiftList - """ - - return ( - await asyncio_detailed( - schedule_id=schedule_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_id=schedule_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/override_shifts/update_override_shift.py b/rootly_sdk/api/override_shifts/update_override_shift.py index 3f692427..db880ac8 100644 --- a/rootly_sdk/api/override_shifts/update_override_shift.py +++ b/rootly_sdk/api/override_shifts/update_override_shift.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.override_shift_response import OverrideShiftResponse from ...models.update_override_shift import UpdateOverrideShift -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateOverrideShift, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/override_shifts/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/override_shifts/{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 | OverrideShiftResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OverrideShiftResponse | None: if response.status_code == 200: response_200 = OverrideShiftResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | OverrideShiftResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OverrideShiftResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateOverrideShift, + ) -> Response[ErrorsList | OverrideShiftResponse]: - """Update an override shift + """ Update an override shift Update a specific override shift by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateOverrideShift, + ) -> ErrorsList | OverrideShiftResponse | None: - """Update an override shift + """ Update an override shift Update a specific override shift by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | OverrideShiftResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateOverrideShift, + ) -> Response[ErrorsList | OverrideShiftResponse]: - """Update an override shift + """ Update an override shift Update a specific override shift by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateOverrideShift, + ) -> ErrorsList | OverrideShiftResponse | None: - """Update an override shift + """ Update an override shift Update a specific override shift by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | OverrideShiftResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/playbook_tasks/__init__.py b/rootly_sdk/api/playbook_tasks/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/playbook_tasks/__init__.py +++ b/rootly_sdk/api/playbook_tasks/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/playbook_tasks/create_playbook_task.py b/rootly_sdk/api/playbook_tasks/create_playbook_task.py index 4589a663..7b315557 100644 --- a/rootly_sdk/api/playbook_tasks/create_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/create_playbook_task.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_playbook_task import NewPlaybookTask from ...models.playbook_task_response import PlaybookTaskResponse -from ...types import Response +from typing import cast + def _get_kwargs( playbook_id: str, *, body: NewPlaybookTask, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/playbooks/{playbook_id}/playbook_tasks".format( - playbook_id=quote(str(playbook_id), safe=""), - ), + "url": "/v1/playbooks/{playbook_id}/playbook_tasks".format(playbook_id=quote(str(playbook_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 | PlaybookTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookTaskResponse | None: if response.status_code == 201: response_201 = PlaybookTaskResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PlaybookTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewPlaybookTask, + ) -> Response[ErrorsList | PlaybookTaskResponse]: - """Creates a playbook task + """ Creates a playbook task Creates a new task from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ + """ + kwargs = _get_kwargs( playbook_id=playbook_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( playbook_id: str, *, client: AuthenticatedClient, body: NewPlaybookTask, + ) -> ErrorsList | PlaybookTaskResponse | None: - """Creates a playbook task + """ Creates a playbook task Creates a new task from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | PlaybookTaskResponse - """ + """ + return sync_detailed( playbook_id=playbook_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( playbook_id: str, *, client: AuthenticatedClient, body: NewPlaybookTask, + ) -> Response[ErrorsList | PlaybookTaskResponse]: - """Creates a playbook task + """ Creates a playbook task Creates a new task from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ + """ + kwargs = _get_kwargs( playbook_id=playbook_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( playbook_id: str, *, client: AuthenticatedClient, body: NewPlaybookTask, + ) -> ErrorsList | PlaybookTaskResponse | None: - """Creates a playbook task + """ Creates a playbook task Creates a new task from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | PlaybookTaskResponse - """ - - return ( - await asyncio_detailed( - playbook_id=playbook_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + playbook_id=playbook_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/playbook_tasks/delete_playbook_task.py b/rootly_sdk/api/playbook_tasks/delete_playbook_task.py index 9c9328d4..809f79a1 100644 --- a/rootly_sdk/api/playbook_tasks/delete_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/delete_playbook_task.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.playbook_task_response import PlaybookTaskResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/playbook_tasks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/playbook_tasks/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | PlaybookTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookTaskResponse | None: if response.status_code == 200: response_200 = PlaybookTaskResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PlaybookTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PlaybookTaskResponse]: - """Delete a playbook task + """ Delete a playbook task Delete a specific playbook task by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | PlaybookTaskResponse | None: - """Delete a playbook task + """ Delete a playbook task Delete a specific playbook task by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | PlaybookTaskResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PlaybookTaskResponse]: - """Delete a playbook task + """ Delete a playbook task Delete a specific playbook task by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | PlaybookTaskResponse | None: - """Delete a playbook task + """ Delete a playbook task Delete a specific playbook task by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | PlaybookTaskResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/playbook_tasks/get_playbook_task.py b/rootly_sdk/api/playbook_tasks/get_playbook_task.py index 415605da..b0c6d45c 100644 --- a/rootly_sdk/api/playbook_tasks/get_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/get_playbook_task.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.playbook_task_response import PlaybookTaskResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/playbook_tasks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/playbook_tasks/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | PlaybookTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookTaskResponse | None: if response.status_code == 200: response_200 = PlaybookTaskResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PlaybookTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PlaybookTaskResponse]: - """Retrieves a playbook task + """ Retrieves a playbook task Retrieves a specific playbook_task by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | PlaybookTaskResponse | None: - """Retrieves a playbook task + """ Retrieves a playbook task Retrieves a specific playbook_task by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | PlaybookTaskResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PlaybookTaskResponse]: - """Retrieves a playbook task + """ Retrieves a playbook task Retrieves a specific playbook_task by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | PlaybookTaskResponse | None: - """Retrieves a playbook task + """ Retrieves a playbook task Retrieves a specific playbook_task by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | PlaybookTaskResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py b/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py index cc9e0fa2..da240e21 100644 --- a/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py +++ b/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.playbook_task_list import PlaybookTaskList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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/playbooks/{playbook_id}/playbook_tasks".format( - playbook_id=quote(str(playbook_id), safe=""), - ), + "url": "/v1/playbooks/{playbook_id}/playbook_tasks".format(playbook_id=quote(str(playbook_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PlaybookTaskList | None: if response.status_code == 200: response_200 = PlaybookTaskList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -67,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[PlaybookTaskList]: - """List playbook tasks + """ List playbook tasks List playbook tasks @@ -84,13 +97,15 @@ def sync_detailed( Returns: Response[PlaybookTaskList] - """ + """ + kwargs = _get_kwargs( playbook_id=playbook_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -99,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( playbook_id: str, *, @@ -107,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> PlaybookTaskList | None: - """List playbook tasks + """ List playbook tasks List playbook tasks @@ -124,16 +139,17 @@ def sync( Returns: PlaybookTaskList - """ + """ + return sync_detailed( playbook_id=playbook_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( playbook_id: str, @@ -142,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[PlaybookTaskList]: - """List playbook tasks + """ List playbook tasks List playbook tasks @@ -159,20 +176,23 @@ async def asyncio_detailed( Returns: Response[PlaybookTaskList] - """ + """ + kwargs = _get_kwargs( playbook_id=playbook_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( playbook_id: str, *, @@ -180,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> PlaybookTaskList | None: - """List playbook tasks + """ List playbook tasks List playbook tasks @@ -197,14 +218,14 @@ async def asyncio( Returns: PlaybookTaskList - """ - - return ( - await asyncio_detailed( - playbook_id=playbook_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + playbook_id=playbook_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/playbook_tasks/update_playbook_task.py b/rootly_sdk/api/playbook_tasks/update_playbook_task.py index b84699b6..0603f570 100644 --- a/rootly_sdk/api/playbook_tasks/update_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/update_playbook_task.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.playbook_task_response import PlaybookTaskResponse from ...models.update_playbook_task import UpdatePlaybookTask -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdatePlaybookTask, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/playbook_tasks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/playbook_tasks/{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 | PlaybookTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookTaskResponse | None: if response.status_code == 200: response_200 = PlaybookTaskResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PlaybookTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePlaybookTask, + ) -> Response[ErrorsList | PlaybookTaskResponse]: - """Update a playbook task + """ Update a playbook task Update a specific playbook task by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdatePlaybookTask, + ) -> ErrorsList | PlaybookTaskResponse | None: - """Update a playbook task + """ Update a playbook task Update a specific playbook task by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | PlaybookTaskResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdatePlaybookTask, + ) -> Response[ErrorsList | PlaybookTaskResponse]: - """Update a playbook task + """ Update a playbook task Update a specific playbook task by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdatePlaybookTask, + ) -> ErrorsList | PlaybookTaskResponse | None: - """Update a playbook task + """ Update a playbook task Update a specific playbook task by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | PlaybookTaskResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/playbooks/__init__.py b/rootly_sdk/api/playbooks/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/playbooks/__init__.py +++ b/rootly_sdk/api/playbooks/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/playbooks/create_playbook.py b/rootly_sdk/api/playbooks/create_playbook.py index cee3273e..df70c5d5 100644 --- a/rootly_sdk/api/playbooks/create_playbook.py +++ b/rootly_sdk/api/playbooks/create_playbook.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_playbook import NewPlaybook from ...models.playbook_response import PlaybookResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewPlaybook, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/playbooks", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | PlaybookResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookResponse | None: if response.status_code == 201: response_201 = PlaybookResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PlaybookResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewPlaybook, + ) -> Response[ErrorsList | PlaybookResponse]: - """Creates a playbook + """ Creates a playbook Creates a new playbook from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewPlaybook, + ) -> ErrorsList | PlaybookResponse | None: - """Creates a playbook + """ Creates a playbook Creates a new playbook from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | PlaybookResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewPlaybook, + ) -> Response[ErrorsList | PlaybookResponse]: - """Creates a playbook + """ Creates a playbook Creates a new playbook from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewPlaybook, + ) -> ErrorsList | PlaybookResponse | None: - """Creates a playbook + """ Creates a playbook Creates a new playbook from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | PlaybookResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/playbooks/delete_playbook.py b/rootly_sdk/api/playbooks/delete_playbook.py index f666eef3..50a2ca88 100644 --- a/rootly_sdk/api/playbooks/delete_playbook.py +++ b/rootly_sdk/api/playbooks/delete_playbook.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.playbook_response import PlaybookResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/playbooks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/playbooks/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | PlaybookResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookResponse | None: if response.status_code == 200: response_200 = PlaybookResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PlaybookResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PlaybookResponse]: - """Delete a playbook + """ Delete a playbook Delete a specific playbook by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | PlaybookResponse | None: - """Delete a playbook + """ Delete a playbook Delete a specific playbook by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | PlaybookResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PlaybookResponse]: - """Delete a playbook + """ Delete a playbook Delete a specific playbook by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | PlaybookResponse | None: - """Delete a playbook + """ Delete a playbook Delete a specific playbook by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | PlaybookResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/playbooks/get_playbook.py b/rootly_sdk/api/playbooks/get_playbook.py index 7faea0c0..06063d8b 100644 --- a/rootly_sdk/api/playbooks/get_playbook.py +++ b/rootly_sdk/api/playbooks/get_playbook.py @@ -1,22 +1,31 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList +from ...models.get_playbook_include import check_get_playbook_include from ...models.get_playbook_include import GetPlaybookInclude from ...models.playbook_response import PlaybookResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetPlaybookInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,30 +35,34 @@ def _get_kwargs( params["include"] = json_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/playbooks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/playbooks/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | PlaybookResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookResponse | None: if response.status_code == 200: response_200 = PlaybookResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PlaybookResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetPlaybookInclude | Unset = UNSET, + ) -> Response[ErrorsList | PlaybookResponse]: - """Retrieves a playbook + """ Retrieves a playbook Retrieves a specific playbook by id @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetPlaybookInclude | Unset = UNSET, + ) -> ErrorsList | PlaybookResponse | None: - """Retrieves a playbook + """ Retrieves a playbook Retrieves a specific playbook by id @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | PlaybookResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetPlaybookInclude | Unset = UNSET, + ) -> Response[ErrorsList | PlaybookResponse]: - """Retrieves a playbook + """ Retrieves a playbook Retrieves a specific playbook by id @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetPlaybookInclude | Unset = UNSET, + ) -> ErrorsList | PlaybookResponse | None: - """Retrieves a playbook + """ Retrieves a playbook Retrieves a specific playbook by id @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | PlaybookResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/playbooks/list_playbooks.py b/rootly_sdk/api/playbooks/list_playbooks.py index 0326a21d..7139e3c1 100644 --- a/rootly_sdk/api/playbooks/list_playbooks.py +++ b/rootly_sdk/api/playbooks/list_playbooks.py @@ -1,13 +1,19 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.list_playbooks_include import check_list_playbooks_include from ...models.list_playbooks_include import ListPlaybooksInclude from ...models.playbook_list import PlaybookList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -15,7 +21,11 @@ def _get_kwargs( include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,21 +39,27 @@ def _get_kwargs( 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/playbooks", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PlaybookList | None: if response.status_code == 200: response_200 = PlaybookList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -67,8 +83,9 @@ def sync_detailed( include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[PlaybookList]: - """List playbooks + """ List playbooks List playbooks @@ -83,12 +100,14 @@ def sync_detailed( Returns: Response[PlaybookList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -97,15 +116,15 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> PlaybookList | None: - """List playbooks + """ List playbooks List playbooks @@ -120,15 +139,16 @@ def sync( Returns: PlaybookList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -136,8 +156,9 @@ async def asyncio_detailed( include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[PlaybookList]: - """List playbooks + """ List playbooks List playbooks @@ -152,27 +173,31 @@ async def asyncio_detailed( Returns: Response[PlaybookList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> PlaybookList | None: - """List playbooks + """ List playbooks List playbooks @@ -187,13 +212,13 @@ async def asyncio( Returns: PlaybookList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/playbooks/update_playbook.py b/rootly_sdk/api/playbooks/update_playbook.py index 9fe8a131..0401e2e4 100644 --- a/rootly_sdk/api/playbooks/update_playbook.py +++ b/rootly_sdk/api/playbooks/update_playbook.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.playbook_response import PlaybookResponse from ...models.update_playbook import UpdatePlaybook -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdatePlaybook, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/playbooks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/playbooks/{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 | PlaybookResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookResponse | None: if response.status_code == 200: response_200 = PlaybookResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PlaybookResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePlaybook, + ) -> Response[ErrorsList | PlaybookResponse]: - """Update a playbook + """ Update a playbook Update a specific playbook by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdatePlaybook, + ) -> ErrorsList | PlaybookResponse | None: - """Update a playbook + """ Update a playbook Update a specific playbook by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | PlaybookResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdatePlaybook, + ) -> Response[ErrorsList | PlaybookResponse]: - """Update a playbook + """ Update a playbook Update a specific playbook by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdatePlaybook, + ) -> ErrorsList | PlaybookResponse | None: - """Update a playbook + """ Update a playbook Update a specific playbook by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | PlaybookResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/pulses/__init__.py b/rootly_sdk/api/pulses/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/pulses/__init__.py +++ b/rootly_sdk/api/pulses/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/pulses/create_pulse.py b/rootly_sdk/api/pulses/create_pulse.py index 30b82b81..1f4c302d 100644 --- a/rootly_sdk/api/pulses/create_pulse.py +++ b/rootly_sdk/api/pulses/create_pulse.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_pulse import NewPulse from ...models.pulse_response import PulseResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewPulse, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/pulses", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | PulseResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PulseResponse | None: if response.status_code == 201: response_201 = PulseResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PulseResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PulseResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewPulse, + ) -> Response[ErrorsList | PulseResponse]: - """Creates a pulse + """ Creates a pulse Creates a new pulse from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | PulseResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewPulse, + ) -> ErrorsList | PulseResponse | None: - """Creates a pulse + """ Creates a pulse Creates a new pulse from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | PulseResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewPulse, + ) -> Response[ErrorsList | PulseResponse]: - """Creates a pulse + """ Creates a pulse Creates a new pulse from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PulseResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewPulse, + ) -> ErrorsList | PulseResponse | None: - """Creates a pulse + """ Creates a pulse Creates a new pulse from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | PulseResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/pulses/get_pulse.py b/rootly_sdk/api/pulses/get_pulse.py index 1d751fd4..d7357bf5 100644 --- a/rootly_sdk/api/pulses/get_pulse.py +++ b/rootly_sdk/api/pulses/get_pulse.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.pulse_response import PulseResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/pulses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/pulses/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | PulseResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PulseResponse | None: if response.status_code == 200: response_200 = PulseResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PulseResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PulseResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PulseResponse]: - """Retrieves a pulse + """ Retrieves a pulse Retrieves a specific pulse by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | PulseResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | PulseResponse | None: - """Retrieves a pulse + """ Retrieves a pulse Retrieves a specific pulse by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | PulseResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PulseResponse]: - """Retrieves a pulse + """ Retrieves a pulse Retrieves a specific pulse by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PulseResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | PulseResponse | None: - """Retrieves a pulse + """ Retrieves a pulse Retrieves a specific pulse by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | PulseResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/pulses/list_pulses.py b/rootly_sdk/api/pulses/list_pulses.py index 45c9eeef..a7073f79 100644 --- a/rootly_sdk/api/pulses/list_pulses.py +++ b/rootly_sdk/api/pulses/list_pulses.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.pulse_list import PulseList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -29,9 +34,33 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -71,25 +100,71 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[source][eq]"] = filtersourceeq + + params["filter[source][not_eq]"] = filtersourcenot_eq + + params["filter[source][in]"] = filtersourcein + + params["filter[source][not_in]"] = filtersourcenot_in + + params["filter[services][eq]"] = filterserviceseq + + params["filter[services][not_eq]"] = filterservicesnot_eq + + params["filter[services][in]"] = filterservicesin + + params["filter[services][not_in]"] = filterservicesnot_in + + params["filter[environments][eq]"] = filterenvironmentseq + + params["filter[environments][not_eq]"] = filterenvironmentsnot_eq + + params["filter[environments][in]"] = filterenvironmentsin + + params["filter[environments][not_in]"] = filterenvironmentsnot_in + + params["filter[labels][eq]"] = filterlabelseq + + params["filter[labels][not_eq]"] = filterlabelsnot_eq + + params["filter[labels][in]"] = filterlabelsin + + params["filter[labels][not_in]"] = filterlabelsnot_in + + params["filter[refs][eq]"] = filterrefseq + + params["filter[refs][not_eq]"] = filterrefsnot_eq + + params["filter[refs][in]"] = filterrefsin + + params["filter[refs][not_in]"] = filterrefsnot_in + 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/pulses", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PulseList | None: if response.status_code == 200: response_200 = PulseList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -128,10 +203,31 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[PulseList]: - """List pulses + """ List pulses List pulses @@ -154,6 +250,26 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterrefseq (str | Unset): + filterrefsnot_eq (str | Unset): + filterrefsin (str | Unset): + filterrefsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -163,29 +279,51 @@ def sync_detailed( Returns: Response[PulseList] - """ + """ + kwargs = _get_kwargs( include=include, - filtersource=filtersource, - filterservices=filterservices, - filterenvironments=filterenvironments, - filterlabels=filterlabels, - filterrefs=filterrefs, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterended_atgt=filterended_atgt, - filterended_atgte=filterended_atgte, - filterended_atlt=filterended_atlt, - filterended_atlte=filterended_atlte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, +filtersource=filtersource, +filterservices=filterservices, +filterenvironments=filterenvironments, +filterlabels=filterlabels, +filterrefs=filterrefs, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterended_atgt=filterended_atgt, +filterended_atgte=filterended_atgte, +filterended_atlt=filterended_atlt, +filterended_atlte=filterended_atlte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +filterrefseq=filterrefseq, +filterrefsnot_eq=filterrefsnot_eq, +filterrefsin=filterrefsin, +filterrefsnot_in=filterrefsnot_in, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -194,7 +332,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -216,10 +353,31 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> PulseList | None: - """List pulses + """ List pulses List pulses @@ -242,6 +400,26 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterrefseq (str | Unset): + filterrefsnot_eq (str | Unset): + filterrefsin (str | Unset): + filterrefsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -251,32 +429,53 @@ def sync( Returns: PulseList - """ + """ + return sync_detailed( client=client, - include=include, - filtersource=filtersource, - filterservices=filterservices, - filterenvironments=filterenvironments, - filterlabels=filterlabels, - filterrefs=filterrefs, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterended_atgt=filterended_atgt, - filterended_atgte=filterended_atgte, - filterended_atlt=filterended_atlt, - filterended_atlte=filterended_atlte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +filtersource=filtersource, +filterservices=filterservices, +filterenvironments=filterenvironments, +filterlabels=filterlabels, +filterrefs=filterrefs, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterended_atgt=filterended_atgt, +filterended_atgte=filterended_atgte, +filterended_atlt=filterended_atlt, +filterended_atlte=filterended_atlte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +filterrefseq=filterrefseq, +filterrefsnot_eq=filterrefsnot_eq, +filterrefsin=filterrefsin, +filterrefsnot_in=filterrefsnot_in, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -299,10 +498,31 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[PulseList]: - """List pulses + """ List pulses List pulses @@ -325,6 +545,26 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterrefseq (str | Unset): + filterrefsnot_eq (str | Unset): + filterrefsin (str | Unset): + filterrefsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -334,36 +574,59 @@ async def asyncio_detailed( Returns: Response[PulseList] - """ + """ + kwargs = _get_kwargs( include=include, - filtersource=filtersource, - filterservices=filterservices, - filterenvironments=filterenvironments, - filterlabels=filterlabels, - filterrefs=filterrefs, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterended_atgt=filterended_atgt, - filterended_atgte=filterended_atgte, - filterended_atlt=filterended_atlt, - filterended_atlte=filterended_atlte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, +filtersource=filtersource, +filterservices=filterservices, +filterenvironments=filterenvironments, +filterlabels=filterlabels, +filterrefs=filterrefs, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterended_atgt=filterended_atgt, +filterended_atgte=filterended_atgte, +filterended_atlt=filterended_atlt, +filterended_atlte=filterended_atlte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +filterrefseq=filterrefseq, +filterrefsnot_eq=filterrefsnot_eq, +filterrefsin=filterrefsin, +filterrefsnot_in=filterrefsnot_in, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -385,10 +648,31 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filtersourceeq: str | Unset = UNSET, + filtersourcenot_eq: str | Unset = UNSET, + filtersourcein: str | Unset = UNSET, + filtersourcenot_in: str | Unset = UNSET, + filterserviceseq: str | Unset = UNSET, + filterservicesnot_eq: str | Unset = UNSET, + filterservicesin: str | Unset = UNSET, + filterservicesnot_in: str | Unset = UNSET, + filterenvironmentseq: str | Unset = UNSET, + filterenvironmentsnot_eq: str | Unset = UNSET, + filterenvironmentsin: str | Unset = UNSET, + filterenvironmentsnot_in: str | Unset = UNSET, + filterlabelseq: str | Unset = UNSET, + filterlabelsnot_eq: str | Unset = UNSET, + filterlabelsin: str | Unset = UNSET, + filterlabelsnot_in: str | Unset = UNSET, + filterrefseq: str | Unset = UNSET, + filterrefsnot_eq: str | Unset = UNSET, + filterrefsin: str | Unset = UNSET, + filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> PulseList | None: - """List pulses + """ List pulses List pulses @@ -411,6 +695,26 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filtersourceeq (str | Unset): + filtersourcenot_eq (str | Unset): + filtersourcein (str | Unset): + filtersourcenot_in (str | Unset): + filterserviceseq (str | Unset): + filterservicesnot_eq (str | Unset): + filterservicesin (str | Unset): + filterservicesnot_in (str | Unset): + filterenvironmentseq (str | Unset): + filterenvironmentsnot_eq (str | Unset): + filterenvironmentsin (str | Unset): + filterenvironmentsnot_in (str | Unset): + filterlabelseq (str | Unset): + filterlabelsnot_eq (str | Unset): + filterlabelsin (str | Unset): + filterlabelsnot_in (str | Unset): + filterrefseq (str | Unset): + filterrefsnot_eq (str | Unset): + filterrefsin (str | Unset): + filterrefsnot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -420,30 +724,50 @@ async def asyncio( Returns: PulseList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - filtersource=filtersource, - filterservices=filterservices, - filterenvironments=filterenvironments, - filterlabels=filterlabels, - filterrefs=filterrefs, - filterstarted_atgt=filterstarted_atgt, - filterstarted_atgte=filterstarted_atgte, - filterstarted_atlt=filterstarted_atlt, - filterstarted_atlte=filterstarted_atlte, - filterended_atgt=filterended_atgt, - filterended_atgte=filterended_atgte, - filterended_atlt=filterended_atlt, - filterended_atlte=filterended_atlte, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +filtersource=filtersource, +filterservices=filterservices, +filterenvironments=filterenvironments, +filterlabels=filterlabels, +filterrefs=filterrefs, +filterstarted_atgt=filterstarted_atgt, +filterstarted_atgte=filterstarted_atgte, +filterstarted_atlt=filterstarted_atlt, +filterstarted_atlte=filterstarted_atlte, +filterended_atgt=filterended_atgt, +filterended_atgte=filterended_atgte, +filterended_atlt=filterended_atlt, +filterended_atlte=filterended_atlte, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filtersourceeq=filtersourceeq, +filtersourcenot_eq=filtersourcenot_eq, +filtersourcein=filtersourcein, +filtersourcenot_in=filtersourcenot_in, +filterserviceseq=filterserviceseq, +filterservicesnot_eq=filterservicesnot_eq, +filterservicesin=filterservicesin, +filterservicesnot_in=filterservicesnot_in, +filterenvironmentseq=filterenvironmentseq, +filterenvironmentsnot_eq=filterenvironmentsnot_eq, +filterenvironmentsin=filterenvironmentsin, +filterenvironmentsnot_in=filterenvironmentsnot_in, +filterlabelseq=filterlabelseq, +filterlabelsnot_eq=filterlabelsnot_eq, +filterlabelsin=filterlabelsin, +filterlabelsnot_in=filterlabelsnot_in, +filterrefseq=filterrefseq, +filterrefsnot_eq=filterrefsnot_eq, +filterrefsin=filterrefsin, +filterrefsnot_in=filterrefsnot_in, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/pulses/update_pulse.py b/rootly_sdk/api/pulses/update_pulse.py index 38022933..fa753c1f 100644 --- a/rootly_sdk/api/pulses/update_pulse.py +++ b/rootly_sdk/api/pulses/update_pulse.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.pulse_response import PulseResponse from ...models.update_pulse import UpdatePulse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdatePulse, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/pulses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/pulses/{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 | PulseResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PulseResponse | None: if response.status_code == 200: response_200 = PulseResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PulseResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PulseResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePulse, + ) -> Response[ErrorsList | PulseResponse]: - """Update a pulse + """ Update a pulse Update a specific pulse by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | PulseResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdatePulse, + ) -> ErrorsList | PulseResponse | None: - """Update a pulse + """ Update a pulse Update a specific pulse by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | PulseResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdatePulse, + ) -> Response[ErrorsList | PulseResponse]: - """Update a pulse + """ Update a pulse Update a specific pulse by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PulseResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdatePulse, + ) -> ErrorsList | PulseResponse | None: - """Update a pulse + """ Update a pulse Update a specific pulse by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | PulseResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/retrospective_configurations/__init__.py b/rootly_sdk/api/retrospective_configurations/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/retrospective_configurations/__init__.py +++ b/rootly_sdk/api/retrospective_configurations/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py b/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py index a198248f..e473100d 100644 --- a/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py +++ b/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py @@ -1,24 +1,31 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...models.get_retrospective_configuration_include import ( - GetRetrospectiveConfigurationInclude, -) +from ...models.get_retrospective_configuration_include import check_get_retrospective_configuration_include +from ...models.get_retrospective_configuration_include import GetRetrospectiveConfigurationInclude from ...models.retrospective_configuration_response import RetrospectiveConfigurationResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -28,30 +35,34 @@ def _get_kwargs( params["include"] = json_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/retrospective_configurations/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_configurations/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RetrospectiveConfigurationResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveConfigurationResponse | None: if response.status_code == 200: response_200 = RetrospectiveConfigurationResponse.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: @@ -60,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, + ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: - """Retrieves a Retrospective Configuration + """ Retrieves a Retrospective Configuration Retrieves a specific retrospective_configuration by id @@ -91,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveConfigurationResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -104,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, + ) -> ErrorsList | RetrospectiveConfigurationResponse | None: - """Retrieves a Retrospective Configuration + """ Retrieves a Retrospective Configuration Retrieves a specific retrospective_configuration by id @@ -125,22 +137,24 @@ def sync( Returns: ErrorsList | RetrospectiveConfigurationResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, + ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: - """Retrieves a Retrospective Configuration + """ Retrieves a Retrospective Configuration Retrieves a specific retrospective_configuration by id @@ -154,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveConfigurationResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, + ) -> ErrorsList | RetrospectiveConfigurationResponse | None: - """Retrieves a Retrospective Configuration + """ Retrieves a Retrospective Configuration Retrieves a specific retrospective_configuration by id @@ -186,12 +204,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveConfigurationResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py b/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py index 41494cab..ef015eb5 100644 --- a/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py +++ b/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py @@ -1,15 +1,19 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...models.list_retrospective_configurations_include import ( - ListRetrospectiveConfigurationsInclude, -) +from ...types import Response, UNSET +from ... import errors + +from ...models.list_retrospective_configurations_include import check_list_retrospective_configurations_include +from ...models.list_retrospective_configurations_include import ListRetrospectiveConfigurationsInclude from ...models.retrospective_configuration_list import RetrospectiveConfigurationList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -18,7 +22,11 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -34,23 +42,27 @@ def _get_kwargs( params["filter[kind]"] = filterkind + 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/retrospective_configurations", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> RetrospectiveConfigurationList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveConfigurationList | None: if response.status_code == 200: response_200 = RetrospectiveConfigurationList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -59,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[RetrospectiveConfigurationList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveConfigurationList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -77,8 +87,9 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, + ) -> Response[RetrospectiveConfigurationList]: - """List retrospective configurations + """ List retrospective configurations List retrospective configurations @@ -94,13 +105,15 @@ def sync_detailed( Returns: Response[RetrospectiveConfigurationList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, + ) response = client.get_httpx_client().request( @@ -109,7 +122,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -117,8 +129,9 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, + ) -> RetrospectiveConfigurationList | None: - """List retrospective configurations + """ List retrospective configurations List retrospective configurations @@ -134,16 +147,17 @@ def sync( Returns: RetrospectiveConfigurationList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, + ).parsed async def asyncio_detailed( *, @@ -152,8 +166,9 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, + ) -> Response[RetrospectiveConfigurationList]: - """List retrospective configurations + """ List retrospective configurations List retrospective configurations @@ -169,20 +184,23 @@ async def asyncio_detailed( Returns: Response[RetrospectiveConfigurationList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -190,8 +208,9 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, + ) -> RetrospectiveConfigurationList | None: - """List retrospective configurations + """ List retrospective configurations List retrospective configurations @@ -207,14 +226,14 @@ async def asyncio( Returns: RetrospectiveConfigurationList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterkind=filterkind, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterkind=filterkind, + + )).parsed diff --git a/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py b/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py index ceb35adb..e99cdb2e 100644 --- a/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py +++ b/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.retrospective_configuration_response import RetrospectiveConfigurationResponse from ...models.update_retrospective_configuration import UpdateRetrospectiveConfiguration -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateRetrospectiveConfiguration, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_configurations/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_configurations/{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 | RetrospectiveConfigurationResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveConfigurationResponse | None: if response.status_code == 200: response_200 = RetrospectiveConfigurationResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveConfiguration, + ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: - """Update a retrospective configuration + """ Update a retrospective configuration Update a specific retrospective configuration by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveConfigurationResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveConfiguration, + ) -> ErrorsList | RetrospectiveConfigurationResponse | None: - """Update a retrospective configuration + """ Update a retrospective configuration Update a specific retrospective configuration by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | RetrospectiveConfigurationResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveConfiguration, + ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: - """Update a retrospective configuration + """ Update a retrospective configuration Update a specific retrospective configuration by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveConfigurationResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveConfiguration, + ) -> ErrorsList | RetrospectiveConfigurationResponse | None: - """Update a retrospective configuration + """ Update a retrospective configuration Update a specific retrospective configuration by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveConfigurationResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/retrospective_process_group_steps/__init__.py b/rootly_sdk/api/retrospective_process_group_steps/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/retrospective_process_group_steps/__init__.py +++ b/rootly_sdk/api/retrospective_process_group_steps/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 2284fedd..052f8295 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_retrospective_process_group_step import NewRetrospectiveProcessGroupStep from ...models.retrospective_process_group_step_response import RetrospectiveProcessGroupStepResponse -from ...types import Response +from typing import cast + def _get_kwargs( retrospective_process_group_id: str, *, body: NewRetrospectiveProcessGroupStep, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/retrospective_process_groups/{retrospective_process_group_id}/steps".format( - retrospective_process_group_id=quote(str(retrospective_process_group_id), safe=""), - ), + "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() + headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: if response.status_code == 201: response_201 = RetrospectiveProcessGroupStepResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroupStep, + ) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: - """Creates a retrospective process group step + """ Creates a retrospective process group step Creates a new retrospective process group step from provided data @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupStepResponse] - """ + """ + kwargs = _get_kwargs( retrospective_process_group_id=retrospective_process_group_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( retrospective_process_group_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroupStep, + ) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: - """Creates a retrospective process group step + """ Creates a retrospective process group step Creates a new retrospective process group step from provided data @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | RetrospectiveProcessGroupStepResponse - """ + """ + return sync_detailed( retrospective_process_group_id=retrospective_process_group_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( retrospective_process_group_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroupStep, + ) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: - """Creates a retrospective process group step + """ Creates a retrospective process group step Creates a new retrospective process group step from provided data @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupStepResponse] - """ + """ + kwargs = _get_kwargs( retrospective_process_group_id=retrospective_process_group_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( retrospective_process_group_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroupStep, + ) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: - """Creates a retrospective process group step + """ Creates a retrospective process group step Creates a new retrospective process group step from provided data @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessGroupStepResponse - """ - - return ( - await asyncio_detailed( - retrospective_process_group_id=retrospective_process_group_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + retrospective_process_group_id=retrospective_process_group_id, +client=client, +body=body, + + )).parsed 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 e49707dd..b039fa33 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.retrospective_process_group_step_response import RetrospectiveProcessGroupStepResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/retrospective_process_group_steps/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_process_group_steps/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupStepResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: - """Delete a RetrospectiveProcessGroup Step + """ Delete a RetrospectiveProcessGroup Step Delete a specific RetrospectiveProcessGroup Step by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: - """Delete a RetrospectiveProcessGroup Step + """ Delete a RetrospectiveProcessGroup Step Delete a specific RetrospectiveProcessGroup Step by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | RetrospectiveProcessGroupStepResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: - """Delete a RetrospectiveProcessGroup Step + """ Delete a RetrospectiveProcessGroup Step Delete a specific RetrospectiveProcessGroup Step by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: - """Delete a RetrospectiveProcessGroup Step + """ Delete a RetrospectiveProcessGroup Step Delete a specific RetrospectiveProcessGroup Step by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessGroupStepResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 7cb7eca6..f5542d80 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,35 +1,44 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.retrospective_process_group_step_response import RetrospectiveProcessGroupStepResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/retrospective_process_group_steps/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_process_group_steps/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> RetrospectiveProcessGroupStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupStepResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -38,9 +47,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[RetrospectiveProcessGroupStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -53,8 +60,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[RetrospectiveProcessGroupStepResponse]: - """Retrieves a RetrospectiveProcessGroup Step + """ Retrieves a RetrospectiveProcessGroup Step Retrieves a specific RetrospectiveProcessGroup Step by id @@ -67,10 +75,12 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -79,13 +89,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> RetrospectiveProcessGroupStepResponse | None: - """Retrieves a RetrospectiveProcessGroup Step + """ Retrieves a RetrospectiveProcessGroup Step Retrieves a specific RetrospectiveProcessGroup Step by id @@ -98,20 +108,22 @@ def sync( Returns: RetrospectiveProcessGroupStepResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[RetrospectiveProcessGroupStepResponse]: - """Retrieves a RetrospectiveProcessGroup Step + """ Retrieves a RetrospectiveProcessGroup Step Retrieves a specific RetrospectiveProcessGroup Step by id @@ -124,23 +136,27 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> RetrospectiveProcessGroupStepResponse | None: - """Retrieves a RetrospectiveProcessGroup Step + """ Retrieves a RetrospectiveProcessGroup Step Retrieves a specific RetrospectiveProcessGroup Step by id @@ -153,11 +169,11 @@ async def asyncio( Returns: RetrospectiveProcessGroupStepResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 71508e1f..1f578efa 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.retrospective_process_group_step_list import RetrospectiveProcessGroupStepList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,7 +25,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -41,25 +49,27 @@ def _get_kwargs( 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/retrospective_process_groups/{retrospective_process_group_id}/steps".format( - retrospective_process_group_id=quote(str(retrospective_process_group_id), safe=""), - ), + "url": "/v1/retrospective_process_groups/{retrospective_process_group_id}/steps".format(retrospective_process_group_id=quote(str(retrospective_process_group_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> RetrospectiveProcessGroupStepList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupStepList | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupStepList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -68,9 +78,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[RetrospectiveProcessGroupStepList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupStepList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -91,8 +99,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[RetrospectiveProcessGroupStepList]: - """List RetrospectiveProcessGroup Steps + """ List RetrospectiveProcessGroup Steps List RetrospectiveProcessGroup Steps @@ -113,18 +122,20 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupStepList] - """ + """ + kwargs = _get_kwargs( retrospective_process_group_id=retrospective_process_group_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterretrospective_step_id=filterretrospective_step_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterretrospective_step_id=filterretrospective_step_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ) response = client.get_httpx_client().request( @@ -133,7 +144,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( retrospective_process_group_id: str, *, @@ -146,8 +156,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> RetrospectiveProcessGroupStepList | None: - """List RetrospectiveProcessGroup Steps + """ List RetrospectiveProcessGroup Steps List RetrospectiveProcessGroup Steps @@ -168,21 +179,22 @@ def sync( Returns: RetrospectiveProcessGroupStepList - """ + """ + return sync_detailed( retrospective_process_group_id=retrospective_process_group_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterretrospective_step_id=filterretrospective_step_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterretrospective_step_id=filterretrospective_step_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ).parsed async def asyncio_detailed( retrospective_process_group_id: str, @@ -196,8 +208,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[RetrospectiveProcessGroupStepList]: - """List RetrospectiveProcessGroup Steps + """ List RetrospectiveProcessGroup Steps List RetrospectiveProcessGroup Steps @@ -218,25 +231,28 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupStepList] - """ + """ + kwargs = _get_kwargs( retrospective_process_group_id=retrospective_process_group_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterretrospective_step_id=filterretrospective_step_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterretrospective_step_id=filterretrospective_step_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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( retrospective_process_group_id: str, *, @@ -249,8 +265,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> RetrospectiveProcessGroupStepList | None: - """List RetrospectiveProcessGroup Steps + """ List RetrospectiveProcessGroup Steps List RetrospectiveProcessGroup Steps @@ -271,19 +288,19 @@ async def asyncio( Returns: RetrospectiveProcessGroupStepList - """ - - return ( - await asyncio_detailed( - retrospective_process_group_id=retrospective_process_group_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterretrospective_step_id=filterretrospective_step_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + retrospective_process_group_id=retrospective_process_group_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterretrospective_step_id=filterretrospective_step_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + + )).parsed 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 6672af62..b857d4d0 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,44 +1,53 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.retrospective_process_group_step_response import RetrospectiveProcessGroupStepResponse from ...models.update_retrospective_process_group_step import UpdateRetrospectiveProcessGroupStep -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateRetrospectiveProcessGroupStep, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_process_group_steps/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_process_group_steps/{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 -) -> RetrospectiveProcessGroupStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupStepResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -47,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[RetrospectiveProcessGroupStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -63,8 +70,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroupStep, + ) -> Response[RetrospectiveProcessGroupStepResponse]: - """Update RetrospectiveProcessGroup Step + """ Update RetrospectiveProcessGroup Step Update a specific RetrospectiveProcessGroup Step by id @@ -78,11 +86,13 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -91,14 +101,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroupStep, + ) -> RetrospectiveProcessGroupStepResponse | None: - """Update RetrospectiveProcessGroup Step + """ Update RetrospectiveProcessGroup Step Update a specific RetrospectiveProcessGroup Step by id @@ -112,22 +122,24 @@ def sync( Returns: RetrospectiveProcessGroupStepResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroupStep, + ) -> Response[RetrospectiveProcessGroupStepResponse]: - """Update RetrospectiveProcessGroup Step + """ Update RetrospectiveProcessGroup Step Update a specific RetrospectiveProcessGroup Step by id @@ -141,25 +153,29 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroupStep, + ) -> RetrospectiveProcessGroupStepResponse | None: - """Update RetrospectiveProcessGroup Step + """ Update RetrospectiveProcessGroup Step Update a specific RetrospectiveProcessGroup Step by id @@ -173,12 +189,12 @@ async def asyncio( Returns: RetrospectiveProcessGroupStepResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/retrospective_process_groups/__init__.py b/rootly_sdk/api/retrospective_process_groups/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/retrospective_process_groups/__init__.py +++ b/rootly_sdk/api/retrospective_process_groups/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 5d7feb3c..967dce4f 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_retrospective_process_group import NewRetrospectiveProcessGroup from ...models.retrospective_process_group_response import RetrospectiveProcessGroupResponse -from ...types import Response +from typing import cast + def _get_kwargs( retrospective_process_id: str, *, body: NewRetrospectiveProcessGroup, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/retrospective_processes/{retrospective_process_id}/groups".format( - retrospective_process_id=quote(str(retrospective_process_id), safe=""), - ), + "url": "/v1/retrospective_processes/{retrospective_process_id}/groups".format(retrospective_process_id=quote(str(retrospective_process_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 | RetrospectiveProcessGroupResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessGroupResponse | None: if response.status_code == 201: response_201 = RetrospectiveProcessGroupResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroup, + ) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: - """Creates a retrospective process group + """ Creates a retrospective process group Creates a new retrospective process group from provided data @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupResponse] - """ + """ + kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroup, + ) -> ErrorsList | RetrospectiveProcessGroupResponse | None: - """Creates a retrospective process group + """ Creates a retrospective process group Creates a new retrospective process group from provided data @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | RetrospectiveProcessGroupResponse - """ + """ + return sync_detailed( retrospective_process_id=retrospective_process_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroup, + ) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: - """Creates a retrospective process group + """ Creates a retrospective process group Creates a new retrospective process group from provided data @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupResponse] - """ + """ + kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroup, + ) -> ErrorsList | RetrospectiveProcessGroupResponse | None: - """Creates a retrospective process group + """ Creates a retrospective process group Creates a new retrospective process group from provided data @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessGroupResponse - """ - - return ( - await asyncio_detailed( - retrospective_process_id=retrospective_process_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + retrospective_process_id=retrospective_process_id, +client=client, +body=body, + + )).parsed 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 ffa0bd00..3824d276 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.retrospective_process_group_response import RetrospectiveProcessGroupResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/retrospective_process_groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_process_groups/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RetrospectiveProcessGroupResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessGroupResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: - """Delete a Retrospective Process Group + """ Delete a Retrospective Process Group Delete a specific Retrospective Process Group by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveProcessGroupResponse | None: - """Delete a Retrospective Process Group + """ Delete a Retrospective Process Group Delete a specific Retrospective Process Group by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | RetrospectiveProcessGroupResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: - """Delete a Retrospective Process Group + """ Delete a Retrospective Process Group Delete a specific Retrospective Process Group by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveProcessGroupResponse | None: - """Delete a Retrospective Process Group + """ Delete a Retrospective Process Group Delete a specific Retrospective Process Group by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessGroupResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 a1f3483d..3eff88fa 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,23 +1,30 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...models.get_retrospective_process_group_include import ( - GetRetrospectiveProcessGroupInclude, -) +from ...types import Response, UNSET +from ... import errors + +from ...models.get_retrospective_process_group_include import check_get_retrospective_process_group_include +from ...models.get_retrospective_process_group_include import GetRetrospectiveProcessGroupInclude from ...models.retrospective_process_group_response import RetrospectiveProcessGroupResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -27,25 +34,27 @@ def _get_kwargs( params["include"] = json_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/retrospective_process_groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_process_groups/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> RetrospectiveProcessGroupResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -54,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[RetrospectiveProcessGroupResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +77,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, + ) -> Response[RetrospectiveProcessGroupResponse]: - """Retrieves a Retrospective Process Group + """ Retrieves a Retrospective Process Group Retrieves a specific Retrospective Process Group by id @@ -85,11 +93,13 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -98,14 +108,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, + ) -> RetrospectiveProcessGroupResponse | None: - """Retrieves a Retrospective Process Group + """ Retrieves a Retrospective Process Group Retrieves a specific Retrospective Process Group by id @@ -119,22 +129,24 @@ def sync( Returns: RetrospectiveProcessGroupResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, + ) -> Response[RetrospectiveProcessGroupResponse]: - """Retrieves a Retrospective Process Group + """ Retrieves a Retrospective Process Group Retrieves a specific Retrospective Process Group by id @@ -148,25 +160,29 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, + ) -> RetrospectiveProcessGroupResponse | None: - """Retrieves a Retrospective Process Group + """ Retrieves a Retrospective Process Group Retrieves a specific Retrospective Process Group by id @@ -180,12 +196,12 @@ async def asyncio( Returns: RetrospectiveProcessGroupResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed 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 a2ace0f8..0110741b 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,19 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...models.list_retrospective_process_groups_include import ( - ListRetrospectiveProcessGroupsInclude, -) -from ...models.list_retrospective_process_groups_sort import ( - ListRetrospectiveProcessGroupsSort, -) +from ...types import Response, UNSET +from ... import errors + +from ...models.list_retrospective_process_groups_include import check_list_retrospective_process_groups_include +from ...models.list_retrospective_process_groups_include import ListRetrospectiveProcessGroupsInclude +from ...models.list_retrospective_process_groups_sort import check_list_retrospective_process_groups_sort +from ...models.list_retrospective_process_groups_sort import ListRetrospectiveProcessGroupsSort from ...models.retrospective_process_group_list import RetrospectiveProcessGroupList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -28,7 +30,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -58,25 +64,27 @@ def _get_kwargs( 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/retrospective_processes/{retrospective_process_id}/groups".format( - retrospective_process_id=quote(str(retrospective_process_id), safe=""), - ), + "url": "/v1/retrospective_processes/{retrospective_process_id}/groups".format(retrospective_process_id=quote(str(retrospective_process_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> RetrospectiveProcessGroupList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupList | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -85,9 +93,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[RetrospectiveProcessGroupList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -109,8 +115,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[RetrospectiveProcessGroupList]: - """List Retrospective Process Groups + """ List Retrospective Process Groups List Retrospective Process Groups @@ -132,19 +139,21 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupList] - """ + """ + kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersub_status_id=filtersub_status_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersub_status_id=filtersub_status_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ) response = client.get_httpx_client().request( @@ -153,7 +162,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( retrospective_process_id: str, *, @@ -167,8 +175,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> RetrospectiveProcessGroupList | None: - """List Retrospective Process Groups + """ List Retrospective Process Groups List Retrospective Process Groups @@ -190,22 +199,23 @@ def sync( Returns: RetrospectiveProcessGroupList - """ + """ + return sync_detailed( retrospective_process_id=retrospective_process_id, - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersub_status_id=filtersub_status_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersub_status_id=filtersub_status_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ).parsed async def asyncio_detailed( retrospective_process_id: str, @@ -220,8 +230,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[RetrospectiveProcessGroupList]: - """List Retrospective Process Groups + """ List Retrospective Process Groups List Retrospective Process Groups @@ -243,26 +254,29 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupList] - """ + """ + kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersub_status_id=filtersub_status_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersub_status_id=filtersub_status_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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( retrospective_process_id: str, *, @@ -276,8 +290,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> RetrospectiveProcessGroupList | None: - """List Retrospective Process Groups + """ List Retrospective Process Groups List Retrospective Process Groups @@ -299,20 +314,20 @@ async def asyncio( Returns: RetrospectiveProcessGroupList - """ - - return ( - await asyncio_detailed( - retrospective_process_id=retrospective_process_id, - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersub_status_id=filtersub_status_id, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + retrospective_process_id=retrospective_process_id, +client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersub_status_id=filtersub_status_id, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + + )).parsed 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 025b6851..c5554781 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,44 +1,53 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.retrospective_process_group_response import RetrospectiveProcessGroupResponse from ...models.update_retrospective_process_group import UpdateRetrospectiveProcessGroup -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateRetrospectiveProcessGroup, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_process_groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_process_groups/{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 -) -> RetrospectiveProcessGroupResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -47,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[RetrospectiveProcessGroupResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -63,8 +70,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroup, + ) -> Response[RetrospectiveProcessGroupResponse]: - """Update a Retrospective Process Group + """ Update a Retrospective Process Group Update a specific Retrospective Process Group by id @@ -78,11 +86,13 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -91,14 +101,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroup, + ) -> RetrospectiveProcessGroupResponse | None: - """Update a Retrospective Process Group + """ Update a Retrospective Process Group Update a specific Retrospective Process Group by id @@ -112,22 +122,24 @@ def sync( Returns: RetrospectiveProcessGroupResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroup, + ) -> Response[RetrospectiveProcessGroupResponse]: - """Update a Retrospective Process Group + """ Update a Retrospective Process Group Update a specific Retrospective Process Group by id @@ -141,25 +153,29 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroup, + ) -> RetrospectiveProcessGroupResponse | None: - """Update a Retrospective Process Group + """ Update a Retrospective Process Group Update a specific Retrospective Process Group by id @@ -173,12 +189,12 @@ async def asyncio( Returns: RetrospectiveProcessGroupResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/retrospective_processes/__init__.py b/rootly_sdk/api/retrospective_processes/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/retrospective_processes/__init__.py +++ b/rootly_sdk/api/retrospective_processes/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/retrospective_processes/create_retrospective_process.py b/rootly_sdk/api/retrospective_processes/create_retrospective_process.py index 958b54e7..fc0bd1ca 100644 --- a/rootly_sdk/api/retrospective_processes/create_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/create_retrospective_process.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_retrospective_process import NewRetrospectiveProcess from ...models.retrospective_process_response import RetrospectiveProcessResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewRetrospectiveProcess, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/retrospective_processes", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | RetrospectiveProcessResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessResponse | None: if response.status_code == 201: response_201 = RetrospectiveProcessResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveProcessResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveProcess, + ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """Creates a retrospective process + """ Creates a retrospective process Creates a new retrospective process from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewRetrospectiveProcess, + ) -> ErrorsList | RetrospectiveProcessResponse | None: - """Creates a retrospective process + """ Creates a retrospective process Creates a new retrospective process from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | RetrospectiveProcessResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveProcess, + ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """Creates a retrospective process + """ Creates a retrospective process Creates a new retrospective process from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewRetrospectiveProcess, + ) -> ErrorsList | RetrospectiveProcessResponse | None: - """Creates a retrospective process + """ Creates a retrospective process Creates a new retrospective process from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py b/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py index cb4c54f8..ab820d47 100644 --- a/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.retrospective_process_response import RetrospectiveProcessResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/retrospective_processes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_processes/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RetrospectiveProcessResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveProcessResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """Delete a retrospective process + """ Delete a retrospective process Delete a specific retrospective process by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveProcessResponse | None: - """Delete a retrospective process + """ Delete a retrospective process Delete a specific retrospective process by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | RetrospectiveProcessResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """Delete a retrospective process + """ Delete a retrospective process Delete a specific retrospective process by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveProcessResponse | None: - """Delete a retrospective process + """ Delete a retrospective process Delete a specific retrospective process by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/retrospective_processes/get_retrospective_process.py b/rootly_sdk/api/retrospective_processes/get_retrospective_process.py index f88cfd09..26e6550b 100644 --- a/rootly_sdk/api/retrospective_processes/get_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/get_retrospective_process.py @@ -1,24 +1,31 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList -from ...models.get_retrospective_process_include import ( - GetRetrospectiveProcessInclude, -) +from ...models.get_retrospective_process_include import check_get_retrospective_process_include +from ...models.get_retrospective_process_include import GetRetrospectiveProcessInclude from ...models.retrospective_process_response import RetrospectiveProcessResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetRetrospectiveProcessInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -28,30 +35,34 @@ def _get_kwargs( params["include"] = json_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/retrospective_processes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_processes/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RetrospectiveProcessResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessResponse.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: @@ -60,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveProcessResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetRetrospectiveProcessInclude | Unset = UNSET, + ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """Retrieves a retrospective process + """ Retrieves a retrospective process Retrieves a specific retrospective process by id @@ -91,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -104,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessInclude | Unset = UNSET, + ) -> ErrorsList | RetrospectiveProcessResponse | None: - """Retrieves a retrospective process + """ Retrieves a retrospective process Retrieves a specific retrospective process by id @@ -125,22 +137,24 @@ def sync( Returns: ErrorsList | RetrospectiveProcessResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessInclude | Unset = UNSET, + ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """Retrieves a retrospective process + """ Retrieves a retrospective process Retrieves a specific retrospective process by id @@ -154,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessInclude | Unset = UNSET, + ) -> ErrorsList | RetrospectiveProcessResponse | None: - """Retrieves a retrospective process + """ Retrieves a retrospective process Retrieves a specific retrospective process by id @@ -186,12 +204,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py b/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py index a106a418..6d84afd1 100644 --- a/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py +++ b/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py @@ -1,15 +1,19 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client -from ...models.list_retrospective_processes_include import ( - ListRetrospectiveProcessesInclude, -) +from ...types import Response, UNSET +from ... import errors + +from ...models.list_retrospective_processes_include import check_list_retrospective_processes_include +from ...models.list_retrospective_processes_include import ListRetrospectiveProcessesInclude from ...models.retrospective_process_list import RetrospectiveProcessList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -17,7 +21,11 @@ def _get_kwargs( include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -31,23 +39,27 @@ def _get_kwargs( 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/retrospective_processes", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> RetrospectiveProcessList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessList | None: if response.status_code == 200: response_200 = RetrospectiveProcessList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -56,9 +68,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[RetrospectiveProcessList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,8 +83,9 @@ def sync_detailed( include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[RetrospectiveProcessList]: - """List retrospective processes + """ List retrospective processes List retrospective processes @@ -89,12 +100,14 @@ def sync_detailed( Returns: Response[RetrospectiveProcessList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,15 +116,15 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> RetrospectiveProcessList | None: - """List retrospective processes + """ List retrospective processes List retrospective processes @@ -126,15 +139,16 @@ def sync( Returns: RetrospectiveProcessList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -142,8 +156,9 @@ async def asyncio_detailed( include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[RetrospectiveProcessList]: - """List retrospective processes + """ List retrospective processes List retrospective processes @@ -158,27 +173,31 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> RetrospectiveProcessList | None: - """List retrospective processes + """ List retrospective processes List retrospective processes @@ -193,13 +212,13 @@ async def asyncio( Returns: RetrospectiveProcessList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/retrospective_processes/update_retrospective_process.py b/rootly_sdk/api/retrospective_processes/update_retrospective_process.py index d290ed1b..2c714245 100644 --- a/rootly_sdk/api/retrospective_processes/update_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/update_retrospective_process.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.retrospective_process_response import RetrospectiveProcessResponse from ...models.update_retrospective_process import UpdateRetrospectiveProcess -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateRetrospectiveProcess, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_processes/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_processes/{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 | RetrospectiveProcessResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveProcessResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveProcess, + ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """Update a retrospective process + """ Update a retrospective process Updates a specific retrospective process by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcess, + ) -> ErrorsList | RetrospectiveProcessResponse | None: - """Update a retrospective process + """ Update a retrospective process Updates a specific retrospective process by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | RetrospectiveProcessResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcess, + ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """Update a retrospective process + """ Update a retrospective process Updates a specific retrospective process by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcess, + ) -> ErrorsList | RetrospectiveProcessResponse | None: - """Update a retrospective process + """ Update a retrospective process Updates a specific retrospective process by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/retrospective_steps/__init__.py b/rootly_sdk/api/retrospective_steps/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/retrospective_steps/__init__.py +++ b/rootly_sdk/api/retrospective_steps/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/retrospective_steps/create_retrospective_step.py b/rootly_sdk/api/retrospective_steps/create_retrospective_step.py index 92dfb6e8..cb9bd195 100644 --- a/rootly_sdk/api/retrospective_steps/create_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/create_retrospective_step.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_retrospective_step import NewRetrospectiveStep from ...models.retrospective_step_response import RetrospectiveStepResponse -from ...types import Response +from typing import cast + def _get_kwargs( retrospective_process_id: str, *, body: NewRetrospectiveStep, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps".format( - retrospective_process_id=quote(str(retrospective_process_id), safe=""), - ), + "url": "/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps".format(retrospective_process_id=quote(str(retrospective_process_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 | RetrospectiveStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveStepResponse | None: if response.status_code == 201: response_201 = RetrospectiveStepResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveStep, + ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """Creates a retrospective step + """ Creates a retrospective step Creates a new retrospective step from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveStep, + ) -> ErrorsList | RetrospectiveStepResponse | None: - """Creates a retrospective step + """ Creates a retrospective step Creates a new retrospective step from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | RetrospectiveStepResponse - """ + """ + return sync_detailed( retrospective_process_id=retrospective_process_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveStep, + ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """Creates a retrospective step + """ Creates a retrospective step Creates a new retrospective step from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveStep, + ) -> ErrorsList | RetrospectiveStepResponse | None: - """Creates a retrospective step + """ Creates a retrospective step Creates a new retrospective step from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveStepResponse - """ - - return ( - await asyncio_detailed( - retrospective_process_id=retrospective_process_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + retrospective_process_id=retrospective_process_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py b/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py index 51361c85..b7926401 100644 --- a/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.retrospective_step_response import RetrospectiveStepResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/retrospective_steps/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_steps/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RetrospectiveStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveStepResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """Delete a retrospective step + """ Delete a retrospective step Delete a specific retrospective step by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveStepResponse | None: - """Delete a retrospective step + """ Delete a retrospective step Delete a specific retrospective step by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | RetrospectiveStepResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """Delete a retrospective step + """ Delete a retrospective step Delete a specific retrospective step by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveStepResponse | None: - """Delete a retrospective step + """ Delete a retrospective step Delete a specific retrospective step by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveStepResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/retrospective_steps/get_retrospective_step.py b/rootly_sdk/api/retrospective_steps/get_retrospective_step.py index 416a641b..8b267c5c 100644 --- a/rootly_sdk/api/retrospective_steps/get_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/get_retrospective_step.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.retrospective_step_response import RetrospectiveStepResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/retrospective_steps/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_steps/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RetrospectiveStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveStepResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """Retrieves a retrospective step + """ Retrieves a retrospective step Retrieves a specific retrospective step by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveStepResponse | None: - """Retrieves a retrospective step + """ Retrieves a retrospective step Retrieves a specific retrospective step by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | RetrospectiveStepResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """Retrieves a retrospective step + """ Retrieves a retrospective step Retrieves a specific retrospective step by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | RetrospectiveStepResponse | None: - """Retrieves a retrospective step + """ Retrieves a retrospective step Retrieves a specific retrospective step by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveStepResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py b/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py index d611a9e0..ccb78c71 100644 --- a/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py +++ b/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.retrospective_step_list import RetrospectiveStepList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -17,7 +21,11 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,23 +37,27 @@ def _get_kwargs( 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/retrospective_processes/{retrospective_process_id}/retrospective_steps".format( - retrospective_process_id=quote(str(retrospective_process_id), safe=""), - ), + "url": "/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps".format(retrospective_process_id=quote(str(retrospective_process_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveStepList | None: if response.status_code == 200: response_200 = RetrospectiveStepList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -54,9 +66,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[RetrospectiveStepList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveStepList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,8 +83,9 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[RetrospectiveStepList]: - """List retrospective steps + """ List retrospective steps List retrospective steps @@ -91,14 +102,16 @@ def sync_detailed( Returns: Response[RetrospectiveStepList] - """ + """ + kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + ) response = client.get_httpx_client().request( @@ -107,7 +120,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( retrospective_process_id: str, *, @@ -116,8 +128,9 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> RetrospectiveStepList | None: - """List retrospective steps + """ List retrospective steps List retrospective steps @@ -134,17 +147,18 @@ def sync( Returns: RetrospectiveStepList - """ + """ + return sync_detailed( retrospective_process_id=retrospective_process_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + ).parsed async def asyncio_detailed( retrospective_process_id: str, @@ -154,8 +168,9 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[RetrospectiveStepList]: - """List retrospective steps + """ List retrospective steps List retrospective steps @@ -172,21 +187,24 @@ async def asyncio_detailed( Returns: Response[RetrospectiveStepList] - """ + """ + kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( retrospective_process_id: str, *, @@ -195,8 +213,9 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> RetrospectiveStepList | None: - """List retrospective steps + """ List retrospective steps List retrospective steps @@ -213,15 +232,15 @@ async def asyncio( Returns: RetrospectiveStepList - """ - - return ( - await asyncio_detailed( - retrospective_process_id=retrospective_process_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + retrospective_process_id=retrospective_process_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/retrospective_steps/update_retrospective_step.py b/rootly_sdk/api/retrospective_steps/update_retrospective_step.py index 004aa760..877e8d4f 100644 --- a/rootly_sdk/api/retrospective_steps/update_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/update_retrospective_step.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.retrospective_step_response import RetrospectiveStepResponse from ...models.update_retrospective_step import UpdateRetrospectiveStep -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateRetrospectiveStep, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_steps/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/retrospective_steps/{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 | RetrospectiveStepResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveStepResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RetrospectiveStepResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveStep, + ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """Update a retrospective step + """ Update a retrospective step Update a specific retrospective step by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveStep, + ) -> ErrorsList | RetrospectiveStepResponse | None: - """Update a retrospective step + """ Update a retrospective step Update a specific retrospective step by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | RetrospectiveStepResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveStep, + ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """Update a retrospective step + """ Update a retrospective step Update a specific retrospective step by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveStep, + ) -> ErrorsList | RetrospectiveStepResponse | None: - """Update a retrospective step + """ Update a retrospective step Update a specific retrospective step by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveStepResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/retrospective_templates/__init__.py b/rootly_sdk/api/retrospective_templates/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/retrospective_templates/__init__.py +++ b/rootly_sdk/api/retrospective_templates/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/retrospective_templates/create_postmortem_template.py b/rootly_sdk/api/retrospective_templates/create_postmortem_template.py index a45d193d..a9f1513c 100644 --- a/rootly_sdk/api/retrospective_templates/create_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/create_postmortem_template.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_post_mortem_template import NewPostMortemTemplate from ...models.post_mortem_template_response import PostMortemTemplateResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewPostMortemTemplate, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/post_mortem_templates", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | PostMortemTemplateResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PostMortemTemplateResponse | None: if response.status_code == 201: response_201 = PostMortemTemplateResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PostMortemTemplateResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PostMortemTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewPostMortemTemplate, + ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """Creates a retrospective template + """ Creates a retrospective template Creates a new Retrospective Template from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewPostMortemTemplate, + ) -> ErrorsList | PostMortemTemplateResponse | None: - """Creates a retrospective template + """ Creates a retrospective template Creates a new Retrospective Template from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | PostMortemTemplateResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewPostMortemTemplate, + ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """Creates a retrospective template + """ Creates a retrospective template Creates a new Retrospective Template from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewPostMortemTemplate, + ) -> ErrorsList | PostMortemTemplateResponse | None: - """Creates a retrospective template + """ Creates a retrospective template Creates a new Retrospective Template from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | PostMortemTemplateResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py b/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py index aafa6848..f6d8c433 100644 --- a/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.post_mortem_template_response import PostMortemTemplateResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/post_mortem_templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/post_mortem_templates/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | PostMortemTemplateResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PostMortemTemplateResponse | None: if response.status_code == 200: response_200 = PostMortemTemplateResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PostMortemTemplateResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PostMortemTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """Delete a Retrospective Template + """ Delete a Retrospective Template Delete a specific Retrospective Template by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | PostMortemTemplateResponse | None: - """Delete a Retrospective Template + """ Delete a Retrospective Template Delete a specific Retrospective Template by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | PostMortemTemplateResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """Delete a Retrospective Template + """ Delete a Retrospective Template Delete a specific Retrospective Template by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | PostMortemTemplateResponse | None: - """Delete a Retrospective Template + """ Delete a Retrospective Template Delete a specific Retrospective Template by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | PostMortemTemplateResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/retrospective_templates/get_postmortem_template.py b/rootly_sdk/api/retrospective_templates/get_postmortem_template.py index 20fda05d..61e0a0e5 100644 --- a/rootly_sdk/api/retrospective_templates/get_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/get_postmortem_template.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.post_mortem_template_response import PostMortemTemplateResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/post_mortem_templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/post_mortem_templates/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | PostMortemTemplateResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PostMortemTemplateResponse | None: if response.status_code == 200: response_200 = PostMortemTemplateResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PostMortemTemplateResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PostMortemTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """Retrieves a Retrospective Template + """ Retrieves a Retrospective Template Retrieves a specific Retrospective Template by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | PostMortemTemplateResponse | None: - """Retrieves a Retrospective Template + """ Retrieves a Retrospective Template Retrieves a specific Retrospective Template by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | PostMortemTemplateResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """Retrieves a Retrospective Template + """ Retrieves a Retrospective Template Retrieves a specific Retrospective Template by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | PostMortemTemplateResponse | None: - """Retrieves a Retrospective Template + """ Retrieves a Retrospective Template Retrieves a specific Retrospective Template by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | PostMortemTemplateResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py b/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py index a85e9595..abba4bad 100644 --- a/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py +++ b/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.post_mortem_template_list import PostMortemTemplateList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -14,7 +19,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -24,21 +33,27 @@ def _get_kwargs( 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/post_mortem_templates", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PostMortemTemplateList | None: if response.status_code == 200: response_200 = PostMortemTemplateList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -47,9 +62,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[PostMortemTemplateList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[PostMortemTemplateList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +77,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[PostMortemTemplateList]: - """List Retrospective Templates + """ List Retrospective Templates List Retrospective Templates @@ -80,12 +94,14 @@ def sync_detailed( Returns: Response[PostMortemTemplateList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -94,15 +110,15 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> PostMortemTemplateList | None: - """List Retrospective Templates + """ List Retrospective Templates List Retrospective Templates @@ -117,15 +133,16 @@ def sync( Returns: PostMortemTemplateList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -133,8 +150,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[PostMortemTemplateList]: - """List Retrospective Templates + """ List Retrospective Templates List Retrospective Templates @@ -149,27 +167,31 @@ async def asyncio_detailed( Returns: Response[PostMortemTemplateList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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, + ) -> PostMortemTemplateList | None: - """List Retrospective Templates + """ List Retrospective Templates List Retrospective Templates @@ -184,13 +206,13 @@ async def asyncio( Returns: PostMortemTemplateList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/retrospective_templates/update_postmortem_template.py b/rootly_sdk/api/retrospective_templates/update_postmortem_template.py index 32d1be7f..95e60ef8 100644 --- a/rootly_sdk/api/retrospective_templates/update_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/update_postmortem_template.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.post_mortem_template_response import PostMortemTemplateResponse from ...models.update_post_mortem_template import UpdatePostMortemTemplate -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdatePostMortemTemplate, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/post_mortem_templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/post_mortem_templates/{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 | PostMortemTemplateResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PostMortemTemplateResponse | None: if response.status_code == 200: response_200 = PostMortemTemplateResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | PostMortemTemplateResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PostMortemTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, + ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """Update a Retrospective Template + """ Update a Retrospective Template Update a specific Retrospective Template by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, + ) -> ErrorsList | PostMortemTemplateResponse | None: - """Update a Retrospective Template + """ Update a Retrospective Template Update a specific Retrospective Template by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | PostMortemTemplateResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, + ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """Update a Retrospective Template + """ Update a Retrospective Template Update a specific Retrospective Template by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, + ) -> ErrorsList | PostMortemTemplateResponse | None: - """Update a Retrospective Template + """ Update a Retrospective Template Update a specific Retrospective Template by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | PostMortemTemplateResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/roles/__init__.py b/rootly_sdk/api/roles/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/roles/__init__.py +++ b/rootly_sdk/api/roles/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/roles/create_role.py b/rootly_sdk/api/roles/create_role.py index 14a23064..b15c9c4b 100644 --- a/rootly_sdk/api/roles/create_role.py +++ b/rootly_sdk/api/roles/create_role.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_role import NewRole from ...models.role_response import RoleResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewRole, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/roles", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | RoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RoleResponse | None: if response.status_code == 201: response_201 = RoleResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRole, + ) -> Response[ErrorsList | RoleResponse]: - """Creates a role + """ Creates a role Creates a new role from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | RoleResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewRole, + ) -> ErrorsList | RoleResponse | None: - """Creates a role + """ Creates a role Creates a new role from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | RoleResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewRole, + ) -> Response[ErrorsList | RoleResponse]: - """Creates a role + """ Creates a role Creates a new role from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RoleResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewRole, + ) -> ErrorsList | RoleResponse | None: - """Creates a role + """ Creates a role Creates a new role from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | RoleResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/roles/delete_role.py b/rootly_sdk/api/roles/delete_role.py index 72c04400..f8220206 100644 --- a/rootly_sdk/api/roles/delete_role.py +++ b/rootly_sdk/api/roles/delete_role.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.role_response import RoleResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/roles/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/roles/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RoleResponse | None: if response.status_code == 200: response_200 = RoleResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RoleResponse]: - """Delete a role + """ Delete a role Delete a specific role by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | RoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | RoleResponse | None: - """Delete a role + """ Delete a role Delete a specific role by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | RoleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RoleResponse]: - """Delete a role + """ Delete a role Delete a specific role by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | RoleResponse | None: - """Delete a role + """ Delete a role Delete a specific role by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | RoleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/roles/get_role.py b/rootly_sdk/api/roles/get_role.py index ec32d7ee..5b9ffa28 100644 --- a/rootly_sdk/api/roles/get_role.py +++ b/rootly_sdk/api/roles/get_role.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.role_response import RoleResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/roles/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/roles/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | RoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RoleResponse | None: if response.status_code == 200: response_200 = RoleResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RoleResponse]: - """Retrieves a role + """ Retrieves a role Retrieves a specific role by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | RoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | RoleResponse | None: - """Retrieves a role + """ Retrieves a role Retrieves a specific role by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | RoleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | RoleResponse]: - """Retrieves a role + """ Retrieves a role Retrieves a specific role by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | RoleResponse | None: - """Retrieves a role + """ Retrieves a role Retrieves a specific role by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | RoleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/roles/list_roles.py b/rootly_sdk/api/roles/list_roles.py index fd378970..781defdc 100644 --- a/rootly_sdk/api/roles/list_roles.py +++ b/rootly_sdk/api/roles/list_roles.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.role_list import RoleList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,7 +27,11 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -48,21 +57,27 @@ def _get_kwargs( 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/roles", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RoleList | None: if response.status_code == 200: response_200 = RoleList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -94,8 +109,9 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[RoleList]: - """List roles + """ List roles List roles @@ -118,20 +134,22 @@ def sync_detailed( Returns: Response[RoleList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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( @@ -140,7 +158,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -155,8 +172,9 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> RoleList | None: - """List roles + """ List roles List roles @@ -179,23 +197,24 @@ def sync( Returns: RoleList - """ + """ + return sync_detailed( client=client, - include=include, - 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 +include=include, +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( *, @@ -211,8 +230,9 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[RoleList]: - """List roles + """ List roles List roles @@ -235,27 +255,30 @@ async def asyncio_detailed( Returns: Response[RoleList] - """ + """ + kwargs = _get_kwargs( include=include, - 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -270,8 +293,9 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> RoleList | None: - """List roles + """ List roles List roles @@ -294,21 +318,21 @@ async def asyncio( Returns: RoleList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - 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 + """ + + + return (await asyncio_detailed( + client=client, +include=include, +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/roles/update_role.py b/rootly_sdk/api/roles/update_role.py index a0e1e4cd..b5f87327 100644 --- a/rootly_sdk/api/roles/update_role.py +++ b/rootly_sdk/api/roles/update_role.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.role_response import RoleResponse from ...models.update_role import UpdateRole -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateRole, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/roles/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/roles/{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 | RoleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RoleResponse | None: if response.status_code == 200: response_200 = RoleResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | RoleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRole, + ) -> Response[ErrorsList | RoleResponse]: - """Update a role + """ Update a role Update a specific role by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | RoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, + ) -> ErrorsList | RoleResponse | None: - """Update a role + """ Update a role Update a specific role by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | RoleResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, + ) -> Response[ErrorsList | RoleResponse]: - """Update a role + """ Update a role Update a specific role by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RoleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, + ) -> ErrorsList | RoleResponse | None: - """Update a role + """ Update a role Update a specific role by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | RoleResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/schedule_rotation_active_days/__init__.py b/rootly_sdk/api/schedule_rotation_active_days/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/schedule_rotation_active_days/__init__.py +++ b/rootly_sdk/api/schedule_rotation_active_days/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 8bb86f5f..402a9991 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_schedule_rotation_active_day import NewScheduleRotationActiveDay from ...models.schedule_rotation_active_day_response import ScheduleRotationActiveDayResponse -from ...types import Response +from typing import cast + def _get_kwargs( schedule_rotation_id: str, *, body: NewScheduleRotationActiveDay, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days".format( - schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), - ), + "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() + headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleRotationActiveDayResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationActiveDayResponse | None: if response.status_code == 201: response_201 = ScheduleRotationActiveDayResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewScheduleRotationActiveDay, + ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """Creates a schedule rotation active day + """ Creates a schedule rotation active day Creates a new schedule rotation active day from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ + """ + kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationActiveDay, + ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """Creates a schedule rotation active day + """ Creates a schedule rotation active day Creates a new schedule rotation active day from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ + """ + return sync_detailed( schedule_rotation_id=schedule_rotation_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationActiveDay, + ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """Creates a schedule rotation active day + """ Creates a schedule rotation active day Creates a new schedule rotation active day from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ + """ + kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationActiveDay, + ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """Creates a schedule rotation active day + """ Creates a schedule rotation active day Creates a new schedule rotation active day from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - - return ( - await asyncio_detailed( - schedule_rotation_id=schedule_rotation_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_rotation_id=schedule_rotation_id, +client=client, +body=body, + + )).parsed 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 a98550d8..4e264f59 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_rotation_active_day_response import ScheduleRotationActiveDayResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/schedule_rotation_active_days/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedule_rotation_active_days/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleRotationActiveDayResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationActiveDayResponse | None: if response.status_code == 200: response_200 = ScheduleRotationActiveDayResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """Delete a schedule rotation active day + """ Delete a schedule rotation active day Delete a specific schedule rotation active day @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """Delete a schedule rotation active day + """ Delete a schedule rotation active day Delete a specific schedule rotation active day @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """Delete a schedule rotation active day + """ Delete a schedule rotation active day Delete a specific schedule rotation active day @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """Delete a schedule rotation active day + """ Delete a schedule rotation active day Delete a specific schedule rotation active day @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 fa2947c6..e12d6e25 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_rotation_active_day_response import ScheduleRotationActiveDayResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/schedule_rotation_active_days/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedule_rotation_active_days/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleRotationActiveDayResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationActiveDayResponse | None: if response.status_code == 200: response_200 = ScheduleRotationActiveDayResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """Retrieves a schedule rotation active day + """ Retrieves a schedule rotation active day Retrieves a specific schedule rotation active day by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """Retrieves a schedule rotation active day + """ Retrieves a schedule rotation active day Retrieves a specific schedule rotation active day by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """Retrieves a schedule rotation active day + """ Retrieves a schedule rotation active day Retrieves a specific schedule rotation active day by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """Retrieves a schedule rotation active day + """ Retrieves a schedule rotation active day Retrieves a specific schedule rotation active day by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 17ccecb6..a8daeb00 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.schedule_rotation_active_day_list import ScheduleRotationActiveDayList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days".format( - schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), - ), + "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days".format(schedule_rotation_id=quote(str(schedule_rotation_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ScheduleRotationActiveDayList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ScheduleRotationActiveDayList | None: if response.status_code == 200: response_200 = ScheduleRotationActiveDayList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ScheduleRotationActiveDayList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ScheduleRotationActiveDayList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[ScheduleRotationActiveDayList]: - """List schedule rotation active days + """ List schedule rotation active days List schedule rotation active days @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[ScheduleRotationActiveDayList] - """ + """ + kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_rotation_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> ScheduleRotationActiveDayList | None: - """List schedule rotation active days + """ List schedule rotation active days List schedule rotation active days @@ -128,16 +139,17 @@ def sync( Returns: ScheduleRotationActiveDayList - """ + """ + return sync_detailed( schedule_rotation_id=schedule_rotation_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( schedule_rotation_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[ScheduleRotationActiveDayList]: - """List schedule rotation active days + """ List schedule rotation active days List schedule rotation active days @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[ScheduleRotationActiveDayList] - """ + """ + kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_rotation_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> ScheduleRotationActiveDayList | None: - """List schedule rotation active days + """ List schedule rotation active days List schedule rotation active days @@ -201,14 +218,14 @@ async def asyncio( Returns: ScheduleRotationActiveDayList - """ - - return ( - await asyncio_detailed( - schedule_rotation_id=schedule_rotation_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_rotation_id=schedule_rotation_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 b6446600..1397cf3a 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_rotation_active_day_response import ScheduleRotationActiveDayResponse from ...models.update_schedule_rotation_active_day import UpdateScheduleRotationActiveDay -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateScheduleRotationActiveDay, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/schedule_rotation_active_days/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedule_rotation_active_days/{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 | ScheduleRotationActiveDayResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationActiveDayResponse | None: if response.status_code == 200: response_200 = ScheduleRotationActiveDayResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateScheduleRotationActiveDay, + ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """Update a schedule rotation active day + """ Update a schedule rotation active day Update a specific schedule rotation active day by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationActiveDay, + ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """Update a schedule rotation active day + """ Update a schedule rotation active day Update a specific schedule rotation active day by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationActiveDay, + ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """Update a schedule rotation active day + """ Update a schedule rotation active day Update a specific schedule rotation active day by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationActiveDay, + ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """Update a schedule rotation active day + """ Update a schedule rotation active day Update a specific schedule rotation active day by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/schedule_rotation_users/__init__.py b/rootly_sdk/api/schedule_rotation_users/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/schedule_rotation_users/__init__.py +++ b/rootly_sdk/api/schedule_rotation_users/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 87733a8a..e573f9ba 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_schedule_rotation_user import NewScheduleRotationUser from ...models.schedule_rotation_user_response import ScheduleRotationUserResponse -from ...types import Response +from typing import cast + def _get_kwargs( schedule_rotation_id: str, *, body: NewScheduleRotationUser, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users".format( - schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), - ), + "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() + headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleRotationUserResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationUserResponse | None: if response.status_code == 201: response_201 = ScheduleRotationUserResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationUserResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationUserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewScheduleRotationUser, + ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """Creates a schedule rotation user + """ Creates a schedule rotation user Creates a new schedule rotation user from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ + """ + kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationUser, + ) -> ErrorsList | ScheduleRotationUserResponse | None: - """Creates a schedule rotation user + """ Creates a schedule rotation user Creates a new schedule rotation user from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | ScheduleRotationUserResponse - """ + """ + return sync_detailed( schedule_rotation_id=schedule_rotation_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationUser, + ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """Creates a schedule rotation user + """ Creates a schedule rotation user Creates a new schedule rotation user from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ + """ + kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationUser, + ) -> ErrorsList | ScheduleRotationUserResponse | None: - """Creates a schedule rotation user + """ Creates a schedule rotation user Creates a new schedule rotation user from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationUserResponse - """ - - return ( - await asyncio_detailed( - schedule_rotation_id=schedule_rotation_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_rotation_id=schedule_rotation_id, +client=client, +body=body, + + )).parsed 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 77221b81..23cfa8c0 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_rotation_user_response import ScheduleRotationUserResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/schedule_rotation_users/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedule_rotation_users/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleRotationUserResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationUserResponse | None: if response.status_code == 200: response_200 = ScheduleRotationUserResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationUserResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationUserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """Delete a schedule rotation user + """ Delete a schedule rotation user Delete a specific schedule rotation user by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationUserResponse | None: - """Delete a schedule rotation user + """ Delete a schedule rotation user Delete a specific schedule rotation user by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | ScheduleRotationUserResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """Delete a schedule rotation user + """ Delete a schedule rotation user Delete a specific schedule rotation user by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationUserResponse | None: - """Delete a schedule rotation user + """ Delete a schedule rotation user Delete a specific schedule rotation user by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationUserResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 bf1a538b..c34e59b6 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_rotation_user_response import ScheduleRotationUserResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/schedule_rotation_users/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedule_rotation_users/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleRotationUserResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationUserResponse | None: if response.status_code == 200: response_200 = ScheduleRotationUserResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationUserResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationUserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """Retrieves a schedule rotation user + """ Retrieves a schedule rotation user Retrieves a specific schedule rotation user by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationUserResponse | None: - """Retrieves a schedule rotation user + """ Retrieves a schedule rotation user Retrieves a specific schedule rotation user by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | ScheduleRotationUserResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """Retrieves a schedule rotation user + """ Retrieves a schedule rotation user Retrieves a specific schedule rotation user by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationUserResponse | None: - """Retrieves a schedule rotation user + """ Retrieves a schedule rotation user Retrieves a specific schedule rotation user by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationUserResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 a217745f..24cb32b7 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.schedule_rotation_user_list import ScheduleRotationUserList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users".format( - schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), - ), + "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users".format(schedule_rotation_id=quote(str(schedule_rotation_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ScheduleRotationUserList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ScheduleRotationUserList | None: if response.status_code == 200: response_200 = ScheduleRotationUserList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ScheduleRotationUserList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ScheduleRotationUserList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[ScheduleRotationUserList]: - """List schedule rotation users + """ List schedule rotation users Args: schedule_rotation_id (str): @@ -86,13 +95,15 @@ def sync_detailed( Returns: Response[ScheduleRotationUserList] - """ + """ + kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -101,7 +112,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_rotation_id: str, *, @@ -109,8 +119,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> ScheduleRotationUserList | None: - """List schedule rotation users + """ List schedule rotation users Args: schedule_rotation_id (str): @@ -124,16 +135,17 @@ def sync( Returns: ScheduleRotationUserList - """ + """ + return sync_detailed( schedule_rotation_id=schedule_rotation_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( schedule_rotation_id: str, @@ -142,8 +154,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[ScheduleRotationUserList]: - """List schedule rotation users + """ List schedule rotation users Args: schedule_rotation_id (str): @@ -157,20 +170,23 @@ async def asyncio_detailed( Returns: Response[ScheduleRotationUserList] - """ + """ + kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_rotation_id: str, *, @@ -178,8 +194,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> ScheduleRotationUserList | None: - """List schedule rotation users + """ List schedule rotation users Args: schedule_rotation_id (str): @@ -193,14 +210,14 @@ async def asyncio( Returns: ScheduleRotationUserList - """ - - return ( - await asyncio_detailed( - schedule_rotation_id=schedule_rotation_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_rotation_id=schedule_rotation_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 c8dbb34b..a960ea40 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_rotation_user_response import ScheduleRotationUserResponse from ...models.update_schedule_rotation_user import UpdateScheduleRotationUser -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateScheduleRotationUser, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/schedule_rotation_users/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedule_rotation_users/{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 | ScheduleRotationUserResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationUserResponse | None: if response.status_code == 200: response_200 = ScheduleRotationUserResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationUserResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationUserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateScheduleRotationUser, + ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """Update schedule rotation user + """ Update schedule rotation user Update a specific schedule rotation user by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationUser, + ) -> ErrorsList | ScheduleRotationUserResponse | None: - """Update schedule rotation user + """ Update schedule rotation user Update a specific schedule rotation user by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | ScheduleRotationUserResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationUser, + ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """Update schedule rotation user + """ Update schedule rotation user Update a specific schedule rotation user by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationUser, + ) -> ErrorsList | ScheduleRotationUserResponse | None: - """Update schedule rotation user + """ Update schedule rotation user Update a specific schedule rotation user by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationUserResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/schedule_rotations/__init__.py b/rootly_sdk/api/schedule_rotations/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/schedule_rotations/__init__.py +++ b/rootly_sdk/api/schedule_rotations/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py index 61069e24..78a06971 100644 --- a/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_schedule_rotation import NewScheduleRotation from ...models.schedule_rotation_response import ScheduleRotationResponse -from ...types import Response +from typing import cast + def _get_kwargs( schedule_id: str, *, body: NewScheduleRotation, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedules/{schedule_id}/schedule_rotations".format( - schedule_id=quote(str(schedule_id), safe=""), - ), + "url": "/v1/schedules/{schedule_id}/schedule_rotations".format(schedule_id=quote(str(schedule_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 | ScheduleRotationResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationResponse | None: if response.status_code == 201: response_201 = ScheduleRotationResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewScheduleRotation, + ) -> Response[ErrorsList | ScheduleRotationResponse]: - """Creates a schedule rotation + """ Creates a schedule rotation Creates a new schedule rotation from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_id: str, *, client: AuthenticatedClient, body: NewScheduleRotation, + ) -> ErrorsList | ScheduleRotationResponse | None: - """Creates a schedule rotation + """ Creates a schedule rotation Creates a new schedule rotation from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | ScheduleRotationResponse - """ + """ + return sync_detailed( schedule_id=schedule_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, body: NewScheduleRotation, + ) -> Response[ErrorsList | ScheduleRotationResponse]: - """Creates a schedule rotation + """ Creates a schedule rotation Creates a new schedule rotation from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_id: str, *, client: AuthenticatedClient, body: NewScheduleRotation, + ) -> ErrorsList | ScheduleRotationResponse | None: - """Creates a schedule rotation + """ Creates a schedule rotation Creates a new schedule rotation from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationResponse - """ - - return ( - await asyncio_detailed( - schedule_id=schedule_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_id=schedule_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py index 441f2ff1..f5ae20a6 100644 --- a/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_rotation_response import ScheduleRotationResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/schedule_rotations/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedule_rotations/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleRotationResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationResponse | None: if response.status_code == 200: response_200 = ScheduleRotationResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationResponse]: - """Delete a schedule rotation + """ Delete a schedule rotation Delete a specific schedule rotation by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationResponse | None: - """Delete a schedule rotation + """ Delete a schedule rotation Delete a specific schedule rotation by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | ScheduleRotationResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationResponse]: - """Delete a schedule rotation + """ Delete a schedule rotation Delete a specific schedule rotation by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationResponse | None: - """Delete a schedule rotation + """ Delete a schedule rotation Delete a specific schedule rotation by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py index 09f83172..609a3e3f 100644 --- a/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_rotation_response import ScheduleRotationResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/schedule_rotations/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedule_rotations/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleRotationResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationResponse | None: if response.status_code == 200: response_200 = ScheduleRotationResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationResponse]: - """Retrieves a schedule rotation + """ Retrieves a schedule rotation Retrieves a specific schedule rotation by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationResponse | None: - """Retrieves a schedule rotation + """ Retrieves a schedule rotation Retrieves a specific schedule rotation by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | ScheduleRotationResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleRotationResponse]: - """Retrieves a schedule rotation + """ Retrieves a schedule rotation Retrieves a specific schedule rotation by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleRotationResponse | None: - """Retrieves a schedule rotation + """ Retrieves a schedule rotation Retrieves a specific schedule rotation by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py b/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py index 80ad5986..1872704a 100644 --- a/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py +++ b/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.schedule_rotation_list import ScheduleRotationList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -17,7 +21,11 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,23 +37,27 @@ def _get_kwargs( 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/schedules/{schedule_id}/schedule_rotations".format( - schedule_id=quote(str(schedule_id), safe=""), - ), + "url": "/v1/schedules/{schedule_id}/schedule_rotations".format(schedule_id=quote(str(schedule_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ScheduleRotationList | None: if response.status_code == 200: response_200 = ScheduleRotationList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -54,9 +66,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ScheduleRotationList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ScheduleRotationList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,8 +83,9 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[ScheduleRotationList]: - """List schedule rotations + """ List schedule rotations List schedule rotations @@ -91,14 +102,16 @@ def sync_detailed( Returns: Response[ScheduleRotationList] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + ) response = client.get_httpx_client().request( @@ -107,7 +120,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( schedule_id: str, *, @@ -116,8 +128,9 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> ScheduleRotationList | None: - """List schedule rotations + """ List schedule rotations List schedule rotations @@ -134,17 +147,18 @@ def sync( Returns: ScheduleRotationList - """ + """ + return sync_detailed( schedule_id=schedule_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + ).parsed async def asyncio_detailed( schedule_id: str, @@ -154,8 +168,9 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[ScheduleRotationList]: - """List schedule rotations + """ List schedule rotations List schedule rotations @@ -172,21 +187,24 @@ async def asyncio_detailed( Returns: Response[ScheduleRotationList] - """ + """ + kwargs = _get_kwargs( schedule_id=schedule_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( schedule_id: str, *, @@ -195,8 +213,9 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> ScheduleRotationList | None: - """List schedule rotations + """ List schedule rotations List schedule rotations @@ -213,15 +232,15 @@ async def asyncio( Returns: ScheduleRotationList - """ - - return ( - await asyncio_detailed( - schedule_id=schedule_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + schedule_id=schedule_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py index 2016f193..d3cb258f 100644 --- a/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_rotation_response import ScheduleRotationResponse from ...models.update_schedule_rotation import UpdateScheduleRotation -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateScheduleRotation, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/schedule_rotations/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedule_rotations/{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 | ScheduleRotationResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationResponse | None: if response.status_code == 200: response_200 = ScheduleRotationResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleRotationResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateScheduleRotation, + ) -> Response[ErrorsList | ScheduleRotationResponse]: - """Update a schedule rotation + """ Update a schedule rotation Update a specific schedule rotation by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotation, + ) -> ErrorsList | ScheduleRotationResponse | None: - """Update a schedule rotation + """ Update a schedule rotation Update a specific schedule rotation by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | ScheduleRotationResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotation, + ) -> Response[ErrorsList | ScheduleRotationResponse]: - """Update a schedule rotation + """ Update a schedule rotation Update a specific schedule rotation by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotation, + ) -> ErrorsList | ScheduleRotationResponse | None: - """Update a schedule rotation + """ Update a schedule rotation Update a specific schedule rotation by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/schedules/__init__.py b/rootly_sdk/api/schedules/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/schedules/__init__.py +++ b/rootly_sdk/api/schedules/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/schedules/create_schedule.py b/rootly_sdk/api/schedules/create_schedule.py index fe6cb78c..683a7c0e 100644 --- a/rootly_sdk/api/schedules/create_schedule.py +++ b/rootly_sdk/api/schedules/create_schedule.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_schedule import NewSchedule from ...models.schedule_response import ScheduleResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewSchedule, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/schedules", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | ScheduleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleResponse | None: if response.status_code == 201: response_201 = ScheduleResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSchedule, + ) -> Response[ErrorsList | ScheduleResponse]: - """Creates a schedule + """ Creates a schedule Creates a new schedule from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewSchedule, + ) -> ErrorsList | ScheduleResponse | None: - """Creates a schedule + """ Creates a schedule Creates a new schedule from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | ScheduleResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSchedule, + ) -> Response[ErrorsList | ScheduleResponse]: - """Creates a schedule + """ Creates a schedule Creates a new schedule from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewSchedule, + ) -> ErrorsList | ScheduleResponse | None: - """Creates a schedule + """ Creates a schedule Creates a new schedule from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | ScheduleResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/schedules/delete_schedule.py b/rootly_sdk/api/schedules/delete_schedule.py index 1d4d73ba..c126f560 100644 --- a/rootly_sdk/api/schedules/delete_schedule.py +++ b/rootly_sdk/api/schedules/delete_schedule.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_response import ScheduleResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/schedules/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedules/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleResponse | None: if response.status_code == 200: response_200 = ScheduleResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleResponse]: - """Delete a schedule + """ Delete a schedule Delete a specific schedule by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleResponse | None: - """Delete a schedule + """ Delete a schedule Delete a specific schedule by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | ScheduleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleResponse]: - """Delete a schedule + """ Delete a schedule Delete a specific schedule by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleResponse | None: - """Delete a schedule + """ Delete a schedule Delete a specific schedule by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | ScheduleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/schedules/get_schedule.py b/rootly_sdk/api/schedules/get_schedule.py index 254e51f6..9835f3b3 100644 --- a/rootly_sdk/api/schedules/get_schedule.py +++ b/rootly_sdk/api/schedules/get_schedule.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_response import ScheduleResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/schedules/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedules/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ScheduleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleResponse | None: if response.status_code == 200: response_200 = ScheduleResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleResponse]: - """Retrieves a schedule + """ Retrieves a schedule Retrieves a specific schedule by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleResponse | None: - """Retrieves a schedule + """ Retrieves a schedule Retrieves a specific schedule by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | ScheduleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ScheduleResponse]: - """Retrieves a schedule + """ Retrieves a schedule Retrieves a specific schedule by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | ScheduleResponse | None: - """Retrieves a schedule + """ Retrieves a schedule Retrieves a specific schedule by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | ScheduleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/schedules/list_schedules.py b/rootly_sdk/api/schedules/list_schedules.py index bec7bb90..1e136a1b 100644 --- a/rootly_sdk/api/schedules/list_schedules.py +++ b/rootly_sdk/api/schedules/list_schedules.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.schedule_list import ScheduleList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -18,9 +23,17 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -38,25 +51,39 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + 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/schedules", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ScheduleList | None: if response.status_code == 200: response_200 = ScheduleList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -84,10 +111,15 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[ScheduleList]: - """List schedules + """ List schedules List schedules @@ -99,6 +131,10 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -108,18 +144,24 @@ def sync_detailed( Returns: Response[ScheduleList] - """ + """ + kwargs = _get_kwargs( include=include, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -128,7 +170,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -139,10 +180,15 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> ScheduleList | None: - """List schedules + """ List schedules List schedules @@ -154,6 +200,10 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -163,21 +213,26 @@ def sync( Returns: ScheduleList - """ + """ + return sync_detailed( client=client, - include=include, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -189,10 +244,15 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[ScheduleList]: - """List schedules + """ List schedules List schedules @@ -204,6 +264,10 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -213,25 +277,32 @@ async def asyncio_detailed( Returns: Response[ScheduleList] - """ + """ + kwargs = _get_kwargs( include=include, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -242,10 +313,15 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> ScheduleList | None: - """List schedules + """ List schedules List schedules @@ -257,6 +333,10 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): pagenumber (int | Unset): pagesize (int | Unset): @@ -266,19 +346,23 @@ async def asyncio( Returns: ScheduleList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - filtersearch=filtersearch, - filtername=filtername, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +filtersearch=filtersearch, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/schedules/update_schedule.py b/rootly_sdk/api/schedules/update_schedule.py index cc14d173..212a933d 100644 --- a/rootly_sdk/api/schedules/update_schedule.py +++ b/rootly_sdk/api/schedules/update_schedule.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.schedule_response import ScheduleResponse from ...models.update_schedule import UpdateSchedule -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateSchedule, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/schedules/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedules/{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 | ScheduleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleResponse | None: if response.status_code == 200: response_200 = ScheduleResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ScheduleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSchedule, + ) -> Response[ErrorsList | ScheduleResponse]: - """Update a schedule + """ Update a schedule Updates a specific schedule by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateSchedule, + ) -> ErrorsList | ScheduleResponse | None: - """Update a schedule + """ Update a schedule Updates a specific schedule by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | ScheduleResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateSchedule, + ) -> Response[ErrorsList | ScheduleResponse]: - """Update a schedule + """ Update a schedule Updates a specific schedule by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateSchedule, + ) -> ErrorsList | ScheduleResponse | None: - """Update a schedule + """ Update a schedule Updates a specific schedule by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | ScheduleResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/secrets/__init__.py b/rootly_sdk/api/secrets/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/secrets/__init__.py +++ b/rootly_sdk/api/secrets/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/secrets/create_secret.py b/rootly_sdk/api/secrets/create_secret.py index 927e7547..687b4955 100644 --- a/rootly_sdk/api/secrets/create_secret.py +++ b/rootly_sdk/api/secrets/create_secret.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_secret import NewSecret from ...models.secret_response import SecretResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewSecret, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/secrets", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | SecretResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SecretResponse | None: if response.status_code == 201: response_201 = SecretResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SecretResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SecretResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSecret, + ) -> Response[ErrorsList | SecretResponse]: - """Creates a secret + """ Creates a secret Creates a new secret from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | SecretResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewSecret, + ) -> ErrorsList | SecretResponse | None: - """Creates a secret + """ Creates a secret Creates a new secret from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | SecretResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSecret, + ) -> Response[ErrorsList | SecretResponse]: - """Creates a secret + """ Creates a secret Creates a new secret from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SecretResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewSecret, + ) -> ErrorsList | SecretResponse | None: - """Creates a secret + """ Creates a secret Creates a new secret from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | SecretResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/secrets/delete_secret.py b/rootly_sdk/api/secrets/delete_secret.py index cab7f849..855dbe5b 100644 --- a/rootly_sdk/api/secrets/delete_secret.py +++ b/rootly_sdk/api/secrets/delete_secret.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.secret_response import SecretResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/secrets/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/secrets/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | SecretResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SecretResponse | None: if response.status_code == 200: response_200 = SecretResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SecretResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SecretResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SecretResponse]: - """Delete a secret + """ Delete a secret Delete a specific secret by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | SecretResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | SecretResponse | None: - """Delete a secret + """ Delete a secret Delete a specific secret by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | SecretResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SecretResponse]: - """Delete a secret + """ Delete a secret Delete a specific secret by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SecretResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | SecretResponse | None: - """Delete a secret + """ Delete a secret Delete a specific secret by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | SecretResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/secrets/get_secret.py b/rootly_sdk/api/secrets/get_secret.py index 0a85cd44..07d1ad3a 100644 --- a/rootly_sdk/api/secrets/get_secret.py +++ b/rootly_sdk/api/secrets/get_secret.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.secret_response import SecretResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/secrets/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/secrets/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | SecretResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SecretResponse | None: if response.status_code == 200: response_200 = SecretResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SecretResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SecretResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SecretResponse]: - """Retrieves a secret + """ Retrieves a secret Retrieve a specific secret by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | SecretResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | SecretResponse | None: - """Retrieves a secret + """ Retrieves a secret Retrieve a specific secret by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | SecretResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SecretResponse]: - """Retrieves a secret + """ Retrieves a secret Retrieve a specific secret by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SecretResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | SecretResponse | None: - """Retrieves a secret + """ Retrieves a secret Retrieve a specific secret by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | SecretResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/secrets/list_secrets.py b/rootly_sdk/api/secrets/list_secrets.py index 5763e6c0..e7052751 100644 --- a/rootly_sdk/api/secrets/list_secrets.py +++ b/rootly_sdk/api/secrets/list_secrets.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.secret_list import SecretList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -14,7 +19,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -24,21 +33,27 @@ def _get_kwargs( 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/secrets", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> SecretList | None: if response.status_code == 200: response_200 = SecretList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -62,8 +77,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[SecretList]: - """List secrets + """ List secrets List secrets @@ -78,12 +94,14 @@ def sync_detailed( Returns: Response[SecretList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -92,15 +110,15 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> SecretList | None: - """List secrets + """ List secrets List secrets @@ -115,15 +133,16 @@ def sync( Returns: SecretList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -131,8 +150,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[SecretList]: - """List secrets + """ List secrets List secrets @@ -147,27 +167,31 @@ async def asyncio_detailed( Returns: Response[SecretList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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, + ) -> SecretList | None: - """List secrets + """ List secrets List secrets @@ -182,13 +206,13 @@ async def asyncio( Returns: SecretList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/secrets/update_secret.py b/rootly_sdk/api/secrets/update_secret.py index 41fe293e..646db44c 100644 --- a/rootly_sdk/api/secrets/update_secret.py +++ b/rootly_sdk/api/secrets/update_secret.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.secret_response import SecretResponse from ...models.update_secret import UpdateSecret -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateSecret, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/secrets/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/secrets/{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 | SecretResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SecretResponse | None: if response.status_code == 200: response_200 = SecretResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SecretResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SecretResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSecret, + ) -> Response[ErrorsList | SecretResponse]: - """Update a secret + """ Update a secret Update a specific secret by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | SecretResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateSecret, + ) -> ErrorsList | SecretResponse | None: - """Update a secret + """ Update a secret Update a specific secret by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | SecretResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateSecret, + ) -> Response[ErrorsList | SecretResponse]: - """Update a secret + """ Update a secret Update a specific secret by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SecretResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateSecret, + ) -> ErrorsList | SecretResponse | None: - """Update a secret + """ Update a secret Update a specific secret by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | SecretResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/services/__init__.py b/rootly_sdk/api/services/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/services/__init__.py +++ b/rootly_sdk/api/services/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/services/bulk_delete_services.py b/rootly_sdk/api/services/bulk_delete_services.py new file mode 100644 index 00000000..1faa309a --- /dev/null +++ b/rootly_sdk/api/services/bulk_delete_services.py @@ -0,0 +1,233 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_destroy_services_response import BulkDestroyServicesResponse +from ...models.bulk_destroy_services_type_0 import BulkDestroyServicesType0 +from ...models.bulk_destroy_services_type_1 import BulkDestroyServicesType1 +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + *, + body: BulkDestroyServicesType0 | BulkDestroyServicesType1, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/services/bulk_delete", + } + + + if isinstance(body, BulkDestroyServicesType0): + _kwargs["json"] = body.to_dict() + else: + _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) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyServicesResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyServicesResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyServicesResponse.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | 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: BulkDestroyServicesType0 | BulkDestroyServicesType1, + +) -> Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList]: + """ Bulk delete Services + + Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyServicesType0 | BulkDestroyServicesType1): Two mutually exclusive modes. + Pass exactly one of: external_ids (delete specific records) or managed_by (prune all + managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | 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: BulkDestroyServicesType0 | BulkDestroyServicesType1, + +) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Services + + Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyServicesType0 | BulkDestroyServicesType1): Two mutually exclusive modes. + Pass exactly one of: external_ids (delete specific records) or managed_by (prune all + managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyServicesType0 | BulkDestroyServicesType1, + +) -> Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList]: + """ Bulk delete Services + + Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyServicesType0 | BulkDestroyServicesType1): Two mutually exclusive modes. + Pass exactly one of: external_ids (delete specific records) or managed_by (prune all + managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | 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: BulkDestroyServicesType0 | BulkDestroyServicesType1, + +) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Services + + Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyServicesType0 | BulkDestroyServicesType1): Two mutually exclusive modes. + Pass exactly one of: external_ids (delete specific records) or managed_by (prune all + managed records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/services/bulk_upsert_services.py b/rootly_sdk/api/services/bulk_upsert_services.py new file mode 100644 index 00000000..d5e266fc --- /dev/null +++ b/rootly_sdk/api/services/bulk_upsert_services.py @@ -0,0 +1,236 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_upsert_services import BulkUpsertServices +from ...models.bulk_upsert_services_error import BulkUpsertServicesError +from ...models.bulk_upsert_services_response import BulkUpsertServicesResponse +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + *, + body: BulkUpsertServices, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/services/bulk_upsert", + } + + _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) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertServicesResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertServicesError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertServicesError.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | 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: BulkUpsertServices, + +) -> Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList]: + """ Bulk upsert Services + + Create or update multiple services by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertServices): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | 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: BulkUpsertServices, + +) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: + """ Bulk upsert Services + + Create or update multiple services by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertServices): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertServices, + +) -> Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList]: + """ Bulk upsert Services + + Create or update multiple services by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertServices): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | 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: BulkUpsertServices, + +) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: + """ Bulk upsert Services + + Create or update multiple services by external_id. Only attributes present in the payload are + written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with + both create and update capability across the resource scope (team/org-scoped); record-scoped + principals cannot use this endpoint (they receive 404), which also prevents the create-vs-update + branch from leaking whether an external_id exists. + + Args: + body (BulkUpsertServices): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/services/create_service.py b/rootly_sdk/api/services/create_service.py index fcd786db..27f946b2 100644 --- a/rootly_sdk/api/services/create_service.py +++ b/rootly_sdk/api/services/create_service.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_service import NewService from ...models.service_response import ServiceResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewService, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/services", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | ServiceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ServiceResponse | None: if response.status_code == 201: response_201 = ServiceResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ServiceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewService, + ) -> Response[ErrorsList | ServiceResponse]: - """Creates a service + """ Creates a service Creates a new service from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewService, + ) -> ErrorsList | ServiceResponse | None: - """Creates a service + """ Creates a service Creates a new service from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | ServiceResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewService, + ) -> Response[ErrorsList | ServiceResponse]: - """Creates a service + """ Creates a service Creates a new service from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewService, + ) -> ErrorsList | ServiceResponse | None: - """Creates a service + """ Creates a service Creates a new service from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | ServiceResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/services/create_service_catalog_property.py b/rootly_sdk/api/services/create_service_catalog_property.py index 3c61dc54..84460894 100644 --- a/rootly_sdk/api/services/create_service_catalog_property.py +++ b/rootly_sdk/api/services/create_service_catalog_property.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_property import NewCatalogProperty -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCatalogProperty, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/services/properties", @@ -24,28 +34,34 @@ def _get_kwargs( _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: + +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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> CatalogPropertyResponse | ErrorsList | None: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -114,20 +131,22 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/services/delete_service.py b/rootly_sdk/api/services/delete_service.py index 52fc6e7d..bbcda5d4 100644 --- a/rootly_sdk/api/services/delete_service.py +++ b/rootly_sdk/api/services/delete_service.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.service_response import ServiceResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/services/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/services/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ServiceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ServiceResponse | None: if response.status_code == 200: response_200 = ServiceResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ServiceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ServiceResponse]: - """Delete a service + """ Delete a service Delete a specific service by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | ServiceResponse | None: - """Delete a service + """ Delete a service Delete a specific service by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | ServiceResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ServiceResponse]: - """Delete a service + """ Delete a service Delete a specific service by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | ServiceResponse | None: - """Delete a service + """ Delete a service Delete a specific service by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | ServiceResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/services/get_service.py b/rootly_sdk/api/services/get_service.py index 17d3ef16..c88fbe8b 100644 --- a/rootly_sdk/api/services/get_service.py +++ b/rootly_sdk/api/services/get_service.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.service_response import ServiceResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/services/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/services/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | ServiceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ServiceResponse | None: if response.status_code == 200: response_200 = ServiceResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ServiceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ServiceResponse]: - """Retrieves a service + """ Retrieves a service Retrieves a specific service by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | ServiceResponse | None: - """Retrieves a service + """ Retrieves a service Retrieves a specific service by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | ServiceResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | ServiceResponse]: - """Retrieves a service + """ Retrieves a service Retrieves a specific service by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | ServiceResponse | None: - """Retrieves a service + """ Retrieves a service Retrieves a specific service by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | ServiceResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/services/get_service_incidents_chart.py b/rootly_sdk/api/services/get_service_incidents_chart.py index 7a881811..4262a8f8 100644 --- a/rootly_sdk/api/services/get_service_incidents_chart.py +++ b/rootly_sdk/api/services/get_service_incidents_chart.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incidents_chart_response import IncidentsChartResponse -from ...types import UNSET, Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, period: str, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} params["period"] = period + 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/{id}/incidents_chart".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/services/{id}/incidents_chart".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentsChartResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentsChartResponse | None: if response.status_code == 200: response_200 = IncidentsChartResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentsChartResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentsChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, period: str, + ) -> Response[ErrorsList | IncidentsChartResponse]: - """Get service incidents chart + """ Get service incidents chart Get service incidents chart @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, period: str, + ) -> ErrorsList | IncidentsChartResponse | None: - """Get service incidents chart + """ Get service incidents chart Get service incidents chart @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | IncidentsChartResponse - """ + """ + return sync_detailed( id=id, - client=client, - period=period, - ).parsed +client=client, +period=period, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, period: str, + ) -> Response[ErrorsList | IncidentsChartResponse]: - """Get service incidents chart + """ Get service incidents chart Get service incidents chart @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, period: str, + ) -> ErrorsList | IncidentsChartResponse | None: - """Get service incidents chart + """ Get service incidents chart Get service incidents chart @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | IncidentsChartResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - period=period, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +period=period, + + )).parsed diff --git a/rootly_sdk/api/services/get_service_uptime_chart.py b/rootly_sdk/api/services/get_service_uptime_chart.py index 1976e560..3dec2458 100644 --- a/rootly_sdk/api/services/get_service_uptime_chart.py +++ b/rootly_sdk/api/services/get_service_uptime_chart.py @@ -1,51 +1,63 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.uptime_chart_response import UptimeChartResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, period: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} params["period"] = period + 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/{id}/uptime_chart".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/services/{id}/uptime_chart".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UptimeChartResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UptimeChartResponse | None: if response.status_code == 200: response_200 = UptimeChartResponse.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: @@ -54,9 +66,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UptimeChartResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UptimeChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +80,9 @@ def sync_detailed( *, client: AuthenticatedClient, period: str | Unset = UNSET, + ) -> Response[ErrorsList | UptimeChartResponse]: - """Get service uptime chart + """ Get service uptime chart Get service uptime chart @@ -85,11 +96,13 @@ def sync_detailed( Returns: Response[ErrorsList | UptimeChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) response = client.get_httpx_client().request( @@ -98,14 +111,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, + ) -> ErrorsList | UptimeChartResponse | None: - """Get service uptime chart + """ Get service uptime chart Get service uptime chart @@ -119,22 +132,24 @@ def sync( Returns: ErrorsList | UptimeChartResponse - """ + """ + return sync_detailed( id=id, - client=client, - period=period, - ).parsed +client=client, +period=period, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, + ) -> Response[ErrorsList | UptimeChartResponse]: - """Get service uptime chart + """ Get service uptime chart Get service uptime chart @@ -148,25 +163,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UptimeChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, + ) -> ErrorsList | UptimeChartResponse | None: - """Get service uptime chart + """ Get service uptime chart Get service uptime chart @@ -180,12 +199,12 @@ async def asyncio( Returns: ErrorsList | UptimeChartResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - period=period, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +period=period, + + )).parsed diff --git a/rootly_sdk/api/services/list_service_catalog_properties.py b/rootly_sdk/api/services/list_service_catalog_properties.py index 54b4e887..825fed21 100644 --- a/rootly_sdk/api/services/list_service_catalog_properties.py +++ b/rootly_sdk/api/services/list_service_catalog_properties.py @@ -1,18 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from ...models.list_service_catalog_properties_include import check_list_service_catalog_properties_include +from ...models.list_service_catalog_properties_include import ListServiceCatalogPropertiesInclude +from ...models.list_service_catalog_properties_sort import check_list_service_catalog_properties_sort +from ...models.list_service_catalog_properties_sort import ListServiceCatalogPropertiesSort +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -28,7 +31,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -62,21 +69,27 @@ def _get_kwargs( 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: @@ -108,8 +121,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Service Catalog Properties @@ -132,20 +146,22 @@ def sync_detailed( 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, +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( @@ -154,7 +170,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -169,8 +184,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Service Catalog Properties @@ -193,23 +209,24 @@ def sync( 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 +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( *, @@ -225,8 +242,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Service Catalog Properties @@ -249,27 +267,30 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -284,8 +305,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Service Catalog Properties @@ -308,21 +330,21 @@ async def asyncio( 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 + """ + + + 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 cb6db677..69a6c048 100644 --- a/rootly_sdk/api/services/list_services.py +++ b/rootly_sdk/api/services/list_services.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.service_list import ServiceList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -27,8 +32,28 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -64,23 +89,61 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[alert_broadcast_enabled][eq]"] = filteralert_broadcast_enabledeq + + params["filter[alert_broadcast_enabled][not_eq]"] = filteralert_broadcast_enablednot_eq + + params["filter[alert_broadcast_enabled][in]"] = filteralert_broadcast_enabledin + + params["filter[alert_broadcast_enabled][not_in]"] = filteralert_broadcast_enablednot_in + + params["filter[incident_broadcast_enabled][eq]"] = filterincident_broadcast_enabledeq + + params["filter[incident_broadcast_enabled][not_eq]"] = filterincident_broadcast_enablednot_eq + + params["filter[incident_broadcast_enabled][in]"] = filterincident_broadcast_enabledin + + params["filter[incident_broadcast_enabled][not_in]"] = filterincident_broadcast_enablednot_in + 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/services", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ServiceList | None: if response.status_code == 200: response_200 = ServiceList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -117,9 +180,26 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[ServiceList]: - """List services + """ List services List services @@ -140,6 +220,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -148,26 +244,44 @@ def sync_detailed( Returns: Response[ServiceList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filteralert_broadcast_enabled=filteralert_broadcast_enabled, - filterincident_broadcast_enabled=filterincident_broadcast_enabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filteralert_broadcast_enabled=filteralert_broadcast_enabled, +filterincident_broadcast_enabled=filterincident_broadcast_enabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, +filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, +filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, +filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, +filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, +filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, +filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, +filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -176,7 +290,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -196,9 +309,26 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> ServiceList | None: - """List services + """ List services List services @@ -219,6 +349,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -227,29 +373,46 @@ def sync( Returns: ServiceList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filteralert_broadcast_enabled=filteralert_broadcast_enabled, - filterincident_broadcast_enabled=filterincident_broadcast_enabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filteralert_broadcast_enabled=filteralert_broadcast_enabled, +filterincident_broadcast_enabled=filterincident_broadcast_enabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, +filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, +filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, +filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, +filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, +filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, +filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, +filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -270,9 +433,26 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[ServiceList]: - """List services + """ List services List services @@ -293,6 +473,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -301,33 +497,52 @@ async def asyncio_detailed( Returns: Response[ServiceList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filteralert_broadcast_enabled=filteralert_broadcast_enabled, - filterincident_broadcast_enabled=filterincident_broadcast_enabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filteralert_broadcast_enabled=filteralert_broadcast_enabled, +filterincident_broadcast_enabled=filterincident_broadcast_enabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, +filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, +filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, +filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, +filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, +filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, +filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, +filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -347,9 +562,26 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> ServiceList | None: - """List services + """ List services List services @@ -370,6 +602,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -378,27 +626,43 @@ async def asyncio( Returns: ServiceList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filteralert_broadcast_enabled=filteralert_broadcast_enabled, - filterincident_broadcast_enabled=filterincident_broadcast_enabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filteralert_broadcast_enabled=filteralert_broadcast_enabled, +filterincident_broadcast_enabled=filterincident_broadcast_enabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, +filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, +filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, +filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, +filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, +filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, +filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, +filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/services/update_service.py b/rootly_sdk/api/services/update_service.py index 5ba68ee9..0a52c208 100644 --- a/rootly_sdk/api/services/update_service.py +++ b/rootly_sdk/api/services/update_service.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.service_response import ServiceResponse from ...models.update_service import UpdateService -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateService, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/services/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/services/{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 | ServiceResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ServiceResponse | None: if response.status_code == 200: response_200 = ServiceResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ServiceResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateService, + ) -> Response[ErrorsList | ServiceResponse]: - """Update a service + """ Update a service Update a specific service by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, + ) -> ErrorsList | ServiceResponse | None: - """Update a service + """ Update a service Update a specific service by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | ServiceResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, + ) -> Response[ErrorsList | ServiceResponse]: - """Update a service + """ Update a service Update a specific service by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, + ) -> ErrorsList | ServiceResponse | None: - """Update a service + """ Update a service Update a specific service by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | ServiceResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/severities/__init__.py b/rootly_sdk/api/severities/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/severities/__init__.py +++ b/rootly_sdk/api/severities/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/severities/create_severity.py b/rootly_sdk/api/severities/create_severity.py index ac3b5494..bcf9f071 100644 --- a/rootly_sdk/api/severities/create_severity.py +++ b/rootly_sdk/api/severities/create_severity.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_severity import NewSeverity from ...models.severity_response import SeverityResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewSeverity, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/severities", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | SeverityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SeverityResponse | None: if response.status_code == 201: response_201 = SeverityResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SeverityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SeverityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSeverity, + ) -> Response[ErrorsList | SeverityResponse]: - """Creates a severity + """ Creates a severity Creates a new severity from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewSeverity, + ) -> ErrorsList | SeverityResponse | None: - """Creates a severity + """ Creates a severity Creates a new severity from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | SeverityResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSeverity, + ) -> Response[ErrorsList | SeverityResponse]: - """Creates a severity + """ Creates a severity Creates a new severity from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewSeverity, + ) -> ErrorsList | SeverityResponse | None: - """Creates a severity + """ Creates a severity Creates a new severity from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | SeverityResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/severities/delete_severity.py b/rootly_sdk/api/severities/delete_severity.py index 466626a3..63d1fb00 100644 --- a/rootly_sdk/api/severities/delete_severity.py +++ b/rootly_sdk/api/severities/delete_severity.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.severity_response import SeverityResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/severities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/severities/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | SeverityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SeverityResponse | None: if response.status_code == 200: response_200 = SeverityResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SeverityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SeverityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SeverityResponse]: - """Delete a severity + """ Delete a severity Delete a specific severity by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | SeverityResponse | None: - """Delete a severity + """ Delete a severity Delete a specific severity by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | SeverityResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SeverityResponse]: - """Delete a severity + """ Delete a severity Delete a specific severity by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | SeverityResponse | None: - """Delete a severity + """ Delete a severity Delete a specific severity by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | SeverityResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/severities/get_severity.py b/rootly_sdk/api/severities/get_severity.py index f36d72b9..b8565f4a 100644 --- a/rootly_sdk/api/severities/get_severity.py +++ b/rootly_sdk/api/severities/get_severity.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.severity_response import SeverityResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/severities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/severities/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | SeverityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SeverityResponse | None: if response.status_code == 200: response_200 = SeverityResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SeverityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SeverityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SeverityResponse]: - """Retrieves a severity + """ Retrieves a severity Retrieves a specific severity by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | SeverityResponse | None: - """Retrieves a severity + """ Retrieves a severity Retrieves a specific severity by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | SeverityResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SeverityResponse]: - """Retrieves a severity + """ Retrieves a severity Retrieves a specific severity by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | SeverityResponse | None: - """Retrieves a severity + """ Retrieves a severity Retrieves a specific severity by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | SeverityResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/severities/list_severities.py b/rootly_sdk/api/severities/list_severities.py index 852c9a44..82e201f2 100644 --- a/rootly_sdk/api/severities/list_severities.py +++ b/rootly_sdk/api/severities/list_severities.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.severity_list import SeverityList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -23,8 +28,28 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -52,23 +77,61 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[severity][eq]"] = filterseverityeq + + params["filter[severity][not_eq]"] = filterseveritynot_eq + + params["filter[severity][in]"] = filterseverityin + + params["filter[severity][not_in]"] = filterseveritynot_in + + params["filter[color][eq]"] = filtercoloreq + + params["filter[color][not_eq]"] = filtercolornot_eq + + params["filter[color][in]"] = filtercolorin + + params["filter[color][not_in]"] = filtercolornot_in + 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/severities", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> SeverityList | None: if response.status_code == 200: response_200 = SeverityList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -101,9 +164,26 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[SeverityList]: - """List severities + """ List severities List severities @@ -120,6 +200,22 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -128,22 +224,40 @@ def sync_detailed( Returns: Response[SeverityList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterseverity=filterseverity, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterseverity=filterseverity, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterseverityeq=filterseverityeq, +filterseveritynot_eq=filterseveritynot_eq, +filterseverityin=filterseverityin, +filterseveritynot_in=filterseveritynot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -152,7 +266,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -168,9 +281,26 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> SeverityList | None: - """List severities + """ List severities List severities @@ -187,6 +317,22 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -195,25 +341,42 @@ def sync( Returns: SeverityList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterseverity=filterseverity, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterseverity=filterseverity, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterseverityeq=filterseverityeq, +filterseveritynot_eq=filterseveritynot_eq, +filterseverityin=filterseverityin, +filterseveritynot_in=filterseveritynot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -230,9 +393,26 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[SeverityList]: - """List severities + """ List severities List severities @@ -249,6 +429,22 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -257,29 +453,48 @@ async def asyncio_detailed( Returns: Response[SeverityList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterseverity=filterseverity, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterseverity=filterseverity, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterseverityeq=filterseverityeq, +filterseveritynot_eq=filterseveritynot_eq, +filterseverityin=filterseverityin, +filterseveritynot_in=filterseveritynot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -295,9 +510,26 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterseverityeq: str | Unset = UNSET, + filterseveritynot_eq: str | Unset = UNSET, + filterseverityin: str | Unset = UNSET, + filterseveritynot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> SeverityList | None: - """List severities + """ List severities List severities @@ -314,6 +546,22 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterseverityeq (str | Unset): + filterseveritynot_eq (str | Unset): + filterseverityin (str | Unset): + filterseveritynot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): sort (str | Unset): Raises: @@ -322,23 +570,39 @@ async def asyncio( Returns: SeverityList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterseverity=filterseverity, - filtercolor=filtercolor, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterseverity=filterseverity, +filtercolor=filtercolor, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterseverityeq=filterseverityeq, +filterseveritynot_eq=filterseveritynot_eq, +filterseverityin=filterseverityin, +filterseveritynot_in=filterseveritynot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/severities/update_severity.py b/rootly_sdk/api/severities/update_severity.py index d1794033..dd956d42 100644 --- a/rootly_sdk/api/severities/update_severity.py +++ b/rootly_sdk/api/severities/update_severity.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.severity_response import SeverityResponse from ...models.update_severity import UpdateSeverity -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateSeverity, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/severities/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/severities/{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 | SeverityResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SeverityResponse | None: if response.status_code == 200: response_200 = SeverityResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SeverityResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SeverityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSeverity, + ) -> Response[ErrorsList | SeverityResponse]: - """Update a severity + """ Update a severity Update a specific severity by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, + ) -> ErrorsList | SeverityResponse | None: - """Update a severity + """ Update a severity Update a specific severity by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | SeverityResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, + ) -> Response[ErrorsList | SeverityResponse]: - """Update a severity + """ Update a severity Update a specific severity by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, + ) -> ErrorsList | SeverityResponse | None: - """Update a severity + """ Update a severity Update a specific severity by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | SeverityResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/__init__.py b/rootly_sdk/api/shift_coverage_requests/__init__.py new file mode 100644 index 00000000..c9921b5f --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/__init__.py @@ -0,0 +1 @@ +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py new file mode 100644 index 00000000..a0be3f3c --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py @@ -0,0 +1,220 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.errors_list import ErrorsList +from ...models.new_shift_coverage_request import NewShiftCoverageRequest +from ...models.shift_coverage_request_list import ShiftCoverageRequestList +from typing import cast + + + +def _get_kwargs( + schedule_id: str, + *, + body: NewShiftCoverageRequest, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/schedules/{schedule_id}/shift_coverage_requests".format(schedule_id=quote(str(schedule_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 | ShiftCoverageRequestList | None: + if response.status_code == 201: + response_201 = ShiftCoverageRequestList.from_dict(response.json()) + + + + return response_201 + + 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 | ShiftCoverageRequestList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + schedule_id: str, + *, + client: AuthenticatedClient, + body: NewShiftCoverageRequest, + +) -> Response[ErrorsList | ShiftCoverageRequestList]: + """ creates shift coverage requests + + Creates coverage requests for the shifts overlapping the requested time range. A range can span + multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be + created; the response is always a list. A coverage request broadcasts to schedule members so someone + can volunteer to cover the shift. + + Args: + schedule_id (str): + body (NewShiftCoverageRequest): + + Raises: + errors.UnexpectedStatus: If the server returns 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 | ShiftCoverageRequestList] + """ + + + kwargs = _get_kwargs( + schedule_id=schedule_id, +body=body, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + schedule_id: str, + *, + client: AuthenticatedClient, + body: NewShiftCoverageRequest, + +) -> ErrorsList | ShiftCoverageRequestList | None: + """ creates shift coverage requests + + Creates coverage requests for the shifts overlapping the requested time range. A range can span + multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be + created; the response is always a list. A coverage request broadcasts to schedule members so someone + can volunteer to cover the shift. + + Args: + schedule_id (str): + body (NewShiftCoverageRequest): + + Raises: + errors.UnexpectedStatus: If the server 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 | ShiftCoverageRequestList + """ + + + return sync_detailed( + schedule_id=schedule_id, +client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + schedule_id: str, + *, + client: AuthenticatedClient, + body: NewShiftCoverageRequest, + +) -> Response[ErrorsList | ShiftCoverageRequestList]: + """ creates shift coverage requests + + Creates coverage requests for the shifts overlapping the requested time range. A range can span + multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be + created; the response is always a list. A coverage request broadcasts to schedule members so someone + can volunteer to cover the shift. + + Args: + schedule_id (str): + body (NewShiftCoverageRequest): + + Raises: + errors.UnexpectedStatus: If the server returns 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 | ShiftCoverageRequestList] + """ + + + kwargs = _get_kwargs( + schedule_id=schedule_id, +body=body, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + schedule_id: str, + *, + client: AuthenticatedClient, + body: NewShiftCoverageRequest, + +) -> ErrorsList | ShiftCoverageRequestList | None: + """ creates shift coverage requests + + Creates coverage requests for the shifts overlapping the requested time range. A range can span + multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be + created; the response is always a list. A coverage request broadcasts to schedule members so someone + can volunteer to cover the shift. + + Args: + schedule_id (str): + body (NewShiftCoverageRequest): + + Raises: + errors.UnexpectedStatus: If the server 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 | ShiftCoverageRequestList + """ + + + return (await asyncio_detailed( + schedule_id=schedule_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py new file mode 100644 index 00000000..d03189e1 --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.shift_coverage_request_response import ShiftCoverageRequestResponse +from typing import cast + + + +def _get_kwargs( + id: str, + +) -> dict[str, Any]: + + + + + + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/shift_coverage_requests/{id}".format(id=quote(str(id), safe=""),), + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ShiftCoverageRequestResponse | None: + if response.status_code == 200: + response_200 = ShiftCoverageRequestResponse.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[ShiftCoverageRequestResponse]: + 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[ShiftCoverageRequestResponse]: + """ deletes a shift coverage request + + Deletes a shift coverage request. + + 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[ShiftCoverageRequestResponse] + """ + + + 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, + +) -> ShiftCoverageRequestResponse | None: + """ deletes a shift coverage request + + Deletes a shift coverage request. + + 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: + ShiftCoverageRequestResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + +) -> Response[ShiftCoverageRequestResponse]: + """ deletes a shift coverage request + + Deletes a shift coverage request. + + 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[ShiftCoverageRequestResponse] + """ + + + 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, + +) -> ShiftCoverageRequestResponse | None: + """ deletes a shift coverage request + + Deletes a shift coverage request. + + 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: + ShiftCoverageRequestResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py new file mode 100644 index 00000000..b29594d8 --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.shift_coverage_request_response import ShiftCoverageRequestResponse +from typing import cast + + + +def _get_kwargs( + id: str, + +) -> dict[str, Any]: + + + + + + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/shift_coverage_requests/{id}".format(id=quote(str(id), safe=""),), + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ShiftCoverageRequestResponse | None: + if response.status_code == 200: + response_200 = ShiftCoverageRequestResponse.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[ShiftCoverageRequestResponse]: + 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[ShiftCoverageRequestResponse]: + """ retrieves a shift coverage request + + Retrieves a specific shift coverage request. + + 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[ShiftCoverageRequestResponse] + """ + + + 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, + +) -> ShiftCoverageRequestResponse | None: + """ retrieves a shift coverage request + + Retrieves a specific shift coverage request. + + 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: + ShiftCoverageRequestResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + +) -> Response[ShiftCoverageRequestResponse]: + """ retrieves a shift coverage request + + Retrieves a specific shift coverage request. + + 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[ShiftCoverageRequestResponse] + """ + + + 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, + +) -> ShiftCoverageRequestResponse | None: + """ retrieves a shift coverage request + + Retrieves a specific shift coverage request. + + 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: + ShiftCoverageRequestResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py b/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py new file mode 100644 index 00000000..ed6faecc --- /dev/null +++ b/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py @@ -0,0 +1,179 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.shift_coverage_request_list import ShiftCoverageRequestList +from typing import cast + + + +def _get_kwargs( + schedule_id: str, + +) -> dict[str, Any]: + + + + + + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/schedules/{schedule_id}/shift_coverage_requests".format(schedule_id=quote(str(schedule_id), safe=""),), + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ShiftCoverageRequestList | None: + if response.status_code == 200: + response_200 = ShiftCoverageRequestList.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[ShiftCoverageRequestList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + schedule_id: str, + *, + client: AuthenticatedClient, + +) -> Response[ShiftCoverageRequestList]: + """ list shift coverage requests + + List active shift coverage requests for a schedule. + + Args: + schedule_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[ShiftCoverageRequestList] + """ + + + kwargs = _get_kwargs( + schedule_id=schedule_id, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + schedule_id: str, + *, + client: AuthenticatedClient, + +) -> ShiftCoverageRequestList | None: + """ list shift coverage requests + + List active shift coverage requests for a schedule. + + Args: + schedule_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: + ShiftCoverageRequestList + """ + + + return sync_detailed( + schedule_id=schedule_id, +client=client, + + ).parsed + +async def asyncio_detailed( + schedule_id: str, + *, + client: AuthenticatedClient, + +) -> Response[ShiftCoverageRequestList]: + """ list shift coverage requests + + List active shift coverage requests for a schedule. + + Args: + schedule_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[ShiftCoverageRequestList] + """ + + + kwargs = _get_kwargs( + schedule_id=schedule_id, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + schedule_id: str, + *, + client: AuthenticatedClient, + +) -> ShiftCoverageRequestList | None: + """ list shift coverage requests + + List active shift coverage requests for a schedule. + + Args: + schedule_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: + ShiftCoverageRequestList + """ + + + return (await asyncio_detailed( + schedule_id=schedule_id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/shifts/__init__.py b/rootly_sdk/api/shifts/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/shifts/__init__.py +++ b/rootly_sdk/api/shifts/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/shifts/get_schedule_shifts.py b/rootly_sdk/api/shifts/get_schedule_shifts.py index e263871a..49a900b1 100644 --- a/rootly_sdk/api/shifts/get_schedule_shifts.py +++ b/rootly_sdk/api/shifts/get_schedule_shifts.py @@ -1,14 +1,18 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.shift_list import ShiftList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( *, to: str | Unset = UNSET, from_: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -24,28 +32,34 @@ def _get_kwargs( params["from"] = from_ + 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/schedules/{id}/shifts".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/schedules/{id}/shifts".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ShiftList | None: if response.status_code == 200: response_200 = ShiftList.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: @@ -54,9 +68,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ShiftList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ShiftList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +83,9 @@ def sync_detailed( client: AuthenticatedClient, to: str | Unset = UNSET, from_: str | Unset = UNSET, + ) -> Response[ErrorsList | ShiftList]: - """Retrieves a schedule shifts + """ Retrieves a schedule shifts Retrieves schedule shifts @@ -87,12 +100,14 @@ def sync_detailed( Returns: Response[ErrorsList | ShiftList] - """ + """ + kwargs = _get_kwargs( id=id, - to=to, - from_=from_, +to=to, +from_=from_, + ) response = client.get_httpx_client().request( @@ -101,15 +116,15 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, to: str | Unset = UNSET, from_: str | Unset = UNSET, + ) -> ErrorsList | ShiftList | None: - """Retrieves a schedule shifts + """ Retrieves a schedule shifts Retrieves schedule shifts @@ -124,15 +139,16 @@ def sync( Returns: ErrorsList | ShiftList - """ + """ + return sync_detailed( id=id, - client=client, - to=to, - from_=from_, - ).parsed +client=client, +to=to, +from_=from_, + ).parsed async def asyncio_detailed( id: str, @@ -140,8 +156,9 @@ async def asyncio_detailed( client: AuthenticatedClient, to: str | Unset = UNSET, from_: str | Unset = UNSET, + ) -> Response[ErrorsList | ShiftList]: - """Retrieves a schedule shifts + """ Retrieves a schedule shifts Retrieves schedule shifts @@ -156,27 +173,31 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ShiftList] - """ + """ + kwargs = _get_kwargs( id=id, - to=to, - from_=from_, +to=to, +from_=from_, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, to: str | Unset = UNSET, from_: str | Unset = UNSET, + ) -> ErrorsList | ShiftList | None: - """Retrieves a schedule shifts + """ Retrieves a schedule shifts Retrieves schedule shifts @@ -191,13 +212,13 @@ async def asyncio( Returns: ErrorsList | ShiftList - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - to=to, - from_=from_, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +to=to, +from_=from_, + + )).parsed diff --git a/rootly_sdk/api/shifts/list_shifts.py b/rootly_sdk/api/shifts/list_shifts.py index 33fbd52d..32d0cc84 100644 --- a/rootly_sdk/api/shifts/list_shifts.py +++ b/rootly_sdk/api/shifts/list_shifts.py @@ -1,14 +1,20 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList +from ...models.list_shifts_include import check_list_shifts_include from ...models.list_shifts_include import ListShiftsInclude from ...models.shift_list import ShiftList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -20,7 +26,11 @@ def _get_kwargs( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -38,38 +48,48 @@ def _get_kwargs( if not isinstance(user_ids, Unset): json_user_ids = user_ids + params["user_ids[]"] = json_user_ids 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] = { "method": "get", "url": "/v1/shifts", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ShiftList | None: if response.status_code == 200: response_200 = ShiftList.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: @@ -78,9 +98,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | ShiftList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ShiftList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -99,8 +117,9 @@ def sync_detailed( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[ErrorsList | ShiftList]: - """List shifts + """ List shifts List shifts @@ -119,16 +138,18 @@ def sync_detailed( Returns: Response[ErrorsList | ShiftList] - """ + """ + kwargs = _get_kwargs( include=include, - from_=from_, - to=to, - user_ids=user_ids, - schedule_ids=schedule_ids, - pagenumber=pagenumber, - pagesize=pagesize, +from_=from_, +to=to, +user_ids=user_ids, +schedule_ids=schedule_ids, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -137,7 +158,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -148,8 +168,9 @@ def sync( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> ErrorsList | ShiftList | None: - """List shifts + """ List shifts List shifts @@ -168,19 +189,20 @@ def sync( Returns: ErrorsList | ShiftList - """ + """ + return sync_detailed( client=client, - include=include, - from_=from_, - to=to, - user_ids=user_ids, - schedule_ids=schedule_ids, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +include=include, +from_=from_, +to=to, +user_ids=user_ids, +schedule_ids=schedule_ids, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( *, @@ -192,8 +214,9 @@ async def asyncio_detailed( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[ErrorsList | ShiftList]: - """List shifts + """ List shifts List shifts @@ -212,23 +235,26 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ShiftList] - """ + """ + kwargs = _get_kwargs( include=include, - from_=from_, - to=to, - user_ids=user_ids, - schedule_ids=schedule_ids, - pagenumber=pagenumber, - pagesize=pagesize, +from_=from_, +to=to, +user_ids=user_ids, +schedule_ids=schedule_ids, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -239,8 +265,9 @@ async def asyncio( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> ErrorsList | ShiftList | None: - """List shifts + """ List shifts List shifts @@ -259,17 +286,17 @@ async def asyncio( Returns: ErrorsList | ShiftList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - from_=from_, - to=to, - user_ids=user_ids, - schedule_ids=schedule_ids, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +from_=from_, +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 index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/sl_as/__init__.py +++ b/rootly_sdk/api/sl_as/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/sl_as/create_sla.py b/rootly_sdk/api/sl_as/create_sla.py index 578b60d8..20381da2 100644 --- a/rootly_sdk/api/sl_as/create_sla.py +++ b/rootly_sdk/api/sl_as/create_sla.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_sla import NewSla from ...models.sla_response import SlaResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewSla, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/slas", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | SlaResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SlaResponse | None: if response.status_code == 201: response_201 = SlaResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SlaResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSla, + ) -> Response[ErrorsList | SlaResponse]: - """Creates an SLA + """ Creates an SLA Creates a new SLA from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | SlaResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewSla, + ) -> ErrorsList | SlaResponse | None: - """Creates an SLA + """ Creates an SLA Creates a new SLA from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | SlaResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSla, + ) -> Response[ErrorsList | SlaResponse]: - """Creates an SLA + """ Creates an SLA Creates a new SLA from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SlaResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewSla, + ) -> ErrorsList | SlaResponse | None: - """Creates an SLA + """ Creates an SLA Creates a new SLA from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | SlaResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/sl_as/delete_sla.py b/rootly_sdk/api/sl_as/delete_sla.py index 19b1e4eb..f79d1ba7 100644 --- a/rootly_sdk/api/sl_as/delete_sla.py +++ b/rootly_sdk/api/sl_as/delete_sla.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.sla_response import SlaResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/slas/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/slas/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | SlaResponse | None: + +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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SlaResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SlaResponse]: - """Delete an SLA + """ Delete an SLA Delete a specific SLA by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | SlaResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | SlaResponse | None: - """Delete an SLA + """ Delete an SLA Delete a specific SLA by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | SlaResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SlaResponse]: - """Delete an SLA + """ Delete an SLA Delete a specific SLA by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SlaResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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: - """Delete an SLA + """ Delete an SLA Delete a specific SLA by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | SlaResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/sl_as/get_sla.py b/rootly_sdk/api/sl_as/get_sla.py index b2dcad6d..b54687ed 100644 --- a/rootly_sdk/api/sl_as/get_sla.py +++ b/rootly_sdk/api/sl_as/get_sla.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.sla_response import SlaResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/slas/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/slas/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | SlaResponse | None: + +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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SlaResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SlaResponse]: - """Retrieves an SLA + """ Retrieves an SLA Retrieves a specific SLA by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | SlaResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | SlaResponse | None: - """Retrieves an SLA + """ Retrieves an SLA Retrieves a specific SLA by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | SlaResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SlaResponse]: - """Retrieves an SLA + """ Retrieves an SLA Retrieves a specific SLA by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SlaResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 an SLA Retrieves a specific SLA by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | SlaResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + 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 index 38524d80..4767ea0a 100644 --- a/rootly_sdk/api/sl_as/list_sl_as.py +++ b/rootly_sdk/api/sl_as/list_sl_as.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.sla_list import SlaList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -20,8 +25,20 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -43,23 +60,45 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + 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: @@ -89,9 +128,18 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[SlaList]: - """List SLAs + """ List SLAs List SLAs @@ -105,6 +153,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -113,19 +169,29 @@ def sync_detailed( 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, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -134,7 +200,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -147,9 +212,18 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> SlaList | None: - """List SLAs + """ List SLAs List SLAs @@ -163,6 +237,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -171,22 +253,31 @@ def sync( 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 +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, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -200,9 +291,18 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[SlaList]: - """List SLAs + """ List SLAs List SLAs @@ -216,6 +316,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -224,26 +332,37 @@ async def asyncio_detailed( 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, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -256,9 +375,18 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> SlaList | None: - """List SLAs + """ List SLAs List SLAs @@ -272,6 +400,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): sort (str | Unset): Raises: @@ -280,20 +416,28 @@ async def asyncio( 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 + """ + + + 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, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/sl_as/update_sla.py b/rootly_sdk/api/sl_as/update_sla.py index f168bfc9..a5d3f83c 100644 --- a/rootly_sdk/api/sl_as/update_sla.py +++ b/rootly_sdk/api/sl_as/update_sla.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.sla_response import SlaResponse from ...models.update_sla import UpdateSla -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateSla, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/slas/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/slas/{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 | SlaResponse | None: + +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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SlaResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSla, + ) -> Response[ErrorsList | SlaResponse]: - """Update an SLA + """ Update an SLA Update a specific SLA by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | SlaResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateSla, + ) -> ErrorsList | SlaResponse | None: - """Update an SLA + """ Update an SLA Update a specific SLA by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | SlaResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateSla, + ) -> Response[ErrorsList | SlaResponse]: - """Update an SLA + """ Update an SLA Update a specific SLA by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SlaResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateSla, + ) -> ErrorsList | SlaResponse | None: - """Update an SLA + """ Update an SLA Update a specific SLA by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | SlaResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/status_page_templates/__init__.py b/rootly_sdk/api/status_page_templates/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/status_page_templates/__init__.py +++ b/rootly_sdk/api/status_page_templates/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 38428024..fe08e958 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.status_page_template import StatusPageTemplate from ...models.status_page_template_response import StatusPageTemplateResponse -from ...types import Response +from typing import cast + def _get_kwargs( status_page_id: str, *, body: StatusPageTemplate, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/status-pages/{status_page_id}/templates".format( - status_page_id=quote(str(status_page_id), safe=""), - ), + "url": "/v1/status-pages/{status_page_id}/templates".format(status_page_id=quote(str(status_page_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 | StatusPageTemplateResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageTemplateResponse | None: if response.status_code == 201: response_201 = StatusPageTemplateResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusPageTemplateResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: StatusPageTemplate, + ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """Creates a status page template + """ Creates a status page template Creates a new template from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ + """ + kwargs = _get_kwargs( status_page_id=status_page_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( status_page_id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, + ) -> ErrorsList | StatusPageTemplateResponse | None: - """Creates a status page template + """ Creates a status page template Creates a new template from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | StatusPageTemplateResponse - """ + """ + return sync_detailed( status_page_id=status_page_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( status_page_id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, + ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """Creates a status page template + """ Creates a status page template Creates a new template from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ + """ + kwargs = _get_kwargs( status_page_id=status_page_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( status_page_id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, + ) -> ErrorsList | StatusPageTemplateResponse | None: - """Creates a status page template + """ Creates a status page template Creates a new template from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | StatusPageTemplateResponse - """ - - return ( - await asyncio_detailed( - status_page_id=status_page_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + status_page_id=status_page_id, +client=client, +body=body, + + )).parsed 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 0fccfa58..f3ab8bb5 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.status_page_template_response import StatusPageTemplateResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/templates/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | StatusPageTemplateResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageTemplateResponse | None: if response.status_code == 200: response_200 = StatusPageTemplateResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusPageTemplateResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """Delete a incident event + """ Delete a incident event Delete a specific template event by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusPageTemplateResponse | None: - """Delete a incident event + """ Delete a incident event Delete a specific template event by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | StatusPageTemplateResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """Delete a incident event + """ Delete a incident event Delete a specific template event by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusPageTemplateResponse | None: - """Delete a incident event + """ Delete a incident event Delete a specific template event by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | StatusPageTemplateResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 cd9c534c..f0b34551 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.status_page_template_response import StatusPageTemplateResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/templates/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | StatusPageTemplateResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageTemplateResponse | None: if response.status_code == 200: response_200 = StatusPageTemplateResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusPageTemplateResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """Retrieves a status page template + """ Retrieves a status page template Retrieves a specific status_page_template by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusPageTemplateResponse | None: - """Retrieves a status page template + """ Retrieves a status page template Retrieves a specific status_page_template by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | StatusPageTemplateResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """Retrieves a status page template + """ Retrieves a status page template Retrieves a specific status_page_template by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusPageTemplateResponse | None: - """Retrieves a status page template + """ Retrieves a status page template Retrieves a specific status_page_template by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | StatusPageTemplateResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 806aef61..1a65f26c 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.status_page_template_list import StatusPageTemplateList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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/status-pages/{status_page_id}/templates".format( - status_page_id=quote(str(status_page_id), safe=""), - ), + "url": "/v1/status-pages/{status_page_id}/templates".format(status_page_id=quote(str(status_page_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> StatusPageTemplateList | None: if response.status_code == 200: response_200 = StatusPageTemplateList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -51,9 +63,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[StatusPageTemplateList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[StatusPageTemplateList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[StatusPageTemplateList]: - """List status page templates + """ List status page templates List status page templates @@ -86,13 +97,15 @@ def sync_detailed( Returns: Response[StatusPageTemplateList] - """ + """ + kwargs = _get_kwargs( status_page_id=status_page_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -101,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( status_page_id: str, *, @@ -109,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> StatusPageTemplateList | None: - """List status page templates + """ List status page templates List status page templates @@ -126,16 +139,17 @@ def sync( Returns: StatusPageTemplateList - """ + """ + return sync_detailed( status_page_id=status_page_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( status_page_id: str, @@ -144,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[StatusPageTemplateList]: - """List status page templates + """ List status page templates List status page templates @@ -161,20 +176,23 @@ async def asyncio_detailed( Returns: Response[StatusPageTemplateList] - """ + """ + kwargs = _get_kwargs( status_page_id=status_page_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( status_page_id: str, *, @@ -182,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> StatusPageTemplateList | None: - """List status page templates + """ List status page templates List status page templates @@ -199,14 +218,14 @@ async def asyncio( Returns: StatusPageTemplateList - """ - - return ( - await asyncio_detailed( - status_page_id=status_page_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + status_page_id=status_page_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 e8f68a20..0a845111 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.status_page_template import StatusPageTemplate from ...models.status_page_template_response import StatusPageTemplateResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: StatusPageTemplate, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/templates/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/templates/{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 | StatusPageTemplateResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageTemplateResponse | None: if response.status_code == 200: response_200 = StatusPageTemplateResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusPageTemplateResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: StatusPageTemplate, + ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """Update status page template + """ Update status page template Update a specific template event by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, + ) -> ErrorsList | StatusPageTemplateResponse | None: - """Update status page template + """ Update status page template Update a specific template event by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | StatusPageTemplateResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, + ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """Update status page template + """ Update status page template Update a specific template event by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, + ) -> ErrorsList | StatusPageTemplateResponse | None: - """Update status page template + """ Update status page template Update a specific template event by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | StatusPageTemplateResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/status_pages/__init__.py b/rootly_sdk/api/status_pages/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/status_pages/__init__.py +++ b/rootly_sdk/api/status_pages/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/status_pages/create_status_page.py b/rootly_sdk/api/status_pages/create_status_page.py index 499bcdb8..801934f5 100644 --- a/rootly_sdk/api/status_pages/create_status_page.py +++ b/rootly_sdk/api/status_pages/create_status_page.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_status_page import NewStatusPage from ...models.status_page_response import StatusPageResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewStatusPage, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/status-pages", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | StatusPageResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageResponse | None: if response.status_code == 201: response_201 = StatusPageResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusPageResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewStatusPage, + ) -> Response[ErrorsList | StatusPageResponse]: - """Creates a status page + """ Creates a status page Creates a new status page from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewStatusPage, + ) -> ErrorsList | StatusPageResponse | None: - """Creates a status page + """ Creates a status page Creates a new status page from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | StatusPageResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewStatusPage, + ) -> Response[ErrorsList | StatusPageResponse]: - """Creates a status page + """ Creates a status page Creates a new status page from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewStatusPage, + ) -> ErrorsList | StatusPageResponse | None: - """Creates a status page + """ Creates a status page Creates a new status page from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | StatusPageResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/status_pages/delete_status_page.py b/rootly_sdk/api/status_pages/delete_status_page.py index fcb4150f..3d379436 100644 --- a/rootly_sdk/api/status_pages/delete_status_page.py +++ b/rootly_sdk/api/status_pages/delete_status_page.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.status_page_response import StatusPageResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/status-pages/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/status-pages/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | StatusPageResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageResponse | None: if response.status_code == 200: response_200 = StatusPageResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusPageResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusPageResponse]: - """Delete a status page + """ Delete a status page Delete a specific status page by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusPageResponse | None: - """Delete a status page + """ Delete a status page Delete a specific status page by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | StatusPageResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusPageResponse]: - """Delete a status page + """ Delete a status page Delete a specific status page by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusPageResponse | None: - """Delete a status page + """ Delete a status page Delete a specific status page by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | StatusPageResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/status_pages/get_status_page.py b/rootly_sdk/api/status_pages/get_status_page.py index d48c36a9..fb34e2c6 100644 --- a/rootly_sdk/api/status_pages/get_status_page.py +++ b/rootly_sdk/api/status_pages/get_status_page.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.status_page_response import StatusPageResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/status-pages/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/status-pages/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | StatusPageResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageResponse | None: if response.status_code == 200: response_200 = StatusPageResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusPageResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusPageResponse]: - """Retrieves a status page + """ Retrieves a status page Retrieves a specific status page by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusPageResponse | None: - """Retrieves a status page + """ Retrieves a status page Retrieves a specific status page by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | StatusPageResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusPageResponse]: - """Retrieves a status page + """ Retrieves a status page Retrieves a specific status page by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusPageResponse | None: - """Retrieves a status page + """ Retrieves a status page Retrieves a specific status page by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | StatusPageResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/status_pages/list_status_pages.py b/rootly_sdk/api/status_pages/list_status_pages.py index 09701011..8db56bb6 100644 --- a/rootly_sdk/api/status_pages/list_status_pages.py +++ b/rootly_sdk/api/status_pages/list_status_pages.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.status_page_list import StatusPageList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,8 +26,20 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -46,23 +63,45 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + 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/status-pages", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> StatusPageList | None: if response.status_code == 200: response_200 = StatusPageList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -93,9 +132,18 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[StatusPageList]: - """List status pages + """ List status pages List status pages @@ -110,6 +158,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -118,20 +174,30 @@ def sync_detailed( Returns: Response[StatusPageList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -140,7 +206,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -154,9 +219,18 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> StatusPageList | None: - """List status pages + """ List status pages List status pages @@ -171,6 +245,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -179,23 +261,32 @@ def sync( Returns: StatusPageList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -210,9 +301,18 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[StatusPageList]: - """List status pages + """ List status pages List status pages @@ -227,6 +327,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -235,27 +343,38 @@ async def asyncio_detailed( Returns: Response[StatusPageList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -269,9 +388,18 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> StatusPageList | None: - """List status pages + """ List status pages List status pages @@ -286,6 +414,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): sort (str | Unset): Raises: @@ -294,21 +430,29 @@ async def asyncio( Returns: StatusPageList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/status_pages/update_status_page.py b/rootly_sdk/api/status_pages/update_status_page.py index a6136c7a..fb640426 100644 --- a/rootly_sdk/api/status_pages/update_status_page.py +++ b/rootly_sdk/api/status_pages/update_status_page.py @@ -1,56 +1,69 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.status_page_response import StatusPageResponse from ...models.update_status_page import UpdateStatusPage -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateStatusPage, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/status-pages/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/status-pages/{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 | StatusPageResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageResponse | None: if response.status_code == 200: response_200 = StatusPageResponse.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: @@ -59,9 +72,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusPageResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +86,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateStatusPage, + ) -> Response[ErrorsList | StatusPageResponse]: - """Update a status page + """ Update a status page Update a specific status page by id @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, + ) -> ErrorsList | StatusPageResponse | None: - """Update a status page + """ Update a status page Update a specific status page by id @@ -124,22 +138,24 @@ def sync( Returns: ErrorsList | StatusPageResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, + ) -> Response[ErrorsList | StatusPageResponse]: - """Update a status page + """ Update a status page Update a specific status page by id @@ -153,25 +169,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, + ) -> ErrorsList | StatusPageResponse | None: - """Update a status page + """ Update a status page Update a specific status page by id @@ -185,12 +205,12 @@ async def asyncio( Returns: ErrorsList | StatusPageResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/statuses/__init__.py b/rootly_sdk/api/statuses/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/statuses/__init__.py +++ b/rootly_sdk/api/statuses/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/statuses/get_status.py b/rootly_sdk/api/statuses/get_status.py index 185a8694..aa8d7443 100644 --- a/rootly_sdk/api/statuses/get_status.py +++ b/rootly_sdk/api/statuses/get_status.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.status_response import StatusResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/statuses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/statuses/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | StatusResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusResponse | None: if response.status_code == 200: response_200 = StatusResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusResponse]: - """Retrieves a Status + """ Retrieves a Status Retrieves a specific Status by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | StatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusResponse | None: - """Retrieves a Status + """ Retrieves a Status Retrieves a specific Status by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | StatusResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | StatusResponse]: - """Retrieves a Status + """ Retrieves a Status Retrieves a specific Status by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | StatusResponse | None: - """Retrieves a Status + """ Retrieves a Status Retrieves a specific Status by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | StatusResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/statuses/list_statuses.py b/rootly_sdk/api/statuses/list_statuses.py index d7ddd61a..976996ba 100644 --- a/rootly_sdk/api/statuses/list_statuses.py +++ b/rootly_sdk/api/statuses/list_statuses.py @@ -1,13 +1,18 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.status_list import StatusList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -22,7 +27,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -46,28 +55,34 @@ def _get_kwargs( 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/statuses", "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | StatusList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusList | None: if response.status_code == 200: response_200 = StatusList.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: @@ -76,9 +91,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | StatusList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -100,8 +113,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[ErrorsList | StatusList]: - """List Statuses + """ List Statuses List Statuses @@ -123,19 +137,21 @@ def sync_detailed( Returns: Response[ErrorsList | StatusList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ) response = client.get_httpx_client().request( @@ -144,7 +160,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -158,8 +173,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> ErrorsList | StatusList | None: - """List Statuses + """ List Statuses List Statuses @@ -181,22 +197,23 @@ def sync( Returns: ErrorsList | StatusList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ).parsed async def asyncio_detailed( *, @@ -211,8 +228,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[ErrorsList | StatusList]: - """List Statuses + """ List Statuses List Statuses @@ -234,26 +252,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filterenabled=filterenabled, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -267,8 +288,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> ErrorsList | StatusList | None: - """List Statuses + """ List Statuses List Statuses @@ -290,20 +312,20 @@ async def asyncio( Returns: ErrorsList | StatusList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterenabled=filterenabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filterenabled=filterenabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + + )).parsed diff --git a/rootly_sdk/api/sub_statuses/__init__.py b/rootly_sdk/api/sub_statuses/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/sub_statuses/__init__.py +++ b/rootly_sdk/api/sub_statuses/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/sub_statuses/create_sub_status.py b/rootly_sdk/api/sub_statuses/create_sub_status.py index 47b85e50..39ab1554 100644 --- a/rootly_sdk/api/sub_statuses/create_sub_status.py +++ b/rootly_sdk/api/sub_statuses/create_sub_status.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_sub_status import NewSubStatus from ...models.sub_status_response import SubStatusResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewSubStatus, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/sub_statuses", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | SubStatusResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SubStatusResponse | None: if response.status_code == 201: response_201 = SubStatusResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SubStatusResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSubStatus, + ) -> Response[ErrorsList | SubStatusResponse]: - """Creates a Sub-Status + """ Creates a Sub-Status Creates a new Sub-Status from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewSubStatus, + ) -> ErrorsList | SubStatusResponse | None: - """Creates a Sub-Status + """ Creates a Sub-Status Creates a new Sub-Status from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | SubStatusResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSubStatus, + ) -> Response[ErrorsList | SubStatusResponse]: - """Creates a Sub-Status + """ Creates a Sub-Status Creates a new Sub-Status from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewSubStatus, + ) -> ErrorsList | SubStatusResponse | None: - """Creates a Sub-Status + """ Creates a Sub-Status Creates a new Sub-Status from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | SubStatusResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/sub_statuses/delete_sub_status.py b/rootly_sdk/api/sub_statuses/delete_sub_status.py index 4e323dfb..ba59d0a5 100644 --- a/rootly_sdk/api/sub_statuses/delete_sub_status.py +++ b/rootly_sdk/api/sub_statuses/delete_sub_status.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.sub_status_response import SubStatusResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/sub_statuses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/sub_statuses/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | SubStatusResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SubStatusResponse | None: if response.status_code == 200: response_200 = SubStatusResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SubStatusResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SubStatusResponse]: - """Delete a Sub-Status + """ Delete a Sub-Status Delete a specific Sub-Status by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | SubStatusResponse | None: - """Delete a Sub-Status + """ Delete a Sub-Status Delete a specific Sub-Status by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | SubStatusResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SubStatusResponse]: - """Delete a Sub-Status + """ Delete a Sub-Status Delete a specific Sub-Status by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | SubStatusResponse | None: - """Delete a Sub-Status + """ Delete a Sub-Status Delete a specific Sub-Status by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | SubStatusResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/sub_statuses/get_sub_status.py b/rootly_sdk/api/sub_statuses/get_sub_status.py index 74ea1a88..c9feb633 100644 --- a/rootly_sdk/api/sub_statuses/get_sub_status.py +++ b/rootly_sdk/api/sub_statuses/get_sub_status.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.sub_status_response import SubStatusResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/sub_statuses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/sub_statuses/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | SubStatusResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SubStatusResponse | None: if response.status_code == 200: response_200 = SubStatusResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SubStatusResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SubStatusResponse]: - """Retrieves a Sub-Status + """ Retrieves a Sub-Status Retrieves a specific Sub-Status by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | SubStatusResponse | None: - """Retrieves a Sub-Status + """ Retrieves a Sub-Status Retrieves a specific Sub-Status by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | SubStatusResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | SubStatusResponse]: - """Retrieves a Sub-Status + """ Retrieves a Sub-Status Retrieves a specific Sub-Status by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | SubStatusResponse | None: - """Retrieves a Sub-Status + """ Retrieves a Sub-Status Retrieves a specific Sub-Status by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | SubStatusResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/sub_statuses/list_sub_statuses.py b/rootly_sdk/api/sub_statuses/list_sub_statuses.py index ecbe33ee..2211bddc 100644 --- a/rootly_sdk/api/sub_statuses/list_sub_statuses.py +++ b/rootly_sdk/api/sub_statuses/list_sub_statuses.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.sub_status_list import SubStatusList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,7 +26,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -45,21 +54,27 @@ def _get_kwargs( 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/sub_statuses", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> SubStatusList | None: if response.status_code == 200: response_200 = SubStatusList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -90,8 +105,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[SubStatusList]: - """List Sub-Statuses + """ List Sub-Statuses List Sub-Statuses @@ -113,19 +129,21 @@ def sync_detailed( Returns: Response[SubStatusList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterparent_status=filterparent_status, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filterparent_status=filterparent_status, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ) response = client.get_httpx_client().request( @@ -134,7 +152,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -148,8 +165,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> SubStatusList | None: - """List Sub-Statuses + """ List Sub-Statuses List Sub-Statuses @@ -171,22 +189,23 @@ def sync( Returns: SubStatusList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterparent_status=filterparent_status, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filterparent_status=filterparent_status, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ).parsed async def asyncio_detailed( *, @@ -201,8 +220,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[SubStatusList]: - """List Sub-Statuses + """ List Sub-Statuses List Sub-Statuses @@ -224,26 +244,29 @@ async def asyncio_detailed( Returns: Response[SubStatusList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterparent_status=filterparent_status, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filterparent_status=filterparent_status, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -257,8 +280,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> SubStatusList | None: - """List Sub-Statuses + """ List Sub-Statuses List Sub-Statuses @@ -280,20 +304,20 @@ async def asyncio( Returns: SubStatusList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - filterparent_status=filterparent_status, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, +filterparent_status=filterparent_status, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + + )).parsed diff --git a/rootly_sdk/api/sub_statuses/update_sub_status.py b/rootly_sdk/api/sub_statuses/update_sub_status.py index 290e2864..ee30d4d4 100644 --- a/rootly_sdk/api/sub_statuses/update_sub_status.py +++ b/rootly_sdk/api/sub_statuses/update_sub_status.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.sub_status_response import SubStatusResponse from ...models.update_sub_status import UpdateSubStatus -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateSubStatus, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/sub_statuses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/sub_statuses/{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 | SubStatusResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SubStatusResponse | None: if response.status_code == 200: response_200 = SubStatusResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | SubStatusResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSubStatus, + ) -> Response[ErrorsList | SubStatusResponse]: - """Update a Sub-Status + """ Update a Sub-Status Update a specific Sub-Status by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, + ) -> ErrorsList | SubStatusResponse | None: - """Update a Sub-Status + """ Update a Sub-Status Update a specific Sub-Status by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | SubStatusResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, + ) -> Response[ErrorsList | SubStatusResponse]: - """Update a Sub-Status + """ Update a Sub-Status Update a specific Sub-Status by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, + ) -> ErrorsList | SubStatusResponse | None: - """Update a Sub-Status + """ Update a Sub-Status Update a specific Sub-Status by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | SubStatusResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/teams/__init__.py b/rootly_sdk/api/teams/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/teams/__init__.py +++ b/rootly_sdk/api/teams/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/teams/bulk_delete_groups.py b/rootly_sdk/api/teams/bulk_delete_groups.py new file mode 100644 index 00000000..fdffef17 --- /dev/null +++ b/rootly_sdk/api/teams/bulk_delete_groups.py @@ -0,0 +1,233 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_destroy_teams_response import BulkDestroyTeamsResponse +from ...models.bulk_destroy_teams_type_0 import BulkDestroyTeamsType0 +from ...models.bulk_destroy_teams_type_1 import BulkDestroyTeamsType1 +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + *, + body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/teams/bulk_delete", + } + + + if isinstance(body, BulkDestroyTeamsType0): + _kwargs["json"] = body.to_dict() + else: + _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) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkDestroyTeamsResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyTeamsResponse | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkDestroyTeamsResponse.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | 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: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, + +) -> Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList]: + """ Bulk delete Teams + + Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyTeamsType0 | BulkDestroyTeamsType1): Two mutually exclusive modes. Pass + exactly one of: external_ids (delete specific records) or managed_by (prune all managed + records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | 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: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, + +) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Teams + + Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyTeamsType0 | BulkDestroyTeamsType1): Two mutually exclusive modes. Pass + exactly one of: external_ids (delete specific records) or managed_by (prune all managed + records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, + +) -> Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList]: + """ Bulk delete Teams + + Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyTeamsType0 | BulkDestroyTeamsType1): Two mutually exclusive modes. Pass + exactly one of: external_ids (delete specific records) or managed_by (prune all managed + records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | 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: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, + +) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: + """ Bulk delete Teams + + Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. + + Args: + body (BulkDestroyTeamsType0 | BulkDestroyTeamsType1): Two mutually exclusive modes. Pass + exactly one of: external_ids (delete specific records) or managed_by (prune all managed + records not in keep set). + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/teams/bulk_upsert_groups.py b/rootly_sdk/api/teams/bulk_upsert_groups.py new file mode 100644 index 00000000..69d20c23 --- /dev/null +++ b/rootly_sdk/api/teams/bulk_upsert_groups.py @@ -0,0 +1,236 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.bulk_upsert_teams import BulkUpsertTeams +from ...models.bulk_upsert_teams_error import BulkUpsertTeamsError +from ...models.bulk_upsert_teams_response import BulkUpsertTeamsResponse +from ...models.errors_list import ErrorsList +from typing import cast + + + +def _get_kwargs( + *, + body: BulkUpsertTeams, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/teams/bulk_upsert", + } + + _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) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: + if response.status_code == 200: + response_200 = BulkUpsertTeamsResponse.from_dict(response.json()) + + + + return response_200 + + if response.status_code == 401: + response_401 = ErrorsList.from_dict(response.json()) + + + + return response_401 + + if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertTeamsError | ErrorsList: + try: + if not isinstance(data, dict): + raise TypeError() + response_422_type_0 = ErrorsList.from_dict(data) + + + + return response_422_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + response_422_type_1 = BulkUpsertTeamsError.from_dict(data) + + + + return response_422_type_1 + + response_422 = _parse_response_422(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[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | 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: BulkUpsertTeams, + +) -> Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList]: + """ Bulk upsert Teams + + Create or update multiple teams by external_id. Only attributes present in the payload are written + (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both + create and update capability across the resource scope (team/org-scoped); record-scoped principals + cannot use this endpoint (they receive 404), which also prevents the create-vs-update branch from + leaking whether an external_id exists. + + Args: + body (BulkUpsertTeams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | 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: BulkUpsertTeams, + +) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: + """ Bulk upsert Teams + + Create or update multiple teams by external_id. Only attributes present in the payload are written + (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both + create and update capability across the resource scope (team/org-scoped); record-scoped principals + cannot use this endpoint (they receive 404), which also prevents the create-vs-update branch from + leaking whether an external_id exists. + + Args: + body (BulkUpsertTeams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList + """ + + + return sync_detailed( + client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + *, + client: AuthenticatedClient, + body: BulkUpsertTeams, + +) -> Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList]: + """ Bulk upsert Teams + + Create or update multiple teams by external_id. Only attributes present in the payload are written + (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both + create and update capability across the resource scope (team/org-scoped); record-scoped principals + cannot use this endpoint (they receive 404), which also prevents the create-vs-update branch from + leaking whether an external_id exists. + + Args: + body (BulkUpsertTeams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | 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: BulkUpsertTeams, + +) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: + """ Bulk upsert Teams + + Create or update multiple teams by external_id. Only attributes present in the payload are written + (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both + create and update capability across the resource scope (team/org-scoped); record-scoped principals + cannot use this endpoint (they receive 404), which also prevents the create-vs-update branch from + leaking whether an external_id exists. + + Args: + body (BulkUpsertTeams): + + Raises: + errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList + """ + + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/teams/create_group_catalog_property.py b/rootly_sdk/api/teams/create_group_catalog_property.py index c3a7a4ef..92e1ab03 100644 --- a/rootly_sdk/api/teams/create_group_catalog_property.py +++ b/rootly_sdk/api/teams/create_group_catalog_property.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.catalog_property_response import CatalogPropertyResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_property import NewCatalogProperty -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewCatalogProperty, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/teams/properties", @@ -24,28 +34,34 @@ def _get_kwargs( _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: + +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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> CatalogPropertyResponse | ErrorsList | None: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -114,20 +131,22 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, + ) -> Response[CatalogPropertyResponse | ErrorsList]: - """Creates a Catalog Property + """ Creates a Catalog Property Creates a new Catalog Property from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/teams/create_team.py b/rootly_sdk/api/teams/create_team.py index aa00b3db..abeab7a4 100644 --- a/rootly_sdk/api/teams/create_team.py +++ b/rootly_sdk/api/teams/create_team.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_team import NewTeam from ...models.team_response import TeamResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewTeam, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/teams", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | TeamResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | TeamResponse | None: if response.status_code == 201: response_201 = TeamResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | TeamResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | TeamResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewTeam, + ) -> Response[ErrorsList | TeamResponse]: - """Creates a team + """ Creates a team Creates a new team from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | TeamResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewTeam, + ) -> ErrorsList | TeamResponse | None: - """Creates a team + """ Creates a team Creates a new team from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | TeamResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewTeam, + ) -> Response[ErrorsList | TeamResponse]: - """Creates a team + """ Creates a team Creates a new team from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | TeamResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewTeam, + ) -> ErrorsList | TeamResponse | None: - """Creates a team + """ Creates a team Creates a new team from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | TeamResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/teams/delete_team.py b/rootly_sdk/api/teams/delete_team.py index bd6221ce..fb25bc57 100644 --- a/rootly_sdk/api/teams/delete_team.py +++ b/rootly_sdk/api/teams/delete_team.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.team_response import TeamResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/teams/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/teams/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | TeamResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | TeamResponse | None: if response.status_code == 200: response_200 = TeamResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | TeamResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | TeamResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | TeamResponse]: - """Delete a team + """ Delete a team Delete a specific team by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | TeamResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | TeamResponse | None: - """Delete a team + """ Delete a team Delete a specific team by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | TeamResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | TeamResponse]: - """Delete a team + """ Delete a team Delete a specific team by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | TeamResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | TeamResponse | None: - """Delete a team + """ Delete a team Delete a specific team by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | TeamResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/teams/get_team.py b/rootly_sdk/api/teams/get_team.py index 3c4c049d..27b4ef29 100644 --- a/rootly_sdk/api/teams/get_team.py +++ b/rootly_sdk/api/teams/get_team.py @@ -1,23 +1,32 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList +from ...models.get_team_include import check_get_team_include from ...models.get_team_include import GetTeamInclude from ...models.team_response import TeamResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, include: GetTeamInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -27,30 +36,34 @@ def _get_kwargs( params["include"] = json_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/teams/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/teams/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | TeamResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | TeamResponse | None: if response.status_code == 200: response_200 = TeamResponse.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: @@ -59,9 +72,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | TeamResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | TeamResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +86,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetTeamInclude | Unset = UNSET, + ) -> Response[ErrorsList | TeamResponse]: - """Retrieves a team + """ Retrieves a team Retrieves a specific team by id @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[ErrorsList | TeamResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetTeamInclude | Unset = UNSET, + ) -> ErrorsList | TeamResponse | None: - """Retrieves a team + """ Retrieves a team Retrieves a specific team by id @@ -124,22 +138,24 @@ def sync( Returns: ErrorsList | TeamResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetTeamInclude | Unset = UNSET, + ) -> Response[ErrorsList | TeamResponse]: - """Retrieves a team + """ Retrieves a team Retrieves a specific team by id @@ -153,25 +169,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | TeamResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetTeamInclude | Unset = UNSET, + ) -> ErrorsList | TeamResponse | None: - """Retrieves a team + """ Retrieves a team Retrieves a specific team by id @@ -185,12 +205,12 @@ async def asyncio( Returns: ErrorsList | TeamResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/teams/get_team_incidents_chart.py b/rootly_sdk/api/teams/get_team_incidents_chart.py index 7f173bd8..d2b7a490 100644 --- a/rootly_sdk/api/teams/get_team_incidents_chart.py +++ b/rootly_sdk/api/teams/get_team_incidents_chart.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.incidents_chart_response import IncidentsChartResponse -from ...types import UNSET, Response +from typing import cast + def _get_kwargs( id: str, *, period: str, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} params["period"] = period + 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/{id}/incidents_chart".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/teams/{id}/incidents_chart".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | IncidentsChartResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentsChartResponse | None: if response.status_code == 200: response_200 = IncidentsChartResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | IncidentsChartResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentsChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, period: str, + ) -> Response[ErrorsList | IncidentsChartResponse]: - """Get team incidents chart + """ Get team incidents chart Get team incidents chart @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, period: str, + ) -> ErrorsList | IncidentsChartResponse | None: - """Get team incidents chart + """ Get team incidents chart Get team incidents chart @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | IncidentsChartResponse - """ + """ + return sync_detailed( id=id, - client=client, - period=period, - ).parsed +client=client, +period=period, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, period: str, + ) -> Response[ErrorsList | IncidentsChartResponse]: - """Get team incidents chart + """ Get team incidents chart Get team incidents chart @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ + """ + kwargs = _get_kwargs( id=id, - period=period, +period=period, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, period: str, + ) -> ErrorsList | IncidentsChartResponse | None: - """Get team incidents chart + """ Get team incidents chart Get team incidents chart @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | IncidentsChartResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - period=period, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +period=period, + + )).parsed diff --git a/rootly_sdk/api/teams/list_group_catalog_properties.py b/rootly_sdk/api/teams/list_group_catalog_properties.py index 59d899d2..3533b817 100644 --- a/rootly_sdk/api/teams/list_group_catalog_properties.py +++ b/rootly_sdk/api/teams/list_group_catalog_properties.py @@ -1,18 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + 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 +from ...models.list_group_catalog_properties_include import check_list_group_catalog_properties_include +from ...models.list_group_catalog_properties_include import ListGroupCatalogPropertiesInclude +from ...models.list_group_catalog_properties_sort import check_list_group_catalog_properties_sort +from ...models.list_group_catalog_properties_sort import ListGroupCatalogPropertiesSort +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -28,7 +31,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -62,21 +69,27 @@ def _get_kwargs( 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: @@ -108,8 +121,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Group Catalog Properties @@ -132,20 +146,22 @@ def sync_detailed( 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, +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( @@ -154,7 +170,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -169,8 +184,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Group Catalog Properties @@ -193,23 +209,24 @@ def sync( 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 +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( *, @@ -225,8 +242,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[CatalogPropertyList]: - """List Catalog Properties + """ List Catalog Properties List Group Catalog Properties @@ -249,27 +267,30 @@ async def asyncio_detailed( 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, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -284,8 +305,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> CatalogPropertyList | None: - """List Catalog Properties + """ List Catalog Properties List Group Catalog Properties @@ -308,21 +330,21 @@ async def asyncio( 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 + """ + + + 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 b0fed6ca..df2c9891 100644 --- a/rootly_sdk/api/teams/list_teams.py +++ b/rootly_sdk/api/teams/list_teams.py @@ -1,13 +1,19 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.list_teams_include import check_list_teams_include from ...models.list_teams_include import ListTeamsInclude from ...models.team_list import TeamList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -29,8 +35,32 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -72,23 +102,69 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[color][eq]"] = filtercoloreq + + params["filter[color][not_eq]"] = filtercolornot_eq + + params["filter[color][in]"] = filtercolorin + + params["filter[color][not_in]"] = filtercolornot_in + + params["filter[alert_broadcast_enabled][eq]"] = filteralert_broadcast_enabledeq + + params["filter[alert_broadcast_enabled][not_eq]"] = filteralert_broadcast_enablednot_eq + + params["filter[alert_broadcast_enabled][in]"] = filteralert_broadcast_enabledin + + params["filter[alert_broadcast_enabled][not_in]"] = filteralert_broadcast_enablednot_in + + params["filter[incident_broadcast_enabled][eq]"] = filterincident_broadcast_enabledeq + + params["filter[incident_broadcast_enabled][not_eq]"] = filterincident_broadcast_enablednot_eq + + params["filter[incident_broadcast_enabled][in]"] = filterincident_broadcast_enabledin + + params["filter[incident_broadcast_enabled][not_in]"] = filterincident_broadcast_enablednot_in + 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/teams", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> TeamList | None: if response.status_code == 200: response_200 = TeamList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -126,9 +202,30 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[TeamList]: - """List teams + """ List teams List teams @@ -150,6 +247,26 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -158,27 +275,49 @@ def sync_detailed( Returns: Response[TeamList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filtercolor=filtercolor, - filteralert_broadcast_enabled=filteralert_broadcast_enabled, - filterincident_broadcast_enabled=filterincident_broadcast_enabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filtercolor=filtercolor, +filteralert_broadcast_enabled=filteralert_broadcast_enabled, +filterincident_broadcast_enabled=filterincident_broadcast_enabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, +filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, +filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, +filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, +filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, +filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, +filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, +filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, +sort=sort, + ) response = client.get_httpx_client().request( @@ -187,7 +326,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -208,9 +346,30 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> TeamList | None: - """List teams + """ List teams List teams @@ -232,6 +391,26 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -240,30 +419,51 @@ def sync( Returns: TeamList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filtercolor=filtercolor, - filteralert_broadcast_enabled=filteralert_broadcast_enabled, - filterincident_broadcast_enabled=filterincident_broadcast_enabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filtercolor=filtercolor, +filteralert_broadcast_enabled=filteralert_broadcast_enabled, +filterincident_broadcast_enabled=filterincident_broadcast_enabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, +filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, +filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, +filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, +filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, +filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, +filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, +filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, +sort=sort, + ).parsed async def asyncio_detailed( *, @@ -285,9 +485,30 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[TeamList]: - """List teams + """ List teams List teams @@ -309,6 +530,26 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -317,34 +558,57 @@ async def asyncio_detailed( Returns: Response[TeamList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filtercolor=filtercolor, - filteralert_broadcast_enabled=filteralert_broadcast_enabled, - filterincident_broadcast_enabled=filterincident_broadcast_enabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filtercolor=filtercolor, +filteralert_broadcast_enabled=filteralert_broadcast_enabled, +filterincident_broadcast_enabled=filterincident_broadcast_enabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, +filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, +filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, +filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, +filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, +filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, +filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, +filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -365,9 +629,30 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filtercoloreq: str | Unset = UNSET, + filtercolornot_eq: str | Unset = UNSET, + filtercolorin: str | Unset = UNSET, + filtercolornot_in: str | Unset = UNSET, + filteralert_broadcast_enabledeq: str | Unset = UNSET, + filteralert_broadcast_enablednot_eq: str | Unset = UNSET, + filteralert_broadcast_enabledin: str | Unset = UNSET, + filteralert_broadcast_enablednot_in: str | Unset = UNSET, + filterincident_broadcast_enabledeq: str | Unset = UNSET, + filterincident_broadcast_enablednot_eq: str | Unset = UNSET, + filterincident_broadcast_enabledin: str | Unset = UNSET, + filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, + ) -> TeamList | None: - """List teams + """ List teams List teams @@ -389,6 +674,26 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filtercoloreq (str | Unset): + filtercolornot_eq (str | Unset): + filtercolorin (str | Unset): + filtercolornot_in (str | Unset): + filteralert_broadcast_enabledeq (str | Unset): + filteralert_broadcast_enablednot_eq (str | Unset): + filteralert_broadcast_enabledin (str | Unset): + filteralert_broadcast_enablednot_in (str | Unset): + filterincident_broadcast_enabledeq (str | Unset): + filterincident_broadcast_enablednot_eq (str | Unset): + filterincident_broadcast_enabledin (str | Unset): + filterincident_broadcast_enablednot_in (str | Unset): sort (str | Unset): Raises: @@ -397,28 +702,48 @@ async def asyncio( Returns: TeamList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filterslug=filterslug, - filtername=filtername, - filterbackstage_id=filterbackstage_id, - filtercortex_id=filtercortex_id, - filteropslevel_id=filteropslevel_id, - filterexternal_id=filterexternal_id, - filtercolor=filtercolor, - filteralert_broadcast_enabled=filteralert_broadcast_enabled, - filterincident_broadcast_enabled=filterincident_broadcast_enabled, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filterslug=filterslug, +filtername=filtername, +filterbackstage_id=filterbackstage_id, +filtercortex_id=filtercortex_id, +filteropslevel_id=filteropslevel_id, +filterexternal_id=filterexternal_id, +filtercolor=filtercolor, +filteralert_broadcast_enabled=filteralert_broadcast_enabled, +filterincident_broadcast_enabled=filterincident_broadcast_enabled, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filtercoloreq=filtercoloreq, +filtercolornot_eq=filtercolornot_eq, +filtercolorin=filtercolorin, +filtercolornot_in=filtercolornot_in, +filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, +filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, +filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, +filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, +filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, +filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, +filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, +filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, +sort=sort, + + )).parsed diff --git a/rootly_sdk/api/teams/update_team.py b/rootly_sdk/api/teams/update_team.py index b555e950..c8e5f8e9 100644 --- a/rootly_sdk/api/teams/update_team.py +++ b/rootly_sdk/api/teams/update_team.py @@ -1,51 +1,62 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.team_response import TeamResponse from ...models.update_team import UpdateTeam -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateTeam, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/teams/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/teams/{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 | TeamResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | TeamResponse | None: if response.status_code == 200: response_200 = TeamResponse.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: @@ -54,9 +65,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | TeamResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | TeamResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +79,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateTeam, + ) -> Response[ErrorsList | TeamResponse]: - """Update a team + """ Update a team Update a specific team by id @@ -85,11 +95,13 @@ def sync_detailed( Returns: Response[ErrorsList | TeamResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, + ) -> ErrorsList | TeamResponse | None: - """Update a team + """ Update a team Update a specific team by id @@ -119,22 +131,24 @@ def sync( Returns: ErrorsList | TeamResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, + ) -> Response[ErrorsList | TeamResponse]: - """Update a team + """ Update a team Update a specific team by id @@ -148,25 +162,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | TeamResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, + ) -> ErrorsList | TeamResponse | None: - """Update a team + """ Update a team Update a specific team by id @@ -180,12 +198,12 @@ async def asyncio( Returns: ErrorsList | TeamResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/user_email_addresses/__init__.py b/rootly_sdk/api/user_email_addresses/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/user_email_addresses/__init__.py +++ b/rootly_sdk/api/user_email_addresses/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 74446851..97ae88b2 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,60 +1,75 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_user_email_address import NewUserEmailAddress from ...models.user_email_address_response import UserEmailAddressResponse -from ...types import Response +from typing import cast + def _get_kwargs( user_id: str, *, body: NewUserEmailAddress, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/users/{user_id}/email_addresses".format( - user_id=quote(str(user_id), safe=""), - ), + "url": "/v1/users/{user_id}/email_addresses".format(user_id=quote(str(user_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 | UserEmailAddressResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 201: response_201 = UserEmailAddressResponse.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 == 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: @@ -63,9 +78,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,8 +92,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewUserEmailAddress, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Creates a user email address + """ Creates a user email address Creates a new user email address from provided data @@ -94,11 +108,13 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( user_id=user_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -107,14 +123,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( user_id: str, *, client: AuthenticatedClient, body: NewUserEmailAddress, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Creates a user email address + """ Creates a user email address Creates a new user email address from provided data @@ -128,22 +144,24 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ + """ + return sync_detailed( user_id=user_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, body: NewUserEmailAddress, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Creates a user email address + """ Creates a user email address Creates a new user email address from provided data @@ -157,25 +175,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( user_id=user_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( user_id: str, *, client: AuthenticatedClient, body: NewUserEmailAddress, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Creates a user email address + """ Creates a user email address Creates a new user email address from provided data @@ -189,12 +211,12 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ - - return ( - await asyncio_detailed( - user_id=user_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + user_id=user_id, +client=client, +body=body, + + )).parsed 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 48fb3366..c82c6818 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,46 +1,59 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_email_address_response import UserEmailAddressResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/email_addresses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/email_addresses/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserEmailAddressResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.from_dict(response.json()) + + 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: @@ -49,9 +62,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +75,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Delete user email address + """ Delete user email address Deletes a user email address @@ -78,10 +90,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -90,13 +104,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Delete user email address + """ Delete user email address Deletes a user email address @@ -109,20 +123,22 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Delete user email address + """ Delete user email address Deletes a user email address @@ -135,23 +151,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Delete user email address + """ Delete user email address Deletes a user email address @@ -164,11 +184,11 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 1787502c..8beb63ef 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,46 +1,59 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_email_address_list import UserEmailAddressList -from ...types import Response +from typing import cast + def _get_kwargs( user_id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/users/{user_id}/email_addresses".format( - user_id=quote(str(user_id), safe=""), - ), + "url": "/v1/users/{user_id}/email_addresses".format(user_id=quote(str(user_id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserEmailAddressList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressList | None: if response.status_code == 200: response_200 = UserEmailAddressList.from_dict(response.json()) + + 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: @@ -49,9 +62,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserEmailAddressList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +75,9 @@ def sync_detailed( user_id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserEmailAddressList]: - """Retrieves user email addresses + """ Retrieves user email addresses Retrieves all email addresses for the specified user @@ -78,10 +90,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressList] - """ + """ + kwargs = _get_kwargs( user_id=user_id, + ) response = client.get_httpx_client().request( @@ -90,13 +104,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( user_id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserEmailAddressList | None: - """Retrieves user email addresses + """ Retrieves user email addresses Retrieves all email addresses for the specified user @@ -109,20 +123,22 @@ def sync( Returns: ErrorsList | UserEmailAddressList - """ + """ + return sync_detailed( user_id=user_id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserEmailAddressList]: - """Retrieves user email addresses + """ Retrieves user email addresses Retrieves all email addresses for the specified user @@ -135,23 +151,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressList] - """ + """ + kwargs = _get_kwargs( user_id=user_id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( user_id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserEmailAddressList | None: - """Retrieves user email addresses + """ Retrieves user email addresses Retrieves all email addresses for the specified user @@ -164,11 +184,11 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressList - """ + """ - return ( - await asyncio_detailed( - user_id=user_id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + user_id=user_id, +client=client, + + )).parsed 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 f2cffd4b..33e3bdda 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,46 +1,59 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_email_address_response import UserEmailAddressResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/email_addresses/{id}/resend_verification".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/email_addresses/{id}/resend_verification".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserEmailAddressResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.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: @@ -49,9 +62,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +75,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Resends verification email + """ Resends verification email Resends verification email for an email address @@ -78,10 +90,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -90,13 +104,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Resends verification email + """ Resends verification email Resends verification email for an email address @@ -109,20 +123,22 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Resends verification email + """ Resends verification email Resends verification email for an email address @@ -135,23 +151,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Resends verification email + """ Resends verification email Resends verification email for an email address @@ -164,11 +184,11 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 7d07adf5..d933eb6f 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,46 +1,59 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_email_address_response import UserEmailAddressResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/email_addresses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/email_addresses/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserEmailAddressResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.from_dict(response.json()) + + 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: @@ -49,9 +62,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +75,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Show user email address + """ Show user email address Retrieves a specific user email address @@ -78,10 +90,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -90,13 +104,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Show user email address + """ Show user email address Retrieves a specific user email address @@ -109,20 +123,22 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Show user email address + """ Show user email address Retrieves a specific user email address @@ -135,23 +151,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Show user email address + """ Show user email address Retrieves a specific user email address @@ -164,11 +184,11 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 2c5e414d..333c3744 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,60 +1,75 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_user_email_address import UpdateUserEmailAddress from ...models.user_email_address_response import UserEmailAddressResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateUserEmailAddress, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/email_addresses/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/email_addresses/{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 | UserEmailAddressResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.from_dict(response.json()) + + 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -63,9 +78,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,8 +92,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUserEmailAddress, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Update user email address + """ Update user email address Updates a user email address @@ -94,11 +108,13 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -107,14 +123,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateUserEmailAddress, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Update user email address + """ Update user email address Updates a user email address @@ -128,22 +144,24 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateUserEmailAddress, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Update user email address + """ Update user email address Updates a user email address @@ -157,25 +175,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateUserEmailAddress, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Update user email address + """ Update user email address Updates a user email address @@ -189,12 +211,12 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed 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 87d89043..abfc7127 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_email_address_response import UserEmailAddressResponse -from ...types import UNSET, Response +from typing import cast + def _get_kwargs( id: str, *, token: str, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} params["token"] = token + 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/email_addresses/{id}/verify".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/email_addresses/{id}/verify".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserEmailAddressResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, token: str, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Verifies an email address with token + """ Verifies an email address with token Verifies an email address using a verification token @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, - token=token, +token=token, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, token: str, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Verifies an email address with token + """ Verifies an email address with token Verifies an email address using a verification token @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ + """ + return sync_detailed( id=id, - client=client, - token=token, - ).parsed +client=client, +token=token, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, token: str, + ) -> Response[ErrorsList | UserEmailAddressResponse]: - """Verifies an email address with token + """ Verifies an email address with token Verifies an email address using a verification token @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ + """ + kwargs = _get_kwargs( id=id, - token=token, +token=token, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, token: str, + ) -> ErrorsList | UserEmailAddressResponse | None: - """Verifies an email address with token + """ Verifies an email address with token Verifies an email address using a verification token @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - token=token, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +token=token, + + )).parsed diff --git a/rootly_sdk/api/user_notification_rules/__init__.py b/rootly_sdk/api/user_notification_rules/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/user_notification_rules/__init__.py +++ b/rootly_sdk/api/user_notification_rules/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 38aa6b53..adb50c47 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,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_user_notification_rule import NewUserNotificationRule from ...models.user_notification_rule_response import UserNotificationRuleResponse -from ...types import Response +from typing import cast + def _get_kwargs( user_id: str, *, body: NewUserNotificationRule, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/users/{user_id}/notification_rules".format( - user_id=quote(str(user_id), safe=""), - ), + "url": "/v1/users/{user_id}/notification_rules".format(user_id=quote(str(user_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 | UserNotificationRuleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserNotificationRuleResponse | None: if response.status_code == 201: response_201 = UserNotificationRuleResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserNotificationRuleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserNotificationRuleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewUserNotificationRule, + ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """Creates an user notification rule + """ Creates an user notification rule Creates a new user notification rule from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ + """ + kwargs = _get_kwargs( user_id=user_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( user_id: str, *, client: AuthenticatedClient, body: NewUserNotificationRule, + ) -> ErrorsList | UserNotificationRuleResponse | None: - """Creates an user notification rule + """ Creates an user notification rule Creates a new user notification rule from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | UserNotificationRuleResponse - """ + """ + return sync_detailed( user_id=user_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, body: NewUserNotificationRule, + ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """Creates an user notification rule + """ Creates an user notification rule Creates a new user notification rule from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ + """ + kwargs = _get_kwargs( user_id=user_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( user_id: str, *, client: AuthenticatedClient, body: NewUserNotificationRule, + ) -> ErrorsList | UserNotificationRuleResponse | None: - """Creates an user notification rule + """ Creates an user notification rule Creates a new user notification rule from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | UserNotificationRuleResponse - """ - - return ( - await asyncio_detailed( - user_id=user_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + user_id=user_id, +client=client, +body=body, + + )).parsed 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 45a0a726..0519499a 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_notification_rule_response import UserNotificationRuleResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/notification_rules/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/notification_rules/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserNotificationRuleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserNotificationRuleResponse | None: if response.status_code == 200: response_200 = UserNotificationRuleResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserNotificationRuleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserNotificationRuleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """Delete an user notification rule + """ Delete an user notification rule Delete a specific user notification rule by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserNotificationRuleResponse | None: - """Delete an user notification rule + """ Delete an user notification rule Delete a specific user notification rule by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | UserNotificationRuleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """Delete an user notification rule + """ Delete an user notification rule Delete a specific user notification rule by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserNotificationRuleResponse | None: - """Delete an user notification rule + """ Delete an user notification rule Delete a specific user notification rule by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | UserNotificationRuleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 1c214c69..2bb5d176 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_notification_rule_response import UserNotificationRuleResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/notification_rules/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/notification_rules/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserNotificationRuleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserNotificationRuleResponse | None: if response.status_code == 200: response_200 = UserNotificationRuleResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserNotificationRuleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserNotificationRuleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """Retrieves an user notification rule + """ Retrieves an user notification rule Retrieves a specific user notification rule by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserNotificationRuleResponse | None: - """Retrieves an user notification rule + """ Retrieves an user notification rule Retrieves a specific user notification rule by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | UserNotificationRuleResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """Retrieves an user notification rule + """ Retrieves an user notification rule Retrieves a specific user notification rule by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserNotificationRuleResponse | None: - """Retrieves an user notification rule + """ Retrieves an user notification rule Retrieves a specific user notification rule by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | UserNotificationRuleResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 839b2ca9..3bbd782d 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.user_notification_rule_list import UserNotificationRuleList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -17,7 +21,11 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -29,25 +37,27 @@ def _get_kwargs( 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/users/{user_id}/notification_rules".format( - user_id=quote(str(user_id), safe=""), - ), + "url": "/v1/users/{user_id}/notification_rules".format(user_id=quote(str(user_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> UserNotificationRuleList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> UserNotificationRuleList | None: if response.status_code == 200: response_200 = UserNotificationRuleList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -56,9 +66,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[UserNotificationRuleList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[UserNotificationRuleList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +83,9 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[UserNotificationRuleList]: - """List user notification rules + """ List user notification rules List user notification rules @@ -93,14 +102,16 @@ def sync_detailed( Returns: Response[UserNotificationRuleList] - """ + """ + kwargs = _get_kwargs( user_id=user_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + ) response = client.get_httpx_client().request( @@ -109,7 +120,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( user_id: str, *, @@ -118,8 +128,9 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> UserNotificationRuleList | None: - """List user notification rules + """ List user notification rules List user notification rules @@ -136,17 +147,18 @@ def sync( Returns: UserNotificationRuleList - """ + """ + return sync_detailed( user_id=user_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + ).parsed async def asyncio_detailed( user_id: str, @@ -156,8 +168,9 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> Response[UserNotificationRuleList]: - """List user notification rules + """ List user notification rules List user notification rules @@ -174,21 +187,24 @@ async def asyncio_detailed( Returns: Response[UserNotificationRuleList] - """ + """ + kwargs = _get_kwargs( user_id=user_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( user_id: str, *, @@ -197,8 +213,9 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, + ) -> UserNotificationRuleList | None: - """List user notification rules + """ List user notification rules List user notification rules @@ -215,15 +232,15 @@ async def asyncio( Returns: UserNotificationRuleList - """ - - return ( - await asyncio_detailed( - user_id=user_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - sort=sort, - ) - ).parsed + """ + + + return (await asyncio_detailed( + user_id=user_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +sort=sort, + + )).parsed 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 39e99b2b..8746054f 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_user_notification_rule import UpdateUserNotificationRule from ...models.user_notification_rule_response import UserNotificationRuleResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateUserNotificationRule, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/notification_rules/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/notification_rules/{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 | UserNotificationRuleResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserNotificationRuleResponse | None: if response.status_code == 200: response_200 = UserNotificationRuleResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserNotificationRuleResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserNotificationRuleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUserNotificationRule, + ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """Update an user notification rule + """ Update an user notification rule Update a specific user notification rule by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateUserNotificationRule, + ) -> ErrorsList | UserNotificationRuleResponse | None: - """Update an user notification rule + """ Update an user notification rule Update a specific user notification rule by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | UserNotificationRuleResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateUserNotificationRule, + ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """Update an user notification rule + """ Update an user notification rule Update a specific user notification rule by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateUserNotificationRule, + ) -> ErrorsList | UserNotificationRuleResponse | None: - """Update an user notification rule + """ Update an user notification rule Update a specific user notification rule by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | UserNotificationRuleResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/user_phone_numbers/__init__.py b/rootly_sdk/api/user_phone_numbers/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/user_phone_numbers/__init__.py +++ b/rootly_sdk/api/user_phone_numbers/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 4e6fc622..cd83367b 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,60 +1,75 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_user_phone_number import NewUserPhoneNumber from ...models.user_phone_number_response import UserPhoneNumberResponse -from ...types import Response +from typing import cast + def _get_kwargs( user_id: str, *, body: NewUserPhoneNumber, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/users/{user_id}/phone_numbers".format( - user_id=quote(str(user_id), safe=""), - ), + "url": "/v1/users/{user_id}/phone_numbers".format(user_id=quote(str(user_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 | UserPhoneNumberResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserPhoneNumberResponse | None: if response.status_code == 201: response_201 = UserPhoneNumberResponse.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 == 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: @@ -63,9 +78,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserPhoneNumberResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,8 +92,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewUserPhoneNumber, + ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """Creates a user phone number + """ Creates a user phone number Creates a new user phone number from provided data @@ -94,11 +108,13 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ + """ + kwargs = _get_kwargs( user_id=user_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -107,14 +123,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( user_id: str, *, client: AuthenticatedClient, body: NewUserPhoneNumber, + ) -> ErrorsList | UserPhoneNumberResponse | None: - """Creates a user phone number + """ Creates a user phone number Creates a new user phone number from provided data @@ -128,22 +144,24 @@ def sync( Returns: ErrorsList | UserPhoneNumberResponse - """ + """ + return sync_detailed( user_id=user_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, body: NewUserPhoneNumber, + ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """Creates a user phone number + """ Creates a user phone number Creates a new user phone number from provided data @@ -157,25 +175,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ + """ + kwargs = _get_kwargs( user_id=user_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( user_id: str, *, client: AuthenticatedClient, body: NewUserPhoneNumber, + ) -> ErrorsList | UserPhoneNumberResponse | None: - """Creates a user phone number + """ Creates a user phone number Creates a new user phone number from provided data @@ -189,12 +211,12 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberResponse - """ - - return ( - await asyncio_detailed( - user_id=user_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + user_id=user_id, +client=client, +body=body, + + )).parsed 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 0b556c98..064fe4cf 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,51 +1,66 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_phone_number_response import UserPhoneNumberResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/phone_numbers/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/phone_numbers/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserPhoneNumberResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserPhoneNumberResponse | None: if response.status_code == 200: response_200 = UserPhoneNumberResponse.from_dict(response.json()) + + 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -54,9 +69,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserPhoneNumberResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +82,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """Delete user phone number + """ Delete user phone number Deletes a user phone number @@ -83,10 +97,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -95,13 +111,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserPhoneNumberResponse | None: - """Delete user phone number + """ Delete user phone number Deletes a user phone number @@ -114,20 +130,22 @@ def sync( Returns: ErrorsList | UserPhoneNumberResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """Delete user phone number + """ Delete user phone number Deletes a user phone number @@ -140,23 +158,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserPhoneNumberResponse | None: - """Delete user phone number + """ Delete user phone number Deletes a user phone number @@ -169,11 +191,11 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 7e8d2f71..747c37b5 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,46 +1,59 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_phone_number_list import UserPhoneNumberList -from ...types import Response +from typing import cast + def _get_kwargs( user_id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/users/{user_id}/phone_numbers".format( - user_id=quote(str(user_id), safe=""), - ), + "url": "/v1/users/{user_id}/phone_numbers".format(user_id=quote(str(user_id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserPhoneNumberList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserPhoneNumberList | None: if response.status_code == 200: response_200 = UserPhoneNumberList.from_dict(response.json()) + + 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: @@ -49,9 +62,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserPhoneNumberList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +75,9 @@ def sync_detailed( user_id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserPhoneNumberList]: - """Retrieves user phone numbers + """ Retrieves user phone numbers Retrieves all phone numbers for the specified user @@ -78,10 +90,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberList] - """ + """ + kwargs = _get_kwargs( user_id=user_id, + ) response = client.get_httpx_client().request( @@ -90,13 +104,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( user_id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserPhoneNumberList | None: - """Retrieves user phone numbers + """ Retrieves user phone numbers Retrieves all phone numbers for the specified user @@ -109,20 +123,22 @@ def sync( Returns: ErrorsList | UserPhoneNumberList - """ + """ + return sync_detailed( user_id=user_id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserPhoneNumberList]: - """Retrieves user phone numbers + """ Retrieves user phone numbers Retrieves all phone numbers for the specified user @@ -135,23 +151,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberList] - """ + """ + kwargs = _get_kwargs( user_id=user_id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( user_id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserPhoneNumberList | None: - """Retrieves user phone numbers + """ Retrieves user phone numbers Retrieves all phone numbers for the specified user @@ -164,11 +184,11 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberList - """ + """ - return ( - await asyncio_detailed( - user_id=user_id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + user_id=user_id, +client=client, + + )).parsed 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 6cfafbed..f99b7bf4 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,46 +1,59 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_phone_number_response import UserPhoneNumberResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/phone_numbers/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/phone_numbers/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserPhoneNumberResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserPhoneNumberResponse | None: if response.status_code == 200: response_200 = UserPhoneNumberResponse.from_dict(response.json()) + + 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: @@ -49,9 +62,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserPhoneNumberResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -64,8 +75,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """Show user phone number + """ Show user phone number Retrieves a specific user phone number @@ -78,10 +90,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -90,13 +104,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserPhoneNumberResponse | None: - """Show user phone number + """ Show user phone number Retrieves a specific user phone number @@ -109,20 +123,22 @@ def sync( Returns: ErrorsList | UserPhoneNumberResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """Show user phone number + """ Show user phone number Retrieves a specific user phone number @@ -135,23 +151,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserPhoneNumberResponse | None: - """Show user phone number + """ Show user phone number Retrieves a specific user phone number @@ -164,11 +184,11 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 6dcffd23..799c9877 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,60 +1,75 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_user_phone_number import UpdateUserPhoneNumber from ...models.user_phone_number_response import UserPhoneNumberResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateUserPhoneNumber, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/phone_numbers/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/phone_numbers/{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 | UserPhoneNumberResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserPhoneNumberResponse | None: if response.status_code == 200: response_200 = UserPhoneNumberResponse.from_dict(response.json()) + + 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) + + return response_422 if client.raise_on_unexpected_status: @@ -63,9 +78,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserPhoneNumberResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,8 +92,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUserPhoneNumber, + ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """Update user phone number + """ Update user phone number Updates a user phone number @@ -94,11 +108,13 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -107,14 +123,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateUserPhoneNumber, + ) -> ErrorsList | UserPhoneNumberResponse | None: - """Update user phone number + """ Update user phone number Updates a user phone number @@ -128,22 +144,24 @@ def sync( Returns: ErrorsList | UserPhoneNumberResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateUserPhoneNumber, + ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """Update user phone number + """ Update user phone number Updates a user phone number @@ -157,25 +175,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateUserPhoneNumber, + ) -> ErrorsList | UserPhoneNumberResponse | None: - """Update user phone number + """ Update user phone number Updates a user phone number @@ -189,12 +211,12 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/users/__init__.py b/rootly_sdk/api/users/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/users/__init__.py +++ b/rootly_sdk/api/users/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/users/delete_user.py b/rootly_sdk/api/users/delete_user.py index e0be4b19..c0994de1 100644 --- a/rootly_sdk/api/users/delete_user.py +++ b/rootly_sdk/api/users/delete_user.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_response import UserResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/users/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/users/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserResponse | None: if response.status_code == 200: response_200 = UserResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserResponse]: - """Delete an user + """ Delete an user Delete a specific user by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserResponse | None: - """Delete an user + """ Delete an user Delete a specific user by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | UserResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserResponse]: - """Delete an user + """ Delete an user Delete a specific user by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | UserResponse | None: - """Delete an user + """ Delete an user Delete a specific user by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | UserResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/users/get_current_user.py b/rootly_sdk/api/users/get_current_user.py index 054c8451..9939a35e 100644 --- a/rootly_sdk/api/users/get_current_user.py +++ b/rootly_sdk/api/users/get_current_user.py @@ -1,36 +1,51 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.user_response import UserResponse -from ...types import Response +from typing import cast + -def _get_kwargs() -> dict[str, Any]: +def _get_kwargs( + +) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/users/me", } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserResponse | None: if response.status_code == 200: response_200 = UserResponse.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: @@ -39,9 +54,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -53,8 +66,9 @@ def _build_response( def sync_detailed( *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserResponse]: - """Get current user + """ Get current user Get current user @@ -64,9 +78,12 @@ def sync_detailed( Returns: Response[ErrorsList | UserResponse] - """ + """ + - kwargs = _get_kwargs() + kwargs = _get_kwargs( + + ) response = client.get_httpx_client().request( **kwargs, @@ -74,12 +91,12 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, + ) -> ErrorsList | UserResponse | None: - """Get current user + """ Get current user Get current user @@ -89,18 +106,20 @@ def sync( Returns: ErrorsList | UserResponse - """ + """ + return sync_detailed( client=client, - ).parsed + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, + ) -> Response[ErrorsList | UserResponse]: - """Get current user + """ Get current user Get current user @@ -110,20 +129,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserResponse] - """ + """ + - kwargs = _get_kwargs() + kwargs = _get_kwargs( + + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, + ) -> ErrorsList | UserResponse | None: - """Get current user + """ Get current user Get current user @@ -133,10 +157,10 @@ async def asyncio( Returns: ErrorsList | UserResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - ) - ).parsed + + return (await asyncio_detailed( + client=client, + + )).parsed diff --git a/rootly_sdk/api/users/get_user.py b/rootly_sdk/api/users/get_user.py index 7000acf4..7f6098d9 100644 --- a/rootly_sdk/api/users/get_user.py +++ b/rootly_sdk/api/users/get_user.py @@ -1,22 +1,31 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList +from ...models.get_user_include import check_get_user_include from ...models.get_user_include import GetUserInclude from ...models.user_response import UserResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, include: GetUserInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,30 +35,34 @@ def _get_kwargs( params["include"] = json_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/users/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/users/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | UserResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserResponse | None: if response.status_code == 200: response_200 = UserResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetUserInclude | Unset = UNSET, + ) -> Response[ErrorsList | UserResponse]: - """Retrieves an user + """ Retrieves an user Retrieves a specific user by id @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | UserResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, include: GetUserInclude | Unset = UNSET, + ) -> ErrorsList | UserResponse | None: - """Retrieves an user + """ Retrieves an user Retrieves a specific user by id @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | UserResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetUserInclude | Unset = UNSET, + ) -> Response[ErrorsList | UserResponse]: - """Retrieves an user + """ Retrieves an user Retrieves a specific user by id @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, include: GetUserInclude | Unset = UNSET, + ) -> ErrorsList | UserResponse | None: - """Retrieves an user + """ Retrieves an user Retrieves a specific user by id @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | UserResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/users/list_users.py b/rootly_sdk/api/users/list_users.py index 7ef32a0b..68d556c6 100644 --- a/rootly_sdk/api/users/list_users.py +++ b/rootly_sdk/api/users/list_users.py @@ -1,15 +1,22 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList +from ...models.list_users_include import check_list_users_include from ...models.list_users_include import ListUsersInclude +from ...models.list_users_sort import check_list_users_sort from ...models.list_users_sort import ListUsersSort from ...models.user_list import UserList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -24,7 +31,11 @@ def _get_kwargs( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -56,26 +67,34 @@ def _get_kwargs( params["include"] = json_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/users", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserList | None: if response.status_code == 200: response_200 = UserList.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: @@ -84,9 +103,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -108,8 +125,9 @@ def sync_detailed( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, + ) -> Response[ErrorsList | UserList]: - """List users + """ List users List users @@ -131,19 +149,21 @@ def sync_detailed( Returns: Response[ErrorsList | UserList] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filteremail=filteremail, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - include=include, +pagesize=pagesize, +filtersearch=filtersearch, +filteremail=filteremail, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, +include=include, + ) response = client.get_httpx_client().request( @@ -152,7 +172,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -166,8 +185,9 @@ def sync( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, + ) -> ErrorsList | UserList | None: - """List users + """ List users List users @@ -189,22 +209,23 @@ def sync( Returns: ErrorsList | UserList - """ + """ + return sync_detailed( client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filteremail=filteremail, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - include=include, - ).parsed +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filteremail=filteremail, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, +include=include, + ).parsed async def asyncio_detailed( *, @@ -219,8 +240,9 @@ async def asyncio_detailed( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, + ) -> Response[ErrorsList | UserList]: - """List users + """ List users List users @@ -242,26 +264,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserList] - """ + """ + kwargs = _get_kwargs( pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filteremail=filteremail, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - include=include, +pagesize=pagesize, +filtersearch=filtersearch, +filteremail=filteremail, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -275,8 +300,9 @@ async def asyncio( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, + ) -> ErrorsList | UserList | None: - """List users + """ List users List users @@ -298,20 +324,20 @@ async def asyncio( Returns: ErrorsList | UserList - """ - - return ( - await asyncio_detailed( - client=client, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filteremail=filteremail, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - sort=sort, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filteremail=filteremail, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +sort=sort, +include=include, + + )).parsed diff --git a/rootly_sdk/api/users/update_user.py b/rootly_sdk/api/users/update_user.py index 40ac5b44..a7626389 100644 --- a/rootly_sdk/api/users/update_user.py +++ b/rootly_sdk/api/users/update_user.py @@ -1,51 +1,64 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_user import UpdateUser from ...models.user_response import UserResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( id: str, *, body: UpdateUser | Unset = UNSET, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/users/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/users/{id}".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 -) -> ErrorsList | UserResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserResponse | None: if response.status_code == 200: response_200 = UserResponse.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: @@ -54,9 +67,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | UserResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,8 +81,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUser | Unset = UNSET, + ) -> Response[ErrorsList | UserResponse]: - """Update a user + """ Update a user Update a specific user by id @@ -85,11 +97,13 @@ def sync_detailed( Returns: Response[ErrorsList | UserResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -98,14 +112,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateUser | Unset = UNSET, + ) -> ErrorsList | UserResponse | None: - """Update a user + """ Update a user Update a specific user by id @@ -119,22 +133,24 @@ def sync( Returns: ErrorsList | UserResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateUser | Unset = UNSET, + ) -> Response[ErrorsList | UserResponse]: - """Update a user + """ Update a user Update a specific user by id @@ -148,25 +164,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateUser | Unset = UNSET, + ) -> ErrorsList | UserResponse | None: - """Update a user + """ Update a user Update a specific user by id @@ -180,12 +200,12 @@ async def asyncio( Returns: ErrorsList | UserResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/webhooks_deliveries/__init__.py b/rootly_sdk/api/webhooks_deliveries/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/webhooks_deliveries/__init__.py +++ b/rootly_sdk/api/webhooks_deliveries/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py b/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py index 4e61f403..b9f42f48 100644 --- a/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py +++ b/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py @@ -1,35 +1,44 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.webhooks_delivery_response import WebhooksDeliveryResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/webhooks/deliveries/{id}/deliver".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/webhooks/deliveries/{id}/deliver".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> WebhooksDeliveryResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WebhooksDeliveryResponse | None: if response.status_code == 200: response_200 = WebhooksDeliveryResponse.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -38,9 +47,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[WebhooksDeliveryResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WebhooksDeliveryResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -53,8 +60,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[WebhooksDeliveryResponse]: - """Retries a webhook delivery + """ Retries a webhook delivery Retries a webhook delivery @@ -67,10 +75,12 @@ def sync_detailed( Returns: Response[WebhooksDeliveryResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -79,13 +89,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> WebhooksDeliveryResponse | None: - """Retries a webhook delivery + """ Retries a webhook delivery Retries a webhook delivery @@ -98,20 +108,22 @@ def sync( Returns: WebhooksDeliveryResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[WebhooksDeliveryResponse]: - """Retries a webhook delivery + """ Retries a webhook delivery Retries a webhook delivery @@ -124,23 +136,27 @@ async def asyncio_detailed( Returns: Response[WebhooksDeliveryResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> WebhooksDeliveryResponse | None: - """Retries a webhook delivery + """ Retries a webhook delivery Retries a webhook delivery @@ -153,11 +169,11 @@ async def asyncio( Returns: WebhooksDeliveryResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py b/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py index 6bcff9b9..c292d8f2 100644 --- a/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py +++ b/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.webhooks_delivery_response import WebhooksDeliveryResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/webhooks/deliveries/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/webhooks/deliveries/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WebhooksDeliveryResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WebhooksDeliveryResponse | None: if response.status_code == 200: response_200 = WebhooksDeliveryResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WebhooksDeliveryResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksDeliveryResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WebhooksDeliveryResponse]: - """Retrieves a webhook delivery + """ Retrieves a webhook delivery Retrieves a specific webhook delivery by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksDeliveryResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WebhooksDeliveryResponse | None: - """Retrieves a webhook delivery + """ Retrieves a webhook delivery Retrieves a specific webhook delivery by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | WebhooksDeliveryResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WebhooksDeliveryResponse]: - """Retrieves a webhook delivery + """ Retrieves a webhook delivery Retrieves a specific webhook delivery by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksDeliveryResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WebhooksDeliveryResponse | None: - """Retrieves a webhook delivery + """ Retrieves a webhook delivery Retrieves a specific webhook delivery by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | WebhooksDeliveryResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py b/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py index a333135e..be0907d8 100644 --- a/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py +++ b/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.webhooks_delivery_list import WebhooksDeliveryList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,23 +34,27 @@ def _get_kwargs( 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/webhooks/endpoints/{endpoint_id}/deliveries".format( - endpoint_id=quote(str(endpoint_id), safe=""), - ), + "url": "/v1/webhooks/endpoints/{endpoint_id}/deliveries".format(endpoint_id=quote(str(endpoint_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WebhooksDeliveryList | None: if response.status_code == 200: response_200 = WebhooksDeliveryList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -51,9 +63,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[WebhooksDeliveryList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WebhooksDeliveryList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[WebhooksDeliveryList]: - """List webhook deliveries + """ List webhook deliveries List webhook deliveries for given endpoint @@ -86,13 +97,15 @@ def sync_detailed( Returns: Response[WebhooksDeliveryList] - """ + """ + kwargs = _get_kwargs( endpoint_id=endpoint_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -101,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( endpoint_id: str, *, @@ -109,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> WebhooksDeliveryList | None: - """List webhook deliveries + """ List webhook deliveries List webhook deliveries for given endpoint @@ -126,16 +139,17 @@ def sync( Returns: WebhooksDeliveryList - """ + """ + return sync_detailed( endpoint_id=endpoint_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( endpoint_id: str, @@ -144,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[WebhooksDeliveryList]: - """List webhook deliveries + """ List webhook deliveries List webhook deliveries for given endpoint @@ -161,20 +176,23 @@ async def asyncio_detailed( Returns: Response[WebhooksDeliveryList] - """ + """ + kwargs = _get_kwargs( endpoint_id=endpoint_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( endpoint_id: str, *, @@ -182,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> WebhooksDeliveryList | None: - """List webhook deliveries + """ List webhook deliveries List webhook deliveries for given endpoint @@ -199,14 +218,14 @@ async def asyncio( Returns: WebhooksDeliveryList - """ - - return ( - await asyncio_detailed( - endpoint_id=endpoint_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + endpoint_id=endpoint_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/__init__.py b/rootly_sdk/api/webhooks_endpoints/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/webhooks_endpoints/__init__.py +++ b/rootly_sdk/api/webhooks_endpoints/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py index cbe5aec3..fe2c5c2d 100644 --- a/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_webhooks_endpoint import NewWebhooksEndpoint from ...models.webhooks_endpoint_response import WebhooksEndpointResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewWebhooksEndpoint, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/webhooks/endpoints", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | WebhooksEndpointResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WebhooksEndpointResponse | None: if response.status_code == 201: response_201 = WebhooksEndpointResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WebhooksEndpointResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksEndpointResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWebhooksEndpoint, + ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """Creates a webhook endpoint + """ Creates a webhook endpoint Creates a new webhook endpoint from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewWebhooksEndpoint, + ) -> ErrorsList | WebhooksEndpointResponse | None: - """Creates a webhook endpoint + """ Creates a webhook endpoint Creates a new webhook endpoint from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | WebhooksEndpointResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewWebhooksEndpoint, + ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """Creates a webhook endpoint + """ Creates a webhook endpoint Creates a new webhook endpoint from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewWebhooksEndpoint, + ) -> ErrorsList | WebhooksEndpointResponse | None: - """Creates a webhook endpoint + """ Creates a webhook endpoint Creates a new webhook endpoint from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | WebhooksEndpointResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py index 080d170b..70cba34f 100644 --- a/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.webhooks_endpoint_response import WebhooksEndpointResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/webhooks/endpoints/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/webhooks/endpoints/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WebhooksEndpointResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WebhooksEndpointResponse | None: if response.status_code == 200: response_200 = WebhooksEndpointResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WebhooksEndpointResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksEndpointResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """Delete a webhook endpoint + """ Delete a webhook endpoint Delete a specific webhook endpoint by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WebhooksEndpointResponse | None: - """Delete a webhook endpoint + """ Delete a webhook endpoint Delete a specific webhook endpoint by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | WebhooksEndpointResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """Delete a webhook endpoint + """ Delete a webhook endpoint Delete a specific webhook endpoint by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WebhooksEndpointResponse | None: - """Delete a webhook endpoint + """ Delete a webhook endpoint Delete a specific webhook endpoint by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | WebhooksEndpointResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py index 548a6545..37cd65aa 100644 --- a/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.webhooks_endpoint_response import WebhooksEndpointResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/webhooks/endpoints/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/webhooks/endpoints/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WebhooksEndpointResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WebhooksEndpointResponse | None: if response.status_code == 200: response_200 = WebhooksEndpointResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WebhooksEndpointResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksEndpointResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """Retrieves a webhook endpoint + """ Retrieves a webhook endpoint Retrieves a specific webhook endpoint by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WebhooksEndpointResponse | None: - """Retrieves a webhook endpoint + """ Retrieves a webhook endpoint Retrieves a specific webhook endpoint by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | WebhooksEndpointResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """Retrieves a webhook endpoint + """ Retrieves a webhook endpoint Retrieves a specific webhook endpoint by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WebhooksEndpointResponse | None: - """Retrieves a webhook endpoint + """ Retrieves a webhook endpoint Retrieves a specific webhook endpoint by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | WebhooksEndpointResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py b/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py index 6db925f4..9578b24e 100644 --- a/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py +++ b/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.webhooks_endpoint_list import WebhooksEndpointList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +21,11 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -30,21 +39,27 @@ def _get_kwargs( params["filter[name]"] = filtername + 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/webhooks/endpoints", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WebhooksEndpointList | None: if response.status_code == 200: response_200 = WebhooksEndpointList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +68,7 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[WebhooksEndpointList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WebhooksEndpointList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,8 +85,9 @@ def sync_detailed( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + ) -> Response[WebhooksEndpointList]: - """List webhook endpoints + """ List webhook endpoints List webhook endpoints @@ -90,14 +104,16 @@ def sync_detailed( Returns: Response[WebhooksEndpointList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, + ) response = client.get_httpx_client().request( @@ -106,7 +122,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -115,8 +130,9 @@ def sync( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + ) -> WebhooksEndpointList | None: - """List webhook endpoints + """ List webhook endpoints List webhook endpoints @@ -133,17 +149,18 @@ def sync( Returns: WebhooksEndpointList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, + ).parsed async def asyncio_detailed( *, @@ -153,8 +170,9 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + ) -> Response[WebhooksEndpointList]: - """List webhook endpoints + """ List webhook endpoints List webhook endpoints @@ -171,21 +189,24 @@ async def asyncio_detailed( Returns: Response[WebhooksEndpointList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -194,8 +215,9 @@ async def asyncio( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, + ) -> WebhooksEndpointList | None: - """List webhook endpoints + """ List webhook endpoints List webhook endpoints @@ -212,15 +234,15 @@ async def asyncio( Returns: WebhooksEndpointList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filterslug=filterslug, - filtername=filtername, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filterslug=filterslug, +filtername=filtername, + + )).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py index e1d1f110..37bef65a 100644 --- a/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_webhooks_endpoint import UpdateWebhooksEndpoint from ...models.webhooks_endpoint_response import WebhooksEndpointResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateWebhooksEndpoint, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/webhooks/endpoints/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/webhooks/endpoints/{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 | WebhooksEndpointResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WebhooksEndpointResponse | None: if response.status_code == 200: response_200 = WebhooksEndpointResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WebhooksEndpointResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksEndpointResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWebhooksEndpoint, + ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """Update a webhook endpoint + """ Update a webhook endpoint Update a specific webhook endpoint by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateWebhooksEndpoint, + ) -> ErrorsList | WebhooksEndpointResponse | None: - """Update a webhook endpoint + """ Update a webhook endpoint Update a specific webhook endpoint by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | WebhooksEndpointResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWebhooksEndpoint, + ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """Update a webhook endpoint + """ Update a webhook endpoint Update a specific webhook endpoint by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWebhooksEndpoint, + ) -> ErrorsList | WebhooksEndpointResponse | None: - """Update a webhook endpoint + """ Update a webhook endpoint Update a specific webhook endpoint by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | WebhooksEndpointResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py new file mode 100644 index 00000000..c9921b5f --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py @@ -0,0 +1 @@ +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..80863b1f --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py @@ -0,0 +1,219 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.errors_list import ErrorsList +from ...models.new_workflow_action_item_form_field_condition import NewWorkflowActionItemFormFieldCondition +from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from typing import cast + + + +def _get_kwargs( + workflow_id: str, + *, + body: NewWorkflowActionItemFormFieldCondition, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "post", + "url": "/v1/workflows/{workflow_id}/action_item_form_field_conditions".format(workflow_id=quote(str(workflow_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 | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + if response.status_code == 201: + response_201 = WorkflowActionItemFormFieldConditionResponse.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 == 403: + response_403 = cast(Any, None) + return response_403 + + 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[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + body: NewWorkflowActionItemFormFieldCondition, + +) -> Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """ Creates a workflow action item form field condition + + Creates a new workflow action item form field condition from provided data + + Args: + workflow_id (str): + body (NewWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns 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 | WorkflowActionItemFormFieldConditionResponse] + """ + + + kwargs = _get_kwargs( + workflow_id=workflow_id, +body=body, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + workflow_id: str, + *, + client: AuthenticatedClient, + body: NewWorkflowActionItemFormFieldCondition, + +) -> Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """ Creates a workflow action item form field condition + + Creates a new workflow action item form field condition from provided data + + Args: + workflow_id (str): + body (NewWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server 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 | WorkflowActionItemFormFieldConditionResponse + """ + + + return sync_detailed( + workflow_id=workflow_id, +client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + body: NewWorkflowActionItemFormFieldCondition, + +) -> Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """ Creates a workflow action item form field condition + + Creates a new workflow action item form field condition from provided data + + Args: + workflow_id (str): + body (NewWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns 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 | WorkflowActionItemFormFieldConditionResponse] + """ + + + kwargs = _get_kwargs( + workflow_id=workflow_id, +body=body, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + workflow_id: str, + *, + client: AuthenticatedClient, + body: NewWorkflowActionItemFormFieldCondition, + +) -> Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """ Creates a workflow action item form field condition + + Creates a new workflow action item form field condition from provided data + + Args: + workflow_id (str): + body (NewWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server 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 | WorkflowActionItemFormFieldConditionResponse + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..fd8560c4 --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py @@ -0,0 +1,187 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.errors_list import ErrorsList +from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from typing import cast + + + +def _get_kwargs( + id: str, + +) -> dict[str, Any]: + + + + + + + _kwargs: dict[str, Any] = { + "method": "delete", + "url": "/v1/workflow_action_item_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + if response.status_code == 200: + response_200 = WorkflowActionItemFormFieldConditionResponse.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 | WorkflowActionItemFormFieldConditionResponse]: + 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 | WorkflowActionItemFormFieldConditionResponse]: + """ Delete a workflow action item form field condition + + Delete a specific workflow action item form field condition 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 | WorkflowActionItemFormFieldConditionResponse] + """ + + + 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 | WorkflowActionItemFormFieldConditionResponse | None: + """ Delete a workflow action item form field condition + + Delete a specific workflow action item form field condition 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 | WorkflowActionItemFormFieldConditionResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """ Delete a workflow action item form field condition + + Delete a specific workflow action item form field condition 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 | WorkflowActionItemFormFieldConditionResponse] + """ + + + 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 | WorkflowActionItemFormFieldConditionResponse | None: + """ Delete a workflow action item form field condition + + Delete a specific workflow action item form field condition 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 | WorkflowActionItemFormFieldConditionResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..abf5d342 --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py @@ -0,0 +1,187 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.errors_list import ErrorsList +from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from typing import cast + + + +def _get_kwargs( + id: str, + +) -> dict[str, Any]: + + + + + + + _kwargs: dict[str, Any] = { + "method": "get", + "url": "/v1/workflow_action_item_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + if response.status_code == 200: + response_200 = WorkflowActionItemFormFieldConditionResponse.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 | WorkflowActionItemFormFieldConditionResponse]: + 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 | WorkflowActionItemFormFieldConditionResponse]: + """ Retrieves a workflow action item form field condition + + Retrieves a specific workflow action item form field condition 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 | WorkflowActionItemFormFieldConditionResponse] + """ + + + 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 | WorkflowActionItemFormFieldConditionResponse | None: + """ Retrieves a workflow action item form field condition + + Retrieves a specific workflow action item form field condition 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 | WorkflowActionItemFormFieldConditionResponse + """ + + + return sync_detailed( + id=id, +client=client, + + ).parsed + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """ Retrieves a workflow action item form field condition + + Retrieves a specific workflow action item form field condition 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 | WorkflowActionItemFormFieldConditionResponse] + """ + + + 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 | WorkflowActionItemFormFieldConditionResponse | None: + """ Retrieves a workflow action item form field condition + + Retrieves a specific workflow action item form field condition 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 | WorkflowActionItemFormFieldConditionResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py new file mode 100644 index 00000000..b26c709c --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py @@ -0,0 +1,231 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.workflow_action_item_form_field_condition_list import WorkflowActionItemFormFieldConditionList +from ...types import UNSET, Unset +from typing import cast + + + +def _get_kwargs( + workflow_id: str, + *, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + +) -> dict[str, Any]: + + + + + params: dict[str, Any] = {} + + params["include"] = include + + 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/workflows/{workflow_id}/action_item_form_field_conditions".format(workflow_id=quote(str(workflow_id), safe=""),), + "params": params, + } + + + return _kwargs + + + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowActionItemFormFieldConditionList | None: + if response.status_code == 200: + response_200 = WorkflowActionItemFormFieldConditionList.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[WorkflowActionItemFormFieldConditionList]: + return Response( + status_code=HTTPStatus(response.status_code), + content=response.content, + headers=response.headers, + parsed=_parse_response(client=client, response=response), + ) + + +def sync_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + +) -> Response[WorkflowActionItemFormFieldConditionList]: + """ List workflow action item form field conditions + + List workflow action item form field conditions + + Args: + workflow_id (str): + 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. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[WorkflowActionItemFormFieldConditionList] + """ + + + kwargs = _get_kwargs( + workflow_id=workflow_id, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + ) + + response = client.get_httpx_client().request( + **kwargs, + ) + + return _build_response(client=client, response=response) + +def sync( + workflow_id: str, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + +) -> WorkflowActionItemFormFieldConditionList | None: + """ List workflow action item form field conditions + + List workflow action item form field conditions + + Args: + workflow_id (str): + 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. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + WorkflowActionItemFormFieldConditionList + """ + + + return sync_detailed( + workflow_id=workflow_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + ).parsed + +async def asyncio_detailed( + workflow_id: str, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + +) -> Response[WorkflowActionItemFormFieldConditionList]: + """ List workflow action item form field conditions + + List workflow action item form field conditions + + Args: + workflow_id (str): + 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. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + Response[WorkflowActionItemFormFieldConditionList] + """ + + + kwargs = _get_kwargs( + workflow_id=workflow_id, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + ) + + response = await client.get_async_httpx_client().request( + **kwargs + ) + + return _build_response(client=client, response=response) + +async def asyncio( + workflow_id: str, + *, + client: AuthenticatedClient, + include: str | Unset = UNSET, + pagenumber: int | Unset = UNSET, + pagesize: int | Unset = UNSET, + +) -> WorkflowActionItemFormFieldConditionList | None: + """ List workflow action item form field conditions + + List workflow action item form field conditions + + Args: + workflow_id (str): + 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. + httpx.TimeoutException: If the request takes longer than Client.timeout. + + Returns: + WorkflowActionItemFormFieldConditionList + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..855c00b7 --- /dev/null +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py @@ -0,0 +1,208 @@ +from http import HTTPStatus +from typing import Any, cast +from urllib.parse import quote + +import httpx + +from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.errors_list import ErrorsList +from ...models.update_workflow_action_item_form_field_condition import UpdateWorkflowActionItemFormFieldCondition +from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from typing import cast + + + +def _get_kwargs( + id: str, + *, + body: UpdateWorkflowActionItemFormFieldCondition, + +) -> dict[str, Any]: + headers: dict[str, Any] = {} + + + + + + + _kwargs: dict[str, Any] = { + "method": "put", + "url": "/v1/workflow_action_item_form_field_conditions/{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 | WorkflowActionItemFormFieldConditionResponse | None: + if response.status_code == 200: + response_200 = WorkflowActionItemFormFieldConditionResponse.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 | WorkflowActionItemFormFieldConditionResponse]: + 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: UpdateWorkflowActionItemFormFieldCondition, + +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """ Update a workflow action item form field condition + + Update a specific workflow action item form field condition by id + + Args: + id (str): + body (UpdateWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns 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 | WorkflowActionItemFormFieldConditionResponse] + """ + + + 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: UpdateWorkflowActionItemFormFieldCondition, + +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """ Update a workflow action item form field condition + + Update a specific workflow action item form field condition by id + + Args: + id (str): + body (UpdateWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server 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 | WorkflowActionItemFormFieldConditionResponse + """ + + + return sync_detailed( + id=id, +client=client, +body=body, + + ).parsed + +async def asyncio_detailed( + id: str, + *, + client: AuthenticatedClient, + body: UpdateWorkflowActionItemFormFieldCondition, + +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: + """ Update a workflow action item form field condition + + Update a specific workflow action item form field condition by id + + Args: + id (str): + body (UpdateWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server returns 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 | WorkflowActionItemFormFieldConditionResponse] + """ + + + 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: UpdateWorkflowActionItemFormFieldCondition, + +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: + """ Update a workflow action item form field condition + + Update a specific workflow action item form field condition by id + + Args: + id (str): + body (UpdateWorkflowActionItemFormFieldCondition): + + Raises: + errors.UnexpectedStatus: If the server 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 | WorkflowActionItemFormFieldConditionResponse + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflow_form_field_conditions/__init__.py b/rootly_sdk/api/workflow_form_field_conditions/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/workflow_form_field_conditions/__init__.py +++ b/rootly_sdk/api/workflow_form_field_conditions/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ 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 66473fdd..85344529 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_workflow_form_field_condition import NewWorkflowFormFieldCondition from ...models.workflow_form_field_condition_response import WorkflowFormFieldConditionResponse -from ...types import Response +from typing import cast + def _get_kwargs( workflow_id: str, *, body: NewWorkflowFormFieldCondition, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/workflows/{workflow_id}/form_field_conditions".format( - workflow_id=quote(str(workflow_id), safe=""), - ), + "url": "/v1/workflows/{workflow_id}/form_field_conditions".format(workflow_id=quote(str(workflow_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 | WorkflowFormFieldConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowFormFieldConditionResponse | None: if response.status_code == 201: response_201 = WorkflowFormFieldConditionResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowFormFieldCondition, + ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """Creates a workflow form field condition + """ Creates a workflow form field condition Creates a new workflow form field condition from provided data @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowFormFieldCondition, + ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """Creates a workflow form field condition + """ Creates a workflow form field condition Creates a new workflow form field condition from provided data @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ + """ + return sync_detailed( workflow_id=workflow_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowFormFieldCondition, + ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """Creates a workflow form field condition + """ Creates a workflow form field condition Creates a new workflow form field condition from provided data @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowFormFieldCondition, + ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """Creates a workflow form field condition + """ Creates a workflow form field condition Creates a new workflow form field condition from provided data @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +body=body, + + )).parsed 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 c0bdb34a..4aa474f5 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.workflow_form_field_condition_response import WorkflowFormFieldConditionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflow_form_field_conditions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowFormFieldConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowFormFieldConditionResponse | None: if response.status_code == 200: response_200 = WorkflowFormFieldConditionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """Delete a workflow_form field condition + """ Delete a workflow_form field condition Delete a specific workflow form field condition by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """Delete a workflow_form field condition + """ Delete a workflow_form field condition Delete a specific workflow form field condition by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """Delete a workflow_form field condition + """ Delete a workflow_form field condition Delete a specific workflow form field condition by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """Delete a workflow_form field condition + """ Delete a workflow_form field condition Delete a specific workflow form field condition by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 9e3dbac4..031fe6a4 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,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.workflow_form_field_condition_response import WorkflowFormFieldConditionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/workflow_form_field_conditions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowFormFieldConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowFormFieldConditionResponse | None: if response.status_code == 200: response_200 = WorkflowFormFieldConditionResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """Retrieves a workflow form field condition + """ Retrieves a workflow form field condition Retrieves a specific workflow form field condition by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """Retrieves a workflow form field condition + """ Retrieves a workflow form field condition Retrieves a specific workflow form field condition by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """Retrieves a workflow form field condition + """ Retrieves a workflow form field condition Retrieves a specific workflow form field condition by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """Retrieves a workflow form field condition + """ Retrieves a workflow form field condition Retrieves a specific workflow form field condition by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed 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 2bca4f9a..6cf64c6e 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,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.workflow_form_field_condition_list import WorkflowFormFieldConditionList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -16,7 +20,11 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -26,25 +34,27 @@ def _get_kwargs( 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/workflows/{workflow_id}/form_field_conditions".format( - workflow_id=quote(str(workflow_id), safe=""), - ), + "url": "/v1/workflows/{workflow_id}/form_field_conditions".format(workflow_id=quote(str(workflow_id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> WorkflowFormFieldConditionList | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowFormFieldConditionList | None: if response.status_code == 200: response_200 = WorkflowFormFieldConditionList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -53,9 +63,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[WorkflowFormFieldConditionList]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WorkflowFormFieldConditionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -71,8 +79,9 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[WorkflowFormFieldConditionList]: - """List workflow form field conditions + """ List workflow form field conditions List workflow form field conditions @@ -88,13 +97,15 @@ def sync_detailed( Returns: Response[WorkflowFormFieldConditionList] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) response = client.get_httpx_client().request( @@ -103,7 +114,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( workflow_id: str, *, @@ -111,8 +121,9 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> WorkflowFormFieldConditionList | None: - """List workflow form field conditions + """ List workflow form field conditions List workflow form field conditions @@ -128,16 +139,17 @@ def sync( Returns: WorkflowFormFieldConditionList - """ + """ + return sync_detailed( workflow_id=workflow_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ).parsed async def asyncio_detailed( workflow_id: str, @@ -146,8 +158,9 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> Response[WorkflowFormFieldConditionList]: - """List workflow form field conditions + """ List workflow form field conditions List workflow form field conditions @@ -163,20 +176,23 @@ async def asyncio_detailed( Returns: Response[WorkflowFormFieldConditionList] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( workflow_id: str, *, @@ -184,8 +200,9 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, + ) -> WorkflowFormFieldConditionList | None: - """List workflow form field conditions + """ List workflow form field conditions List workflow form field conditions @@ -201,14 +218,14 @@ async def asyncio( Returns: WorkflowFormFieldConditionList - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - ) - ).parsed + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, + + )).parsed 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 0ba30270..71981e17 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,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_workflow_form_field_condition import UpdateWorkflowFormFieldCondition from ...models.workflow_form_field_condition_response import WorkflowFormFieldConditionResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateWorkflowFormFieldCondition, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflow_form_field_conditions/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_form_field_conditions/{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 | WorkflowFormFieldConditionResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowFormFieldConditionResponse | None: if response.status_code == 200: response_200 = WorkflowFormFieldConditionResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflowFormFieldCondition, + ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """Update a workflow form field condition + """ Update a workflow form field condition Update a specific workflow form field condition by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowFormFieldCondition, + ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """Update a workflow form field condition + """ Update a workflow form field condition Update a specific workflow form field condition by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowFormFieldCondition, + ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """Update a workflow form field condition + """ Update a workflow form field condition Update a specific workflow form field condition by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowFormFieldCondition, + ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """Update a workflow form field condition + """ Update a workflow form field condition Update a specific workflow form field condition by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflow_groups/__init__.py b/rootly_sdk/api/workflow_groups/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/workflow_groups/__init__.py +++ b/rootly_sdk/api/workflow_groups/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/workflow_groups/create_workflow_group.py b/rootly_sdk/api/workflow_groups/create_workflow_group.py index 33784b56..e0f7f977 100644 --- a/rootly_sdk/api/workflow_groups/create_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/create_workflow_group.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_workflow_group import NewWorkflowGroup from ...models.workflow_group_response import WorkflowGroupResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewWorkflowGroup, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/workflow_groups", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | WorkflowGroupResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowGroupResponse | None: if response.status_code == 201: response_201 = WorkflowGroupResponse.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: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowGroupResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowGroup, + ) -> Response[ErrorsList | WorkflowGroupResponse]: - """Creates a workflow group + """ Creates a workflow group Creates a new workflow group from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewWorkflowGroup, + ) -> ErrorsList | WorkflowGroupResponse | None: - """Creates a workflow group + """ Creates a workflow group Creates a new workflow group from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | WorkflowGroupResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewWorkflowGroup, + ) -> Response[ErrorsList | WorkflowGroupResponse]: - """Creates a workflow group + """ Creates a workflow group Creates a new workflow group from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewWorkflowGroup, + ) -> ErrorsList | WorkflowGroupResponse | None: - """Creates a workflow group + """ Creates a workflow group Creates a new workflow group from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | WorkflowGroupResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflow_groups/delete_workflow_group.py b/rootly_sdk/api/workflow_groups/delete_workflow_group.py index 46a16891..ad4490fb 100644 --- a/rootly_sdk/api/workflow_groups/delete_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/delete_workflow_group.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.workflow_group_response import WorkflowGroupResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflow_groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_groups/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowGroupResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowGroupResponse | None: if response.status_code == 200: response_200 = WorkflowGroupResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowGroupResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowGroupResponse]: - """Delete a workflow_group + """ Delete a workflow_group Delete a specific workflow group by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowGroupResponse | None: - """Delete a workflow_group + """ Delete a workflow_group Delete a specific workflow group by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | WorkflowGroupResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowGroupResponse]: - """Delete a workflow_group + """ Delete a workflow_group Delete a specific workflow group by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowGroupResponse | None: - """Delete a workflow_group + """ Delete a workflow_group Delete a specific workflow group by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | WorkflowGroupResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/workflow_groups/get_workflow_group.py b/rootly_sdk/api/workflow_groups/get_workflow_group.py index 2484f46b..cb60e2af 100644 --- a/rootly_sdk/api/workflow_groups/get_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/get_workflow_group.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.workflow_group_response import WorkflowGroupResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/workflow_groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_groups/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowGroupResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowGroupResponse | None: if response.status_code == 200: response_200 = WorkflowGroupResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowGroupResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowGroupResponse]: - """Retrieves a workflow group + """ Retrieves a workflow group Retrieves a specific workflow group by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowGroupResponse | None: - """Retrieves a workflow group + """ Retrieves a workflow group Retrieves a specific workflow group by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | WorkflowGroupResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowGroupResponse]: - """Retrieves a workflow group + """ Retrieves a workflow group Retrieves a specific workflow group by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowGroupResponse | None: - """Retrieves a workflow group + """ Retrieves a workflow group Retrieves a specific workflow group by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | WorkflowGroupResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/workflow_groups/list_workflow_groups.py b/rootly_sdk/api/workflow_groups/list_workflow_groups.py index 4a20aac8..dd8eda5e 100644 --- a/rootly_sdk/api/workflow_groups/list_workflow_groups.py +++ b/rootly_sdk/api/workflow_groups/list_workflow_groups.py @@ -1,12 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.workflow_group_list import WorkflowGroupList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -20,7 +25,11 @@ def _get_kwargs( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -42,21 +51,27 @@ def _get_kwargs( params["filter[position]"] = filterposition + 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/workflow_groups", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowGroupList | None: if response.status_code == 200: response_200 = WorkflowGroupList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -86,8 +101,9 @@ def sync_detailed( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, + ) -> Response[WorkflowGroupList]: - """List workflow groups + """ List workflow groups List workflow groups @@ -108,18 +124,20 @@ def sync_detailed( Returns: Response[WorkflowGroupList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filterkind=filterkind, - filterexpanded=filterexpanded, - filterposition=filterposition, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filterkind=filterkind, +filterexpanded=filterexpanded, +filterposition=filterposition, + ) response = client.get_httpx_client().request( @@ -128,7 +146,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -141,8 +158,9 @@ def sync( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, + ) -> WorkflowGroupList | None: - """List workflow groups + """ List workflow groups List workflow groups @@ -163,21 +181,22 @@ def sync( Returns: WorkflowGroupList - """ + """ + return sync_detailed( client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filterkind=filterkind, - filterexpanded=filterexpanded, - filterposition=filterposition, - ).parsed +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filterkind=filterkind, +filterexpanded=filterexpanded, +filterposition=filterposition, + ).parsed async def asyncio_detailed( *, @@ -191,8 +210,9 @@ async def asyncio_detailed( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, + ) -> Response[WorkflowGroupList]: - """List workflow groups + """ List workflow groups List workflow groups @@ -213,25 +233,28 @@ async def asyncio_detailed( Returns: Response[WorkflowGroupList] - """ + """ + kwargs = _get_kwargs( include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filterkind=filterkind, - filterexpanded=filterexpanded, - filterposition=filterposition, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filterkind=filterkind, +filterexpanded=filterexpanded, +filterposition=filterposition, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -244,8 +267,9 @@ async def asyncio( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, + ) -> WorkflowGroupList | None: - """List workflow groups + """ List workflow groups List workflow groups @@ -266,19 +290,19 @@ async def asyncio( Returns: WorkflowGroupList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filterkind=filterkind, - filterexpanded=filterexpanded, - filterposition=filterposition, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filterkind=filterkind, +filterexpanded=filterexpanded, +filterposition=filterposition, + + )).parsed diff --git a/rootly_sdk/api/workflow_groups/update_workflow_group.py b/rootly_sdk/api/workflow_groups/update_workflow_group.py index f1922d9a..1e5f71eb 100644 --- a/rootly_sdk/api/workflow_groups/update_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/update_workflow_group.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_workflow_group import UpdateWorkflowGroup from ...models.workflow_group_response import WorkflowGroupResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateWorkflowGroup, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflow_groups/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_groups/{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 | WorkflowGroupResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowGroupResponse | None: if response.status_code == 200: response_200 = WorkflowGroupResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowGroupResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflowGroup, + ) -> Response[ErrorsList | WorkflowGroupResponse]: - """Update a workflow group + """ Update a workflow group Update a specific workflow group by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowGroup, + ) -> ErrorsList | WorkflowGroupResponse | None: - """Update a workflow group + """ Update a workflow group Update a specific workflow group by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | WorkflowGroupResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowGroup, + ) -> Response[ErrorsList | WorkflowGroupResponse]: - """Update a workflow group + """ Update a workflow group Update a specific workflow group by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowGroup, + ) -> ErrorsList | WorkflowGroupResponse | None: - """Update a workflow group + """ Update a workflow group Update a specific workflow group by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | WorkflowGroupResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflow_runs/__init__.py b/rootly_sdk/api/workflow_runs/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/workflow_runs/__init__.py +++ b/rootly_sdk/api/workflow_runs/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/workflow_runs/create_workflow_run.py b/rootly_sdk/api/workflow_runs/create_workflow_run.py index 70d53a0f..20aee5b5 100644 --- a/rootly_sdk/api/workflow_runs/create_workflow_run.py +++ b/rootly_sdk/api/workflow_runs/create_workflow_run.py @@ -1,55 +1,68 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_workflow_run import NewWorkflowRun from ...models.workflow_run_response import WorkflowRunResponse -from ...types import Response +from typing import cast + def _get_kwargs( workflow_id: str, *, body: NewWorkflowRun, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/workflows/{workflow_id}/workflow_runs".format( - workflow_id=quote(str(workflow_id), safe=""), - ), + "url": "/v1/workflows/{workflow_id}/workflow_runs".format(workflow_id=quote(str(workflow_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 | WorkflowRunResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowRunResponse | None: if response.status_code == 201: response_201 = WorkflowRunResponse.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: @@ -58,9 +71,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowRunResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowRunResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,8 +85,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowRun, + ) -> Response[ErrorsList | WorkflowRunResponse]: - """Creates a workflow run + """ Creates a workflow run Creates a new workflow run from provided data @@ -89,11 +101,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowRunResponse] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -102,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowRun, + ) -> ErrorsList | WorkflowRunResponse | None: - """Creates a workflow run + """ Creates a workflow run Creates a new workflow run from provided data @@ -123,22 +137,24 @@ def sync( Returns: ErrorsList | WorkflowRunResponse - """ + """ + return sync_detailed( workflow_id=workflow_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowRun, + ) -> Response[ErrorsList | WorkflowRunResponse]: - """Creates a workflow run + """ Creates a workflow run Creates a new workflow run from provided data @@ -152,25 +168,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowRunResponse] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowRun, + ) -> ErrorsList | WorkflowRunResponse | None: - """Creates a workflow run + """ Creates a workflow run Creates a new workflow run from provided data @@ -184,12 +204,12 @@ async def asyncio( Returns: ErrorsList | WorkflowRunResponse - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflow_runs/list_workflow_runs.py b/rootly_sdk/api/workflow_runs/list_workflow_runs.py index 236adc68..de37d060 100644 --- a/rootly_sdk/api/workflow_runs/list_workflow_runs.py +++ b/rootly_sdk/api/workflow_runs/list_workflow_runs.py @@ -1,14 +1,19 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.list_workflow_runs_include import check_list_workflow_runs_include from ...models.list_workflow_runs_include import ListWorkflowRunsInclude from ...models.workflow_runs_list import WorkflowRunsList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -21,7 +26,11 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -43,23 +52,27 @@ def _get_kwargs( 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/workflows/{workflow_id}/workflow_runs".format( - workflow_id=quote(str(workflow_id), safe=""), - ), + "url": "/v1/workflows/{workflow_id}/workflow_runs".format(workflow_id=quote(str(workflow_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowRunsList | None: if response.status_code == 200: response_200 = WorkflowRunsList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -88,8 +101,9 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[WorkflowRunsList]: - """List workflow runs + """ List workflow runs List workflow runs @@ -109,17 +123,19 @@ def sync_detailed( Returns: Response[WorkflowRunsList] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ) response = client.get_httpx_client().request( @@ -128,7 +144,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( workflow_id: str, *, @@ -140,8 +155,9 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> WorkflowRunsList | None: - """List workflow runs + """ List workflow runs List workflow runs @@ -161,20 +177,21 @@ def sync( Returns: WorkflowRunsList - """ + """ + return sync_detailed( workflow_id=workflow_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + ).parsed async def asyncio_detailed( workflow_id: str, @@ -187,8 +204,9 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> Response[WorkflowRunsList]: - """List workflow runs + """ List workflow runs List workflow runs @@ -208,24 +226,27 @@ async def asyncio_detailed( Returns: Response[WorkflowRunsList] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +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) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( workflow_id: str, *, @@ -237,8 +258,9 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + ) -> WorkflowRunsList | None: - """List workflow runs + """ List workflow runs List workflow runs @@ -258,18 +280,18 @@ async def asyncio( Returns: WorkflowRunsList - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, + + )).parsed diff --git a/rootly_sdk/api/workflow_tasks/__init__.py b/rootly_sdk/api/workflow_tasks/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/workflow_tasks/__init__.py +++ b/rootly_sdk/api/workflow_tasks/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/workflow_tasks/create_workflow_task.py b/rootly_sdk/api/workflow_tasks/create_workflow_task.py index cc51608f..25d67f11 100644 --- a/rootly_sdk/api/workflow_tasks/create_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/create_workflow_task.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_workflow_task import NewWorkflowTask from ...models.workflow_task_response import WorkflowTaskResponse -from ...types import Response +from typing import cast + def _get_kwargs( workflow_id: str, *, body: NewWorkflowTask, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/workflows/{workflow_id}/workflow_tasks".format( - workflow_id=quote(str(workflow_id), safe=""), - ), + "url": "/v1/workflows/{workflow_id}/workflow_tasks".format(workflow_id=quote(str(workflow_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 | WorkflowTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowTaskResponse | None: if response.status_code == 201: response_201 = WorkflowTaskResponse.from_dict(response.json()) + + return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) + + return response_401 if client.raise_on_unexpected_status: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowTask, + ) -> Response[ErrorsList | WorkflowTaskResponse]: - """Creates a workflow task + """ Creates a workflow task Creates a new workflow task from provided data @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowTask, + ) -> ErrorsList | WorkflowTaskResponse | None: - """Creates a workflow task + """ Creates a workflow task Creates a new workflow task from provided data @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | WorkflowTaskResponse - """ + """ + return sync_detailed( workflow_id=workflow_id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowTask, + ) -> Response[ErrorsList | WorkflowTaskResponse]: - """Creates a workflow task + """ Creates a workflow task Creates a new workflow task from provided data @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowTask, + ) -> ErrorsList | WorkflowTaskResponse | None: - """Creates a workflow task + """ Creates a workflow task Creates a new workflow task from provided data @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | WorkflowTaskResponse - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflow_tasks/delete_workflow_task.py b/rootly_sdk/api/workflow_tasks/delete_workflow_task.py index 5c119fa1..9dc65cc7 100644 --- a/rootly_sdk/api/workflow_tasks/delete_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/delete_workflow_task.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.workflow_task_response import WorkflowTaskResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflow_tasks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_tasks/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowTaskResponse | None: if response.status_code == 200: response_200 = WorkflowTaskResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowTaskResponse]: - """Delete a workflow task + """ Delete a workflow task Delete a specific workflow task by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowTaskResponse | None: - """Delete a workflow task + """ Delete a workflow task Delete a specific workflow task by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | WorkflowTaskResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowTaskResponse]: - """Delete a workflow task + """ Delete a workflow task Delete a specific workflow task by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowTaskResponse | None: - """Delete a workflow task + """ Delete a workflow task Delete a specific workflow task by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | WorkflowTaskResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/workflow_tasks/get_workflow_task.py b/rootly_sdk/api/workflow_tasks/get_workflow_task.py index d2ceba25..9306c592 100644 --- a/rootly_sdk/api/workflow_tasks/get_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/get_workflow_task.py @@ -1,41 +1,52 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.workflow_task_response import WorkflowTaskResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/workflow_tasks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_tasks/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowTaskResponse | None: if response.status_code == 200: response_200 = WorkflowTaskResponse.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: @@ -44,9 +55,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -59,8 +68,9 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowTaskResponse]: - """Retrieves a workflow task + """ Retrieves a workflow task Retrieves a specific workflow_task by id @@ -73,10 +83,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -85,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowTaskResponse | None: - """Retrieves a workflow task + """ Retrieves a workflow task Retrieves a specific workflow_task by id @@ -104,20 +116,22 @@ def sync( Returns: ErrorsList | WorkflowTaskResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowTaskResponse]: - """Retrieves a workflow task + """ Retrieves a workflow task Retrieves a specific workflow_task by id @@ -130,23 +144,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowTaskResponse | None: - """Retrieves a workflow task + """ Retrieves a workflow task Retrieves a specific workflow_task by id @@ -159,11 +177,11 @@ async def asyncio( Returns: ErrorsList | WorkflowTaskResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py index dad27df0..8fd1ce0b 100644 --- a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py +++ b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py @@ -1,13 +1,17 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.workflow_task_list import WorkflowTaskList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -19,7 +23,19 @@ def _get_kwargs( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -35,23 +51,43 @@ def _get_kwargs( params["filter[slug]"] = filterslug + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + 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/workflows/{workflow_id}/workflow_tasks".format( - workflow_id=quote(str(workflow_id), safe=""), - ), + "url": "/v1/workflows/{workflow_id}/workflow_tasks".format(workflow_id=quote(str(workflow_id), safe=""),), "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowTaskList | None: if response.status_code == 200: response_200 = WorkflowTaskList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -79,8 +115,17 @@ def sync_detailed( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + ) -> Response[WorkflowTaskList]: - """List workflow tasks + """ List workflow tasks List workflow tasks @@ -92,6 +137,14 @@ def sync_detailed( filtersearch (str | Unset): filtername (str | Unset): filterslug (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -99,16 +152,26 @@ def sync_detailed( Returns: Response[WorkflowTaskList] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, + ) response = client.get_httpx_client().request( @@ -117,7 +180,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( workflow_id: str, *, @@ -128,8 +190,17 @@ def sync( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + ) -> WorkflowTaskList | None: - """List workflow tasks + """ List workflow tasks List workflow tasks @@ -141,6 +212,14 @@ def sync( filtersearch (str | Unset): filtername (str | Unset): filterslug (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -148,19 +227,28 @@ def sync( Returns: WorkflowTaskList - """ + """ + return sync_detailed( workflow_id=workflow_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - ).parsed +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, + ).parsed async def asyncio_detailed( workflow_id: str, @@ -172,8 +260,17 @@ async def asyncio_detailed( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + ) -> Response[WorkflowTaskList]: - """List workflow tasks + """ List workflow tasks List workflow tasks @@ -185,6 +282,14 @@ async def asyncio_detailed( filtersearch (str | Unset): filtername (str | Unset): filterslug (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -192,23 +297,34 @@ async def asyncio_detailed( Returns: Response[WorkflowTaskList] - """ + """ + kwargs = _get_kwargs( workflow_id=workflow_id, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( workflow_id: str, *, @@ -219,8 +335,17 @@ async def asyncio( filtersearch: str | Unset = UNSET, filtername: str | Unset = UNSET, filterslug: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + ) -> WorkflowTaskList | None: - """List workflow tasks + """ List workflow tasks List workflow tasks @@ -232,6 +357,14 @@ async def asyncio( filtersearch (str | Unset): filtername (str | Unset): filterslug (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -239,17 +372,25 @@ async def asyncio( Returns: WorkflowTaskList - """ - - return ( - await asyncio_detailed( - workflow_id=workflow_id, - client=client, - include=include, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - ) - ).parsed + """ + + + return (await asyncio_detailed( + workflow_id=workflow_id, +client=client, +include=include, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, + + )).parsed diff --git a/rootly_sdk/api/workflow_tasks/update_workflow_task.py b/rootly_sdk/api/workflow_tasks/update_workflow_task.py index 3b045b86..0bea4d44 100644 --- a/rootly_sdk/api/workflow_tasks/update_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/update_workflow_task.py @@ -1,50 +1,61 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_workflow_task import UpdateWorkflowTask from ...models.workflow_task_response import WorkflowTaskResponse -from ...types import Response +from typing import cast + def _get_kwargs( id: str, *, body: UpdateWorkflowTask, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflow_tasks/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflow_tasks/{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 | WorkflowTaskResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowTaskResponse | None: if response.status_code == 200: response_200 = WorkflowTaskResponse.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: @@ -53,9 +64,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowTaskResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +78,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflowTask, + ) -> Response[ErrorsList | WorkflowTaskResponse]: - """Update a workflow task + """ Update a workflow task Update a specific workflow task by id @@ -84,11 +94,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -97,14 +109,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowTask, + ) -> ErrorsList | WorkflowTaskResponse | None: - """Update a workflow task + """ Update a workflow task Update a specific workflow task by id @@ -118,22 +130,24 @@ def sync( Returns: ErrorsList | WorkflowTaskResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowTask, + ) -> Response[ErrorsList | WorkflowTaskResponse]: - """Update a workflow task + """ Update a workflow task Update a specific workflow task by id @@ -147,25 +161,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowTask, + ) -> ErrorsList | WorkflowTaskResponse | None: - """Update a workflow task + """ Update a workflow task Update a specific workflow task by id @@ -179,12 +197,12 @@ async def asyncio( Returns: ErrorsList | WorkflowTaskResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflows/__init__.py b/rootly_sdk/api/workflows/__init__.py index 2d7c0b23..c9921b5f 100644 --- a/rootly_sdk/api/workflows/__init__.py +++ b/rootly_sdk/api/workflows/__init__.py @@ -1 +1 @@ -"""Contains endpoint functions for accessing the API""" +""" Contains endpoint functions for accessing the API """ diff --git a/rootly_sdk/api/workflows/create_workflow.py b/rootly_sdk/api/workflows/create_workflow.py index 2db8a745..3bf862af 100644 --- a/rootly_sdk/api/workflows/create_workflow.py +++ b/rootly_sdk/api/workflows/create_workflow.py @@ -1,22 +1,32 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.new_workflow import NewWorkflow from ...models.workflow_response import WorkflowResponse -from ...types import Response +from typing import cast + def _get_kwargs( *, body: NewWorkflow, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/workflows", @@ -24,28 +34,34 @@ def _get_kwargs( _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 | WorkflowResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowResponse | None: if response.status_code == 201: response_201 = WorkflowResponse.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 == 403: response_403 = ErrorsList.from_dict(response.json()) + + return response_403 if client.raise_on_unexpected_status: @@ -54,9 +70,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -69,8 +83,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflow, + ) -> Response[ErrorsList | WorkflowResponse]: - """Creates a workflow + """ Creates a workflow Creates a new workflow from provided data @@ -83,10 +98,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) response = client.get_httpx_client().request( @@ -95,13 +112,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, body: NewWorkflow, + ) -> ErrorsList | WorkflowResponse | None: - """Creates a workflow + """ Creates a workflow Creates a new workflow from provided data @@ -114,20 +131,22 @@ def sync( Returns: ErrorsList | WorkflowResponse - """ + """ + return sync_detailed( client=client, - body=body, - ).parsed +body=body, + ).parsed async def asyncio_detailed( *, client: AuthenticatedClient, body: NewWorkflow, + ) -> Response[ErrorsList | WorkflowResponse]: - """Creates a workflow + """ Creates a workflow Creates a new workflow from provided data @@ -140,23 +159,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ + """ + kwargs = _get_kwargs( body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, body: NewWorkflow, + ) -> ErrorsList | WorkflowResponse | None: - """Creates a workflow + """ Creates a workflow Creates a new workflow from provided data @@ -169,11 +192,11 @@ async def asyncio( Returns: ErrorsList | WorkflowResponse - """ + """ - return ( - await asyncio_detailed( - client=client, - body=body, - ) - ).parsed + + return (await asyncio_detailed( + client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/api/workflows/delete_workflow.py b/rootly_sdk/api/workflows/delete_workflow.py index c407da66..c8e84977 100644 --- a/rootly_sdk/api/workflows/delete_workflow.py +++ b/rootly_sdk/api/workflows/delete_workflow.py @@ -1,42 +1,53 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.workflow_response import WorkflowResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, + ) -> dict[str, Any]: + + + + + _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflows/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflows/{id}".format(id=quote(str(id), safe=""),), } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowResponse | None: if response.status_code == 200: response_200 = WorkflowResponse.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: @@ -45,9 +56,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -60,8 +69,9 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowResponse]: - """Delete a workflow + """ Delete a workflow Delete a specific workflow by id @@ -74,10 +84,12 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) response = client.get_httpx_client().request( @@ -86,13 +98,13 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowResponse | None: - """Delete a workflow + """ Delete a workflow Delete a specific workflow by id @@ -105,20 +117,22 @@ def sync( Returns: ErrorsList | WorkflowResponse - """ + """ + return sync_detailed( id=id, - client=client, - ).parsed +client=client, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, + ) -> Response[ErrorsList | WorkflowResponse]: - """Delete a workflow + """ Delete a workflow Delete a specific workflow by id @@ -131,23 +145,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ + """ + kwargs = _get_kwargs( id=id, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, + ) -> ErrorsList | WorkflowResponse | None: - """Delete a workflow + """ Delete a workflow Delete a specific workflow by id @@ -160,11 +178,11 @@ async def asyncio( Returns: ErrorsList | WorkflowResponse - """ + """ - return ( - await asyncio_detailed( - id=id, - client=client, - ) - ).parsed + + return (await asyncio_detailed( + id=id, +client=client, + + )).parsed diff --git a/rootly_sdk/api/workflows/get_workflow.py b/rootly_sdk/api/workflows/get_workflow.py index 905edf81..8b50481c 100644 --- a/rootly_sdk/api/workflows/get_workflow.py +++ b/rootly_sdk/api/workflows/get_workflow.py @@ -1,23 +1,32 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList +from ...models.get_workflow_include import check_get_workflow_include from ...models.get_workflow_include import GetWorkflowInclude from ...models.workflow_response import WorkflowResponse -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, include: GetWorkflowInclude | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -27,30 +36,34 @@ def _get_kwargs( params["include"] = json_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/workflows/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflows/{id}".format(id=quote(str(id), safe=""),), "params": params, } + return _kwargs -def _parse_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> ErrorsList | WorkflowResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowResponse | None: if response.status_code == 200: response_200 = WorkflowResponse.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: @@ -59,9 +72,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +86,9 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetWorkflowInclude | Unset = UNSET, + ) -> Response[ErrorsList | WorkflowResponse]: - """Retrieves a workflow + """ Retrieves a workflow Retrieves a specific workflow by id @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetWorkflowInclude | Unset = UNSET, + ) -> ErrorsList | WorkflowResponse | None: - """Retrieves a workflow + """ Retrieves a workflow Retrieves a specific workflow by id @@ -124,22 +138,24 @@ def sync( Returns: ErrorsList | WorkflowResponse - """ + """ + return sync_detailed( id=id, - client=client, - include=include, - ).parsed +client=client, +include=include, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetWorkflowInclude | Unset = UNSET, + ) -> Response[ErrorsList | WorkflowResponse]: - """Retrieves a workflow + """ Retrieves a workflow Retrieves a specific workflow by id @@ -153,25 +169,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ + """ + kwargs = _get_kwargs( id=id, - include=include, +include=include, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetWorkflowInclude | Unset = UNSET, + ) -> ErrorsList | WorkflowResponse | None: - """Retrieves a workflow + """ Retrieves a workflow Retrieves a specific workflow by id @@ -185,12 +205,12 @@ async def asyncio( Returns: ErrorsList | WorkflowResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - include=include, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +include=include, + + )).parsed diff --git a/rootly_sdk/api/workflows/list_workflows.py b/rootly_sdk/api/workflows/list_workflows.py index 3d12f3de..5429b215 100644 --- a/rootly_sdk/api/workflows/list_workflows.py +++ b/rootly_sdk/api/workflows/list_workflows.py @@ -1,14 +1,21 @@ from http import HTTPStatus -from typing import Any +from typing import Any, cast +from urllib.parse import quote import httpx -from ... import errors from ...client import AuthenticatedClient, Client +from ...types import Response, UNSET +from ... import errors + +from ...models.list_workflows_include import check_list_workflows_include from ...models.list_workflows_include import ListWorkflowsInclude +from ...models.list_workflows_sort import check_list_workflows_sort from ...models.list_workflows_sort import ListWorkflowsSort from ...models.workflow_list import WorkflowList -from ...types import UNSET, Response, Unset +from ...types import UNSET, Unset +from typing import cast + def _get_kwargs( @@ -24,7 +31,19 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> dict[str, Any]: + + + params: dict[str, Any] = {} @@ -58,21 +77,43 @@ def _get_kwargs( params["filter[created_at][lte]"] = filtercreated_atlte + params["filter[slug][eq]"] = filterslugeq + + params["filter[slug][not_eq]"] = filterslugnot_eq + + params["filter[slug][in]"] = filterslugin + + params["filter[slug][not_in]"] = filterslugnot_in + + params["filter[name][eq]"] = filternameeq + + params["filter[name][not_eq]"] = filternamenot_eq + + params["filter[name][in]"] = filternamein + + params["filter[name][not_in]"] = filternamenot_in + + 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/workflows", "params": params, } + return _kwargs + def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowList | None: if response.status_code == 200: response_200 = WorkflowList.from_dict(response.json()) + + return response_200 if client.raise_on_unexpected_status: @@ -104,8 +145,17 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> Response[WorkflowList]: - """List workflows + """ List workflows List workflows @@ -121,6 +171,14 @@ def sync_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -128,20 +186,30 @@ def sync_detailed( Returns: Response[WorkflowList] - """ + """ + kwargs = _get_kwargs( include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + ) response = client.get_httpx_client().request( @@ -150,7 +218,6 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( *, client: AuthenticatedClient, @@ -165,8 +232,17 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> WorkflowList | None: - """List workflows + """ List workflows List workflows @@ -182,6 +258,14 @@ def sync( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -189,23 +273,32 @@ def sync( Returns: WorkflowList - """ + """ + return sync_detailed( client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ).parsed +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + ).parsed async def asyncio_detailed( *, @@ -221,8 +314,17 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> Response[WorkflowList]: - """List workflows + """ List workflows List workflows @@ -238,6 +340,14 @@ async def asyncio_detailed( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -245,27 +355,38 @@ async def asyncio_detailed( Returns: Response[WorkflowList] - """ + """ + kwargs = _get_kwargs( include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( *, client: AuthenticatedClient, @@ -280,8 +401,17 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, + filterslugeq: str | Unset = UNSET, + filterslugnot_eq: str | Unset = UNSET, + filterslugin: str | Unset = UNSET, + filterslugnot_in: str | Unset = UNSET, + filternameeq: str | Unset = UNSET, + filternamenot_eq: str | Unset = UNSET, + filternamein: str | Unset = UNSET, + filternamenot_in: str | Unset = UNSET, + ) -> WorkflowList | None: - """List workflows + """ List workflows List workflows @@ -297,6 +427,14 @@ async def asyncio( filtercreated_atgte (str | Unset): filtercreated_atlt (str | Unset): filtercreated_atlte (str | Unset): + filterslugeq (str | Unset): + filterslugnot_eq (str | Unset): + filterslugin (str | Unset): + filterslugnot_in (str | Unset): + filternameeq (str | Unset): + filternamenot_eq (str | Unset): + filternamein (str | Unset): + filternamenot_in (str | Unset): Raises: errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. @@ -304,21 +442,29 @@ async def asyncio( Returns: WorkflowList - """ - - return ( - await asyncio_detailed( - client=client, - include=include, - sort=sort, - pagenumber=pagenumber, - pagesize=pagesize, - filtersearch=filtersearch, - filtername=filtername, - filterslug=filterslug, - filtercreated_atgt=filtercreated_atgt, - filtercreated_atgte=filtercreated_atgte, - filtercreated_atlt=filtercreated_atlt, - filtercreated_atlte=filtercreated_atlte, - ) - ).parsed + """ + + + return (await asyncio_detailed( + client=client, +include=include, +sort=sort, +pagenumber=pagenumber, +pagesize=pagesize, +filtersearch=filtersearch, +filtername=filtername, +filterslug=filterslug, +filtercreated_atgt=filtercreated_atgt, +filtercreated_atgte=filtercreated_atgte, +filtercreated_atlt=filtercreated_atlt, +filtercreated_atlte=filtercreated_atlte, +filterslugeq=filterslugeq, +filterslugnot_eq=filterslugnot_eq, +filterslugin=filterslugin, +filterslugnot_in=filterslugnot_in, +filternameeq=filternameeq, +filternamenot_eq=filternamenot_eq, +filternamein=filternamein, +filternamenot_in=filternamenot_in, + + )).parsed diff --git a/rootly_sdk/api/workflows/update_workflow.py b/rootly_sdk/api/workflows/update_workflow.py index aa48bba6..478e5725 100644 --- a/rootly_sdk/api/workflows/update_workflow.py +++ b/rootly_sdk/api/workflows/update_workflow.py @@ -1,56 +1,69 @@ from http import HTTPStatus -from typing import Any +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 ...types import Response, UNSET +from ... import errors + from ...models.errors_list import ErrorsList from ...models.update_workflow import UpdateWorkflow from ...models.workflow_response import WorkflowResponse -from ...types import Response +from typing import cast +from uuid import UUID + def _get_kwargs( id: str | UUID, *, body: UpdateWorkflow, + ) -> dict[str, Any]: headers: dict[str, Any] = {} + + + + + _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflows/{id}".format( - id=quote(str(id), safe=""), - ), + "url": "/v1/workflows/{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 | WorkflowResponse | None: + +def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowResponse | None: if response.status_code == 200: response_200 = WorkflowResponse.from_dict(response.json()) + + return response_200 if response.status_code == 403: response_403 = ErrorsList.from_dict(response.json()) + + return response_403 if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) + + return response_404 if client.raise_on_unexpected_status: @@ -59,9 +72,7 @@ def _parse_response( return None -def _build_response( - *, client: AuthenticatedClient | Client, response: httpx.Response -) -> Response[ErrorsList | WorkflowResponse]: +def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,8 +86,9 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflow, + ) -> Response[ErrorsList | WorkflowResponse]: - """Update a workflow + """ Update a workflow Update a specific workflow by id @@ -90,11 +102,13 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) response = client.get_httpx_client().request( @@ -103,14 +117,14 @@ def sync_detailed( return _build_response(client=client, response=response) - def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, + ) -> ErrorsList | WorkflowResponse | None: - """Update a workflow + """ Update a workflow Update a specific workflow by id @@ -124,22 +138,24 @@ def sync( Returns: ErrorsList | WorkflowResponse - """ + """ + return sync_detailed( id=id, - client=client, - body=body, - ).parsed +client=client, +body=body, + ).parsed async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, + ) -> Response[ErrorsList | WorkflowResponse]: - """Update a workflow + """ Update a workflow Update a specific workflow by id @@ -153,25 +169,29 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ + """ + kwargs = _get_kwargs( id=id, - body=body, +body=body, + ) - response = await client.get_async_httpx_client().request(**kwargs) + response = await client.get_async_httpx_client().request( + **kwargs + ) return _build_response(client=client, response=response) - async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, + ) -> ErrorsList | WorkflowResponse | None: - """Update a workflow + """ Update a workflow Update a specific workflow by id @@ -185,12 +205,12 @@ async def asyncio( Returns: ErrorsList | WorkflowResponse - """ - - return ( - await asyncio_detailed( - id=id, - client=client, - body=body, - ) - ).parsed + """ + + + return (await asyncio_detailed( + id=id, +client=client, +body=body, + + )).parsed diff --git a/rootly_sdk/client.py b/rootly_sdk/client.py index 1b7055ab..5eeb05a0 100644 --- a/rootly_sdk/client.py +++ b/rootly_sdk/client.py @@ -1,8 +1,11 @@ import ssl from typing import Any +from attrs import define, field, evolve import httpx -from attrs import define, evolve, field + + + @define @@ -33,7 +36,6 @@ class Client: status code that was not documented in the source OpenAPI document. Can also be provided as a keyword argument to the constructor. """ - raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") @@ -266,3 +268,4 @@ async def __aenter__(self) -> "AuthenticatedClient": async def __aexit__(self, *args: Any, **kwargs: Any) -> None: """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" await self.get_async_httpx_client().__aexit__(*args, **kwargs) + diff --git a/rootly_sdk/errors.py b/rootly_sdk/errors.py index 5f92e76a..b912123d 100644 --- a/rootly_sdk/errors.py +++ b/rootly_sdk/errors.py @@ -1,5 +1,4 @@ -"""Contains shared errors types that can be raised from API functions""" - +""" Contains shared errors types that can be raised from API functions """ class UnexpectedStatus(Exception): """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" @@ -12,5 +11,4 @@ def __init__(self, status_code: int, content: bytes): f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}" ) - __all__ = ["UnexpectedStatus"] diff --git a/rootly_sdk/models/__init__.py b/rootly_sdk/models/__init__.py index 4bd273e9..52d5e241 100644 --- a/rootly_sdk/models/__init__.py +++ b/rootly_sdk/models/__init__.py @@ -26,11 +26,11 @@ ActionItemTriggerParamsIncidentActionItemStatusesItem, ) from .action_item_trigger_params_incident_condition import ActionItemTriggerParamsIncidentCondition -from .action_item_trigger_params_incident_condition_acknowledged_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1, +from .action_item_trigger_params_incident_condition_acknowledged_at import ( + ActionItemTriggerParamsIncidentConditionAcknowledgedAt, ) -from .action_item_trigger_params_incident_condition_detected_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionDetectedAtType1, +from .action_item_trigger_params_incident_condition_detected_at import ( + ActionItemTriggerParamsIncidentConditionDetectedAt, ) from .action_item_trigger_params_incident_condition_environment import ( ActionItemTriggerParamsIncidentConditionEnvironment, @@ -46,25 +46,22 @@ ActionItemTriggerParamsIncidentConditionIncidentType, ) from .action_item_trigger_params_incident_condition_kind import ActionItemTriggerParamsIncidentConditionKind -from .action_item_trigger_params_incident_condition_mitigated_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionMitigatedAtType1, +from .action_item_trigger_params_incident_condition_label import ActionItemTriggerParamsIncidentConditionLabel +from .action_item_trigger_params_incident_condition_mitigated_at import ( + ActionItemTriggerParamsIncidentConditionMitigatedAt, ) -from .action_item_trigger_params_incident_condition_resolved_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionResolvedAtType1, +from .action_item_trigger_params_incident_condition_resolved_at import ( + ActionItemTriggerParamsIncidentConditionResolvedAt, ) from .action_item_trigger_params_incident_condition_service import ActionItemTriggerParamsIncidentConditionService from .action_item_trigger_params_incident_condition_severity import ActionItemTriggerParamsIncidentConditionSeverity -from .action_item_trigger_params_incident_condition_started_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionStartedAtType1, -) +from .action_item_trigger_params_incident_condition_started_at import ActionItemTriggerParamsIncidentConditionStartedAt from .action_item_trigger_params_incident_condition_status import ActionItemTriggerParamsIncidentConditionStatus from .action_item_trigger_params_incident_condition_sub_status import ActionItemTriggerParamsIncidentConditionSubStatus -from .action_item_trigger_params_incident_condition_summary_type_1 import ( - ActionItemTriggerParamsIncidentConditionSummaryType1, -) +from .action_item_trigger_params_incident_condition_summary import ActionItemTriggerParamsIncidentConditionSummary from .action_item_trigger_params_incident_condition_visibility import ActionItemTriggerParamsIncidentConditionVisibility -from .action_item_trigger_params_incident_conditional_inactivity_type_1 import ( - ActionItemTriggerParamsIncidentConditionalInactivityType1, +from .action_item_trigger_params_incident_conditional_inactivity import ( + ActionItemTriggerParamsIncidentConditionalInactivity, ) from .action_item_trigger_params_incident_kinds_item import ActionItemTriggerParamsIncidentKindsItem from .action_item_trigger_params_incident_statuses_item import ActionItemTriggerParamsIncidentStatusesItem @@ -79,9 +76,13 @@ from .add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams from .add_microsoft_teams_chat_tab_task_params_chat import AddMicrosoftTeamsChatTabTaskParamsChat from .add_microsoft_teams_chat_tab_task_params_task_type import AddMicrosoftTeamsChatTabTaskParamsTaskType +from .add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 +from .add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from .add_role_task_params import AddRoleTaskParams from .add_role_task_params_assigned_to_user import AddRoleTaskParamsAssignedToUser from .add_role_task_params_task_type import AddRoleTaskParamsTaskType +from .add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 +from .add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from .add_subscribers import AddSubscribers from .add_subscribers_data import AddSubscribersData from .add_subscribers_data_attributes import AddSubscribersDataAttributes @@ -91,11 +92,29 @@ from .add_to_timeline_task_params import AddToTimelineTaskParams from .add_to_timeline_task_params_post_to_slack_channels_item import AddToTimelineTaskParamsPostToSlackChannelsItem from .add_to_timeline_task_params_task_type import AddToTimelineTaskParamsTaskType +from .ai_chat_response import AiChatResponse +from .ai_chat_response_data import AiChatResponseData +from .ai_chat_response_data_attributes import AiChatResponseDataAttributes +from .ai_chat_response_data_attributes_status import AiChatResponseDataAttributesStatus +from .ai_chat_response_data_type import AiChatResponseDataType +from .ai_chat_session_message import AiChatSessionMessage +from .ai_chat_session_message_list import AiChatSessionMessageList +from .ai_chat_session_message_list_meta import AiChatSessionMessageListMeta +from .ai_chat_session_message_role import AiChatSessionMessageRole from .alert import Alert -from .alert_alert_field_values_attributes_item_type_0 import AlertAlertFieldValuesAttributesItemType0 +from .alert_alert_field_values_type_0_item import AlertAlertFieldValuesType0Item +from .alert_alerting_targets_type_0_item import AlertAlertingTargetsType0Item from .alert_data_type_0 import AlertDataType0 from .alert_event import AlertEvent from .alert_event_action import AlertEventAction +from .alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 +from .alert_event_escalation_target_type_0_data import AlertEventEscalationTargetType0Data +from .alert_event_escalation_target_type_0_data_attributes import AlertEventEscalationTargetType0DataAttributes +from .alert_event_feed_list import AlertEventFeedList +from .alert_event_feed_list_data_item import AlertEventFeedListDataItem +from .alert_event_feed_list_data_item_type import AlertEventFeedListDataItemType +from .alert_event_feed_meta import AlertEventFeedMeta +from .alert_event_incident_type_0 import AlertEventIncidentType0 from .alert_event_kind import AlertEventKind from .alert_event_list import AlertEventList from .alert_event_list_data_item import AlertEventListDataItem @@ -103,6 +122,9 @@ from .alert_event_response import AlertEventResponse from .alert_event_response_data import AlertEventResponseData from .alert_event_response_data_type import AlertEventResponseDataType +from .alert_event_schedule_type_0 import AlertEventScheduleType0 +from .alert_event_schedule_type_0_escalation_policies_item import AlertEventScheduleType0EscalationPoliciesItem +from .alert_event_user import AlertEventUser from .alert_field import AlertField from .alert_field_list import AlertFieldList from .alert_field_list_data_item import AlertFieldListDataItem @@ -130,12 +152,11 @@ from .alert_labels_item_type_0 import AlertLabelsItemType0 from .alert_list import AlertList from .alert_list_data_item import AlertListDataItem -from .alert_list_data_item_source import AlertListDataItemSource from .alert_list_data_item_type import AlertListDataItemType from .alert_noise import AlertNoise +from .alert_notification_target_type import AlertNotificationTargetType from .alert_response import AlertResponse from .alert_response_data import AlertResponseData -from .alert_response_data_source import AlertResponseDataSource from .alert_response_data_type import AlertResponseDataType from .alert_route import AlertRoute from .alert_route_list import AlertRouteList @@ -191,7 +212,6 @@ from .alert_routing_rule_response_data_type import AlertRoutingRuleResponseDataType from .alert_routing_rule_target_type_0 import AlertRoutingRuleTargetType0 from .alert_routing_rule_target_type_0_target_type import AlertRoutingRuleTargetType0TargetType -from .alert_source import AlertSource from .alert_status import AlertStatus from .alert_trigger_params import AlertTriggerParams from .alert_trigger_params_alert_condition import AlertTriggerParamsAlertCondition @@ -284,6 +304,9 @@ 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_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams +from .archive_google_chat_spaces_task_params_spaces_item import ArchiveGoogleChatSpacesTaskParamsSpacesItem +from .archive_google_chat_spaces_task_params_task_type import ArchiveGoogleChatSpacesTaskParamsTaskType from .archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from .archive_microsoft_teams_channels_task_params_channels_item import ( ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem, @@ -307,6 +330,13 @@ AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem, ) from .attach_datadog_dashboards_task_params_task_type import AttachDatadogDashboardsTaskParamsTaskType +from .attach_retrospective_pdf_to_jira_issue_task_params import AttachRetrospectivePdfToJiraIssueTaskParams +from .attach_retrospective_pdf_to_jira_issue_task_params_integration import ( + AttachRetrospectivePdfToJiraIssueTaskParamsIntegration, +) +from .attach_retrospective_pdf_to_jira_issue_task_params_task_type import ( + AttachRetrospectivePdfToJiraIssueTaskParamsTaskType, +) from .audit import Audit from .audit_item_type import AuditItemType from .audit_object_changes_type_0 import AuditObjectChangesType0 @@ -327,6 +357,10 @@ from .auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams from .auto_assign_role_opsgenie_task_params_schedule import AutoAssignRoleOpsgenieTaskParamsSchedule from .auto_assign_role_opsgenie_task_params_task_type import AutoAssignRoleOpsgenieTaskParamsTaskType +from .auto_assign_role_pagerduty_task_params_type_0_schedule import AutoAssignRolePagerdutyTaskParamsType0Schedule +from .auto_assign_role_pagerduty_task_params_type_1_escalation_policy import ( + AutoAssignRolePagerdutyTaskParamsType1EscalationPolicy, +) from .auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from .auto_assign_role_rootly_task_params_escalation_policy_target import ( AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget, @@ -339,6 +373,71 @@ from .auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from .auto_assign_role_victor_ops_task_params_task_type import AutoAssignRoleVictorOpsTaskParamsTaskType from .auto_assign_role_victor_ops_task_params_team import AutoAssignRoleVictorOpsTaskParamsTeam +from .bulk_destroy_catalog_entities_response import BulkDestroyCatalogEntitiesResponse +from .bulk_destroy_catalog_entities_response_data import BulkDestroyCatalogEntitiesResponseData +from .bulk_destroy_catalog_entities_type_0 import BulkDestroyCatalogEntitiesType0 +from .bulk_destroy_catalog_entities_type_1 import BulkDestroyCatalogEntitiesType1 +from .bulk_destroy_catalog_entities_type_1_managed_by import BulkDestroyCatalogEntitiesType1ManagedBy +from .bulk_destroy_environments_response import BulkDestroyEnvironmentsResponse +from .bulk_destroy_environments_response_data import BulkDestroyEnvironmentsResponseData +from .bulk_destroy_environments_type_0 import BulkDestroyEnvironmentsType0 +from .bulk_destroy_environments_type_1 import BulkDestroyEnvironmentsType1 +from .bulk_destroy_environments_type_1_managed_by import BulkDestroyEnvironmentsType1ManagedBy +from .bulk_destroy_functionalities_response import BulkDestroyFunctionalitiesResponse +from .bulk_destroy_functionalities_response_data import BulkDestroyFunctionalitiesResponseData +from .bulk_destroy_functionalities_type_0 import BulkDestroyFunctionalitiesType0 +from .bulk_destroy_functionalities_type_1 import BulkDestroyFunctionalitiesType1 +from .bulk_destroy_functionalities_type_1_managed_by import BulkDestroyFunctionalitiesType1ManagedBy +from .bulk_destroy_services_response import BulkDestroyServicesResponse +from .bulk_destroy_services_response_data import BulkDestroyServicesResponseData +from .bulk_destroy_services_type_0 import BulkDestroyServicesType0 +from .bulk_destroy_services_type_1 import BulkDestroyServicesType1 +from .bulk_destroy_services_type_1_managed_by import BulkDestroyServicesType1ManagedBy +from .bulk_destroy_teams_response import BulkDestroyTeamsResponse +from .bulk_destroy_teams_response_data import BulkDestroyTeamsResponseData +from .bulk_destroy_teams_type_0 import BulkDestroyTeamsType0 +from .bulk_destroy_teams_type_1 import BulkDestroyTeamsType1 +from .bulk_destroy_teams_type_1_managed_by import BulkDestroyTeamsType1ManagedBy +from .bulk_upsert_catalog_entities import BulkUpsertCatalogEntities +from .bulk_upsert_catalog_entities_entities_item import BulkUpsertCatalogEntitiesEntitiesItem +from .bulk_upsert_catalog_entities_entities_item_fields_item import BulkUpsertCatalogEntitiesEntitiesItemFieldsItem +from .bulk_upsert_catalog_entities_error import BulkUpsertCatalogEntitiesError +from .bulk_upsert_catalog_entities_error_errors_item import BulkUpsertCatalogEntitiesErrorErrorsItem +from .bulk_upsert_catalog_entities_response import BulkUpsertCatalogEntitiesResponse +from .bulk_upsert_catalog_entities_response_data_item import BulkUpsertCatalogEntitiesResponseDataItem +from .bulk_upsert_catalog_entities_response_data_item_type import BulkUpsertCatalogEntitiesResponseDataItemType +from .bulk_upsert_environments import BulkUpsertEnvironments +from .bulk_upsert_environments_entities_item import BulkUpsertEnvironmentsEntitiesItem +from .bulk_upsert_environments_entities_item_fields_item import BulkUpsertEnvironmentsEntitiesItemFieldsItem +from .bulk_upsert_environments_error import BulkUpsertEnvironmentsError +from .bulk_upsert_environments_error_errors_item import BulkUpsertEnvironmentsErrorErrorsItem +from .bulk_upsert_environments_response import BulkUpsertEnvironmentsResponse +from .bulk_upsert_environments_response_data_item import BulkUpsertEnvironmentsResponseDataItem +from .bulk_upsert_environments_response_data_item_type import BulkUpsertEnvironmentsResponseDataItemType +from .bulk_upsert_functionalities import BulkUpsertFunctionalities +from .bulk_upsert_functionalities_entities_item import BulkUpsertFunctionalitiesEntitiesItem +from .bulk_upsert_functionalities_entities_item_fields_item import BulkUpsertFunctionalitiesEntitiesItemFieldsItem +from .bulk_upsert_functionalities_error import BulkUpsertFunctionalitiesError +from .bulk_upsert_functionalities_error_errors_item import BulkUpsertFunctionalitiesErrorErrorsItem +from .bulk_upsert_functionalities_response import BulkUpsertFunctionalitiesResponse +from .bulk_upsert_functionalities_response_data_item import BulkUpsertFunctionalitiesResponseDataItem +from .bulk_upsert_functionalities_response_data_item_type import BulkUpsertFunctionalitiesResponseDataItemType +from .bulk_upsert_services import BulkUpsertServices +from .bulk_upsert_services_entities_item import BulkUpsertServicesEntitiesItem +from .bulk_upsert_services_entities_item_fields_item import BulkUpsertServicesEntitiesItemFieldsItem +from .bulk_upsert_services_error import BulkUpsertServicesError +from .bulk_upsert_services_error_errors_item import BulkUpsertServicesErrorErrorsItem +from .bulk_upsert_services_response import BulkUpsertServicesResponse +from .bulk_upsert_services_response_data_item import BulkUpsertServicesResponseDataItem +from .bulk_upsert_services_response_data_item_type import BulkUpsertServicesResponseDataItemType +from .bulk_upsert_teams import BulkUpsertTeams +from .bulk_upsert_teams_entities_item import BulkUpsertTeamsEntitiesItem +from .bulk_upsert_teams_entities_item_fields_item import BulkUpsertTeamsEntitiesItemFieldsItem +from .bulk_upsert_teams_error import BulkUpsertTeamsError +from .bulk_upsert_teams_error_errors_item import BulkUpsertTeamsErrorErrorsItem +from .bulk_upsert_teams_response import BulkUpsertTeamsResponse +from .bulk_upsert_teams_response_data_item import BulkUpsertTeamsResponseDataItem +from .bulk_upsert_teams_response_data_item_type import BulkUpsertTeamsResponseDataItemType from .call_people_task_params import CallPeopleTaskParams from .call_people_task_params_task_type import CallPeopleTaskParamsTaskType from .cancel_incident import CancelIncident @@ -397,6 +496,7 @@ 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_managed_by import CatalogEntityManagedBy from .catalog_entity_properties_item import CatalogEntityPropertiesItem from .catalog_entity_property import CatalogEntityProperty from .catalog_entity_property_key import CatalogEntityPropertyKey @@ -415,6 +515,7 @@ from .catalog_field_list import CatalogFieldList from .catalog_field_list_data_item import CatalogFieldListDataItem from .catalog_field_list_data_item_type import CatalogFieldListDataItemType +from .catalog_field_managed_by import CatalogFieldManagedBy from .catalog_field_response import CatalogFieldResponse from .catalog_field_response_data import CatalogFieldResponseData from .catalog_field_response_data_type import CatalogFieldResponseDataType @@ -422,12 +523,14 @@ from .catalog_list import CatalogList from .catalog_list_data_item import CatalogListDataItem from .catalog_list_data_item_type import CatalogListDataItemType +from .catalog_managed_by import CatalogManagedBy 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_managed_by import CatalogPropertyManagedBy from .catalog_property_response import CatalogPropertyResponse from .catalog_property_response_data import CatalogPropertyResponseData from .catalog_property_response_data_type import CatalogPropertyResponseDataType @@ -442,6 +545,9 @@ from .cause_response import CauseResponse from .cause_response_data import CauseResponseData from .cause_response_data_type import CauseResponseDataType +from .change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams +from .change_google_chat_space_privacy_task_params_space import ChangeGoogleChatSpacePrivacyTaskParamsSpace +from .change_google_chat_space_privacy_task_params_task_type import ChangeGoogleChatSpacePrivacyTaskParamsTaskType from .change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from .change_slack_channel_privacy_task_params_channel import ChangeSlackChannelPrivacyTaskParamsChannel from .change_slack_channel_privacy_task_params_privacy import ChangeSlackChannelPrivacyTaskParamsPrivacy @@ -554,6 +660,7 @@ from .create_edge_connector_body import CreateEdgeConnectorBody from .create_edge_connector_body_data import CreateEdgeConnectorBodyData from .create_edge_connector_body_data_attributes import CreateEdgeConnectorBodyDataAttributes +from .create_edge_connector_body_data_attributes_filters import CreateEdgeConnectorBodyDataAttributesFilters 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 @@ -579,6 +686,8 @@ CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem, ) from .create_google_calendar_event_task_params_task_type import CreateGoogleCalendarEventTaskParamsTaskType +from .create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams +from .create_google_chat_space_task_params_task_type import CreateGoogleChatSpaceTaskParamsTaskType from .create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from .create_google_docs_page_task_params_drive import CreateGoogleDocsPageTaskParamsDrive from .create_google_docs_page_task_params_parent_folder import CreateGoogleDocsPageTaskParamsParentFolder @@ -707,6 +816,8 @@ from .create_sharepoint_page_task_params_parent_folder import CreateSharepointPageTaskParamsParentFolder from .create_sharepoint_page_task_params_site import CreateSharepointPageTaskParamsSite from .create_sharepoint_page_task_params_task_type import CreateSharepointPageTaskParamsTaskType +from .create_shortcut_story_task_params_type_0_project import CreateShortcutStoryTaskParamsType0Project +from .create_shortcut_story_task_params_type_1_workflow_state import CreateShortcutStoryTaskParamsType1WorkflowState from .create_shortcut_task_task_params import CreateShortcutTaskTaskParams from .create_shortcut_task_task_params_completion import CreateShortcutTaskTaskParamsCompletion from .create_shortcut_task_task_params_task_type import CreateShortcutTaskTaskParamsTaskType @@ -844,6 +955,7 @@ from .environment_list import EnvironmentList from .environment_list_data_item import EnvironmentListDataItem from .environment_list_data_item_type import EnvironmentListDataItemType +from .environment_managed_by import EnvironmentManagedBy from .environment_properties_type_0_item import EnvironmentPropertiesType0Item from .environment_response import EnvironmentResponse from .environment_response_data import EnvironmentResponseData @@ -852,22 +964,10 @@ 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 .escalate_alert import EscalateAlert +from .escalate_alert_data import EscalateAlertData +from .escalate_alert_data_attributes import EscalateAlertDataAttributes +from .escalate_alert_data_type import EscalateAlertDataType 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 @@ -905,6 +1005,76 @@ 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 import EscalationPolicyPathRulesItemType6 +from .escalation_policy_path_rules_item_type_6_operator import EscalationPolicyPathRulesItemType6Operator +from .escalation_policy_path_rules_item_type_6_rule_type import EscalationPolicyPathRulesItemType6RuleType +from .escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 +from .escalation_policy_path_rules_item_type_7_operator import EscalationPolicyPathRulesItemType7Operator +from .escalation_policy_path_rules_item_type_7_rule_type import EscalationPolicyPathRulesItemType7RuleType +from .escalation_policy_path_rules_item_type_8_type_0 import EscalationPolicyPathRulesItemType8Type0 +from .escalation_policy_path_rules_item_type_8_type_0_rule_type import EscalationPolicyPathRulesItemType8Type0RuleType +from .escalation_policy_path_rules_item_type_8_type_1 import EscalationPolicyPathRulesItemType8Type1 +from .escalation_policy_path_rules_item_type_8_type_1_rule_type import EscalationPolicyPathRulesItemType8Type1RuleType +from .escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 +from .escalation_policy_path_rules_item_type_8_type_2_operator import EscalationPolicyPathRulesItemType8Type2Operator +from .escalation_policy_path_rules_item_type_8_type_2_rule_type import EscalationPolicyPathRulesItemType8Type2RuleType +from .escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 +from .escalation_policy_path_rules_item_type_8_type_3_operator import EscalationPolicyPathRulesItemType8Type3Operator +from .escalation_policy_path_rules_item_type_8_type_3_rule_type import EscalationPolicyPathRulesItemType8Type3RuleType +from .escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 +from .escalation_policy_path_rules_item_type_8_type_4_rule_type import EscalationPolicyPathRulesItemType8Type4RuleType +from .escalation_policy_path_rules_item_type_8_type_5 import EscalationPolicyPathRulesItemType8Type5 +from .escalation_policy_path_rules_item_type_8_type_5_rule_type import EscalationPolicyPathRulesItemType8Type5RuleType +from .escalation_policy_path_rules_item_type_8_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType8Type5TimeBlocksItem, +) +from .escalation_policy_path_rules_item_type_8_type_5_time_zone import EscalationPolicyPathRulesItemType8Type5TimeZone +from .escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 +from .escalation_policy_path_rules_item_type_8_type_6_operator import EscalationPolicyPathRulesItemType8Type6Operator +from .escalation_policy_path_rules_item_type_8_type_6_rule_type import EscalationPolicyPathRulesItemType8Type6RuleType +from .escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 +from .escalation_policy_path_rules_item_type_8_type_7_operator import EscalationPolicyPathRulesItemType8Type7Operator +from .escalation_policy_path_rules_item_type_8_type_7_rule_type import EscalationPolicyPathRulesItemType8Type7RuleType +from .escalation_policy_path_rules_item_type_9_type_0 import EscalationPolicyPathRulesItemType9Type0 +from .escalation_policy_path_rules_item_type_9_type_0_rule_type import EscalationPolicyPathRulesItemType9Type0RuleType +from .escalation_policy_path_rules_item_type_9_type_1 import EscalationPolicyPathRulesItemType9Type1 +from .escalation_policy_path_rules_item_type_9_type_1_rule_type import EscalationPolicyPathRulesItemType9Type1RuleType +from .escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 +from .escalation_policy_path_rules_item_type_9_type_2_operator import EscalationPolicyPathRulesItemType9Type2Operator +from .escalation_policy_path_rules_item_type_9_type_2_rule_type import EscalationPolicyPathRulesItemType9Type2RuleType +from .escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 +from .escalation_policy_path_rules_item_type_9_type_3_operator import EscalationPolicyPathRulesItemType9Type3Operator +from .escalation_policy_path_rules_item_type_9_type_3_rule_type import EscalationPolicyPathRulesItemType9Type3RuleType +from .escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 +from .escalation_policy_path_rules_item_type_9_type_4_rule_type import EscalationPolicyPathRulesItemType9Type4RuleType +from .escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 +from .escalation_policy_path_rules_item_type_9_type_5_rule_type import EscalationPolicyPathRulesItemType9Type5RuleType +from .escalation_policy_path_rules_item_type_9_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType9Type5TimeBlocksItem, +) +from .escalation_policy_path_rules_item_type_9_type_5_time_zone import EscalationPolicyPathRulesItemType9Type5TimeZone +from .escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 +from .escalation_policy_path_rules_item_type_9_type_6_operator import EscalationPolicyPathRulesItemType9Type6Operator +from .escalation_policy_path_rules_item_type_9_type_6_rule_type import EscalationPolicyPathRulesItemType9Type6RuleType +from .escalation_policy_path_rules_item_type_9_type_7 import EscalationPolicyPathRulesItemType9Type7 +from .escalation_policy_path_rules_item_type_9_type_7_operator import EscalationPolicyPathRulesItemType9Type7Operator +from .escalation_policy_path_rules_item_type_9_type_7_rule_type import EscalationPolicyPathRulesItemType9Type7RuleType 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 @@ -974,6 +1144,7 @@ from .functionality_list import FunctionalityList from .functionality_list_data_item import FunctionalityListDataItem from .functionality_list_data_item_type import FunctionalityListDataItemType +from .functionality_managed_by import FunctionalityManagedBy from .functionality_properties_type_0_item import FunctionalityPropertiesType0Item from .functionality_response import FunctionalityResponse from .functionality_response_data import FunctionalityResponseData @@ -994,8 +1165,13 @@ from .get_escalation_path_include import GetEscalationPathInclude from .get_escalation_policy_include import GetEscalationPolicyInclude from .get_form_field_include import GetFormFieldInclude +from .get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 +from .get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 +from .get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 +from .get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from .get_incident_include import GetIncidentInclude from .get_incident_sub_status_include import GetIncidentSubStatusInclude +from .get_meeting_recording_include import GetMeetingRecordingInclude from .get_playbook_include import GetPlaybookInclude from .get_pulses_task_params import GetPulsesTaskParams from .get_pulses_task_params_parent_message_thread_task import GetPulsesTaskParamsParentMessageThreadTask @@ -1021,6 +1197,9 @@ from .http_client_task_params_method import HttpClientTaskParamsMethod from .http_client_task_params_post_to_slack_channels_item import HttpClientTaskParamsPostToSlackChannelsItem from .http_client_task_params_task_type import HttpClientTaskParamsTaskType +from .import_meeting_recording import ImportMeetingRecording +from .import_meeting_recording_platform import ImportMeetingRecordingPlatform +from .import_meeting_recording_source import ImportMeetingRecordingSource from .in_triage_incident import InTriageIncident from .in_triage_incident_data import InTriageIncidentData from .in_triage_incident_data_type import InTriageIncidentDataType @@ -1168,13 +1347,11 @@ from .incident_sub_status_response_data_type import IncidentSubStatusResponseDataType from .incident_trigger_params import IncidentTriggerParams from .incident_trigger_params_incident_condition import IncidentTriggerParamsIncidentCondition -from .incident_trigger_params_incident_condition_acknowledged_at_type_1 import ( - IncidentTriggerParamsIncidentConditionAcknowledgedAtType1, +from .incident_trigger_params_incident_condition_acknowledged_at import ( + IncidentTriggerParamsIncidentConditionAcknowledgedAt, ) from .incident_trigger_params_incident_condition_cause import IncidentTriggerParamsIncidentConditionCause -from .incident_trigger_params_incident_condition_detected_at_type_1 import ( - IncidentTriggerParamsIncidentConditionDetectedAtType1, -) +from .incident_trigger_params_incident_condition_detected_at import IncidentTriggerParamsIncidentConditionDetectedAt from .incident_trigger_params_incident_condition_environment import IncidentTriggerParamsIncidentConditionEnvironment from .incident_trigger_params_incident_condition_functionality import ( IncidentTriggerParamsIncidentConditionFunctionality, @@ -1185,26 +1362,17 @@ ) from .incident_trigger_params_incident_condition_incident_type import IncidentTriggerParamsIncidentConditionIncidentType from .incident_trigger_params_incident_condition_kind import IncidentTriggerParamsIncidentConditionKind -from .incident_trigger_params_incident_condition_mitigated_at_type_1 import ( - IncidentTriggerParamsIncidentConditionMitigatedAtType1, -) -from .incident_trigger_params_incident_condition_resolved_at_type_1 import ( - IncidentTriggerParamsIncidentConditionResolvedAtType1, -) +from .incident_trigger_params_incident_condition_label import IncidentTriggerParamsIncidentConditionLabel +from .incident_trigger_params_incident_condition_mitigated_at import IncidentTriggerParamsIncidentConditionMitigatedAt +from .incident_trigger_params_incident_condition_resolved_at import IncidentTriggerParamsIncidentConditionResolvedAt from .incident_trigger_params_incident_condition_service import IncidentTriggerParamsIncidentConditionService from .incident_trigger_params_incident_condition_severity import IncidentTriggerParamsIncidentConditionSeverity -from .incident_trigger_params_incident_condition_started_at_type_1 import ( - IncidentTriggerParamsIncidentConditionStartedAtType1, -) +from .incident_trigger_params_incident_condition_started_at import IncidentTriggerParamsIncidentConditionStartedAt from .incident_trigger_params_incident_condition_status import IncidentTriggerParamsIncidentConditionStatus from .incident_trigger_params_incident_condition_sub_status import IncidentTriggerParamsIncidentConditionSubStatus -from .incident_trigger_params_incident_condition_summary_type_1 import ( - IncidentTriggerParamsIncidentConditionSummaryType1, -) +from .incident_trigger_params_incident_condition_summary import IncidentTriggerParamsIncidentConditionSummary from .incident_trigger_params_incident_condition_visibility import IncidentTriggerParamsIncidentConditionVisibility -from .incident_trigger_params_incident_conditional_inactivity_type_1 import ( - IncidentTriggerParamsIncidentConditionalInactivityType1, -) +from .incident_trigger_params_incident_conditional_inactivity import IncidentTriggerParamsIncidentConditionalInactivity from .incident_trigger_params_incident_kinds_item import IncidentTriggerParamsIncidentKindsItem from .incident_trigger_params_incident_post_mortem_condition_cause import ( IncidentTriggerParamsIncidentPostMortemConditionCause, @@ -1224,6 +1392,33 @@ 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 .incidents_chart_response_data import IncidentsChartResponseData +from .invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams +from .invite_to_google_chat_space_task_params_space import InviteToGoogleChatSpaceTaskParamsSpace +from .invite_to_google_chat_space_task_params_task_type import InviteToGoogleChatSpaceTaskParamsTaskType +from .invite_to_microsoft_teams_channel_rootly_task_params import InviteToMicrosoftTeamsChannelRootlyTaskParams +from .invite_to_microsoft_teams_channel_rootly_task_params_channel import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_group_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_schedule_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_service_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_task_type import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType, +) +from .invite_to_microsoft_teams_channel_rootly_task_params_team import InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam +from .invite_to_microsoft_teams_channel_rootly_task_params_user_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget, +) from .invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from .invite_to_microsoft_teams_channel_task_params_channel import InviteToMicrosoftTeamsChannelTaskParamsChannel from .invite_to_microsoft_teams_channel_task_params_task_type import InviteToMicrosoftTeamsChannelTaskParamsTaskType @@ -1234,6 +1429,12 @@ ) from .invite_to_slack_channel_opsgenie_task_params_schedule import InviteToSlackChannelOpsgenieTaskParamsSchedule from .invite_to_slack_channel_opsgenie_task_params_task_type import InviteToSlackChannelOpsgenieTaskParamsTaskType +from .invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy import ( + InviteToSlackChannelPagerdutyTaskParamsType0EscalationPolicy, +) +from .invite_to_slack_channel_pagerduty_task_params_type_1_schedule import ( + InviteToSlackChannelPagerdutyTaskParamsType1Schedule, +) from .invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams from .invite_to_slack_channel_rootly_task_params_channels_item import InviteToSlackChannelRootlyTaskParamsChannelsItem from .invite_to_slack_channel_rootly_task_params_escalation_policy_target import ( @@ -1246,6 +1447,13 @@ from .invite_to_slack_channel_rootly_task_params_service_target import InviteToSlackChannelRootlyTaskParamsServiceTarget from .invite_to_slack_channel_rootly_task_params_task_type import InviteToSlackChannelRootlyTaskParamsTaskType from .invite_to_slack_channel_rootly_task_params_user_target import InviteToSlackChannelRootlyTaskParamsUserTarget +from .invite_to_slack_channel_task_params_type_0_slack_users_item import ( + InviteToSlackChannelTaskParamsType0SlackUsersItem, +) +from .invite_to_slack_channel_task_params_type_1_slack_user_groups_item import ( + InviteToSlackChannelTaskParamsType1SlackUserGroupsItem, +) +from .invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 from .invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams from .invite_to_slack_channel_victor_ops_task_params_channels_item import ( InviteToSlackChannelVictorOpsTaskParamsChannelsItem, @@ -1256,7 +1464,13 @@ from .ip_ranges_response import IpRangesResponse from .ip_ranges_response_data import IpRangesResponseData from .ip_ranges_response_data_type import IpRangesResponseDataType +from .jsonapi_included_resource import JsonapiIncludedResource +from .jsonapi_included_resource_attributes import JsonapiIncludedResourceAttributes +from .jsonapi_included_resource_relationships import JsonapiIncludedResourceRelationships from .links import Links +from .list_alert_events_feed_filteraction import ListAlertEventsFeedFilteraction +from .list_alert_events_feed_filterkind import ListAlertEventsFeedFilterkind +from .list_alert_events_feed_sort import ListAlertEventsFeedSort from .list_alerts_include import ListAlertsInclude from .list_catalog_checklist_templates_include import ListCatalogChecklistTemplatesInclude from .list_catalog_checklist_templates_sort import ListCatalogChecklistTemplatesSort @@ -1273,6 +1487,7 @@ from .list_dashboards_include import ListDashboardsInclude from .list_environment_catalog_properties_include import ListEnvironmentCatalogPropertiesInclude from .list_environment_catalog_properties_sort import ListEnvironmentCatalogPropertiesSort +from .list_escalation_paths_filterpath_type import ListEscalationPathsFilterpathType from .list_escalation_paths_include import ListEscalationPathsInclude from .list_escalation_policies_include import ListEscalationPoliciesInclude from .list_form_fields_include import ListFormFieldsInclude @@ -1318,11 +1533,21 @@ 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_detail import MeetingRecordingDetail +from .meeting_recording_detail_response import MeetingRecordingDetailResponse +from .meeting_recording_detail_response_data import MeetingRecordingDetailResponseData +from .meeting_recording_detail_response_data_type import MeetingRecordingDetailResponseDataType +from .meeting_recording_detail_transcript_type_1 import MeetingRecordingDetailTranscriptType1 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_response import MeetingRecordingResponse +from .meeting_recording_response_data import MeetingRecordingResponseData +from .meeting_recording_response_data_type import MeetingRecordingResponseDataType from .meeting_recording_status import MeetingRecordingStatus +from .meeting_recording_transcript_segment import MeetingRecordingTranscriptSegment +from .meeting_recording_transcript_word import MeetingRecordingTranscriptWord from .meta import Meta from .mitigate_incident import MitigateIncident from .mitigate_incident_data import MitigateIncidentData @@ -1338,7 +1563,12 @@ from .new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 from .new_alert_data_attributes_noise import NewAlertDataAttributesNoise from .new_alert_data_attributes_notification_target_type import NewAlertDataAttributesNotificationTargetType -from .new_alert_data_attributes_source import NewAlertDataAttributesSource +from .new_alert_data_attributes_notification_targets_type_0_item import ( + NewAlertDataAttributesNotificationTargetsType0Item, +) +from .new_alert_data_attributes_notification_targets_type_0_item_type import ( + NewAlertDataAttributesNotificationTargetsType0ItemType, +) from .new_alert_data_attributes_status import NewAlertDataAttributesStatus from .new_alert_data_type import NewAlertDataType from .new_alert_event import NewAlertEvent @@ -1702,6 +1932,72 @@ NewEscalationPolicyPathDataAttributesNotificationType, ) from .new_escalation_policy_path_data_attributes_path_type import NewEscalationPolicyPathDataAttributesPathType +from .new_escalation_policy_path_data_attributes_rules_item_type_0 import ( + NewEscalationPolicyPathDataAttributesRulesItemType0, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType0RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_1 import ( + NewEscalationPolicyPathDataAttributesRulesItemType1, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType1RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_2 import ( + NewEscalationPolicyPathDataAttributesRulesItemType2, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType2Operator, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType2RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_3 import ( + NewEscalationPolicyPathDataAttributesRulesItemType3, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType3Operator, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType3RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_4 import ( + NewEscalationPolicyPathDataAttributesRulesItemType4, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType4RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_5 import ( + NewEscalationPolicyPathDataAttributesRulesItemType5, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType5RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_6 import ( + NewEscalationPolicyPathDataAttributesRulesItemType6, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType6Operator, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType6RuleType, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_7 import ( + NewEscalationPolicyPathDataAttributesRulesItemType7, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType7Operator, +) +from .new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType7RuleType, +) from .new_escalation_policy_path_data_attributes_time_restriction_time_zone import ( NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, ) @@ -1782,6 +2078,9 @@ from .new_incident_action_item import NewIncidentActionItem from .new_incident_action_item_data import NewIncidentActionItemData from .new_incident_action_item_data_attributes import NewIncidentActionItemDataAttributes +from .new_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item, +) from .new_incident_action_item_data_attributes_kind import NewIncidentActionItemDataAttributesKind from .new_incident_action_item_data_attributes_priority import NewIncidentActionItemDataAttributesPriority from .new_incident_action_item_data_attributes_status import NewIncidentActionItemDataAttributesStatus @@ -1922,12 +2221,18 @@ NewOnCallRoleDataAttributesApiKeysPermissionsItem, ) from .new_on_call_role_data_attributes_audits_permissions_item import NewOnCallRoleDataAttributesAuditsPermissionsItem +from .new_on_call_role_data_attributes_catalogs_permissions_item import ( + NewOnCallRoleDataAttributesCatalogsPermissionsItem, +) from .new_on_call_role_data_attributes_contacts_permissions_item import ( NewOnCallRoleDataAttributesContactsPermissionsItem, ) from .new_on_call_role_data_attributes_escalation_policies_permissions_item import ( NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, ) +from .new_on_call_role_data_attributes_functionalities_permissions_item import ( + NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem, +) from .new_on_call_role_data_attributes_groups_permissions_item import NewOnCallRoleDataAttributesGroupsPermissionsItem from .new_on_call_role_data_attributes_heartbeats_permissions_item import ( NewOnCallRoleDataAttributesHeartbeatsPermissionsItem, @@ -2067,6 +2372,7 @@ from .new_schedule import NewSchedule from .new_schedule_data import NewScheduleData from .new_schedule_data_attributes import NewScheduleDataAttributes +from .new_schedule_data_attributes_shift_report_day_of_week import NewScheduleDataAttributesShiftReportDayOfWeek from .new_schedule_data_attributes_slack_channel_type_0 import NewScheduleDataAttributesSlackChannelType0 from .new_schedule_data_attributes_slack_user_group import NewScheduleDataAttributesSlackUserGroup from .new_schedule_data_type import NewScheduleDataType @@ -2146,6 +2452,10 @@ 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_shift_coverage_request import NewShiftCoverageRequest +from .new_shift_coverage_request_data import NewShiftCoverageRequestData +from .new_shift_coverage_request_data_attributes import NewShiftCoverageRequestDataAttributes +from .new_shift_coverage_request_data_type import NewShiftCoverageRequestDataType from .new_sla import NewSla from .new_sla_data import NewSlaData from .new_sla_data_attributes import NewSlaDataAttributes @@ -2193,6 +2503,7 @@ 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_auto_add_members_scope import NewTeamDataAttributesAutoAddMembersScope from .new_team_data_attributes_incident_broadcast_channel_type_0 import ( NewTeamDataAttributesIncidentBroadcastChannelType0, ) @@ -2218,9 +2529,21 @@ from .new_webhooks_endpoint import NewWebhooksEndpoint from .new_webhooks_endpoint_data import NewWebhooksEndpointData from .new_webhooks_endpoint_data_attributes import NewWebhooksEndpointDataAttributes +from .new_webhooks_endpoint_data_attributes_custom_headers_item import ( + NewWebhooksEndpointDataAttributesCustomHeadersItem, +) from .new_webhooks_endpoint_data_attributes_event_types_item import NewWebhooksEndpointDataAttributesEventTypesItem from .new_webhooks_endpoint_data_type import NewWebhooksEndpointDataType from .new_workflow import NewWorkflow +from .new_workflow_action_item_form_field_condition import NewWorkflowActionItemFormFieldCondition +from .new_workflow_action_item_form_field_condition_data import NewWorkflowActionItemFormFieldConditionData +from .new_workflow_action_item_form_field_condition_data_attributes import ( + NewWorkflowActionItemFormFieldConditionDataAttributes, +) +from .new_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, +) +from .new_workflow_action_item_form_field_condition_data_type import NewWorkflowActionItemFormFieldConditionDataType from .new_workflow_custom_field_selection import NewWorkflowCustomFieldSelection from .new_workflow_custom_field_selection_data import NewWorkflowCustomFieldSelectionData from .new_workflow_custom_field_selection_data_attributes import NewWorkflowCustomFieldSelectionDataAttributes @@ -2282,8 +2605,10 @@ from .on_call_role_alerts_permissions_item import OnCallRoleAlertsPermissionsItem from .on_call_role_api_keys_permissions_item import OnCallRoleApiKeysPermissionsItem from .on_call_role_audits_permissions_item import OnCallRoleAuditsPermissionsItem +from .on_call_role_catalogs_permissions_item import OnCallRoleCatalogsPermissionsItem from .on_call_role_contacts_permissions_item import OnCallRoleContactsPermissionsItem from .on_call_role_escalation_policies_permissions_item import OnCallRoleEscalationPoliciesPermissionsItem +from .on_call_role_functionalities_permissions_item import OnCallRoleFunctionalitiesPermissionsItem from .on_call_role_groups_permissions_item import OnCallRoleGroupsPermissionsItem from .on_call_role_heartbeats_permissions_item import OnCallRoleHeartbeatsPermissionsItem from .on_call_role_integrations_permissions_item import OnCallRoleIntegrationsPermissionsItem @@ -2313,6 +2638,21 @@ from .on_call_shadows_list import OnCallShadowsList from .on_call_shadows_list_data_item import OnCallShadowsListDataItem from .on_call_shadows_list_data_item_type import OnCallShadowsListDataItemType +from .oncall import Oncall +from .oncall_list import OncallList +from .oncall_list_data_item import OncallListDataItem +from .oncall_list_data_item_type import OncallListDataItemType +from .oncall_notification_type import OncallNotificationType +from .oncall_relationships import OncallRelationships +from .oncall_relationships_escalation_policy import OncallRelationshipsEscalationPolicy +from .oncall_relationships_escalation_policy_data_type_0 import OncallRelationshipsEscalationPolicyDataType0 +from .oncall_relationships_escalation_policy_data_type_0_type import OncallRelationshipsEscalationPolicyDataType0Type +from .oncall_relationships_schedule import OncallRelationshipsSchedule +from .oncall_relationships_schedule_data_type_0 import OncallRelationshipsScheduleDataType0 +from .oncall_relationships_schedule_data_type_0_type import OncallRelationshipsScheduleDataType0Type +from .oncall_relationships_user import OncallRelationshipsUser +from .oncall_relationships_user_data_type_0 import OncallRelationshipsUserDataType0 +from .oncall_relationships_user_data_type_0_type import OncallRelationshipsUserDataType0Type from .override_shift import OverrideShift from .override_shift_list import OverrideShiftList from .override_shift_list_data_item import OverrideShiftListDataItem @@ -2349,6 +2689,12 @@ from .page_rootly_on_call_responders_task_params_service_target import PageRootlyOnCallRespondersTaskParamsServiceTarget from .page_rootly_on_call_responders_task_params_task_type import PageRootlyOnCallRespondersTaskParamsTaskType from .page_rootly_on_call_responders_task_params_user_target import PageRootlyOnCallRespondersTaskParamsUserTarget +from .page_victor_ops_on_call_responders_task_params_type_0_users_item import ( + PageVictorOpsOnCallRespondersTaskParamsType0UsersItem, +) +from .page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item import ( + PageVictorOpsOnCallRespondersTaskParamsType1EscalationPoliciesItem, +) from .patch_alert_route import PatchAlertRoute from .patch_alert_route_data import PatchAlertRouteData from .patch_alert_route_data_attributes import PatchAlertRouteDataAttributes @@ -2401,12 +2747,12 @@ from .post_mortem_template_response_data_type import PostMortemTemplateResponseDataType from .post_mortem_trigger_params import PostMortemTriggerParams from .post_mortem_trigger_params_incident_condition import PostMortemTriggerParamsIncidentCondition -from .post_mortem_trigger_params_incident_condition_acknowledged_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1, +from .post_mortem_trigger_params_incident_condition_acknowledged_at import ( + PostMortemTriggerParamsIncidentConditionAcknowledgedAt, ) from .post_mortem_trigger_params_incident_condition_cause import PostMortemTriggerParamsIncidentConditionCause -from .post_mortem_trigger_params_incident_condition_detected_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionDetectedAtType1, +from .post_mortem_trigger_params_incident_condition_detected_at import ( + PostMortemTriggerParamsIncidentConditionDetectedAt, ) from .post_mortem_trigger_params_incident_condition_environment import ( PostMortemTriggerParamsIncidentConditionEnvironment, @@ -2422,25 +2768,22 @@ PostMortemTriggerParamsIncidentConditionIncidentType, ) from .post_mortem_trigger_params_incident_condition_kind import PostMortemTriggerParamsIncidentConditionKind -from .post_mortem_trigger_params_incident_condition_mitigated_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionMitigatedAtType1, +from .post_mortem_trigger_params_incident_condition_label import PostMortemTriggerParamsIncidentConditionLabel +from .post_mortem_trigger_params_incident_condition_mitigated_at import ( + PostMortemTriggerParamsIncidentConditionMitigatedAt, ) -from .post_mortem_trigger_params_incident_condition_resolved_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionResolvedAtType1, +from .post_mortem_trigger_params_incident_condition_resolved_at import ( + PostMortemTriggerParamsIncidentConditionResolvedAt, ) from .post_mortem_trigger_params_incident_condition_service import PostMortemTriggerParamsIncidentConditionService from .post_mortem_trigger_params_incident_condition_severity import PostMortemTriggerParamsIncidentConditionSeverity -from .post_mortem_trigger_params_incident_condition_started_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionStartedAtType1, -) +from .post_mortem_trigger_params_incident_condition_started_at import PostMortemTriggerParamsIncidentConditionStartedAt from .post_mortem_trigger_params_incident_condition_status import PostMortemTriggerParamsIncidentConditionStatus from .post_mortem_trigger_params_incident_condition_sub_status import PostMortemTriggerParamsIncidentConditionSubStatus -from .post_mortem_trigger_params_incident_condition_summary_type_1 import ( - PostMortemTriggerParamsIncidentConditionSummaryType1, -) +from .post_mortem_trigger_params_incident_condition_summary import PostMortemTriggerParamsIncidentConditionSummary from .post_mortem_trigger_params_incident_condition_visibility import PostMortemTriggerParamsIncidentConditionVisibility -from .post_mortem_trigger_params_incident_conditional_inactivity_type_1 import ( - PostMortemTriggerParamsIncidentConditionalInactivityType1, +from .post_mortem_trigger_params_incident_conditional_inactivity import ( + PostMortemTriggerParamsIncidentConditionalInactivity, ) from .post_mortem_trigger_params_incident_kinds_item import PostMortemTriggerParamsIncidentKindsItem from .post_mortem_trigger_params_incident_post_mortem_condition import ( @@ -2481,6 +2824,9 @@ from .pulse_trigger_params_pulse_condition_source import PulseTriggerParamsPulseConditionSource from .pulse_trigger_params_trigger_type import PulseTriggerParamsTriggerType from .pulse_trigger_params_triggers_item import PulseTriggerParamsTriggersItem +from .receipt import Receipt +from .receipt_reason import ReceiptReason +from .receipt_state import ReceiptState from .redis_client_task_params import RedisClientTaskParams from .redis_client_task_params_post_to_slack_channels_item import RedisClientTaskParamsPostToSlackChannelsItem from .redis_client_task_params_task_type import RedisClientTaskParamsTaskType @@ -2493,6 +2839,9 @@ from .remove_subscribers_data import RemoveSubscribersData from .remove_subscribers_data_attributes import RemoveSubscribersDataAttributes from .remove_subscribers_data_type import RemoveSubscribersDataType +from .rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams +from .rename_google_chat_space_task_params_space import RenameGoogleChatSpaceTaskParamsSpace +from .rename_google_chat_space_task_params_task_type import RenameGoogleChatSpaceTaskParamsTaskType from .rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from .rename_microsoft_teams_channel_task_params_channel import RenameMicrosoftTeamsChannelTaskParamsChannel from .rename_microsoft_teams_channel_task_params_task_type import RenameMicrosoftTeamsChannelTaskParamsTaskType @@ -2664,6 +3013,7 @@ from .schedule_rotation_user_response import ScheduleRotationUserResponse from .schedule_rotation_user_response_data import ScheduleRotationUserResponseData from .schedule_rotation_user_response_data_type import ScheduleRotationUserResponseDataType +from .schedule_shift_report_day_of_week import ScheduleShiftReportDayOfWeek from .schedule_slack_channel_type_0 import ScheduleSlackChannelType0 from .schedule_slack_user_group_type_0 import ScheduleSlackUserGroupType0 from .secret import Secret @@ -2677,9 +3027,31 @@ from .send_dashboard_report_task_params_task_type import SendDashboardReportTaskParamsTaskType from .send_email_task_params import SendEmailTaskParams from .send_email_task_params_task_type import SendEmailTaskParamsTaskType +from .send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams +from .send_google_chat_attachments_task_params_spaces_item import SendGoogleChatAttachmentsTaskParamsSpacesItem +from .send_google_chat_attachments_task_params_task_type import SendGoogleChatAttachmentsTaskParamsTaskType +from .send_google_chat_message_task_params import SendGoogleChatMessageTaskParams +from .send_google_chat_message_task_params_spaces_item import SendGoogleChatMessageTaskParamsSpacesItem +from .send_google_chat_message_task_params_task_type import SendGoogleChatMessageTaskParamsTaskType +from .send_microsoft_teams_blocks_task_params_type_0_channels_item import ( + SendMicrosoftTeamsBlocksTaskParamsType0ChannelsItem, +) from .send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams from .send_microsoft_teams_chat_message_task_params_chats_item import SendMicrosoftTeamsChatMessageTaskParamsChatsItem from .send_microsoft_teams_chat_message_task_params_task_type import SendMicrosoftTeamsChatMessageTaskParamsTaskType +from .send_microsoft_teams_message_task_params_type_0_channels_item import ( + SendMicrosoftTeamsMessageTaskParamsType0ChannelsItem, +) +from .send_slack_blocks_task_params_type_0_channels_item import SendSlackBlocksTaskParamsType0ChannelsItem +from .send_slack_blocks_task_params_type_1_slack_users_item import SendSlackBlocksTaskParamsType1SlackUsersItem +from .send_slack_blocks_task_params_type_2_slack_user_groups_item import ( + SendSlackBlocksTaskParamsType2SlackUserGroupsItem, +) +from .send_slack_message_task_params_type_0_channels_item import SendSlackMessageTaskParamsType0ChannelsItem +from .send_slack_message_task_params_type_1_slack_users_item import SendSlackMessageTaskParamsType1SlackUsersItem +from .send_slack_message_task_params_type_2_slack_user_groups_item import ( + SendSlackMessageTaskParamsType2SlackUserGroupsItem, +) from .send_sms_task_params import SendSmsTaskParams from .send_sms_task_params_task_type import SendSmsTaskParamsTaskType from .send_whatsapp_message_task_params import SendWhatsappMessageTaskParams @@ -2690,6 +3062,7 @@ from .service_list import ServiceList from .service_list_data_item import ServiceListDataItem from .service_list_data_item_type import ServiceListDataItemType +from .service_managed_by import ServiceManagedBy from .service_properties_type_0_item import ServicePropertiesType0Item from .service_response import ServiceResponse from .service_response_data import ServiceResponseData @@ -2707,6 +3080,13 @@ from .severity_slack_aliases_type_0_item import SeveritySlackAliasesType0Item from .severity_slack_channels_type_0_item import SeveritySlackChannelsType0Item from .shift import Shift +from .shift_coverage_request import ShiftCoverageRequest +from .shift_coverage_request_list import ShiftCoverageRequestList +from .shift_coverage_request_list_data_item import ShiftCoverageRequestListDataItem +from .shift_coverage_request_list_data_item_type import ShiftCoverageRequestListDataItemType +from .shift_coverage_request_response import ShiftCoverageRequestResponse +from .shift_coverage_request_response_data import ShiftCoverageRequestResponseData +from .shift_coverage_request_response_data_type import ShiftCoverageRequestResponseDataType from .shift_list import ShiftList from .shift_list_data_item import ShiftListDataItem from .shift_list_data_item_type import ShiftListDataItemType @@ -2739,6 +3119,7 @@ from .sla_response import SlaResponse from .sla_response_data import SlaResponseData from .sla_response_data_type import SlaResponseDataType +from .slack_channel import SlackChannel 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 ( @@ -2763,6 +3144,14 @@ SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem, ) from .snapshot_new_relic_graph_task_params_task_type import SnapshotNewRelicGraphTaskParamsTaskType +from .snooze_alert import SnoozeAlert +from .snooze_alert_data import SnoozeAlertData +from .snooze_alert_data_attributes import SnoozeAlertDataAttributes +from .snooze_alert_data_type import SnoozeAlertDataType +from .start_session_request import StartSessionRequest +from .start_session_request_platform import StartSessionRequestPlatform +from .start_session_response import StartSessionResponse +from .start_session_response_data import StartSessionResponseData from .status import Status from .status_list import StatusList from .status_list_data_item import StatusListDataItem @@ -2800,10 +3189,12 @@ from .sub_status_response_data_type import SubStatusResponseDataType from .team import Team from .team_alert_broadcast_channel_type_0 import TeamAlertBroadcastChannelType0 +from .team_auto_add_members_scope import TeamAutoAddMembersScope 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_managed_by import TeamManagedBy from .team_properties_type_0_item import TeamPropertiesType0Item from .team_response import TeamResponse from .team_response_data import TeamResponseData @@ -2843,7 +3234,6 @@ from .update_alert_data_attributes_data_type_0 import UpdateAlertDataAttributesDataType0 from .update_alert_data_attributes_labels_item_type_0 import UpdateAlertDataAttributesLabelsItemType0 from .update_alert_data_attributes_noise import UpdateAlertDataAttributesNoise -from .update_alert_data_attributes_source import UpdateAlertDataAttributesSource from .update_alert_data_type import UpdateAlertDataType from .update_alert_event import UpdateAlertEvent from .update_alert_event_data import UpdateAlertEventData @@ -3090,6 +3480,7 @@ from .update_communications_type_data_attributes import UpdateCommunicationsTypeDataAttributes from .update_communications_type_data_type import UpdateCommunicationsTypeDataType from .update_confluence_page_task_params import UpdateConfluencePageTaskParams +from .update_confluence_page_task_params_integration import UpdateConfluencePageTaskParamsIntegration from .update_confluence_page_task_params_task_type import UpdateConfluencePageTaskParamsTaskType from .update_confluence_page_task_params_template import UpdateConfluencePageTaskParamsTemplate from .update_custom_field import UpdateCustomField @@ -3176,6 +3567,7 @@ from .update_edge_connector_body import UpdateEdgeConnectorBody from .update_edge_connector_body_data import UpdateEdgeConnectorBodyData from .update_edge_connector_body_data_attributes import UpdateEdgeConnectorBodyDataAttributes +from .update_edge_connector_body_data_attributes_filters import UpdateEdgeConnectorBodyDataAttributesFilters from .update_edge_connector_body_data_attributes_status import UpdateEdgeConnectorBodyDataAttributesStatus from .update_edge_connector_body_data_type import UpdateEdgeConnectorBodyDataType from .update_edge_connector_edge_connector import UpdateEdgeConnectorEdgeConnector @@ -3234,6 +3626,204 @@ UpdateEscalationPolicyPathDataAttributesNotificationType, ) from .update_escalation_policy_path_data_attributes_path_type import UpdateEscalationPolicyPathDataAttributesPathType +from .update_escalation_policy_path_data_attributes_rules_item_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator, +) +from .update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType, +) from .update_escalation_policy_path_data_attributes_time_restriction_time_zone import ( UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, ) @@ -3307,6 +3897,7 @@ 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_labels_mode import UpdateGithubIssueTaskParamsLabelsMode 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 @@ -3321,6 +3912,11 @@ UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem, ) from .update_google_calendar_event_task_params_task_type import UpdateGoogleCalendarEventTaskParamsTaskType +from .update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams +from .update_google_chat_space_description_task_params_space import UpdateGoogleChatSpaceDescriptionTaskParamsSpace +from .update_google_chat_space_description_task_params_task_type import ( + UpdateGoogleChatSpaceDescriptionTaskParamsTaskType, +) from .update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from .update_google_docs_page_task_params_task_type import UpdateGoogleDocsPageTaskParamsTaskType from .update_heartbeat import UpdateHeartbeat @@ -3335,6 +3931,9 @@ from .update_incident_action_item import UpdateIncidentActionItem from .update_incident_action_item_data import UpdateIncidentActionItemData from .update_incident_action_item_data_attributes import UpdateIncidentActionItemDataAttributes +from .update_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item, +) from .update_incident_action_item_data_attributes_kind import UpdateIncidentActionItemDataAttributesKind from .update_incident_action_item_data_attributes_priority import UpdateIncidentActionItemDataAttributesPriority from .update_incident_action_item_data_attributes_status import UpdateIncidentActionItemDataAttributesStatus @@ -3454,6 +4053,7 @@ ) from .update_incident_type_data_type import UpdateIncidentTypeDataType from .update_jira_issue_task_params import UpdateJiraIssueTaskParams +from .update_jira_issue_task_params_integration import UpdateJiraIssueTaskParamsIntegration from .update_jira_issue_task_params_priority import UpdateJiraIssueTaskParamsPriority from .update_jira_issue_task_params_status import UpdateJiraIssueTaskParamsStatus from .update_jira_issue_task_params_task_type import UpdateJiraIssueTaskParamsTaskType @@ -3519,12 +4119,18 @@ from .update_on_call_role_data_attributes_audits_permissions_item import ( UpdateOnCallRoleDataAttributesAuditsPermissionsItem, ) +from .update_on_call_role_data_attributes_catalogs_permissions_item import ( + UpdateOnCallRoleDataAttributesCatalogsPermissionsItem, +) from .update_on_call_role_data_attributes_contacts_permissions_item import ( UpdateOnCallRoleDataAttributesContactsPermissionsItem, ) from .update_on_call_role_data_attributes_escalation_policies_permissions_item import ( UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, ) +from .update_on_call_role_data_attributes_functionalities_permissions_item import ( + UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem, +) from .update_on_call_role_data_attributes_groups_permissions_item import ( UpdateOnCallRoleDataAttributesGroupsPermissionsItem, ) @@ -3706,6 +4312,7 @@ from .update_schedule import UpdateSchedule from .update_schedule_data import UpdateScheduleData from .update_schedule_data_attributes import UpdateScheduleDataAttributes +from .update_schedule_data_attributes_shift_report_day_of_week import UpdateScheduleDataAttributesShiftReportDayOfWeek from .update_schedule_data_attributes_slack_channel_type_0 import UpdateScheduleDataAttributesSlackChannelType0 from .update_schedule_data_attributes_slack_user_group import UpdateScheduleDataAttributesSlackUserGroup from .update_schedule_data_type import UpdateScheduleDataType @@ -3861,6 +4468,7 @@ from .update_team_data_attributes_alert_broadcast_channel_type_0 import ( UpdateTeamDataAttributesAlertBroadcastChannelType0, ) +from .update_team_data_attributes_auto_add_members_scope import UpdateTeamDataAttributesAutoAddMembersScope from .update_team_data_attributes_incident_broadcast_channel_type_0 import ( UpdateTeamDataAttributesIncidentBroadcastChannelType0, ) @@ -3899,11 +4507,25 @@ from .update_webhooks_endpoint import UpdateWebhooksEndpoint from .update_webhooks_endpoint_data import UpdateWebhooksEndpointData from .update_webhooks_endpoint_data_attributes import UpdateWebhooksEndpointDataAttributes +from .update_webhooks_endpoint_data_attributes_custom_headers_item import ( + UpdateWebhooksEndpointDataAttributesCustomHeadersItem, +) from .update_webhooks_endpoint_data_attributes_event_types_item import ( UpdateWebhooksEndpointDataAttributesEventTypesItem, ) from .update_webhooks_endpoint_data_type import UpdateWebhooksEndpointDataType from .update_workflow import UpdateWorkflow +from .update_workflow_action_item_form_field_condition import UpdateWorkflowActionItemFormFieldCondition +from .update_workflow_action_item_form_field_condition_data import UpdateWorkflowActionItemFormFieldConditionData +from .update_workflow_action_item_form_field_condition_data_attributes import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributes, +) +from .update_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, +) +from .update_workflow_action_item_form_field_condition_data_type import ( + UpdateWorkflowActionItemFormFieldConditionDataType, +) from .update_workflow_custom_field_selection import UpdateWorkflowCustomFieldSelection from .update_workflow_custom_field_selection_data import UpdateWorkflowCustomFieldSelectionData from .update_workflow_custom_field_selection_data_attributes import UpdateWorkflowCustomFieldSelectionDataAttributes @@ -3935,6 +4557,7 @@ from .update_zendesk_ticket_task_params_priority import UpdateZendeskTicketTaskParamsPriority from .update_zendesk_ticket_task_params_task_type import UpdateZendeskTicketTaskParamsTaskType from .uptime_chart_response import UptimeChartResponse +from .uptime_chart_response_data import UptimeChartResponseData from .user import User from .user_email_address import UserEmailAddress from .user_email_address_list import UserEmailAddressList @@ -3976,6 +4599,7 @@ from .webhooks_delivery_response_data import WebhooksDeliveryResponseData from .webhooks_delivery_response_data_type import WebhooksDeliveryResponseDataType from .webhooks_endpoint import WebhooksEndpoint +from .webhooks_endpoint_custom_headers_item import WebhooksEndpointCustomHeadersItem from .webhooks_endpoint_event_types_item import WebhooksEndpointEventTypesItem from .webhooks_endpoint_list import WebhooksEndpointList from .webhooks_endpoint_list_data_item import WebhooksEndpointListDataItem @@ -3984,6 +4608,20 @@ from .webhooks_endpoint_response_data import WebhooksEndpointResponseData from .webhooks_endpoint_response_data_type import WebhooksEndpointResponseDataType from .workflow import Workflow +from .workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition +from .workflow_action_item_form_field_condition_action_item_condition import ( + WorkflowActionItemFormFieldConditionActionItemCondition, +) +from .workflow_action_item_form_field_condition_list import WorkflowActionItemFormFieldConditionList +from .workflow_action_item_form_field_condition_list_data_item import WorkflowActionItemFormFieldConditionListDataItem +from .workflow_action_item_form_field_condition_list_data_item_type import ( + WorkflowActionItemFormFieldConditionListDataItemType, +) +from .workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse +from .workflow_action_item_form_field_condition_response_data import WorkflowActionItemFormFieldConditionResponseData +from .workflow_action_item_form_field_condition_response_data_type import ( + WorkflowActionItemFormFieldConditionResponseDataType, +) from .workflow_custom_field_selection import WorkflowCustomFieldSelection from .workflow_custom_field_selection_incident_condition import WorkflowCustomFieldSelectionIncidentCondition from .workflow_custom_field_selection_list import WorkflowCustomFieldSelectionList @@ -4044,23 +4682,24 @@ "ActionItemTriggerParamsIncidentActionItemPrioritiesItem", "ActionItemTriggerParamsIncidentActionItemStatusesItem", "ActionItemTriggerParamsIncidentCondition", - "ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1", - "ActionItemTriggerParamsIncidentConditionalInactivityType1", - "ActionItemTriggerParamsIncidentConditionDetectedAtType1", + "ActionItemTriggerParamsIncidentConditionAcknowledgedAt", + "ActionItemTriggerParamsIncidentConditionalInactivity", + "ActionItemTriggerParamsIncidentConditionDetectedAt", "ActionItemTriggerParamsIncidentConditionEnvironment", "ActionItemTriggerParamsIncidentConditionFunctionality", "ActionItemTriggerParamsIncidentConditionGroup", "ActionItemTriggerParamsIncidentConditionIncidentRoles", "ActionItemTriggerParamsIncidentConditionIncidentType", "ActionItemTriggerParamsIncidentConditionKind", - "ActionItemTriggerParamsIncidentConditionMitigatedAtType1", - "ActionItemTriggerParamsIncidentConditionResolvedAtType1", + "ActionItemTriggerParamsIncidentConditionLabel", + "ActionItemTriggerParamsIncidentConditionMitigatedAt", + "ActionItemTriggerParamsIncidentConditionResolvedAt", "ActionItemTriggerParamsIncidentConditionService", "ActionItemTriggerParamsIncidentConditionSeverity", - "ActionItemTriggerParamsIncidentConditionStartedAtType1", + "ActionItemTriggerParamsIncidentConditionStartedAt", "ActionItemTriggerParamsIncidentConditionStatus", "ActionItemTriggerParamsIncidentConditionSubStatus", - "ActionItemTriggerParamsIncidentConditionSummaryType1", + "ActionItemTriggerParamsIncidentConditionSummary", "ActionItemTriggerParamsIncidentConditionVisibility", "ActionItemTriggerParamsIncidentKindsItem", "ActionItemTriggerParamsIncidentStatusesItem", @@ -4075,9 +4714,13 @@ "AddMicrosoftTeamsChatTabTaskParams", "AddMicrosoftTeamsChatTabTaskParamsChat", "AddMicrosoftTeamsChatTabTaskParamsTaskType", + "AddMicrosoftTeamsTabTaskParamsType0", + "AddMicrosoftTeamsTabTaskParamsType1", "AddRoleTaskParams", "AddRoleTaskParamsAssignedToUser", "AddRoleTaskParamsTaskType", + "AddSlackBookmarkTaskParamsType0", + "AddSlackBookmarkTaskParamsType1", "AddSubscribers", "AddSubscribersData", "AddSubscribersDataAttributes", @@ -4087,11 +4730,29 @@ "AddToTimelineTaskParams", "AddToTimelineTaskParamsPostToSlackChannelsItem", "AddToTimelineTaskParamsTaskType", + "AiChatResponse", + "AiChatResponseData", + "AiChatResponseDataAttributes", + "AiChatResponseDataAttributesStatus", + "AiChatResponseDataType", + "AiChatSessionMessage", + "AiChatSessionMessageList", + "AiChatSessionMessageListMeta", + "AiChatSessionMessageRole", "Alert", - "AlertAlertFieldValuesAttributesItemType0", + "AlertAlertFieldValuesType0Item", + "AlertAlertingTargetsType0Item", "AlertDataType0", "AlertEvent", "AlertEventAction", + "AlertEventEscalationTargetType0", + "AlertEventEscalationTargetType0Data", + "AlertEventEscalationTargetType0DataAttributes", + "AlertEventFeedList", + "AlertEventFeedListDataItem", + "AlertEventFeedListDataItemType", + "AlertEventFeedMeta", + "AlertEventIncidentType0", "AlertEventKind", "AlertEventList", "AlertEventListDataItem", @@ -4099,6 +4760,9 @@ "AlertEventResponse", "AlertEventResponseData", "AlertEventResponseDataType", + "AlertEventScheduleType0", + "AlertEventScheduleType0EscalationPoliciesItem", + "AlertEventUser", "AlertField", "AlertFieldList", "AlertFieldListDataItem", @@ -4124,12 +4788,11 @@ "AlertLabelsItemType0", "AlertList", "AlertListDataItem", - "AlertListDataItemSource", "AlertListDataItemType", "AlertNoise", + "AlertNotificationTargetType", "AlertResponse", "AlertResponseData", - "AlertResponseDataSource", "AlertResponseDataType", "AlertRoute", "AlertRouteList", @@ -4169,7 +4832,6 @@ "AlertRoutingRuleResponseDataType", "AlertRoutingRuleTargetType0", "AlertRoutingRuleTargetType0TargetType", - "AlertSource", "AlertsSource", "AlertsSourceAlertSourceFieldsAttributesItem", "AlertsSourceAlertSourceUrgencyRulesAttributesItem", @@ -4232,6 +4894,9 @@ "ApiKeyWithTokenResponseData", "ApiKeyWithTokenResponseDataAttributes", "ApiKeyWithTokenResponseDataType", + "ArchiveGoogleChatSpacesTaskParams", + "ArchiveGoogleChatSpacesTaskParamsSpacesItem", + "ArchiveGoogleChatSpacesTaskParamsTaskType", "ArchiveMicrosoftTeamsChannelsTaskParams", "ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem", "ArchiveMicrosoftTeamsChannelsTaskParamsTaskType", @@ -4251,6 +4916,9 @@ "AttachDatadogDashboardsTaskParamsDashboardsItem", "AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem", "AttachDatadogDashboardsTaskParamsTaskType", + "AttachRetrospectivePdfToJiraIssueTaskParams", + "AttachRetrospectivePdfToJiraIssueTaskParamsIntegration", + "AttachRetrospectivePdfToJiraIssueTaskParamsTaskType", "Audit", "AuditItemType", "AuditObjectChangesType0", @@ -4271,6 +4939,8 @@ "AutoAssignRoleOpsgenieTaskParams", "AutoAssignRoleOpsgenieTaskParamsSchedule", "AutoAssignRoleOpsgenieTaskParamsTaskType", + "AutoAssignRolePagerdutyTaskParamsType0Schedule", + "AutoAssignRolePagerdutyTaskParamsType1EscalationPolicy", "AutoAssignRoleRootlyTaskParams", "AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget", "AutoAssignRoleRootlyTaskParamsGroupTarget", @@ -4281,6 +4951,71 @@ "AutoAssignRoleVictorOpsTaskParams", "AutoAssignRoleVictorOpsTaskParamsTaskType", "AutoAssignRoleVictorOpsTaskParamsTeam", + "BulkDestroyCatalogEntitiesResponse", + "BulkDestroyCatalogEntitiesResponseData", + "BulkDestroyCatalogEntitiesType0", + "BulkDestroyCatalogEntitiesType1", + "BulkDestroyCatalogEntitiesType1ManagedBy", + "BulkDestroyEnvironmentsResponse", + "BulkDestroyEnvironmentsResponseData", + "BulkDestroyEnvironmentsType0", + "BulkDestroyEnvironmentsType1", + "BulkDestroyEnvironmentsType1ManagedBy", + "BulkDestroyFunctionalitiesResponse", + "BulkDestroyFunctionalitiesResponseData", + "BulkDestroyFunctionalitiesType0", + "BulkDestroyFunctionalitiesType1", + "BulkDestroyFunctionalitiesType1ManagedBy", + "BulkDestroyServicesResponse", + "BulkDestroyServicesResponseData", + "BulkDestroyServicesType0", + "BulkDestroyServicesType1", + "BulkDestroyServicesType1ManagedBy", + "BulkDestroyTeamsResponse", + "BulkDestroyTeamsResponseData", + "BulkDestroyTeamsType0", + "BulkDestroyTeamsType1", + "BulkDestroyTeamsType1ManagedBy", + "BulkUpsertCatalogEntities", + "BulkUpsertCatalogEntitiesEntitiesItem", + "BulkUpsertCatalogEntitiesEntitiesItemFieldsItem", + "BulkUpsertCatalogEntitiesError", + "BulkUpsertCatalogEntitiesErrorErrorsItem", + "BulkUpsertCatalogEntitiesResponse", + "BulkUpsertCatalogEntitiesResponseDataItem", + "BulkUpsertCatalogEntitiesResponseDataItemType", + "BulkUpsertEnvironments", + "BulkUpsertEnvironmentsEntitiesItem", + "BulkUpsertEnvironmentsEntitiesItemFieldsItem", + "BulkUpsertEnvironmentsError", + "BulkUpsertEnvironmentsErrorErrorsItem", + "BulkUpsertEnvironmentsResponse", + "BulkUpsertEnvironmentsResponseDataItem", + "BulkUpsertEnvironmentsResponseDataItemType", + "BulkUpsertFunctionalities", + "BulkUpsertFunctionalitiesEntitiesItem", + "BulkUpsertFunctionalitiesEntitiesItemFieldsItem", + "BulkUpsertFunctionalitiesError", + "BulkUpsertFunctionalitiesErrorErrorsItem", + "BulkUpsertFunctionalitiesResponse", + "BulkUpsertFunctionalitiesResponseDataItem", + "BulkUpsertFunctionalitiesResponseDataItemType", + "BulkUpsertServices", + "BulkUpsertServicesEntitiesItem", + "BulkUpsertServicesEntitiesItemFieldsItem", + "BulkUpsertServicesError", + "BulkUpsertServicesErrorErrorsItem", + "BulkUpsertServicesResponse", + "BulkUpsertServicesResponseDataItem", + "BulkUpsertServicesResponseDataItemType", + "BulkUpsertTeams", + "BulkUpsertTeamsEntitiesItem", + "BulkUpsertTeamsEntitiesItemFieldsItem", + "BulkUpsertTeamsError", + "BulkUpsertTeamsErrorErrorsItem", + "BulkUpsertTeamsResponse", + "BulkUpsertTeamsResponseDataItem", + "BulkUpsertTeamsResponseDataItemType", "CallPeopleTaskParams", "CallPeopleTaskParamsTaskType", "CancelIncident", @@ -4323,6 +5058,7 @@ "CatalogEntityList", "CatalogEntityListDataItem", "CatalogEntityListDataItemType", + "CatalogEntityManagedBy", "CatalogEntityPropertiesItem", "CatalogEntityProperty", "CatalogEntityPropertyKey", @@ -4341,6 +5077,7 @@ "CatalogFieldList", "CatalogFieldListDataItem", "CatalogFieldListDataItemType", + "CatalogFieldManagedBy", "CatalogFieldResponse", "CatalogFieldResponseData", "CatalogFieldResponseDataType", @@ -4348,12 +5085,14 @@ "CatalogList", "CatalogListDataItem", "CatalogListDataItemType", + "CatalogManagedBy", "CatalogProperty", "CatalogPropertyCatalogType", "CatalogPropertyKind", "CatalogPropertyList", "CatalogPropertyListDataItem", "CatalogPropertyListDataItemType", + "CatalogPropertyManagedBy", "CatalogPropertyResponse", "CatalogPropertyResponseData", "CatalogPropertyResponseDataType", @@ -4368,6 +5107,9 @@ "CauseResponse", "CauseResponseData", "CauseResponseDataType", + "ChangeGoogleChatSpacePrivacyTaskParams", + "ChangeGoogleChatSpacePrivacyTaskParamsSpace", + "ChangeGoogleChatSpacePrivacyTaskParamsTaskType", "ChangeSlackChannelPrivacyTaskParams", "ChangeSlackChannelPrivacyTaskParamsChannel", "ChangeSlackChannelPrivacyTaskParamsPrivacy", @@ -4458,6 +5200,7 @@ "CreateEdgeConnectorBody", "CreateEdgeConnectorBodyData", "CreateEdgeConnectorBodyDataAttributes", + "CreateEdgeConnectorBodyDataAttributesFilters", "CreateEdgeConnectorBodyDataAttributesStatus", "CreateEdgeConnectorBodyDataType", "CreateGithubIssueTaskParams", @@ -4473,6 +5216,8 @@ "CreateGoogleCalendarEventTaskParamsConferenceSolutionKey", "CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem", "CreateGoogleCalendarEventTaskParamsTaskType", + "CreateGoogleChatSpaceTaskParams", + "CreateGoogleChatSpaceTaskParamsTaskType", "CreateGoogleDocsPageTaskParams", "CreateGoogleDocsPageTaskParamsDrive", "CreateGoogleDocsPageTaskParamsParentFolder", @@ -4589,6 +5334,8 @@ "CreateSharepointPageTaskParamsParentFolder", "CreateSharepointPageTaskParamsSite", "CreateSharepointPageTaskParamsTaskType", + "CreateShortcutStoryTaskParamsType0Project", + "CreateShortcutStoryTaskParamsType1WorkflowState", "CreateShortcutTaskTaskParams", "CreateShortcutTaskTaskParamsCompletion", "CreateShortcutTaskTaskParamsTaskType", @@ -4704,6 +5451,7 @@ "EnvironmentList", "EnvironmentListDataItem", "EnvironmentListDataItemType", + "EnvironmentManagedBy", "EnvironmentPropertiesType0Item", "EnvironmentResponse", "EnvironmentResponseData", @@ -4712,22 +5460,10 @@ "EnvironmentSlackChannelsType0Item", "ErrorsList", "ErrorsListErrorsItem", - "EscalationPathRuleAlertUrgency", - "EscalationPathRuleAlertUrgencyRuleType", - "EscalationPathRuleDeferralWindow", - "EscalationPathRuleDeferralWindowRuleType", - "EscalationPathRuleDeferralWindowTimeBlocksItem", - "EscalationPathRuleDeferralWindowTimeZone", - "EscalationPathRuleField", - "EscalationPathRuleFieldOperator", - "EscalationPathRuleFieldRuleType", - "EscalationPathRuleJsonPath", - "EscalationPathRuleJsonPathOperator", - "EscalationPathRuleJsonPathRuleType", - "EscalationPathRuleService", - "EscalationPathRuleServiceRuleType", - "EscalationPathRuleWorkingHour", - "EscalationPathRuleWorkingHourRuleType", + "EscalateAlert", + "EscalateAlertData", + "EscalateAlertDataAttributes", + "EscalateAlertDataType", "EscalationPolicy", "EscalationPolicyBusinessHoursType0", "EscalationPolicyBusinessHoursType0DaysType0Item", @@ -4755,6 +5491,72 @@ "EscalationPolicyPathResponse", "EscalationPolicyPathResponseData", "EscalationPolicyPathResponseDataType", + "EscalationPolicyPathRulesItemType0", + "EscalationPolicyPathRulesItemType0RuleType", + "EscalationPolicyPathRulesItemType1", + "EscalationPolicyPathRulesItemType1RuleType", + "EscalationPolicyPathRulesItemType2", + "EscalationPolicyPathRulesItemType2Operator", + "EscalationPolicyPathRulesItemType2RuleType", + "EscalationPolicyPathRulesItemType3", + "EscalationPolicyPathRulesItemType3Operator", + "EscalationPolicyPathRulesItemType3RuleType", + "EscalationPolicyPathRulesItemType4", + "EscalationPolicyPathRulesItemType4RuleType", + "EscalationPolicyPathRulesItemType5", + "EscalationPolicyPathRulesItemType5RuleType", + "EscalationPolicyPathRulesItemType5TimeBlocksItem", + "EscalationPolicyPathRulesItemType5TimeZone", + "EscalationPolicyPathRulesItemType6", + "EscalationPolicyPathRulesItemType6Operator", + "EscalationPolicyPathRulesItemType6RuleType", + "EscalationPolicyPathRulesItemType7", + "EscalationPolicyPathRulesItemType7Operator", + "EscalationPolicyPathRulesItemType7RuleType", + "EscalationPolicyPathRulesItemType8Type0", + "EscalationPolicyPathRulesItemType8Type0RuleType", + "EscalationPolicyPathRulesItemType8Type1", + "EscalationPolicyPathRulesItemType8Type1RuleType", + "EscalationPolicyPathRulesItemType8Type2", + "EscalationPolicyPathRulesItemType8Type2Operator", + "EscalationPolicyPathRulesItemType8Type2RuleType", + "EscalationPolicyPathRulesItemType8Type3", + "EscalationPolicyPathRulesItemType8Type3Operator", + "EscalationPolicyPathRulesItemType8Type3RuleType", + "EscalationPolicyPathRulesItemType8Type4", + "EscalationPolicyPathRulesItemType8Type4RuleType", + "EscalationPolicyPathRulesItemType8Type5", + "EscalationPolicyPathRulesItemType8Type5RuleType", + "EscalationPolicyPathRulesItemType8Type5TimeBlocksItem", + "EscalationPolicyPathRulesItemType8Type5TimeZone", + "EscalationPolicyPathRulesItemType8Type6", + "EscalationPolicyPathRulesItemType8Type6Operator", + "EscalationPolicyPathRulesItemType8Type6RuleType", + "EscalationPolicyPathRulesItemType8Type7", + "EscalationPolicyPathRulesItemType8Type7Operator", + "EscalationPolicyPathRulesItemType8Type7RuleType", + "EscalationPolicyPathRulesItemType9Type0", + "EscalationPolicyPathRulesItemType9Type0RuleType", + "EscalationPolicyPathRulesItemType9Type1", + "EscalationPolicyPathRulesItemType9Type1RuleType", + "EscalationPolicyPathRulesItemType9Type2", + "EscalationPolicyPathRulesItemType9Type2Operator", + "EscalationPolicyPathRulesItemType9Type2RuleType", + "EscalationPolicyPathRulesItemType9Type3", + "EscalationPolicyPathRulesItemType9Type3Operator", + "EscalationPolicyPathRulesItemType9Type3RuleType", + "EscalationPolicyPathRulesItemType9Type4", + "EscalationPolicyPathRulesItemType9Type4RuleType", + "EscalationPolicyPathRulesItemType9Type5", + "EscalationPolicyPathRulesItemType9Type5RuleType", + "EscalationPolicyPathRulesItemType9Type5TimeBlocksItem", + "EscalationPolicyPathRulesItemType9Type5TimeZone", + "EscalationPolicyPathRulesItemType9Type6", + "EscalationPolicyPathRulesItemType9Type6Operator", + "EscalationPolicyPathRulesItemType9Type6RuleType", + "EscalationPolicyPathRulesItemType9Type7", + "EscalationPolicyPathRulesItemType9Type7Operator", + "EscalationPolicyPathRulesItemType9Type7RuleType", "EscalationPolicyPathTimeRestrictionsItem", "EscalationPolicyPathTimeRestrictionsItemEndDay", "EscalationPolicyPathTimeRestrictionsItemStartDay", @@ -4824,6 +5626,7 @@ "FunctionalityList", "FunctionalityListDataItem", "FunctionalityListDataItemType", + "FunctionalityManagedBy", "FunctionalityPropertiesType0Item", "FunctionalityResponse", "FunctionalityResponseData", @@ -4844,8 +5647,13 @@ "GetEscalationPathInclude", "GetEscalationPolicyInclude", "GetFormFieldInclude", + "GetGithubCommitsTaskParamsType0", + "GetGithubCommitsTaskParamsType1", + "GetGitlabCommitsTaskParamsType0", + "GetGitlabCommitsTaskParamsType1", "GetIncidentInclude", "GetIncidentSubStatusInclude", + "GetMeetingRecordingInclude", "GetPlaybookInclude", "GetPulsesTaskParams", "GetPulsesTaskParamsParentMessageThreadTask", @@ -4871,6 +5679,9 @@ "HttpClientTaskParamsMethod", "HttpClientTaskParamsPostToSlackChannelsItem", "HttpClientTaskParamsTaskType", + "ImportMeetingRecording", + "ImportMeetingRecordingPlatform", + "ImportMeetingRecordingSource", "Incident", "IncidentActionItem", "IncidentActionItemKind", @@ -4996,6 +5807,7 @@ "IncidentRoleTaskResponseData", "IncidentRoleTaskResponseDataType", "IncidentsChartResponse", + "IncidentsChartResponseData", "IncidentStartedByType0", "IncidentStatusPageEvent", "IncidentStatusPageEventList", @@ -5014,24 +5826,25 @@ "IncidentSubStatusResponseDataType", "IncidentTriggerParams", "IncidentTriggerParamsIncidentCondition", - "IncidentTriggerParamsIncidentConditionAcknowledgedAtType1", - "IncidentTriggerParamsIncidentConditionalInactivityType1", + "IncidentTriggerParamsIncidentConditionAcknowledgedAt", + "IncidentTriggerParamsIncidentConditionalInactivity", "IncidentTriggerParamsIncidentConditionCause", - "IncidentTriggerParamsIncidentConditionDetectedAtType1", + "IncidentTriggerParamsIncidentConditionDetectedAt", "IncidentTriggerParamsIncidentConditionEnvironment", "IncidentTriggerParamsIncidentConditionFunctionality", "IncidentTriggerParamsIncidentConditionGroup", "IncidentTriggerParamsIncidentConditionIncidentRoles", "IncidentTriggerParamsIncidentConditionIncidentType", "IncidentTriggerParamsIncidentConditionKind", - "IncidentTriggerParamsIncidentConditionMitigatedAtType1", - "IncidentTriggerParamsIncidentConditionResolvedAtType1", + "IncidentTriggerParamsIncidentConditionLabel", + "IncidentTriggerParamsIncidentConditionMitigatedAt", + "IncidentTriggerParamsIncidentConditionResolvedAt", "IncidentTriggerParamsIncidentConditionService", "IncidentTriggerParamsIncidentConditionSeverity", - "IncidentTriggerParamsIncidentConditionStartedAtType1", + "IncidentTriggerParamsIncidentConditionStartedAt", "IncidentTriggerParamsIncidentConditionStatus", "IncidentTriggerParamsIncidentConditionSubStatus", - "IncidentTriggerParamsIncidentConditionSummaryType1", + "IncidentTriggerParamsIncidentConditionSummary", "IncidentTriggerParamsIncidentConditionVisibility", "IncidentTriggerParamsIncidentKindsItem", "IncidentTriggerParamsIncidentPostMortemConditionCause", @@ -5052,6 +5865,18 @@ "InTriageIncident", "InTriageIncidentData", "InTriageIncidentDataType", + "InviteToGoogleChatSpaceTaskParams", + "InviteToGoogleChatSpaceTaskParamsSpace", + "InviteToGoogleChatSpaceTaskParamsTaskType", + "InviteToMicrosoftTeamsChannelRootlyTaskParams", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam", + "InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget", "InviteToMicrosoftTeamsChannelTaskParams", "InviteToMicrosoftTeamsChannelTaskParamsChannel", "InviteToMicrosoftTeamsChannelTaskParamsTaskType", @@ -5060,6 +5885,8 @@ "InviteToSlackChannelOpsgenieTaskParamsChannelsItem", "InviteToSlackChannelOpsgenieTaskParamsSchedule", "InviteToSlackChannelOpsgenieTaskParamsTaskType", + "InviteToSlackChannelPagerdutyTaskParamsType0EscalationPolicy", + "InviteToSlackChannelPagerdutyTaskParamsType1Schedule", "InviteToSlackChannelRootlyTaskParams", "InviteToSlackChannelRootlyTaskParamsChannelsItem", "InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget", @@ -5068,6 +5895,9 @@ "InviteToSlackChannelRootlyTaskParamsServiceTarget", "InviteToSlackChannelRootlyTaskParamsTaskType", "InviteToSlackChannelRootlyTaskParamsUserTarget", + "InviteToSlackChannelTaskParamsType0SlackUsersItem", + "InviteToSlackChannelTaskParamsType1SlackUserGroupsItem", + "InviteToSlackChannelTaskParamsType2", "InviteToSlackChannelVictorOpsTaskParams", "InviteToSlackChannelVictorOpsTaskParamsChannelsItem", "InviteToSlackChannelVictorOpsTaskParamsTaskType", @@ -5076,7 +5906,13 @@ "IpRangesResponse", "IpRangesResponseData", "IpRangesResponseDataType", + "JsonapiIncludedResource", + "JsonapiIncludedResourceAttributes", + "JsonapiIncludedResourceRelationships", "Links", + "ListAlertEventsFeedFilteraction", + "ListAlertEventsFeedFilterkind", + "ListAlertEventsFeedSort", "ListAlertsInclude", "ListCatalogChecklistTemplatesInclude", "ListCatalogChecklistTemplatesSort", @@ -5093,6 +5929,7 @@ "ListDashboardsInclude", "ListEnvironmentCatalogPropertiesInclude", "ListEnvironmentCatalogPropertiesSort", + "ListEscalationPathsFilterpathType", "ListEscalationPathsInclude", "ListEscalationPoliciesInclude", "ListFormFieldsInclude", @@ -5138,11 +5975,21 @@ "LiveCallRouterResponseDataType", "LiveCallRouterWaitingMusicUrl", "MeetingRecording", + "MeetingRecordingDetail", + "MeetingRecordingDetailResponse", + "MeetingRecordingDetailResponseData", + "MeetingRecordingDetailResponseDataType", + "MeetingRecordingDetailTranscriptType1", "MeetingRecordingList", "MeetingRecordingListDataItem", "MeetingRecordingListDataItemType", "MeetingRecordingPlatform", + "MeetingRecordingResponse", + "MeetingRecordingResponseData", + "MeetingRecordingResponseDataType", "MeetingRecordingStatus", + "MeetingRecordingTranscriptSegment", + "MeetingRecordingTranscriptWord", "Meta", "MitigateIncident", "MitigateIncidentData", @@ -5155,8 +6002,9 @@ "NewAlertDataAttributesDataType0", "NewAlertDataAttributesLabelsItemType0", "NewAlertDataAttributesNoise", + "NewAlertDataAttributesNotificationTargetsType0Item", + "NewAlertDataAttributesNotificationTargetsType0ItemType", "NewAlertDataAttributesNotificationTargetType", - "NewAlertDataAttributesSource", "NewAlertDataAttributesStatus", "NewAlertDataType", "NewAlertEvent", @@ -5390,6 +6238,28 @@ "NewEscalationPolicyPathDataAttributesMatchMode", "NewEscalationPolicyPathDataAttributesNotificationType", "NewEscalationPolicyPathDataAttributesPathType", + "NewEscalationPolicyPathDataAttributesRulesItemType0", + "NewEscalationPolicyPathDataAttributesRulesItemType0RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType1", + "NewEscalationPolicyPathDataAttributesRulesItemType1RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType2", + "NewEscalationPolicyPathDataAttributesRulesItemType2Operator", + "NewEscalationPolicyPathDataAttributesRulesItemType2RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType3", + "NewEscalationPolicyPathDataAttributesRulesItemType3Operator", + "NewEscalationPolicyPathDataAttributesRulesItemType3RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType4", + "NewEscalationPolicyPathDataAttributesRulesItemType4RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType5", + "NewEscalationPolicyPathDataAttributesRulesItemType5RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem", + "NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone", + "NewEscalationPolicyPathDataAttributesRulesItemType6", + "NewEscalationPolicyPathDataAttributesRulesItemType6Operator", + "NewEscalationPolicyPathDataAttributesRulesItemType6RuleType", + "NewEscalationPolicyPathDataAttributesRulesItemType7", + "NewEscalationPolicyPathDataAttributesRulesItemType7Operator", + "NewEscalationPolicyPathDataAttributesRulesItemType7RuleType", "NewEscalationPolicyPathDataAttributesTimeRestrictionsItem", "NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay", "NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay", @@ -5450,6 +6320,7 @@ "NewIncidentActionItem", "NewIncidentActionItemData", "NewIncidentActionItemDataAttributes", + "NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item", "NewIncidentActionItemDataAttributesKind", "NewIncidentActionItemDataAttributesPriority", "NewIncidentActionItemDataAttributesStatus", @@ -5558,8 +6429,10 @@ "NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem", "NewOnCallRoleDataAttributesApiKeysPermissionsItem", "NewOnCallRoleDataAttributesAuditsPermissionsItem", + "NewOnCallRoleDataAttributesCatalogsPermissionsItem", "NewOnCallRoleDataAttributesContactsPermissionsItem", "NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem", + "NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem", "NewOnCallRoleDataAttributesGroupsPermissionsItem", "NewOnCallRoleDataAttributesHeartbeatsPermissionsItem", "NewOnCallRoleDataAttributesIntegrationsPermissionsItem", @@ -5661,6 +6534,7 @@ "NewSchedule", "NewScheduleData", "NewScheduleDataAttributes", + "NewScheduleDataAttributesShiftReportDayOfWeek", "NewScheduleDataAttributesSlackChannelType0", "NewScheduleDataAttributesSlackUserGroup", "NewScheduleDataType", @@ -5712,6 +6586,10 @@ "NewSeverityDataAttributesSlackAliasesType0Item", "NewSeverityDataAttributesSlackChannelsType0Item", "NewSeverityDataType", + "NewShiftCoverageRequest", + "NewShiftCoverageRequestData", + "NewShiftCoverageRequestDataAttributes", + "NewShiftCoverageRequestDataType", "NewSla", "NewSlaData", "NewSlaDataAttributes", @@ -5749,6 +6627,7 @@ "NewTeamData", "NewTeamDataAttributes", "NewTeamDataAttributesAlertBroadcastChannelType0", + "NewTeamDataAttributesAutoAddMembersScope", "NewTeamDataAttributesIncidentBroadcastChannelType0", "NewTeamDataAttributesPropertiesItem", "NewTeamDataAttributesSlackAliasesType0Item", @@ -5770,9 +6649,15 @@ "NewWebhooksEndpoint", "NewWebhooksEndpointData", "NewWebhooksEndpointDataAttributes", + "NewWebhooksEndpointDataAttributesCustomHeadersItem", "NewWebhooksEndpointDataAttributesEventTypesItem", "NewWebhooksEndpointDataType", "NewWorkflow", + "NewWorkflowActionItemFormFieldCondition", + "NewWorkflowActionItemFormFieldConditionData", + "NewWorkflowActionItemFormFieldConditionDataAttributes", + "NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition", + "NewWorkflowActionItemFormFieldConditionDataType", "NewWorkflowCustomFieldSelection", "NewWorkflowCustomFieldSelectionData", "NewWorkflowCustomFieldSelectionDataAttributes", @@ -5812,6 +6697,11 @@ "NewWorkflowTaskData", "NewWorkflowTaskDataAttributes", "NewWorkflowTaskDataType", + "Oncall", + "OncallList", + "OncallListDataItem", + "OncallListDataItemType", + "OncallNotificationType", "OnCallPayReport", "OnCallPayReportList", "OnCallPayReportListDataItem", @@ -5821,6 +6711,16 @@ "OnCallPayReportResponseData", "OnCallPayReportResponseDataType", "OnCallPayReportStatus", + "OncallRelationships", + "OncallRelationshipsEscalationPolicy", + "OncallRelationshipsEscalationPolicyDataType0", + "OncallRelationshipsEscalationPolicyDataType0Type", + "OncallRelationshipsSchedule", + "OncallRelationshipsScheduleDataType0", + "OncallRelationshipsScheduleDataType0Type", + "OncallRelationshipsUser", + "OncallRelationshipsUserDataType0", + "OncallRelationshipsUserDataType0Type", "OnCallRole", "OnCallRoleAlertFieldsPermissionsItem", "OnCallRoleAlertGroupsPermissionsItem", @@ -5830,8 +6730,10 @@ "OnCallRoleAlertUrgencyPermissionsItem", "OnCallRoleApiKeysPermissionsItem", "OnCallRoleAuditsPermissionsItem", + "OnCallRoleCatalogsPermissionsItem", "OnCallRoleContactsPermissionsItem", "OnCallRoleEscalationPoliciesPermissionsItem", + "OnCallRoleFunctionalitiesPermissionsItem", "OnCallRoleGroupsPermissionsItem", "OnCallRoleHeartbeatsPermissionsItem", "OnCallRoleIntegrationsPermissionsItem", @@ -5891,6 +6793,8 @@ "PageRootlyOnCallRespondersTaskParamsServiceTarget", "PageRootlyOnCallRespondersTaskParamsTaskType", "PageRootlyOnCallRespondersTaskParamsUserTarget", + "PageVictorOpsOnCallRespondersTaskParamsType0UsersItem", + "PageVictorOpsOnCallRespondersTaskParamsType1EscalationPoliciesItem", "PatchAlertRoute", "PatchAlertRouteData", "PatchAlertRouteDataAttributes", @@ -5929,24 +6833,25 @@ "PostMortemTemplateResponseDataType", "PostMortemTriggerParams", "PostMortemTriggerParamsIncidentCondition", - "PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1", - "PostMortemTriggerParamsIncidentConditionalInactivityType1", + "PostMortemTriggerParamsIncidentConditionAcknowledgedAt", + "PostMortemTriggerParamsIncidentConditionalInactivity", "PostMortemTriggerParamsIncidentConditionCause", - "PostMortemTriggerParamsIncidentConditionDetectedAtType1", + "PostMortemTriggerParamsIncidentConditionDetectedAt", "PostMortemTriggerParamsIncidentConditionEnvironment", "PostMortemTriggerParamsIncidentConditionFunctionality", "PostMortemTriggerParamsIncidentConditionGroup", "PostMortemTriggerParamsIncidentConditionIncidentRoles", "PostMortemTriggerParamsIncidentConditionIncidentType", "PostMortemTriggerParamsIncidentConditionKind", - "PostMortemTriggerParamsIncidentConditionMitigatedAtType1", - "PostMortemTriggerParamsIncidentConditionResolvedAtType1", + "PostMortemTriggerParamsIncidentConditionLabel", + "PostMortemTriggerParamsIncidentConditionMitigatedAt", + "PostMortemTriggerParamsIncidentConditionResolvedAt", "PostMortemTriggerParamsIncidentConditionService", "PostMortemTriggerParamsIncidentConditionSeverity", - "PostMortemTriggerParamsIncidentConditionStartedAtType1", + "PostMortemTriggerParamsIncidentConditionStartedAt", "PostMortemTriggerParamsIncidentConditionStatus", "PostMortemTriggerParamsIncidentConditionSubStatus", - "PostMortemTriggerParamsIncidentConditionSummaryType1", + "PostMortemTriggerParamsIncidentConditionSummary", "PostMortemTriggerParamsIncidentConditionVisibility", "PostMortemTriggerParamsIncidentKindsItem", "PostMortemTriggerParamsIncidentPostMortemCondition", @@ -5979,6 +6884,9 @@ "PulseTriggerParamsPulseConditionSource", "PulseTriggerParamsTriggersItem", "PulseTriggerParamsTriggerType", + "Receipt", + "ReceiptReason", + "ReceiptState", "RedisClientTaskParams", "RedisClientTaskParamsPostToSlackChannelsItem", "RedisClientTaskParamsTaskType", @@ -5989,6 +6897,9 @@ "RemoveSubscribersData", "RemoveSubscribersDataAttributes", "RemoveSubscribersDataType", + "RenameGoogleChatSpaceTaskParams", + "RenameGoogleChatSpaceTaskParamsSpace", + "RenameGoogleChatSpaceTaskParamsTaskType", "RenameMicrosoftTeamsChannelTaskParams", "RenameMicrosoftTeamsChannelTaskParamsChannel", "RenameMicrosoftTeamsChannelTaskParamsTaskType", @@ -6138,6 +7049,7 @@ "ScheduleRotationUserResponse", "ScheduleRotationUserResponseData", "ScheduleRotationUserResponseDataType", + "ScheduleShiftReportDayOfWeek", "ScheduleSlackChannelType0", "ScheduleSlackUserGroupType0", "Secret", @@ -6151,9 +7063,23 @@ "SendDashboardReportTaskParamsTaskType", "SendEmailTaskParams", "SendEmailTaskParamsTaskType", + "SendGoogleChatAttachmentsTaskParams", + "SendGoogleChatAttachmentsTaskParamsSpacesItem", + "SendGoogleChatAttachmentsTaskParamsTaskType", + "SendGoogleChatMessageTaskParams", + "SendGoogleChatMessageTaskParamsSpacesItem", + "SendGoogleChatMessageTaskParamsTaskType", + "SendMicrosoftTeamsBlocksTaskParamsType0ChannelsItem", "SendMicrosoftTeamsChatMessageTaskParams", "SendMicrosoftTeamsChatMessageTaskParamsChatsItem", "SendMicrosoftTeamsChatMessageTaskParamsTaskType", + "SendMicrosoftTeamsMessageTaskParamsType0ChannelsItem", + "SendSlackBlocksTaskParamsType0ChannelsItem", + "SendSlackBlocksTaskParamsType1SlackUsersItem", + "SendSlackBlocksTaskParamsType2SlackUserGroupsItem", + "SendSlackMessageTaskParamsType0ChannelsItem", + "SendSlackMessageTaskParamsType1SlackUsersItem", + "SendSlackMessageTaskParamsType2SlackUserGroupsItem", "SendSmsTaskParams", "SendSmsTaskParamsTaskType", "SendWhatsappMessageTaskParams", @@ -6164,6 +7090,7 @@ "ServiceList", "ServiceListDataItem", "ServiceListDataItemType", + "ServiceManagedBy", "ServicePropertiesType0Item", "ServiceResponse", "ServiceResponseData", @@ -6181,6 +7108,13 @@ "SeveritySlackAliasesType0Item", "SeveritySlackChannelsType0Item", "Shift", + "ShiftCoverageRequest", + "ShiftCoverageRequestList", + "ShiftCoverageRequestListDataItem", + "ShiftCoverageRequestListDataItemType", + "ShiftCoverageRequestResponse", + "ShiftCoverageRequestResponseData", + "ShiftCoverageRequestResponseDataType", "ShiftList", "ShiftListDataItem", "ShiftListDataItemType", @@ -6201,6 +7135,7 @@ "SimpleTriggerParamsTriggersItem", "SimpleTriggerParamsTriggerType", "Sla", + "SlackChannel", "SlaConditionMatchType", "SlaConditionsItem", "SlaConditionsItemConditionableType", @@ -6229,6 +7164,14 @@ "SnapshotNewRelicGraphTaskParamsMetricType", "SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem", "SnapshotNewRelicGraphTaskParamsTaskType", + "SnoozeAlert", + "SnoozeAlertData", + "SnoozeAlertDataAttributes", + "SnoozeAlertDataType", + "StartSessionRequest", + "StartSessionRequestPlatform", + "StartSessionResponse", + "StartSessionResponseData", "Status", "StatusList", "StatusListDataItem", @@ -6266,10 +7209,12 @@ "SubStatusResponseDataType", "Team", "TeamAlertBroadcastChannelType0", + "TeamAutoAddMembersScope", "TeamIncidentBroadcastChannelType0", "TeamList", "TeamListDataItem", "TeamListDataItemType", + "TeamManagedBy", "TeamPropertiesType0Item", "TeamResponse", "TeamResponseData", @@ -6307,7 +7252,6 @@ "UpdateAlertDataAttributesDataType0", "UpdateAlertDataAttributesLabelsItemType0", "UpdateAlertDataAttributesNoise", - "UpdateAlertDataAttributesSource", "UpdateAlertDataType", "UpdateAlertEvent", "UpdateAlertEventData", @@ -6466,6 +7410,7 @@ "UpdateCommunicationsTypeDataAttributes", "UpdateCommunicationsTypeDataType", "UpdateConfluencePageTaskParams", + "UpdateConfluencePageTaskParamsIntegration", "UpdateConfluencePageTaskParamsTaskType", "UpdateConfluencePageTaskParamsTemplate", "UpdateCustomField", @@ -6528,6 +7473,7 @@ "UpdateEdgeConnectorBody", "UpdateEdgeConnectorBodyData", "UpdateEdgeConnectorBodyDataAttributes", + "UpdateEdgeConnectorBodyDataAttributesFilters", "UpdateEdgeConnectorBodyDataAttributesStatus", "UpdateEdgeConnectorBodyDataType", "UpdateEdgeConnectorEdgeConnector", @@ -6562,6 +7508,72 @@ "UpdateEscalationPolicyPathDataAttributesMatchMode", "UpdateEscalationPolicyPathDataAttributesNotificationType", "UpdateEscalationPolicyPathDataAttributesPathType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType0", + "UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType1", + "UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType2", + "UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType3", + "UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType4", + "UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType5", + "UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem", + "UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone", + "UpdateEscalationPolicyPathDataAttributesRulesItemType6", + "UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType7", + "UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator", + "UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType", "UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem", "UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay", "UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay", @@ -6615,6 +7627,7 @@ "UpdateGithubIssueTaskParamsCompletion", "UpdateGithubIssueTaskParamsIssueType", "UpdateGithubIssueTaskParamsLabelsItem", + "UpdateGithubIssueTaskParamsLabelsMode", "UpdateGithubIssueTaskParamsRepository", "UpdateGithubIssueTaskParamsTaskType", "UpdateGitlabIssueTaskParams", @@ -6625,6 +7638,9 @@ "UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey", "UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem", "UpdateGoogleCalendarEventTaskParamsTaskType", + "UpdateGoogleChatSpaceDescriptionTaskParams", + "UpdateGoogleChatSpaceDescriptionTaskParamsSpace", + "UpdateGoogleChatSpaceDescriptionTaskParamsTaskType", "UpdateGoogleDocsPageTaskParams", "UpdateGoogleDocsPageTaskParamsTaskType", "UpdateHeartbeat", @@ -6637,6 +7653,7 @@ "UpdateIncidentActionItem", "UpdateIncidentActionItemData", "UpdateIncidentActionItemDataAttributes", + "UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item", "UpdateIncidentActionItemDataAttributesKind", "UpdateIncidentActionItemDataAttributesPriority", "UpdateIncidentActionItemDataAttributesStatus", @@ -6736,6 +7753,7 @@ "UpdateIncidentTypeDataAttributesSlackChannelsType0Item", "UpdateIncidentTypeDataType", "UpdateJiraIssueTaskParams", + "UpdateJiraIssueTaskParamsIntegration", "UpdateJiraIssueTaskParamsPriority", "UpdateJiraIssueTaskParamsStatus", "UpdateJiraIssueTaskParamsTaskType", @@ -6777,8 +7795,10 @@ "UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem", "UpdateOnCallRoleDataAttributesApiKeysPermissionsItem", "UpdateOnCallRoleDataAttributesAuditsPermissionsItem", + "UpdateOnCallRoleDataAttributesCatalogsPermissionsItem", "UpdateOnCallRoleDataAttributesContactsPermissionsItem", "UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem", + "UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem", "UpdateOnCallRoleDataAttributesGroupsPermissionsItem", "UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem", "UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem", @@ -6902,6 +7922,7 @@ "UpdateSchedule", "UpdateScheduleData", "UpdateScheduleDataAttributes", + "UpdateScheduleDataAttributesShiftReportDayOfWeek", "UpdateScheduleDataAttributesSlackChannelType0", "UpdateScheduleDataAttributesSlackUserGroup", "UpdateScheduleDataType", @@ -7005,6 +8026,7 @@ "UpdateTeamData", "UpdateTeamDataAttributes", "UpdateTeamDataAttributesAlertBroadcastChannelType0", + "UpdateTeamDataAttributesAutoAddMembersScope", "UpdateTeamDataAttributesIncidentBroadcastChannelType0", "UpdateTeamDataAttributesPropertiesItem", "UpdateTeamDataAttributesSlackAliasesType0Item", @@ -7039,9 +8061,15 @@ "UpdateWebhooksEndpoint", "UpdateWebhooksEndpointData", "UpdateWebhooksEndpointDataAttributes", + "UpdateWebhooksEndpointDataAttributesCustomHeadersItem", "UpdateWebhooksEndpointDataAttributesEventTypesItem", "UpdateWebhooksEndpointDataType", "UpdateWorkflow", + "UpdateWorkflowActionItemFormFieldCondition", + "UpdateWorkflowActionItemFormFieldConditionData", + "UpdateWorkflowActionItemFormFieldConditionDataAttributes", + "UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition", + "UpdateWorkflowActionItemFormFieldConditionDataType", "UpdateWorkflowCustomFieldSelection", "UpdateWorkflowCustomFieldSelectionData", "UpdateWorkflowCustomFieldSelectionDataAttributes", @@ -7069,6 +8097,7 @@ "UpdateZendeskTicketTaskParamsPriority", "UpdateZendeskTicketTaskParamsTaskType", "UptimeChartResponse", + "UptimeChartResponseData", "User", "UserEmailAddress", "UserEmailAddressList", @@ -7110,6 +8139,7 @@ "WebhooksDeliveryResponseData", "WebhooksDeliveryResponseDataType", "WebhooksEndpoint", + "WebhooksEndpointCustomHeadersItem", "WebhooksEndpointEventTypesItem", "WebhooksEndpointList", "WebhooksEndpointListDataItem", @@ -7118,6 +8148,14 @@ "WebhooksEndpointResponseData", "WebhooksEndpointResponseDataType", "Workflow", + "WorkflowActionItemFormFieldCondition", + "WorkflowActionItemFormFieldConditionActionItemCondition", + "WorkflowActionItemFormFieldConditionList", + "WorkflowActionItemFormFieldConditionListDataItem", + "WorkflowActionItemFormFieldConditionListDataItemType", + "WorkflowActionItemFormFieldConditionResponse", + "WorkflowActionItemFormFieldConditionResponseData", + "WorkflowActionItemFormFieldConditionResponseDataType", "WorkflowCustomFieldSelection", "WorkflowCustomFieldSelectionIncidentCondition", "WorkflowCustomFieldSelectionList", diff --git a/rootly_sdk/models/action_item_trigger_params.py b/rootly_sdk/models/action_item_trigger_params.py index 6c91967f..0851eaa9 100644 --- a/rootly_sdk/models/action_item_trigger_params.py +++ b/rootly_sdk/models/action_item_trigger_params.py @@ -1,132 +1,180 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.action_item_trigger_params_incident_action_item_condition import ( ActionItemTriggerParamsIncidentActionItemCondition, +) +from ..models.action_item_trigger_params_incident_action_item_condition import ( check_action_item_trigger_params_incident_action_item_condition, ) from ..models.action_item_trigger_params_incident_action_item_condition_group import ( ActionItemTriggerParamsIncidentActionItemConditionGroup, +) +from ..models.action_item_trigger_params_incident_action_item_condition_group import ( check_action_item_trigger_params_incident_action_item_condition_group, ) from ..models.action_item_trigger_params_incident_action_item_condition_kind import ( ActionItemTriggerParamsIncidentActionItemConditionKind, +) +from ..models.action_item_trigger_params_incident_action_item_condition_kind import ( check_action_item_trigger_params_incident_action_item_condition_kind, ) from ..models.action_item_trigger_params_incident_action_item_condition_priority import ( ActionItemTriggerParamsIncidentActionItemConditionPriority, +) +from ..models.action_item_trigger_params_incident_action_item_condition_priority import ( check_action_item_trigger_params_incident_action_item_condition_priority, ) from ..models.action_item_trigger_params_incident_action_item_condition_status import ( ActionItemTriggerParamsIncidentActionItemConditionStatus, +) +from ..models.action_item_trigger_params_incident_action_item_condition_status import ( check_action_item_trigger_params_incident_action_item_condition_status, ) from ..models.action_item_trigger_params_incident_action_item_kinds_item import ( ActionItemTriggerParamsIncidentActionItemKindsItem, +) +from ..models.action_item_trigger_params_incident_action_item_kinds_item import ( check_action_item_trigger_params_incident_action_item_kinds_item, ) from ..models.action_item_trigger_params_incident_action_item_priorities_item import ( ActionItemTriggerParamsIncidentActionItemPrioritiesItem, +) +from ..models.action_item_trigger_params_incident_action_item_priorities_item import ( check_action_item_trigger_params_incident_action_item_priorities_item, ) from ..models.action_item_trigger_params_incident_action_item_statuses_item import ( ActionItemTriggerParamsIncidentActionItemStatusesItem, +) +from ..models.action_item_trigger_params_incident_action_item_statuses_item import ( check_action_item_trigger_params_incident_action_item_statuses_item, ) -from ..models.action_item_trigger_params_incident_condition import ( - ActionItemTriggerParamsIncidentCondition, - check_action_item_trigger_params_incident_condition, +from ..models.action_item_trigger_params_incident_condition import ActionItemTriggerParamsIncidentCondition +from ..models.action_item_trigger_params_incident_condition import check_action_item_trigger_params_incident_condition +from ..models.action_item_trigger_params_incident_condition_acknowledged_at import ( + ActionItemTriggerParamsIncidentConditionAcknowledgedAt, ) -from ..models.action_item_trigger_params_incident_condition_acknowledged_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1, - check_action_item_trigger_params_incident_condition_acknowledged_at_type_1, +from ..models.action_item_trigger_params_incident_condition_acknowledged_at import ( + check_action_item_trigger_params_incident_condition_acknowledged_at, ) -from ..models.action_item_trigger_params_incident_condition_detected_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionDetectedAtType1, - check_action_item_trigger_params_incident_condition_detected_at_type_1, +from ..models.action_item_trigger_params_incident_condition_detected_at import ( + ActionItemTriggerParamsIncidentConditionDetectedAt, +) +from ..models.action_item_trigger_params_incident_condition_detected_at import ( + check_action_item_trigger_params_incident_condition_detected_at, ) from ..models.action_item_trigger_params_incident_condition_environment import ( ActionItemTriggerParamsIncidentConditionEnvironment, +) +from ..models.action_item_trigger_params_incident_condition_environment import ( check_action_item_trigger_params_incident_condition_environment, ) from ..models.action_item_trigger_params_incident_condition_functionality import ( ActionItemTriggerParamsIncidentConditionFunctionality, +) +from ..models.action_item_trigger_params_incident_condition_functionality import ( check_action_item_trigger_params_incident_condition_functionality, ) +from ..models.action_item_trigger_params_incident_condition_group import ActionItemTriggerParamsIncidentConditionGroup from ..models.action_item_trigger_params_incident_condition_group import ( - ActionItemTriggerParamsIncidentConditionGroup, check_action_item_trigger_params_incident_condition_group, ) from ..models.action_item_trigger_params_incident_condition_incident_roles import ( ActionItemTriggerParamsIncidentConditionIncidentRoles, +) +from ..models.action_item_trigger_params_incident_condition_incident_roles import ( check_action_item_trigger_params_incident_condition_incident_roles, ) from ..models.action_item_trigger_params_incident_condition_incident_type import ( ActionItemTriggerParamsIncidentConditionIncidentType, +) +from ..models.action_item_trigger_params_incident_condition_incident_type import ( check_action_item_trigger_params_incident_condition_incident_type, ) +from ..models.action_item_trigger_params_incident_condition_kind import ActionItemTriggerParamsIncidentConditionKind from ..models.action_item_trigger_params_incident_condition_kind import ( - ActionItemTriggerParamsIncidentConditionKind, check_action_item_trigger_params_incident_condition_kind, ) -from ..models.action_item_trigger_params_incident_condition_mitigated_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionMitigatedAtType1, - check_action_item_trigger_params_incident_condition_mitigated_at_type_1, +from ..models.action_item_trigger_params_incident_condition_label import ActionItemTriggerParamsIncidentConditionLabel +from ..models.action_item_trigger_params_incident_condition_label import ( + check_action_item_trigger_params_incident_condition_label, ) -from ..models.action_item_trigger_params_incident_condition_resolved_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionResolvedAtType1, - check_action_item_trigger_params_incident_condition_resolved_at_type_1, +from ..models.action_item_trigger_params_incident_condition_mitigated_at import ( + ActionItemTriggerParamsIncidentConditionMitigatedAt, +) +from ..models.action_item_trigger_params_incident_condition_mitigated_at import ( + check_action_item_trigger_params_incident_condition_mitigated_at, +) +from ..models.action_item_trigger_params_incident_condition_resolved_at import ( + ActionItemTriggerParamsIncidentConditionResolvedAt, +) +from ..models.action_item_trigger_params_incident_condition_resolved_at import ( + check_action_item_trigger_params_incident_condition_resolved_at, ) from ..models.action_item_trigger_params_incident_condition_service import ( ActionItemTriggerParamsIncidentConditionService, +) +from ..models.action_item_trigger_params_incident_condition_service import ( check_action_item_trigger_params_incident_condition_service, ) from ..models.action_item_trigger_params_incident_condition_severity import ( ActionItemTriggerParamsIncidentConditionSeverity, +) +from ..models.action_item_trigger_params_incident_condition_severity import ( check_action_item_trigger_params_incident_condition_severity, ) -from ..models.action_item_trigger_params_incident_condition_started_at_type_1 import ( - ActionItemTriggerParamsIncidentConditionStartedAtType1, - check_action_item_trigger_params_incident_condition_started_at_type_1, +from ..models.action_item_trigger_params_incident_condition_started_at import ( + ActionItemTriggerParamsIncidentConditionStartedAt, ) +from ..models.action_item_trigger_params_incident_condition_started_at import ( + check_action_item_trigger_params_incident_condition_started_at, +) +from ..models.action_item_trigger_params_incident_condition_status import ActionItemTriggerParamsIncidentConditionStatus from ..models.action_item_trigger_params_incident_condition_status import ( - ActionItemTriggerParamsIncidentConditionStatus, check_action_item_trigger_params_incident_condition_status, ) from ..models.action_item_trigger_params_incident_condition_sub_status import ( ActionItemTriggerParamsIncidentConditionSubStatus, +) +from ..models.action_item_trigger_params_incident_condition_sub_status import ( check_action_item_trigger_params_incident_condition_sub_status, ) -from ..models.action_item_trigger_params_incident_condition_summary_type_1 import ( - ActionItemTriggerParamsIncidentConditionSummaryType1, - check_action_item_trigger_params_incident_condition_summary_type_1, +from ..models.action_item_trigger_params_incident_condition_summary import ( + ActionItemTriggerParamsIncidentConditionSummary, +) +from ..models.action_item_trigger_params_incident_condition_summary import ( + check_action_item_trigger_params_incident_condition_summary, ) from ..models.action_item_trigger_params_incident_condition_visibility import ( ActionItemTriggerParamsIncidentConditionVisibility, +) +from ..models.action_item_trigger_params_incident_condition_visibility import ( check_action_item_trigger_params_incident_condition_visibility, ) -from ..models.action_item_trigger_params_incident_conditional_inactivity_type_1 import ( - ActionItemTriggerParamsIncidentConditionalInactivityType1, - check_action_item_trigger_params_incident_conditional_inactivity_type_1, +from ..models.action_item_trigger_params_incident_conditional_inactivity import ( + ActionItemTriggerParamsIncidentConditionalInactivity, ) -from ..models.action_item_trigger_params_incident_kinds_item import ( - ActionItemTriggerParamsIncidentKindsItem, - check_action_item_trigger_params_incident_kinds_item, +from ..models.action_item_trigger_params_incident_conditional_inactivity import ( + check_action_item_trigger_params_incident_conditional_inactivity, ) +from ..models.action_item_trigger_params_incident_kinds_item import ActionItemTriggerParamsIncidentKindsItem +from ..models.action_item_trigger_params_incident_kinds_item import check_action_item_trigger_params_incident_kinds_item +from ..models.action_item_trigger_params_incident_statuses_item import ActionItemTriggerParamsIncidentStatusesItem from ..models.action_item_trigger_params_incident_statuses_item import ( - ActionItemTriggerParamsIncidentStatusesItem, check_action_item_trigger_params_incident_statuses_item, ) -from ..models.action_item_trigger_params_trigger_type import ( - ActionItemTriggerParamsTriggerType, - check_action_item_trigger_params_trigger_type, -) +from ..models.action_item_trigger_params_trigger_type import ActionItemTriggerParamsTriggerType +from ..models.action_item_trigger_params_trigger_type import check_action_item_trigger_params_trigger_type from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="ActionItemTriggerParams") @@ -140,7 +188,7 @@ class ActionItemTriggerParams: incident_visibilities (list[bool] | Unset): incident_kinds (list[ActionItemTriggerParamsIncidentKindsItem] | Unset): incident_statuses (list[ActionItemTriggerParamsIncidentStatusesItem] | Unset): - incident_inactivity_duration (None | str | Unset): + incident_inactivity_duration (None | str | Unset): ex. 10 min, 1h, 3 days, 2 weeks incident_condition (ActionItemTriggerParamsIncidentCondition | Unset): Default: 'ALL'. incident_condition_visibility (ActionItemTriggerParamsIncidentConditionVisibility | Unset): Default: 'ANY'. incident_condition_kind (ActionItemTriggerParamsIncidentConditionKind | Unset): Default: 'IS'. @@ -156,13 +204,16 @@ class ActionItemTriggerParams: incident_condition_functionality (ActionItemTriggerParamsIncidentConditionFunctionality | Unset): Default: 'ANY'. 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_condition_label (ActionItemTriggerParamsIncidentConditionLabel | Unset): Default: 'ANY'. + incident_condition_label_use_regexp (bool | Unset): Default: False. + incident_labels (list[str] | Unset): + incident_condition_summary (ActionItemTriggerParamsIncidentConditionSummary | Unset): + incident_condition_started_at (ActionItemTriggerParamsIncidentConditionStartedAt | Unset): + incident_condition_detected_at (ActionItemTriggerParamsIncidentConditionDetectedAt | Unset): + incident_condition_acknowledged_at (ActionItemTriggerParamsIncidentConditionAcknowledgedAt | Unset): + incident_condition_mitigated_at (ActionItemTriggerParamsIncidentConditionMitigatedAt | Unset): + incident_condition_resolved_at (ActionItemTriggerParamsIncidentConditionResolvedAt | Unset): + incident_conditional_inactivity (ActionItemTriggerParamsIncidentConditionalInactivity | Unset): incident_action_item_condition (ActionItemTriggerParamsIncidentActionItemCondition | Unset): incident_action_item_condition_kind (ActionItemTriggerParamsIncidentActionItemConditionKind | Unset): Default: 'ANY'. @@ -196,15 +247,16 @@ class ActionItemTriggerParams: 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 - incident_condition_acknowledged_at: ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset = ( - UNSET - ) - incident_condition_mitigated_at: ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset = UNSET - incident_condition_resolved_at: ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset = UNSET - incident_conditional_inactivity: ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset = UNSET + incident_condition_label: ActionItemTriggerParamsIncidentConditionLabel | Unset = "ANY" + incident_condition_label_use_regexp: bool | Unset = False + incident_labels: list[str] | Unset = UNSET + incident_condition_summary: ActionItemTriggerParamsIncidentConditionSummary | Unset = UNSET + incident_condition_started_at: ActionItemTriggerParamsIncidentConditionStartedAt | Unset = UNSET + incident_condition_detected_at: ActionItemTriggerParamsIncidentConditionDetectedAt | Unset = UNSET + incident_condition_acknowledged_at: ActionItemTriggerParamsIncidentConditionAcknowledgedAt | Unset = UNSET + incident_condition_mitigated_at: ActionItemTriggerParamsIncidentConditionMitigatedAt | Unset = UNSET + incident_condition_resolved_at: ActionItemTriggerParamsIncidentConditionResolvedAt | Unset = UNSET + incident_conditional_inactivity: ActionItemTriggerParamsIncidentConditionalInactivity | Unset = UNSET incident_action_item_condition: ActionItemTriggerParamsIncidentActionItemCondition | Unset = UNSET incident_action_item_condition_kind: ActionItemTriggerParamsIncidentActionItemConditionKind | Unset = "ANY" incident_action_item_kinds: list[ActionItemTriggerParamsIncidentActionItemKindsItem] | Unset = UNSET @@ -295,60 +347,42 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.incident_condition_group, Unset): incident_condition_group = self.incident_condition_group - incident_condition_summary: None | str | Unset - if isinstance(self.incident_condition_summary, Unset): - incident_condition_summary = UNSET - elif isinstance(self.incident_condition_summary, str): - incident_condition_summary = self.incident_condition_summary - else: + incident_condition_label: str | Unset = UNSET + if not isinstance(self.incident_condition_label, Unset): + incident_condition_label = self.incident_condition_label + + incident_condition_label_use_regexp = self.incident_condition_label_use_regexp + + incident_labels: list[str] | Unset = UNSET + if not isinstance(self.incident_labels, Unset): + incident_labels = self.incident_labels + + incident_condition_summary: str | Unset = UNSET + if not isinstance(self.incident_condition_summary, Unset): incident_condition_summary = self.incident_condition_summary - 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): - incident_condition_started_at = self.incident_condition_started_at - else: + incident_condition_started_at: str | Unset = UNSET + if not isinstance(self.incident_condition_started_at, Unset): incident_condition_started_at = self.incident_condition_started_at - 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): - incident_condition_detected_at = self.incident_condition_detected_at - else: + incident_condition_detected_at: str | Unset = UNSET + if not isinstance(self.incident_condition_detected_at, Unset): incident_condition_detected_at = self.incident_condition_detected_at - 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): - incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - else: + incident_condition_acknowledged_at: str | Unset = UNSET + if not isinstance(self.incident_condition_acknowledged_at, Unset): incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - 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): - incident_condition_mitigated_at = self.incident_condition_mitigated_at - else: + incident_condition_mitigated_at: str | Unset = UNSET + if not isinstance(self.incident_condition_mitigated_at, Unset): incident_condition_mitigated_at = self.incident_condition_mitigated_at - 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): - incident_condition_resolved_at = self.incident_condition_resolved_at - else: + incident_condition_resolved_at: str | Unset = UNSET + if not isinstance(self.incident_condition_resolved_at, Unset): incident_condition_resolved_at = self.incident_condition_resolved_at - incident_conditional_inactivity: None | str | Unset - if isinstance(self.incident_conditional_inactivity, Unset): - incident_conditional_inactivity = UNSET - elif isinstance(self.incident_conditional_inactivity, str): - incident_conditional_inactivity = self.incident_conditional_inactivity - else: + incident_conditional_inactivity: str | Unset = UNSET + if not isinstance(self.incident_conditional_inactivity, Unset): incident_conditional_inactivity = self.incident_conditional_inactivity incident_action_item_condition: str | Unset = UNSET @@ -437,6 +471,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_condition_functionality"] = incident_condition_functionality if incident_condition_group is not UNSET: field_dict["incident_condition_group"] = incident_condition_group + if incident_condition_label is not UNSET: + field_dict["incident_condition_label"] = incident_condition_label + if incident_condition_label_use_regexp is not UNSET: + field_dict["incident_condition_label_use_regexp"] = incident_condition_label_use_regexp + if incident_labels is not UNSET: + field_dict["incident_labels"] = incident_labels if incident_condition_summary is not UNSET: field_dict["incident_condition_summary"] = incident_condition_summary if incident_condition_started_at is not UNSET: @@ -614,164 +654,81 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: _incident_condition_group ) - def _parse_incident_condition_summary( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionSummaryType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_summary_type_1 = check_action_item_trigger_params_incident_condition_summary_type_1( - data - ) - - return incident_condition_summary_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionSummaryType1 | None | Unset, data) - - incident_condition_summary = _parse_incident_condition_summary(d.pop("incident_condition_summary", UNSET)) - - def _parse_incident_condition_started_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionStartedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_started_at_type_1 = ( - check_action_item_trigger_params_incident_condition_started_at_type_1(data) - ) - - return incident_condition_started_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionStartedAtType1 | None | Unset, data) - - incident_condition_started_at = _parse_incident_condition_started_at( - d.pop("incident_condition_started_at", UNSET) - ) - - def _parse_incident_condition_detected_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_detected_at_type_1 = ( - check_action_item_trigger_params_incident_condition_detected_at_type_1(data) - ) - - return incident_condition_detected_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None | Unset, data) - - incident_condition_detected_at = _parse_incident_condition_detected_at( - d.pop("incident_condition_detected_at", UNSET) - ) - - def _parse_incident_condition_acknowledged_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_acknowledged_at_type_1 = ( - check_action_item_trigger_params_incident_condition_acknowledged_at_type_1(data) - ) - - return incident_condition_acknowledged_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset, data) - - incident_condition_acknowledged_at = _parse_incident_condition_acknowledged_at( - d.pop("incident_condition_acknowledged_at", UNSET) - ) + _incident_condition_label = d.pop("incident_condition_label", UNSET) + incident_condition_label: ActionItemTriggerParamsIncidentConditionLabel | Unset + if isinstance(_incident_condition_label, Unset): + incident_condition_label = UNSET + else: + incident_condition_label = check_action_item_trigger_params_incident_condition_label( + _incident_condition_label + ) - def _parse_incident_condition_mitigated_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_mitigated_at_type_1 = ( - check_action_item_trigger_params_incident_condition_mitigated_at_type_1(data) - ) + incident_condition_label_use_regexp = d.pop("incident_condition_label_use_regexp", UNSET) - return incident_condition_mitigated_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset, data) + incident_labels = cast(list[str], d.pop("incident_labels", UNSET)) - incident_condition_mitigated_at = _parse_incident_condition_mitigated_at( - d.pop("incident_condition_mitigated_at", UNSET) - ) + _incident_condition_summary = d.pop("incident_condition_summary", UNSET) + incident_condition_summary: ActionItemTriggerParamsIncidentConditionSummary | Unset + if isinstance(_incident_condition_summary, Unset): + incident_condition_summary = UNSET + else: + incident_condition_summary = check_action_item_trigger_params_incident_condition_summary( + _incident_condition_summary + ) - def _parse_incident_condition_resolved_at( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_resolved_at_type_1 = ( - check_action_item_trigger_params_incident_condition_resolved_at_type_1(data) - ) + _incident_condition_started_at = d.pop("incident_condition_started_at", UNSET) + incident_condition_started_at: ActionItemTriggerParamsIncidentConditionStartedAt | Unset + if isinstance(_incident_condition_started_at, Unset): + incident_condition_started_at = UNSET + else: + incident_condition_started_at = check_action_item_trigger_params_incident_condition_started_at( + _incident_condition_started_at + ) - return incident_condition_resolved_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None | Unset, data) + _incident_condition_detected_at = d.pop("incident_condition_detected_at", UNSET) + incident_condition_detected_at: ActionItemTriggerParamsIncidentConditionDetectedAt | Unset + if isinstance(_incident_condition_detected_at, Unset): + incident_condition_detected_at = UNSET + else: + incident_condition_detected_at = check_action_item_trigger_params_incident_condition_detected_at( + _incident_condition_detected_at + ) - incident_condition_resolved_at = _parse_incident_condition_resolved_at( - d.pop("incident_condition_resolved_at", UNSET) - ) + _incident_condition_acknowledged_at = d.pop("incident_condition_acknowledged_at", UNSET) + incident_condition_acknowledged_at: ActionItemTriggerParamsIncidentConditionAcknowledgedAt | Unset + if isinstance(_incident_condition_acknowledged_at, Unset): + incident_condition_acknowledged_at = UNSET + else: + incident_condition_acknowledged_at = check_action_item_trigger_params_incident_condition_acknowledged_at( + _incident_condition_acknowledged_at + ) - def _parse_incident_conditional_inactivity( - data: object, - ) -> ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_conditional_inactivity_type_1 = ( - check_action_item_trigger_params_incident_conditional_inactivity_type_1(data) - ) + _incident_condition_mitigated_at = d.pop("incident_condition_mitigated_at", UNSET) + incident_condition_mitigated_at: ActionItemTriggerParamsIncidentConditionMitigatedAt | Unset + if isinstance(_incident_condition_mitigated_at, Unset): + incident_condition_mitigated_at = UNSET + else: + incident_condition_mitigated_at = check_action_item_trigger_params_incident_condition_mitigated_at( + _incident_condition_mitigated_at + ) - return incident_conditional_inactivity_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(ActionItemTriggerParamsIncidentConditionalInactivityType1 | None | Unset, data) + _incident_condition_resolved_at = d.pop("incident_condition_resolved_at", UNSET) + incident_condition_resolved_at: ActionItemTriggerParamsIncidentConditionResolvedAt | Unset + if isinstance(_incident_condition_resolved_at, Unset): + incident_condition_resolved_at = UNSET + else: + incident_condition_resolved_at = check_action_item_trigger_params_incident_condition_resolved_at( + _incident_condition_resolved_at + ) - incident_conditional_inactivity = _parse_incident_conditional_inactivity( - d.pop("incident_conditional_inactivity", UNSET) - ) + _incident_conditional_inactivity = d.pop("incident_conditional_inactivity", UNSET) + incident_conditional_inactivity: ActionItemTriggerParamsIncidentConditionalInactivity | Unset + if isinstance(_incident_conditional_inactivity, Unset): + incident_conditional_inactivity = UNSET + else: + incident_conditional_inactivity = check_action_item_trigger_params_incident_conditional_inactivity( + _incident_conditional_inactivity + ) _incident_action_item_condition = d.pop("incident_action_item_condition", UNSET) incident_action_item_condition: ActionItemTriggerParamsIncidentActionItemCondition | Unset @@ -882,6 +839,9 @@ def _parse_incident_conditional_inactivity( incident_condition_service=incident_condition_service, incident_condition_functionality=incident_condition_functionality, incident_condition_group=incident_condition_group, + incident_condition_label=incident_condition_label, + incident_condition_label_use_regexp=incident_condition_label_use_regexp, + incident_labels=incident_labels, incident_condition_summary=incident_condition_summary, incident_condition_started_at=incident_condition_started_at, incident_condition_detected_at=incident_condition_detected_at, diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at.py new file mode 100644 index 00000000..2595f3d8 --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionAcknowledgedAt = Literal["SET", "UNSET"] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionAcknowledgedAt +] = { + "SET", + "UNSET", +} + + +def check_action_item_trigger_params_incident_condition_acknowledged_at( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionAcknowledgedAt | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionAcknowledgedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at_type_1.py deleted file mode 100644 index 036d2a69..00000000 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_acknowledged_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 = Literal["SET", "UNSET"] - -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_action_item_trigger_params_incident_condition_acknowledged_at_type_1( - value: str | None, -) -> ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1 | None: - if value is None: - return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionAcknowledgedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at.py similarity index 50% rename from rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at_type_1.py rename to rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at.py index 44ae0381..28ddd119 100644 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at_type_1.py +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_detected_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -ActionItemTriggerParamsIncidentConditionDetectedAtType1 = Literal["SET", "UNSET"] +ActionItemTriggerParamsIncidentConditionDetectedAt = Literal["SET", "UNSET"] -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionDetectedAtType1 +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionDetectedAt ] = { "SET", "UNSET", } -def check_action_item_trigger_params_incident_condition_detected_at_type_1( +def check_action_item_trigger_params_incident_condition_detected_at( value: str | None, -) -> ActionItemTriggerParamsIncidentConditionDetectedAtType1 | None: +) -> ActionItemTriggerParamsIncidentConditionDetectedAt | None: if value is None: return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionDetectedAtType1, value) + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionDetectedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_label.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_label.py new file mode 100644 index 00000000..cfee44ca --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_label.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionLabel = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: set[ActionItemTriggerParamsIncidentConditionLabel] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_action_item_trigger_params_incident_condition_label( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionLabel | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionLabel, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at.py new file mode 100644 index 00000000..2972d7af --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionMitigatedAt = Literal["SET", "UNSET"] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionMitigatedAt +] = { + "SET", + "UNSET", +} + + +def check_action_item_trigger_params_incident_condition_mitigated_at( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionMitigatedAt | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionMitigatedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at_type_1.py deleted file mode 100644 index 3f76cae7..00000000 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_mitigated_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ActionItemTriggerParamsIncidentConditionMitigatedAtType1 = Literal["SET", "UNSET"] - -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionMitigatedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_action_item_trigger_params_incident_condition_mitigated_at_type_1( - value: str | None, -) -> ActionItemTriggerParamsIncidentConditionMitigatedAtType1 | None: - if value is None: - return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionMitigatedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at.py similarity index 50% rename from rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at_type_1.py rename to rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at.py index 9b83e38b..35990efc 100644 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at_type_1.py +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_resolved_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -ActionItemTriggerParamsIncidentConditionResolvedAtType1 = Literal["SET", "UNSET"] +ActionItemTriggerParamsIncidentConditionResolvedAt = Literal["SET", "UNSET"] -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionResolvedAtType1 +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionResolvedAt ] = { "SET", "UNSET", } -def check_action_item_trigger_params_incident_condition_resolved_at_type_1( +def check_action_item_trigger_params_incident_condition_resolved_at( value: str | None, -) -> ActionItemTriggerParamsIncidentConditionResolvedAtType1 | None: +) -> ActionItemTriggerParamsIncidentConditionResolvedAt | None: if value is None: return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionResolvedAtType1, value) + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionResolvedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_started_at_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_started_at.py similarity index 50% rename from rootly_sdk/models/action_item_trigger_params_incident_condition_started_at_type_1.py rename to rootly_sdk/models/action_item_trigger_params_incident_condition_started_at.py index 8ff67c57..965e16e2 100644 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_started_at_type_1.py +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_started_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -ActionItemTriggerParamsIncidentConditionStartedAtType1 = Literal["SET", "UNSET"] +ActionItemTriggerParamsIncidentConditionStartedAt = Literal["SET", "UNSET"] -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionStartedAtType1 +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: set[ + ActionItemTriggerParamsIncidentConditionStartedAt ] = { "SET", "UNSET", } -def check_action_item_trigger_params_incident_condition_started_at_type_1( +def check_action_item_trigger_params_incident_condition_started_at( value: str | None, -) -> ActionItemTriggerParamsIncidentConditionStartedAtType1 | None: +) -> ActionItemTriggerParamsIncidentConditionStartedAt | None: if value is None: return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionStartedAtType1, value) + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionStartedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_summary.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_summary.py new file mode 100644 index 00000000..fbde515f --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_condition_summary.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionSummary = Literal["SET", "UNSET"] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: set[ActionItemTriggerParamsIncidentConditionSummary] = { + "SET", + "UNSET", +} + + +def check_action_item_trigger_params_incident_condition_summary( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionSummary | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionSummary, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_condition_summary_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_condition_summary_type_1.py deleted file mode 100644 index c9365ca9..00000000 --- a/rootly_sdk/models/action_item_trigger_params_incident_condition_summary_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -ActionItemTriggerParamsIncidentConditionSummaryType1 = Literal["SET", "UNSET"] - -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionSummaryType1 -] = { - "SET", - "UNSET", -} - - -def check_action_item_trigger_params_incident_condition_summary_type_1( - value: str | None, -) -> ActionItemTriggerParamsIncidentConditionSummaryType1 | None: - if value is None: - return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionSummaryType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity.py b/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity.py new file mode 100644 index 00000000..82797de0 --- /dev/null +++ b/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +ActionItemTriggerParamsIncidentConditionalInactivity = Literal["IS"] + +ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: set[ + ActionItemTriggerParamsIncidentConditionalInactivity +] = { + "IS", +} + + +def check_action_item_trigger_params_incident_conditional_inactivity( + value: str | None, +) -> ActionItemTriggerParamsIncidentConditionalInactivity | None: + if value is None: + return None + if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: + return cast(ActionItemTriggerParamsIncidentConditionalInactivity, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES!r}" + ) diff --git a/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity_type_1.py b/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity_type_1.py deleted file mode 100644 index 0eb9ad02..00000000 --- a/rootly_sdk/models/action_item_trigger_params_incident_conditional_inactivity_type_1.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -ActionItemTriggerParamsIncidentConditionalInactivityType1 = Literal["IS"] - -ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: set[ - ActionItemTriggerParamsIncidentConditionalInactivityType1 -] = { - "IS", -} - - -def check_action_item_trigger_params_incident_conditional_inactivity_type_1( - value: str | None, -) -> ActionItemTriggerParamsIncidentConditionalInactivityType1 | None: - if value is None: - return None - if value in ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: - return cast(ActionItemTriggerParamsIncidentConditionalInactivityType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {ACTION_ITEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/add_action_item_task_params.py b/rootly_sdk/models/add_action_item_task_params.py index 285b47a0..b01ac691 100644 --- a/rootly_sdk/models/add_action_item_task_params.py +++ b/rootly_sdk/models/add_action_item_task_params.py @@ -1,28 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.add_action_item_task_params_attribute_to_query_by import AddActionItemTaskParamsAttributeToQueryBy from ..models.add_action_item_task_params_attribute_to_query_by import ( - AddActionItemTaskParamsAttributeToQueryBy, check_add_action_item_task_params_attribute_to_query_by, ) -from ..models.add_action_item_task_params_priority import ( - AddActionItemTaskParamsPriority, - check_add_action_item_task_params_priority, -) -from ..models.add_action_item_task_params_status import ( - AddActionItemTaskParamsStatus, - check_add_action_item_task_params_status, -) -from ..models.add_action_item_task_params_task_type import ( - AddActionItemTaskParamsTaskType, - check_add_action_item_task_params_task_type, -) +from ..models.add_action_item_task_params_priority import AddActionItemTaskParamsPriority +from ..models.add_action_item_task_params_priority import check_add_action_item_task_params_priority +from ..models.add_action_item_task_params_status import AddActionItemTaskParamsStatus +from ..models.add_action_item_task_params_status import check_add_action_item_task_params_status +from ..models.add_action_item_task_params_task_type import AddActionItemTaskParamsTaskType +from ..models.add_action_item_task_params_task_type import check_add_action_item_task_params_task_type from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.add_action_item_task_params_assigned_to_user import AddActionItemTaskParamsAssignedToUser @@ -74,6 +71,11 @@ class AddActionItemTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.add_action_item_task_params_assigned_to_user import AddActionItemTaskParamsAssignedToUser + from ..models.add_action_item_task_params_post_to_slack_channels_item import ( + AddActionItemTaskParamsPostToSlackChannelsItem, + ) + priority: str = self.priority summary = self.summary 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 8d65de98..162c54ff 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AddActionItemTaskParamsAssignedToUser") 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 2f32e287..8eb97801 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AddActionItemTaskParamsPostToSlackChannelsItem") 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 393233e1..5af195a7 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,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.add_microsoft_teams_chat_tab_task_params_task_type import AddMicrosoftTeamsChatTabTaskParamsTaskType from ..models.add_microsoft_teams_chat_tab_task_params_task_type import ( - AddMicrosoftTeamsChatTabTaskParamsTaskType, check_add_microsoft_teams_chat_tab_task_params_task_type, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.add_microsoft_teams_chat_tab_task_params_chat import AddMicrosoftTeamsChatTabTaskParamsChat @@ -36,6 +39,8 @@ class AddMicrosoftTeamsChatTabTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.add_microsoft_teams_chat_tab_task_params_chat import AddMicrosoftTeamsChatTabTaskParamsChat + chat = self.chat.to_dict() title = self.title 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 8d82e503..3928a22b 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AddMicrosoftTeamsChatTabTaskParamsChat") diff --git a/rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py similarity index 58% rename from rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py rename to rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py index e7939f3a..95097dc1 100644 --- a/rootly_sdk/models/alert_alert_field_values_attributes_item_type_0.py +++ b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py @@ -1,37 +1,40 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -T = TypeVar("T", bound="AlertAlertFieldValuesAttributesItemType0") +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AddMicrosoftTeamsTabTaskParamsType0") @_attrs_define -class AlertAlertFieldValuesAttributesItemType0: +class AddMicrosoftTeamsTabTaskParamsType0: """ Attributes: - alert_field_id (str): ID of the custom alert field - value (str): Value for the alert field + title (str): + link (str): """ - alert_field_id: str - value: str + title: str + link: str 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 + title = self.title - value = self.value + link = self.link field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { - "alert_field_id": alert_field_id, - "value": value, + "title": title, + "link": link, } ) @@ -40,17 +43,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) - alert_field_id = d.pop("alert_field_id") + title = d.pop("title") - value = d.pop("value") + link = d.pop("link") - alert_alert_field_values_attributes_item_type_0 = cls( - alert_field_id=alert_field_id, - value=value, + add_microsoft_teams_tab_task_params_type_0 = cls( + title=title, + link=link, ) - alert_alert_field_values_attributes_item_type_0.additional_properties = d - return alert_alert_field_values_attributes_item_type_0 + add_microsoft_teams_tab_task_params_type_0.additional_properties = d + return add_microsoft_teams_tab_task_params_type_0 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py new file mode 100644 index 00000000..79b3e9ea --- /dev/null +++ b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AddMicrosoftTeamsTabTaskParamsType1") + + +@_attrs_define +class AddMicrosoftTeamsTabTaskParamsType1: + """ + Attributes: + playbook_id (str): + """ + + playbook_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + playbook_id = self.playbook_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "playbook_id": playbook_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + playbook_id = d.pop("playbook_id") + + add_microsoft_teams_tab_task_params_type_1 = cls( + playbook_id=playbook_id, + ) + + add_microsoft_teams_tab_task_params_type_1.additional_properties = d + return add_microsoft_teams_tab_task_params_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/add_role_task_params.py b/rootly_sdk/models/add_role_task_params.py index 886d7027..e7a5ef42 100644 --- a/rootly_sdk/models/add_role_task_params.py +++ b/rootly_sdk/models/add_role_task_params.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.add_role_task_params_task_type import AddRoleTaskParamsTaskType, check_add_role_task_params_task_type from ..types import UNSET, Unset +from ..models.add_role_task_params_task_type import AddRoleTaskParamsTaskType +from ..models.add_role_task_params_task_type import check_add_role_task_params_task_type +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.add_role_task_params_assigned_to_user import AddRoleTaskParamsAssignedToUser @@ -34,6 +38,8 @@ class AddRoleTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.add_role_task_params_assigned_to_user import AddRoleTaskParamsAssignedToUser + incident_role_id = self.incident_role_id task_type: str | Unset = UNSET 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 2c165799..4accb57a 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AddRoleTaskParamsAssignedToUser") diff --git a/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py b/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py new file mode 100644 index 00000000..86a13d51 --- /dev/null +++ b/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py @@ -0,0 +1,72 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AddSlackBookmarkTaskParamsType0") + + +@_attrs_define +class AddSlackBookmarkTaskParamsType0: + """ + Attributes: + title (str): + link (str): + """ + + title: str + link: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + title = self.title + + link = self.link + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "title": title, + "link": link, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + title = d.pop("title") + + link = d.pop("link") + + add_slack_bookmark_task_params_type_0 = cls( + title=title, + link=link, + ) + + add_slack_bookmark_task_params_type_0.additional_properties = d + return add_slack_bookmark_task_params_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/add_slack_bookmark_task_params_type_1.py b/rootly_sdk/models/add_slack_bookmark_task_params_type_1.py new file mode 100644 index 00000000..c5fde13d --- /dev/null +++ b/rootly_sdk/models/add_slack_bookmark_task_params_type_1.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AddSlackBookmarkTaskParamsType1") + + +@_attrs_define +class AddSlackBookmarkTaskParamsType1: + """ + Attributes: + playbook_id (str): + """ + + playbook_id: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + playbook_id = self.playbook_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "playbook_id": playbook_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + playbook_id = d.pop("playbook_id") + + add_slack_bookmark_task_params_type_1 = cls( + playbook_id=playbook_id, + ) + + add_slack_bookmark_task_params_type_1.additional_properties = d + return add_slack_bookmark_task_params_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/add_subscribers.py b/rootly_sdk/models/add_subscribers.py index 2fc8e038..f6a86098 100644 --- a/rootly_sdk/models/add_subscribers.py +++ b/rootly_sdk/models/add_subscribers.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.add_subscribers_data import AddSubscribersData @@ -24,6 +28,8 @@ class AddSubscribers: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.add_subscribers_data import AddSubscribersData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/add_subscribers_data.py b/rootly_sdk/models/add_subscribers_data.py index dc21630c..3406f35a 100644 --- a/rootly_sdk/models/add_subscribers_data.py +++ b/rootly_sdk/models/add_subscribers_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.add_subscribers_data_type import AddSubscribersDataType, check_add_subscribers_data_type +from ..types import UNSET, Unset + +from ..models.add_subscribers_data_type import AddSubscribersDataType +from ..models.add_subscribers_data_type import check_add_subscribers_data_type +from typing import cast if TYPE_CHECKING: from ..models.add_subscribers_data_attributes import AddSubscribersDataAttributes @@ -28,6 +32,8 @@ class AddSubscribersData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.add_subscribers_data_attributes import AddSubscribersDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/add_subscribers_data_attributes.py b/rootly_sdk/models/add_subscribers_data_attributes.py index 7f819592..4415f6fe 100644 --- a/rootly_sdk/models/add_subscribers_data_attributes.py +++ b/rootly_sdk/models/add_subscribers_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="AddSubscribersDataAttributes") diff --git a/rootly_sdk/models/add_team_task_params.py b/rootly_sdk/models/add_team_task_params.py index 20b40bd2..60066717 100644 --- a/rootly_sdk/models/add_team_task_params.py +++ b/rootly_sdk/models/add_team_task_params.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.add_team_task_params_task_type import AddTeamTaskParamsTaskType, check_add_team_task_params_task_type from ..types import UNSET, Unset +from ..models.add_team_task_params_task_type import AddTeamTaskParamsTaskType +from ..models.add_team_task_params_task_type import check_add_team_task_params_task_type +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="AddTeamTaskParams") diff --git a/rootly_sdk/models/add_to_timeline_task_params.py b/rootly_sdk/models/add_to_timeline_task_params.py index 200ae000..f3979c53 100644 --- a/rootly_sdk/models/add_to_timeline_task_params.py +++ b/rootly_sdk/models/add_to_timeline_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.add_to_timeline_task_params_task_type import ( - AddToTimelineTaskParamsTaskType, - check_add_to_timeline_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.add_to_timeline_task_params_task_type import AddToTimelineTaskParamsTaskType +from ..models.add_to_timeline_task_params_task_type import check_add_to_timeline_task_params_task_type +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.add_to_timeline_task_params_post_to_slack_channels_item import ( AddToTimelineTaskParamsPostToSlackChannelsItem, @@ -38,6 +39,10 @@ class AddToTimelineTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.add_to_timeline_task_params_post_to_slack_channels_item import ( + AddToTimelineTaskParamsPostToSlackChannelsItem, + ) + event = self.event task_type: str | Unset = UNSET 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 a0238cd6..d9a815e1 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AddToTimelineTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/ai_chat_response.py b/rootly_sdk/models/ai_chat_response.py new file mode 100644 index 00000000..64f562cf --- /dev/null +++ b/rootly_sdk/models/ai_chat_response.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.ai_chat_response_data import AiChatResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + + +T = TypeVar("T", bound="AiChatResponse") + + +@_attrs_define +class AiChatResponse: + """ + Attributes: + data (AiChatResponseData): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: AiChatResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.ai_chat_response_data import AiChatResponseData + + data = self.data.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.ai_chat_response_data import AiChatResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + + d = dict(src_dict) + data = AiChatResponseData.from_dict(d.pop("data")) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + ai_chat_response = cls( + data=data, + included=included, + ) + + ai_chat_response.additional_properties = d + return ai_chat_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/ai_chat_response_data.py b/rootly_sdk/models/ai_chat_response_data.py new file mode 100644 index 00000000..b4f9c600 --- /dev/null +++ b/rootly_sdk/models/ai_chat_response_data.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.ai_chat_response_data_type import AiChatResponseDataType +from ..models.ai_chat_response_data_type import check_ai_chat_response_data_type +from typing import cast +from uuid import UUID + +if TYPE_CHECKING: + from ..models.ai_chat_response_data_attributes import AiChatResponseDataAttributes + + +T = TypeVar("T", bound="AiChatResponseData") + + +@_attrs_define +class AiChatResponseData: + """ + Attributes: + id (UUID): Session UUID + type_ (AiChatResponseDataType): + attributes (AiChatResponseDataAttributes): + """ + + id: UUID + type_: AiChatResponseDataType + attributes: AiChatResponseDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.ai_chat_response_data_attributes import AiChatResponseDataAttributes + + id = str(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.ai_chat_response_data_attributes import AiChatResponseDataAttributes + + d = dict(src_dict) + id = UUID(d.pop("id")) + + type_ = check_ai_chat_response_data_type(d.pop("type")) + + attributes = AiChatResponseDataAttributes.from_dict(d.pop("attributes")) + + ai_chat_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + ai_chat_response_data.additional_properties = d + return ai_chat_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/ai_chat_response_data_attributes.py b/rootly_sdk/models/ai_chat_response_data_attributes.py new file mode 100644 index 00000000..baaaae07 --- /dev/null +++ b/rootly_sdk/models/ai_chat_response_data_attributes.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.ai_chat_response_data_attributes_status import AiChatResponseDataAttributesStatus +from ..models.ai_chat_response_data_attributes_status import check_ai_chat_response_data_attributes_status +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + + +T = TypeVar("T", bound="AiChatResponseDataAttributes") + + +@_attrs_define +class AiChatResponseDataAttributes: + """ + Attributes: + session_id (UUID): AI chat session UUID + reply (None | str | Unset): Assistant reply text + status (AiChatResponseDataAttributesStatus | Unset): Response status (present when user input is required) + """ + + session_id: UUID + reply: None | str | Unset = UNSET + status: AiChatResponseDataAttributesStatus | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + session_id = str(self.session_id) + + reply: None | str | Unset + if isinstance(self.reply, Unset): + reply = UNSET + else: + reply = self.reply + + status: str | Unset = UNSET + if not isinstance(self.status, Unset): + status = self.status + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "session_id": session_id, + } + ) + if reply is not UNSET: + field_dict["reply"] = reply + if status is not UNSET: + field_dict["status"] = status + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + session_id = UUID(d.pop("session_id")) + + def _parse_reply(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + reply = _parse_reply(d.pop("reply", UNSET)) + + _status = d.pop("status", UNSET) + status: AiChatResponseDataAttributesStatus | Unset + if isinstance(_status, Unset): + status = UNSET + else: + status = check_ai_chat_response_data_attributes_status(_status) + + ai_chat_response_data_attributes = cls( + session_id=session_id, + reply=reply, + status=status, + ) + + ai_chat_response_data_attributes.additional_properties = d + return ai_chat_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/ai_chat_response_data_attributes_status.py b/rootly_sdk/models/ai_chat_response_data_attributes_status.py new file mode 100644 index 00000000..5dbfeaac --- /dev/null +++ b/rootly_sdk/models/ai_chat_response_data_attributes_status.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +AiChatResponseDataAttributesStatus = Literal["user_input_required"] + +AI_CHAT_RESPONSE_DATA_ATTRIBUTES_STATUS_VALUES: set[AiChatResponseDataAttributesStatus] = { + "user_input_required", +} + + +def check_ai_chat_response_data_attributes_status(value: str | None) -> AiChatResponseDataAttributesStatus | None: + if value is None: + return None + if value in AI_CHAT_RESPONSE_DATA_ATTRIBUTES_STATUS_VALUES: + return cast(AiChatResponseDataAttributesStatus, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {AI_CHAT_RESPONSE_DATA_ATTRIBUTES_STATUS_VALUES!r}") diff --git a/rootly_sdk/models/ai_chat_response_data_type.py b/rootly_sdk/models/ai_chat_response_data_type.py new file mode 100644 index 00000000..ac9c7a26 --- /dev/null +++ b/rootly_sdk/models/ai_chat_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +AiChatResponseDataType = Literal["ai_chat_responses"] + +AI_CHAT_RESPONSE_DATA_TYPE_VALUES: set[AiChatResponseDataType] = { + "ai_chat_responses", +} + + +def check_ai_chat_response_data_type(value: str | None) -> AiChatResponseDataType | None: + if value is None: + return None + if value in AI_CHAT_RESPONSE_DATA_TYPE_VALUES: + return cast(AiChatResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {AI_CHAT_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/ai_chat_session_message.py b/rootly_sdk/models/ai_chat_session_message.py new file mode 100644 index 00000000..339b3a07 --- /dev/null +++ b/rootly_sdk/models/ai_chat_session_message.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.ai_chat_session_message_role import AiChatSessionMessageRole +from ..models.ai_chat_session_message_role import check_ai_chat_session_message_role +from dateutil.parser import isoparse +from typing import cast +from uuid import UUID +import datetime + + +T = TypeVar("T", bound="AiChatSessionMessage") + + +@_attrs_define +class AiChatSessionMessage: + """ + Attributes: + id (UUID): Message UUID + role (AiChatSessionMessageRole): Message author role + content (str): Message content + created_at (datetime.datetime): When the message was created + """ + + id: UUID + role: AiChatSessionMessageRole + content: str + created_at: datetime.datetime + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = str(self.id) + + role: str = self.role + + content = self.content + + created_at = self.created_at.isoformat() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "role": role, + "content": content, + "created_at": created_at, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = UUID(d.pop("id")) + + role = check_ai_chat_session_message_role(d.pop("role")) + + content = d.pop("content") + + created_at = isoparse(d.pop("created_at")) + + ai_chat_session_message = cls( + id=id, + role=role, + content=content, + created_at=created_at, + ) + + ai_chat_session_message.additional_properties = d + return ai_chat_session_message + + @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/ai_chat_session_message_list.py b/rootly_sdk/models/ai_chat_session_message_list.py new file mode 100644 index 00000000..0b09d867 --- /dev/null +++ b/rootly_sdk/models/ai_chat_session_message_list.py @@ -0,0 +1,101 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.ai_chat_session_message import AiChatSessionMessage + from ..models.ai_chat_session_message_list_meta import AiChatSessionMessageListMeta + + +T = TypeVar("T", bound="AiChatSessionMessageList") + + +@_attrs_define +class AiChatSessionMessageList: + """ + Attributes: + messages (list[AiChatSessionMessage]): + meta (AiChatSessionMessageListMeta | Unset): + """ + + messages: list[AiChatSessionMessage] + meta: AiChatSessionMessageListMeta | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.ai_chat_session_message_list_meta import AiChatSessionMessageListMeta + from ..models.ai_chat_session_message import AiChatSessionMessage + + messages = [] + for messages_item_data in self.messages: + messages_item = messages_item_data.to_dict() + messages.append(messages_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( + { + "messages": messages, + } + ) + 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.ai_chat_session_message import AiChatSessionMessage + from ..models.ai_chat_session_message_list_meta import AiChatSessionMessageListMeta + + d = dict(src_dict) + messages = [] + _messages = d.pop("messages") + for messages_item_data in _messages: + messages_item = AiChatSessionMessage.from_dict(messages_item_data) + + messages.append(messages_item) + + _meta = d.pop("meta", UNSET) + meta: AiChatSessionMessageListMeta | Unset + if isinstance(_meta, Unset): + meta = UNSET + else: + meta = AiChatSessionMessageListMeta.from_dict(_meta) + + ai_chat_session_message_list = cls( + messages=messages, + meta=meta, + ) + + ai_chat_session_message_list.additional_properties = d + return ai_chat_session_message_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/ai_chat_session_message_list_meta.py b/rootly_sdk/models/ai_chat_session_message_list_meta.py new file mode 100644 index 00000000..9f0cb383 --- /dev/null +++ b/rootly_sdk/models/ai_chat_session_message_list_meta.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AiChatSessionMessageListMeta") + + +@_attrs_define +class AiChatSessionMessageListMeta: + """ """ + + 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) + ai_chat_session_message_list_meta = cls() + + ai_chat_session_message_list_meta.additional_properties = d + return ai_chat_session_message_list_meta + + @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/ai_chat_session_message_role.py b/rootly_sdk/models/ai_chat_session_message_role.py new file mode 100644 index 00000000..1010ea80 --- /dev/null +++ b/rootly_sdk/models/ai_chat_session_message_role.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +AiChatSessionMessageRole = Literal["assistant", "user"] + +AI_CHAT_SESSION_MESSAGE_ROLE_VALUES: set[AiChatSessionMessageRole] = { + "assistant", + "user", +} + + +def check_ai_chat_session_message_role(value: str | None) -> AiChatSessionMessageRole | None: + if value is None: + return None + if value in AI_CHAT_SESSION_MESSAGE_ROLE_VALUES: + return cast(AiChatSessionMessageRole, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {AI_CHAT_SESSION_MESSAGE_ROLE_VALUES!r}") diff --git a/rootly_sdk/models/alert.py b/rootly_sdk/models/alert.py index f058d7e5..15ced4bc 100644 --- a/rootly_sdk/models/alert.py +++ b/rootly_sdk/models/alert.py @@ -1,25 +1,36 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from dateutil.parser import isoparse -from ..models.alert_noise import AlertNoise, check_alert_noise -from ..models.alert_source import AlertSource, check_alert_source -from ..models.alert_status import AlertStatus, check_alert_status from ..types import UNSET, Unset +from ..models.alert_noise import AlertNoise +from ..models.alert_noise import check_alert_noise +from ..models.alert_notification_target_type import AlertNotificationTargetType +from ..models.alert_notification_target_type import check_alert_notification_target_type +from ..models.alert_status import AlertStatus +from ..models.alert_status import check_alert_status +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + if TYPE_CHECKING: - from ..models.alert_alert_field_values_attributes_item_type_0 import AlertAlertFieldValuesAttributesItemType0 + from ..models.alert_alert_field_values_type_0_item import AlertAlertFieldValuesType0Item + from ..models.alert_alerting_targets_type_0_item import AlertAlertingTargetsType0Item from ..models.alert_data_type_0 import AlertDataType0 from ..models.alert_labels_item_type_0 import AlertLabelsItemType0 + from ..models.alert_urgency import AlertUrgency from ..models.environment import Environment + from ..models.functionality import Functionality from ..models.service import Service from ..models.team import Team + from ..models.user import User + from ..models.user_flat_response import UserFlatResponse T = TypeVar("T", bound="Alert") @@ -30,7 +41,7 @@ class Alert: """ Attributes: short_id (str): Human-readable short identifier for the alert - source (AlertSource): The source of the alert + source (str): The source of the alert summary (str): The summary of the alert created_at (str): Date of creation updated_at (str): Date of last update @@ -39,28 +50,43 @@ class 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 + functionalities (list[Functionality] | Unset): Functionalities 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. + functionality_ids (list[str] | None | Unset): The Functionality IDs to attach to the alert 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 + alert_urgency (AlertUrgency | Unset): 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 + notification_target_type (AlertNotificationTargetType | Unset): Only available for organizations with Rootly On- + Call enabled. Can be one of Group, Service, EscalationPolicy, Functionality, User. + notification_target_id (None | str | Unset): Only available for organizations with Rootly On-Call enabled. The + identifier of the notification target object. 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 + alert_field_values (list[AlertAlertFieldValuesType0Item] | None | Unset): Custom alert field values associated + with the alert. Only present when the enable_alert_fields feature flag is enabled for the team. + responders (list[UserFlatResponse] | None | Unset): Users who responded to the alert. Included on all non-list + responses (show, create, update, resolve, etc.); on list responses only when `include=responders` is requested. + notified_users (list[User] | None | Unset): Users who were notified about the alert. Included on all non-list + responses (show, create, update, resolve, etc.); on list responses only when `include=notified_users` is + requested. + alerting_targets (list[AlertAlertingTargetsType0Item] | None | Unset): Alerting targets associated with the + alert. Only present when advanced routing is enabled for the team. + url (str | Unset): The Rootly dashboard URL for 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 - source: AlertSource + source: str summary: str created_at: str updated_at: str @@ -69,31 +95,48 @@ class Alert: description: None | str | Unset = UNSET services: list[Service] | Unset = UNSET groups: list[Team] | Unset = UNSET + functionalities: list[Functionality] | Unset = UNSET environments: list[Environment] | Unset = UNSET service_ids: list[str] | None | Unset = UNSET group_ids: list[str] | None | Unset = UNSET + functionality_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 + alert_urgency: AlertUrgency | 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 + notification_target_type: AlertNotificationTargetType | Unset = UNSET + notification_target_id: None | str | Unset = UNSET deduplication_key: None | str | Unset = UNSET - alert_field_values_attributes: list[AlertAlertFieldValuesAttributesItemType0 | None] | Unset = UNSET + alert_field_values: list[AlertAlertFieldValuesType0Item] | None | Unset = UNSET + responders: list[UserFlatResponse] | None | Unset = UNSET + notified_users: list[User] | None | Unset = UNSET + alerting_targets: list[AlertAlertingTargetsType0Item] | None | Unset = UNSET + url: str | 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]: - from ..models.alert_alert_field_values_attributes_item_type_0 import AlertAlertFieldValuesAttributesItemType0 + from ..models.alert_alerting_targets_type_0_item import AlertAlertingTargetsType0Item + from ..models.service import Service + from ..models.alert_alert_field_values_type_0_item import AlertAlertFieldValuesType0Item + from ..models.user_flat_response import UserFlatResponse + from ..models.user import User + from ..models.team import Team from ..models.alert_data_type_0 import AlertDataType0 from ..models.alert_labels_item_type_0 import AlertLabelsItemType0 + from ..models.environment import Environment + from ..models.functionality import Functionality + from ..models.alert_urgency import AlertUrgency short_id = self.short_id - source: str = self.source + source = self.source summary = self.summary @@ -129,6 +172,13 @@ def to_dict(self) -> dict[str, Any]: groups_item = groups_item_data.to_dict() groups.append(groups_item) + functionalities: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.functionalities, Unset): + functionalities = [] + for functionalities_item_data in self.functionalities: + functionalities_item = functionalities_item_data.to_dict() + functionalities.append(functionalities_item) + environments: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.environments, Unset): environments = [] @@ -154,6 +204,15 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids + functionality_ids: list[str] | None | Unset + if isinstance(self.functionality_ids, Unset): + functionality_ids = UNSET + elif isinstance(self.functionality_ids, list): + functionality_ids = self.functionality_ids + + else: + functionality_ids = self.functionality_ids + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET @@ -181,6 +240,10 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_id = self.alert_urgency_id + alert_urgency: dict[str, Any] | Unset = UNSET + if not isinstance(self.alert_urgency, Unset): + alert_urgency = self.alert_urgency.to_dict() + group_leader_alert_id: None | str | Unset if isinstance(self.group_leader_alert_id, Unset): group_leader_alert_id = UNSET @@ -212,22 +275,71 @@ def to_dict(self) -> dict[str, Any]: else: data = self.data + 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 | str | Unset + if isinstance(self.notification_target_id, Unset): + notification_target_id = UNSET + else: + notification_target_id = self.notification_target_id + deduplication_key: None | str | Unset if isinstance(self.deduplication_key, Unset): deduplication_key = UNSET else: deduplication_key = self.deduplication_key - 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: 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) + alert_field_values: list[dict[str, Any]] | None | Unset + if isinstance(self.alert_field_values, Unset): + alert_field_values = UNSET + elif isinstance(self.alert_field_values, list): + alert_field_values = [] + for alert_field_values_type_0_item_data in self.alert_field_values: + alert_field_values_type_0_item = alert_field_values_type_0_item_data.to_dict() + alert_field_values.append(alert_field_values_type_0_item) + + else: + alert_field_values = self.alert_field_values + + responders: list[dict[str, Any]] | None | Unset + if isinstance(self.responders, Unset): + responders = UNSET + elif isinstance(self.responders, list): + responders = [] + for responders_type_0_item_data in self.responders: + responders_type_0_item = responders_type_0_item_data.to_dict() + responders.append(responders_type_0_item) + + else: + responders = self.responders + + notified_users: list[dict[str, Any]] | None | Unset + if isinstance(self.notified_users, Unset): + notified_users = UNSET + elif isinstance(self.notified_users, list): + notified_users = [] + for notified_users_type_0_item_data in self.notified_users: + notified_users_type_0_item = notified_users_type_0_item_data.to_dict() + notified_users.append(notified_users_type_0_item) + + else: + notified_users = self.notified_users + + alerting_targets: list[dict[str, Any]] | None | Unset + if isinstance(self.alerting_targets, Unset): + alerting_targets = UNSET + elif isinstance(self.alerting_targets, list): + alerting_targets = [] + for alerting_targets_type_0_item_data in self.alerting_targets: + alerting_targets_type_0_item = alerting_targets_type_0_item_data.to_dict() + alerting_targets.append(alerting_targets_type_0_item) + + else: + alerting_targets = self.alerting_targets + + url = self.url started_at: None | str | Unset if isinstance(self.started_at, Unset): @@ -266,12 +378,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["services"] = services if groups is not UNSET: field_dict["groups"] = groups + if functionalities is not UNSET: + field_dict["functionalities"] = functionalities if environments is not UNSET: field_dict["environments"] = environments if service_ids is not UNSET: field_dict["service_ids"] = service_ids if group_ids is not UNSET: field_dict["group_ids"] = group_ids + if functionality_ids is not UNSET: + field_dict["functionality_ids"] = functionality_ids if environment_ids is not UNSET: field_dict["environment_ids"] = environment_ids if external_id is not UNSET: @@ -280,6 +396,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["external_url"] = external_url if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id + if alert_urgency is not UNSET: + field_dict["alert_urgency"] = alert_urgency if group_leader_alert_id is not UNSET: field_dict["group_leader_alert_id"] = group_leader_alert_id if is_group_leader_alert is not UNSET: @@ -288,10 +406,22 @@ def to_dict(self) -> dict[str, Any]: field_dict["labels"] = labels if data is not UNSET: field_dict["data"] = data + if notification_target_type is not UNSET: + field_dict["notification_target_type"] = notification_target_type + if notification_target_id is not UNSET: + field_dict["notification_target_id"] = notification_target_id if deduplication_key is not UNSET: field_dict["deduplication_key"] = deduplication_key - if alert_field_values_attributes is not UNSET: - field_dict["alert_field_values_attributes"] = alert_field_values_attributes + if alert_field_values is not UNSET: + field_dict["alert_field_values"] = alert_field_values + if responders is not UNSET: + field_dict["responders"] = responders + if notified_users is not UNSET: + field_dict["notified_users"] = notified_users + if alerting_targets is not UNSET: + field_dict["alerting_targets"] = alerting_targets + if url is not UNSET: + field_dict["url"] = url if started_at is not UNSET: field_dict["started_at"] = started_at if ended_at is not UNSET: @@ -301,17 +431,22 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: - from ..models.alert_alert_field_values_attributes_item_type_0 import AlertAlertFieldValuesAttributesItemType0 + from ..models.alert_alert_field_values_type_0_item import AlertAlertFieldValuesType0Item + from ..models.alert_alerting_targets_type_0_item import AlertAlertingTargetsType0Item from ..models.alert_data_type_0 import AlertDataType0 from ..models.alert_labels_item_type_0 import AlertLabelsItemType0 + from ..models.alert_urgency import AlertUrgency from ..models.environment import Environment + from ..models.functionality import Functionality from ..models.service import Service from ..models.team import Team + from ..models.user import User + from ..models.user_flat_response import UserFlatResponse d = dict(src_dict) short_id = d.pop("short_id") - source = check_alert_source(d.pop("source")) + source = d.pop("source") summary = d.pop("summary") @@ -360,6 +495,15 @@ def _parse_description(data: object) -> None | str | Unset: groups.append(groups_item) + _functionalities = d.pop("functionalities", UNSET) + functionalities: list[Functionality] | Unset = UNSET + if _functionalities is not UNSET: + functionalities = [] + for functionalities_item_data in _functionalities: + functionalities_item = Functionality.from_dict(functionalities_item_data) + + functionalities.append(functionalities_item) + _environments = d.pop("environments", UNSET) environments: list[Environment] | Unset = UNSET if _environments is not UNSET: @@ -403,6 +547,23 @@ def _parse_group_ids(data: object) -> list[str] | None | Unset: group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) + def _parse_functionality_ids(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() + functionality_ids_type_0 = cast(list[str], data) + + return functionality_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data @@ -447,6 +608,13 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset: alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) + _alert_urgency = d.pop("alert_urgency", UNSET) + alert_urgency: AlertUrgency | Unset + if isinstance(_alert_urgency, Unset): + alert_urgency = UNSET + else: + alert_urgency = AlertUrgency.from_dict(_alert_urgency) + def _parse_group_leader_alert_id(data: object) -> None | str | Unset: if data is None: return data @@ -505,6 +673,22 @@ def _parse_data(data: object) -> AlertDataType0 | None | Unset: data = _parse_data(d.pop("data", UNSET)) + _notification_target_type = d.pop("notification_target_type", UNSET) + notification_target_type: AlertNotificationTargetType | Unset + if isinstance(_notification_target_type, Unset): + notification_target_type = UNSET + else: + notification_target_type = check_alert_notification_target_type(_notification_target_type) + + 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 | str | Unset, data) + + notification_target_id = _parse_notification_target_id(d.pop("notification_target_id", UNSET)) + def _parse_deduplication_key(data: object) -> None | str | Unset: if data is None: return data @@ -514,34 +698,99 @@ def _parse_deduplication_key(data: object) -> None | str | Unset: deduplication_key = _parse_deduplication_key(d.pop("deduplication_key", UNSET)) - _alert_field_values_attributes = d.pop("alert_field_values_attributes", UNSET) - 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(data: object) -> list[AlertAlertFieldValuesType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + alert_field_values_type_0 = [] + _alert_field_values_type_0 = data + for alert_field_values_type_0_item_data in _alert_field_values_type_0: + alert_field_values_type_0_item = AlertAlertFieldValuesType0Item.from_dict( + alert_field_values_type_0_item_data + ) - 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 - ) + alert_field_values_type_0.append(alert_field_values_type_0_item) - return alert_field_values_attributes_item_type_0 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(AlertAlertFieldValuesAttributesItemType0 | None, data) + return alert_field_values_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[AlertAlertFieldValuesType0Item] | None | Unset, data) + + alert_field_values = _parse_alert_field_values(d.pop("alert_field_values", UNSET)) + + def _parse_responders(data: object) -> list[UserFlatResponse] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + responders_type_0 = [] + _responders_type_0 = data + for responders_type_0_item_data in _responders_type_0: + responders_type_0_item = UserFlatResponse.from_dict(responders_type_0_item_data) + + responders_type_0.append(responders_type_0_item) + + return responders_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[UserFlatResponse] | None | Unset, data) + + responders = _parse_responders(d.pop("responders", UNSET)) + + def _parse_notified_users(data: object) -> list[User] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + notified_users_type_0 = [] + _notified_users_type_0 = data + for notified_users_type_0_item_data in _notified_users_type_0: + notified_users_type_0_item = User.from_dict(notified_users_type_0_item_data) + + notified_users_type_0.append(notified_users_type_0_item) + + return notified_users_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[User] | None | Unset, data) + + notified_users = _parse_notified_users(d.pop("notified_users", UNSET)) + + def _parse_alerting_targets(data: object) -> list[AlertAlertingTargetsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + alerting_targets_type_0 = [] + _alerting_targets_type_0 = data + for alerting_targets_type_0_item_data in _alerting_targets_type_0: + alerting_targets_type_0_item = AlertAlertingTargetsType0Item.from_dict( + alerting_targets_type_0_item_data + ) + + alerting_targets_type_0.append(alerting_targets_type_0_item) + + return alerting_targets_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[AlertAlertingTargetsType0Item] | None | Unset, data) - alert_field_values_attributes_item = _parse_alert_field_values_attributes_item( - alert_field_values_attributes_item_data - ) + alerting_targets = _parse_alerting_targets(d.pop("alerting_targets", UNSET)) - alert_field_values_attributes.append(alert_field_values_attributes_item) + url = d.pop("url", UNSET) def _parse_started_at(data: object) -> datetime.datetime | None | Unset: if data is None: @@ -588,19 +837,28 @@ def _parse_ended_at(data: object) -> datetime.datetime | None | Unset: description=description, services=services, groups=groups, + functionalities=functionalities, environments=environments, service_ids=service_ids, group_ids=group_ids, + functionality_ids=functionality_ids, environment_ids=environment_ids, external_id=external_id, external_url=external_url, alert_urgency_id=alert_urgency_id, + alert_urgency=alert_urgency, group_leader_alert_id=group_leader_alert_id, is_group_leader_alert=is_group_leader_alert, labels=labels, data=data, + notification_target_type=notification_target_type, + notification_target_id=notification_target_id, deduplication_key=deduplication_key, - alert_field_values_attributes=alert_field_values_attributes, + alert_field_values=alert_field_values, + responders=responders, + notified_users=notified_users, + alerting_targets=alerting_targets, + url=url, started_at=started_at, ended_at=ended_at, ) diff --git a/rootly_sdk/models/alert_alert_field_values_type_0_item.py b/rootly_sdk/models/alert_alert_field_values_type_0_item.py new file mode 100644 index 00000000..e2df660e --- /dev/null +++ b/rootly_sdk/models/alert_alert_field_values_type_0_item.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AlertAlertFieldValuesType0Item") + + +@_attrs_define +class AlertAlertFieldValuesType0Item: + """ + Attributes: + id (str): Unique ID of the alert field value + value (str): Value for the alert field + alert_field_id (str): ID of the custom alert field + alert_id (str): ID of the alert + created_at (str): Date of creation + updated_at (str): Date of last update + """ + + id: str + value: str + alert_field_id: str + alert_id: str + created_at: str + updated_at: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + value = self.value + + alert_field_id = self.alert_field_id + + alert_id = self.alert_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( + { + "id": id, + "value": value, + "alert_field_id": alert_field_id, + "alert_id": alert_id, + "created_at": created_at, + "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") + + value = d.pop("value") + + alert_field_id = d.pop("alert_field_id") + + alert_id = d.pop("alert_id") + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + alert_alert_field_values_type_0_item = cls( + id=id, + value=value, + alert_field_id=alert_field_id, + alert_id=alert_id, + created_at=created_at, + updated_at=updated_at, + ) + + alert_alert_field_values_type_0_item.additional_properties = d + return alert_alert_field_values_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/alert_alerting_targets_type_0_item.py b/rootly_sdk/models/alert_alerting_targets_type_0_item.py new file mode 100644 index 00000000..86df5734 --- /dev/null +++ b/rootly_sdk/models/alert_alerting_targets_type_0_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AlertAlertingTargetsType0Item") + + +@_attrs_define +class AlertAlertingTargetsType0Item: + """ + Attributes: + id (str): ID of the alerting target + type_ (str): Type of the alerting target (e.g. team, user, escalation_policy, service, functionality, + slack_channel) + """ + + id: str + type_: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + type_ = 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_ = d.pop("type") + + alert_alerting_targets_type_0_item = cls( + id=id, + type_=type_, + ) + + alert_alerting_targets_type_0_item.additional_properties = d + return alert_alerting_targets_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/alert_data_type_0.py b/rootly_sdk/models/alert_data_type_0.py index ce1e2630..bfe7fa8f 100644 --- a/rootly_sdk/models/alert_data_type_0.py +++ b/rootly_sdk/models/alert_data_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AlertDataType0") diff --git a/rootly_sdk/models/alert_event.py b/rootly_sdk/models/alert_event.py index d0e3ceb2..8f9e898b 100644 --- a/rootly_sdk/models/alert_event.py +++ b/rootly_sdk/models/alert_event.py @@ -1,15 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_event_action import AlertEventAction, check_alert_event_action -from ..models.alert_event_kind import AlertEventKind, check_alert_event_kind from ..types import UNSET, Unset +from ..models.alert_event_action import AlertEventAction +from ..models.alert_event_action import check_alert_event_action +from ..models.alert_event_kind import AlertEventKind +from ..models.alert_event_kind import check_alert_event_kind +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 + from ..models.alert_event_incident_type_0 import AlertEventIncidentType0 + from ..models.alert_event_schedule_type_0 import AlertEventScheduleType0 + from ..models.alert_event_user import AlertEventUser + from ..models.slack_channel import SlackChannel + + T = TypeVar("T", bound="AlertEvent") @@ -17,6 +30,7 @@ class AlertEvent: """ Attributes: + alert_id (str): ID of the alert this event belongs to. kind (AlertEventKind): action (AlertEventAction): source (str): @@ -24,8 +38,18 @@ class AlertEvent: updated_at (str): user_id (int | None | Unset): Author of the note. details (None | str | Unset): Note message. + user (AlertEventUser | Unset): + incident (AlertEventIncidentType0 | None | Unset): + schedule (AlertEventScheduleType0 | None | Unset): + escalation_level (int | None | Unset): + escalation_target_type (None | str | Unset): e.g. EscalationPolicy, User. + escalation_target (AlertEventEscalationTargetType0 | None | Unset): JSON:API-wrapped escalation target (User or + EscalationPolicy). + slack_channel (SlackChannel | Unset): + incident_ids (list[str] | None | Unset): """ + alert_id: str kind: AlertEventKind action: AlertEventAction source: str @@ -33,9 +57,25 @@ class AlertEvent: updated_at: str user_id: int | None | Unset = UNSET details: None | str | Unset = UNSET + user: AlertEventUser | Unset = UNSET + incident: AlertEventIncidentType0 | None | Unset = UNSET + schedule: AlertEventScheduleType0 | None | Unset = UNSET + escalation_level: int | None | Unset = UNSET + escalation_target_type: None | str | Unset = UNSET + escalation_target: AlertEventEscalationTargetType0 | None | Unset = UNSET + slack_channel: SlackChannel | Unset = UNSET + incident_ids: list[str] | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 + from ..models.slack_channel import SlackChannel + from ..models.alert_event_incident_type_0 import AlertEventIncidentType0 + from ..models.alert_event_user import AlertEventUser + from ..models.alert_event_schedule_type_0 import AlertEventScheduleType0 + + alert_id = self.alert_id + kind: str = self.kind action: str = self.action @@ -58,10 +98,64 @@ def to_dict(self) -> dict[str, Any]: else: details = self.details + user: dict[str, Any] | Unset = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + incident: dict[str, Any] | None | Unset + if isinstance(self.incident, Unset): + incident = UNSET + elif isinstance(self.incident, AlertEventIncidentType0): + incident = self.incident.to_dict() + else: + incident = self.incident + + schedule: dict[str, Any] | None | Unset + if isinstance(self.schedule, Unset): + schedule = UNSET + elif isinstance(self.schedule, AlertEventScheduleType0): + schedule = self.schedule.to_dict() + else: + schedule = self.schedule + + escalation_level: int | None | Unset + if isinstance(self.escalation_level, Unset): + escalation_level = UNSET + else: + escalation_level = self.escalation_level + + escalation_target_type: None | str | Unset + if isinstance(self.escalation_target_type, Unset): + escalation_target_type = UNSET + else: + escalation_target_type = self.escalation_target_type + + escalation_target: dict[str, Any] | None | Unset + if isinstance(self.escalation_target, Unset): + escalation_target = UNSET + elif isinstance(self.escalation_target, AlertEventEscalationTargetType0): + escalation_target = self.escalation_target.to_dict() + else: + escalation_target = self.escalation_target + + slack_channel: dict[str, Any] | Unset = UNSET + if not isinstance(self.slack_channel, Unset): + slack_channel = self.slack_channel.to_dict() + + incident_ids: list[str] | None | Unset + if isinstance(self.incident_ids, Unset): + incident_ids = UNSET + elif isinstance(self.incident_ids, list): + incident_ids = self.incident_ids + + else: + incident_ids = self.incident_ids + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { + "alert_id": alert_id, "kind": kind, "action": action, "source": source, @@ -73,12 +167,36 @@ def to_dict(self) -> dict[str, Any]: field_dict["user_id"] = user_id if details is not UNSET: field_dict["details"] = details + if user is not UNSET: + field_dict["user"] = user + if incident is not UNSET: + field_dict["incident"] = incident + if schedule is not UNSET: + field_dict["schedule"] = schedule + if escalation_level is not UNSET: + field_dict["escalation_level"] = escalation_level + if escalation_target_type is not UNSET: + field_dict["escalation_target_type"] = escalation_target_type + if escalation_target is not UNSET: + field_dict["escalation_target"] = escalation_target + if slack_channel is not UNSET: + field_dict["slack_channel"] = slack_channel + if incident_ids is not UNSET: + field_dict["incident_ids"] = incident_ids return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 + from ..models.alert_event_incident_type_0 import AlertEventIncidentType0 + from ..models.alert_event_schedule_type_0 import AlertEventScheduleType0 + from ..models.alert_event_user import AlertEventUser + from ..models.slack_channel import SlackChannel + d = dict(src_dict) + alert_id = d.pop("alert_id") + kind = check_alert_event_kind(d.pop("kind")) action = check_alert_event_action(d.pop("action")) @@ -107,7 +225,108 @@ def _parse_details(data: object) -> None | str | Unset: details = _parse_details(d.pop("details", UNSET)) + _user = d.pop("user", UNSET) + user: AlertEventUser | Unset + if isinstance(_user, Unset): + user = UNSET + else: + user = AlertEventUser.from_dict(_user) + + def _parse_incident(data: object) -> AlertEventIncidentType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + incident_type_0 = AlertEventIncidentType0.from_dict(data) + + return incident_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AlertEventIncidentType0 | None | Unset, data) + + incident = _parse_incident(d.pop("incident", UNSET)) + + def _parse_schedule(data: object) -> AlertEventScheduleType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + schedule_type_0 = AlertEventScheduleType0.from_dict(data) + + return schedule_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AlertEventScheduleType0 | None | Unset, data) + + schedule = _parse_schedule(d.pop("schedule", UNSET)) + + def _parse_escalation_level(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + escalation_level = _parse_escalation_level(d.pop("escalation_level", UNSET)) + + def _parse_escalation_target_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + escalation_target_type = _parse_escalation_target_type(d.pop("escalation_target_type", UNSET)) + + def _parse_escalation_target(data: object) -> AlertEventEscalationTargetType0 | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + escalation_target_type_0 = AlertEventEscalationTargetType0.from_dict(data) + + return escalation_target_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(AlertEventEscalationTargetType0 | None | Unset, data) + + escalation_target = _parse_escalation_target(d.pop("escalation_target", UNSET)) + + _slack_channel = d.pop("slack_channel", UNSET) + slack_channel: SlackChannel | Unset + if isinstance(_slack_channel, Unset): + slack_channel = UNSET + else: + slack_channel = SlackChannel.from_dict(_slack_channel) + + def _parse_incident_ids(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() + incident_ids_type_0 = cast(list[str], data) + + return incident_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + incident_ids = _parse_incident_ids(d.pop("incident_ids", UNSET)) + alert_event = cls( + alert_id=alert_id, kind=kind, action=action, source=source, @@ -115,6 +334,14 @@ def _parse_details(data: object) -> None | str | Unset: updated_at=updated_at, user_id=user_id, details=details, + user=user, + incident=incident, + schedule=schedule, + escalation_level=escalation_level, + escalation_target_type=escalation_target_type, + escalation_target=escalation_target, + slack_channel=slack_channel, + incident_ids=incident_ids, ) alert_event.additional_properties = d diff --git a/rootly_sdk/models/alert_event_action.py b/rootly_sdk/models/alert_event_action.py index 84ecf6ce..ed9276ab 100644 --- a/rootly_sdk/models/alert_event_action.py +++ b/rootly_sdk/models/alert_event_action.py @@ -5,14 +5,18 @@ "added", "answered", "attached", + "call_lifecycle", "called", "created", "deferred", "emailed", "escalated", "escalation_policy_paged", + "google_chat_messaged", "ignored_alert_request", + "level_skipped", "marked", + "ms_teams_messaged", "muted", "not_marked", "notified", @@ -35,14 +39,18 @@ "added", "answered", "attached", + "call_lifecycle", "called", "created", "deferred", "emailed", "escalated", "escalation_policy_paged", + "google_chat_messaged", "ignored_alert_request", + "level_skipped", "marked", + "ms_teams_messaged", "muted", "not_marked", "notified", diff --git a/rootly_sdk/models/alert_event_escalation_target_type_0.py b/rootly_sdk/models/alert_event_escalation_target_type_0.py new file mode 100644 index 00000000..58f2f757 --- /dev/null +++ b/rootly_sdk/models/alert_event_escalation_target_type_0.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.alert_event_escalation_target_type_0_data import AlertEventEscalationTargetType0Data + + +T = TypeVar("T", bound="AlertEventEscalationTargetType0") + + +@_attrs_define +class AlertEventEscalationTargetType0: + """JSON:API-wrapped escalation target (User or EscalationPolicy). + + Attributes: + data (AlertEventEscalationTargetType0Data | Unset): + """ + + data: AlertEventEscalationTargetType0Data | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.alert_event_escalation_target_type_0_data import AlertEventEscalationTargetType0Data + + 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.alert_event_escalation_target_type_0_data import AlertEventEscalationTargetType0Data + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: AlertEventEscalationTargetType0Data | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = AlertEventEscalationTargetType0Data.from_dict(_data) + + alert_event_escalation_target_type_0 = cls( + data=data, + ) + + alert_event_escalation_target_type_0.additional_properties = d + return alert_event_escalation_target_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/alert_event_escalation_target_type_0_data.py b/rootly_sdk/models/alert_event_escalation_target_type_0_data.py new file mode 100644 index 00000000..e7c1d87b --- /dev/null +++ b/rootly_sdk/models/alert_event_escalation_target_type_0_data.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.alert_event_escalation_target_type_0_data_attributes import ( + AlertEventEscalationTargetType0DataAttributes, + ) + + +T = TypeVar("T", bound="AlertEventEscalationTargetType0Data") + + +@_attrs_define +class AlertEventEscalationTargetType0Data: + """ + Attributes: + id (str | Unset): + type_ (str | Unset): e.g. users, escalation_policies. + attributes (AlertEventEscalationTargetType0DataAttributes | Unset): + """ + + id: str | Unset = UNSET + type_: str | Unset = UNSET + attributes: AlertEventEscalationTargetType0DataAttributes | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.alert_event_escalation_target_type_0_data_attributes import ( + AlertEventEscalationTargetType0DataAttributes, + ) + + id = self.id + + 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.alert_event_escalation_target_type_0_data_attributes import ( + AlertEventEscalationTargetType0DataAttributes, + ) + + d = dict(src_dict) + id = d.pop("id", UNSET) + + type_ = d.pop("type", UNSET) + + _attributes = d.pop("attributes", UNSET) + attributes: AlertEventEscalationTargetType0DataAttributes | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = AlertEventEscalationTargetType0DataAttributes.from_dict(_attributes) + + alert_event_escalation_target_type_0_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + alert_event_escalation_target_type_0_data.additional_properties = d + return alert_event_escalation_target_type_0_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/alert_event_escalation_target_type_0_data_attributes.py b/rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py new file mode 100644 index 00000000..41a8f35a --- /dev/null +++ b/rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AlertEventEscalationTargetType0DataAttributes") + + +@_attrs_define +class AlertEventEscalationTargetType0DataAttributes: + """ """ + + 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) + alert_event_escalation_target_type_0_data_attributes = cls() + + alert_event_escalation_target_type_0_data_attributes.additional_properties = d + return alert_event_escalation_target_type_0_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/alert_event_feed_list.py b/rootly_sdk/models/alert_event_feed_list.py new file mode 100644 index 00000000..ae334aac --- /dev/null +++ b/rootly_sdk/models/alert_event_feed_list.py @@ -0,0 +1,137 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.alert_event_feed_list_data_item import AlertEventFeedListDataItem + from ..models.alert_event_feed_meta import AlertEventFeedMeta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + + +T = TypeVar("T", bound="AlertEventFeedList") + + +@_attrs_define +class AlertEventFeedList: + """ + Attributes: + data (list[AlertEventFeedListDataItem]): + meta (AlertEventFeedMeta): Cursor-pagination meta. `total_count` and `total_pages` are nullable because the feed + does not run a COUNT query. + links (Links | Unset): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: list[AlertEventFeedListDataItem] + meta: AlertEventFeedMeta + links: Links | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.alert_event_feed_meta import AlertEventFeedMeta + from ..models.alert_event_feed_list_data_item import AlertEventFeedListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + meta = self.meta.to_dict() + + links: dict[str, Any] | Unset = UNSET + if not isinstance(self.links, Unset): + links = self.links.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "meta": meta, + } + ) + if links is not UNSET: + field_dict["links"] = links + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.alert_event_feed_list_data_item import AlertEventFeedListDataItem + from ..models.alert_event_feed_meta import AlertEventFeedMeta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = AlertEventFeedListDataItem.from_dict(data_item_data) + + data.append(data_item) + + meta = AlertEventFeedMeta.from_dict(d.pop("meta")) + + _links = d.pop("links", UNSET) + links: Links | Unset + if isinstance(_links, Unset): + links = UNSET + else: + links = Links.from_dict(_links) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + alert_event_feed_list = cls( + data=data, + meta=meta, + links=links, + included=included, + ) + + alert_event_feed_list.additional_properties = d + return alert_event_feed_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/alert_event_feed_list_data_item.py b/rootly_sdk/models/alert_event_feed_list_data_item.py new file mode 100644 index 00000000..e7b3d8e8 --- /dev/null +++ b/rootly_sdk/models/alert_event_feed_list_data_item.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.alert_event_feed_list_data_item_type import AlertEventFeedListDataItemType +from ..models.alert_event_feed_list_data_item_type import check_alert_event_feed_list_data_item_type +from typing import cast + +if TYPE_CHECKING: + from ..models.alert_event import AlertEvent + + +T = TypeVar("T", bound="AlertEventFeedListDataItem") + + +@_attrs_define +class AlertEventFeedListDataItem: + """ + Attributes: + id (str): Unique ID of the alert event + type_ (AlertEventFeedListDataItemType): + attributes (AlertEvent): + """ + + id: str + type_: AlertEventFeedListDataItemType + attributes: AlertEvent + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.alert_event import AlertEvent + + 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.alert_event import AlertEvent + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_alert_event_feed_list_data_item_type(d.pop("type")) + + attributes = AlertEvent.from_dict(d.pop("attributes")) + + alert_event_feed_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + alert_event_feed_list_data_item.additional_properties = d + return alert_event_feed_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/alert_event_feed_list_data_item_type.py b/rootly_sdk/models/alert_event_feed_list_data_item_type.py new file mode 100644 index 00000000..87999c29 --- /dev/null +++ b/rootly_sdk/models/alert_event_feed_list_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +AlertEventFeedListDataItemType = Literal["alert_events"] + +ALERT_EVENT_FEED_LIST_DATA_ITEM_TYPE_VALUES: set[AlertEventFeedListDataItemType] = { + "alert_events", +} + + +def check_alert_event_feed_list_data_item_type(value: str | None) -> AlertEventFeedListDataItemType | None: + if value is None: + return None + if value in ALERT_EVENT_FEED_LIST_DATA_ITEM_TYPE_VALUES: + return cast(AlertEventFeedListDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_EVENT_FEED_LIST_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/alert_event_feed_meta.py b/rootly_sdk/models/alert_event_feed_meta.py new file mode 100644 index 00000000..838283b6 --- /dev/null +++ b/rootly_sdk/models/alert_event_feed_meta.py @@ -0,0 +1,175 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="AlertEventFeedMeta") + + +@_attrs_define +class AlertEventFeedMeta: + """Cursor-pagination meta. `total_count` and `total_pages` are nullable because the feed does not run a COUNT query. + + Attributes: + next_cursor (None | str): Pass as `page[after]` on the next request to fetch the following page. + current_page (int | None | Unset): + next_page (int | None | Unset): + prev_page (int | None | Unset): + total_count (int | None | Unset): + total_pages (int | None | Unset): + """ + + next_cursor: None | str + current_page: int | None | Unset = UNSET + next_page: int | None | Unset = UNSET + prev_page: int | None | Unset = UNSET + total_count: int | None | Unset = UNSET + total_pages: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + next_cursor: None | str + next_cursor = self.next_cursor + + current_page: int | None | Unset + if isinstance(self.current_page, Unset): + current_page = UNSET + else: + current_page = self.current_page + + next_page: int | None | Unset + if isinstance(self.next_page, Unset): + next_page = UNSET + else: + next_page = self.next_page + + prev_page: int | None | Unset + if isinstance(self.prev_page, Unset): + prev_page = UNSET + else: + prev_page = self.prev_page + + total_count: int | None | Unset + if isinstance(self.total_count, Unset): + total_count = UNSET + else: + total_count = self.total_count + + total_pages: int | None | Unset + if isinstance(self.total_pages, Unset): + total_pages = UNSET + else: + total_pages = self.total_pages + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "next_cursor": next_cursor, + } + ) + if current_page is not UNSET: + field_dict["current_page"] = current_page + if next_page is not UNSET: + field_dict["next_page"] = next_page + if prev_page is not UNSET: + field_dict["prev_page"] = prev_page + if total_count is not UNSET: + field_dict["total_count"] = total_count + if total_pages is not UNSET: + field_dict["total_pages"] = total_pages + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + + def _parse_next_cursor(data: object) -> None | str: + if data is None: + return data + return cast(None | str, data) + + next_cursor = _parse_next_cursor(d.pop("next_cursor")) + + def _parse_current_page(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + current_page = _parse_current_page(d.pop("current_page", UNSET)) + + def _parse_next_page(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + next_page = _parse_next_page(d.pop("next_page", UNSET)) + + def _parse_prev_page(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + prev_page = _parse_prev_page(d.pop("prev_page", UNSET)) + + def _parse_total_count(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + total_count = _parse_total_count(d.pop("total_count", UNSET)) + + def _parse_total_pages(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + total_pages = _parse_total_pages(d.pop("total_pages", UNSET)) + + alert_event_feed_meta = cls( + next_cursor=next_cursor, + current_page=current_page, + next_page=next_page, + prev_page=prev_page, + total_count=total_count, + total_pages=total_pages, + ) + + alert_event_feed_meta.additional_properties = d + return alert_event_feed_meta + + @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/alert_event_incident_type_0.py b/rootly_sdk/models/alert_event_incident_type_0.py new file mode 100644 index 00000000..5d4b0da7 --- /dev/null +++ b/rootly_sdk/models/alert_event_incident_type_0.py @@ -0,0 +1,217 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="AlertEventIncidentType0") + + +@_attrs_define +class AlertEventIncidentType0: + """ + Attributes: + id (str | Unset): + sequential_id (int | None | Unset): + title (str | Unset): + slug (str | Unset): + kind (str | Unset): + status (str | Unset): + private (bool | Unset): + description (None | str | Unset): + started_at (None | str | Unset): + duration (int | None | Unset): Duration in seconds. + url (str | Unset): + created_at (str | Unset): + updated_at (str | Unset): + """ + + id: str | Unset = UNSET + sequential_id: int | None | Unset = UNSET + title: str | Unset = UNSET + slug: str | Unset = UNSET + kind: str | Unset = UNSET + status: str | Unset = UNSET + private: bool | Unset = UNSET + description: None | str | Unset = UNSET + started_at: None | str | Unset = UNSET + duration: int | None | Unset = UNSET + url: 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]: + id = self.id + + sequential_id: int | None | Unset + if isinstance(self.sequential_id, Unset): + sequential_id = UNSET + else: + sequential_id = self.sequential_id + + title = self.title + + slug = self.slug + + kind = self.kind + + status = self.status + + private = self.private + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + started_at: None | str | Unset + if isinstance(self.started_at, Unset): + started_at = UNSET + else: + started_at = self.started_at + + duration: int | None | Unset + if isinstance(self.duration, Unset): + duration = UNSET + else: + duration = self.duration + + url = self.url + + 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 sequential_id is not UNSET: + field_dict["sequential_id"] = sequential_id + if title is not UNSET: + field_dict["title"] = title + if slug is not UNSET: + field_dict["slug"] = slug + if kind is not UNSET: + field_dict["kind"] = kind + if status is not UNSET: + field_dict["status"] = status + if private is not UNSET: + field_dict["private"] = private + if description is not UNSET: + field_dict["description"] = description + if started_at is not UNSET: + field_dict["started_at"] = started_at + if duration is not UNSET: + field_dict["duration"] = duration + if url is not UNSET: + field_dict["url"] = url + 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) + + def _parse_sequential_id(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + sequential_id = _parse_sequential_id(d.pop("sequential_id", UNSET)) + + title = d.pop("title", UNSET) + + slug = d.pop("slug", UNSET) + + kind = d.pop("kind", UNSET) + + status = d.pop("status", UNSET) + + private = d.pop("private", 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_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_duration(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + duration = _parse_duration(d.pop("duration", UNSET)) + + url = d.pop("url", UNSET) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + alert_event_incident_type_0 = cls( + id=id, + sequential_id=sequential_id, + title=title, + slug=slug, + kind=kind, + status=status, + private=private, + description=description, + started_at=started_at, + duration=duration, + url=url, + created_at=created_at, + updated_at=updated_at, + ) + + alert_event_incident_type_0.additional_properties = d + return alert_event_incident_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/alert_event_list.py b/rootly_sdk/models/alert_event_list.py index bf443fde..4ff1e890 100644 --- a/rootly_sdk/models/alert_event_list.py +++ b/rootly_sdk/models/alert_event_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_event_list_data_item import AlertEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class AlertEventList: data (list[AlertEventListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertEventListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.alert_event_list_data_item import AlertEventListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_event_list_data_item import AlertEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_event_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_event_list.additional_properties = d diff --git a/rootly_sdk/models/alert_event_list_data_item.py b/rootly_sdk/models/alert_event_list_data_item.py index 16d7f67a..6a655475 100644 --- a/rootly_sdk/models/alert_event_list_data_item.py +++ b/rootly_sdk/models/alert_event_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_event_list_data_item_type import AlertEventListDataItemType, check_alert_event_list_data_item_type +from ..types import UNSET, Unset + +from ..models.alert_event_list_data_item_type import AlertEventListDataItemType +from ..models.alert_event_list_data_item_type import check_alert_event_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.alert_event import AlertEvent @@ -30,6 +34,8 @@ class AlertEventListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_event import AlertEvent + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_event_response.py b/rootly_sdk/models/alert_event_response.py index 5b95d09a..38d883fc 100644 --- a/rootly_sdk/models/alert_event_response.py +++ b/rootly_sdk/models/alert_event_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_event_response_data import AlertEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertEventResponse") @@ -18,14 +24,26 @@ class AlertEventResponse: """ Attributes: data (AlertEventResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertEventResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_event_response_data import AlertEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_event_response_data import AlertEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertEventResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_event_response = cls( data=data, + included=included, ) alert_event_response.additional_properties = d diff --git a/rootly_sdk/models/alert_event_response_data.py b/rootly_sdk/models/alert_event_response_data.py index 0fe0cf01..0633a39c 100644 --- a/rootly_sdk/models/alert_event_response_data.py +++ b/rootly_sdk/models/alert_event_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_event_response_data_type import AlertEventResponseDataType, check_alert_event_response_data_type +from ..types import UNSET, Unset + +from ..models.alert_event_response_data_type import AlertEventResponseDataType +from ..models.alert_event_response_data_type import check_alert_event_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.alert_event import AlertEvent @@ -30,6 +34,8 @@ class AlertEventResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_event import AlertEvent + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_event_schedule_type_0.py b/rootly_sdk/models/alert_event_schedule_type_0.py new file mode 100644 index 00000000..41daf17f --- /dev/null +++ b/rootly_sdk/models/alert_event_schedule_type_0.py @@ -0,0 +1,148 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.alert_event_schedule_type_0_escalation_policies_item import ( + AlertEventScheduleType0EscalationPoliciesItem, + ) + + +T = TypeVar("T", bound="AlertEventScheduleType0") + + +@_attrs_define +class AlertEventScheduleType0: + """ + Attributes: + id (str | Unset): + name (str | Unset): + description (None | str | Unset): + escalation_policies (list[AlertEventScheduleType0EscalationPoliciesItem] | Unset): + created_at (str | Unset): + updated_at (str | Unset): + """ + + id: str | Unset = UNSET + name: str | Unset = UNSET + description: None | str | Unset = UNSET + escalation_policies: list[AlertEventScheduleType0EscalationPoliciesItem] | 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.alert_event_schedule_type_0_escalation_policies_item import ( + AlertEventScheduleType0EscalationPoliciesItem, + ) + + id = self.id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + 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) + + 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 name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if escalation_policies is not UNSET: + field_dict["escalation_policies"] = escalation_policies + 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.alert_event_schedule_type_0_escalation_policies_item import ( + AlertEventScheduleType0EscalationPoliciesItem, + ) + + d = dict(src_dict) + id = d.pop("id", UNSET) + + 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)) + + _escalation_policies = d.pop("escalation_policies", UNSET) + escalation_policies: list[AlertEventScheduleType0EscalationPoliciesItem] | Unset = UNSET + if _escalation_policies is not UNSET: + escalation_policies = [] + for escalation_policies_item_data in _escalation_policies: + escalation_policies_item = AlertEventScheduleType0EscalationPoliciesItem.from_dict( + escalation_policies_item_data + ) + + escalation_policies.append(escalation_policies_item) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + alert_event_schedule_type_0 = cls( + id=id, + name=name, + description=description, + escalation_policies=escalation_policies, + created_at=created_at, + updated_at=updated_at, + ) + + alert_event_schedule_type_0.additional_properties = d + return alert_event_schedule_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/alert_event_schedule_type_0_escalation_policies_item.py b/rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py new file mode 100644 index 00000000..83e7fe16 --- /dev/null +++ b/rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AlertEventScheduleType0EscalationPoliciesItem") + + +@_attrs_define +class AlertEventScheduleType0EscalationPoliciesItem: + """ + Attributes: + id (str | Unset): + name (str | Unset): + created_at (str | Unset): + updated_at (str | Unset): + """ + + id: str | Unset = UNSET + name: 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]: + id = self.id + + name = self.name + + 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 name is not UNSET: + field_dict["name"] = name + 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) + + name = d.pop("name", UNSET) + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + alert_event_schedule_type_0_escalation_policies_item = cls( + id=id, + name=name, + created_at=created_at, + updated_at=updated_at, + ) + + alert_event_schedule_type_0_escalation_policies_item.additional_properties = d + return alert_event_schedule_type_0_escalation_policies_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/alert_event_user.py b/rootly_sdk/models/alert_event_user.py new file mode 100644 index 00000000..b0beba62 --- /dev/null +++ b/rootly_sdk/models/alert_event_user.py @@ -0,0 +1,199 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="AlertEventUser") + + +@_attrs_define +class AlertEventUser: + """ + Attributes: + id (int): + name (str): + email (str): + created_at (str): + updated_at (str): + first_name (None | str | Unset): + last_name (None | str | Unset): + preferred_name (None | str | Unset): + full_name (None | str | Unset): + time_zone (None | str | Unset): + """ + + id: int + name: str + email: str + created_at: str + updated_at: str + first_name: None | str | Unset = UNSET + last_name: None | str | Unset = UNSET + preferred_name: None | str | Unset = UNSET + full_name: 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]: + id = self.id + + name = self.name + + email = self.email + + created_at = self.created_at + + updated_at = self.updated_at + + first_name: None | str | Unset + if isinstance(self.first_name, Unset): + first_name = UNSET + else: + first_name = self.first_name + + last_name: None | str | Unset + if isinstance(self.last_name, Unset): + last_name = UNSET + else: + last_name = self.last_name + + preferred_name: None | str | Unset + if isinstance(self.preferred_name, Unset): + preferred_name = UNSET + else: + preferred_name = self.preferred_name + + full_name: None | str | Unset + if isinstance(self.full_name, Unset): + full_name = UNSET + else: + full_name = self.full_name + + time_zone: None | str | Unset + if isinstance(self.time_zone, Unset): + time_zone = UNSET + else: + time_zone = self.time_zone + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "name": name, + "email": email, + "created_at": created_at, + "updated_at": updated_at, + } + ) + if first_name is not UNSET: + field_dict["first_name"] = first_name + if last_name is not UNSET: + field_dict["last_name"] = last_name + if preferred_name is not UNSET: + field_dict["preferred_name"] = preferred_name + if full_name is not UNSET: + field_dict["full_name"] = full_name + if time_zone is not UNSET: + field_dict["time_zone"] = time_zone + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + id = d.pop("id") + + name = d.pop("name") + + email = d.pop("email") + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + def _parse_first_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + first_name = _parse_first_name(d.pop("first_name", UNSET)) + + def _parse_last_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + last_name = _parse_last_name(d.pop("last_name", UNSET)) + + def _parse_preferred_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + preferred_name = _parse_preferred_name(d.pop("preferred_name", UNSET)) + + def _parse_full_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + full_name = _parse_full_name(d.pop("full_name", 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)) + + alert_event_user = cls( + id=id, + name=name, + email=email, + created_at=created_at, + updated_at=updated_at, + first_name=first_name, + last_name=last_name, + preferred_name=preferred_name, + full_name=full_name, + time_zone=time_zone, + ) + + alert_event_user.additional_properties = d + return alert_event_user + + @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/alert_field.py b/rootly_sdk/models/alert_field.py index 57d6df37..2ea39d4c 100644 --- a/rootly_sdk/models/alert_field.py +++ b/rootly_sdk/models/alert_field.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AlertField") diff --git a/rootly_sdk/models/alert_field_list.py b/rootly_sdk/models/alert_field_list.py index 6b0890a6..a901a40b 100644 --- a/rootly_sdk/models/alert_field_list.py +++ b/rootly_sdk/models/alert_field_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_field_list_data_item import AlertFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class AlertFieldList: data (list[AlertFieldListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertFieldListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_field_list_data_item import AlertFieldListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_field_list_data_item import AlertFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_field_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_field_list.additional_properties = d diff --git a/rootly_sdk/models/alert_field_list_data_item.py b/rootly_sdk/models/alert_field_list_data_item.py index 377b7621..5af1d05e 100644 --- a/rootly_sdk/models/alert_field_list_data_item.py +++ b/rootly_sdk/models/alert_field_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_field_list_data_item_type import AlertFieldListDataItemType, check_alert_field_list_data_item_type +from ..types import UNSET, Unset + +from ..models.alert_field_list_data_item_type import AlertFieldListDataItemType +from ..models.alert_field_list_data_item_type import check_alert_field_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.alert_field import AlertField @@ -30,6 +34,8 @@ class AlertFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_field import AlertField + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_field_response.py b/rootly_sdk/models/alert_field_response.py index 194e802b..3c7abe70 100644 --- a/rootly_sdk/models/alert_field_response.py +++ b/rootly_sdk/models/alert_field_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_field_response_data import AlertFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertFieldResponse") @@ -18,14 +24,26 @@ class AlertFieldResponse: """ Attributes: data (AlertFieldResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertFieldResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_field_response_data import AlertFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_field_response_data import AlertFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertFieldResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_field_response = cls( data=data, + included=included, ) alert_field_response.additional_properties = d diff --git a/rootly_sdk/models/alert_field_response_data.py b/rootly_sdk/models/alert_field_response_data.py index 2b6de736..b5631597 100644 --- a/rootly_sdk/models/alert_field_response_data.py +++ b/rootly_sdk/models/alert_field_response_data.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_field_response_data_type import AlertFieldResponseDataType, check_alert_field_response_data_type from ..types import UNSET, Unset +from ..models.alert_field_response_data_type import AlertFieldResponseDataType +from ..models.alert_field_response_data_type import check_alert_field_response_data_type +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_field import AlertField @@ -31,6 +35,8 @@ class AlertFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_field import AlertField + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/alert_group.py b/rootly_sdk/models/alert_group.py index f6d123b9..5130e281 100644 --- a/rootly_sdk/models/alert_group.py +++ b/rootly_sdk/models/alert_group.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_group_attributes_item import AlertGroupAttributesItem from ..models.alert_group_conditions_item import AlertGroupConditionsItem @@ -55,6 +58,10 @@ class AlertGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_group_attributes_item import AlertGroupAttributesItem + from ..models.alert_group_targets_item import AlertGroupTargetsItem + from ..models.alert_group_conditions_item import AlertGroupConditionsItem + name = self.name description: None | str diff --git a/rootly_sdk/models/alert_group_attributes_item.py b/rootly_sdk/models/alert_group_attributes_item.py index 574f2129..64442695 100644 --- a/rootly_sdk/models/alert_group_attributes_item.py +++ b/rootly_sdk/models/alert_group_attributes_item.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AlertGroupAttributesItem") diff --git a/rootly_sdk/models/alert_group_conditions_item.py b/rootly_sdk/models/alert_group_conditions_item.py index 7a2c80f7..02336271 100644 --- a/rootly_sdk/models/alert_group_conditions_item.py +++ b/rootly_sdk/models/alert_group_conditions_item.py @@ -1,24 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_group_conditions_item_conditionable_type import ( - AlertGroupConditionsItemConditionableType, - check_alert_group_conditions_item_conditionable_type, -) +from ..types import UNSET, Unset + +from ..models.alert_group_conditions_item_conditionable_type import AlertGroupConditionsItemConditionableType +from ..models.alert_group_conditions_item_conditionable_type import check_alert_group_conditions_item_conditionable_type from ..models.alert_group_conditions_item_property_field_condition_type import ( AlertGroupConditionsItemPropertyFieldConditionType, +) +from ..models.alert_group_conditions_item_property_field_condition_type import ( check_alert_group_conditions_item_property_field_condition_type, ) +from ..models.alert_group_conditions_item_property_field_type import AlertGroupConditionsItemPropertyFieldType from ..models.alert_group_conditions_item_property_field_type import ( - AlertGroupConditionsItemPropertyFieldType, check_alert_group_conditions_item_property_field_type, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.alert_group_conditions_item_values_item_type_0 import AlertGroupConditionsItemValuesItemType0 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 a2bb4948..73ad87f4 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AlertGroupConditionsItemValuesItemType0") diff --git a/rootly_sdk/models/alert_group_list.py b/rootly_sdk/models/alert_group_list.py index 382f95e7..294946d9 100644 --- a/rootly_sdk/models/alert_group_list.py +++ b/rootly_sdk/models/alert_group_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_group_list_data_item import AlertGroupListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertGroupList") @@ -18,17 +24,29 @@ class AlertGroupList: """ Attributes: data (list[AlertGroupListDataItem]): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertGroupListDataItem] + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_group_list_data_item import AlertGroupListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() data.append(data_item) + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -36,12 +54,15 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_group_list_data_item import AlertGroupListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = [] @@ -51,8 +72,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_group_list = cls( data=data, + included=included, ) alert_group_list.additional_properties = d diff --git a/rootly_sdk/models/alert_group_list_data_item.py b/rootly_sdk/models/alert_group_list_data_item.py index 3a40c496..7833e787 100644 --- a/rootly_sdk/models/alert_group_list_data_item.py +++ b/rootly_sdk/models/alert_group_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_group_list_data_item_type import AlertGroupListDataItemType, check_alert_group_list_data_item_type +from ..types import UNSET, Unset + +from ..models.alert_group_list_data_item_type import AlertGroupListDataItemType +from ..models.alert_group_list_data_item_type import check_alert_group_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.alert_group import AlertGroup @@ -30,6 +34,8 @@ class AlertGroupListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_group import AlertGroup + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_group_response.py b/rootly_sdk/models/alert_group_response.py index e3ca1078..53616400 100644 --- a/rootly_sdk/models/alert_group_response.py +++ b/rootly_sdk/models/alert_group_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_group_response_data import AlertGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertGroupResponse") @@ -18,14 +24,26 @@ class AlertGroupResponse: """ Attributes: data (AlertGroupResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertGroupResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.alert_group_response_data import AlertGroupResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_group_response_data import AlertGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertGroupResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_group_response = cls( data=data, + included=included, ) alert_group_response.additional_properties = d diff --git a/rootly_sdk/models/alert_group_response_data.py b/rootly_sdk/models/alert_group_response_data.py index d2171843..8a014a5d 100644 --- a/rootly_sdk/models/alert_group_response_data.py +++ b/rootly_sdk/models/alert_group_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_group_response_data_type import AlertGroupResponseDataType, check_alert_group_response_data_type +from ..types import UNSET, Unset + +from ..models.alert_group_response_data_type import AlertGroupResponseDataType +from ..models.alert_group_response_data_type import check_alert_group_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.alert_group import AlertGroup @@ -30,6 +34,8 @@ class AlertGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_group import AlertGroup + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_group_targets_item.py b/rootly_sdk/models/alert_group_targets_item.py index c197aa66..fd236465 100644 --- a/rootly_sdk/models/alert_group_targets_item.py +++ b/rootly_sdk/models/alert_group_targets_item.py @@ -1,16 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_group_targets_item_target_type import ( - AlertGroupTargetsItemTargetType, - check_alert_group_targets_item_target_type, -) +from ..types import UNSET, Unset + +from ..models.alert_group_targets_item_target_type import AlertGroupTargetsItemTargetType +from ..models.alert_group_targets_item_target_type import check_alert_group_targets_item_target_type +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="AlertGroupTargetsItem") @@ -19,8 +21,9 @@ class AlertGroupTargetsItem: """ Attributes: - target_type (AlertGroupTargetsItemTargetType): The type of the target. - target_id (UUID): id for the Group, Service or EscalationPolicy + target_type (AlertGroupTargetsItemTargetType): The type of the target. Please contact support if you encounter + issues using `Functionality` as a target type. + target_id (UUID): id for the Group, Service, EscalationPolicy or Functionality """ target_type: AlertGroupTargetsItemTargetType diff --git a/rootly_sdk/models/alert_group_targets_item_target_type.py b/rootly_sdk/models/alert_group_targets_item_target_type.py index 5333dc6f..277ea3d4 100644 --- a/rootly_sdk/models/alert_group_targets_item_target_type.py +++ b/rootly_sdk/models/alert_group_targets_item_target_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -AlertGroupTargetsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +AlertGroupTargetsItemTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] ALERT_GROUP_TARGETS_ITEM_TARGET_TYPE_VALUES: set[AlertGroupTargetsItemTargetType] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/alert_labels_item_type_0.py b/rootly_sdk/models/alert_labels_item_type_0.py index 432ad1f0..e68c8c5e 100644 --- a/rootly_sdk/models/alert_labels_item_type_0.py +++ b/rootly_sdk/models/alert_labels_item_type_0.py @@ -1,11 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + + T = TypeVar("T", bound="AlertLabelsItemType0") diff --git a/rootly_sdk/models/alert_list.py b/rootly_sdk/models/alert_list.py index a8d28725..2ffc2898 100644 --- a/rootly_sdk/models/alert_list.py +++ b/rootly_sdk/models/alert_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_list_data_item import AlertListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class AlertList: data (list[AlertListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_list_data_item import AlertListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_list_data_item import AlertListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_list.additional_properties = d diff --git a/rootly_sdk/models/alert_list_data_item.py b/rootly_sdk/models/alert_list_data_item.py index ed0d8fe7..c2b9171c 100644 --- a/rootly_sdk/models/alert_list_data_item.py +++ b/rootly_sdk/models/alert_list_data_item.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_list_data_item_source import AlertListDataItemSource, check_alert_list_data_item_source -from ..models.alert_list_data_item_type import AlertListDataItemType, check_alert_list_data_item_type from ..types import UNSET, Unset +from ..models.alert_list_data_item_type import AlertListDataItemType +from ..models.alert_list_data_item_type import check_alert_list_data_item_type +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert import Alert @@ -24,25 +27,25 @@ class AlertListDataItem: id (str): Unique ID of the alert type_ (AlertListDataItemType): attributes (Alert): - source (AlertListDataItemSource | Unset): The source of the alert + source (str | Unset): The source of the alert """ id: str type_: AlertListDataItemType attributes: Alert - source: AlertListDataItemSource | Unset = UNSET + source: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert import Alert + id = self.id type_: str = self.type_ attributes = self.attributes.to_dict() - source: str | Unset = UNSET - if not isinstance(self.source, Unset): - source = self.source + source = self.source field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -69,12 +72,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: AlertListDataItemSource | Unset - if isinstance(_source, Unset): - source = UNSET - else: - source = check_alert_list_data_item_source(_source) + source = d.pop("source", UNSET) alert_list_data_item = cls( id=id, diff --git a/rootly_sdk/models/alert_list_data_item_source.py b/rootly_sdk/models/alert_list_data_item_source.py deleted file mode 100644 index d88a9512..00000000 --- a/rootly_sdk/models/alert_list_data_item_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -AlertListDataItemSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -ALERT_LIST_DATA_ITEM_SOURCE_VALUES: set[AlertListDataItemSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_alert_list_data_item_source(value: str | None) -> AlertListDataItemSource | None: - if value is None: - return None - if value in ALERT_LIST_DATA_ITEM_SOURCE_VALUES: - return cast(AlertListDataItemSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_LIST_DATA_ITEM_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/alert_notification_target_type.py b/rootly_sdk/models/alert_notification_target_type.py new file mode 100644 index 00000000..af9bc852 --- /dev/null +++ b/rootly_sdk/models/alert_notification_target_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +AlertNotificationTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service", "User"] + +ALERT_NOTIFICATION_TARGET_TYPE_VALUES: set[AlertNotificationTargetType] = { + "EscalationPolicy", + "Functionality", + "Group", + "Service", + "User", +} + + +def check_alert_notification_target_type(value: str | None) -> AlertNotificationTargetType | None: + if value is None: + return None + if value in ALERT_NOTIFICATION_TARGET_TYPE_VALUES: + return cast(AlertNotificationTargetType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_NOTIFICATION_TARGET_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/alert_response.py b/rootly_sdk/models/alert_response.py index b1e9801b..469b976a 100644 --- a/rootly_sdk/models/alert_response.py +++ b/rootly_sdk/models/alert_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_response_data import AlertResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertResponse") @@ -18,14 +24,26 @@ class AlertResponse: """ Attributes: data (AlertResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_response_data import AlertResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_response_data import AlertResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_response = cls( data=data, + included=included, ) alert_response.additional_properties = d diff --git a/rootly_sdk/models/alert_response_data.py b/rootly_sdk/models/alert_response_data.py index 615c4731..2c6dd079 100644 --- a/rootly_sdk/models/alert_response_data.py +++ b/rootly_sdk/models/alert_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_response_data_source import AlertResponseDataSource, check_alert_response_data_source -from ..models.alert_response_data_type import AlertResponseDataType, check_alert_response_data_type from ..types import UNSET, Unset +from ..models.alert_response_data_type import AlertResponseDataType +from ..models.alert_response_data_type import check_alert_response_data_type +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert import Alert @@ -24,25 +27,25 @@ class AlertResponseData: id (str): Unique ID of the alert type_ (AlertResponseDataType): attributes (Alert): - source (AlertResponseDataSource | Unset): The source of the alert + source (str | Unset): The source of the alert """ id: str type_: AlertResponseDataType attributes: Alert - source: AlertResponseDataSource | Unset = UNSET + source: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert import Alert + id = self.id type_: str = self.type_ attributes = self.attributes.to_dict() - source: str | Unset = UNSET - if not isinstance(self.source, Unset): - source = self.source + source = self.source field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -69,12 +72,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: AlertResponseDataSource | Unset - if isinstance(_source, Unset): - source = UNSET - else: - source = check_alert_response_data_source(_source) + source = d.pop("source", UNSET) alert_response_data = cls( id=id, diff --git a/rootly_sdk/models/alert_response_data_source.py b/rootly_sdk/models/alert_response_data_source.py deleted file mode 100644 index 0572eee7..00000000 --- a/rootly_sdk/models/alert_response_data_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -AlertResponseDataSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -ALERT_RESPONSE_DATA_SOURCE_VALUES: set[AlertResponseDataSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_alert_response_data_source(value: str | None) -> AlertResponseDataSource | None: - if value is None: - return None - if value in ALERT_RESPONSE_DATA_SOURCE_VALUES: - return cast(AlertResponseDataSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_RESPONSE_DATA_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/alert_route.py b/rootly_sdk/models/alert_route.py index d0895905..b915ace9 100644 --- a/rootly_sdk/models/alert_route.py +++ b/rootly_sdk/models/alert_route.py @@ -1,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + if TYPE_CHECKING: from ..models.alert_route_rules_item import AlertRouteRulesItem @@ -35,6 +38,8 @@ class AlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_route_rules_item import AlertRouteRulesItem + name = self.name alerts_source_ids = [] diff --git a/rootly_sdk/models/alert_route_list.py b/rootly_sdk/models/alert_route_list.py index 788a6a65..1a3a5147 100644 --- a/rootly_sdk/models/alert_route_list.py +++ b/rootly_sdk/models/alert_route_list.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.alert_route_list_data_item import AlertRouteListDataItem from ..models.links import Links @@ -30,6 +34,10 @@ class AlertRouteList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.alert_route_list_data_item import AlertRouteListDataItem + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() diff --git a/rootly_sdk/models/alert_route_list_data_item.py b/rootly_sdk/models/alert_route_list_data_item.py index 3aee86f3..1c08ed24 100644 --- a/rootly_sdk/models/alert_route_list_data_item.py +++ b/rootly_sdk/models/alert_route_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_route_list_data_item_type import AlertRouteListDataItemType, check_alert_route_list_data_item_type +from ..types import UNSET, Unset + +from ..models.alert_route_list_data_item_type import AlertRouteListDataItemType +from ..models.alert_route_list_data_item_type import check_alert_route_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.alert_route import AlertRoute @@ -30,6 +34,8 @@ class AlertRouteListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_route import AlertRoute + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_route_response.py b/rootly_sdk/models/alert_route_response.py index 0fb84000..fcff2ad6 100644 --- a/rootly_sdk/models/alert_route_response.py +++ b/rootly_sdk/models/alert_route_response.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.alert_route_response_data import AlertRouteResponseData @@ -24,6 +28,8 @@ class AlertRouteResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_route_response_data import AlertRouteResponseData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/alert_route_response_data.py b/rootly_sdk/models/alert_route_response_data.py index f52eb429..56573057 100644 --- a/rootly_sdk/models/alert_route_response_data.py +++ b/rootly_sdk/models/alert_route_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_route_response_data_type import AlertRouteResponseDataType, check_alert_route_response_data_type +from ..types import UNSET, Unset + +from ..models.alert_route_response_data_type import AlertRouteResponseDataType +from ..models.alert_route_response_data_type import check_alert_route_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.alert_route import AlertRoute @@ -30,6 +34,8 @@ class AlertRouteResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_route import AlertRoute + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_route_rules_item.py b/rootly_sdk/models/alert_route_rules_item.py index 6377e212..81a01777 100644 --- a/rootly_sdk/models/alert_route_rules_item.py +++ b/rootly_sdk/models/alert_route_rules_item.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_route_rules_item_condition_groups_item import AlertRouteRulesItemConditionGroupsItem from ..models.alert_route_rules_item_destinations_item import AlertRouteRulesItemDestinationsItem @@ -35,6 +38,9 @@ class AlertRouteRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_route_rules_item_destinations_item import AlertRouteRulesItemDestinationsItem + from ..models.alert_route_rules_item_condition_groups_item import AlertRouteRulesItemConditionGroupsItem + name = self.name destinations = [] 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 80a9e188..46830797 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_route_rules_item_condition_groups_item_conditions_item import ( AlertRouteRulesItemConditionGroupsItemConditionsItem, @@ -30,6 +33,10 @@ class AlertRouteRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_route_rules_item_condition_groups_item_conditions_item import ( + AlertRouteRulesItemConditionGroupsItemConditionsItem, + ) + conditions = [] for conditions_item_data in self.conditions: conditions_item = conditions_item_data.to_dict() 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 413dfacc..b55db9b6 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,25 +1,35 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alert_route_rules_item_condition_groups_item_conditions_item_conditionable_type import ( AlertRouteRulesItemConditionGroupsItemConditionsItemConditionableType, +) +from ..models.alert_route_rules_item_condition_groups_item_conditions_item_conditionable_type import ( check_alert_route_rules_item_condition_groups_item_conditions_item_conditionable_type, ) from ..models.alert_route_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( AlertRouteRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, +) +from ..models.alert_route_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( check_alert_route_rules_item_condition_groups_item_conditions_item_property_field_condition_type, ) from ..models.alert_route_rules_item_condition_groups_item_conditions_item_property_field_type import ( AlertRouteRulesItemConditionGroupsItemConditionsItemPropertyFieldType, +) +from ..models.alert_route_rules_item_condition_groups_item_conditions_item_property_field_type import ( check_alert_route_rules_item_condition_groups_item_conditions_item_property_field_type, ) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="AlertRouteRulesItemConditionGroupsItemConditionsItem") 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 303e9070..8a9ff179 100644 --- a/rootly_sdk/models/alert_route_rules_item_destinations_item.py +++ b/rootly_sdk/models/alert_route_rules_item_destinations_item.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.alert_route_rules_item_destinations_item_target_type import AlertRouteRulesItemDestinationsItemTargetType from ..models.alert_route_rules_item_destinations_item_target_type import ( - AlertRouteRulesItemDestinationsItemTargetType, check_alert_route_rules_item_destinations_item_target_type, ) +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="AlertRouteRulesItemDestinationsItem") diff --git a/rootly_sdk/models/alert_routing_rule.py b/rootly_sdk/models/alert_routing_rule.py index 1ca607b9..4c39f144 100644 --- a/rootly_sdk/models/alert_routing_rule.py +++ b/rootly_sdk/models/alert_routing_rule.py @@ -1,18 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_routing_rule_condition_type import ( - AlertRoutingRuleConditionType, - check_alert_routing_rule_condition_type, -) from ..types import UNSET, Unset +from ..models.alert_routing_rule_condition_type import AlertRoutingRuleConditionType +from ..models.alert_routing_rule_condition_type import check_alert_routing_rule_condition_type +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + if TYPE_CHECKING: from ..models.alert_routing_rule_condition_groups_item import AlertRoutingRuleConditionGroupsItem from ..models.alert_routing_rule_conditions_item import AlertRoutingRuleConditionsItem @@ -52,6 +53,8 @@ class AlertRoutingRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_routing_rule_conditions_item import AlertRoutingRuleConditionsItem + from ..models.alert_routing_rule_condition_groups_item import AlertRoutingRuleConditionGroupsItem from ..models.alert_routing_rule_destination_type_0 import AlertRoutingRuleDestinationType0 name = self.name diff --git a/rootly_sdk/models/alert_routing_rule_condition.py b/rootly_sdk/models/alert_routing_rule_condition.py index 0ab961a3..936673b1 100644 --- a/rootly_sdk/models/alert_routing_rule_condition.py +++ b/rootly_sdk/models/alert_routing_rule_condition.py @@ -1,21 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alert_routing_rule_condition_property_field_condition_type import ( AlertRoutingRuleConditionPropertyFieldConditionType, +) +from ..models.alert_routing_rule_condition_property_field_condition_type import ( check_alert_routing_rule_condition_property_field_condition_type, ) +from ..models.alert_routing_rule_condition_property_field_type import AlertRoutingRuleConditionPropertyFieldType from ..models.alert_routing_rule_condition_property_field_type import ( - AlertRoutingRuleConditionPropertyFieldType, check_alert_routing_rule_condition_property_field_type, ) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="AlertRoutingRuleCondition") diff --git a/rootly_sdk/models/alert_routing_rule_condition_group.py b/rootly_sdk/models/alert_routing_rule_condition_group.py index 056ffefd..1fc99e65 100644 --- a/rootly_sdk/models/alert_routing_rule_condition_group.py +++ b/rootly_sdk/models/alert_routing_rule_condition_group.py @@ -1,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + if TYPE_CHECKING: from ..models.alert_routing_rule_condition import AlertRoutingRuleCondition @@ -36,6 +39,8 @@ class AlertRoutingRuleConditionGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_routing_rule_condition import AlertRoutingRuleCondition + position = self.position id: str | Unset = 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 c537c24e..3be95269 100644 --- a/rootly_sdk/models/alert_routing_rule_condition_groups_item.py +++ b/rootly_sdk/models/alert_routing_rule_condition_groups_item.py @@ -1,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + if TYPE_CHECKING: from ..models.alert_routing_rule_condition_groups_item_conditions_item import ( AlertRoutingRuleConditionGroupsItemConditionsItem, @@ -37,6 +40,10 @@ class AlertRoutingRuleConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_routing_rule_condition_groups_item_conditions_item import ( + AlertRoutingRuleConditionGroupsItemConditionsItem, + ) + position = self.position id: str | Unset = 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 93399246..625328f7 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,21 +1,29 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alert_routing_rule_condition_groups_item_conditions_item_property_field_condition_type import ( AlertRoutingRuleConditionGroupsItemConditionsItemPropertyFieldConditionType, +) +from ..models.alert_routing_rule_condition_groups_item_conditions_item_property_field_condition_type import ( check_alert_routing_rule_condition_groups_item_conditions_item_property_field_condition_type, ) from ..models.alert_routing_rule_condition_groups_item_conditions_item_property_field_type import ( AlertRoutingRuleConditionGroupsItemConditionsItemPropertyFieldType, +) +from ..models.alert_routing_rule_condition_groups_item_conditions_item_property_field_type import ( check_alert_routing_rule_condition_groups_item_conditions_item_property_field_type, ) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="AlertRoutingRuleConditionGroupsItemConditionsItem") diff --git a/rootly_sdk/models/alert_routing_rule_conditions_item.py b/rootly_sdk/models/alert_routing_rule_conditions_item.py index 7d65f2f1..8b10d015 100644 --- a/rootly_sdk/models/alert_routing_rule_conditions_item.py +++ b/rootly_sdk/models/alert_routing_rule_conditions_item.py @@ -1,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alert_routing_rule_conditions_item_property_field_condition_type import ( AlertRoutingRuleConditionsItemPropertyFieldConditionType, +) +from ..models.alert_routing_rule_conditions_item_property_field_condition_type import ( check_alert_routing_rule_conditions_item_property_field_condition_type, ) from ..models.alert_routing_rule_conditions_item_property_field_type import ( AlertRoutingRuleConditionsItemPropertyFieldType, +) +from ..models.alert_routing_rule_conditions_item_property_field_type import ( check_alert_routing_rule_conditions_item_property_field_type, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="AlertRoutingRuleConditionsItem") 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 e628187c..f3ccd9d0 100644 --- a/rootly_sdk/models/alert_routing_rule_destination_type_0.py +++ b/rootly_sdk/models/alert_routing_rule_destination_type_0.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.alert_routing_rule_destination_type_0_target_type import AlertRoutingRuleDestinationType0TargetType from ..models.alert_routing_rule_destination_type_0_target_type import ( - AlertRoutingRuleDestinationType0TargetType, check_alert_routing_rule_destination_type_0_target_type, ) +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="AlertRoutingRuleDestinationType0") diff --git a/rootly_sdk/models/alert_routing_rule_list.py b/rootly_sdk/models/alert_routing_rule_list.py index 79720fd0..c4096779 100644 --- a/rootly_sdk/models/alert_routing_rule_list.py +++ b/rootly_sdk/models/alert_routing_rule_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_routing_rule_list_data_item import AlertRoutingRuleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class AlertRoutingRuleList: data (list[AlertRoutingRuleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertRoutingRuleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.alert_routing_rule_list_data_item import AlertRoutingRuleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_routing_rule_list_data_item import AlertRoutingRuleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_routing_rule_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_routing_rule_list.additional_properties = d 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 7f60918e..79f69a9b 100644 --- a/rootly_sdk/models/alert_routing_rule_list_data_item.py +++ b/rootly_sdk/models/alert_routing_rule_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_routing_rule_list_data_item_type import ( - AlertRoutingRuleListDataItemType, - check_alert_routing_rule_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.alert_routing_rule_list_data_item_type import AlertRoutingRuleListDataItemType +from ..models.alert_routing_rule_list_data_item_type import check_alert_routing_rule_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.alert_routing_rule import AlertRoutingRule @@ -33,6 +34,8 @@ class AlertRoutingRuleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_routing_rule import AlertRoutingRule + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_routing_rule_response.py b/rootly_sdk/models/alert_routing_rule_response.py index 79852973..ecbf2c0e 100644 --- a/rootly_sdk/models/alert_routing_rule_response.py +++ b/rootly_sdk/models/alert_routing_rule_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_routing_rule_response_data import AlertRoutingRuleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertRoutingRuleResponse") @@ -18,14 +24,26 @@ class AlertRoutingRuleResponse: """ Attributes: data (AlertRoutingRuleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertRoutingRuleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_routing_rule_response_data import AlertRoutingRuleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_routing_rule_response_data import AlertRoutingRuleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertRoutingRuleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_routing_rule_response = cls( data=data, + included=included, ) alert_routing_rule_response.additional_properties = d diff --git a/rootly_sdk/models/alert_routing_rule_response_data.py b/rootly_sdk/models/alert_routing_rule_response_data.py index a03b56b9..48e7d8b9 100644 --- a/rootly_sdk/models/alert_routing_rule_response_data.py +++ b/rootly_sdk/models/alert_routing_rule_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_routing_rule_response_data_type import ( - AlertRoutingRuleResponseDataType, - check_alert_routing_rule_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.alert_routing_rule_response_data_type import AlertRoutingRuleResponseDataType +from ..models.alert_routing_rule_response_data_type import check_alert_routing_rule_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.alert_routing_rule import AlertRoutingRule @@ -33,6 +34,8 @@ class AlertRoutingRuleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_routing_rule import AlertRoutingRule + id = self.id type_: str = self.type_ 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 2c3c2e4a..92caf33e 100644 --- a/rootly_sdk/models/alert_routing_rule_target_type_0.py +++ b/rootly_sdk/models/alert_routing_rule_target_type_0.py @@ -1,16 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_routing_rule_target_type_0_target_type import ( - AlertRoutingRuleTargetType0TargetType, - check_alert_routing_rule_target_type_0_target_type, -) +from ..types import UNSET, Unset + +from ..models.alert_routing_rule_target_type_0_target_type import AlertRoutingRuleTargetType0TargetType +from ..models.alert_routing_rule_target_type_0_target_type import check_alert_routing_rule_target_type_0_target_type +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="AlertRoutingRuleTargetType0") diff --git a/rootly_sdk/models/alert_source.py b/rootly_sdk/models/alert_source.py deleted file mode 100644 index 65e09e2b..00000000 --- a/rootly_sdk/models/alert_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -AlertSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -ALERT_SOURCE_VALUES: set[AlertSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_alert_source(value: str | None) -> AlertSource | None: - if value is None: - return None - if value in ALERT_SOURCE_VALUES: - return cast(AlertSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {ALERT_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/alert_trigger_params.py b/rootly_sdk/models/alert_trigger_params.py index a7761fcf..3ae687a4 100644 --- a/rootly_sdk/models/alert_trigger_params.py +++ b/rootly_sdk/models/alert_trigger_params.py @@ -1,46 +1,33 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_trigger_params_alert_condition import ( - AlertTriggerParamsAlertCondition, - check_alert_trigger_params_alert_condition, -) -from ..models.alert_trigger_params_alert_condition_label import ( - AlertTriggerParamsAlertConditionLabel, - check_alert_trigger_params_alert_condition_label, -) -from ..models.alert_trigger_params_alert_condition_payload import ( - AlertTriggerParamsAlertConditionPayload, - check_alert_trigger_params_alert_condition_payload, -) -from ..models.alert_trigger_params_alert_condition_source import ( - AlertTriggerParamsAlertConditionSource, - check_alert_trigger_params_alert_condition_source, -) -from ..models.alert_trigger_params_alert_condition_status import ( - 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, -) -from ..models.alert_trigger_params_triggers_item import ( - AlertTriggerParamsTriggersItem, - check_alert_trigger_params_triggers_item, -) from ..types import UNSET, Unset +from ..models.alert_trigger_params_alert_condition import AlertTriggerParamsAlertCondition +from ..models.alert_trigger_params_alert_condition import check_alert_trigger_params_alert_condition +from ..models.alert_trigger_params_alert_condition_label import AlertTriggerParamsAlertConditionLabel +from ..models.alert_trigger_params_alert_condition_label import check_alert_trigger_params_alert_condition_label +from ..models.alert_trigger_params_alert_condition_payload import AlertTriggerParamsAlertConditionPayload +from ..models.alert_trigger_params_alert_condition_payload import check_alert_trigger_params_alert_condition_payload +from ..models.alert_trigger_params_alert_condition_source import AlertTriggerParamsAlertConditionSource +from ..models.alert_trigger_params_alert_condition_source import check_alert_trigger_params_alert_condition_source +from ..models.alert_trigger_params_alert_condition_status import AlertTriggerParamsAlertConditionStatus +from ..models.alert_trigger_params_alert_condition_status import check_alert_trigger_params_alert_condition_status +from ..models.alert_trigger_params_alert_condition_urgency import AlertTriggerParamsAlertConditionUrgency +from ..models.alert_trigger_params_alert_condition_urgency import check_alert_trigger_params_alert_condition_urgency +from ..models.alert_trigger_params_trigger_type import AlertTriggerParamsTriggerType +from ..models.alert_trigger_params_trigger_type import check_alert_trigger_params_trigger_type +from ..models.alert_trigger_params_triggers_item import AlertTriggerParamsTriggersItem +from ..models.alert_trigger_params_triggers_item import check_alert_trigger_params_triggers_item +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + if TYPE_CHECKING: from ..models.alert_trigger_params_alert_field_conditions_item import AlertTriggerParamsAlertFieldConditionsItem from ..models.alert_trigger_params_alert_payload_conditions import AlertTriggerParamsAlertPayloadConditions @@ -98,6 +85,9 @@ class AlertTriggerParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_trigger_params_alert_field_conditions_item import AlertTriggerParamsAlertFieldConditionsItem + from ..models.alert_trigger_params_alert_payload_conditions import AlertTriggerParamsAlertPayloadConditions + trigger_type: str = self.trigger_type triggers: list[str] | Unset = UNSET 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 56455b09..a99f9c0f 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alert_trigger_params_alert_field_conditions_item_condition_type import ( AlertTriggerParamsAlertFieldConditionsItemConditionType, +) +from ..models.alert_trigger_params_alert_field_conditions_item_condition_type import ( check_alert_trigger_params_alert_field_conditions_item_condition_type, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="AlertTriggerParamsAlertFieldConditionsItem") 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 dea2beff..9096d62c 100644 --- a/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py +++ b/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.alert_trigger_params_alert_payload_conditions_logic import AlertTriggerParamsAlertPayloadConditionsLogic from ..models.alert_trigger_params_alert_payload_conditions_logic import ( - AlertTriggerParamsAlertPayloadConditionsLogic, check_alert_trigger_params_alert_payload_conditions_logic, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.alert_trigger_params_alert_payload_conditions_conditions_item import ( @@ -34,6 +37,10 @@ class AlertTriggerParamsAlertPayloadConditions: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_trigger_params_alert_payload_conditions_conditions_item import ( + AlertTriggerParamsAlertPayloadConditionsConditionsItem, + ) + logic: str | Unset = UNSET if not isinstance(self.logic, Unset): logic = self.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 6a9ea7fd..d32a93bb 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alert_trigger_params_alert_payload_conditions_conditions_item_operator import ( AlertTriggerParamsAlertPayloadConditionsConditionsItemOperator, +) +from ..models.alert_trigger_params_alert_payload_conditions_conditions_item_operator import ( check_alert_trigger_params_alert_payload_conditions_conditions_item_operator, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="AlertTriggerParamsAlertPayloadConditionsConditionsItem") diff --git a/rootly_sdk/models/alert_urgency.py b/rootly_sdk/models/alert_urgency.py index 443ca62e..638ad8b2 100644 --- a/rootly_sdk/models/alert_urgency.py +++ b/rootly_sdk/models/alert_urgency.py @@ -1,11 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="AlertUrgency") @@ -18,6 +24,11 @@ class AlertUrgency: position (int): Position of the alert urgency created_at (str): Date of creation updated_at (str): Date of last update + id (str | Unset): Unique ID of the alert urgency + urgency (None | str | Unset): The urgency level + color (None | str | Unset): The color associated with this urgency level + team_id (int | Unset): The ID of the team this urgency belongs to + deleted_at (None | str | Unset): Date of deletion """ name: str @@ -25,6 +36,11 @@ class AlertUrgency: position: int created_at: str updated_at: str + id: str | Unset = UNSET + urgency: None | str | Unset = UNSET + color: None | str | Unset = UNSET + team_id: int | Unset = UNSET + deleted_at: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -38,6 +54,28 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at + id = self.id + + urgency: None | str | Unset + if isinstance(self.urgency, Unset): + urgency = UNSET + else: + urgency = self.urgency + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + team_id = self.team_id + + deleted_at: None | str | Unset + if isinstance(self.deleted_at, Unset): + deleted_at = UNSET + else: + deleted_at = self.deleted_at + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -49,6 +87,16 @@ def to_dict(self) -> dict[str, Any]: "updated_at": updated_at, } ) + if id is not UNSET: + field_dict["id"] = id + if urgency is not UNSET: + field_dict["urgency"] = urgency + if color is not UNSET: + field_dict["color"] = color + if team_id is not UNSET: + field_dict["team_id"] = team_id + if deleted_at is not UNSET: + field_dict["deleted_at"] = deleted_at return field_dict @@ -65,12 +113,48 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") + id = d.pop("id", UNSET) + + def _parse_urgency(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + urgency = _parse_urgency(d.pop("urgency", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", UNSET)) + + team_id = d.pop("team_id", UNSET) + + def _parse_deleted_at(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + deleted_at = _parse_deleted_at(d.pop("deleted_at", UNSET)) + alert_urgency = cls( name=name, description=description, position=position, created_at=created_at, updated_at=updated_at, + id=id, + urgency=urgency, + color=color, + team_id=team_id, + deleted_at=deleted_at, ) alert_urgency.additional_properties = d diff --git a/rootly_sdk/models/alert_urgency_list.py b/rootly_sdk/models/alert_urgency_list.py index 392b8cdf..bb60d6cb 100644 --- a/rootly_sdk/models/alert_urgency_list.py +++ b/rootly_sdk/models/alert_urgency_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_urgency_list_data_item import AlertUrgencyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class AlertUrgencyList: data (list[AlertUrgencyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertUrgencyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_urgency_list_data_item import AlertUrgencyListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_urgency_list_data_item import AlertUrgencyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_urgency_list = cls( data=data, links=links, meta=meta, + included=included, ) alert_urgency_list.additional_properties = d diff --git a/rootly_sdk/models/alert_urgency_list_data_item.py b/rootly_sdk/models/alert_urgency_list_data_item.py index 634dc584..93631dd1 100644 --- a/rootly_sdk/models/alert_urgency_list_data_item.py +++ b/rootly_sdk/models/alert_urgency_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_urgency_list_data_item_type import ( - AlertUrgencyListDataItemType, - check_alert_urgency_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.alert_urgency_list_data_item_type import AlertUrgencyListDataItemType +from ..models.alert_urgency_list_data_item_type import check_alert_urgency_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.alert_urgency import AlertUrgency @@ -33,6 +34,8 @@ class AlertUrgencyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_urgency import AlertUrgency + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alert_urgency_response.py b/rootly_sdk/models/alert_urgency_response.py index 146eee39..28d62a46 100644 --- a/rootly_sdk/models/alert_urgency_response.py +++ b/rootly_sdk/models/alert_urgency_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alert_urgency_response_data import AlertUrgencyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertUrgencyResponse") @@ -18,14 +24,26 @@ class AlertUrgencyResponse: """ Attributes: data (AlertUrgencyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertUrgencyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_urgency_response_data import AlertUrgencyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alert_urgency_response_data import AlertUrgencyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertUrgencyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alert_urgency_response = cls( data=data, + included=included, ) alert_urgency_response.additional_properties = d diff --git a/rootly_sdk/models/alert_urgency_response_data.py b/rootly_sdk/models/alert_urgency_response_data.py index 9f88c165..f7982c72 100644 --- a/rootly_sdk/models/alert_urgency_response_data.py +++ b/rootly_sdk/models/alert_urgency_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alert_urgency_response_data_type import ( - AlertUrgencyResponseDataType, - check_alert_urgency_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.alert_urgency_response_data_type import AlertUrgencyResponseDataType +from ..models.alert_urgency_response_data_type import check_alert_urgency_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.alert_urgency import AlertUrgency @@ -33,6 +34,8 @@ class AlertUrgencyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alert_urgency import AlertUrgency + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alerts_source.py b/rootly_sdk/models/alerts_source.py index 1a770d52..cb9e97e5 100644 --- a/rootly_sdk/models/alerts_source.py +++ b/rootly_sdk/models/alerts_source.py @@ -1,19 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alerts_source_deduplication_key_kind import ( - AlertsSourceDeduplicationKeyKind, - check_alerts_source_deduplication_key_kind, -) -from ..models.alerts_source_source_type import AlertsSourceSourceType, check_alerts_source_source_type -from ..models.alerts_source_status import AlertsSourceStatus, check_alerts_source_status from ..types import UNSET, Unset +from ..models.alerts_source_deduplication_key_kind import AlertsSourceDeduplicationKeyKind +from ..models.alerts_source_deduplication_key_kind import check_alerts_source_deduplication_key_kind +from ..models.alerts_source_source_type import AlertsSourceSourceType +from ..models.alerts_source_source_type import check_alerts_source_source_type +from ..models.alerts_source_status import AlertsSourceStatus +from ..models.alerts_source_status import check_alerts_source_status +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alerts_source_alert_source_fields_attributes_item import AlertsSourceAlertSourceFieldsAttributesItem from ..models.alerts_source_alert_source_urgency_rules_attributes_item import ( @@ -36,6 +39,8 @@ 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 + enabled (bool | Unset): Whether the alert source is enabled. Disabled sources do not create alerts from incoming + events. 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, @@ -65,6 +70,7 @@ class AlertsSource: secret: str created_at: str updated_at: str + enabled: bool | Unset = UNSET source_type: AlertsSourceSourceType | Unset = UNSET alert_urgency_id: str | Unset = UNSET deduplicate_alerts_by_key: bool | Unset = UNSET @@ -82,9 +88,15 @@ class AlertsSource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alerts_source_alert_template_attributes_type_0 import AlertsSourceAlertTemplateAttributesType0 - from ..models.alerts_source_resolution_rule_attributes_type_0 import AlertsSourceResolutionRuleAttributesType0 from ..models.alerts_source_sourceable_attributes_type_0 import AlertsSourceSourceableAttributesType0 + from ..models.alerts_source_alert_source_urgency_rules_attributes_item import ( + AlertsSourceAlertSourceUrgencyRulesAttributesItem, + ) + from ..models.alerts_source_resolution_rule_attributes_type_0 import AlertsSourceResolutionRuleAttributesType0 + from ..models.alerts_source_alert_template_attributes_type_0 import AlertsSourceAlertTemplateAttributesType0 + from ..models.alerts_source_alert_source_fields_attributes_item import ( + AlertsSourceAlertSourceFieldsAttributesItem, + ) name = self.name @@ -96,6 +108,8 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at + enabled = self.enabled + source_type: str | Unset = UNSET if not isinstance(self.source_type, Unset): source_type = self.source_type @@ -185,6 +199,8 @@ def to_dict(self) -> dict[str, Any]: "updated_at": updated_at, } ) + if enabled is not UNSET: + field_dict["enabled"] = enabled if source_type is not UNSET: field_dict["source_type"] = source_type if alert_urgency_id is not UNSET: @@ -239,6 +255,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") + enabled = d.pop("enabled", UNSET) + _source_type = d.pop("source_type", UNSET) source_type: AlertsSourceSourceType | Unset if isinstance(_source_type, Unset): @@ -376,6 +394,7 @@ def _parse_webhook_endpoint(data: object) -> None | str | Unset: secret=secret, created_at=created_at, updated_at=updated_at, + enabled=enabled, source_type=source_type, alert_urgency_id=alert_urgency_id, deduplicate_alerts_by_key=deduplicate_alerts_by_key, 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 a9f3276f..bee31c7c 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="AlertsSourceAlertSourceFieldsAttributesItem") 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 f3cb5e0c..16ceeeaf 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,24 +1,34 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alerts_source_alert_source_urgency_rules_attributes_item_conditionable_type import ( AlertsSourceAlertSourceUrgencyRulesAttributesItemConditionableType, +) +from ..models.alerts_source_alert_source_urgency_rules_attributes_item_conditionable_type import ( check_alerts_source_alert_source_urgency_rules_attributes_item_conditionable_type, ) from ..models.alerts_source_alert_source_urgency_rules_attributes_item_kind import ( AlertsSourceAlertSourceUrgencyRulesAttributesItemKind, +) +from ..models.alerts_source_alert_source_urgency_rules_attributes_item_kind import ( check_alerts_source_alert_source_urgency_rules_attributes_item_kind, ) from ..models.alerts_source_alert_source_urgency_rules_attributes_item_operator import ( AlertsSourceAlertSourceUrgencyRulesAttributesItemOperator, +) +from ..models.alerts_source_alert_source_urgency_rules_attributes_item_operator import ( check_alerts_source_alert_source_urgency_rules_attributes_item_operator, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="AlertsSourceAlertSourceUrgencyRulesAttributesItem") 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 139bdfa8..ec5440ee 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="AlertsSourceAlertTemplateAttributesType0") diff --git a/rootly_sdk/models/alerts_source_list.py b/rootly_sdk/models/alerts_source_list.py index 791f2ed1..756055bd 100644 --- a/rootly_sdk/models/alerts_source_list.py +++ b/rootly_sdk/models/alerts_source_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alerts_source_list_data_item import AlertsSourceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class AlertsSourceList: data (list[AlertsSourceListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AlertsSourceListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alerts_source_list_data_item import AlertsSourceListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alerts_source_list_data_item import AlertsSourceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alerts_source_list = cls( data=data, links=links, meta=meta, + included=included, ) alerts_source_list.additional_properties = d diff --git a/rootly_sdk/models/alerts_source_list_data_item.py b/rootly_sdk/models/alerts_source_list_data_item.py index 26b483bb..c393510a 100644 --- a/rootly_sdk/models/alerts_source_list_data_item.py +++ b/rootly_sdk/models/alerts_source_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alerts_source_list_data_item_type import ( - AlertsSourceListDataItemType, - check_alerts_source_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.alerts_source_list_data_item_type import AlertsSourceListDataItemType +from ..models.alerts_source_list_data_item_type import check_alerts_source_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.alerts_source import AlertsSource @@ -33,6 +34,8 @@ class AlertsSourceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alerts_source import AlertsSource + id = self.id type_: str = self.type_ 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 4bfaa3c1..e0e9c42a 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,24 +1,33 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alerts_source_resolution_rule_attributes_type_0_condition_type import ( AlertsSourceResolutionRuleAttributesType0ConditionType, +) +from ..models.alerts_source_resolution_rule_attributes_type_0_condition_type import ( check_alerts_source_resolution_rule_attributes_type_0_condition_type, ) from ..models.alerts_source_resolution_rule_attributes_type_0_identifier_matchable_type import ( AlertsSourceResolutionRuleAttributesType0IdentifierMatchableType, +) +from ..models.alerts_source_resolution_rule_attributes_type_0_identifier_matchable_type import ( check_alerts_source_resolution_rule_attributes_type_0_identifier_matchable_type, ) from ..models.alerts_source_resolution_rule_attributes_type_0_identifier_reference_kind import ( AlertsSourceResolutionRuleAttributesType0IdentifierReferenceKind, +) +from ..models.alerts_source_resolution_rule_attributes_type_0_identifier_reference_kind import ( check_alerts_source_resolution_rule_attributes_type_0_identifier_reference_kind, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item import ( @@ -62,6 +71,10 @@ class AlertsSourceResolutionRuleAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item import ( + AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem, + ) + enabled = self.enabled condition_type: str | Unset = UNSET 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 ccc2ade1..f35e632e 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,24 +1,34 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemConditionableType, +) +from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( check_alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type, ) from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemKind, +) +from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( check_alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_kind, ) from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemOperator, +) +from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( check_alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_operator, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem") diff --git a/rootly_sdk/models/alerts_source_response.py b/rootly_sdk/models/alerts_source_response.py index 5b72f28e..bf473a26 100644 --- a/rootly_sdk/models/alerts_source_response.py +++ b/rootly_sdk/models/alerts_source_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alerts_source_response_data import AlertsSourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AlertsSourceResponse") @@ -18,14 +24,26 @@ class AlertsSourceResponse: """ Attributes: data (AlertsSourceResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AlertsSourceResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alerts_source_response_data import AlertsSourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.alerts_source_response_data import AlertsSourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AlertsSourceResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + alerts_source_response = cls( data=data, + included=included, ) alerts_source_response.additional_properties = d diff --git a/rootly_sdk/models/alerts_source_response_data.py b/rootly_sdk/models/alerts_source_response_data.py index 5413efa8..b6bfea92 100644 --- a/rootly_sdk/models/alerts_source_response_data.py +++ b/rootly_sdk/models/alerts_source_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.alerts_source_response_data_type import ( - AlertsSourceResponseDataType, - check_alerts_source_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.alerts_source_response_data_type import AlertsSourceResponseDataType +from ..models.alerts_source_response_data_type import check_alerts_source_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.alerts_source import AlertsSource @@ -33,6 +34,8 @@ class AlertsSourceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alerts_source import AlertsSource + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/alerts_source_source_type.py b/rootly_sdk/models/alerts_source_source_type.py index 318c7d22..7762d668 100644 --- a/rootly_sdk/models/alerts_source_source_type.py +++ b/rootly_sdk/models/alerts_source_source_type.py @@ -11,6 +11,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", @@ -37,6 +38,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", 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 2e36bf19..38150882 100644 --- a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py +++ b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item import ( AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem, @@ -38,6 +41,10 @@ class AlertsSourceSourceableAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item import ( + AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem, + ) + auto_resolve = self.auto_resolve resolve_state: None | str | Unset 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 f677c96b..a3a71b3e 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField, +) +from ..models.alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( check_alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item_field, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem") @@ -22,7 +28,8 @@ class AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem: 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 + evaluation. For `notification_target_id` only: if your account has opted in to Dynamic Notification Targets, + this may also be a Liquid template that resolves to a notification target id at routing time. """ field: AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField | Unset = UNSET diff --git a/rootly_sdk/models/api_key.py b/rootly_sdk/models/api_key.py index c58d6d6b..d89c0820 100644 --- a/rootly_sdk/models/api_key.py +++ b/rootly_sdk/models/api_key.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.api_key_kind import ApiKeyKind +from ..models.api_key_kind import check_api_key_kind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="ApiKey") diff --git a/rootly_sdk/models/api_key_list.py b/rootly_sdk/models/api_key_list.py index f91da75e..698b7d01 100644 --- a/rootly_sdk/models/api_key_list.py +++ b/rootly_sdk/models/api_key_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.api_key_list_data_item import ApiKeyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class ApiKeyList: data (list[ApiKeyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ApiKeyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.api_key_list_data_item import ApiKeyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included 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.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + api_key_list = cls( data=data, links=links, meta=meta, + included=included, ) api_key_list.additional_properties = d diff --git a/rootly_sdk/models/api_key_list_data_item.py b/rootly_sdk/models/api_key_list_data_item.py index 45c001d8..3a0b542c 100644 --- a/rootly_sdk/models/api_key_list_data_item.py +++ b/rootly_sdk/models/api_key_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.api_key_list_data_item_type import ApiKeyListDataItemType +from ..models.api_key_list_data_item_type import check_api_key_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.api_key import ApiKey @@ -30,6 +34,8 @@ class ApiKeyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.api_key import ApiKey + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/api_key_response.py b/rootly_sdk/models/api_key_response.py index cc20822c..63149492 100644 --- a/rootly_sdk/models/api_key_response.py +++ b/rootly_sdk/models/api_key_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.api_key_response_data import ApiKeyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="ApiKeyResponse") @@ -18,14 +24,26 @@ class ApiKeyResponse: """ Attributes: data (ApiKeyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ApiKeyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.api_key_response_data import ApiKeyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.api_key_response_data import ApiKeyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = ApiKeyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + api_key_response = cls( data=data, + included=included, ) api_key_response.additional_properties = d diff --git a/rootly_sdk/models/api_key_response_data.py b/rootly_sdk/models/api_key_response_data.py index a0b026d9..1a3b045a 100644 --- a/rootly_sdk/models/api_key_response_data.py +++ b/rootly_sdk/models/api_key_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.api_key_response_data_type import ApiKeyResponseDataType +from ..models.api_key_response_data_type import check_api_key_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.api_key import ApiKey @@ -30,6 +34,8 @@ class ApiKeyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.api_key import ApiKey + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/api_key_with_token_response.py b/rootly_sdk/models/api_key_with_token_response.py index b4c7cf6d..211ea91a 100644 --- a/rootly_sdk/models/api_key_with_token_response.py +++ b/rootly_sdk/models/api_key_with_token_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.api_key_with_token_response_data import ApiKeyWithTokenResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="ApiKeyWithTokenResponse") @@ -18,14 +24,26 @@ class ApiKeyWithTokenResponse: """ Attributes: data (ApiKeyWithTokenResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ApiKeyWithTokenResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.api_key_with_token_response_data import ApiKeyWithTokenResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included 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 + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = ApiKeyWithTokenResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + api_key_with_token_response = cls( data=data, + included=included, ) api_key_with_token_response.additional_properties = d diff --git a/rootly_sdk/models/api_key_with_token_response_data.py b/rootly_sdk/models/api_key_with_token_response_data.py index 92e10765..4a4b4016 100644 --- a/rootly_sdk/models/api_key_with_token_response_data.py +++ b/rootly_sdk/models/api_key_with_token_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.api_key_with_token_response_data_type import ApiKeyWithTokenResponseDataType +from ..models.api_key_with_token_response_data_type import check_api_key_with_token_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.api_key_with_token_response_data_attributes import ApiKeyWithTokenResponseDataAttributes @@ -33,6 +34,8 @@ class ApiKeyWithTokenResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.api_key_with_token_response_data_attributes import ApiKeyWithTokenResponseDataAttributes + id = self.id type_: str = self.type_ 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 index 31d30f84..441d3e73 100644 --- a/rootly_sdk/models/api_key_with_token_response_data_attributes.py +++ b/rootly_sdk/models/api_key_with_token_response_data_attributes.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.api_key_kind import ApiKeyKind +from ..models.api_key_kind import check_api_key_kind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="ApiKeyWithTokenResponseDataAttributes") diff --git a/rootly_sdk/models/archive_google_chat_spaces_task_params.py b/rootly_sdk/models/archive_google_chat_spaces_task_params.py new file mode 100644 index 00000000..1d3568ec --- /dev/null +++ b/rootly_sdk/models/archive_google_chat_spaces_task_params.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.archive_google_chat_spaces_task_params_task_type import ArchiveGoogleChatSpacesTaskParamsTaskType +from ..models.archive_google_chat_spaces_task_params_task_type import ( + check_archive_google_chat_spaces_task_params_task_type, +) +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.archive_google_chat_spaces_task_params_spaces_item import ArchiveGoogleChatSpacesTaskParamsSpacesItem + + +T = TypeVar("T", bound="ArchiveGoogleChatSpacesTaskParams") + + +@_attrs_define +class ArchiveGoogleChatSpacesTaskParams: + """ + Attributes: + spaces (list[ArchiveGoogleChatSpacesTaskParamsSpacesItem]): + task_type (ArchiveGoogleChatSpacesTaskParamsTaskType | Unset): + """ + + spaces: list[ArchiveGoogleChatSpacesTaskParamsSpacesItem] + task_type: ArchiveGoogleChatSpacesTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.archive_google_chat_spaces_task_params_spaces_item import ( + ArchiveGoogleChatSpacesTaskParamsSpacesItem, + ) + + spaces = [] + for spaces_item_data in self.spaces: + spaces_item = spaces_item_data.to_dict() + spaces.append(spaces_item) + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "spaces": spaces, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.archive_google_chat_spaces_task_params_spaces_item import ( + ArchiveGoogleChatSpacesTaskParamsSpacesItem, + ) + + d = dict(src_dict) + spaces = [] + _spaces = d.pop("spaces") + for spaces_item_data in _spaces: + spaces_item = ArchiveGoogleChatSpacesTaskParamsSpacesItem.from_dict(spaces_item_data) + + spaces.append(spaces_item) + + _task_type = d.pop("task_type", UNSET) + task_type: ArchiveGoogleChatSpacesTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_archive_google_chat_spaces_task_params_task_type(_task_type) + + archive_google_chat_spaces_task_params = cls( + spaces=spaces, + task_type=task_type, + ) + + archive_google_chat_spaces_task_params.additional_properties = d + return archive_google_chat_spaces_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/archive_google_chat_spaces_task_params_spaces_item.py b/rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py new file mode 100644 index 00000000..07ad20c5 --- /dev/null +++ b/rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="ArchiveGoogleChatSpacesTaskParamsSpacesItem") + + +@_attrs_define +class ArchiveGoogleChatSpacesTaskParamsSpacesItem: + """ + 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) + + archive_google_chat_spaces_task_params_spaces_item = cls( + id=id, + name=name, + ) + + archive_google_chat_spaces_task_params_spaces_item.additional_properties = d + return archive_google_chat_spaces_task_params_spaces_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/archive_google_chat_spaces_task_params_task_type.py b/rootly_sdk/models/archive_google_chat_spaces_task_params_task_type.py new file mode 100644 index 00000000..9443a09a --- /dev/null +++ b/rootly_sdk/models/archive_google_chat_spaces_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +ArchiveGoogleChatSpacesTaskParamsTaskType = Literal["archive_google_chat_spaces"] + +ARCHIVE_GOOGLE_CHAT_SPACES_TASK_PARAMS_TASK_TYPE_VALUES: set[ArchiveGoogleChatSpacesTaskParamsTaskType] = { + "archive_google_chat_spaces", +} + + +def check_archive_google_chat_spaces_task_params_task_type( + value: str | None, +) -> ArchiveGoogleChatSpacesTaskParamsTaskType | None: + if value is None: + return None + if value in ARCHIVE_GOOGLE_CHAT_SPACES_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(ArchiveGoogleChatSpacesTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ARCHIVE_GOOGLE_CHAT_SPACES_TASK_PARAMS_TASK_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 3dfbb94b..06233910 100644 --- a/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py +++ b/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py @@ -1,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.archive_microsoft_teams_channels_task_params_task_type import ( ArchiveMicrosoftTeamsChannelsTaskParamsTaskType, +) +from ..models.archive_microsoft_teams_channels_task_params_task_type import ( check_archive_microsoft_teams_channels_task_params_task_type, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.archive_microsoft_teams_channels_task_params_channels_item import ( @@ -37,6 +42,13 @@ class ArchiveMicrosoftTeamsChannelsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.archive_microsoft_teams_channels_task_params_team import ( + ArchiveMicrosoftTeamsChannelsTaskParamsTeam, + ) + from ..models.archive_microsoft_teams_channels_task_params_channels_item import ( + ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem, + ) + team = self.team.to_dict() channels = [] 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 bf1a0ca0..788fa491 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem") 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 2bc1aa10..bd07560a 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ArchiveMicrosoftTeamsChannelsTaskParamsTeam") diff --git a/rootly_sdk/models/archive_slack_channels_task_params.py b/rootly_sdk/models/archive_slack_channels_task_params.py index 860e6b9b..58b9a1ae 100644 --- a/rootly_sdk/models/archive_slack_channels_task_params.py +++ b/rootly_sdk/models/archive_slack_channels_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.archive_slack_channels_task_params_task_type import ( - ArchiveSlackChannelsTaskParamsTaskType, - check_archive_slack_channels_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.archive_slack_channels_task_params_task_type import ArchiveSlackChannelsTaskParamsTaskType +from ..models.archive_slack_channels_task_params_task_type import check_archive_slack_channels_task_params_task_type +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.archive_slack_channels_task_params_channels_item import ArchiveSlackChannelsTaskParamsChannelsItem @@ -32,6 +33,8 @@ class ArchiveSlackChannelsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.archive_slack_channels_task_params_channels_item import ArchiveSlackChannelsTaskParamsChannelsItem + channels = [] for channels_item_data in self.channels: channels_item = channels_item_data.to_dict() 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 dc246e77..1c8c2aea 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ArchiveSlackChannelsTaskParamsChannelsItem") diff --git a/rootly_sdk/models/assign_role_to_user.py b/rootly_sdk/models/assign_role_to_user.py index 694269f5..1b1dd309 100644 --- a/rootly_sdk/models/assign_role_to_user.py +++ b/rootly_sdk/models/assign_role_to_user.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.assign_role_to_user_data import AssignRoleToUserData @@ -24,6 +28,8 @@ class AssignRoleToUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.assign_role_to_user_data import AssignRoleToUserData + data = self.data.to_dict() field_dict: 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 89f9c32a..91ea7e45 100644 --- a/rootly_sdk/models/assign_role_to_user_data.py +++ b/rootly_sdk/models/assign_role_to_user_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.assign_role_to_user_data_type import AssignRoleToUserDataType, check_assign_role_to_user_data_type +from ..types import UNSET, Unset + +from ..models.assign_role_to_user_data_type import AssignRoleToUserDataType +from ..models.assign_role_to_user_data_type import check_assign_role_to_user_data_type +from typing import cast if TYPE_CHECKING: from ..models.assign_role_to_user_data_attributes import AssignRoleToUserDataAttributes @@ -28,6 +32,8 @@ class AssignRoleToUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.assign_role_to_user_data_attributes import AssignRoleToUserDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 466f8a92..f71c44b2 100644 --- a/rootly_sdk/models/assign_role_to_user_data_attributes.py +++ b/rootly_sdk/models/assign_role_to_user_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AssignRoleToUserDataAttributes") diff --git a/rootly_sdk/models/attach_alert.py b/rootly_sdk/models/attach_alert.py index cd717905..e2a43e08 100644 --- a/rootly_sdk/models/attach_alert.py +++ b/rootly_sdk/models/attach_alert.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.attach_alert_data import AttachAlertData @@ -24,6 +28,8 @@ class AttachAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.attach_alert_data import AttachAlertData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/attach_alert_data.py b/rootly_sdk/models/attach_alert_data.py index 6e92e6f6..48dcb138 100644 --- a/rootly_sdk/models/attach_alert_data.py +++ b/rootly_sdk/models/attach_alert_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.attach_alert_data_type import AttachAlertDataType, check_attach_alert_data_type +from ..types import UNSET, Unset + +from ..models.attach_alert_data_type import AttachAlertDataType +from ..models.attach_alert_data_type import check_attach_alert_data_type +from typing import cast if TYPE_CHECKING: from ..models.attach_alert_data_attributes import AttachAlertDataAttributes @@ -28,6 +32,8 @@ class AttachAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.attach_alert_data_attributes import AttachAlertDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/attach_alert_data_attributes.py b/rootly_sdk/models/attach_alert_data_attributes.py index 6e524c81..6d971aa9 100644 --- a/rootly_sdk/models/attach_alert_data_attributes.py +++ b/rootly_sdk/models/attach_alert_data_attributes.py @@ -1,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="AttachAlertDataAttributes") diff --git a/rootly_sdk/models/attach_datadog_dashboards_task_params.py b/rootly_sdk/models/attach_datadog_dashboards_task_params.py index c9a50936..ee8d6e87 100644 --- a/rootly_sdk/models/attach_datadog_dashboards_task_params.py +++ b/rootly_sdk/models/attach_datadog_dashboards_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.attach_datadog_dashboards_task_params_task_type import AttachDatadogDashboardsTaskParamsTaskType from ..models.attach_datadog_dashboards_task_params_task_type import ( - AttachDatadogDashboardsTaskParamsTaskType, check_attach_datadog_dashboards_task_params_task_type, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.attach_datadog_dashboards_task_params_dashboards_item import ( @@ -41,6 +44,13 @@ class AttachDatadogDashboardsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.attach_datadog_dashboards_task_params_dashboards_item import ( + AttachDatadogDashboardsTaskParamsDashboardsItem, + ) + from ..models.attach_datadog_dashboards_task_params_post_to_slack_channels_item import ( + AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem, + ) + dashboards = [] for dashboards_item_data in self.dashboards: dashboards_item = dashboards_item_data.to_dict() 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 5930e6f9..4d16eec1 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AttachDatadogDashboardsTaskParamsDashboardsItem") 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 8436f266..c14c49c1 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py new file mode 100644 index 00000000..afe4862b --- /dev/null +++ b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py @@ -0,0 +1,128 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.attach_retrospective_pdf_to_jira_issue_task_params_task_type import ( + AttachRetrospectivePdfToJiraIssueTaskParamsTaskType, +) +from ..models.attach_retrospective_pdf_to_jira_issue_task_params_task_type import ( + check_attach_retrospective_pdf_to_jira_issue_task_params_task_type, +) +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.attach_retrospective_pdf_to_jira_issue_task_params_integration import ( + AttachRetrospectivePdfToJiraIssueTaskParamsIntegration, + ) + + +T = TypeVar("T", bound="AttachRetrospectivePdfToJiraIssueTaskParams") + + +@_attrs_define +class AttachRetrospectivePdfToJiraIssueTaskParams: + """ + Attributes: + issue_id (str): The issue id + task_type (AttachRetrospectivePdfToJiraIssueTaskParamsTaskType | Unset): + integration (AttachRetrospectivePdfToJiraIssueTaskParamsIntegration | Unset): Specify integration id if you have + more than one Jira instance + filename (str | Unset): The attachment filename + """ + + issue_id: str + task_type: AttachRetrospectivePdfToJiraIssueTaskParamsTaskType | Unset = UNSET + integration: AttachRetrospectivePdfToJiraIssueTaskParamsIntegration | Unset = UNSET + filename: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.attach_retrospective_pdf_to_jira_issue_task_params_integration import ( + AttachRetrospectivePdfToJiraIssueTaskParamsIntegration, + ) + + issue_id = self.issue_id + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + integration: dict[str, Any] | Unset = UNSET + if not isinstance(self.integration, Unset): + integration = self.integration.to_dict() + + filename = self.filename + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "issue_id": issue_id, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if integration is not UNSET: + field_dict["integration"] = integration + if filename is not UNSET: + field_dict["filename"] = filename + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.attach_retrospective_pdf_to_jira_issue_task_params_integration import ( + AttachRetrospectivePdfToJiraIssueTaskParamsIntegration, + ) + + d = dict(src_dict) + issue_id = d.pop("issue_id") + + _task_type = d.pop("task_type", UNSET) + task_type: AttachRetrospectivePdfToJiraIssueTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_attach_retrospective_pdf_to_jira_issue_task_params_task_type(_task_type) + + _integration = d.pop("integration", UNSET) + integration: AttachRetrospectivePdfToJiraIssueTaskParamsIntegration | Unset + if isinstance(_integration, Unset): + integration = UNSET + else: + integration = AttachRetrospectivePdfToJiraIssueTaskParamsIntegration.from_dict(_integration) + + filename = d.pop("filename", UNSET) + + attach_retrospective_pdf_to_jira_issue_task_params = cls( + issue_id=issue_id, + task_type=task_type, + integration=integration, + filename=filename, + ) + + attach_retrospective_pdf_to_jira_issue_task_params.additional_properties = d + return attach_retrospective_pdf_to_jira_issue_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/attach_retrospective_pdf_to_jira_issue_task_params_integration.py b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py new file mode 100644 index 00000000..0f2aafac --- /dev/null +++ b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AttachRetrospectivePdfToJiraIssueTaskParamsIntegration") + + +@_attrs_define +class AttachRetrospectivePdfToJiraIssueTaskParamsIntegration: + """Specify integration id if you have more than one Jira instance + + 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) + + attach_retrospective_pdf_to_jira_issue_task_params_integration = cls( + id=id, + name=name, + ) + + attach_retrospective_pdf_to_jira_issue_task_params_integration.additional_properties = d + return attach_retrospective_pdf_to_jira_issue_task_params_integration + + @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/attach_retrospective_pdf_to_jira_issue_task_params_task_type.py b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_task_type.py new file mode 100644 index 00000000..1e1bdbb8 --- /dev/null +++ b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_task_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +AttachRetrospectivePdfToJiraIssueTaskParamsTaskType = Literal["attach_retrospective_pdf_to_jira_issue"] + +ATTACH_RETROSPECTIVE_PDF_TO_JIRA_ISSUE_TASK_PARAMS_TASK_TYPE_VALUES: set[ + AttachRetrospectivePdfToJiraIssueTaskParamsTaskType +] = { + "attach_retrospective_pdf_to_jira_issue", +} + + +def check_attach_retrospective_pdf_to_jira_issue_task_params_task_type( + value: str | None, +) -> AttachRetrospectivePdfToJiraIssueTaskParamsTaskType | None: + if value is None: + return None + if value in ATTACH_RETROSPECTIVE_PDF_TO_JIRA_ISSUE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(AttachRetrospectivePdfToJiraIssueTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ATTACH_RETROSPECTIVE_PDF_TO_JIRA_ISSUE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/audit.py b/rootly_sdk/models/audit.py index d9191468..72f37e85 100644 --- a/rootly_sdk/models/audit.py +++ b/rootly_sdk/models/audit.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.audit_item_type import AuditItemType, check_audit_item_type from ..types import UNSET, Unset +from ..models.audit_item_type import AuditItemType +from ..models.audit_item_type import check_audit_item_type +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.audit_object_changes_type_0 import AuditObjectChangesType0 from ..models.audit_object_type_0 import AuditObjectType0 @@ -24,10 +28,18 @@ class Audit: event (str): Describes the action that was taken. created_at (str): Date of creation item_type (AuditItemType | Unset): Describes the object in which the action was taken on + item_type_display (None | str | Unset): Human-friendly display name for the item type 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 + user_name (None | str | Unset): Display name of the user who performed the action + user_email (None | str | Unset): Email address of the user who performed the action + ip_address (None | str | Unset): IP address of the client that performed the action + user_agent (None | str | Unset): User-Agent header of the client that performed the action + request_id (None | str | Unset): Unique request ID (UUID) for the HTTP request that triggered the action + session_id (None | str | Unset): SHA-256 fingerprint of the web session for correlating multiple actions within + the same browser session item_id (None | str | Unset): ID of the affected object id (int | None | Unset): ID of audit """ @@ -35,16 +47,23 @@ class Audit: event: str created_at: str item_type: AuditItemType | Unset = UNSET + item_type_display: None | str | Unset = UNSET object_: AuditObjectType0 | None | Unset = UNSET object_changes: AuditObjectChangesType0 | None | Unset = UNSET user_id: int | None | Unset = UNSET + user_name: None | str | Unset = UNSET + user_email: None | str | Unset = UNSET + ip_address: None | str | Unset = UNSET + user_agent: None | str | Unset = UNSET + request_id: None | str | Unset = UNSET + session_id: None | str | 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]: - from ..models.audit_object_changes_type_0 import AuditObjectChangesType0 from ..models.audit_object_type_0 import AuditObjectType0 + from ..models.audit_object_changes_type_0 import AuditObjectChangesType0 event = self.event @@ -54,6 +73,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.item_type, Unset): item_type = self.item_type + item_type_display: None | str | Unset + if isinstance(self.item_type_display, Unset): + item_type_display = UNSET + else: + item_type_display = self.item_type_display + object_: dict[str, Any] | None | Unset if isinstance(self.object_, Unset): object_ = UNSET @@ -76,6 +101,42 @@ def to_dict(self) -> dict[str, Any]: else: user_id = self.user_id + user_name: None | str | Unset + if isinstance(self.user_name, Unset): + user_name = UNSET + else: + user_name = self.user_name + + user_email: None | str | Unset + if isinstance(self.user_email, Unset): + user_email = UNSET + else: + user_email = self.user_email + + ip_address: None | str | Unset + if isinstance(self.ip_address, Unset): + ip_address = UNSET + else: + ip_address = self.ip_address + + user_agent: None | str | Unset + if isinstance(self.user_agent, Unset): + user_agent = UNSET + else: + user_agent = self.user_agent + + request_id: None | str | Unset + if isinstance(self.request_id, Unset): + request_id = UNSET + else: + request_id = self.request_id + + session_id: None | str | Unset + if isinstance(self.session_id, Unset): + session_id = UNSET + else: + session_id = self.session_id + item_id: None | str | Unset if isinstance(self.item_id, Unset): item_id = UNSET @@ -98,12 +159,26 @@ def to_dict(self) -> dict[str, Any]: ) if item_type is not UNSET: field_dict["item_type"] = item_type + if item_type_display is not UNSET: + field_dict["item_type_display"] = item_type_display if object_ is not UNSET: field_dict["object"] = object_ if object_changes is not UNSET: field_dict["object_changes"] = object_changes if user_id is not UNSET: field_dict["user_id"] = user_id + if user_name is not UNSET: + field_dict["user_name"] = user_name + if user_email is not UNSET: + field_dict["user_email"] = user_email + if ip_address is not UNSET: + field_dict["ip_address"] = ip_address + if user_agent is not UNSET: + field_dict["user_agent"] = user_agent + if request_id is not UNSET: + field_dict["request_id"] = request_id + if session_id is not UNSET: + field_dict["session_id"] = session_id if item_id is not UNSET: field_dict["item_id"] = item_id if id is not UNSET: @@ -128,6 +203,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: item_type = check_audit_item_type(_item_type) + def _parse_item_type_display(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + item_type_display = _parse_item_type_display(d.pop("item_type_display", UNSET)) + def _parse_object_(data: object) -> AuditObjectType0 | None | Unset: if data is None: return data @@ -171,6 +255,60 @@ def _parse_user_id(data: object) -> int | None | Unset: user_id = _parse_user_id(d.pop("user_id", UNSET)) + def _parse_user_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_name = _parse_user_name(d.pop("user_name", UNSET)) + + def _parse_user_email(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_email = _parse_user_email(d.pop("user_email", UNSET)) + + def _parse_ip_address(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + ip_address = _parse_ip_address(d.pop("ip_address", UNSET)) + + def _parse_user_agent(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + user_agent = _parse_user_agent(d.pop("user_agent", UNSET)) + + def _parse_request_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + request_id = _parse_request_id(d.pop("request_id", UNSET)) + + def _parse_session_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + session_id = _parse_session_id(d.pop("session_id", UNSET)) + def _parse_item_id(data: object) -> None | str | Unset: if data is None: return data @@ -193,9 +331,16 @@ def _parse_id(data: object) -> int | None | Unset: event=event, created_at=created_at, item_type=item_type, + item_type_display=item_type_display, object_=object_, object_changes=object_changes, user_id=user_id, + user_name=user_name, + user_email=user_email, + ip_address=ip_address, + user_agent=user_agent, + request_id=request_id, + session_id=session_id, item_id=item_id, id=id, ) diff --git a/rootly_sdk/models/audit_item_type.py b/rootly_sdk/models/audit_item_type.py index f7d8c330..a3f36ce7 100644 --- a/rootly_sdk/models/audit_item_type.py +++ b/rootly_sdk/models/audit_item_type.py @@ -1,6 +1,8 @@ from typing import Literal, cast AuditItemType = Literal[ + "AlertRoute", + "AlertRoutingRule", "Alerts::Source", "ApiKey", "Catalog", @@ -24,30 +26,50 @@ "GeniusWorkflowGroup", "GeniusWorkflowRun", "Group", + "GroupUser", "Heartbeat", "Incident", "IncidentActionItem", "IncidentEvent", "IncidentFormFieldSelection", "IncidentFormFieldSelectionUser", + "IncidentPermissionSet", "IncidentPostMortem", "IncidentRoleAssignment", "IncidentRoleTask", "IncidentStatusPageEvent", "IncidentTask", "IncidentType", + "Integrations::DatadogAccount", + "Integrations::GithubAccount", + "Integrations::GoogleMeetAccount", + "Integrations::JiraAccount", + "Integrations::MicrosoftTeamsAccount", + "Integrations::NotionAccount", + "Integrations::OpsgenieAccount", + "Integrations::PagerdutyAccount", + "Integrations::ServiceNowAccount", + "Integrations::SlackAccount", + "Integrations::StatusPageIoAccount", + "Integrations::ZendeskAccount", + "Integrations::ZoomAccount", "LiveCallRouter", + "LoginActivity", + "Membership", "OnCallRole", "Playbook", "PlaybookTask", "Role", "Schedule", + "Secret", "Service", "Severity", "StatusPage", ] AUDIT_ITEM_TYPE_VALUES: set[AuditItemType] = { + "AlertRoute", + "AlertRoutingRule", "Alerts::Source", "ApiKey", "Catalog", @@ -71,24 +93,42 @@ "GeniusWorkflowGroup", "GeniusWorkflowRun", "Group", + "GroupUser", "Heartbeat", "Incident", "IncidentActionItem", "IncidentEvent", "IncidentFormFieldSelection", "IncidentFormFieldSelectionUser", + "IncidentPermissionSet", "IncidentPostMortem", "IncidentRoleAssignment", "IncidentRoleTask", "IncidentStatusPageEvent", "IncidentTask", "IncidentType", + "Integrations::DatadogAccount", + "Integrations::GithubAccount", + "Integrations::GoogleMeetAccount", + "Integrations::JiraAccount", + "Integrations::MicrosoftTeamsAccount", + "Integrations::NotionAccount", + "Integrations::OpsgenieAccount", + "Integrations::PagerdutyAccount", + "Integrations::ServiceNowAccount", + "Integrations::SlackAccount", + "Integrations::StatusPageIoAccount", + "Integrations::ZendeskAccount", + "Integrations::ZoomAccount", "LiveCallRouter", + "LoginActivity", + "Membership", "OnCallRole", "Playbook", "PlaybookTask", "Role", "Schedule", + "Secret", "Service", "Severity", "StatusPage", diff --git a/rootly_sdk/models/audit_object_changes_type_0.py b/rootly_sdk/models/audit_object_changes_type_0.py index adacb420..a28c8697 100644 --- a/rootly_sdk/models/audit_object_changes_type_0.py +++ b/rootly_sdk/models/audit_object_changes_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AuditObjectChangesType0") diff --git a/rootly_sdk/models/audit_object_type_0.py b/rootly_sdk/models/audit_object_type_0.py index 2a1a35a1..c583fa66 100644 --- a/rootly_sdk/models/audit_object_type_0.py +++ b/rootly_sdk/models/audit_object_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AuditObjectType0") diff --git a/rootly_sdk/models/audits_list.py b/rootly_sdk/models/audits_list.py index 78fe7360..54527c32 100644 --- a/rootly_sdk/models/audits_list.py +++ b/rootly_sdk/models/audits_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.audits_list_data_item import AuditsListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class AuditsList: data (list[AuditsListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AuditsListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.audits_list_data_item import AuditsListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.audits_list_data_item import AuditsListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + audits_list = cls( data=data, links=links, meta=meta, + included=included, ) audits_list.additional_properties = d diff --git a/rootly_sdk/models/audits_list_data_item.py b/rootly_sdk/models/audits_list_data_item.py index f10c5aff..8d424654 100644 --- a/rootly_sdk/models/audits_list_data_item.py +++ b/rootly_sdk/models/audits_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.audits_list_data_item_type import AuditsListDataItemType, check_audits_list_data_item_type +from ..types import UNSET, Unset + +from ..models.audits_list_data_item_type import AuditsListDataItemType +from ..models.audits_list_data_item_type import check_audits_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.audit import Audit @@ -30,6 +34,8 @@ class AuditsListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.audit import Audit + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/authorization.py b/rootly_sdk/models/authorization.py index 62b21259..2e4304fd 100644 --- a/rootly_sdk/models/authorization.py +++ b/rootly_sdk/models/authorization.py @@ -1,17 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.authorization_authorizable_type import ( - AuthorizationAuthorizableType, - check_authorization_authorizable_type, -) -from ..models.authorization_grantee_type import AuthorizationGranteeType, check_authorization_grantee_type -from ..models.authorization_permissions_item import AuthorizationPermissionsItem, check_authorization_permissions_item +from ..types import UNSET, Unset + +from ..models.authorization_authorizable_type import AuthorizationAuthorizableType +from ..models.authorization_authorizable_type import check_authorization_authorizable_type +from ..models.authorization_grantee_type import AuthorizationGranteeType +from ..models.authorization_grantee_type import check_authorization_grantee_type +from ..models.authorization_permissions_item import AuthorizationPermissionsItem +from ..models.authorization_permissions_item import check_authorization_permissions_item +from typing import cast + T = TypeVar("T", bound="Authorization") diff --git a/rootly_sdk/models/authorization_list.py b/rootly_sdk/models/authorization_list.py index 0f145c24..76f06a88 100644 --- a/rootly_sdk/models/authorization_list.py +++ b/rootly_sdk/models/authorization_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.authorization_list_data_item import AuthorizationListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class AuthorizationList: data (list[AuthorizationListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[AuthorizationListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.authorization_list_data_item import AuthorizationListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.authorization_list_data_item import AuthorizationListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + authorization_list = cls( data=data, links=links, meta=meta, + included=included, ) authorization_list.additional_properties = d diff --git a/rootly_sdk/models/authorization_list_data_item.py b/rootly_sdk/models/authorization_list_data_item.py index 32272298..a2fee453 100644 --- a/rootly_sdk/models/authorization_list_data_item.py +++ b/rootly_sdk/models/authorization_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.authorization_list_data_item_type import ( - AuthorizationListDataItemType, - check_authorization_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.authorization_list_data_item_type import AuthorizationListDataItemType +from ..models.authorization_list_data_item_type import check_authorization_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.authorization import Authorization @@ -33,6 +34,8 @@ class AuthorizationListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.authorization import Authorization + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/authorization_response.py b/rootly_sdk/models/authorization_response.py index 258ac7b2..92df6c2e 100644 --- a/rootly_sdk/models/authorization_response.py +++ b/rootly_sdk/models/authorization_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.authorization_response_data import AuthorizationResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="AuthorizationResponse") @@ -18,14 +24,26 @@ class AuthorizationResponse: """ Attributes: data (AuthorizationResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: AuthorizationResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.authorization_response_data import AuthorizationResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.authorization_response_data import AuthorizationResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = AuthorizationResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + authorization_response = cls( data=data, + included=included, ) authorization_response.additional_properties = d diff --git a/rootly_sdk/models/authorization_response_data.py b/rootly_sdk/models/authorization_response_data.py index fc5371a6..fc1cd627 100644 --- a/rootly_sdk/models/authorization_response_data.py +++ b/rootly_sdk/models/authorization_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.authorization_response_data_type import ( - AuthorizationResponseDataType, - check_authorization_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.authorization_response_data_type import AuthorizationResponseDataType +from ..models.authorization_response_data_type import check_authorization_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.authorization import Authorization @@ -33,6 +34,8 @@ class AuthorizationResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.authorization import Authorization + id = self.id type_: str = self.type_ 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 e3ef0e7c..c6cb8e9d 100644 --- a/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py +++ b/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.auto_assign_role_opsgenie_task_params_task_type import AutoAssignRoleOpsgenieTaskParamsTaskType from ..models.auto_assign_role_opsgenie_task_params_task_type import ( - AutoAssignRoleOpsgenieTaskParamsTaskType, check_auto_assign_role_opsgenie_task_params_task_type, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.auto_assign_role_opsgenie_task_params_schedule import AutoAssignRoleOpsgenieTaskParamsSchedule @@ -34,6 +37,8 @@ class AutoAssignRoleOpsgenieTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.auto_assign_role_opsgenie_task_params_schedule import AutoAssignRoleOpsgenieTaskParamsSchedule + incident_role_id = self.incident_role_id schedule = self.schedule.to_dict() 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 d9929206..a7d159ed 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AutoAssignRoleOpsgenieTaskParamsSchedule") diff --git a/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py new file mode 100644 index 00000000..2db8db93 --- /dev/null +++ b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AutoAssignRolePagerdutyTaskParamsType0Schedule") + + +@_attrs_define +class AutoAssignRolePagerdutyTaskParamsType0Schedule: + """ + 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) + + auto_assign_role_pagerduty_task_params_type_0_schedule = cls( + id=id, + name=name, + ) + + auto_assign_role_pagerduty_task_params_type_0_schedule.additional_properties = d + return auto_assign_role_pagerduty_task_params_type_0_schedule + + @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/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py new file mode 100644 index 00000000..9b5c045b --- /dev/null +++ b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="AutoAssignRolePagerdutyTaskParamsType1EscalationPolicy") + + +@_attrs_define +class AutoAssignRolePagerdutyTaskParamsType1EscalationPolicy: + """ + 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) + + auto_assign_role_pagerduty_task_params_type_1_escalation_policy = cls( + id=id, + name=name, + ) + + auto_assign_role_pagerduty_task_params_type_1_escalation_policy.additional_properties = d + return auto_assign_role_pagerduty_task_params_type_1_escalation_policy + + @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/auto_assign_role_rootly_task_params.py b/rootly_sdk/models/auto_assign_role_rootly_task_params.py index 64866bed..6c33c4bb 100644 --- a/rootly_sdk/models/auto_assign_role_rootly_task_params.py +++ b/rootly_sdk/models/auto_assign_role_rootly_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.auto_assign_role_rootly_task_params_task_type import ( - AutoAssignRoleRootlyTaskParamsTaskType, - check_auto_assign_role_rootly_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.auto_assign_role_rootly_task_params_task_type import AutoAssignRoleRootlyTaskParamsTaskType +from ..models.auto_assign_role_rootly_task_params_task_type import check_auto_assign_role_rootly_task_params_task_type +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.auto_assign_role_rootly_task_params_escalation_policy_target import ( AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget, @@ -50,6 +51,18 @@ class AutoAssignRoleRootlyTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.auto_assign_role_rootly_task_params_escalation_policy_target import ( + AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget, + ) + from ..models.auto_assign_role_rootly_task_params_group_target import AutoAssignRoleRootlyTaskParamsGroupTarget + from ..models.auto_assign_role_rootly_task_params_user_target import AutoAssignRoleRootlyTaskParamsUserTarget + from ..models.auto_assign_role_rootly_task_params_service_target import ( + AutoAssignRoleRootlyTaskParamsServiceTarget, + ) + from ..models.auto_assign_role_rootly_task_params_schedule_target import ( + AutoAssignRoleRootlyTaskParamsScheduleTarget, + ) + incident_role_id = self.incident_role_id task_type: str | Unset = UNSET 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 4f2dc0fb..490f0091 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget") 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 f8147e20..7fd6b7c9 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsGroupTarget") 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 1f6e3338..7cb4b096 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsScheduleTarget") 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 e8908713..e298e5a4 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsServiceTarget") 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 e0a79a33..bf9442ea 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsUserTarget") 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 af0e0efb..b70eccd1 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,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.auto_assign_role_victor_ops_task_params_task_type import AutoAssignRoleVictorOpsTaskParamsTaskType from ..models.auto_assign_role_victor_ops_task_params_task_type import ( - AutoAssignRoleVictorOpsTaskParamsTaskType, check_auto_assign_role_victor_ops_task_params_task_type, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.auto_assign_role_victor_ops_task_params_team import AutoAssignRoleVictorOpsTaskParamsTeam @@ -34,6 +37,8 @@ class AutoAssignRoleVictorOpsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.auto_assign_role_victor_ops_task_params_team import AutoAssignRoleVictorOpsTaskParamsTeam + incident_role_id = self.incident_role_id team = self.team.to_dict() 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 aca48451..e5342158 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="AutoAssignRoleVictorOpsTaskParamsTeam") diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_response.py b/rootly_sdk/models/bulk_destroy_catalog_entities_response.py new file mode 100644 index 00000000..f49bf356 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_destroy_catalog_entities_response_data import BulkDestroyCatalogEntitiesResponseData + + +T = TypeVar("T", bound="BulkDestroyCatalogEntitiesResponse") + + +@_attrs_define +class BulkDestroyCatalogEntitiesResponse: + """ + Attributes: + data (BulkDestroyCatalogEntitiesResponseData | Unset): + """ + + data: BulkDestroyCatalogEntitiesResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_destroy_catalog_entities_response_data import BulkDestroyCatalogEntitiesResponseData + + 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.bulk_destroy_catalog_entities_response_data import BulkDestroyCatalogEntitiesResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyCatalogEntitiesResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyCatalogEntitiesResponseData.from_dict(_data) + + bulk_destroy_catalog_entities_response = cls( + data=data, + ) + + bulk_destroy_catalog_entities_response.additional_properties = d + return bulk_destroy_catalog_entities_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/bulk_destroy_catalog_entities_response_data.py b/rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py new file mode 100644 index 00000000..f9ad8125 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyCatalogEntitiesResponseData") + + +@_attrs_define +class BulkDestroyCatalogEntitiesResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_catalog_entities_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_catalog_entities_response_data.additional_properties = d + return bulk_destroy_catalog_entities_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/bulk_destroy_catalog_entities_type_0.py b/rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py new file mode 100644 index 00000000..c61622f1 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyCatalogEntitiesType0") + + +@_attrs_define +class BulkDestroyCatalogEntitiesType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_catalog_entities_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_catalog_entities_type_0 diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py new file mode 100644 index 00000000..d7fc643b --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py @@ -0,0 +1,65 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_destroy_catalog_entities_type_1_managed_by import BulkDestroyCatalogEntitiesType1ManagedBy +from ..models.bulk_destroy_catalog_entities_type_1_managed_by import ( + check_bulk_destroy_catalog_entities_type_1_managed_by, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyCatalogEntitiesType1") + + +@_attrs_define +class BulkDestroyCatalogEntitiesType1: + """ + Attributes: + managed_by (BulkDestroyCatalogEntitiesType1ManagedBy): Delete all entities with this managed_by value + (web/admin_web not allowed). + keep_external_ids (list[str] | Unset): Entities with these external_ids are preserved. + """ + + managed_by: BulkDestroyCatalogEntitiesType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_catalog_entities_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_catalog_entities_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_catalog_entities_type_1 diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1_managed_by.py new file mode 100644 index 00000000..225693d2 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1_managed_by.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +BulkDestroyCatalogEntitiesType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_CATALOG_ENTITIES_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyCatalogEntitiesType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_catalog_entities_type_1_managed_by( + value: str | None, +) -> BulkDestroyCatalogEntitiesType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_CATALOG_ENTITIES_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyCatalogEntitiesType1ManagedBy, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_CATALOG_ENTITIES_TYPE_1_MANAGED_BY_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_destroy_environments_response.py b/rootly_sdk/models/bulk_destroy_environments_response.py new file mode 100644 index 00000000..e366ec67 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_destroy_environments_response_data import BulkDestroyEnvironmentsResponseData + + +T = TypeVar("T", bound="BulkDestroyEnvironmentsResponse") + + +@_attrs_define +class BulkDestroyEnvironmentsResponse: + """ + Attributes: + data (BulkDestroyEnvironmentsResponseData | Unset): + """ + + data: BulkDestroyEnvironmentsResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_destroy_environments_response_data import BulkDestroyEnvironmentsResponseData + + 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.bulk_destroy_environments_response_data import BulkDestroyEnvironmentsResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyEnvironmentsResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyEnvironmentsResponseData.from_dict(_data) + + bulk_destroy_environments_response = cls( + data=data, + ) + + bulk_destroy_environments_response.additional_properties = d + return bulk_destroy_environments_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/bulk_destroy_environments_response_data.py b/rootly_sdk/models/bulk_destroy_environments_response_data.py new file mode 100644 index 00000000..2c69f3aa --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_response_data.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyEnvironmentsResponseData") + + +@_attrs_define +class BulkDestroyEnvironmentsResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_environments_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_environments_response_data.additional_properties = d + return bulk_destroy_environments_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/bulk_destroy_environments_type_0.py b/rootly_sdk/models/bulk_destroy_environments_type_0.py new file mode 100644 index 00000000..953e91f9 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyEnvironmentsType0") + + +@_attrs_define +class BulkDestroyEnvironmentsType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_environments_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_environments_type_0 diff --git a/rootly_sdk/models/bulk_destroy_environments_type_1.py b/rootly_sdk/models/bulk_destroy_environments_type_1.py new file mode 100644 index 00000000..5a257d19 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_type_1.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_destroy_environments_type_1_managed_by import BulkDestroyEnvironmentsType1ManagedBy +from ..models.bulk_destroy_environments_type_1_managed_by import check_bulk_destroy_environments_type_1_managed_by +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyEnvironmentsType1") + + +@_attrs_define +class BulkDestroyEnvironmentsType1: + """ + Attributes: + managed_by (BulkDestroyEnvironmentsType1ManagedBy): Delete all records with this managed_by value (web/admin_web + not allowed). + keep_external_ids (list[str] | Unset): Records with these external_ids are preserved. + """ + + managed_by: BulkDestroyEnvironmentsType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_environments_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_environments_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_environments_type_1 diff --git a/rootly_sdk/models/bulk_destroy_environments_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_environments_type_1_managed_by.py new file mode 100644 index 00000000..cf58aaeb --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_environments_type_1_managed_by.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +BulkDestroyEnvironmentsType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_ENVIRONMENTS_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyEnvironmentsType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_environments_type_1_managed_by( + value: str | None, +) -> BulkDestroyEnvironmentsType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_ENVIRONMENTS_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyEnvironmentsType1ManagedBy, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_ENVIRONMENTS_TYPE_1_MANAGED_BY_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_destroy_functionalities_response.py b/rootly_sdk/models/bulk_destroy_functionalities_response.py new file mode 100644 index 00000000..29aa5170 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_destroy_functionalities_response_data import BulkDestroyFunctionalitiesResponseData + + +T = TypeVar("T", bound="BulkDestroyFunctionalitiesResponse") + + +@_attrs_define +class BulkDestroyFunctionalitiesResponse: + """ + Attributes: + data (BulkDestroyFunctionalitiesResponseData | Unset): + """ + + data: BulkDestroyFunctionalitiesResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_destroy_functionalities_response_data import BulkDestroyFunctionalitiesResponseData + + 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.bulk_destroy_functionalities_response_data import BulkDestroyFunctionalitiesResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyFunctionalitiesResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyFunctionalitiesResponseData.from_dict(_data) + + bulk_destroy_functionalities_response = cls( + data=data, + ) + + bulk_destroy_functionalities_response.additional_properties = d + return bulk_destroy_functionalities_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/bulk_destroy_functionalities_response_data.py b/rootly_sdk/models/bulk_destroy_functionalities_response_data.py new file mode 100644 index 00000000..578866aa --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_response_data.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyFunctionalitiesResponseData") + + +@_attrs_define +class BulkDestroyFunctionalitiesResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_functionalities_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_functionalities_response_data.additional_properties = d + return bulk_destroy_functionalities_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/bulk_destroy_functionalities_type_0.py b/rootly_sdk/models/bulk_destroy_functionalities_type_0.py new file mode 100644 index 00000000..1cc010e8 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyFunctionalitiesType0") + + +@_attrs_define +class BulkDestroyFunctionalitiesType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_functionalities_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_functionalities_type_0 diff --git a/rootly_sdk/models/bulk_destroy_functionalities_type_1.py b/rootly_sdk/models/bulk_destroy_functionalities_type_1.py new file mode 100644 index 00000000..bdfd5a19 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_type_1.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_destroy_functionalities_type_1_managed_by import BulkDestroyFunctionalitiesType1ManagedBy +from ..models.bulk_destroy_functionalities_type_1_managed_by import check_bulk_destroy_functionalities_type_1_managed_by +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyFunctionalitiesType1") + + +@_attrs_define +class BulkDestroyFunctionalitiesType1: + """ + Attributes: + managed_by (BulkDestroyFunctionalitiesType1ManagedBy): Delete all records with this managed_by value + (web/admin_web not allowed). + keep_external_ids (list[str] | Unset): Records with these external_ids are preserved. + """ + + managed_by: BulkDestroyFunctionalitiesType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_functionalities_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_functionalities_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_functionalities_type_1 diff --git a/rootly_sdk/models/bulk_destroy_functionalities_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_functionalities_type_1_managed_by.py new file mode 100644 index 00000000..b0afb919 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_functionalities_type_1_managed_by.py @@ -0,0 +1,23 @@ +from typing import Literal, cast + +BulkDestroyFunctionalitiesType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_FUNCTIONALITIES_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyFunctionalitiesType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_functionalities_type_1_managed_by( + value: str | None, +) -> BulkDestroyFunctionalitiesType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_FUNCTIONALITIES_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyFunctionalitiesType1ManagedBy, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_FUNCTIONALITIES_TYPE_1_MANAGED_BY_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_destroy_services_response.py b/rootly_sdk/models/bulk_destroy_services_response.py new file mode 100644 index 00000000..965dd103 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_destroy_services_response_data import BulkDestroyServicesResponseData + + +T = TypeVar("T", bound="BulkDestroyServicesResponse") + + +@_attrs_define +class BulkDestroyServicesResponse: + """ + Attributes: + data (BulkDestroyServicesResponseData | Unset): + """ + + data: BulkDestroyServicesResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_destroy_services_response_data import BulkDestroyServicesResponseData + + 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.bulk_destroy_services_response_data import BulkDestroyServicesResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyServicesResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyServicesResponseData.from_dict(_data) + + bulk_destroy_services_response = cls( + data=data, + ) + + bulk_destroy_services_response.additional_properties = d + return bulk_destroy_services_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/bulk_destroy_services_response_data.py b/rootly_sdk/models/bulk_destroy_services_response_data.py new file mode 100644 index 00000000..151cd4c7 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_response_data.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyServicesResponseData") + + +@_attrs_define +class BulkDestroyServicesResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_services_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_services_response_data.additional_properties = d + return bulk_destroy_services_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/bulk_destroy_services_type_0.py b/rootly_sdk/models/bulk_destroy_services_type_0.py new file mode 100644 index 00000000..47735c27 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyServicesType0") + + +@_attrs_define +class BulkDestroyServicesType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_services_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_services_type_0 diff --git a/rootly_sdk/models/bulk_destroy_services_type_1.py b/rootly_sdk/models/bulk_destroy_services_type_1.py new file mode 100644 index 00000000..2e9b6d9e --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_type_1.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_destroy_services_type_1_managed_by import BulkDestroyServicesType1ManagedBy +from ..models.bulk_destroy_services_type_1_managed_by import check_bulk_destroy_services_type_1_managed_by +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyServicesType1") + + +@_attrs_define +class BulkDestroyServicesType1: + """ + Attributes: + managed_by (BulkDestroyServicesType1ManagedBy): Delete all records with this managed_by value (web/admin_web not + allowed). + keep_external_ids (list[str] | Unset): Records with these external_ids are preserved. + """ + + managed_by: BulkDestroyServicesType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_services_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_services_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_services_type_1 diff --git a/rootly_sdk/models/bulk_destroy_services_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_services_type_1_managed_by.py new file mode 100644 index 00000000..a95baa65 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_services_type_1_managed_by.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkDestroyServicesType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_SERVICES_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyServicesType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_services_type_1_managed_by(value: str | None) -> BulkDestroyServicesType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_SERVICES_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyServicesType1ManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_SERVICES_TYPE_1_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/bulk_destroy_teams_response.py b/rootly_sdk/models/bulk_destroy_teams_response.py new file mode 100644 index 00000000..84d918ae --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_destroy_teams_response_data import BulkDestroyTeamsResponseData + + +T = TypeVar("T", bound="BulkDestroyTeamsResponse") + + +@_attrs_define +class BulkDestroyTeamsResponse: + """ + Attributes: + data (BulkDestroyTeamsResponseData | Unset): + """ + + data: BulkDestroyTeamsResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_destroy_teams_response_data import BulkDestroyTeamsResponseData + + 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.bulk_destroy_teams_response_data import BulkDestroyTeamsResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: BulkDestroyTeamsResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = BulkDestroyTeamsResponseData.from_dict(_data) + + bulk_destroy_teams_response = cls( + data=data, + ) + + bulk_destroy_teams_response.additional_properties = d + return bulk_destroy_teams_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/bulk_destroy_teams_response_data.py b/rootly_sdk/models/bulk_destroy_teams_response_data.py new file mode 100644 index 00000000..f24d8d1b --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_response_data.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyTeamsResponseData") + + +@_attrs_define +class BulkDestroyTeamsResponseData: + """ + Attributes: + deleted_external_ids (list[str] | Unset): External IDs that were successfully deleted + failed_external_ids (list[str] | Unset): External IDs whose deletion the record itself blocked (e.g. minimum-one + guard, restrict associations). Records the caller is not authorized to destroy are NOT listed here. + not_found_external_ids (list[str] | Unset): External IDs that were not found or not accessible to the caller + (external_ids mode only) + """ + + deleted_external_ids: list[str] | Unset = UNSET + failed_external_ids: list[str] | Unset = UNSET + not_found_external_ids: list[str] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + deleted_external_ids: list[str] | Unset = UNSET + if not isinstance(self.deleted_external_ids, Unset): + deleted_external_ids = self.deleted_external_ids + + failed_external_ids: list[str] | Unset = UNSET + if not isinstance(self.failed_external_ids, Unset): + failed_external_ids = self.failed_external_ids + + not_found_external_ids: list[str] | Unset = UNSET + if not isinstance(self.not_found_external_ids, Unset): + not_found_external_ids = self.not_found_external_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if deleted_external_ids is not UNSET: + field_dict["deleted_external_ids"] = deleted_external_ids + if failed_external_ids is not UNSET: + field_dict["failed_external_ids"] = failed_external_ids + if not_found_external_ids is not UNSET: + field_dict["not_found_external_ids"] = not_found_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + deleted_external_ids = cast(list[str], d.pop("deleted_external_ids", UNSET)) + + failed_external_ids = cast(list[str], d.pop("failed_external_ids", UNSET)) + + not_found_external_ids = cast(list[str], d.pop("not_found_external_ids", UNSET)) + + bulk_destroy_teams_response_data = cls( + deleted_external_ids=deleted_external_ids, + failed_external_ids=failed_external_ids, + not_found_external_ids=not_found_external_ids, + ) + + bulk_destroy_teams_response_data.additional_properties = d + return bulk_destroy_teams_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/bulk_destroy_teams_type_0.py b/rootly_sdk/models/bulk_destroy_teams_type_0.py new file mode 100644 index 00000000..249f5557 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_type_0.py @@ -0,0 +1,48 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyTeamsType0") + + +@_attrs_define +class BulkDestroyTeamsType0: + """ + Attributes: + external_ids (list[str]): Array of external_ids to delete. Max 100 per request. + """ + + external_ids: list[str] + + def to_dict(self) -> dict[str, Any]: + external_ids = self.external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "external_ids": external_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + external_ids = cast(list[str], d.pop("external_ids")) + + bulk_destroy_teams_type_0 = cls( + external_ids=external_ids, + ) + + return bulk_destroy_teams_type_0 diff --git a/rootly_sdk/models/bulk_destroy_teams_type_1.py b/rootly_sdk/models/bulk_destroy_teams_type_1.py new file mode 100644 index 00000000..6e5eab55 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_type_1.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_destroy_teams_type_1_managed_by import BulkDestroyTeamsType1ManagedBy +from ..models.bulk_destroy_teams_type_1_managed_by import check_bulk_destroy_teams_type_1_managed_by +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="BulkDestroyTeamsType1") + + +@_attrs_define +class BulkDestroyTeamsType1: + """ + Attributes: + managed_by (BulkDestroyTeamsType1ManagedBy): Delete all records with this managed_by value (web/admin_web not + allowed). + keep_external_ids (list[str] | Unset): Records with these external_ids are preserved. + """ + + managed_by: BulkDestroyTeamsType1ManagedBy + keep_external_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + managed_by: str = self.managed_by + + keep_external_ids: list[str] | Unset = UNSET + if not isinstance(self.keep_external_ids, Unset): + keep_external_ids = self.keep_external_ids + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "managed_by": managed_by, + } + ) + if keep_external_ids is not UNSET: + field_dict["keep_external_ids"] = keep_external_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + managed_by = check_bulk_destroy_teams_type_1_managed_by(d.pop("managed_by")) + + keep_external_ids = cast(list[str], d.pop("keep_external_ids", UNSET)) + + bulk_destroy_teams_type_1 = cls( + managed_by=managed_by, + keep_external_ids=keep_external_ids, + ) + + return bulk_destroy_teams_type_1 diff --git a/rootly_sdk/models/bulk_destroy_teams_type_1_managed_by.py b/rootly_sdk/models/bulk_destroy_teams_type_1_managed_by.py new file mode 100644 index 00000000..8eaf2132 --- /dev/null +++ b/rootly_sdk/models/bulk_destroy_teams_type_1_managed_by.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkDestroyTeamsType1ManagedBy = Literal["api", "backstage", "catalog_sync", "pulumi", "terraform"] + +BULK_DESTROY_TEAMS_TYPE_1_MANAGED_BY_VALUES: set[BulkDestroyTeamsType1ManagedBy] = { + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", +} + + +def check_bulk_destroy_teams_type_1_managed_by(value: str | None) -> BulkDestroyTeamsType1ManagedBy | None: + if value is None: + return None + if value in BULK_DESTROY_TEAMS_TYPE_1_MANAGED_BY_VALUES: + return cast(BulkDestroyTeamsType1ManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {BULK_DESTROY_TEAMS_TYPE_1_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities.py b/rootly_sdk/models/bulk_upsert_catalog_entities.py new file mode 100644 index 00000000..6db2b26d --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_catalog_entities_entities_item import BulkUpsertCatalogEntitiesEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertCatalogEntities") + + +@_attrs_define +class BulkUpsertCatalogEntities: + """ + Attributes: + entities (list[BulkUpsertCatalogEntitiesEntitiesItem]): Array of catalog entities to upsert. Each must have an + external_id. Max 100 per request. external_ids must be unique within a batch. + """ + + entities: list[BulkUpsertCatalogEntitiesEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_catalog_entities_entities_item import BulkUpsertCatalogEntitiesEntitiesItem + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_catalog_entities_entities_item import BulkUpsertCatalogEntitiesEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertCatalogEntitiesEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_catalog_entities = cls( + entities=entities, + ) + + bulk_upsert_catalog_entities.additional_properties = d + return bulk_upsert_catalog_entities + + @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/bulk_upsert_catalog_entities_entities_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py new file mode 100644 index 00000000..c07be25e --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py @@ -0,0 +1,152 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_catalog_entities_entities_item_fields_item import ( + BulkUpsertCatalogEntitiesEntitiesItemFieldsItem, + ) + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesEntitiesItem") + + +@_attrs_define +class BulkUpsertCatalogEntitiesEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Must be unique within the catalog. + name (str | Unset): Required for new entities. Optional for updates (managed-fields: omitted attributes are + preserved). + description (None | str | Unset): + backstage_id (None | str | Unset): + fields (list[BulkUpsertCatalogEntitiesEntitiesItemFieldsItem] | Unset): Property values for this entity. Only + mentioned fields are written; unmentioned fields are preserved. + """ + + external_id: str + name: str | Unset = UNSET + description: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + fields: list[BulkUpsertCatalogEntitiesEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_catalog_entities_entities_item_fields_item import ( + BulkUpsertCatalogEntitiesEntitiesItemFieldsItem, + ) + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + fields: list[dict[str, Any]] | Unset = 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) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_catalog_entities_entities_item_fields_item import ( + BulkUpsertCatalogEntitiesEntitiesItemFieldsItem, + ) + + d = dict(src_dict) + external_id = d.pop("external_id") + + 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_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertCatalogEntitiesEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertCatalogEntitiesEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_catalog_entities_entities_item = cls( + external_id=external_id, + name=name, + description=description, + backstage_id=backstage_id, + fields=fields, + ) + + bulk_upsert_catalog_entities_entities_item.additional_properties = d + return bulk_upsert_catalog_entities_entities_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/bulk_upsert_catalog_entities_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py new file mode 100644 index 00000000..aa7e237e --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertCatalogEntitiesEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + 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) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_catalog_entities_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_catalog_entities_entities_item_fields_item.additional_properties = d + return bulk_upsert_catalog_entities_entities_item_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/bulk_upsert_catalog_entities_error.py b/rootly_sdk/models/bulk_upsert_catalog_entities_error.py new file mode 100644 index 00000000..a555ed91 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_error.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_catalog_entities_error_errors_item import BulkUpsertCatalogEntitiesErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesError") + + +@_attrs_define +class BulkUpsertCatalogEntitiesError: + """ + Attributes: + errors (list[BulkUpsertCatalogEntitiesErrorErrorsItem]): + """ + + errors: list[BulkUpsertCatalogEntitiesErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_catalog_entities_error_errors_item import BulkUpsertCatalogEntitiesErrorErrorsItem + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_catalog_entities_error_errors_item import BulkUpsertCatalogEntitiesErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertCatalogEntitiesErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_catalog_entities_error = cls( + errors=errors, + ) + + bulk_upsert_catalog_entities_error.additional_properties = d + return bulk_upsert_catalog_entities_error + + @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/bulk_upsert_catalog_entities_error_errors_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py new file mode 100644 index 00000000..e26761e2 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesErrorErrorsItem") + + +@_attrs_define +class BulkUpsertCatalogEntitiesErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed entity in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_catalog_entities_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_catalog_entities_error_errors_item.additional_properties = d + return bulk_upsert_catalog_entities_error_errors_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/bulk_upsert_catalog_entities_response.py b/rootly_sdk/models/bulk_upsert_catalog_entities_response.py new file mode 100644 index 00000000..57f300f7 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_response.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_catalog_entities_response_data_item import BulkUpsertCatalogEntitiesResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesResponse") + + +@_attrs_define +class BulkUpsertCatalogEntitiesResponse: + """ + Attributes: + data (list[BulkUpsertCatalogEntitiesResponseDataItem] | Unset): + """ + + data: list[BulkUpsertCatalogEntitiesResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_catalog_entities_response_data_item import BulkUpsertCatalogEntitiesResponseDataItem + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + 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.bulk_upsert_catalog_entities_response_data_item import BulkUpsertCatalogEntitiesResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertCatalogEntitiesResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertCatalogEntitiesResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_catalog_entities_response = cls( + data=data, + ) + + bulk_upsert_catalog_entities_response.additional_properties = d + return bulk_upsert_catalog_entities_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/bulk_upsert_catalog_entities_response_data_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py new file mode 100644 index 00000000..4dd31d8b --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_upsert_catalog_entities_response_data_item_type import BulkUpsertCatalogEntitiesResponseDataItemType +from ..models.bulk_upsert_catalog_entities_response_data_item_type import ( + check_bulk_upsert_catalog_entities_response_data_item_type, +) +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.catalog_entity import CatalogEntity + + +T = TypeVar("T", bound="BulkUpsertCatalogEntitiesResponseDataItem") + + +@_attrs_define +class BulkUpsertCatalogEntitiesResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertCatalogEntitiesResponseDataItemType | Unset): + attributes (CatalogEntity | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertCatalogEntitiesResponseDataItemType | Unset = UNSET + attributes: CatalogEntity | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity import CatalogEntity + + 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 import CatalogEntity + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertCatalogEntitiesResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_catalog_entities_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: CatalogEntity | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = CatalogEntity.from_dict(_attributes) + + bulk_upsert_catalog_entities_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_catalog_entities_response_data_item.additional_properties = d + return bulk_upsert_catalog_entities_response_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/bulk_upsert_catalog_entities_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item_type.py new file mode 100644 index 00000000..fbfd77d2 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkUpsertCatalogEntitiesResponseDataItemType = Literal["catalog_entities"] + +BULK_UPSERT_CATALOG_ENTITIES_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertCatalogEntitiesResponseDataItemType] = { + "catalog_entities", +} + + +def check_bulk_upsert_catalog_entities_response_data_item_type( + value: str | None, +) -> BulkUpsertCatalogEntitiesResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_CATALOG_ENTITIES_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertCatalogEntitiesResponseDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_CATALOG_ENTITIES_RESPONSE_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_upsert_environments.py b/rootly_sdk/models/bulk_upsert_environments.py new file mode 100644 index 00000000..9ecd5f92 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_environments_entities_item import BulkUpsertEnvironmentsEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertEnvironments") + + +@_attrs_define +class BulkUpsertEnvironments: + """ + Attributes: + entities (list[BulkUpsertEnvironmentsEntitiesItem]): Environments to upsert, matched by external_id. Max 100 per + request; external_ids unique within a batch. Only attributes present are written (managed-fields semantics). + """ + + entities: list[BulkUpsertEnvironmentsEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_environments_entities_item import BulkUpsertEnvironmentsEntitiesItem + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_environments_entities_item import BulkUpsertEnvironmentsEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertEnvironmentsEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_environments = cls( + entities=entities, + ) + + bulk_upsert_environments.additional_properties = d + return bulk_upsert_environments + + @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/bulk_upsert_environments_entities_item.py b/rootly_sdk/models/bulk_upsert_environments_entities_item.py new file mode 100644 index 00000000..b2eee7ec --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_entities_item.py @@ -0,0 +1,200 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_environments_entities_item_fields_item import BulkUpsertEnvironmentsEntitiesItemFieldsItem + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsEntitiesItem") + + +@_attrs_define +class BulkUpsertEnvironmentsEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Unique per team. + name (str | Unset): Required for new records. Optional for updates. + description (None | str | Unset): + color (None | str | Unset): + position (int | None | Unset): + notify_emails (list[str] | None | Unset): + fields (list[BulkUpsertEnvironmentsEntitiesItemFieldsItem] | Unset): Catalog property values (merge semantics: + only mentioned fields written). + """ + + external_id: str + 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 + fields: list[BulkUpsertEnvironmentsEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_environments_entities_item_fields_item import ( + BulkUpsertEnvironmentsEntitiesItemFieldsItem, + ) + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + notify_emails: list[str] | None | Unset + if isinstance(self.notify_emails, Unset): + notify_emails = UNSET + elif isinstance(self.notify_emails, list): + notify_emails = self.notify_emails + + else: + notify_emails = self.notify_emails + + fields: list[dict[str, Any]] | Unset = 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) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if color is not UNSET: + field_dict["color"] = color + if position is not UNSET: + field_dict["position"] = position + if notify_emails is not UNSET: + field_dict["notify_emails"] = notify_emails + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_environments_entities_item_fields_item import ( + BulkUpsertEnvironmentsEntitiesItemFieldsItem, + ) + + d = dict(src_dict) + external_id = d.pop("external_id") + + 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_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", 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)) + + def _parse_notify_emails(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() + notify_emails_type_0 = cast(list[str], data) + + return notify_emails_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertEnvironmentsEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertEnvironmentsEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_environments_entities_item = cls( + external_id=external_id, + name=name, + description=description, + color=color, + position=position, + notify_emails=notify_emails, + fields=fields, + ) + + bulk_upsert_environments_entities_item.additional_properties = d + return bulk_upsert_environments_entities_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/bulk_upsert_environments_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py new file mode 100644 index 00000000..18a5a0c4 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertEnvironmentsEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + 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) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_environments_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_environments_entities_item_fields_item.additional_properties = d + return bulk_upsert_environments_entities_item_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/bulk_upsert_environments_error.py b/rootly_sdk/models/bulk_upsert_environments_error.py new file mode 100644 index 00000000..730aa248 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_error.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_environments_error_errors_item import BulkUpsertEnvironmentsErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsError") + + +@_attrs_define +class BulkUpsertEnvironmentsError: + """ + Attributes: + errors (list[BulkUpsertEnvironmentsErrorErrorsItem]): + """ + + errors: list[BulkUpsertEnvironmentsErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_environments_error_errors_item import BulkUpsertEnvironmentsErrorErrorsItem + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_environments_error_errors_item import BulkUpsertEnvironmentsErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertEnvironmentsErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_environments_error = cls( + errors=errors, + ) + + bulk_upsert_environments_error.additional_properties = d + return bulk_upsert_environments_error + + @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/bulk_upsert_environments_error_errors_item.py b/rootly_sdk/models/bulk_upsert_environments_error_errors_item.py new file mode 100644 index 00000000..db0f8aa1 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_error_errors_item.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsErrorErrorsItem") + + +@_attrs_define +class BulkUpsertEnvironmentsErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed record in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_environments_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_environments_error_errors_item.additional_properties = d + return bulk_upsert_environments_error_errors_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/bulk_upsert_environments_response.py b/rootly_sdk/models/bulk_upsert_environments_response.py new file mode 100644 index 00000000..85815be4 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_response.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_environments_response_data_item import BulkUpsertEnvironmentsResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsResponse") + + +@_attrs_define +class BulkUpsertEnvironmentsResponse: + """ + Attributes: + data (list[BulkUpsertEnvironmentsResponseDataItem] | Unset): + """ + + data: list[BulkUpsertEnvironmentsResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_environments_response_data_item import BulkUpsertEnvironmentsResponseDataItem + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + 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.bulk_upsert_environments_response_data_item import BulkUpsertEnvironmentsResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertEnvironmentsResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertEnvironmentsResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_environments_response = cls( + data=data, + ) + + bulk_upsert_environments_response.additional_properties = d + return bulk_upsert_environments_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/bulk_upsert_environments_response_data_item.py b/rootly_sdk/models/bulk_upsert_environments_response_data_item.py new file mode 100644 index 00000000..1e6186b7 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_response_data_item.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_upsert_environments_response_data_item_type import BulkUpsertEnvironmentsResponseDataItemType +from ..models.bulk_upsert_environments_response_data_item_type import ( + check_bulk_upsert_environments_response_data_item_type, +) +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.environment import Environment + + +T = TypeVar("T", bound="BulkUpsertEnvironmentsResponseDataItem") + + +@_attrs_define +class BulkUpsertEnvironmentsResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertEnvironmentsResponseDataItemType | Unset): + attributes (Environment | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertEnvironmentsResponseDataItemType | Unset = UNSET + attributes: Environment | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.environment import Environment + + 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.environment import Environment + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertEnvironmentsResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_environments_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: Environment | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = Environment.from_dict(_attributes) + + bulk_upsert_environments_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_environments_response_data_item.additional_properties = d + return bulk_upsert_environments_response_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/bulk_upsert_environments_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_environments_response_data_item_type.py new file mode 100644 index 00000000..dde45699 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_environments_response_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkUpsertEnvironmentsResponseDataItemType = Literal["environments"] + +BULK_UPSERT_ENVIRONMENTS_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertEnvironmentsResponseDataItemType] = { + "environments", +} + + +def check_bulk_upsert_environments_response_data_item_type( + value: str | None, +) -> BulkUpsertEnvironmentsResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_ENVIRONMENTS_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertEnvironmentsResponseDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_ENVIRONMENTS_RESPONSE_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_upsert_functionalities.py b/rootly_sdk/models/bulk_upsert_functionalities.py new file mode 100644 index 00000000..849ffc9e --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_functionalities_entities_item import BulkUpsertFunctionalitiesEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertFunctionalities") + + +@_attrs_define +class BulkUpsertFunctionalities: + """ + Attributes: + entities (list[BulkUpsertFunctionalitiesEntitiesItem]): Functionalities to upsert, matched by external_id. Max + 100 per request; external_ids unique within a batch. Only attributes present are written (managed-fields + semantics). + """ + + entities: list[BulkUpsertFunctionalitiesEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_functionalities_entities_item import BulkUpsertFunctionalitiesEntitiesItem + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_functionalities_entities_item import BulkUpsertFunctionalitiesEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertFunctionalitiesEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_functionalities = cls( + entities=entities, + ) + + bulk_upsert_functionalities.additional_properties = d + return bulk_upsert_functionalities + + @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/bulk_upsert_functionalities_entities_item.py b/rootly_sdk/models/bulk_upsert_functionalities_entities_item.py new file mode 100644 index 00000000..17ca54dc --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_entities_item.py @@ -0,0 +1,402 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_functionalities_entities_item_fields_item import ( + BulkUpsertFunctionalitiesEntitiesItemFieldsItem, + ) + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesEntitiesItem") + + +@_attrs_define +class BulkUpsertFunctionalitiesEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Unique per team. + name (str | Unset): Required for new records. Optional for updates. + description (None | str | Unset): + public_description (None | str | Unset): + color (None | str | Unset): + position (int | None | Unset): + show_uptime (bool | None | Unset): + show_uptime_last_days (int | None | Unset): + notify_emails (list[str] | None | Unset): + pagerduty_id (None | str | Unset): + opsgenie_id (None | str | Unset): + opsgenie_team_id (None | str | Unset): + backstage_id (None | str | Unset): + cortex_id (None | str | Unset): + opslevel_id (None | str | Unset): + service_now_ci_sys_id (None | str | Unset): + fields (list[BulkUpsertFunctionalitiesEntitiesItemFieldsItem] | Unset): Catalog property values (merge + semantics: only mentioned fields written). + """ + + external_id: str + name: str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + show_uptime: bool | None | Unset = UNSET + show_uptime_last_days: int | None | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + pagerduty_id: None | str | Unset = UNSET + opsgenie_id: None | str | Unset = UNSET + opsgenie_team_id: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + opslevel_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + fields: list[BulkUpsertFunctionalitiesEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_functionalities_entities_item_fields_item import ( + BulkUpsertFunctionalitiesEntitiesItemFieldsItem, + ) + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + public_description: None | str | Unset + if isinstance(self.public_description, Unset): + public_description = UNSET + else: + public_description = self.public_description + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + show_uptime: bool | None | Unset + if isinstance(self.show_uptime, Unset): + show_uptime = UNSET + else: + show_uptime = self.show_uptime + + show_uptime_last_days: int | None | Unset + if isinstance(self.show_uptime_last_days, Unset): + show_uptime_last_days = UNSET + else: + show_uptime_last_days = self.show_uptime_last_days + + notify_emails: list[str] | None | Unset + if isinstance(self.notify_emails, Unset): + notify_emails = UNSET + elif isinstance(self.notify_emails, list): + notify_emails = self.notify_emails + + else: + notify_emails = self.notify_emails + + pagerduty_id: None | str | Unset + if isinstance(self.pagerduty_id, Unset): + pagerduty_id = UNSET + else: + pagerduty_id = self.pagerduty_id + + opsgenie_id: None | str | Unset + if isinstance(self.opsgenie_id, Unset): + opsgenie_id = UNSET + else: + opsgenie_id = self.opsgenie_id + + 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 + + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + cortex_id: None | str | Unset + if isinstance(self.cortex_id, Unset): + cortex_id = UNSET + else: + cortex_id = self.cortex_id + + opslevel_id: None | str | Unset + if isinstance(self.opslevel_id, Unset): + opslevel_id = UNSET + else: + opslevel_id = self.opslevel_id + + 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 + + fields: list[dict[str, Any]] | Unset = 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) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if public_description is not UNSET: + field_dict["public_description"] = public_description + if color is not UNSET: + field_dict["color"] = color + if position is not UNSET: + field_dict["position"] = position + if show_uptime is not UNSET: + field_dict["show_uptime"] = show_uptime + if show_uptime_last_days is not UNSET: + field_dict["show_uptime_last_days"] = show_uptime_last_days + if notify_emails is not UNSET: + field_dict["notify_emails"] = notify_emails + if pagerduty_id is not UNSET: + field_dict["pagerduty_id"] = pagerduty_id + if opsgenie_id is not UNSET: + field_dict["opsgenie_id"] = opsgenie_id + if opsgenie_team_id is not UNSET: + field_dict["opsgenie_team_id"] = opsgenie_team_id + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if cortex_id is not UNSET: + field_dict["cortex_id"] = cortex_id + if opslevel_id is not UNSET: + field_dict["opslevel_id"] = opslevel_id + if service_now_ci_sys_id is not UNSET: + field_dict["service_now_ci_sys_id"] = service_now_ci_sys_id + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_functionalities_entities_item_fields_item import ( + BulkUpsertFunctionalitiesEntitiesItemFieldsItem, + ) + + d = dict(src_dict) + external_id = d.pop("external_id") + + 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_public_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + public_description = _parse_public_description(d.pop("public_description", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", 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)) + + def _parse_show_uptime(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + show_uptime = _parse_show_uptime(d.pop("show_uptime", UNSET)) + + def _parse_show_uptime_last_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + show_uptime_last_days = _parse_show_uptime_last_days(d.pop("show_uptime_last_days", UNSET)) + + def _parse_notify_emails(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() + notify_emails_type_0 = cast(list[str], data) + + return notify_emails_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) + + def _parse_pagerduty_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) + + def _parse_opsgenie_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return 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 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opsgenie_team_id = _parse_opsgenie_team_id(d.pop("opsgenie_team_id", UNSET)) + + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_cortex_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) + + def _parse_opslevel_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opslevel_id = _parse_opslevel_id(d.pop("opslevel_id", UNSET)) + + 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 | str | Unset, data) + + service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertFunctionalitiesEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertFunctionalitiesEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_functionalities_entities_item = cls( + external_id=external_id, + name=name, + description=description, + public_description=public_description, + color=color, + position=position, + show_uptime=show_uptime, + show_uptime_last_days=show_uptime_last_days, + notify_emails=notify_emails, + pagerduty_id=pagerduty_id, + opsgenie_id=opsgenie_id, + opsgenie_team_id=opsgenie_team_id, + backstage_id=backstage_id, + cortex_id=cortex_id, + opslevel_id=opslevel_id, + service_now_ci_sys_id=service_now_ci_sys_id, + fields=fields, + ) + + bulk_upsert_functionalities_entities_item.additional_properties = d + return bulk_upsert_functionalities_entities_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/bulk_upsert_functionalities_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py new file mode 100644 index 00000000..0cf60b77 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertFunctionalitiesEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + 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) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_functionalities_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_functionalities_entities_item_fields_item.additional_properties = d + return bulk_upsert_functionalities_entities_item_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/bulk_upsert_functionalities_error.py b/rootly_sdk/models/bulk_upsert_functionalities_error.py new file mode 100644 index 00000000..20eba8b4 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_error.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_functionalities_error_errors_item import BulkUpsertFunctionalitiesErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesError") + + +@_attrs_define +class BulkUpsertFunctionalitiesError: + """ + Attributes: + errors (list[BulkUpsertFunctionalitiesErrorErrorsItem]): + """ + + errors: list[BulkUpsertFunctionalitiesErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_functionalities_error_errors_item import BulkUpsertFunctionalitiesErrorErrorsItem + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_functionalities_error_errors_item import BulkUpsertFunctionalitiesErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertFunctionalitiesErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_functionalities_error = cls( + errors=errors, + ) + + bulk_upsert_functionalities_error.additional_properties = d + return bulk_upsert_functionalities_error + + @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/bulk_upsert_functionalities_error_errors_item.py b/rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py new file mode 100644 index 00000000..79208314 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesErrorErrorsItem") + + +@_attrs_define +class BulkUpsertFunctionalitiesErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed record in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_functionalities_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_functionalities_error_errors_item.additional_properties = d + return bulk_upsert_functionalities_error_errors_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/bulk_upsert_functionalities_response.py b/rootly_sdk/models/bulk_upsert_functionalities_response.py new file mode 100644 index 00000000..0f6ec4bc --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_response.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_functionalities_response_data_item import BulkUpsertFunctionalitiesResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesResponse") + + +@_attrs_define +class BulkUpsertFunctionalitiesResponse: + """ + Attributes: + data (list[BulkUpsertFunctionalitiesResponseDataItem] | Unset): + """ + + data: list[BulkUpsertFunctionalitiesResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_functionalities_response_data_item import BulkUpsertFunctionalitiesResponseDataItem + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + 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.bulk_upsert_functionalities_response_data_item import BulkUpsertFunctionalitiesResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertFunctionalitiesResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertFunctionalitiesResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_functionalities_response = cls( + data=data, + ) + + bulk_upsert_functionalities_response.additional_properties = d + return bulk_upsert_functionalities_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/bulk_upsert_functionalities_response_data_item.py b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py new file mode 100644 index 00000000..b7ddb73d --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py @@ -0,0 +1,108 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_upsert_functionalities_response_data_item_type import BulkUpsertFunctionalitiesResponseDataItemType +from ..models.bulk_upsert_functionalities_response_data_item_type import ( + check_bulk_upsert_functionalities_response_data_item_type, +) +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.functionality import Functionality + + +T = TypeVar("T", bound="BulkUpsertFunctionalitiesResponseDataItem") + + +@_attrs_define +class BulkUpsertFunctionalitiesResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertFunctionalitiesResponseDataItemType | Unset): + attributes (Functionality | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertFunctionalitiesResponseDataItemType | Unset = UNSET + attributes: Functionality | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.functionality import Functionality + + 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.functionality import Functionality + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertFunctionalitiesResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_functionalities_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: Functionality | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = Functionality.from_dict(_attributes) + + bulk_upsert_functionalities_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_functionalities_response_data_item.additional_properties = d + return bulk_upsert_functionalities_response_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/bulk_upsert_functionalities_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item_type.py new file mode 100644 index 00000000..b1cdac0f --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkUpsertFunctionalitiesResponseDataItemType = Literal["functionalities"] + +BULK_UPSERT_FUNCTIONALITIES_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertFunctionalitiesResponseDataItemType] = { + "functionalities", +} + + +def check_bulk_upsert_functionalities_response_data_item_type( + value: str | None, +) -> BulkUpsertFunctionalitiesResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_FUNCTIONALITIES_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertFunctionalitiesResponseDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_FUNCTIONALITIES_RESPONSE_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_upsert_services.py b/rootly_sdk/models/bulk_upsert_services.py new file mode 100644 index 00000000..985fbc09 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_services_entities_item import BulkUpsertServicesEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertServices") + + +@_attrs_define +class BulkUpsertServices: + """ + Attributes: + entities (list[BulkUpsertServicesEntitiesItem]): Services to upsert, matched by external_id. Max 100 per + request; external_ids unique within a batch. Only attributes present are written (managed-fields semantics). + """ + + entities: list[BulkUpsertServicesEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_services_entities_item import BulkUpsertServicesEntitiesItem + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_services_entities_item import BulkUpsertServicesEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertServicesEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_services = cls( + entities=entities, + ) + + bulk_upsert_services.additional_properties = d + return bulk_upsert_services + + @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/bulk_upsert_services_entities_item.py b/rootly_sdk/models/bulk_upsert_services_entities_item.py new file mode 100644 index 00000000..7de233eb --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_entities_item.py @@ -0,0 +1,516 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_services_entities_item_fields_item import BulkUpsertServicesEntitiesItemFieldsItem + + +T = TypeVar("T", bound="BulkUpsertServicesEntitiesItem") + + +@_attrs_define +class BulkUpsertServicesEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Unique per team. + name (str | Unset): Required for new records. Optional for updates. + description (None | str | Unset): + public_description (None | str | Unset): + color (None | str | Unset): + position (int | None | Unset): + show_uptime (bool | None | Unset): + show_uptime_last_days (int | None | Unset): + github_repository_name (None | str | Unset): + github_repository_branch (None | str | Unset): + gitlab_repository_name (None | str | Unset): + gitlab_repository_branch (None | str | Unset): + kubernetes_deployment_name (None | str | Unset): + pagerduty_id (None | str | Unset): + opsgenie_id (None | str | Unset): + opsgenie_team_id (None | str | Unset): + cortex_id (None | str | Unset): + opslevel_id (None | str | Unset): + backstage_id (None | str | Unset): + service_now_ci_sys_id (None | str | Unset): + notify_emails (list[str] | None | Unset): + alerts_email_enabled (bool | None | Unset): + fields (list[BulkUpsertServicesEntitiesItemFieldsItem] | Unset): Catalog property values (merge semantics: only + mentioned fields written). + """ + + external_id: str + name: str | Unset = UNSET + description: None | str | Unset = UNSET + public_description: None | str | Unset = UNSET + color: None | str | Unset = UNSET + position: int | None | Unset = UNSET + show_uptime: bool | None | Unset = UNSET + show_uptime_last_days: int | None | 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 + 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 + opslevel_id: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + notify_emails: list[str] | None | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + fields: list[BulkUpsertServicesEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_services_entities_item_fields_item import BulkUpsertServicesEntitiesItemFieldsItem + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + public_description: None | str | Unset + if isinstance(self.public_description, Unset): + public_description = UNSET + else: + public_description = self.public_description + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + show_uptime: bool | None | Unset + if isinstance(self.show_uptime, Unset): + show_uptime = UNSET + else: + show_uptime = self.show_uptime + + show_uptime_last_days: int | None | Unset + if isinstance(self.show_uptime_last_days, Unset): + show_uptime_last_days = UNSET + else: + show_uptime_last_days = self.show_uptime_last_days + + 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 | 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 | 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 | 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 | str | Unset + if isinstance(self.kubernetes_deployment_name, Unset): + kubernetes_deployment_name = UNSET + else: + kubernetes_deployment_name = self.kubernetes_deployment_name + + pagerduty_id: None | str | Unset + if isinstance(self.pagerduty_id, Unset): + pagerduty_id = UNSET + else: + pagerduty_id = self.pagerduty_id + + opsgenie_id: None | str | Unset + if isinstance(self.opsgenie_id, Unset): + opsgenie_id = UNSET + else: + opsgenie_id = self.opsgenie_id + + 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 | str | Unset + if isinstance(self.cortex_id, Unset): + cortex_id = UNSET + else: + cortex_id = self.cortex_id + + opslevel_id: None | str | Unset + if isinstance(self.opslevel_id, Unset): + opslevel_id = UNSET + else: + opslevel_id = self.opslevel_id + + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + 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 + + notify_emails: list[str] | None | Unset + if isinstance(self.notify_emails, Unset): + notify_emails = UNSET + elif isinstance(self.notify_emails, list): + notify_emails = self.notify_emails + + else: + notify_emails = self.notify_emails + + 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 + + fields: list[dict[str, Any]] | Unset = 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) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if public_description is not UNSET: + field_dict["public_description"] = public_description + if color is not UNSET: + field_dict["color"] = color + if position is not UNSET: + field_dict["position"] = position + if show_uptime is not UNSET: + field_dict["show_uptime"] = show_uptime + if show_uptime_last_days is not UNSET: + field_dict["show_uptime_last_days"] = show_uptime_last_days + if github_repository_name is not UNSET: + field_dict["github_repository_name"] = github_repository_name + if github_repository_branch is not UNSET: + field_dict["github_repository_branch"] = github_repository_branch + if gitlab_repository_name is not UNSET: + field_dict["gitlab_repository_name"] = gitlab_repository_name + if gitlab_repository_branch is not UNSET: + field_dict["gitlab_repository_branch"] = gitlab_repository_branch + if kubernetes_deployment_name is not UNSET: + field_dict["kubernetes_deployment_name"] = kubernetes_deployment_name + if pagerduty_id is not UNSET: + field_dict["pagerduty_id"] = pagerduty_id + if opsgenie_id is not UNSET: + field_dict["opsgenie_id"] = opsgenie_id + if opsgenie_team_id is not UNSET: + field_dict["opsgenie_team_id"] = opsgenie_team_id + if cortex_id is not UNSET: + field_dict["cortex_id"] = cortex_id + if opslevel_id is not UNSET: + field_dict["opslevel_id"] = opslevel_id + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if service_now_ci_sys_id is not UNSET: + field_dict["service_now_ci_sys_id"] = service_now_ci_sys_id + if notify_emails is not UNSET: + field_dict["notify_emails"] = notify_emails + if alerts_email_enabled is not UNSET: + field_dict["alerts_email_enabled"] = alerts_email_enabled + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_services_entities_item_fields_item import BulkUpsertServicesEntitiesItemFieldsItem + + d = dict(src_dict) + external_id = d.pop("external_id") + + 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_public_description(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + public_description = _parse_public_description(d.pop("public_description", UNSET)) + + def _parse_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", 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)) + + def _parse_show_uptime(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + show_uptime = _parse_show_uptime(d.pop("show_uptime", UNSET)) + + def _parse_show_uptime_last_days(data: object) -> int | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(int | None | Unset, data) + + show_uptime_last_days = _parse_show_uptime_last_days(d.pop("show_uptime_last_days", UNSET)) + + 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 | str | Unset, data) + + github_repository_name = _parse_github_repository_name(d.pop("github_repository_name", UNSET)) + + 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 | str | Unset, data) + + github_repository_branch = _parse_github_repository_branch(d.pop("github_repository_branch", UNSET)) + + 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 | str | Unset, data) + + gitlab_repository_name = _parse_gitlab_repository_name(d.pop("gitlab_repository_name", UNSET)) + + 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 | str | Unset, data) + + gitlab_repository_branch = _parse_gitlab_repository_branch(d.pop("gitlab_repository_branch", UNSET)) + + 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 | str | Unset, data) + + kubernetes_deployment_name = _parse_kubernetes_deployment_name(d.pop("kubernetes_deployment_name", UNSET)) + + def _parse_pagerduty_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pagerduty_id = _parse_pagerduty_id(d.pop("pagerduty_id", UNSET)) + + def _parse_opsgenie_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return 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 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return 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 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) + + def _parse_opslevel_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opslevel_id = _parse_opslevel_id(d.pop("opslevel_id", UNSET)) + + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + 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 | str | Unset, data) + + service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) + + def _parse_notify_emails(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() + notify_emails_type_0 = cast(list[str], data) + + return notify_emails_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) + + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertServicesEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertServicesEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_services_entities_item = cls( + external_id=external_id, + name=name, + description=description, + public_description=public_description, + color=color, + position=position, + show_uptime=show_uptime, + show_uptime_last_days=show_uptime_last_days, + github_repository_name=github_repository_name, + github_repository_branch=github_repository_branch, + gitlab_repository_name=gitlab_repository_name, + gitlab_repository_branch=gitlab_repository_branch, + kubernetes_deployment_name=kubernetes_deployment_name, + pagerduty_id=pagerduty_id, + opsgenie_id=opsgenie_id, + opsgenie_team_id=opsgenie_team_id, + cortex_id=cortex_id, + opslevel_id=opslevel_id, + backstage_id=backstage_id, + service_now_ci_sys_id=service_now_ci_sys_id, + notify_emails=notify_emails, + alerts_email_enabled=alerts_email_enabled, + fields=fields, + ) + + bulk_upsert_services_entities_item.additional_properties = d + return bulk_upsert_services_entities_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/bulk_upsert_services_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py new file mode 100644 index 00000000..02bbd314 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="BulkUpsertServicesEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertServicesEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + 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) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_services_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_services_entities_item_fields_item.additional_properties = d + return bulk_upsert_services_entities_item_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/bulk_upsert_services_error.py b/rootly_sdk/models/bulk_upsert_services_error.py new file mode 100644 index 00000000..f1a14e03 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_error.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_services_error_errors_item import BulkUpsertServicesErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertServicesError") + + +@_attrs_define +class BulkUpsertServicesError: + """ + Attributes: + errors (list[BulkUpsertServicesErrorErrorsItem]): + """ + + errors: list[BulkUpsertServicesErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_services_error_errors_item import BulkUpsertServicesErrorErrorsItem + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_services_error_errors_item import BulkUpsertServicesErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertServicesErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_services_error = cls( + errors=errors, + ) + + bulk_upsert_services_error.additional_properties = d + return bulk_upsert_services_error + + @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/bulk_upsert_services_error_errors_item.py b/rootly_sdk/models/bulk_upsert_services_error_errors_item.py new file mode 100644 index 00000000..33da926f --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_error_errors_item.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkUpsertServicesErrorErrorsItem") + + +@_attrs_define +class BulkUpsertServicesErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed record in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_services_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_services_error_errors_item.additional_properties = d + return bulk_upsert_services_error_errors_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/bulk_upsert_services_response.py b/rootly_sdk/models/bulk_upsert_services_response.py new file mode 100644 index 00000000..8ccd0f04 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_response.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_services_response_data_item import BulkUpsertServicesResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertServicesResponse") + + +@_attrs_define +class BulkUpsertServicesResponse: + """ + Attributes: + data (list[BulkUpsertServicesResponseDataItem] | Unset): + """ + + data: list[BulkUpsertServicesResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_services_response_data_item import BulkUpsertServicesResponseDataItem + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + 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.bulk_upsert_services_response_data_item import BulkUpsertServicesResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertServicesResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertServicesResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_services_response = cls( + data=data, + ) + + bulk_upsert_services_response.additional_properties = d + return bulk_upsert_services_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/bulk_upsert_services_response_data_item.py b/rootly_sdk/models/bulk_upsert_services_response_data_item.py new file mode 100644 index 00000000..786fed4e --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_response_data_item.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_upsert_services_response_data_item_type import BulkUpsertServicesResponseDataItemType +from ..models.bulk_upsert_services_response_data_item_type import check_bulk_upsert_services_response_data_item_type +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.service import Service + + +T = TypeVar("T", bound="BulkUpsertServicesResponseDataItem") + + +@_attrs_define +class BulkUpsertServicesResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertServicesResponseDataItemType | Unset): + attributes (Service | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertServicesResponseDataItemType | Unset = UNSET + attributes: Service | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.service import Service + + 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.service import Service + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertServicesResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_services_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: Service | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = Service.from_dict(_attributes) + + bulk_upsert_services_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_services_response_data_item.additional_properties = d + return bulk_upsert_services_response_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/bulk_upsert_services_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_services_response_data_item_type.py new file mode 100644 index 00000000..92736645 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_services_response_data_item_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +BulkUpsertServicesResponseDataItemType = Literal["services"] + +BULK_UPSERT_SERVICES_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertServicesResponseDataItemType] = { + "services", +} + + +def check_bulk_upsert_services_response_data_item_type( + value: str | None, +) -> BulkUpsertServicesResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_SERVICES_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertServicesResponseDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_SERVICES_RESPONSE_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/bulk_upsert_teams.py b/rootly_sdk/models/bulk_upsert_teams.py new file mode 100644 index 00000000..b060d1c8 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_teams_entities_item import BulkUpsertTeamsEntitiesItem + + +T = TypeVar("T", bound="BulkUpsertTeams") + + +@_attrs_define +class BulkUpsertTeams: + """ + Attributes: + entities (list[BulkUpsertTeamsEntitiesItem]): Teams to upsert, matched by external_id. Max 100 per request; + external_ids unique within a batch. Only attributes present are written (managed-fields semantics). + """ + + entities: list[BulkUpsertTeamsEntitiesItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_teams_entities_item import BulkUpsertTeamsEntitiesItem + + entities = [] + for entities_item_data in self.entities: + entities_item = entities_item_data.to_dict() + entities.append(entities_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "entities": entities, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_teams_entities_item import BulkUpsertTeamsEntitiesItem + + d = dict(src_dict) + entities = [] + _entities = d.pop("entities") + for entities_item_data in _entities: + entities_item = BulkUpsertTeamsEntitiesItem.from_dict(entities_item_data) + + entities.append(entities_item) + + bulk_upsert_teams = cls( + entities=entities, + ) + + bulk_upsert_teams.additional_properties = d + return bulk_upsert_teams + + @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/bulk_upsert_teams_entities_item.py b/rootly_sdk/models/bulk_upsert_teams_entities_item.py new file mode 100644 index 00000000..9ceb7438 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_entities_item.py @@ -0,0 +1,396 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_teams_entities_item_fields_item import BulkUpsertTeamsEntitiesItemFieldsItem + + +T = TypeVar("T", bound="BulkUpsertTeamsEntitiesItem") + + +@_attrs_define +class BulkUpsertTeamsEntitiesItem: + """ + Attributes: + external_id (str): External identifier used as the upsert key. Unique per team. + name (str | Unset): Required for new records. Optional for updates. + description (None | str | Unset): + color (None | str | Unset): + position (int | None | Unset): + notify_emails (list[str] | None | Unset): + pagerduty_id (None | str | Unset): + pagerduty_service_id (None | str | Unset): + opsgenie_id (None | str | Unset): + victor_ops_id (None | str | Unset): + pagertree_id (None | str | Unset): + backstage_id (None | str | Unset): + cortex_id (None | str | Unset): + opslevel_id (None | str | Unset): + service_now_ci_sys_id (None | str | Unset): + alerts_email_enabled (bool | None | Unset): + fields (list[BulkUpsertTeamsEntitiesItemFieldsItem] | Unset): Catalog property values (merge semantics: only + mentioned fields written). + """ + + external_id: str + 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 + 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 + backstage_id: None | str | Unset = UNSET + cortex_id: None | str | Unset = UNSET + opslevel_id: None | str | Unset = UNSET + service_now_ci_sys_id: None | str | Unset = UNSET + alerts_email_enabled: bool | None | Unset = UNSET + fields: list[BulkUpsertTeamsEntitiesItemFieldsItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_teams_entities_item_fields_item import BulkUpsertTeamsEntitiesItemFieldsItem + + external_id = self.external_id + + name = self.name + + description: None | str | Unset + if isinstance(self.description, Unset): + description = UNSET + else: + description = self.description + + color: None | str | Unset + if isinstance(self.color, Unset): + color = UNSET + else: + color = self.color + + position: int | None | Unset + if isinstance(self.position, Unset): + position = UNSET + else: + position = self.position + + notify_emails: list[str] | None | Unset + if isinstance(self.notify_emails, Unset): + notify_emails = UNSET + elif isinstance(self.notify_emails, list): + notify_emails = self.notify_emails + + else: + notify_emails = self.notify_emails + + pagerduty_id: None | str | Unset + if isinstance(self.pagerduty_id, Unset): + pagerduty_id = UNSET + else: + pagerduty_id = self.pagerduty_id + + 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 | str | Unset + if isinstance(self.opsgenie_id, Unset): + opsgenie_id = UNSET + else: + opsgenie_id = self.opsgenie_id + + 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 | str | Unset + if isinstance(self.pagertree_id, Unset): + pagertree_id = UNSET + else: + pagertree_id = self.pagertree_id + + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + cortex_id: None | str | Unset + if isinstance(self.cortex_id, Unset): + cortex_id = UNSET + else: + cortex_id = self.cortex_id + + opslevel_id: None | str | Unset + if isinstance(self.opslevel_id, Unset): + opslevel_id = UNSET + else: + opslevel_id = self.opslevel_id + + 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 + + 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 + + fields: list[dict[str, Any]] | Unset = 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) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "external_id": external_id, + } + ) + if name is not UNSET: + field_dict["name"] = name + if description is not UNSET: + field_dict["description"] = description + if color is not UNSET: + field_dict["color"] = color + if position is not UNSET: + field_dict["position"] = position + if notify_emails is not UNSET: + field_dict["notify_emails"] = notify_emails + if pagerduty_id is not UNSET: + field_dict["pagerduty_id"] = pagerduty_id + if pagerduty_service_id is not UNSET: + field_dict["pagerduty_service_id"] = pagerduty_service_id + if opsgenie_id is not UNSET: + field_dict["opsgenie_id"] = opsgenie_id + if victor_ops_id is not UNSET: + field_dict["victor_ops_id"] = victor_ops_id + if pagertree_id is not UNSET: + field_dict["pagertree_id"] = pagertree_id + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if cortex_id is not UNSET: + field_dict["cortex_id"] = cortex_id + if opslevel_id is not UNSET: + field_dict["opslevel_id"] = opslevel_id + if service_now_ci_sys_id is not UNSET: + field_dict["service_now_ci_sys_id"] = service_now_ci_sys_id + if alerts_email_enabled is not UNSET: + field_dict["alerts_email_enabled"] = alerts_email_enabled + if fields is not UNSET: + field_dict["fields"] = fields + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_teams_entities_item_fields_item import BulkUpsertTeamsEntitiesItemFieldsItem + + d = dict(src_dict) + external_id = d.pop("external_id") + + 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_color(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + color = _parse_color(d.pop("color", 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)) + + def _parse_notify_emails(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() + notify_emails_type_0 = cast(list[str], data) + + return notify_emails_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + notify_emails = _parse_notify_emails(d.pop("notify_emails", UNSET)) + + def _parse_pagerduty_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return 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 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return 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 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return 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 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return 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 | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + pagertree_id = _parse_pagertree_id(d.pop("pagertree_id", UNSET)) + + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_cortex_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + cortex_id = _parse_cortex_id(d.pop("cortex_id", UNSET)) + + def _parse_opslevel_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + opslevel_id = _parse_opslevel_id(d.pop("opslevel_id", UNSET)) + + 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 | str | Unset, data) + + service_now_ci_sys_id = _parse_service_now_ci_sys_id(d.pop("service_now_ci_sys_id", UNSET)) + + def _parse_alerts_email_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + alerts_email_enabled = _parse_alerts_email_enabled(d.pop("alerts_email_enabled", UNSET)) + + _fields = d.pop("fields", UNSET) + fields: list[BulkUpsertTeamsEntitiesItemFieldsItem] | Unset = UNSET + if _fields is not UNSET: + fields = [] + for fields_item_data in _fields: + fields_item = BulkUpsertTeamsEntitiesItemFieldsItem.from_dict(fields_item_data) + + fields.append(fields_item) + + bulk_upsert_teams_entities_item = cls( + external_id=external_id, + name=name, + description=description, + color=color, + position=position, + notify_emails=notify_emails, + pagerduty_id=pagerduty_id, + pagerduty_service_id=pagerduty_service_id, + opsgenie_id=opsgenie_id, + victor_ops_id=victor_ops_id, + pagertree_id=pagertree_id, + backstage_id=backstage_id, + cortex_id=cortex_id, + opslevel_id=opslevel_id, + service_now_ci_sys_id=service_now_ci_sys_id, + alerts_email_enabled=alerts_email_enabled, + fields=fields, + ) + + bulk_upsert_teams_entities_item.additional_properties = d + return bulk_upsert_teams_entities_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/bulk_upsert_teams_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py new file mode 100644 index 00000000..95e2a785 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py @@ -0,0 +1,86 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="BulkUpsertTeamsEntitiesItemFieldsItem") + + +@_attrs_define +class BulkUpsertTeamsEntitiesItemFieldsItem: + """Each field entry must include either catalog_field_id or catalog_property_id. + + Attributes: + value (str): The value for this field + catalog_field_id (str | Unset): UUID, slug, or external_id of the catalog field (required if catalog_property_id + is absent) + catalog_property_id (str | Unset): Alias for catalog_field_id (required if catalog_field_id is absent) + """ + + value: str + catalog_field_id: str | Unset = UNSET + catalog_property_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + value = self.value + + catalog_field_id = self.catalog_field_id + + catalog_property_id = self.catalog_property_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "value": value, + } + ) + if catalog_field_id is not UNSET: + field_dict["catalog_field_id"] = catalog_field_id + 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) + value = d.pop("value") + + catalog_field_id = d.pop("catalog_field_id", UNSET) + + catalog_property_id = d.pop("catalog_property_id", UNSET) + + bulk_upsert_teams_entities_item_fields_item = cls( + value=value, + catalog_field_id=catalog_field_id, + catalog_property_id=catalog_property_id, + ) + + bulk_upsert_teams_entities_item_fields_item.additional_properties = d + return bulk_upsert_teams_entities_item_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/bulk_upsert_teams_error.py b/rootly_sdk/models/bulk_upsert_teams_error.py new file mode 100644 index 00000000..f6855672 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_error.py @@ -0,0 +1,81 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_teams_error_errors_item import BulkUpsertTeamsErrorErrorsItem + + +T = TypeVar("T", bound="BulkUpsertTeamsError") + + +@_attrs_define +class BulkUpsertTeamsError: + """ + Attributes: + errors (list[BulkUpsertTeamsErrorErrorsItem]): + """ + + errors: list[BulkUpsertTeamsErrorErrorsItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_teams_error_errors_item import BulkUpsertTeamsErrorErrorsItem + + errors = [] + for errors_item_data in self.errors: + errors_item = errors_item_data.to_dict() + errors.append(errors_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.bulk_upsert_teams_error_errors_item import BulkUpsertTeamsErrorErrorsItem + + d = dict(src_dict) + errors = [] + _errors = d.pop("errors") + for errors_item_data in _errors: + errors_item = BulkUpsertTeamsErrorErrorsItem.from_dict(errors_item_data) + + errors.append(errors_item) + + bulk_upsert_teams_error = cls( + errors=errors, + ) + + bulk_upsert_teams_error.additional_properties = d + return bulk_upsert_teams_error + + @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/bulk_upsert_teams_error_errors_item.py b/rootly_sdk/models/bulk_upsert_teams_error_errors_item.py new file mode 100644 index 00000000..eff080f1 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_error_errors_item.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="BulkUpsertTeamsErrorErrorsItem") + + +@_attrs_define +class BulkUpsertTeamsErrorErrorsItem: + """ + Attributes: + index (int): Position of the failed record in the batch + external_id (str): + errors (list[str]): + """ + + index: int + external_id: str + errors: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + index = self.index + + external_id = self.external_id + + errors = self.errors + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "index": index, + "external_id": external_id, + "errors": errors, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + index = d.pop("index") + + external_id = d.pop("external_id") + + errors = cast(list[str], d.pop("errors")) + + bulk_upsert_teams_error_errors_item = cls( + index=index, + external_id=external_id, + errors=errors, + ) + + bulk_upsert_teams_error_errors_item.additional_properties = d + return bulk_upsert_teams_error_errors_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/bulk_upsert_teams_response.py b/rootly_sdk/models/bulk_upsert_teams_response.py new file mode 100644 index 00000000..9db14eca --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_response.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.bulk_upsert_teams_response_data_item import BulkUpsertTeamsResponseDataItem + + +T = TypeVar("T", bound="BulkUpsertTeamsResponse") + + +@_attrs_define +class BulkUpsertTeamsResponse: + """ + Attributes: + data (list[BulkUpsertTeamsResponseDataItem] | Unset): + """ + + data: list[BulkUpsertTeamsResponseDataItem] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.bulk_upsert_teams_response_data_item import BulkUpsertTeamsResponseDataItem + + data: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.data, Unset): + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + 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.bulk_upsert_teams_response_data_item import BulkUpsertTeamsResponseDataItem + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: list[BulkUpsertTeamsResponseDataItem] | Unset = UNSET + if _data is not UNSET: + data = [] + for data_item_data in _data: + data_item = BulkUpsertTeamsResponseDataItem.from_dict(data_item_data) + + data.append(data_item) + + bulk_upsert_teams_response = cls( + data=data, + ) + + bulk_upsert_teams_response.additional_properties = d + return bulk_upsert_teams_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/bulk_upsert_teams_response_data_item.py b/rootly_sdk/models/bulk_upsert_teams_response_data_item.py new file mode 100644 index 00000000..ef17e781 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_response_data_item.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.bulk_upsert_teams_response_data_item_type import BulkUpsertTeamsResponseDataItemType +from ..models.bulk_upsert_teams_response_data_item_type import check_bulk_upsert_teams_response_data_item_type +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.team import Team + + +T = TypeVar("T", bound="BulkUpsertTeamsResponseDataItem") + + +@_attrs_define +class BulkUpsertTeamsResponseDataItem: + """ + Attributes: + id (str | Unset): + type_ (BulkUpsertTeamsResponseDataItemType | Unset): + attributes (Team | Unset): + """ + + id: str | Unset = UNSET + type_: BulkUpsertTeamsResponseDataItemType | Unset = UNSET + attributes: Team | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.team import Team + + 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.team import Team + + d = dict(src_dict) + id = d.pop("id", UNSET) + + _type_ = d.pop("type", UNSET) + type_: BulkUpsertTeamsResponseDataItemType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_bulk_upsert_teams_response_data_item_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: Team | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = Team.from_dict(_attributes) + + bulk_upsert_teams_response_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + bulk_upsert_teams_response_data_item.additional_properties = d + return bulk_upsert_teams_response_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/bulk_upsert_teams_response_data_item_type.py b/rootly_sdk/models/bulk_upsert_teams_response_data_item_type.py new file mode 100644 index 00000000..623914c5 --- /dev/null +++ b/rootly_sdk/models/bulk_upsert_teams_response_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +BulkUpsertTeamsResponseDataItemType = Literal["groups"] + +BULK_UPSERT_TEAMS_RESPONSE_DATA_ITEM_TYPE_VALUES: set[BulkUpsertTeamsResponseDataItemType] = { + "groups", +} + + +def check_bulk_upsert_teams_response_data_item_type(value: str | None) -> BulkUpsertTeamsResponseDataItemType | None: + if value is None: + return None + if value in BULK_UPSERT_TEAMS_RESPONSE_DATA_ITEM_TYPE_VALUES: + return cast(BulkUpsertTeamsResponseDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {BULK_UPSERT_TEAMS_RESPONSE_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/call_people_task_params.py b/rootly_sdk/models/call_people_task_params.py index c5cebec4..cb562c36 100644 --- a/rootly_sdk/models/call_people_task_params.py +++ b/rootly_sdk/models/call_people_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.call_people_task_params_task_type import ( - CallPeopleTaskParamsTaskType, - check_call_people_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.call_people_task_params_task_type import CallPeopleTaskParamsTaskType +from ..models.call_people_task_params_task_type import check_call_people_task_params_task_type +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CallPeopleTaskParams") diff --git a/rootly_sdk/models/cancel_incident.py b/rootly_sdk/models/cancel_incident.py index 4db0d2c6..c6d334f2 100644 --- a/rootly_sdk/models/cancel_incident.py +++ b/rootly_sdk/models/cancel_incident.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.cancel_incident_data import CancelIncidentData @@ -24,6 +28,8 @@ class CancelIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.cancel_incident_data import CancelIncidentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/cancel_incident_data.py b/rootly_sdk/models/cancel_incident_data.py index 7dd184bb..498e333e 100644 --- a/rootly_sdk/models/cancel_incident_data.py +++ b/rootly_sdk/models/cancel_incident_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.cancel_incident_data_type import CancelIncidentDataType, check_cancel_incident_data_type +from ..types import UNSET, Unset + +from ..models.cancel_incident_data_type import CancelIncidentDataType +from ..models.cancel_incident_data_type import check_cancel_incident_data_type +from typing import cast if TYPE_CHECKING: from ..models.cancel_incident_data_attributes import CancelIncidentDataAttributes @@ -28,6 +32,8 @@ class CancelIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.cancel_incident_data_attributes import CancelIncidentDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/cancel_incident_data_attributes.py b/rootly_sdk/models/cancel_incident_data_attributes.py index c3362192..b4ccac5b 100644 --- a/rootly_sdk/models/cancel_incident_data_attributes.py +++ b/rootly_sdk/models/cancel_incident_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CancelIncidentDataAttributes") diff --git a/rootly_sdk/models/catalog.py b/rootly_sdk/models/catalog.py index 8f3a5b3e..cbaec6ed 100644 --- a/rootly_sdk/models/catalog.py +++ b/rootly_sdk/models/catalog.py @@ -1,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_icon import CatalogIcon, check_catalog_icon from ..types import UNSET, Unset +from ..models.catalog_icon import CatalogIcon +from ..models.catalog_icon import check_catalog_icon +from ..models.catalog_managed_by import CatalogManagedBy +from ..models.catalog_managed_by import check_catalog_managed_by +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="Catalog") @@ -22,6 +29,8 @@ class Catalog: created_at (str): updated_at (str): description (None | str | Unset): + external_id (None | str | Unset): An external identifier for this catalog. Must be unique within the team. + managed_by (CatalogManagedBy | Unset): Which source manages this resource (read-only). """ name: str @@ -30,6 +39,8 @@ class Catalog: created_at: str updated_at: str description: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + managed_by: CatalogManagedBy | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,6 +61,16 @@ def to_dict(self) -> dict[str, Any]: else: description = self.description + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -63,6 +84,10 @@ def to_dict(self) -> dict[str, Any]: ) if description is not UNSET: field_dict["description"] = description + if external_id is not UNSET: + field_dict["external_id"] = external_id + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by return field_dict @@ -93,6 +118,22 @@ def _parse_description(data: object) -> None | str | Unset: description = _parse_description(d.pop("description", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + + _managed_by = d.pop("managed_by", UNSET) + managed_by: CatalogManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_catalog_managed_by(_managed_by) + catalog = cls( name=name, icon=icon, @@ -100,6 +141,8 @@ def _parse_description(data: object) -> None | str | Unset: created_at=created_at, updated_at=updated_at, description=description, + external_id=external_id, + managed_by=managed_by, ) catalog.additional_properties = d diff --git a/rootly_sdk/models/catalog_checklist_template.py b/rootly_sdk/models/catalog_checklist_template.py index db087dd2..7807c520 100644 --- a/rootly_sdk/models/catalog_checklist_template.py +++ b/rootly_sdk/models/catalog_checklist_template.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.catalog_checklist_template_catalog_type import CatalogChecklistTemplateCatalogType +from ..models.catalog_checklist_template_catalog_type import check_catalog_checklist_template_catalog_type +from ..models.catalog_checklist_template_scope_type import CatalogChecklistTemplateScopeType +from ..models.catalog_checklist_template_scope_type import check_catalog_checklist_template_scope_type +from ..types import UNSET, Unset +from typing import cast + 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 @@ -53,6 +52,9 @@ class CatalogChecklistTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_checklist_template_owners_type_0_item import CatalogChecklistTemplateOwnersType0Item + from ..models.catalog_checklist_template_fields_type_0_item import CatalogChecklistTemplateFieldsType0Item + name = self.name catalog_type: str = self.catalog_type 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 index c2eaf173..b3db1cbc 100644 --- a/rootly_sdk/models/catalog_checklist_template_fields_type_0_item.py +++ b/rootly_sdk/models/catalog_checklist_template_fields_type_0_item.py @@ -1,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.catalog_checklist_template_fields_type_0_item_field_source import ( CatalogChecklistTemplateFieldsType0ItemFieldSource, +) +from ..models.catalog_checklist_template_fields_type_0_item_field_source import ( check_catalog_checklist_template_fields_type_0_item_field_source, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="CatalogChecklistTemplateFieldsType0Item") diff --git a/rootly_sdk/models/catalog_checklist_template_list.py b/rootly_sdk/models/catalog_checklist_template_list.py index bcce7076..3c589c9e 100644 --- a/rootly_sdk/models/catalog_checklist_template_list.py +++ b/rootly_sdk/models/catalog_checklist_template_list.py @@ -1,15 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_checklist_template_list_data_item import CatalogChecklistTemplateListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +28,21 @@ class CatalogChecklistTemplateList: data (list[CatalogChecklistTemplateListDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogChecklistTemplateListDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.catalog_checklist_template_list_data_item import CatalogChecklistTemplateListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +56,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +74,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included 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.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +108,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_checklist_template_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_checklist_template_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_checklist_template_list_data_item.py b/rootly_sdk/models/catalog_checklist_template_list_data_item.py index 005c894f..07fb8931 100644 --- a/rootly_sdk/models/catalog_checklist_template_list_data_item.py +++ b/rootly_sdk/models/catalog_checklist_template_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.catalog_checklist_template_list_data_item_type import CatalogChecklistTemplateListDataItemType +from ..models.catalog_checklist_template_list_data_item_type import check_catalog_checklist_template_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_checklist_template import CatalogChecklistTemplate @@ -33,6 +34,8 @@ class CatalogChecklistTemplateListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_checklist_template import CatalogChecklistTemplate + id = self.id type_: str = self.type_ 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 index 23e30f42..4aca50b1 100644 --- a/rootly_sdk/models/catalog_checklist_template_owners_type_0_item.py +++ b/rootly_sdk/models/catalog_checklist_template_owners_type_0_item.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.catalog_checklist_template_owners_type_0_item_type import CatalogChecklistTemplateOwnersType0ItemType 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 +from typing import cast + T = TypeVar("T", bound="CatalogChecklistTemplateOwnersType0Item") diff --git a/rootly_sdk/models/catalog_checklist_template_response.py b/rootly_sdk/models/catalog_checklist_template_response.py index e1fe20bf..5abbfce9 100644 --- a/rootly_sdk/models/catalog_checklist_template_response.py +++ b/rootly_sdk/models/catalog_checklist_template_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_checklist_template_response_data import CatalogChecklistTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogChecklistTemplateResponse") @@ -18,14 +24,26 @@ class CatalogChecklistTemplateResponse: """ Attributes: data (CatalogChecklistTemplateResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogChecklistTemplateResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_checklist_template_response_data import CatalogChecklistTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included 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 + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogChecklistTemplateResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_checklist_template_response = cls( data=data, + included=included, ) catalog_checklist_template_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_checklist_template_response_data.py b/rootly_sdk/models/catalog_checklist_template_response_data.py index d58e7592..10f0aee4 100644 --- a/rootly_sdk/models/catalog_checklist_template_response_data.py +++ b/rootly_sdk/models/catalog_checklist_template_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.catalog_checklist_template_response_data_type import CatalogChecklistTemplateResponseDataType +from ..models.catalog_checklist_template_response_data_type import check_catalog_checklist_template_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_checklist_template import CatalogChecklistTemplate @@ -33,6 +34,8 @@ class CatalogChecklistTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_checklist_template import CatalogChecklistTemplate + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity.py b/rootly_sdk/models/catalog_entity.py index e984d737..44e39d99 100644 --- a/rootly_sdk/models/catalog_entity.py +++ b/rootly_sdk/models/catalog_entity.py @@ -1,13 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.catalog_entity_managed_by import CatalogEntityManagedBy +from ..models.catalog_entity_managed_by import check_catalog_entity_managed_by +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_properties_item import CatalogEntityPropertiesItem @@ -24,6 +29,10 @@ class CatalogEntity: created_at (str): updated_at (str): description (None | str | Unset): + backstage_id (None | str | Unset): The Backstage entity ID this catalog entity is linked to. + external_id (None | str | Unset): An external identifier for this catalog entity. Must be unique within the + catalog. + managed_by (CatalogEntityManagedBy | Unset): Which source manages this resource (read-only). properties (list[CatalogEntityPropertiesItem] | Unset): Array of property values for this catalog entity """ @@ -32,10 +41,15 @@ class CatalogEntity: created_at: str updated_at: str description: None | str | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET + managed_by: CatalogEntityManagedBy | 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]: + from ..models.catalog_entity_properties_item import CatalogEntityPropertiesItem + name = self.name position: int | None @@ -51,6 +65,22 @@ def to_dict(self) -> dict[str, Any]: else: description = self.description + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -70,6 +100,12 @@ def to_dict(self) -> dict[str, Any]: ) if description is not UNSET: field_dict["description"] = description + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if external_id is not UNSET: + field_dict["external_id"] = external_id + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by if properties is not UNSET: field_dict["properties"] = properties @@ -102,6 +138,31 @@ def _parse_description(data: object) -> None | str | Unset: description = _parse_description(d.pop("description", UNSET)) + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + + _managed_by = d.pop("managed_by", UNSET) + managed_by: CatalogEntityManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_catalog_entity_managed_by(_managed_by) + _properties = d.pop("properties", UNSET) properties: list[CatalogEntityPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -117,6 +178,9 @@ def _parse_description(data: object) -> None | str | Unset: created_at=created_at, updated_at=updated_at, description=description, + backstage_id=backstage_id, + external_id=external_id, + managed_by=managed_by, properties=properties, ) diff --git a/rootly_sdk/models/catalog_entity_checklist.py b/rootly_sdk/models/catalog_entity_checklist.py index e8d7db76..73db8a17 100644 --- a/rootly_sdk/models/catalog_entity_checklist.py +++ b/rootly_sdk/models/catalog_entity_checklist.py @@ -1,18 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.catalog_entity_checklist_auditable_type import CatalogEntityChecklistAuditableType +from ..models.catalog_entity_checklist_auditable_type import check_catalog_entity_checklist_auditable_type +from ..models.catalog_entity_checklist_status import CatalogEntityChecklistStatus +from ..models.catalog_entity_checklist_status import check_catalog_entity_checklist_status +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_fields_type_0_item import ( CatalogEntityChecklistChecklistFieldsType0Item, @@ -56,6 +58,13 @@ class CatalogEntityChecklist: 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 import ( + CatalogEntityChecklistChecklistFieldsType0Item, + ) + from ..models.catalog_entity_checklist_checklist_owners_type_0_item import ( + CatalogEntityChecklistChecklistOwnersType0Item, + ) + catalog_checklist_template_id = self.catalog_checklist_template_id auditable_type: str = self.auditable_type 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 index 760de6b0..7dfe9858 100644 --- 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 @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data import ( CatalogEntityChecklistChecklistFieldsType0ItemData, @@ -28,6 +31,10 @@ class CatalogEntityChecklistChecklistFieldsType0Item: 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 import ( + CatalogEntityChecklistChecklistFieldsType0ItemData, + ) + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() 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 index 99be75a9..efb1008c 100644 --- 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 @@ -1,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_type import ( CatalogEntityChecklistChecklistFieldsType0ItemDataType, +) +from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_type import ( check_catalog_entity_checklist_checklist_fields_type_0_item_data_type, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_attributes import ( @@ -36,6 +41,10 @@ class CatalogEntityChecklistChecklistFieldsType0ItemData: 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 import ( + CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes, + ) + id = self.id type_: str | Unset = UNSET 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 index 21f60c2e..47e7427f 100644 --- 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 @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0 import ( CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0, 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 index c0b25867..d424e933 100644 --- 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 @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0") 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 index cfcef9a1..e1b915b4 100644 --- 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 @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data import ( CatalogEntityChecklistChecklistOwnersType0ItemData, @@ -28,6 +31,10 @@ class CatalogEntityChecklistChecklistOwnersType0Item: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data import ( + CatalogEntityChecklistChecklistOwnersType0ItemData, + ) + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() 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 index e873ed7a..dcfd7d6b 100644 --- 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 @@ -1,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_type import ( CatalogEntityChecklistChecklistOwnersType0ItemDataType, +) +from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_type import ( check_catalog_entity_checklist_checklist_owners_type_0_item_data_type, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_attributes import ( @@ -36,6 +41,10 @@ class CatalogEntityChecklistChecklistOwnersType0ItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_attributes import ( + CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes, + ) + id = self.id type_: str | Unset = UNSET 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 index 923596d6..664c992b 100644 --- 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 @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes") diff --git a/rootly_sdk/models/catalog_entity_checklist_list.py b/rootly_sdk/models/catalog_entity_checklist_list.py index f7e46d19..f171edcc 100644 --- a/rootly_sdk/models/catalog_entity_checklist_list.py +++ b/rootly_sdk/models/catalog_entity_checklist_list.py @@ -1,15 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_checklist_list_data_item import CatalogEntityChecklistListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +28,21 @@ class CatalogEntityChecklistList: data (list[CatalogEntityChecklistListDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogEntityChecklistListDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | 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_list_data_item import CatalogEntityChecklistListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +56,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +74,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included 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.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +108,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_checklist_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_entity_checklist_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_checklist_list_data_item.py b/rootly_sdk/models/catalog_entity_checklist_list_data_item.py index 5ce9263e..3f2ddeb4 100644 --- a/rootly_sdk/models/catalog_entity_checklist_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_checklist_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.catalog_entity_checklist_list_data_item_type import CatalogEntityChecklistListDataItemType +from ..models.catalog_entity_checklist_list_data_item_type import check_catalog_entity_checklist_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_entity_checklist import CatalogEntityChecklist @@ -33,6 +34,8 @@ class CatalogEntityChecklistListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity_checklist import CatalogEntityChecklist + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_checklist_response.py b/rootly_sdk/models/catalog_entity_checklist_response.py index 88e502b5..6554f44f 100644 --- a/rootly_sdk/models/catalog_entity_checklist_response.py +++ b/rootly_sdk/models/catalog_entity_checklist_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_checklist_response_data import CatalogEntityChecklistResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogEntityChecklistResponse") @@ -18,14 +24,26 @@ class CatalogEntityChecklistResponse: """ Attributes: data (CatalogEntityChecklistResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogEntityChecklistResponseData + included: list[JsonapiIncludedResource] | 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_response_data import CatalogEntityChecklistResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included 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 + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogEntityChecklistResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_checklist_response = cls( data=data, + included=included, ) catalog_entity_checklist_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_checklist_response_data.py b/rootly_sdk/models/catalog_entity_checklist_response_data.py index 8406b9e3..c818be36 100644 --- a/rootly_sdk/models/catalog_entity_checklist_response_data.py +++ b/rootly_sdk/models/catalog_entity_checklist_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.catalog_entity_checklist_response_data_type import CatalogEntityChecklistResponseDataType +from ..models.catalog_entity_checklist_response_data_type import check_catalog_entity_checklist_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_entity_checklist import CatalogEntityChecklist @@ -33,6 +34,8 @@ class CatalogEntityChecklistResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity_checklist import CatalogEntityChecklist + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_list.py b/rootly_sdk/models/catalog_entity_list.py index 4beee503..15f39dfe 100644 --- a/rootly_sdk/models/catalog_entity_list.py +++ b/rootly_sdk/models/catalog_entity_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_list_data_item import CatalogEntityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class CatalogEntityList: data (list[CatalogEntityListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogEntityListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.catalog_entity_list_data_item import CatalogEntityListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_list_data_item import CatalogEntityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_entity_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_list_data_item.py b/rootly_sdk/models/catalog_entity_list_data_item.py index 5a17fc87..e2ee709e 100644 --- a/rootly_sdk/models/catalog_entity_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_entity_list_data_item_type import ( - CatalogEntityListDataItemType, - check_catalog_entity_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.catalog_entity_list_data_item_type import CatalogEntityListDataItemType +from ..models.catalog_entity_list_data_item_type import check_catalog_entity_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_entity import CatalogEntity @@ -33,6 +34,8 @@ class CatalogEntityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity import CatalogEntity + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_managed_by.py b/rootly_sdk/models/catalog_entity_managed_by.py new file mode 100644 index 00000000..344958e6 --- /dev/null +++ b/rootly_sdk/models/catalog_entity_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogEntityManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +CATALOG_ENTITY_MANAGED_BY_VALUES: set[CatalogEntityManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_catalog_entity_managed_by(value: str | None) -> CatalogEntityManagedBy | None: + if value is None: + return None + if value in CATALOG_ENTITY_MANAGED_BY_VALUES: + return cast(CatalogEntityManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_ENTITY_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/catalog_entity_properties_item.py b/rootly_sdk/models/catalog_entity_properties_item.py index a96d631a..6b618914 100644 --- a/rootly_sdk/models/catalog_entity_properties_item.py +++ b/rootly_sdk/models/catalog_entity_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CatalogEntityPropertiesItem") diff --git a/rootly_sdk/models/catalog_entity_property.py b/rootly_sdk/models/catalog_entity_property.py index 36c57257..a5299a0b 100644 --- a/rootly_sdk/models/catalog_entity_property.py +++ b/rootly_sdk/models/catalog_entity_property.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_entity_property_key import CatalogEntityPropertyKey, check_catalog_entity_property_key +from ..types import UNSET, Unset + +from ..models.catalog_entity_property_key import CatalogEntityPropertyKey +from ..models.catalog_entity_property_key import check_catalog_entity_property_key +from typing import cast + T = TypeVar("T", bound="CatalogEntityProperty") diff --git a/rootly_sdk/models/catalog_entity_property_list.py b/rootly_sdk/models/catalog_entity_property_list.py index 935a2814..cabb6472 100644 --- a/rootly_sdk/models/catalog_entity_property_list.py +++ b/rootly_sdk/models/catalog_entity_property_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_property_list_data_item import CatalogEntityPropertyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +30,21 @@ class CatalogEntityPropertyList: data (list[CatalogEntityPropertyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogEntityPropertyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.catalog_entity_property_list_data_item import CatalogEntityPropertyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -41,6 +54,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -50,12 +70,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_property_list_data_item import CatalogEntityPropertyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -71,10 +94,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_property_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_entity_property_list.additional_properties = d 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 283fee04..f04dcfdc 100644 --- a/rootly_sdk/models/catalog_entity_property_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_property_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_entity_property_list_data_item_type import ( - CatalogEntityPropertyListDataItemType, - check_catalog_entity_property_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.catalog_entity_property_list_data_item_type import CatalogEntityPropertyListDataItemType +from ..models.catalog_entity_property_list_data_item_type import check_catalog_entity_property_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_entity_property import CatalogEntityProperty @@ -35,6 +36,8 @@ class CatalogEntityPropertyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity_property import CatalogEntityProperty + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_property_response.py b/rootly_sdk/models/catalog_entity_property_response.py index 8d7907af..f621fe7b 100644 --- a/rootly_sdk/models/catalog_entity_property_response.py +++ b/rootly_sdk/models/catalog_entity_property_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_property_response_data import CatalogEntityPropertyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogEntityPropertyResponse") @@ -20,14 +26,26 @@ class CatalogEntityPropertyResponse: Attributes: data (CatalogEntityPropertyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogEntityPropertyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity_property_response_data import CatalogEntityPropertyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -35,18 +53,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_property_response_data import CatalogEntityPropertyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogEntityPropertyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_property_response = cls( data=data, + included=included, ) catalog_entity_property_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_property_response_data.py b/rootly_sdk/models/catalog_entity_property_response_data.py index 197549c8..b6f8b345 100644 --- a/rootly_sdk/models/catalog_entity_property_response_data.py +++ b/rootly_sdk/models/catalog_entity_property_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_entity_property_response_data_type import ( - CatalogEntityPropertyResponseDataType, - check_catalog_entity_property_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.catalog_entity_property_response_data_type import CatalogEntityPropertyResponseDataType +from ..models.catalog_entity_property_response_data_type import check_catalog_entity_property_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_entity_property import CatalogEntityProperty @@ -35,6 +36,8 @@ class CatalogEntityPropertyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity_property import CatalogEntityProperty + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_entity_response.py b/rootly_sdk/models/catalog_entity_response.py index bf8fcf59..272afa80 100644 --- a/rootly_sdk/models/catalog_entity_response.py +++ b/rootly_sdk/models/catalog_entity_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_entity_response_data import CatalogEntityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogEntityResponse") @@ -18,14 +24,26 @@ class CatalogEntityResponse: """ Attributes: data (CatalogEntityResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogEntityResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity_response_data import CatalogEntityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_entity_response_data import CatalogEntityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogEntityResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_entity_response = cls( data=data, + included=included, ) catalog_entity_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_entity_response_data.py b/rootly_sdk/models/catalog_entity_response_data.py index d68be342..ff6a5e5c 100644 --- a/rootly_sdk/models/catalog_entity_response_data.py +++ b/rootly_sdk/models/catalog_entity_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_entity_response_data_type import ( - CatalogEntityResponseDataType, - check_catalog_entity_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.catalog_entity_response_data_type import CatalogEntityResponseDataType +from ..models.catalog_entity_response_data_type import check_catalog_entity_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_entity import CatalogEntity @@ -33,6 +34,8 @@ class CatalogEntityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_entity import CatalogEntity + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_field.py b/rootly_sdk/models/catalog_field.py index 914f85eb..dc4c0c86 100644 --- a/rootly_sdk/models/catalog_field.py +++ b/rootly_sdk/models/catalog_field.py @@ -1,15 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_field_catalog_type import CatalogFieldCatalogType, check_catalog_field_catalog_type -from ..models.catalog_field_kind import CatalogFieldKind, check_catalog_field_kind from ..types import UNSET, Unset +from ..models.catalog_field_catalog_type import CatalogFieldCatalogType +from ..models.catalog_field_catalog_type import check_catalog_field_catalog_type +from ..models.catalog_field_kind import CatalogFieldKind +from ..models.catalog_field_kind import check_catalog_field_kind +from ..models.catalog_field_managed_by import CatalogFieldManagedBy +from ..models.catalog_field_managed_by import check_catalog_field_managed_by +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CatalogField") @@ -28,6 +36,9 @@ class CatalogField: 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. + external_id (None | str | Unset): An external identifier for this catalog field. Must be unique within the + scope. + managed_by (CatalogFieldManagedBy | Unset): Which source manages this resource (read-only). """ catalog_id: None | str @@ -41,6 +52,8 @@ class CatalogField: kind_catalog_id: None | str | Unset = UNSET required: bool | Unset = UNSET catalog_type: CatalogFieldCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET + managed_by: CatalogFieldManagedBy | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -74,6 +87,16 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -95,6 +118,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by return field_dict @@ -146,6 +173,22 @@ def _parse_kind_catalog_id(data: object) -> None | str | Unset: else: catalog_type = check_catalog_field_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + + _managed_by = d.pop("managed_by", UNSET) + managed_by: CatalogFieldManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_catalog_field_managed_by(_managed_by) + catalog_field = cls( catalog_id=catalog_id, name=name, @@ -158,6 +201,8 @@ def _parse_kind_catalog_id(data: object) -> None | str | Unset: kind_catalog_id=kind_catalog_id, required=required, catalog_type=catalog_type, + external_id=external_id, + managed_by=managed_by, ) catalog_field.additional_properties = d diff --git a/rootly_sdk/models/catalog_field_list.py b/rootly_sdk/models/catalog_field_list.py index 10bfa106..e5811f08 100644 --- a/rootly_sdk/models/catalog_field_list.py +++ b/rootly_sdk/models/catalog_field_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_field_list_data_item import CatalogFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class CatalogFieldList: data (list[CatalogFieldListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogFieldListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.catalog_field_list_data_item import CatalogFieldListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_field_list_data_item import CatalogFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_field_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_field_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_field_list_data_item.py b/rootly_sdk/models/catalog_field_list_data_item.py index b5ed471d..88e753fa 100644 --- a/rootly_sdk/models/catalog_field_list_data_item.py +++ b/rootly_sdk/models/catalog_field_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_field_list_data_item_type import ( - CatalogFieldListDataItemType, - check_catalog_field_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.catalog_field_list_data_item_type import CatalogFieldListDataItemType +from ..models.catalog_field_list_data_item_type import check_catalog_field_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_field import CatalogField @@ -33,6 +34,8 @@ class CatalogFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_field import CatalogField + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_field_managed_by.py b/rootly_sdk/models/catalog_field_managed_by.py new file mode 100644 index 00000000..0764812c --- /dev/null +++ b/rootly_sdk/models/catalog_field_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogFieldManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +CATALOG_FIELD_MANAGED_BY_VALUES: set[CatalogFieldManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_catalog_field_managed_by(value: str | None) -> CatalogFieldManagedBy | None: + if value is None: + return None + if value in CATALOG_FIELD_MANAGED_BY_VALUES: + return cast(CatalogFieldManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_FIELD_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/catalog_field_response.py b/rootly_sdk/models/catalog_field_response.py index a4811f5a..76620f22 100644 --- a/rootly_sdk/models/catalog_field_response.py +++ b/rootly_sdk/models/catalog_field_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_field_response_data import CatalogFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogFieldResponse") @@ -18,14 +24,26 @@ class CatalogFieldResponse: """ Attributes: data (CatalogFieldResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogFieldResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.catalog_field_response_data import CatalogFieldResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_field_response_data import CatalogFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogFieldResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_field_response = cls( data=data, + included=included, ) catalog_field_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_field_response_data.py b/rootly_sdk/models/catalog_field_response_data.py index fcec088c..27210b9c 100644 --- a/rootly_sdk/models/catalog_field_response_data.py +++ b/rootly_sdk/models/catalog_field_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_field_response_data_type import ( - CatalogFieldResponseDataType, - check_catalog_field_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.catalog_field_response_data_type import CatalogFieldResponseDataType +from ..models.catalog_field_response_data_type import check_catalog_field_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_field import CatalogField @@ -33,6 +34,8 @@ class CatalogFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_field import CatalogField + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_list.py b/rootly_sdk/models/catalog_list.py index 9abab448..92c9f070 100644 --- a/rootly_sdk/models/catalog_list.py +++ b/rootly_sdk/models/catalog_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_list_data_item import CatalogListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class CatalogList: data (list[CatalogListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_list_data_item import CatalogListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_list_data_item import CatalogListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_list_data_item.py b/rootly_sdk/models/catalog_list_data_item.py index 64ef65d2..5cc606f3 100644 --- a/rootly_sdk/models/catalog_list_data_item.py +++ b/rootly_sdk/models/catalog_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_list_data_item_type import CatalogListDataItemType, check_catalog_list_data_item_type +from ..types import UNSET, Unset + +from ..models.catalog_list_data_item_type import CatalogListDataItemType +from ..models.catalog_list_data_item_type import check_catalog_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.catalog import Catalog @@ -30,6 +34,8 @@ class CatalogListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog import Catalog + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_managed_by.py b/rootly_sdk/models/catalog_managed_by.py new file mode 100644 index 00000000..00bcf025 --- /dev/null +++ b/rootly_sdk/models/catalog_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +CATALOG_MANAGED_BY_VALUES: set[CatalogManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_catalog_managed_by(value: str | None) -> CatalogManagedBy | None: + if value is None: + return None + if value in CATALOG_MANAGED_BY_VALUES: + return cast(CatalogManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/catalog_property.py b/rootly_sdk/models/catalog_property.py index 9d363915..86dceeb0 100644 --- a/rootly_sdk/models/catalog_property.py +++ b/rootly_sdk/models/catalog_property.py @@ -1,15 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.catalog_property_catalog_type import CatalogPropertyCatalogType +from ..models.catalog_property_catalog_type import check_catalog_property_catalog_type +from ..models.catalog_property_kind import CatalogPropertyKind +from ..models.catalog_property_kind import check_catalog_property_kind +from ..models.catalog_property_managed_by import CatalogPropertyManagedBy +from ..models.catalog_property_managed_by import check_catalog_property_managed_by +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CatalogProperty") @@ -28,6 +36,9 @@ class CatalogProperty: 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. + external_id (None | str | Unset): An external identifier for this catalog property. Must be unique within the + scope. + managed_by (CatalogPropertyManagedBy | Unset): Which source manages this resource (read-only). """ catalog_id: None | str @@ -41,6 +52,8 @@ class CatalogProperty: kind_catalog_id: None | str | Unset = UNSET required: bool | Unset = UNSET catalog_type: CatalogPropertyCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET + managed_by: CatalogPropertyManagedBy | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -74,6 +87,16 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -95,6 +118,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by return field_dict @@ -146,6 +173,22 @@ def _parse_kind_catalog_id(data: object) -> None | str | Unset: else: catalog_type = check_catalog_property_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + + _managed_by = d.pop("managed_by", UNSET) + managed_by: CatalogPropertyManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_catalog_property_managed_by(_managed_by) + catalog_property = cls( catalog_id=catalog_id, name=name, @@ -158,6 +201,8 @@ def _parse_kind_catalog_id(data: object) -> None | str | Unset: kind_catalog_id=kind_catalog_id, required=required, catalog_type=catalog_type, + external_id=external_id, + managed_by=managed_by, ) catalog_property.additional_properties = d diff --git a/rootly_sdk/models/catalog_property_list.py b/rootly_sdk/models/catalog_property_list.py index 20ba1204..468e1ac9 100644 --- a/rootly_sdk/models/catalog_property_list.py +++ b/rootly_sdk/models/catalog_property_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_property_list_data_item import CatalogPropertyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class CatalogPropertyList: data (list[CatalogPropertyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CatalogPropertyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.catalog_property_list_data_item import CatalogPropertyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included 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.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_property_list = cls( data=data, links=links, meta=meta, + included=included, ) catalog_property_list.additional_properties = d diff --git a/rootly_sdk/models/catalog_property_list_data_item.py b/rootly_sdk/models/catalog_property_list_data_item.py index 992dea68..e6158d1b 100644 --- a/rootly_sdk/models/catalog_property_list_data_item.py +++ b/rootly_sdk/models/catalog_property_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.catalog_property_list_data_item_type import CatalogPropertyListDataItemType +from ..models.catalog_property_list_data_item_type import check_catalog_property_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_property import CatalogProperty @@ -33,6 +34,8 @@ class CatalogPropertyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_property import CatalogProperty + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_property_managed_by.py b/rootly_sdk/models/catalog_property_managed_by.py new file mode 100644 index 00000000..d7f860e8 --- /dev/null +++ b/rootly_sdk/models/catalog_property_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +CatalogPropertyManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +CATALOG_PROPERTY_MANAGED_BY_VALUES: set[CatalogPropertyManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_catalog_property_managed_by(value: str | None) -> CatalogPropertyManagedBy | None: + if value is None: + return None + if value in CATALOG_PROPERTY_MANAGED_BY_VALUES: + return cast(CatalogPropertyManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {CATALOG_PROPERTY_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/catalog_property_response.py b/rootly_sdk/models/catalog_property_response.py index c23b9039..0852a2fe 100644 --- a/rootly_sdk/models/catalog_property_response.py +++ b/rootly_sdk/models/catalog_property_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_property_response_data import CatalogPropertyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogPropertyResponse") @@ -18,14 +24,26 @@ class CatalogPropertyResponse: """ Attributes: data (CatalogPropertyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogPropertyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.catalog_property_response_data import CatalogPropertyResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_property_response_data import CatalogPropertyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogPropertyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_property_response = cls( data=data, + included=included, ) catalog_property_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_property_response_data.py b/rootly_sdk/models/catalog_property_response_data.py index a5922b8d..60b14e8d 100644 --- a/rootly_sdk/models/catalog_property_response_data.py +++ b/rootly_sdk/models/catalog_property_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.catalog_property_response_data_type import CatalogPropertyResponseDataType +from ..models.catalog_property_response_data_type import check_catalog_property_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.catalog_property import CatalogProperty @@ -33,6 +34,8 @@ class CatalogPropertyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_property import CatalogProperty + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/catalog_response.py b/rootly_sdk/models/catalog_response.py index 9e034c2d..29817c70 100644 --- a/rootly_sdk/models/catalog_response.py +++ b/rootly_sdk/models/catalog_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.catalog_response_data import CatalogResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CatalogResponse") @@ -18,14 +24,26 @@ class CatalogResponse: """ Attributes: data (CatalogResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CatalogResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog_response_data import CatalogResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.catalog_response_data import CatalogResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CatalogResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + catalog_response = cls( data=data, + included=included, ) catalog_response.additional_properties = d diff --git a/rootly_sdk/models/catalog_response_data.py b/rootly_sdk/models/catalog_response_data.py index d4be5b4b..b46e16d8 100644 --- a/rootly_sdk/models/catalog_response_data.py +++ b/rootly_sdk/models/catalog_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.catalog_response_data_type import CatalogResponseDataType, check_catalog_response_data_type +from ..types import UNSET, Unset + +from ..models.catalog_response_data_type import CatalogResponseDataType +from ..models.catalog_response_data_type import check_catalog_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.catalog import Catalog @@ -30,6 +34,8 @@ class CatalogResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.catalog import Catalog + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/cause.py b/rootly_sdk/models/cause.py index cdb7a08c..55ccc96d 100644 --- a/rootly_sdk/models/cause.py +++ b/rootly_sdk/models/cause.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.cause_properties_item import CausePropertiesItem @@ -38,6 +41,8 @@ class Cause: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.cause_properties_item import CausePropertiesItem + name = self.name created_at = self.created_at diff --git a/rootly_sdk/models/cause_list.py b/rootly_sdk/models/cause_list.py index e408bb35..7477662c 100644 --- a/rootly_sdk/models/cause_list.py +++ b/rootly_sdk/models/cause_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.cause_list_data_item import CauseListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class CauseList: data (list[CauseListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CauseListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.cause_list_data_item import CauseListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.cause_list_data_item import CauseListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + cause_list = cls( data=data, links=links, meta=meta, + included=included, ) cause_list.additional_properties = d diff --git a/rootly_sdk/models/cause_list_data_item.py b/rootly_sdk/models/cause_list_data_item.py index 56624359..0e4e4286 100644 --- a/rootly_sdk/models/cause_list_data_item.py +++ b/rootly_sdk/models/cause_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.cause_list_data_item_type import CauseListDataItemType, check_cause_list_data_item_type +from ..types import UNSET, Unset + +from ..models.cause_list_data_item_type import CauseListDataItemType +from ..models.cause_list_data_item_type import check_cause_list_data_item_type +from typing import cast if TYPE_CHECKING: from ..models.cause import Cause @@ -30,6 +34,8 @@ class CauseListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.cause import Cause + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/cause_properties_item.py b/rootly_sdk/models/cause_properties_item.py index ada1e890..7a61cc81 100644 --- a/rootly_sdk/models/cause_properties_item.py +++ b/rootly_sdk/models/cause_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CausePropertiesItem") diff --git a/rootly_sdk/models/cause_response.py b/rootly_sdk/models/cause_response.py index 88e8eda4..972ae855 100644 --- a/rootly_sdk/models/cause_response.py +++ b/rootly_sdk/models/cause_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.cause_response_data import CauseResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CauseResponse") @@ -18,14 +24,26 @@ class CauseResponse: """ Attributes: data (CauseResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CauseResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.cause_response_data import CauseResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.cause_response_data import CauseResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CauseResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + cause_response = cls( data=data, + included=included, ) cause_response.additional_properties = d diff --git a/rootly_sdk/models/cause_response_data.py b/rootly_sdk/models/cause_response_data.py index 6249d136..4bb34cba 100644 --- a/rootly_sdk/models/cause_response_data.py +++ b/rootly_sdk/models/cause_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.cause_response_data_type import CauseResponseDataType, check_cause_response_data_type +from ..types import UNSET, Unset + +from ..models.cause_response_data_type import CauseResponseDataType +from ..models.cause_response_data_type import check_cause_response_data_type +from typing import cast if TYPE_CHECKING: from ..models.cause import Cause @@ -30,6 +34,8 @@ class CauseResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.cause import Cause + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/change_google_chat_space_privacy_task_params.py b/rootly_sdk/models/change_google_chat_space_privacy_task_params.py new file mode 100644 index 00000000..371ac9c6 --- /dev/null +++ b/rootly_sdk/models/change_google_chat_space_privacy_task_params.py @@ -0,0 +1,121 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.change_google_chat_space_privacy_task_params_task_type import ( + ChangeGoogleChatSpacePrivacyTaskParamsTaskType, +) +from ..models.change_google_chat_space_privacy_task_params_task_type import ( + check_change_google_chat_space_privacy_task_params_task_type, +) +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.change_google_chat_space_privacy_task_params_space import ChangeGoogleChatSpacePrivacyTaskParamsSpace + + +T = TypeVar("T", bound="ChangeGoogleChatSpacePrivacyTaskParams") + + +@_attrs_define +class ChangeGoogleChatSpacePrivacyTaskParams: + """ + Attributes: + space (ChangeGoogleChatSpacePrivacyTaskParamsSpace): + task_type (ChangeGoogleChatSpacePrivacyTaskParamsTaskType | Unset): + audience (None | str | Unset): Target audience resource name (e.g. audiences/default). Leave blank to make + private. + """ + + space: ChangeGoogleChatSpacePrivacyTaskParamsSpace + task_type: ChangeGoogleChatSpacePrivacyTaskParamsTaskType | Unset = UNSET + audience: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.change_google_chat_space_privacy_task_params_space import ( + ChangeGoogleChatSpacePrivacyTaskParamsSpace, + ) + + space = self.space.to_dict() + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + audience: None | str | Unset + if isinstance(self.audience, Unset): + audience = UNSET + else: + audience = self.audience + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "space": space, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if audience is not UNSET: + field_dict["audience"] = audience + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.change_google_chat_space_privacy_task_params_space import ( + ChangeGoogleChatSpacePrivacyTaskParamsSpace, + ) + + d = dict(src_dict) + space = ChangeGoogleChatSpacePrivacyTaskParamsSpace.from_dict(d.pop("space")) + + _task_type = d.pop("task_type", UNSET) + task_type: ChangeGoogleChatSpacePrivacyTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_change_google_chat_space_privacy_task_params_task_type(_task_type) + + def _parse_audience(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + audience = _parse_audience(d.pop("audience", UNSET)) + + change_google_chat_space_privacy_task_params = cls( + space=space, + task_type=task_type, + audience=audience, + ) + + change_google_chat_space_privacy_task_params.additional_properties = d + return change_google_chat_space_privacy_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/change_google_chat_space_privacy_task_params_space.py b/rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py new file mode 100644 index 00000000..b57994d4 --- /dev/null +++ b/rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="ChangeGoogleChatSpacePrivacyTaskParamsSpace") + + +@_attrs_define +class ChangeGoogleChatSpacePrivacyTaskParamsSpace: + """ + 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) + + change_google_chat_space_privacy_task_params_space = cls( + id=id, + name=name, + ) + + change_google_chat_space_privacy_task_params_space.additional_properties = d + return change_google_chat_space_privacy_task_params_space + + @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/change_google_chat_space_privacy_task_params_task_type.py b/rootly_sdk/models/change_google_chat_space_privacy_task_params_task_type.py new file mode 100644 index 00000000..df9d0a4c --- /dev/null +++ b/rootly_sdk/models/change_google_chat_space_privacy_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +ChangeGoogleChatSpacePrivacyTaskParamsTaskType = Literal["change_google_chat_space_privacy"] + +CHANGE_GOOGLE_CHAT_SPACE_PRIVACY_TASK_PARAMS_TASK_TYPE_VALUES: set[ChangeGoogleChatSpacePrivacyTaskParamsTaskType] = { + "change_google_chat_space_privacy", +} + + +def check_change_google_chat_space_privacy_task_params_task_type( + value: str | None, +) -> ChangeGoogleChatSpacePrivacyTaskParamsTaskType | None: + if value is None: + return None + if value in CHANGE_GOOGLE_CHAT_SPACE_PRIVACY_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(ChangeGoogleChatSpacePrivacyTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CHANGE_GOOGLE_CHAT_SPACE_PRIVACY_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) 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 f812ce4b..67b27448 100644 --- a/rootly_sdk/models/change_slack_channel_privacy_task_params.py +++ b/rootly_sdk/models/change_slack_channel_privacy_task_params.py @@ -1,20 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..models.change_slack_channel_privacy_task_params_privacy import ChangeSlackChannelPrivacyTaskParamsPrivacy from ..models.change_slack_channel_privacy_task_params_privacy import ( - ChangeSlackChannelPrivacyTaskParamsPrivacy, check_change_slack_channel_privacy_task_params_privacy, ) +from ..models.change_slack_channel_privacy_task_params_task_type import ChangeSlackChannelPrivacyTaskParamsTaskType from ..models.change_slack_channel_privacy_task_params_task_type import ( - ChangeSlackChannelPrivacyTaskParamsTaskType, check_change_slack_channel_privacy_task_params_task_type, ) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.change_slack_channel_privacy_task_params_channel import ChangeSlackChannelPrivacyTaskParamsChannel @@ -27,38 +30,37 @@ class ChangeSlackChannelPrivacyTaskParams: """ Attributes: + channel (ChangeSlackChannelPrivacyTaskParamsChannel): privacy (ChangeSlackChannelPrivacyTaskParamsPrivacy): task_type (ChangeSlackChannelPrivacyTaskParamsTaskType | Unset): - channel (ChangeSlackChannelPrivacyTaskParamsChannel | Unset): """ + channel: ChangeSlackChannelPrivacyTaskParamsChannel privacy: ChangeSlackChannelPrivacyTaskParamsPrivacy 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]: + from ..models.change_slack_channel_privacy_task_params_channel import ChangeSlackChannelPrivacyTaskParamsChannel + + channel = self.channel.to_dict() + privacy: str = self.privacy task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - channel: dict[str, Any] | Unset = UNSET - if not isinstance(self.channel, Unset): - channel = self.channel.to_dict() - field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { + "channel": channel, "privacy": privacy, } ) if task_type is not UNSET: field_dict["task_type"] = task_type - if channel is not UNSET: - field_dict["channel"] = channel return field_dict @@ -67,6 +69,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.change_slack_channel_privacy_task_params_channel import ChangeSlackChannelPrivacyTaskParamsChannel d = dict(src_dict) + channel = ChangeSlackChannelPrivacyTaskParamsChannel.from_dict(d.pop("channel")) + privacy = check_change_slack_channel_privacy_task_params_privacy(d.pop("privacy")) _task_type = d.pop("task_type", UNSET) @@ -76,17 +80,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: task_type = check_change_slack_channel_privacy_task_params_task_type(_task_type) - _channel = d.pop("channel", UNSET) - channel: ChangeSlackChannelPrivacyTaskParamsChannel | Unset - if isinstance(_channel, Unset): - channel = UNSET - else: - channel = ChangeSlackChannelPrivacyTaskParamsChannel.from_dict(_channel) - change_slack_channel_privacy_task_params = cls( + channel=channel, privacy=privacy, task_type=task_type, - channel=channel, ) change_slack_channel_privacy_task_params.additional_properties = d 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 1dd7d904..0368bc27 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ChangeSlackChannelPrivacyTaskParamsChannel") diff --git a/rootly_sdk/models/change_slack_channel_privacy_task_params_task_type.py b/rootly_sdk/models/change_slack_channel_privacy_task_params_task_type.py index b2c9e4ea..bd967611 100644 --- a/rootly_sdk/models/change_slack_channel_privacy_task_params_task_type.py +++ b/rootly_sdk/models/change_slack_channel_privacy_task_params_task_type.py @@ -1,9 +1,9 @@ from typing import Literal, cast -ChangeSlackChannelPrivacyTaskParamsTaskType = Literal["rename_slack_channel"] +ChangeSlackChannelPrivacyTaskParamsTaskType = Literal["change_slack_channel_privacy"] CHANGE_SLACK_CHANNEL_PRIVACY_TASK_PARAMS_TASK_TYPE_VALUES: set[ChangeSlackChannelPrivacyTaskParamsTaskType] = { - "rename_slack_channel", + "change_slack_channel_privacy", } diff --git a/rootly_sdk/models/communications_group.py b/rootly_sdk/models/communications_group.py index 1c187a2a..2d4fa619 100644 --- a/rootly_sdk/models/communications_group.py +++ b/rootly_sdk/models/communications_group.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.communications_group_condition_type import ( - CommunicationsGroupConditionType, - check_communications_group_condition_type, -) from ..types import UNSET, Unset +from ..models.communications_group_condition_type import check_communications_group_condition_type +from ..models.communications_group_condition_type import CommunicationsGroupConditionType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_group_communication_external_group_members_type_0_item import ( CommunicationsGroupCommunicationExternalGroupMembersType0Item, @@ -67,6 +68,13 @@ class CommunicationsGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_group_communication_group_conditions_type_0_item import ( + CommunicationsGroupCommunicationGroupConditionsType0Item, + ) + from ..models.communications_group_communication_external_group_members_type_0_item import ( + CommunicationsGroupCommunicationExternalGroupMembersType0Item, + ) + name = self.name communication_type_id = self.communication_type_id 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 7edf9df3..ed8a4f88 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CommunicationsGroupCommunicationExternalGroupMembersType0Item") 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 8f0cfd6e..17a9e664 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.communications_group_communication_group_conditions_type_0_item_property_type import ( - CommunicationsGroupCommunicationGroupConditionsType0ItemPropertyType, check_communications_group_communication_group_conditions_type_0_item_property_type, ) +from ..models.communications_group_communication_group_conditions_type_0_item_property_type import ( + CommunicationsGroupCommunicationGroupConditionsType0ItemPropertyType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="CommunicationsGroupCommunicationGroupConditionsType0Item") diff --git a/rootly_sdk/models/communications_group_response.py b/rootly_sdk/models/communications_group_response.py index ba98fbdd..38767f1b 100644 --- a/rootly_sdk/models/communications_group_response.py +++ b/rootly_sdk/models/communications_group_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_group_response_data import CommunicationsGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CommunicationsGroupResponse") @@ -18,14 +24,26 @@ class CommunicationsGroupResponse: """ Attributes: data (CommunicationsGroupResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CommunicationsGroupResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_group_response_data import CommunicationsGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_group_response_data import CommunicationsGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CommunicationsGroupResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_group_response = cls( data=data, + included=included, ) communications_group_response.additional_properties = d diff --git a/rootly_sdk/models/communications_group_response_data.py b/rootly_sdk/models/communications_group_response_data.py index 3b64c804..64b46f0d 100644 --- a/rootly_sdk/models/communications_group_response_data.py +++ b/rootly_sdk/models/communications_group_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.communications_group_response_data_type import ( - CommunicationsGroupResponseDataType, - check_communications_group_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.communications_group_response_data_type import check_communications_group_response_data_type +from ..models.communications_group_response_data_type import CommunicationsGroupResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.communications_group import CommunicationsGroup @@ -33,6 +34,8 @@ class CommunicationsGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_group import CommunicationsGroup + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_groups_response.py b/rootly_sdk/models/communications_groups_response.py index 64e7c7a3..6535985c 100644 --- a/rootly_sdk/models/communications_groups_response.py +++ b/rootly_sdk/models/communications_groups_response.py @@ -1,15 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_groups_response_data_item import CommunicationsGroupsResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +28,21 @@ class CommunicationsGroupsResponse: data (list[CommunicationsGroupsResponseDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CommunicationsGroupsResponseDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_groups_response_data_item import CommunicationsGroupsResponseDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +56,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +74,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_groups_response_data_item import CommunicationsGroupsResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +108,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_groups_response = cls( data=data, links=links, meta=meta, + included=included, ) communications_groups_response.additional_properties = d diff --git a/rootly_sdk/models/communications_groups_response_data_item.py b/rootly_sdk/models/communications_groups_response_data_item.py index ee9f830d..f70d6d4b 100644 --- a/rootly_sdk/models/communications_groups_response_data_item.py +++ b/rootly_sdk/models/communications_groups_response_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.communications_groups_response_data_item_type import ( - CommunicationsGroupsResponseDataItemType, - check_communications_groups_response_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.communications_groups_response_data_item_type import check_communications_groups_response_data_item_type +from ..models.communications_groups_response_data_item_type import CommunicationsGroupsResponseDataItemType +from typing import cast if TYPE_CHECKING: from ..models.communications_group import CommunicationsGroup @@ -33,6 +34,8 @@ class CommunicationsGroupsResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_group import CommunicationsGroup + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_stage.py b/rootly_sdk/models/communications_stage.py index a32faca1..49db3952 100644 --- a/rootly_sdk/models/communications_stage.py +++ b/rootly_sdk/models/communications_stage.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CommunicationsStage") diff --git a/rootly_sdk/models/communications_stage_response.py b/rootly_sdk/models/communications_stage_response.py index b031c5b6..7f18ad8c 100644 --- a/rootly_sdk/models/communications_stage_response.py +++ b/rootly_sdk/models/communications_stage_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_stage_response_data import CommunicationsStageResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CommunicationsStageResponse") @@ -18,14 +24,26 @@ class CommunicationsStageResponse: """ Attributes: data (CommunicationsStageResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CommunicationsStageResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_stage_response_data import CommunicationsStageResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_stage_response_data import CommunicationsStageResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CommunicationsStageResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_stage_response = cls( data=data, + included=included, ) communications_stage_response.additional_properties = d diff --git a/rootly_sdk/models/communications_stage_response_data.py b/rootly_sdk/models/communications_stage_response_data.py index 4d7295dd..d1f24885 100644 --- a/rootly_sdk/models/communications_stage_response_data.py +++ b/rootly_sdk/models/communications_stage_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.communications_stage_response_data_type import ( - CommunicationsStageResponseDataType, - check_communications_stage_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.communications_stage_response_data_type import check_communications_stage_response_data_type +from ..models.communications_stage_response_data_type import CommunicationsStageResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.communications_stage import CommunicationsStage @@ -33,6 +34,8 @@ class CommunicationsStageResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_stage import CommunicationsStage + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_stages_response.py b/rootly_sdk/models/communications_stages_response.py index 2df29ea0..3f76aa71 100644 --- a/rootly_sdk/models/communications_stages_response.py +++ b/rootly_sdk/models/communications_stages_response.py @@ -1,15 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_stages_response_data_item import CommunicationsStagesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +28,21 @@ class CommunicationsStagesResponse: data (list[CommunicationsStagesResponseDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CommunicationsStagesResponseDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.communications_stages_response_data_item import CommunicationsStagesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +56,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +74,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_stages_response_data_item import CommunicationsStagesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +108,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_stages_response = cls( data=data, links=links, meta=meta, + included=included, ) communications_stages_response.additional_properties = d diff --git a/rootly_sdk/models/communications_stages_response_data_item.py b/rootly_sdk/models/communications_stages_response_data_item.py index f4cf324c..967515b6 100644 --- a/rootly_sdk/models/communications_stages_response_data_item.py +++ b/rootly_sdk/models/communications_stages_response_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.communications_stages_response_data_item_type import ( - CommunicationsStagesResponseDataItemType, - check_communications_stages_response_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.communications_stages_response_data_item_type import check_communications_stages_response_data_item_type +from ..models.communications_stages_response_data_item_type import CommunicationsStagesResponseDataItemType +from typing import cast if TYPE_CHECKING: from ..models.communications_stage import CommunicationsStage @@ -33,6 +34,8 @@ class CommunicationsStagesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_stage import CommunicationsStage + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_template.py b/rootly_sdk/models/communications_template.py index ec359696..c1f08430 100644 --- a/rootly_sdk/models/communications_template.py +++ b/rootly_sdk/models/communications_template.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_template_communication_template_stages_type_0_item import ( CommunicationsTemplateCommunicationTemplateStagesType0Item, @@ -48,6 +51,11 @@ class CommunicationsTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_template_communication_template_stages_type_0_item import ( + CommunicationsTemplateCommunicationTemplateStagesType0Item, + ) + from ..models.communications_template_communication_type import CommunicationsTemplateCommunicationType + name = self.name position: int | None 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 08867b37..32d6b497 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_template_communication_template_stages_type_0_item_data import ( CommunicationsTemplateCommunicationTemplateStagesType0ItemData, @@ -28,6 +31,10 @@ class CommunicationsTemplateCommunicationTemplateStagesType0Item: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_template_communication_template_stages_type_0_item_data import ( + CommunicationsTemplateCommunicationTemplateStagesType0ItemData, + ) + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() 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 8b36ddcb..990ebf11 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.communications_template_communication_template_stages_type_0_item_data_type import ( - CommunicationsTemplateCommunicationTemplateStagesType0ItemDataType, check_communications_template_communication_template_stages_type_0_item_data_type, ) +from ..models.communications_template_communication_template_stages_type_0_item_data_type import ( + CommunicationsTemplateCommunicationTemplateStagesType0ItemDataType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.communications_template_communication_template_stages_type_0_item_data_attributes import ( @@ -36,6 +41,10 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_template_communication_template_stages_type_0_item_data_attributes import ( + CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes, + ) + id = self.id type_: str | Unset = UNSET 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 4f9dcc5b..3d2d0d12 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_template_communication_template_stages_type_0_item_data_attributes_communication_stage import ( CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage, @@ -51,6 +54,13 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_template_communication_template_stages_type_0_item_data_attributes_communication_template import ( + CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate, + ) + from ..models.communications_template_communication_template_stages_type_0_item_data_attributes_communication_stage import ( + CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage, + ) + email_body: None | str | Unset if isinstance(self.email_body, Unset): email_body = 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 9d3a2edc..401f88c1 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage") 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 b490ec24..f25b3fcf 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate") diff --git a/rootly_sdk/models/communications_template_communication_type.py b/rootly_sdk/models/communications_template_communication_type.py index c4b73f8c..3c0a7a78 100644 --- a/rootly_sdk/models/communications_template_communication_type.py +++ b/rootly_sdk/models/communications_template_communication_type.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CommunicationsTemplateCommunicationType") diff --git a/rootly_sdk/models/communications_template_response.py b/rootly_sdk/models/communications_template_response.py index 84eda97a..a724ae7a 100644 --- a/rootly_sdk/models/communications_template_response.py +++ b/rootly_sdk/models/communications_template_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_template_response_data import CommunicationsTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CommunicationsTemplateResponse") @@ -18,14 +24,26 @@ class CommunicationsTemplateResponse: """ Attributes: data (CommunicationsTemplateResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CommunicationsTemplateResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.communications_template_response_data import CommunicationsTemplateResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_template_response_data import CommunicationsTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CommunicationsTemplateResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_template_response = cls( data=data, + included=included, ) communications_template_response.additional_properties = d diff --git a/rootly_sdk/models/communications_template_response_data.py b/rootly_sdk/models/communications_template_response_data.py index 0149545c..f8eb48ef 100644 --- a/rootly_sdk/models/communications_template_response_data.py +++ b/rootly_sdk/models/communications_template_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.communications_template_response_data_type import ( - CommunicationsTemplateResponseDataType, - check_communications_template_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.communications_template_response_data_type import check_communications_template_response_data_type +from ..models.communications_template_response_data_type import CommunicationsTemplateResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.communications_template import CommunicationsTemplate @@ -33,6 +34,8 @@ class CommunicationsTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_template import CommunicationsTemplate + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_templates_response.py b/rootly_sdk/models/communications_templates_response.py index 85397b27..bb7670ec 100644 --- a/rootly_sdk/models/communications_templates_response.py +++ b/rootly_sdk/models/communications_templates_response.py @@ -1,15 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_templates_response_data_item import CommunicationsTemplatesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +28,21 @@ class CommunicationsTemplatesResponse: data (list[CommunicationsTemplatesResponseDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CommunicationsTemplatesResponseDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.communications_templates_response_data_item import CommunicationsTemplatesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +56,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +74,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_templates_response_data_item import CommunicationsTemplatesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +108,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_templates_response = cls( data=data, links=links, meta=meta, + included=included, ) communications_templates_response.additional_properties = d diff --git a/rootly_sdk/models/communications_templates_response_data_item.py b/rootly_sdk/models/communications_templates_response_data_item.py index bc9e42bf..5b681fa8 100644 --- a/rootly_sdk/models/communications_templates_response_data_item.py +++ b/rootly_sdk/models/communications_templates_response_data_item.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.communications_templates_response_data_item_type import ( - CommunicationsTemplatesResponseDataItemType, check_communications_templates_response_data_item_type, ) +from ..models.communications_templates_response_data_item_type import CommunicationsTemplatesResponseDataItemType +from typing import cast if TYPE_CHECKING: from ..models.communications_template import CommunicationsTemplate @@ -33,6 +36,8 @@ class CommunicationsTemplatesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_template import CommunicationsTemplate + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_type.py b/rootly_sdk/models/communications_type.py index 0323e1ec..d0b603f2 100644 --- a/rootly_sdk/models/communications_type.py +++ b/rootly_sdk/models/communications_type.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CommunicationsType") diff --git a/rootly_sdk/models/communications_type_response.py b/rootly_sdk/models/communications_type_response.py index 1da7911a..33f9f280 100644 --- a/rootly_sdk/models/communications_type_response.py +++ b/rootly_sdk/models/communications_type_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_type_response_data import CommunicationsTypeResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CommunicationsTypeResponse") @@ -18,14 +24,26 @@ class CommunicationsTypeResponse: """ Attributes: data (CommunicationsTypeResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CommunicationsTypeResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.communications_type_response_data import CommunicationsTypeResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_type_response_data import CommunicationsTypeResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CommunicationsTypeResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_type_response = cls( data=data, + included=included, ) communications_type_response.additional_properties = d diff --git a/rootly_sdk/models/communications_type_response_data.py b/rootly_sdk/models/communications_type_response_data.py index 5d78c846..99865fe0 100644 --- a/rootly_sdk/models/communications_type_response_data.py +++ b/rootly_sdk/models/communications_type_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.communications_type_response_data_type import ( - CommunicationsTypeResponseDataType, - check_communications_type_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.communications_type_response_data_type import check_communications_type_response_data_type +from ..models.communications_type_response_data_type import CommunicationsTypeResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.communications_type import CommunicationsType @@ -33,6 +34,8 @@ class CommunicationsTypeResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_type import CommunicationsType + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/communications_types_response.py b/rootly_sdk/models/communications_types_response.py index 699a6aac..10055e6e 100644 --- a/rootly_sdk/models/communications_types_response.py +++ b/rootly_sdk/models/communications_types_response.py @@ -1,15 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.communications_types_response_data_item import CommunicationsTypesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -24,14 +28,21 @@ class CommunicationsTypesResponse: data (list[CommunicationsTypesResponseDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CommunicationsTypesResponseDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_types_response_data_item import CommunicationsTypesResponseDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +56,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,12 +74,15 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.communications_types_response_data_item import CommunicationsTypesResponseDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -87,10 +108,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + communications_types_response = cls( data=data, links=links, meta=meta, + included=included, ) communications_types_response.additional_properties = d diff --git a/rootly_sdk/models/communications_types_response_data_item.py b/rootly_sdk/models/communications_types_response_data_item.py index 22874284..bd132a02 100644 --- a/rootly_sdk/models/communications_types_response_data_item.py +++ b/rootly_sdk/models/communications_types_response_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.communications_types_response_data_item_type import ( - CommunicationsTypesResponseDataItemType, - check_communications_types_response_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.communications_types_response_data_item_type import check_communications_types_response_data_item_type +from ..models.communications_types_response_data_item_type import CommunicationsTypesResponseDataItemType +from typing import cast if TYPE_CHECKING: from ..models.communications_type import CommunicationsType @@ -33,6 +34,8 @@ class CommunicationsTypesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.communications_type import CommunicationsType + id = self.id type_: str = self.type_ 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 e1277c8a..f1cebd32 100644 --- a/rootly_sdk/models/create_airtable_table_record_task_params.py +++ b/rootly_sdk/models/create_airtable_table_record_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_airtable_table_record_task_params_task_type import ( - CreateAirtableTableRecordTaskParamsTaskType, check_create_airtable_table_record_task_params_task_type, ) +from ..models.create_airtable_table_record_task_params_task_type import CreateAirtableTableRecordTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_airtable_table_record_task_params_base import CreateAirtableTableRecordTaskParamsBase @@ -38,6 +41,9 @@ class CreateAirtableTableRecordTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_airtable_table_record_task_params_table import CreateAirtableTableRecordTaskParamsTable + from ..models.create_airtable_table_record_task_params_base import CreateAirtableTableRecordTaskParamsBase + base = self.base.to_dict() table = self.table.to_dict() 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 f8402d23..0c7b567f 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateAirtableTableRecordTaskParamsBase") 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 dc5d3a10..003c1f5e 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateAirtableTableRecordTaskParamsTable") 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 c6b4f284..0f219c09 100644 --- a/rootly_sdk/models/create_anthropic_chat_completion_task_params.py +++ b/rootly_sdk/models/create_anthropic_chat_completion_task_params.py @@ -1,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_anthropic_chat_completion_task_params_task_type import ( - CreateAnthropicChatCompletionTaskParamsTaskType, check_create_anthropic_chat_completion_task_params_task_type, ) +from ..models.create_anthropic_chat_completion_task_params_task_type import ( + CreateAnthropicChatCompletionTaskParamsTaskType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_anthropic_chat_completion_task_params_model import CreateAnthropicChatCompletionTaskParamsModel @@ -36,6 +41,10 @@ class CreateAnthropicChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_anthropic_chat_completion_task_params_model import ( + CreateAnthropicChatCompletionTaskParamsModel, + ) + model = self.model.to_dict() prompt = self.prompt 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 0d5723dd..8f02b483 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateAnthropicChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_asana_subtask_task_params.py b/rootly_sdk/models/create_asana_subtask_task_params.py index 7e4076e8..85cca5fe 100644 --- a/rootly_sdk/models/create_asana_subtask_task_params.py +++ b/rootly_sdk/models/create_asana_subtask_task_params.py @@ -1,20 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_asana_subtask_task_params_dependency_direction import ( - CreateAsanaSubtaskTaskParamsDependencyDirection, check_create_asana_subtask_task_params_dependency_direction, ) -from ..models.create_asana_subtask_task_params_task_type import ( - CreateAsanaSubtaskTaskParamsTaskType, - check_create_asana_subtask_task_params_task_type, +from ..models.create_asana_subtask_task_params_dependency_direction import ( + CreateAsanaSubtaskTaskParamsDependencyDirection, ) +from ..models.create_asana_subtask_task_params_task_type import check_create_asana_subtask_task_params_task_type +from ..models.create_asana_subtask_task_params_task_type import CreateAsanaSubtaskTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_asana_subtask_task_params_completion import CreateAsanaSubtaskTaskParamsCompletion @@ -53,6 +56,8 @@ class CreateAsanaSubtaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_asana_subtask_task_params_completion import CreateAsanaSubtaskTaskParamsCompletion + parent_task_id = self.parent_task_id title = self.title 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 1bd94c1d..052d020d 100644 --- a/rootly_sdk/models/create_asana_subtask_task_params_completion.py +++ b/rootly_sdk/models/create_asana_subtask_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateAsanaSubtaskTaskParamsCompletion") diff --git a/rootly_sdk/models/create_asana_task_task_params.py b/rootly_sdk/models/create_asana_task_task_params.py index ca6f82fd..5f20f8a4 100644 --- a/rootly_sdk/models/create_asana_task_task_params.py +++ b/rootly_sdk/models/create_asana_task_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_asana_task_task_params_dependency_direction import ( - CreateAsanaTaskTaskParamsDependencyDirection, check_create_asana_task_task_params_dependency_direction, ) -from ..models.create_asana_task_task_params_task_type import ( - CreateAsanaTaskTaskParamsTaskType, - check_create_asana_task_task_params_task_type, -) +from ..models.create_asana_task_task_params_dependency_direction import CreateAsanaTaskTaskParamsDependencyDirection +from ..models.create_asana_task_task_params_task_type import check_create_asana_task_task_params_task_type +from ..models.create_asana_task_task_params_task_type import CreateAsanaTaskTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_asana_task_task_params_completion import CreateAsanaTaskTaskParamsCompletion @@ -57,6 +58,10 @@ class CreateAsanaTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_asana_task_task_params_workspace import CreateAsanaTaskTaskParamsWorkspace + from ..models.create_asana_task_task_params_projects_item import CreateAsanaTaskTaskParamsProjectsItem + from ..models.create_asana_task_task_params_completion import CreateAsanaTaskTaskParamsCompletion + workspace = self.workspace.to_dict() projects = [] 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 11ef1e82..b3877536 100644 --- a/rootly_sdk/models/create_asana_task_task_params_completion.py +++ b/rootly_sdk/models/create_asana_task_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateAsanaTaskTaskParamsCompletion") 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 41cafec6..6b185824 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateAsanaTaskTaskParamsProjectsItem") 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 4359c902..941e42c3 100644 --- a/rootly_sdk/models/create_asana_task_task_params_workspace.py +++ b/rootly_sdk/models/create_asana_task_task_params_workspace.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateAsanaTaskTaskParamsWorkspace") diff --git a/rootly_sdk/models/create_clickup_task_task_params.py b/rootly_sdk/models/create_clickup_task_task_params.py index 346f7454..8fa3aaa1 100644 --- a/rootly_sdk/models/create_clickup_task_task_params.py +++ b/rootly_sdk/models/create_clickup_task_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_clickup_task_task_params_task_type import ( - CreateClickupTaskTaskParamsTaskType, - check_create_clickup_task_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_clickup_task_task_params_task_type import check_create_clickup_task_task_params_task_type +from ..models.create_clickup_task_task_params_task_type import CreateClickupTaskTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_clickup_task_task_params_priority import CreateClickupTaskTaskParamsPriority @@ -46,6 +47,8 @@ class CreateClickupTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_clickup_task_task_params_priority import CreateClickupTaskTaskParamsPriority + title = self.title task_type: str | Unset = 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 34e2271a..0a722b11 100644 --- a/rootly_sdk/models/create_clickup_task_task_params_priority.py +++ b/rootly_sdk/models/create_clickup_task_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateClickupTaskTaskParamsPriority") diff --git a/rootly_sdk/models/create_coda_page_task_params.py b/rootly_sdk/models/create_coda_page_task_params.py index 2579e2d2..7339e65d 100644 --- a/rootly_sdk/models/create_coda_page_task_params.py +++ b/rootly_sdk/models/create_coda_page_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_coda_page_task_params_task_type import ( - CreateCodaPageTaskParamsTaskType, - check_create_coda_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_coda_page_task_params_task_type import check_create_coda_page_task_params_task_type +from ..models.create_coda_page_task_params_task_type import CreateCodaPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_coda_page_task_params_doc import CreateCodaPageTaskParamsDoc from ..models.create_coda_page_task_params_template import CreateCodaPageTaskParamsTemplate @@ -47,6 +48,9 @@ class CreateCodaPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_coda_page_task_params_doc import CreateCodaPageTaskParamsDoc + from ..models.create_coda_page_task_params_template import CreateCodaPageTaskParamsTemplate + title = self.title task_type: str | Unset = UNSET 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 ea0354bb..85e9eec0 100644 --- a/rootly_sdk/models/create_coda_page_task_params_doc.py +++ b/rootly_sdk/models/create_coda_page_task_params_doc.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateCodaPageTaskParamsDoc") 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 b2b94318..777981f7 100644 --- a/rootly_sdk/models/create_coda_page_task_params_template.py +++ b/rootly_sdk/models/create_coda_page_task_params_template.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateCodaPageTaskParamsTemplate") diff --git a/rootly_sdk/models/create_confluence_page_task_params.py b/rootly_sdk/models/create_confluence_page_task_params.py index f7923c9e..5c6f9cb8 100644 --- a/rootly_sdk/models/create_confluence_page_task_params.py +++ b/rootly_sdk/models/create_confluence_page_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_confluence_page_task_params_task_type import ( - CreateConfluencePageTaskParamsTaskType, - check_create_confluence_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_confluence_page_task_params_task_type import check_create_confluence_page_task_params_task_type +from ..models.create_confluence_page_task_params_task_type import CreateConfluencePageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_confluence_page_task_params_ancestor import CreateConfluencePageTaskParamsAncestor from ..models.create_confluence_page_task_params_integration import CreateConfluencePageTaskParamsIntegration @@ -36,6 +37,9 @@ class CreateConfluencePageTaskParams: 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. + include_overview (bool | Unset): Default: True. + include_timeline (bool | Unset): Default: True. + create_as_live_doc (bool | Unset): Default: False. """ space: CreateConfluencePageTaskParamsSpace @@ -47,9 +51,17 @@ class CreateConfluencePageTaskParams: content: str | Unset = UNSET post_mortem_template_id: str | Unset = UNSET mark_post_mortem_as_published: bool | Unset = True + include_overview: bool | Unset = True + include_timeline: bool | Unset = True + create_as_live_doc: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_confluence_page_task_params_space import CreateConfluencePageTaskParamsSpace + from ..models.create_confluence_page_task_params_ancestor import CreateConfluencePageTaskParamsAncestor + from ..models.create_confluence_page_task_params_integration import CreateConfluencePageTaskParamsIntegration + from ..models.create_confluence_page_task_params_template import CreateConfluencePageTaskParamsTemplate + space = self.space.to_dict() title = self.title @@ -76,6 +88,12 @@ def to_dict(self) -> dict[str, Any]: mark_post_mortem_as_published = self.mark_post_mortem_as_published + include_overview = self.include_overview + + include_timeline = self.include_timeline + + create_as_live_doc = self.create_as_live_doc + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -98,6 +116,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["post_mortem_template_id"] = post_mortem_template_id if mark_post_mortem_as_published is not UNSET: field_dict["mark_post_mortem_as_published"] = mark_post_mortem_as_published + if include_overview is not UNSET: + field_dict["include_overview"] = include_overview + if include_timeline is not UNSET: + field_dict["include_timeline"] = include_timeline + if create_as_live_doc is not UNSET: + field_dict["create_as_live_doc"] = create_as_live_doc return field_dict @@ -147,6 +171,12 @@ 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) + include_overview = d.pop("include_overview", UNSET) + + include_timeline = d.pop("include_timeline", UNSET) + + create_as_live_doc = d.pop("create_as_live_doc", UNSET) + create_confluence_page_task_params = cls( space=space, title=title, @@ -157,6 +187,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content=content, post_mortem_template_id=post_mortem_template_id, mark_post_mortem_as_published=mark_post_mortem_as_published, + include_overview=include_overview, + include_timeline=include_timeline, + create_as_live_doc=create_as_live_doc, ) create_confluence_page_task_params.additional_properties = d 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 2ce7713b..17d8b9cd 100644 --- a/rootly_sdk/models/create_confluence_page_task_params_ancestor.py +++ b/rootly_sdk/models/create_confluence_page_task_params_ancestor.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateConfluencePageTaskParamsAncestor") 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 8414aaf5..468ce780 100644 --- a/rootly_sdk/models/create_confluence_page_task_params_integration.py +++ b/rootly_sdk/models/create_confluence_page_task_params_integration.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateConfluencePageTaskParamsIntegration") 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 a5ac23bd..fe39f021 100644 --- a/rootly_sdk/models/create_confluence_page_task_params_space.py +++ b/rootly_sdk/models/create_confluence_page_task_params_space.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateConfluencePageTaskParamsSpace") 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 3c78e534..1e70b1f8 100644 --- a/rootly_sdk/models/create_confluence_page_task_params_template.py +++ b/rootly_sdk/models/create_confluence_page_task_params_template.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateConfluencePageTaskParamsTemplate") diff --git a/rootly_sdk/models/create_datadog_notebook_task_params.py b/rootly_sdk/models/create_datadog_notebook_task_params.py index d765ca54..8215b95e 100644 --- a/rootly_sdk/models/create_datadog_notebook_task_params.py +++ b/rootly_sdk/models/create_datadog_notebook_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_datadog_notebook_task_params_kind import ( - CreateDatadogNotebookTaskParamsKind, - check_create_datadog_notebook_task_params_kind, -) -from ..models.create_datadog_notebook_task_params_task_type import ( - CreateDatadogNotebookTaskParamsTaskType, - check_create_datadog_notebook_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_datadog_notebook_task_params_kind import check_create_datadog_notebook_task_params_kind +from ..models.create_datadog_notebook_task_params_kind import CreateDatadogNotebookTaskParamsKind +from ..models.create_datadog_notebook_task_params_task_type import check_create_datadog_notebook_task_params_task_type +from ..models.create_datadog_notebook_task_params_task_type import CreateDatadogNotebookTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_datadog_notebook_task_params_template import CreateDatadogNotebookTaskParamsTemplate @@ -46,6 +45,8 @@ class CreateDatadogNotebookTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_datadog_notebook_task_params_template import CreateDatadogNotebookTaskParamsTemplate + title = self.title kind: str = self.kind 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 1ba885b5..0192ded7 100644 --- a/rootly_sdk/models/create_datadog_notebook_task_params_template.py +++ b/rootly_sdk/models/create_datadog_notebook_task_params_template.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateDatadogNotebookTaskParamsTemplate") 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 ff1a1fdb..81a2d1ec 100644 --- a/rootly_sdk/models/create_dropbox_paper_page_task_params.py +++ b/rootly_sdk/models/create_dropbox_paper_page_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_dropbox_paper_page_task_params_task_type import ( - CreateDropboxPaperPageTaskParamsTaskType, check_create_dropbox_paper_page_task_params_task_type, ) +from ..models.create_dropbox_paper_page_task_params_task_type import CreateDropboxPaperPageTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_dropbox_paper_page_task_params_namespace import CreateDropboxPaperPageTaskParamsNamespace @@ -45,6 +48,11 @@ class CreateDropboxPaperPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_dropbox_paper_page_task_params_parent_folder import ( + CreateDropboxPaperPageTaskParamsParentFolder, + ) + from ..models.create_dropbox_paper_page_task_params_namespace import CreateDropboxPaperPageTaskParamsNamespace + title = self.title task_type: str | Unset = UNSET 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 9a83f04b..c546d663 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateDropboxPaperPageTaskParamsNamespace") 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 5c31099d..191c7698 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateDropboxPaperPageTaskParamsParentFolder") diff --git a/rootly_sdk/models/create_edge_connector_action_body.py b/rootly_sdk/models/create_edge_connector_action_body.py index ed3410af..cc4f6750 100644 --- a/rootly_sdk/models/create_edge_connector_action_body.py +++ b/rootly_sdk/models/create_edge_connector_action_body.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_edge_connector_action_body_action import CreateEdgeConnectorActionBodyAction @@ -26,6 +29,8 @@ class CreateEdgeConnectorActionBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_edge_connector_action_body_action import CreateEdgeConnectorActionBodyAction + action: dict[str, Any] | Unset = UNSET if not isinstance(self.action, Unset): action = self.action.to_dict() 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 15620225..18fe0b8a 100644 --- a/rootly_sdk/models/create_edge_connector_action_body_action.py +++ b/rootly_sdk/models/create_edge_connector_action_body_action.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_edge_connector_action_body_action_action_type import ( - CreateEdgeConnectorActionBodyActionActionType, check_create_edge_connector_action_body_action_action_type, ) +from ..models.create_edge_connector_action_body_action_action_type import CreateEdgeConnectorActionBodyActionActionType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_edge_connector_action_body_action_metadata import CreateEdgeConnectorActionBodyActionMetadata @@ -34,6 +37,10 @@ class CreateEdgeConnectorActionBodyAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_edge_connector_action_body_action_metadata import ( + CreateEdgeConnectorActionBodyActionMetadata, + ) + name = self.name action_type: str = self.action_type 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 b536dde0..2d261e28 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_edge_connector_action_body_action_metadata_parameters_item import ( CreateEdgeConnectorActionBodyActionMetadataParametersItem, @@ -32,6 +35,10 @@ class CreateEdgeConnectorActionBodyActionMetadata: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_edge_connector_action_body_action_metadata_parameters_item import ( + CreateEdgeConnectorActionBodyActionMetadataParametersItem, + ) + description = self.description timeout = self.timeout 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 f6694bc1..4ca50667 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_edge_connector_action_body_action_metadata_parameters_item_type import ( - CreateEdgeConnectorActionBodyActionMetadataParametersItemType, check_create_edge_connector_action_body_action_metadata_parameters_item_type, ) +from ..models.create_edge_connector_action_body_action_metadata_parameters_item_type import ( + CreateEdgeConnectorActionBodyActionMetadataParametersItemType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="CreateEdgeConnectorActionBodyActionMetadataParametersItem") diff --git a/rootly_sdk/models/create_edge_connector_body.py b/rootly_sdk/models/create_edge_connector_body.py index bfe6de95..f48afbb5 100644 --- a/rootly_sdk/models/create_edge_connector_body.py +++ b/rootly_sdk/models/create_edge_connector_body.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.create_edge_connector_body_data import CreateEdgeConnectorBodyData @@ -24,6 +28,8 @@ class CreateEdgeConnectorBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_edge_connector_body_data import CreateEdgeConnectorBodyData + data = self.data.to_dict() field_dict: 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 77191b2b..b1f7f3d4 100644 --- a/rootly_sdk/models/create_edge_connector_body_data.py +++ b/rootly_sdk/models/create_edge_connector_body_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_edge_connector_body_data_type import ( - CreateEdgeConnectorBodyDataType, - check_create_edge_connector_body_data_type, -) +from ..types import UNSET, Unset + +from ..models.create_edge_connector_body_data_type import check_create_edge_connector_body_data_type +from ..models.create_edge_connector_body_data_type import CreateEdgeConnectorBodyDataType +from typing import cast if TYPE_CHECKING: from ..models.create_edge_connector_body_data_attributes import CreateEdgeConnectorBodyDataAttributes @@ -31,6 +32,8 @@ class CreateEdgeConnectorBodyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_edge_connector_body_data_attributes import CreateEdgeConnectorBodyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 44b5844e..79b49889 100644 --- a/rootly_sdk/models/create_edge_connector_body_data_attributes.py +++ b/rootly_sdk/models/create_edge_connector_body_data_attributes.py @@ -1,16 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_edge_connector_body_data_attributes_status import ( - CreateEdgeConnectorBodyDataAttributesStatus, check_create_edge_connector_body_data_attributes_status, ) +from ..models.create_edge_connector_body_data_attributes_status import CreateEdgeConnectorBodyDataAttributesStatus from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.create_edge_connector_body_data_attributes_filters import CreateEdgeConnectorBodyDataAttributesFilters + T = TypeVar("T", bound="CreateEdgeConnectorBodyDataAttributes") @@ -23,15 +30,22 @@ class CreateEdgeConnectorBodyDataAttributes: description (str | Unset): Connector description status (CreateEdgeConnectorBodyDataAttributesStatus | Unset): Connector status subscriptions (list[str] | Unset): Array of event types to subscribe to + filters (CreateEdgeConnectorBodyDataAttributesFilters | Unset): Event filters. OR within dimension, AND across + dimensions. """ name: str description: str | Unset = UNSET status: CreateEdgeConnectorBodyDataAttributesStatus | Unset = UNSET subscriptions: list[str] | Unset = UNSET + filters: CreateEdgeConnectorBodyDataAttributesFilters | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_edge_connector_body_data_attributes_filters import ( + CreateEdgeConnectorBodyDataAttributesFilters, + ) + name = self.name description = self.description @@ -44,6 +58,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.subscriptions, Unset): subscriptions = self.subscriptions + filters: dict[str, Any] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = self.filters.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -57,11 +75,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["status"] = status if subscriptions is not UNSET: field_dict["subscriptions"] = subscriptions + if filters is not UNSET: + field_dict["filters"] = filters return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.create_edge_connector_body_data_attributes_filters import ( + CreateEdgeConnectorBodyDataAttributesFilters, + ) + d = dict(src_dict) name = d.pop("name") @@ -76,11 +100,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: subscriptions = cast(list[str], d.pop("subscriptions", UNSET)) + _filters = d.pop("filters", UNSET) + filters: CreateEdgeConnectorBodyDataAttributesFilters | Unset + if isinstance(_filters, Unset): + filters = UNSET + else: + filters = CreateEdgeConnectorBodyDataAttributesFilters.from_dict(_filters) + create_edge_connector_body_data_attributes = cls( name=name, description=description, status=status, subscriptions=subscriptions, + filters=filters, ) create_edge_connector_body_data_attributes.additional_properties = d diff --git a/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py b/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py new file mode 100644 index 00000000..caf1ea15 --- /dev/null +++ b/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="CreateEdgeConnectorBodyDataAttributesFilters") + + +@_attrs_define +class CreateEdgeConnectorBodyDataAttributesFilters: + """Event filters. OR within dimension, AND across dimensions. + + Attributes: + group_ids (list[str] | Unset): Filter by group UUIDs + service_ids (list[str] | Unset): Filter by service UUIDs + environment_ids (list[str] | Unset): Filter by environment UUIDs + functionality_ids (list[str] | Unset): Filter by functionality UUIDs + """ + + group_ids: list[str] | Unset = UNSET + service_ids: list[str] | Unset = UNSET + environment_ids: list[str] | Unset = UNSET + functionality_ids: list[str] | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + group_ids: list[str] | Unset = UNSET + if not isinstance(self.group_ids, Unset): + group_ids = self.group_ids + + service_ids: list[str] | Unset = UNSET + if not isinstance(self.service_ids, Unset): + service_ids = self.service_ids + + environment_ids: list[str] | Unset = UNSET + if not isinstance(self.environment_ids, Unset): + environment_ids = self.environment_ids + + functionality_ids: list[str] | Unset = UNSET + if not isinstance(self.functionality_ids, Unset): + functionality_ids = self.functionality_ids + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if group_ids is not UNSET: + field_dict["group_ids"] = group_ids + if service_ids is not UNSET: + field_dict["service_ids"] = service_ids + if environment_ids is not UNSET: + field_dict["environment_ids"] = environment_ids + if functionality_ids is not UNSET: + field_dict["functionality_ids"] = functionality_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + group_ids = cast(list[str], d.pop("group_ids", UNSET)) + + service_ids = cast(list[str], d.pop("service_ids", UNSET)) + + environment_ids = cast(list[str], d.pop("environment_ids", UNSET)) + + functionality_ids = cast(list[str], d.pop("functionality_ids", UNSET)) + + create_edge_connector_body_data_attributes_filters = cls( + group_ids=group_ids, + service_ids=service_ids, + environment_ids=environment_ids, + functionality_ids=functionality_ids, + ) + + return create_edge_connector_body_data_attributes_filters diff --git a/rootly_sdk/models/create_github_issue_task_params.py b/rootly_sdk/models/create_github_issue_task_params.py index d1a579e0..af49a7d7 100644 --- a/rootly_sdk/models/create_github_issue_task_params.py +++ b/rootly_sdk/models/create_github_issue_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_github_issue_task_params_task_type import ( - CreateGithubIssueTaskParamsTaskType, - check_create_github_issue_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_github_issue_task_params_task_type import check_create_github_issue_task_params_task_type +from ..models.create_github_issue_task_params_task_type import CreateGithubIssueTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + 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 @@ -32,6 +33,8 @@ class CreateGithubIssueTaskParams: 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 + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ title: str @@ -41,9 +44,14 @@ class CreateGithubIssueTaskParams: labels: list[CreateGithubIssueTaskParamsLabelsItem] | Unset = UNSET issue_type: CreateGithubIssueTaskParamsIssueType | Unset = UNSET parent_issue_number: None | str | 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]: + from ..models.create_github_issue_task_params_labels_item import CreateGithubIssueTaskParamsLabelsItem + from ..models.create_github_issue_task_params_issue_type import CreateGithubIssueTaskParamsIssueType + from ..models.create_github_issue_task_params_repository import CreateGithubIssueTaskParamsRepository + title = self.title repository = self.repository.to_dict() @@ -71,6 +79,12 @@ def to_dict(self) -> dict[str, Any]: else: parent_issue_number = self.parent_issue_number + 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 + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -89,6 +103,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["issue_type"] = issue_type if parent_issue_number is not UNSET: field_dict["parent_issue_number"] = parent_issue_number + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -137,6 +153,15 @@ def _parse_parent_issue_number(data: object) -> None | str | Unset: parent_issue_number = _parse_parent_issue_number(d.pop("parent_issue_number", UNSET)) + 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 | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + create_github_issue_task_params = cls( title=title, repository=repository, @@ -145,6 +170,7 @@ def _parse_parent_issue_number(data: object) -> None | str | Unset: labels=labels, issue_type=issue_type, parent_issue_number=parent_issue_number, + custom_fields_mapping=custom_fields_mapping, ) 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 index 8dcdb1a0..5056a6ac 100644 --- a/rootly_sdk/models/create_github_issue_task_params_issue_type.py +++ b/rootly_sdk/models/create_github_issue_task_params_issue_type.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGithubIssueTaskParamsIssueType") 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 index ae8e2abb..e3a9b383 100644 --- a/rootly_sdk/models/create_github_issue_task_params_labels_item.py +++ b/rootly_sdk/models/create_github_issue_task_params_labels_item.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGithubIssueTaskParamsLabelsItem") 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 a46c14d5..ba1e5905 100644 --- a/rootly_sdk/models/create_github_issue_task_params_repository.py +++ b/rootly_sdk/models/create_github_issue_task_params_repository.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGithubIssueTaskParamsRepository") diff --git a/rootly_sdk/models/create_gitlab_issue_task_params.py b/rootly_sdk/models/create_gitlab_issue_task_params.py index 10502043..b95a3741 100644 --- a/rootly_sdk/models/create_gitlab_issue_task_params.py +++ b/rootly_sdk/models/create_gitlab_issue_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_gitlab_issue_task_params_issue_type import ( - CreateGitlabIssueTaskParamsIssueType, - check_create_gitlab_issue_task_params_issue_type, -) -from ..models.create_gitlab_issue_task_params_task_type import ( - CreateGitlabIssueTaskParamsTaskType, - check_create_gitlab_issue_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_gitlab_issue_task_params_issue_type import check_create_gitlab_issue_task_params_issue_type +from ..models.create_gitlab_issue_task_params_issue_type import CreateGitlabIssueTaskParamsIssueType +from ..models.create_gitlab_issue_task_params_task_type import check_create_gitlab_issue_task_params_task_type +from ..models.create_gitlab_issue_task_params_task_type import CreateGitlabIssueTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_gitlab_issue_task_params_repository import CreateGitlabIssueTaskParamsRepository @@ -46,6 +45,8 @@ class CreateGitlabIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_gitlab_issue_task_params_repository import CreateGitlabIssueTaskParamsRepository + title = self.title repository = self.repository.to_dict() 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 4193b887..9c8be69f 100644 --- a/rootly_sdk/models/create_gitlab_issue_task_params_repository.py +++ b/rootly_sdk/models/create_gitlab_issue_task_params_repository.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGitlabIssueTaskParamsRepository") 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 2b9b4c58..7f37e176 100644 --- a/rootly_sdk/models/create_go_to_meeting_task_params.py +++ b/rootly_sdk/models/create_go_to_meeting_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_go_to_meeting_task_params_conference_call_info import ( - CreateGoToMeetingTaskParamsConferenceCallInfo, check_create_go_to_meeting_task_params_conference_call_info, ) -from ..models.create_go_to_meeting_task_params_task_type import ( - CreateGoToMeetingTaskParamsTaskType, - check_create_go_to_meeting_task_params_task_type, -) +from ..models.create_go_to_meeting_task_params_conference_call_info import CreateGoToMeetingTaskParamsConferenceCallInfo +from ..models.create_go_to_meeting_task_params_task_type import check_create_go_to_meeting_task_params_task_type +from ..models.create_go_to_meeting_task_params_task_type import CreateGoToMeetingTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_go_to_meeting_task_params_post_to_slack_channels_item import ( @@ -46,6 +47,10 @@ class CreateGoToMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_go_to_meeting_task_params_post_to_slack_channels_item import ( + CreateGoToMeetingTaskParamsPostToSlackChannelsItem, + ) + subject = self.subject task_type: str | Unset = UNSET 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 f666dea2..500cd5cf 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGoToMeetingTaskParamsPostToSlackChannelsItem") 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 84ce97a8..7ab438e6 100644 --- a/rootly_sdk/models/create_google_calendar_event_task_params.py +++ b/rootly_sdk/models/create_google_calendar_event_task_params.py @@ -1,20 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_google_calendar_event_task_params_conference_solution_key import ( - CreateGoogleCalendarEventTaskParamsConferenceSolutionKey, check_create_google_calendar_event_task_params_conference_solution_key, ) +from ..models.create_google_calendar_event_task_params_conference_solution_key import ( + CreateGoogleCalendarEventTaskParamsConferenceSolutionKey, +) from ..models.create_google_calendar_event_task_params_task_type import ( - CreateGoogleCalendarEventTaskParamsTaskType, check_create_google_calendar_event_task_params_task_type, ) +from ..models.create_google_calendar_event_task_params_task_type import CreateGoogleCalendarEventTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_google_calendar_event_task_params_post_to_slack_channels_item import ( @@ -69,6 +74,10 @@ class CreateGoogleCalendarEventTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_google_calendar_event_task_params_post_to_slack_channels_item import ( + CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem, + ) + days_until_meeting = self.days_until_meeting time_of_meeting = self.time_of_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 0720c337..1ee0ac36 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/create_google_chat_space_task_params.py b/rootly_sdk/models/create_google_chat_space_task_params.py new file mode 100644 index 00000000..8e3dab24 --- /dev/null +++ b/rootly_sdk/models/create_google_chat_space_task_params.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.create_google_chat_space_task_params_task_type import check_create_google_chat_space_task_params_task_type +from ..models.create_google_chat_space_task_params_task_type import CreateGoogleChatSpaceTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="CreateGoogleChatSpaceTaskParams") + + +@_attrs_define +class CreateGoogleChatSpaceTaskParams: + """ + Attributes: + title (str): + task_type (CreateGoogleChatSpaceTaskParamsTaskType | Unset): + description (str | Unset): + audience (str | Unset): Target audience resource name (e.g. audiences/default). Leave blank for private space. + """ + + title: str + task_type: CreateGoogleChatSpaceTaskParamsTaskType | Unset = UNSET + description: str | Unset = UNSET + audience: 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: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + description = self.description + + audience = self.audience + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "title": title, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if description is not UNSET: + field_dict["description"] = description + if audience is not UNSET: + field_dict["audience"] = audience + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + title = d.pop("title") + + _task_type = d.pop("task_type", UNSET) + task_type: CreateGoogleChatSpaceTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_create_google_chat_space_task_params_task_type(_task_type) + + description = d.pop("description", UNSET) + + audience = d.pop("audience", UNSET) + + create_google_chat_space_task_params = cls( + title=title, + task_type=task_type, + description=description, + audience=audience, + ) + + create_google_chat_space_task_params.additional_properties = d + return create_google_chat_space_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_google_chat_space_task_params_task_type.py b/rootly_sdk/models/create_google_chat_space_task_params_task_type.py new file mode 100644 index 00000000..90acf167 --- /dev/null +++ b/rootly_sdk/models/create_google_chat_space_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +CreateGoogleChatSpaceTaskParamsTaskType = Literal["create_google_chat_space"] + +CREATE_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: set[CreateGoogleChatSpaceTaskParamsTaskType] = { + "create_google_chat_space", +} + + +def check_create_google_chat_space_task_params_task_type( + value: str | None, +) -> CreateGoogleChatSpaceTaskParamsTaskType | None: + if value is None: + return None + if value in CREATE_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(CreateGoogleChatSpaceTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {CREATE_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) 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 3d993738..425c7a82 100644 --- a/rootly_sdk/models/create_google_docs_page_task_params.py +++ b/rootly_sdk/models/create_google_docs_page_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_google_docs_page_task_params_task_type import ( - CreateGoogleDocsPageTaskParamsTaskType, - check_create_google_docs_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_google_docs_page_task_params_task_type import check_create_google_docs_page_task_params_task_type +from ..models.create_google_docs_page_task_params_task_type import CreateGoogleDocsPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_google_docs_page_task_params_drive import CreateGoogleDocsPageTaskParamsDrive from ..models.create_google_docs_page_task_params_parent_folder import CreateGoogleDocsPageTaskParamsParentFolder @@ -33,6 +34,8 @@ class CreateGoogleDocsPageTaskParams: 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 + include_overview (bool | Unset): Default: True. + include_timeline (bool | Unset): Default: True. """ title: str @@ -44,9 +47,16 @@ class CreateGoogleDocsPageTaskParams: content: str | Unset = UNSET template_id: str | Unset = UNSET permissions: str | Unset = UNSET + include_overview: bool | Unset = True + include_timeline: bool | Unset = True additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_google_docs_page_task_params_drive import CreateGoogleDocsPageTaskParamsDrive + from ..models.create_google_docs_page_task_params_parent_folder import ( + CreateGoogleDocsPageTaskParamsParentFolder, + ) + title = self.title task_type: str | Unset = UNSET @@ -71,6 +81,10 @@ def to_dict(self) -> dict[str, Any]: permissions = self.permissions + include_overview = self.include_overview + + include_timeline = self.include_timeline + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -94,6 +108,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["template_id"] = template_id if permissions is not UNSET: field_dict["permissions"] = permissions + if include_overview is not UNSET: + field_dict["include_overview"] = include_overview + if include_timeline is not UNSET: + field_dict["include_timeline"] = include_timeline return field_dict @@ -138,6 +156,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: permissions = d.pop("permissions", UNSET) + include_overview = d.pop("include_overview", UNSET) + + include_timeline = d.pop("include_timeline", UNSET) + create_google_docs_page_task_params = cls( title=title, task_type=task_type, @@ -148,6 +170,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content=content, template_id=template_id, permissions=permissions, + include_overview=include_overview, + include_timeline=include_timeline, ) create_google_docs_page_task_params.additional_properties = d 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 ed347ba9..2cbacae9 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGoogleDocsPageTaskParamsDrive") 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 0f00ca78..fa65cf49 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGoogleDocsPageTaskParamsParentFolder") 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 f685b609..716c87cc 100644 --- a/rootly_sdk/models/create_google_docs_permissions_task_params.py +++ b/rootly_sdk/models/create_google_docs_permissions_task_params.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_google_docs_permissions_task_params_task_type import ( - CreateGoogleDocsPermissionsTaskParamsTaskType, check_create_google_docs_permissions_task_params_task_type, ) +from ..models.create_google_docs_permissions_task_params_task_type import CreateGoogleDocsPermissionsTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="CreateGoogleDocsPermissionsTaskParams") 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 8800e746..907dc533 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_google_gemini_chat_completion_task_params_task_type import ( - CreateGoogleGeminiChatCompletionTaskParamsTaskType, check_create_google_gemini_chat_completion_task_params_task_type, ) +from ..models.create_google_gemini_chat_completion_task_params_task_type import ( + CreateGoogleGeminiChatCompletionTaskParamsTaskType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_google_gemini_chat_completion_task_params_model import ( @@ -38,6 +43,10 @@ class CreateGoogleGeminiChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_google_gemini_chat_completion_task_params_model import ( + CreateGoogleGeminiChatCompletionTaskParamsModel, + ) + model = self.model.to_dict() prompt = self.prompt 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 9eb379c8..1567876f 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGoogleGeminiChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_google_meeting_task_params.py b/rootly_sdk/models/create_google_meeting_task_params.py index f567d61f..137bb791 100644 --- a/rootly_sdk/models/create_google_meeting_task_params.py +++ b/rootly_sdk/models/create_google_meeting_task_params.py @@ -1,24 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_google_meeting_task_params_conference_solution_key import ( - CreateGoogleMeetingTaskParamsConferenceSolutionKey, check_create_google_meeting_task_params_conference_solution_key, ) +from ..models.create_google_meeting_task_params_conference_solution_key import ( + CreateGoogleMeetingTaskParamsConferenceSolutionKey, +) from ..models.create_google_meeting_task_params_recording_mode import ( - CreateGoogleMeetingTaskParamsRecordingMode, check_create_google_meeting_task_params_recording_mode, ) -from ..models.create_google_meeting_task_params_task_type import ( - CreateGoogleMeetingTaskParamsTaskType, - check_create_google_meeting_task_params_task_type, -) +from ..models.create_google_meeting_task_params_recording_mode import CreateGoogleMeetingTaskParamsRecordingMode +from ..models.create_google_meeting_task_params_task_type import check_create_google_meeting_task_params_task_type +from ..models.create_google_meeting_task_params_task_type import CreateGoogleMeetingTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_google_meeting_task_params_post_to_slack_channels_item import ( @@ -57,6 +60,10 @@ class CreateGoogleMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_google_meeting_task_params_post_to_slack_channels_item import ( + CreateGoogleMeetingTaskParamsPostToSlackChannelsItem, + ) + summary: None | str summary = self.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 091a9f63..22b44767 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateGoogleMeetingTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/create_incident_postmortem_task_params.py b/rootly_sdk/models/create_incident_postmortem_task_params.py index 8c8d0253..48f794d8 100644 --- a/rootly_sdk/models/create_incident_postmortem_task_params.py +++ b/rootly_sdk/models/create_incident_postmortem_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_incident_postmortem_task_params_task_type import ( - CreateIncidentPostmortemTaskParamsTaskType, check_create_incident_postmortem_task_params_task_type, ) +from ..models.create_incident_postmortem_task_params_task_type import CreateIncidentPostmortemTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_incident_postmortem_task_params_template_type_0 import ( 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 5baec603..15ac052e 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateIncidentPostmortemTaskParamsTemplateType0") diff --git a/rootly_sdk/models/create_incident_task_params.py b/rootly_sdk/models/create_incident_task_params.py index 0431e24c..e0f9276b 100644 --- a/rootly_sdk/models/create_incident_task_params.py +++ b/rootly_sdk/models/create_incident_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_incident_task_params_task_type import ( - CreateIncidentTaskParamsTaskType, - check_create_incident_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_incident_task_params_task_type import check_create_incident_task_params_task_type +from ..models.create_incident_task_params_task_type import CreateIncidentTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CreateIncidentTaskParams") diff --git a/rootly_sdk/models/create_jira_issue_task_params.py b/rootly_sdk/models/create_jira_issue_task_params.py index c46a1a12..bee594a5 100644 --- a/rootly_sdk/models/create_jira_issue_task_params.py +++ b/rootly_sdk/models/create_jira_issue_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_jira_issue_task_params_task_type import ( - CreateJiraIssueTaskParamsTaskType, - check_create_jira_issue_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_jira_issue_task_params_task_type import check_create_jira_issue_task_params_task_type +from ..models.create_jira_issue_task_params_task_type import CreateJiraIssueTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_jira_issue_task_params_integration import CreateJiraIssueTaskParamsIntegration from ..models.create_jira_issue_task_params_issue_type import CreateJiraIssueTaskParamsIssueType @@ -61,6 +62,11 @@ class CreateJiraIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_jira_issue_task_params_integration import CreateJiraIssueTaskParamsIntegration + from ..models.create_jira_issue_task_params_status import CreateJiraIssueTaskParamsStatus + from ..models.create_jira_issue_task_params_priority import CreateJiraIssueTaskParamsPriority + from ..models.create_jira_issue_task_params_issue_type import CreateJiraIssueTaskParamsIssueType + title = self.title project_key = self.project_key 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 9537af66..9e5542c6 100644 --- a/rootly_sdk/models/create_jira_issue_task_params_integration.py +++ b/rootly_sdk/models/create_jira_issue_task_params_integration.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJiraIssueTaskParamsIntegration") 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 c774aed2..fcf62409 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJiraIssueTaskParamsIssueType") 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 cca943f4..eb94a10f 100644 --- a/rootly_sdk/models/create_jira_issue_task_params_priority.py +++ b/rootly_sdk/models/create_jira_issue_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJiraIssueTaskParamsPriority") 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 719aa1ff..8bfcf1fc 100644 --- a/rootly_sdk/models/create_jira_issue_task_params_status.py +++ b/rootly_sdk/models/create_jira_issue_task_params_status.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJiraIssueTaskParamsStatus") diff --git a/rootly_sdk/models/create_jira_subtask_task_params.py b/rootly_sdk/models/create_jira_subtask_task_params.py index 3320dad5..cdfe549c 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params.py +++ b/rootly_sdk/models/create_jira_subtask_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_jira_subtask_task_params_task_type import ( - CreateJiraSubtaskTaskParamsTaskType, - check_create_jira_subtask_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_jira_subtask_task_params_task_type import check_create_jira_subtask_task_params_task_type +from ..models.create_jira_subtask_task_params_task_type import CreateJiraSubtaskTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_jira_subtask_task_params_integration import CreateJiraSubtaskTaskParamsIntegration from ..models.create_jira_subtask_task_params_priority import CreateJiraSubtaskTaskParamsPriority @@ -63,6 +64,13 @@ class CreateJiraSubtaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_jira_subtask_task_params_status import CreateJiraSubtaskTaskParamsStatus + from ..models.create_jira_subtask_task_params_priority import CreateJiraSubtaskTaskParamsPriority + from ..models.create_jira_subtask_task_params_subtask_issue_type import ( + CreateJiraSubtaskTaskParamsSubtaskIssueType, + ) + from ..models.create_jira_subtask_task_params_integration import CreateJiraSubtaskTaskParamsIntegration + project_key = self.project_key parent_issue_id = self.parent_issue_id 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 7ce38be3..735db331 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params_integration.py +++ b/rootly_sdk/models/create_jira_subtask_task_params_integration.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJiraSubtaskTaskParamsIntegration") 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 d6f31b38..6ea34c21 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params_priority.py +++ b/rootly_sdk/models/create_jira_subtask_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJiraSubtaskTaskParamsPriority") 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 5c9cbdd1..a517884d 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params_status.py +++ b/rootly_sdk/models/create_jira_subtask_task_params_status.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJiraSubtaskTaskParamsStatus") 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 a99b33ac..95aa4a07 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJiraSubtaskTaskParamsSubtaskIssueType") diff --git a/rootly_sdk/models/create_jsmops_alert_task_params.py b/rootly_sdk/models/create_jsmops_alert_task_params.py index 10b48b77..d7232794 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.create_jsmops_alert_task_params_priority import check_create_jsmops_alert_task_params_priority +from ..models.create_jsmops_alert_task_params_priority import CreateJsmopsAlertTaskParamsPriority +from ..models.create_jsmops_alert_task_params_task_type import check_create_jsmops_alert_task_params_task_type +from ..models.create_jsmops_alert_task_params_task_type import CreateJsmopsAlertTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + 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 @@ -54,6 +53,11 @@ class CreateJsmopsAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_jsmops_alert_task_params_users_item import CreateJsmopsAlertTaskParamsUsersItem + from ..models.create_jsmops_alert_task_params_schedules_item import CreateJsmopsAlertTaskParamsSchedulesItem + from ..models.create_jsmops_alert_task_params_escalations_item import CreateJsmopsAlertTaskParamsEscalationsItem + from ..models.create_jsmops_alert_task_params_teams_item import CreateJsmopsAlertTaskParamsTeamsItem + message = self.message task_type: str | Unset = UNSET 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 index 933c82bf..d00c5f04 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params_escalations_item.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params_escalations_item.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsEscalationsItem") 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 index 0ab25c3f..d189e271 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params_schedules_item.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params_schedules_item.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsSchedulesItem") 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 index 802141da..e038c81b 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params_teams_item.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params_teams_item.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsTeamsItem") 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 index 92d7c0a2..cb721771 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params_users_item.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params_users_item.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsUsersItem") 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 7bd6f8ce..60844aa8 100644 --- a/rootly_sdk/models/create_linear_issue_comment_task_params.py +++ b/rootly_sdk/models/create_linear_issue_comment_task_params.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_linear_issue_comment_task_params_task_type import ( - CreateLinearIssueCommentTaskParamsTaskType, check_create_linear_issue_comment_task_params_task_type, ) +from ..models.create_linear_issue_comment_task_params_task_type import CreateLinearIssueCommentTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="CreateLinearIssueCommentTaskParams") diff --git a/rootly_sdk/models/create_linear_issue_task_params.py b/rootly_sdk/models/create_linear_issue_task_params.py index 6c282acc..e155eb27 100644 --- a/rootly_sdk/models/create_linear_issue_task_params.py +++ b/rootly_sdk/models/create_linear_issue_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_linear_issue_task_params_task_type import ( - CreateLinearIssueTaskParamsTaskType, - check_create_linear_issue_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_linear_issue_task_params_task_type import check_create_linear_issue_task_params_task_type +from ..models.create_linear_issue_task_params_task_type import CreateLinearIssueTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_linear_issue_task_params_labels_item import CreateLinearIssueTaskParamsLabelsItem from ..models.create_linear_issue_task_params_priority import CreateLinearIssueTaskParamsPriority @@ -36,6 +37,8 @@ class CreateLinearIssueTaskParams: labels (list[CreateLinearIssueTaskParamsLabelsItem] | Unset): priority (CreateLinearIssueTaskParamsPriority | Unset): The priority id and display name assign_user_email (str | Unset): The assigned user's email + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ title: str @@ -47,9 +50,16 @@ class CreateLinearIssueTaskParams: labels: list[CreateLinearIssueTaskParamsLabelsItem] | Unset = UNSET priority: CreateLinearIssueTaskParamsPriority | Unset = UNSET assign_user_email: str | 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]: + from ..models.create_linear_issue_task_params_labels_item import CreateLinearIssueTaskParamsLabelsItem + from ..models.create_linear_issue_task_params_team import CreateLinearIssueTaskParamsTeam + from ..models.create_linear_issue_task_params_state import CreateLinearIssueTaskParamsState + from ..models.create_linear_issue_task_params_priority import CreateLinearIssueTaskParamsPriority + from ..models.create_linear_issue_task_params_project import CreateLinearIssueTaskParamsProject + title = self.title team = self.team.to_dict() @@ -79,6 +89,12 @@ def to_dict(self) -> dict[str, Any]: assign_user_email = self.assign_user_email + 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 + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -100,6 +116,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["priority"] = priority if assign_user_email is not UNSET: field_dict["assign_user_email"] = assign_user_email + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -152,6 +170,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assign_user_email = d.pop("assign_user_email", UNSET) + 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 | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + create_linear_issue_task_params = cls( title=title, team=team, @@ -162,6 +189,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: labels=labels, priority=priority, assign_user_email=assign_user_email, + custom_fields_mapping=custom_fields_mapping, ) create_linear_issue_task_params.additional_properties = d 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 d2c67738..577cdd5e 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateLinearIssueTaskParamsLabelsItem") 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 d281895e..ebc8f641 100644 --- a/rootly_sdk/models/create_linear_issue_task_params_priority.py +++ b/rootly_sdk/models/create_linear_issue_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateLinearIssueTaskParamsPriority") 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 02bf0115..a98ebe4e 100644 --- a/rootly_sdk/models/create_linear_issue_task_params_project.py +++ b/rootly_sdk/models/create_linear_issue_task_params_project.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateLinearIssueTaskParamsProject") 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 4bbea5fa..4d14709b 100644 --- a/rootly_sdk/models/create_linear_issue_task_params_state.py +++ b/rootly_sdk/models/create_linear_issue_task_params_state.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateLinearIssueTaskParamsState") 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 6a4aaa55..e70c46be 100644 --- a/rootly_sdk/models/create_linear_issue_task_params_team.py +++ b/rootly_sdk/models/create_linear_issue_task_params_team.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateLinearIssueTaskParamsTeam") 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 5843d380..eccd0009 100644 --- a/rootly_sdk/models/create_linear_subtask_issue_task_params.py +++ b/rootly_sdk/models/create_linear_subtask_issue_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_linear_subtask_issue_task_params_task_type import ( - CreateLinearSubtaskIssueTaskParamsTaskType, check_create_linear_subtask_issue_task_params_task_type, ) +from ..models.create_linear_subtask_issue_task_params_task_type import CreateLinearSubtaskIssueTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_linear_subtask_issue_task_params_labels_item import ( @@ -35,6 +38,8 @@ class CreateLinearSubtaskIssueTaskParams: priority (CreateLinearSubtaskIssueTaskParamsPriority | Unset): The priority id and display name labels (list[CreateLinearSubtaskIssueTaskParamsLabelsItem] | Unset): assign_user_email (str | Unset): The assigned user's email + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ parent_issue_id: str @@ -45,9 +50,16 @@ class CreateLinearSubtaskIssueTaskParams: priority: CreateLinearSubtaskIssueTaskParamsPriority | Unset = UNSET labels: list[CreateLinearSubtaskIssueTaskParamsLabelsItem] | Unset = UNSET assign_user_email: str | 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]: + from ..models.create_linear_subtask_issue_task_params_state import CreateLinearSubtaskIssueTaskParamsState + from ..models.create_linear_subtask_issue_task_params_priority import CreateLinearSubtaskIssueTaskParamsPriority + from ..models.create_linear_subtask_issue_task_params_labels_item import ( + CreateLinearSubtaskIssueTaskParamsLabelsItem, + ) + parent_issue_id = self.parent_issue_id title = self.title @@ -73,6 +85,12 @@ def to_dict(self) -> dict[str, Any]: assign_user_email = self.assign_user_email + 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 + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -92,6 +110,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["labels"] = labels if assign_user_email is not UNSET: field_dict["assign_user_email"] = assign_user_email + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -137,6 +157,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: assign_user_email = d.pop("assign_user_email", UNSET) + 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 | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + create_linear_subtask_issue_task_params = cls( parent_issue_id=parent_issue_id, title=title, @@ -146,6 +175,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: priority=priority, labels=labels, assign_user_email=assign_user_email, + custom_fields_mapping=custom_fields_mapping, ) create_linear_subtask_issue_task_params.additional_properties = d 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 ca04ec13..97ae6ffc 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateLinearSubtaskIssueTaskParamsLabelsItem") 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 d605d101..9bf8e3b4 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateLinearSubtaskIssueTaskParamsPriority") 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 8c1e27be..f39c6268 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateLinearSubtaskIssueTaskParamsState") 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 03b404cc..282d9344 100644 --- a/rootly_sdk/models/create_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_channel_task_params.py @@ -1,20 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_microsoft_teams_channel_task_params_private import ( - CreateMicrosoftTeamsChannelTaskParamsPrivate, check_create_microsoft_teams_channel_task_params_private, ) +from ..models.create_microsoft_teams_channel_task_params_private import CreateMicrosoftTeamsChannelTaskParamsPrivate from ..models.create_microsoft_teams_channel_task_params_task_type import ( - CreateMicrosoftTeamsChannelTaskParamsTaskType, check_create_microsoft_teams_channel_task_params_task_type, ) +from ..models.create_microsoft_teams_channel_task_params_task_type import CreateMicrosoftTeamsChannelTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_microsoft_teams_channel_task_params_team import CreateMicrosoftTeamsChannelTaskParamsTeam @@ -27,31 +30,31 @@ class CreateMicrosoftTeamsChannelTaskParams: """ Attributes: + team (CreateMicrosoftTeamsChannelTaskParamsTeam): title (str): Microsoft Team channel title task_type (CreateMicrosoftTeamsChannelTaskParamsTaskType | Unset): - team (CreateMicrosoftTeamsChannelTaskParamsTeam | Unset): description (str | Unset): Microsoft Team channel description private (CreateMicrosoftTeamsChannelTaskParamsPrivate | Unset): Default: 'auto'. """ + team: CreateMicrosoftTeamsChannelTaskParamsTeam title: str 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]: + from ..models.create_microsoft_teams_channel_task_params_team import CreateMicrosoftTeamsChannelTaskParamsTeam + + team = self.team.to_dict() + title = self.title task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type - team: dict[str, Any] | Unset = UNSET - if not isinstance(self.team, Unset): - team = self.team.to_dict() - description = self.description private: str | Unset = UNSET @@ -62,13 +65,12 @@ def to_dict(self) -> dict[str, Any]: field_dict.update(self.additional_properties) field_dict.update( { + "team": team, "title": title, } ) if task_type is not UNSET: field_dict["task_type"] = task_type - if team is not UNSET: - field_dict["team"] = team if description is not UNSET: field_dict["description"] = description if private is not UNSET: @@ -81,6 +83,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_microsoft_teams_channel_task_params_team import CreateMicrosoftTeamsChannelTaskParamsTeam d = dict(src_dict) + team = CreateMicrosoftTeamsChannelTaskParamsTeam.from_dict(d.pop("team")) + title = d.pop("title") _task_type = d.pop("task_type", UNSET) @@ -90,13 +94,6 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: task_type = check_create_microsoft_teams_channel_task_params_task_type(_task_type) - _team = d.pop("team", UNSET) - team: CreateMicrosoftTeamsChannelTaskParamsTeam | Unset - if isinstance(_team, Unset): - team = UNSET - else: - team = CreateMicrosoftTeamsChannelTaskParamsTeam.from_dict(_team) - description = d.pop("description", UNSET) _private = d.pop("private", UNSET) @@ -107,9 +104,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: private = check_create_microsoft_teams_channel_task_params_private(_private) create_microsoft_teams_channel_task_params = cls( + team=team, title=title, task_type=task_type, - team=team, description=description, private=private, ) 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 3d7128e5..2c52dda6 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateMicrosoftTeamsChannelTaskParamsTeam") 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 00563ed0..c200b790 100644 --- a/rootly_sdk/models/create_microsoft_teams_chat_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_chat_task_params.py @@ -1,20 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_microsoft_teams_chat_task_params_chat_type import ( - CreateMicrosoftTeamsChatTaskParamsChatType, check_create_microsoft_teams_chat_task_params_chat_type, ) +from ..models.create_microsoft_teams_chat_task_params_chat_type import CreateMicrosoftTeamsChatTaskParamsChatType from ..models.create_microsoft_teams_chat_task_params_task_type import ( - CreateMicrosoftTeamsChatTaskParamsTaskType, check_create_microsoft_teams_chat_task_params_task_type, ) +from ..models.create_microsoft_teams_chat_task_params_task_type import CreateMicrosoftTeamsChatTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_microsoft_teams_chat_task_params_members_item import ( @@ -42,6 +45,10 @@ class CreateMicrosoftTeamsChatTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_microsoft_teams_chat_task_params_members_item import ( + CreateMicrosoftTeamsChatTaskParamsMembersItem, + ) + members = [] for members_item_data in self.members: members_item = members_item_data.to_dict() 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 714d243e..77100602 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateMicrosoftTeamsChatTaskParamsMembersItem") 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 96f5022e..ff526dde 100644 --- a/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py @@ -1,20 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_microsoft_teams_meeting_task_params_recording_mode import ( - CreateMicrosoftTeamsMeetingTaskParamsRecordingMode, check_create_microsoft_teams_meeting_task_params_recording_mode, ) +from ..models.create_microsoft_teams_meeting_task_params_recording_mode import ( + CreateMicrosoftTeamsMeetingTaskParamsRecordingMode, +) from ..models.create_microsoft_teams_meeting_task_params_task_type import ( - CreateMicrosoftTeamsMeetingTaskParamsTaskType, check_create_microsoft_teams_meeting_task_params_task_type, ) +from ..models.create_microsoft_teams_meeting_task_params_task_type import CreateMicrosoftTeamsMeetingTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_microsoft_teams_meeting_task_params_post_to_slack_channels_item import ( @@ -50,6 +55,10 @@ class CreateMicrosoftTeamsMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_microsoft_teams_meeting_task_params_post_to_slack_channels_item import ( + CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem, + ) + name = self.name subject = self.subject 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 dc99a191..cac10453 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem") 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 98d6bef7..24d757d0 100644 --- a/rootly_sdk/models/create_mistral_chat_completion_task_params.py +++ b/rootly_sdk/models/create_mistral_chat_completion_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_mistral_chat_completion_task_params_task_type import ( - CreateMistralChatCompletionTaskParamsTaskType, check_create_mistral_chat_completion_task_params_task_type, ) +from ..models.create_mistral_chat_completion_task_params_task_type import CreateMistralChatCompletionTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_mistral_chat_completion_task_params_model import CreateMistralChatCompletionTaskParamsModel @@ -42,6 +45,8 @@ class CreateMistralChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_mistral_chat_completion_task_params_model import CreateMistralChatCompletionTaskParamsModel + model = self.model.to_dict() prompt = self.prompt 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 7cda8fef..33ddb6a8 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateMistralChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_motion_task_task_params.py b/rootly_sdk/models/create_motion_task_task_params.py index acd46aab..63f94af2 100644 --- a/rootly_sdk/models/create_motion_task_task_params.py +++ b/rootly_sdk/models/create_motion_task_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_motion_task_task_params_task_type import ( - CreateMotionTaskTaskParamsTaskType, - check_create_motion_task_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_motion_task_task_params_task_type import check_create_motion_task_task_params_task_type +from ..models.create_motion_task_task_params_task_type import CreateMotionTaskTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_motion_task_task_params_priority import CreateMotionTaskTaskParamsPriority from ..models.create_motion_task_task_params_project import CreateMotionTaskTaskParamsProject @@ -51,6 +52,11 @@ class CreateMotionTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_motion_task_task_params_workspace import CreateMotionTaskTaskParamsWorkspace + from ..models.create_motion_task_task_params_project import CreateMotionTaskTaskParamsProject + from ..models.create_motion_task_task_params_priority import CreateMotionTaskTaskParamsPriority + from ..models.create_motion_task_task_params_status import CreateMotionTaskTaskParamsStatus + workspace = self.workspace.to_dict() title = self.title 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 493c01f5..122da765 100644 --- a/rootly_sdk/models/create_motion_task_task_params_priority.py +++ b/rootly_sdk/models/create_motion_task_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateMotionTaskTaskParamsPriority") 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 4843b381..435124ef 100644 --- a/rootly_sdk/models/create_motion_task_task_params_project.py +++ b/rootly_sdk/models/create_motion_task_task_params_project.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateMotionTaskTaskParamsProject") 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 97abb0ea..8a4a7433 100644 --- a/rootly_sdk/models/create_motion_task_task_params_status.py +++ b/rootly_sdk/models/create_motion_task_task_params_status.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateMotionTaskTaskParamsStatus") 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 13cf3220..52a930b5 100644 --- a/rootly_sdk/models/create_motion_task_task_params_workspace.py +++ b/rootly_sdk/models/create_motion_task_task_params_workspace.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateMotionTaskTaskParamsWorkspace") diff --git a/rootly_sdk/models/create_notion_page_task_params.py b/rootly_sdk/models/create_notion_page_task_params.py index e07077d6..cec234df 100644 --- a/rootly_sdk/models/create_notion_page_task_params.py +++ b/rootly_sdk/models/create_notion_page_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_notion_page_task_params_task_type import ( - CreateNotionPageTaskParamsTaskType, - check_create_notion_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_notion_page_task_params_task_type import check_create_notion_page_task_params_task_type +from ..models.create_notion_page_task_params_task_type import CreateNotionPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_notion_page_task_params_parent_page import CreateNotionPageTaskParamsParentPage @@ -45,6 +46,8 @@ class CreateNotionPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_notion_page_task_params_parent_page import CreateNotionPageTaskParamsParentPage + title = self.title parent_page = self.parent_page.to_dict() 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 08a6d60c..b23d3737 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateNotionPageTaskParamsParentPage") 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 03ea154c..747ac536 100644 --- a/rootly_sdk/models/create_openai_chat_completion_task_params.py +++ b/rootly_sdk/models/create_openai_chat_completion_task_params.py @@ -1,24 +1,31 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_openai_chat_completion_task_params_reasoning_effort import ( - CreateOpenaiChatCompletionTaskParamsReasoningEffort, check_create_openai_chat_completion_task_params_reasoning_effort, ) +from ..models.create_openai_chat_completion_task_params_reasoning_effort import ( + CreateOpenaiChatCompletionTaskParamsReasoningEffort, +) from ..models.create_openai_chat_completion_task_params_reasoning_summary import ( - CreateOpenaiChatCompletionTaskParamsReasoningSummary, check_create_openai_chat_completion_task_params_reasoning_summary, ) +from ..models.create_openai_chat_completion_task_params_reasoning_summary import ( + CreateOpenaiChatCompletionTaskParamsReasoningSummary, +) from ..models.create_openai_chat_completion_task_params_task_type import ( - CreateOpenaiChatCompletionTaskParamsTaskType, check_create_openai_chat_completion_task_params_task_type, ) +from ..models.create_openai_chat_completion_task_params_task_type import CreateOpenaiChatCompletionTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_openai_chat_completion_task_params_model import CreateOpenaiChatCompletionTaskParamsModel @@ -56,6 +63,8 @@ class CreateOpenaiChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_openai_chat_completion_task_params_model import CreateOpenaiChatCompletionTaskParamsModel + model = self.model.to_dict() prompt = self.prompt 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 927f4f61..26538120 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateOpenaiChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_opsgenie_alert_task_params.py b/rootly_sdk/models/create_opsgenie_alert_task_params.py index 47f1806c..3c33c358 100644 --- a/rootly_sdk/models/create_opsgenie_alert_task_params.py +++ b/rootly_sdk/models/create_opsgenie_alert_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_opsgenie_alert_task_params_priority import ( - CreateOpsgenieAlertTaskParamsPriority, - check_create_opsgenie_alert_task_params_priority, -) -from ..models.create_opsgenie_alert_task_params_task_type import ( - CreateOpsgenieAlertTaskParamsTaskType, - check_create_opsgenie_alert_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_opsgenie_alert_task_params_priority import check_create_opsgenie_alert_task_params_priority +from ..models.create_opsgenie_alert_task_params_priority import CreateOpsgenieAlertTaskParamsPriority +from ..models.create_opsgenie_alert_task_params_task_type import check_create_opsgenie_alert_task_params_task_type +from ..models.create_opsgenie_alert_task_params_task_type import CreateOpsgenieAlertTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_opsgenie_alert_task_params_escalations_item import CreateOpsgenieAlertTaskParamsEscalationsItem from ..models.create_opsgenie_alert_task_params_schedules_item import CreateOpsgenieAlertTaskParamsSchedulesItem @@ -54,6 +53,13 @@ class CreateOpsgenieAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_opsgenie_alert_task_params_users_item import CreateOpsgenieAlertTaskParamsUsersItem + from ..models.create_opsgenie_alert_task_params_teams_item import CreateOpsgenieAlertTaskParamsTeamsItem + from ..models.create_opsgenie_alert_task_params_schedules_item import CreateOpsgenieAlertTaskParamsSchedulesItem + from ..models.create_opsgenie_alert_task_params_escalations_item import ( + CreateOpsgenieAlertTaskParamsEscalationsItem, + ) + message = self.message task_type: str | Unset = 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 57756e03..5c2e34df 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateOpsgenieAlertTaskParamsEscalationsItem") 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 47a772c1..28508062 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateOpsgenieAlertTaskParamsSchedulesItem") 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 4a3bbc40..27fb2ceb 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateOpsgenieAlertTaskParamsTeamsItem") 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 940b0635..510ab306 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateOpsgenieAlertTaskParamsUsersItem") diff --git a/rootly_sdk/models/create_outlook_event_task_params.py b/rootly_sdk/models/create_outlook_event_task_params.py index 585ca1e6..6b951b1d 100644 --- a/rootly_sdk/models/create_outlook_event_task_params.py +++ b/rootly_sdk/models/create_outlook_event_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_outlook_event_task_params_task_type import ( - CreateOutlookEventTaskParamsTaskType, - check_create_outlook_event_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_outlook_event_task_params_task_type import check_create_outlook_event_task_params_task_type +from ..models.create_outlook_event_task_params_task_type import CreateOutlookEventTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_outlook_event_task_params_calendar import CreateOutlookEventTaskParamsCalendar from ..models.create_outlook_event_task_params_post_to_slack_channels_item import ( @@ -57,6 +58,11 @@ class CreateOutlookEventTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_outlook_event_task_params_calendar import CreateOutlookEventTaskParamsCalendar + from ..models.create_outlook_event_task_params_post_to_slack_channels_item import ( + CreateOutlookEventTaskParamsPostToSlackChannelsItem, + ) + calendar = self.calendar.to_dict() days_until_meeting = self.days_until_meeting 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 887dfaf4..1ff6cff1 100644 --- a/rootly_sdk/models/create_outlook_event_task_params_calendar.py +++ b/rootly_sdk/models/create_outlook_event_task_params_calendar.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateOutlookEventTaskParamsCalendar") 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 fefe788e..84b0e936 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateOutlookEventTaskParamsPostToSlackChannelsItem") 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 f40fb4aa..8125b9db 100644 --- a/rootly_sdk/models/create_pagerduty_status_update_task_params.py +++ b/rootly_sdk/models/create_pagerduty_status_update_task_params.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_pagerduty_status_update_task_params_task_type import ( - CreatePagerdutyStatusUpdateTaskParamsTaskType, check_create_pagerduty_status_update_task_params_task_type, ) +from ..models.create_pagerduty_status_update_task_params_task_type import CreatePagerdutyStatusUpdateTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="CreatePagerdutyStatusUpdateTaskParams") diff --git a/rootly_sdk/models/create_pagertree_alert_task_params.py b/rootly_sdk/models/create_pagertree_alert_task_params.py index 8ea30592..7e3df8c9 100644 --- a/rootly_sdk/models/create_pagertree_alert_task_params.py +++ b/rootly_sdk/models/create_pagertree_alert_task_params.py @@ -1,25 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_pagertree_alert_task_params_severity import ( - CreatePagertreeAlertTaskParamsSeverity, - check_create_pagertree_alert_task_params_severity, -) -from ..models.create_pagertree_alert_task_params_task_type import ( - CreatePagertreeAlertTaskParamsTaskType, - check_create_pagertree_alert_task_params_task_type, -) -from ..models.create_pagertree_alert_task_params_urgency import ( - CreatePagertreeAlertTaskParamsUrgency, - check_create_pagertree_alert_task_params_urgency, -) from ..types import UNSET, Unset +from ..models.create_pagertree_alert_task_params_severity import check_create_pagertree_alert_task_params_severity +from ..models.create_pagertree_alert_task_params_severity import CreatePagertreeAlertTaskParamsSeverity +from ..models.create_pagertree_alert_task_params_task_type import check_create_pagertree_alert_task_params_task_type +from ..models.create_pagertree_alert_task_params_task_type import CreatePagertreeAlertTaskParamsTaskType +from ..models.create_pagertree_alert_task_params_urgency import check_create_pagertree_alert_task_params_urgency +from ..models.create_pagertree_alert_task_params_urgency import CreatePagertreeAlertTaskParamsUrgency +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_pagertree_alert_task_params_teams_item import CreatePagertreeAlertTaskParamsTeamsItem from ..models.create_pagertree_alert_task_params_users_item import CreatePagertreeAlertTaskParamsUsersItem @@ -53,6 +50,9 @@ class CreatePagertreeAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_pagertree_alert_task_params_teams_item import CreatePagertreeAlertTaskParamsTeamsItem + from ..models.create_pagertree_alert_task_params_users_item import CreatePagertreeAlertTaskParamsUsersItem + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type 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 5d81a118..e8b83efe 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreatePagertreeAlertTaskParamsTeamsItem") 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 bfe6bbb0..c88dafcb 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreatePagertreeAlertTaskParamsUsersItem") diff --git a/rootly_sdk/models/create_quip_page_task_params.py b/rootly_sdk/models/create_quip_page_task_params.py index 9265d881..c70cc0b3 100644 --- a/rootly_sdk/models/create_quip_page_task_params.py +++ b/rootly_sdk/models/create_quip_page_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_quip_page_task_params_task_type import ( - CreateQuipPageTaskParamsTaskType, - check_create_quip_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_quip_page_task_params_task_type import check_create_quip_page_task_params_task_type +from ..models.create_quip_page_task_params_task_type import CreateQuipPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CreateQuipPageTaskParams") 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 a6f71fb9..08960098 100644 --- a/rootly_sdk/models/create_service_now_incident_task_params.py +++ b/rootly_sdk/models/create_service_now_incident_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_service_now_incident_task_params_task_type import ( - CreateServiceNowIncidentTaskParamsTaskType, check_create_service_now_incident_task_params_task_type, ) +from ..models.create_service_now_incident_task_params_task_type import CreateServiceNowIncidentTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_service_now_incident_task_params_completion import CreateServiceNowIncidentTaskParamsCompletion @@ -42,6 +45,11 @@ class CreateServiceNowIncidentTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_service_now_incident_task_params_completion import ( + CreateServiceNowIncidentTaskParamsCompletion, + ) + from ..models.create_service_now_incident_task_params_priority import CreateServiceNowIncidentTaskParamsPriority + title = self.title task_type: str | Unset = 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 550f0f18..0424ecab 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateServiceNowIncidentTaskParamsCompletion") 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 186be050..534a9ff4 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateServiceNowIncidentTaskParamsPriority") diff --git a/rootly_sdk/models/create_sharepoint_page_task_params.py b/rootly_sdk/models/create_sharepoint_page_task_params.py index d914148c..a80751c8 100644 --- a/rootly_sdk/models/create_sharepoint_page_task_params.py +++ b/rootly_sdk/models/create_sharepoint_page_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_sharepoint_page_task_params_task_type import ( - CreateSharepointPageTaskParamsTaskType, - check_create_sharepoint_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_sharepoint_page_task_params_task_type import check_create_sharepoint_page_task_params_task_type +from ..models.create_sharepoint_page_task_params_task_type import CreateSharepointPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_sharepoint_page_task_params_drive import CreateSharepointPageTaskParamsDrive from ..models.create_sharepoint_page_task_params_parent_folder import CreateSharepointPageTaskParamsParentFolder @@ -48,6 +49,10 @@ class CreateSharepointPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_sharepoint_page_task_params_site import CreateSharepointPageTaskParamsSite + from ..models.create_sharepoint_page_task_params_drive import CreateSharepointPageTaskParamsDrive + from ..models.create_sharepoint_page_task_params_parent_folder import CreateSharepointPageTaskParamsParentFolder + title = self.title site = self.site.to_dict() 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 cbf15f10..e5a4705d 100644 --- a/rootly_sdk/models/create_sharepoint_page_task_params_drive.py +++ b/rootly_sdk/models/create_sharepoint_page_task_params_drive.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateSharepointPageTaskParamsDrive") 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 16f35526..5a6db9fd 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateSharepointPageTaskParamsParentFolder") 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 638cc4f0..2f75461d 100644 --- a/rootly_sdk/models/create_sharepoint_page_task_params_site.py +++ b/rootly_sdk/models/create_sharepoint_page_task_params_site.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateSharepointPageTaskParamsSite") diff --git a/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py b/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py new file mode 100644 index 00000000..51c4b8fa --- /dev/null +++ b/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="CreateShortcutStoryTaskParamsType0Project") + + +@_attrs_define +class CreateShortcutStoryTaskParamsType0Project: + """ + 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_shortcut_story_task_params_type_0_project = cls( + id=id, + name=name, + ) + + create_shortcut_story_task_params_type_0_project.additional_properties = d + return create_shortcut_story_task_params_type_0_project + + @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_shortcut_story_task_params_type_1_workflow_state.py b/rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py new file mode 100644 index 00000000..fd0b4a21 --- /dev/null +++ b/rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="CreateShortcutStoryTaskParamsType1WorkflowState") + + +@_attrs_define +class CreateShortcutStoryTaskParamsType1WorkflowState: + """ + 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_shortcut_story_task_params_type_1_workflow_state = cls( + id=id, + name=name, + ) + + create_shortcut_story_task_params_type_1_workflow_state.additional_properties = d + return create_shortcut_story_task_params_type_1_workflow_state + + @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_shortcut_task_task_params.py b/rootly_sdk/models/create_shortcut_task_task_params.py index be8cd214..46d8db89 100644 --- a/rootly_sdk/models/create_shortcut_task_task_params.py +++ b/rootly_sdk/models/create_shortcut_task_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_shortcut_task_task_params_task_type import ( - CreateShortcutTaskTaskParamsTaskType, - check_create_shortcut_task_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_shortcut_task_task_params_task_type import check_create_shortcut_task_task_params_task_type +from ..models.create_shortcut_task_task_params_task_type import CreateShortcutTaskTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_shortcut_task_task_params_completion import CreateShortcutTaskTaskParamsCompletion @@ -36,6 +37,8 @@ class CreateShortcutTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_shortcut_task_task_params_completion import CreateShortcutTaskTaskParamsCompletion + parent_story_id = self.parent_story_id description = self.description 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 01333610..5813bc46 100644 --- a/rootly_sdk/models/create_shortcut_task_task_params_completion.py +++ b/rootly_sdk/models/create_shortcut_task_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateShortcutTaskTaskParamsCompletion") diff --git a/rootly_sdk/models/create_slack_channel_task_params.py b/rootly_sdk/models/create_slack_channel_task_params.py index 5f21ab2b..1c63612d 100644 --- a/rootly_sdk/models/create_slack_channel_task_params.py +++ b/rootly_sdk/models/create_slack_channel_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_slack_channel_task_params_private import ( - CreateSlackChannelTaskParamsPrivate, - check_create_slack_channel_task_params_private, -) -from ..models.create_slack_channel_task_params_task_type import ( - CreateSlackChannelTaskParamsTaskType, - check_create_slack_channel_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_slack_channel_task_params_private import check_create_slack_channel_task_params_private +from ..models.create_slack_channel_task_params_private import CreateSlackChannelTaskParamsPrivate +from ..models.create_slack_channel_task_params_task_type import check_create_slack_channel_task_params_task_type +from ..models.create_slack_channel_task_params_task_type import CreateSlackChannelTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_slack_channel_task_params_workspace import CreateSlackChannelTaskParamsWorkspace @@ -40,6 +39,8 @@ class CreateSlackChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_slack_channel_task_params_workspace import CreateSlackChannelTaskParamsWorkspace + workspace = self.workspace.to_dict() title = self.title 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 6c6f4e33..41a01f29 100644 --- a/rootly_sdk/models/create_slack_channel_task_params_workspace.py +++ b/rootly_sdk/models/create_slack_channel_task_params_workspace.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateSlackChannelTaskParamsWorkspace") diff --git a/rootly_sdk/models/create_sub_incident_task_params.py b/rootly_sdk/models/create_sub_incident_task_params.py index 0f2a0359..93305597 100644 --- a/rootly_sdk/models/create_sub_incident_task_params.py +++ b/rootly_sdk/models/create_sub_incident_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_sub_incident_task_params_task_type import ( - CreateSubIncidentTaskParamsTaskType, - check_create_sub_incident_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_sub_incident_task_params_task_type import check_create_sub_incident_task_params_task_type +from ..models.create_sub_incident_task_params_task_type import CreateSubIncidentTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CreateSubIncidentTaskParams") diff --git a/rootly_sdk/models/create_trello_card_task_params.py b/rootly_sdk/models/create_trello_card_task_params.py index 8522b681..f4f4e107 100644 --- a/rootly_sdk/models/create_trello_card_task_params.py +++ b/rootly_sdk/models/create_trello_card_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_trello_card_task_params_task_type import ( - CreateTrelloCardTaskParamsTaskType, - check_create_trello_card_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_trello_card_task_params_task_type import check_create_trello_card_task_params_task_type +from ..models.create_trello_card_task_params_task_type import CreateTrelloCardTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_trello_card_task_params_archivation import CreateTrelloCardTaskParamsArchivation from ..models.create_trello_card_task_params_board import CreateTrelloCardTaskParamsBoard @@ -47,6 +48,11 @@ class CreateTrelloCardTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_trello_card_task_params_list import CreateTrelloCardTaskParamsList + from ..models.create_trello_card_task_params_board import CreateTrelloCardTaskParamsBoard + from ..models.create_trello_card_task_params_labels_item import CreateTrelloCardTaskParamsLabelsItem + from ..models.create_trello_card_task_params_archivation import CreateTrelloCardTaskParamsArchivation + title = self.title board = self.board.to_dict() 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 156c86c7..ea1598ec 100644 --- a/rootly_sdk/models/create_trello_card_task_params_archivation.py +++ b/rootly_sdk/models/create_trello_card_task_params_archivation.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateTrelloCardTaskParamsArchivation") 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 358d9808..3d974424 100644 --- a/rootly_sdk/models/create_trello_card_task_params_board.py +++ b/rootly_sdk/models/create_trello_card_task_params_board.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateTrelloCardTaskParamsBoard") 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 42ad31bb..1a7eed5c 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateTrelloCardTaskParamsLabelsItem") 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 6c584b6b..828bf046 100644 --- a/rootly_sdk/models/create_trello_card_task_params_list.py +++ b/rootly_sdk/models/create_trello_card_task_params_list.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateTrelloCardTaskParamsList") 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 ddc592bc..1c7e190e 100644 --- a/rootly_sdk/models/create_watsonx_chat_completion_task_params.py +++ b/rootly_sdk/models/create_watsonx_chat_completion_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_watsonx_chat_completion_task_params_task_type import ( - CreateWatsonxChatCompletionTaskParamsTaskType, check_create_watsonx_chat_completion_task_params_task_type, ) +from ..models.create_watsonx_chat_completion_task_params_task_type import CreateWatsonxChatCompletionTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_watsonx_chat_completion_task_params_model import CreateWatsonxChatCompletionTaskParamsModel @@ -38,6 +41,8 @@ class CreateWatsonxChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_watsonx_chat_completion_task_params_model import CreateWatsonxChatCompletionTaskParamsModel + model = self.model.to_dict() prompt = self.prompt 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 e26a08fb..74131d63 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateWatsonxChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_webex_meeting_task_params.py b/rootly_sdk/models/create_webex_meeting_task_params.py index cffd1878..be525e0f 100644 --- a/rootly_sdk/models/create_webex_meeting_task_params.py +++ b/rootly_sdk/models/create_webex_meeting_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.create_webex_meeting_task_params_recording_mode import ( - CreateWebexMeetingTaskParamsRecordingMode, check_create_webex_meeting_task_params_recording_mode, ) -from ..models.create_webex_meeting_task_params_task_type import ( - CreateWebexMeetingTaskParamsTaskType, - check_create_webex_meeting_task_params_task_type, -) +from ..models.create_webex_meeting_task_params_recording_mode import CreateWebexMeetingTaskParamsRecordingMode +from ..models.create_webex_meeting_task_params_task_type import check_create_webex_meeting_task_params_task_type +from ..models.create_webex_meeting_task_params_task_type import CreateWebexMeetingTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.create_webex_meeting_task_params_post_to_slack_channels_item import ( @@ -50,6 +51,10 @@ class CreateWebexMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_webex_meeting_task_params_post_to_slack_channels_item import ( + CreateWebexMeetingTaskParamsPostToSlackChannelsItem, + ) + topic = self.topic task_type: str | Unset = UNSET 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 6e3cd47d..7697a1ff 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateWebexMeetingTaskParamsPostToSlackChannelsItem") 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 79171b39..46928003 100644 --- a/rootly_sdk/models/create_zendesk_jira_link_task_params.py +++ b/rootly_sdk/models/create_zendesk_jira_link_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_zendesk_jira_link_task_params_task_type import ( - CreateZendeskJiraLinkTaskParamsTaskType, - check_create_zendesk_jira_link_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_zendesk_jira_link_task_params_task_type import check_create_zendesk_jira_link_task_params_task_type +from ..models.create_zendesk_jira_link_task_params_task_type import CreateZendeskJiraLinkTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CreateZendeskJiraLinkTaskParams") diff --git a/rootly_sdk/models/create_zendesk_ticket_task_params.py b/rootly_sdk/models/create_zendesk_ticket_task_params.py index e0358ab7..58391a8e 100644 --- a/rootly_sdk/models/create_zendesk_ticket_task_params.py +++ b/rootly_sdk/models/create_zendesk_ticket_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_zendesk_ticket_task_params_kind import ( - CreateZendeskTicketTaskParamsKind, - check_create_zendesk_ticket_task_params_kind, -) -from ..models.create_zendesk_ticket_task_params_task_type import ( - CreateZendeskTicketTaskParamsTaskType, - check_create_zendesk_ticket_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_zendesk_ticket_task_params_kind import check_create_zendesk_ticket_task_params_kind +from ..models.create_zendesk_ticket_task_params_kind import CreateZendeskTicketTaskParamsKind +from ..models.create_zendesk_ticket_task_params_task_type import check_create_zendesk_ticket_task_params_task_type +from ..models.create_zendesk_ticket_task_params_task_type import CreateZendeskTicketTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_zendesk_ticket_task_params_completion import CreateZendeskTicketTaskParamsCompletion from ..models.create_zendesk_ticket_task_params_priority import CreateZendeskTicketTaskParamsPriority @@ -53,6 +52,9 @@ class CreateZendeskTicketTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.create_zendesk_ticket_task_params_completion import CreateZendeskTicketTaskParamsCompletion + from ..models.create_zendesk_ticket_task_params_priority import CreateZendeskTicketTaskParamsPriority + kind: str = self.kind subject = self.subject 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 2554ba85..8d3af537 100644 --- a/rootly_sdk/models/create_zendesk_ticket_task_params_completion.py +++ b/rootly_sdk/models/create_zendesk_ticket_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateZendeskTicketTaskParamsCompletion") 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 8a7902cb..c0f4e0b4 100644 --- a/rootly_sdk/models/create_zendesk_ticket_task_params_priority.py +++ b/rootly_sdk/models/create_zendesk_ticket_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateZendeskTicketTaskParamsPriority") diff --git a/rootly_sdk/models/create_zoom_meeting_task_params.py b/rootly_sdk/models/create_zoom_meeting_task_params.py index ac986319..b8a58755 100644 --- a/rootly_sdk/models/create_zoom_meeting_task_params.py +++ b/rootly_sdk/models/create_zoom_meeting_task_params.py @@ -1,25 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.create_zoom_meeting_task_params_auto_recording import ( - CreateZoomMeetingTaskParamsAutoRecording, - check_create_zoom_meeting_task_params_auto_recording, -) -from ..models.create_zoom_meeting_task_params_recording_mode import ( - CreateZoomMeetingTaskParamsRecordingMode, - check_create_zoom_meeting_task_params_recording_mode, -) -from ..models.create_zoom_meeting_task_params_task_type import ( - CreateZoomMeetingTaskParamsTaskType, - check_create_zoom_meeting_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.create_zoom_meeting_task_params_auto_recording import check_create_zoom_meeting_task_params_auto_recording +from ..models.create_zoom_meeting_task_params_auto_recording import CreateZoomMeetingTaskParamsAutoRecording +from ..models.create_zoom_meeting_task_params_recording_mode import check_create_zoom_meeting_task_params_recording_mode +from ..models.create_zoom_meeting_task_params_recording_mode import CreateZoomMeetingTaskParamsRecordingMode +from ..models.create_zoom_meeting_task_params_task_type import check_create_zoom_meeting_task_params_task_type +from ..models.create_zoom_meeting_task_params_task_type import CreateZoomMeetingTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.create_zoom_meeting_task_params_post_to_slack_channels_item import ( CreateZoomMeetingTaskParamsPostToSlackChannelsItem, @@ -43,6 +40,8 @@ class CreateZoomMeetingTaskParams: 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) + enable_zoom_bot_auto_join (bool | Unset): Allow the Rootly bot to start recording without waiting for host + approval post_to_incident_timeline (bool | Unset): post_to_slack_channels (list[CreateZoomMeetingTaskParamsPostToSlackChannelsItem] | Unset): """ @@ -55,11 +54,16 @@ class CreateZoomMeetingTaskParams: auto_recording: CreateZoomMeetingTaskParamsAutoRecording | Unset = "none" record_meeting: bool | Unset = UNSET recording_mode: CreateZoomMeetingTaskParamsRecordingMode | Unset = UNSET + enable_zoom_bot_auto_join: bool | 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]: + from ..models.create_zoom_meeting_task_params_post_to_slack_channels_item import ( + CreateZoomMeetingTaskParamsPostToSlackChannelsItem, + ) + topic = self.topic task_type: str | Unset = UNSET @@ -84,6 +88,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.recording_mode, Unset): recording_mode = self.recording_mode + enable_zoom_bot_auto_join = self.enable_zoom_bot_auto_join + post_to_incident_timeline = self.post_to_incident_timeline post_to_slack_channels: list[dict[str, Any]] | Unset = UNSET @@ -114,6 +120,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["record_meeting"] = record_meeting if recording_mode is not UNSET: field_dict["recording_mode"] = recording_mode + if enable_zoom_bot_auto_join is not UNSET: + field_dict["enable_zoom_bot_auto_join"] = enable_zoom_bot_auto_join if post_to_incident_timeline is not UNSET: field_dict["post_to_incident_timeline"] = post_to_incident_timeline if post_to_slack_channels is not UNSET: @@ -159,6 +167,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: recording_mode = check_create_zoom_meeting_task_params_recording_mode(_recording_mode) + enable_zoom_bot_auto_join = d.pop("enable_zoom_bot_auto_join", UNSET) + post_to_incident_timeline = d.pop("post_to_incident_timeline", UNSET) _post_to_slack_channels = d.pop("post_to_slack_channels", UNSET) @@ -181,6 +191,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: auto_recording=auto_recording, record_meeting=record_meeting, recording_mode=recording_mode, + enable_zoom_bot_auto_join=enable_zoom_bot_auto_join, post_to_incident_timeline=post_to_incident_timeline, post_to_slack_channels=post_to_slack_channels, ) 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 7a669f7c..60487e80 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CreateZoomMeetingTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/custom_field.py b/rootly_sdk/models/custom_field.py index b4fbada2..a98075de 100644 --- a/rootly_sdk/models/custom_field.py +++ b/rootly_sdk/models/custom_field.py @@ -1,18 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.custom_field_required_type_0_item import ( - CustomFieldRequiredType0Item, - check_custom_field_required_type_0_item, -) -from ..models.custom_field_shown_item import CustomFieldShownItem, check_custom_field_shown_item from ..types import UNSET, Unset +from ..models.custom_field_required_type_0_item import check_custom_field_required_type_0_item +from ..models.custom_field_required_type_0_item import CustomFieldRequiredType0Item +from ..models.custom_field_shown_item import check_custom_field_shown_item +from ..models.custom_field_shown_item import CustomFieldShownItem +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CustomField") diff --git a/rootly_sdk/models/custom_field_list.py b/rootly_sdk/models/custom_field_list.py index 6ebec51c..b6a5d60f 100644 --- a/rootly_sdk/models/custom_field_list.py +++ b/rootly_sdk/models/custom_field_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.custom_field_list_data_item import CustomFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class CustomFieldList: data (list[CustomFieldListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CustomFieldListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.custom_field_list_data_item import CustomFieldListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_field_list_data_item import CustomFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_field_list = cls( data=data, links=links, meta=meta, + included=included, ) custom_field_list.additional_properties = d diff --git a/rootly_sdk/models/custom_field_list_data_item.py b/rootly_sdk/models/custom_field_list_data_item.py index 51f85834..4fdbf5b6 100644 --- a/rootly_sdk/models/custom_field_list_data_item.py +++ b/rootly_sdk/models/custom_field_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.custom_field_list_data_item_type import ( - CustomFieldListDataItemType, - check_custom_field_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.custom_field_list_data_item_type import check_custom_field_list_data_item_type +from ..models.custom_field_list_data_item_type import CustomFieldListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.custom_field import CustomField @@ -33,6 +34,8 @@ class CustomFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.custom_field import CustomField + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_field_option.py b/rootly_sdk/models/custom_field_option.py index 74f9d516..e7c8a749 100644 --- a/rootly_sdk/models/custom_field_option.py +++ b/rootly_sdk/models/custom_field_option.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="CustomFieldOption") diff --git a/rootly_sdk/models/custom_field_option_list.py b/rootly_sdk/models/custom_field_option_list.py index cdc9c37d..e6d778be 100644 --- a/rootly_sdk/models/custom_field_option_list.py +++ b/rootly_sdk/models/custom_field_option_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.custom_field_option_list_data_item import CustomFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class CustomFieldOptionList: data (list[CustomFieldOptionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CustomFieldOptionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.custom_field_option_list_data_item import CustomFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_field_option_list_data_item import CustomFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_field_option_list = cls( data=data, links=links, meta=meta, + included=included, ) custom_field_option_list.additional_properties = d 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 43e459bf..516bef03 100644 --- a/rootly_sdk/models/custom_field_option_list_data_item.py +++ b/rootly_sdk/models/custom_field_option_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.custom_field_option_list_data_item_type import ( - CustomFieldOptionListDataItemType, - check_custom_field_option_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.custom_field_option_list_data_item_type import check_custom_field_option_list_data_item_type +from ..models.custom_field_option_list_data_item_type import CustomFieldOptionListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.custom_field_option import CustomFieldOption @@ -33,6 +34,8 @@ class CustomFieldOptionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.custom_field_option import CustomFieldOption + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_field_option_response.py b/rootly_sdk/models/custom_field_option_response.py index a2e6ac19..632c99f2 100644 --- a/rootly_sdk/models/custom_field_option_response.py +++ b/rootly_sdk/models/custom_field_option_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.custom_field_option_response_data import CustomFieldOptionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CustomFieldOptionResponse") @@ -18,14 +24,26 @@ class CustomFieldOptionResponse: """ Attributes: data (CustomFieldOptionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CustomFieldOptionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.custom_field_option_response_data import CustomFieldOptionResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_field_option_response_data import CustomFieldOptionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CustomFieldOptionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_field_option_response = cls( data=data, + included=included, ) custom_field_option_response.additional_properties = d diff --git a/rootly_sdk/models/custom_field_option_response_data.py b/rootly_sdk/models/custom_field_option_response_data.py index 4255f099..4074a8fb 100644 --- a/rootly_sdk/models/custom_field_option_response_data.py +++ b/rootly_sdk/models/custom_field_option_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.custom_field_option_response_data_type import ( - CustomFieldOptionResponseDataType, - check_custom_field_option_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.custom_field_option_response_data_type import check_custom_field_option_response_data_type +from ..models.custom_field_option_response_data_type import CustomFieldOptionResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.custom_field_option import CustomFieldOption @@ -33,6 +34,8 @@ class CustomFieldOptionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.custom_field_option import CustomFieldOption + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_field_response.py b/rootly_sdk/models/custom_field_response.py index 2825b94a..238e6100 100644 --- a/rootly_sdk/models/custom_field_response.py +++ b/rootly_sdk/models/custom_field_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.custom_field_response_data import CustomFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CustomFieldResponse") @@ -18,14 +24,26 @@ class CustomFieldResponse: """ Attributes: data (CustomFieldResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CustomFieldResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.custom_field_response_data import CustomFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_field_response_data import CustomFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CustomFieldResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_field_response = cls( data=data, + included=included, ) custom_field_response.additional_properties = d diff --git a/rootly_sdk/models/custom_field_response_data.py b/rootly_sdk/models/custom_field_response_data.py index 54ea82aa..05b404bc 100644 --- a/rootly_sdk/models/custom_field_response_data.py +++ b/rootly_sdk/models/custom_field_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.custom_field_response_data_type import CustomFieldResponseDataType, check_custom_field_response_data_type +from ..types import UNSET, Unset + +from ..models.custom_field_response_data_type import check_custom_field_response_data_type +from ..models.custom_field_response_data_type import CustomFieldResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.custom_field import CustomField @@ -30,6 +34,8 @@ class CustomFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.custom_field import CustomField + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_form.py b/rootly_sdk/models/custom_form.py index 78ee24bb..53dc6ced 100644 --- a/rootly_sdk/models/custom_form.py +++ b/rootly_sdk/models/custom_form.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="CustomForm") diff --git a/rootly_sdk/models/custom_form_list.py b/rootly_sdk/models/custom_form_list.py index 9df0e52e..34b3ae86 100644 --- a/rootly_sdk/models/custom_form_list.py +++ b/rootly_sdk/models/custom_form_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.custom_form_list_data_item import CustomFormListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class CustomFormList: data (list[CustomFormListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[CustomFormListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.custom_form_list_data_item import CustomFormListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_form_list_data_item import CustomFormListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_form_list = cls( data=data, links=links, meta=meta, + included=included, ) custom_form_list.additional_properties = d diff --git a/rootly_sdk/models/custom_form_list_data_item.py b/rootly_sdk/models/custom_form_list_data_item.py index ecf82fbb..4dc93929 100644 --- a/rootly_sdk/models/custom_form_list_data_item.py +++ b/rootly_sdk/models/custom_form_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.custom_form_list_data_item_type import CustomFormListDataItemType, check_custom_form_list_data_item_type +from ..types import UNSET, Unset + +from ..models.custom_form_list_data_item_type import check_custom_form_list_data_item_type +from ..models.custom_form_list_data_item_type import CustomFormListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.custom_form import CustomForm @@ -30,6 +34,8 @@ class CustomFormListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.custom_form import CustomForm + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/custom_form_response.py b/rootly_sdk/models/custom_form_response.py index e74e6e7b..20e9cf75 100644 --- a/rootly_sdk/models/custom_form_response.py +++ b/rootly_sdk/models/custom_form_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.custom_form_response_data import CustomFormResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="CustomFormResponse") @@ -18,14 +24,26 @@ class CustomFormResponse: """ Attributes: data (CustomFormResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: CustomFormResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.custom_form_response_data import CustomFormResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.custom_form_response_data import CustomFormResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = CustomFormResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + custom_form_response = cls( data=data, + included=included, ) custom_form_response.additional_properties = d diff --git a/rootly_sdk/models/custom_form_response_data.py b/rootly_sdk/models/custom_form_response_data.py index fb42a220..9266bb5a 100644 --- a/rootly_sdk/models/custom_form_response_data.py +++ b/rootly_sdk/models/custom_form_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.custom_form_response_data_type import CustomFormResponseDataType, check_custom_form_response_data_type +from ..types import UNSET, Unset + +from ..models.custom_form_response_data_type import check_custom_form_response_data_type +from ..models.custom_form_response_data_type import CustomFormResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.custom_form import CustomForm @@ -30,6 +34,8 @@ class CustomFormResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.custom_form import CustomForm + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/dashboard.py b/rootly_sdk/models/dashboard.py index f83fc0c9..955a561c 100644 --- a/rootly_sdk/models/dashboard.py +++ b/rootly_sdk/models/dashboard.py @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.dashboard_color import DashboardColor, check_dashboard_color -from ..models.dashboard_owner import DashboardOwner, check_dashboard_owner from ..types import UNSET, Unset +from ..models.dashboard_color import check_dashboard_color +from ..models.dashboard_color import DashboardColor +from ..models.dashboard_owner import check_dashboard_owner +from ..models.dashboard_owner import DashboardOwner +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="Dashboard") diff --git a/rootly_sdk/models/dashboard_list.py b/rootly_sdk/models/dashboard_list.py index b7a9f817..aab0f0dd 100644 --- a/rootly_sdk/models/dashboard_list.py +++ b/rootly_sdk/models/dashboard_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.dashboard_list_data_item import DashboardListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class DashboardList: data (list[DashboardListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[DashboardListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.dashboard_list_data_item import DashboardListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_list_data_item import DashboardListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + dashboard_list = cls( data=data, links=links, meta=meta, + included=included, ) dashboard_list.additional_properties = d diff --git a/rootly_sdk/models/dashboard_list_data_item.py b/rootly_sdk/models/dashboard_list_data_item.py index af7c1f78..505b648d 100644 --- a/rootly_sdk/models/dashboard_list_data_item.py +++ b/rootly_sdk/models/dashboard_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.dashboard_list_data_item_type import DashboardListDataItemType, check_dashboard_list_data_item_type +from ..types import UNSET, Unset + +from ..models.dashboard_list_data_item_type import check_dashboard_list_data_item_type +from ..models.dashboard_list_data_item_type import DashboardListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.dashboard import Dashboard @@ -30,6 +34,8 @@ class DashboardListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.dashboard import Dashboard + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/dashboard_panel.py b/rootly_sdk/models/dashboard_panel.py index 4cd0dbe5..670dc966 100644 --- a/rootly_sdk/models/dashboard_panel.py +++ b/rootly_sdk/models/dashboard_panel.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.dashboard_panel_data_item import DashboardPanelDataItem from ..models.dashboard_panel_params import DashboardPanelParams @@ -36,7 +39,9 @@ class DashboardPanel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.dashboard_panel_data_item import DashboardPanelDataItem from ..models.dashboard_panel_position_type_0 import DashboardPanelPositionType0 + from ..models.dashboard_panel_params import DashboardPanelParams params = self.params.to_dict() diff --git a/rootly_sdk/models/dashboard_panel_data_item.py b/rootly_sdk/models/dashboard_panel_data_item.py index 3e9c8030..bc7c8163 100644 --- a/rootly_sdk/models/dashboard_panel_data_item.py +++ b/rootly_sdk/models/dashboard_panel_data_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="DashboardPanelDataItem") diff --git a/rootly_sdk/models/dashboard_panel_list.py b/rootly_sdk/models/dashboard_panel_list.py index cda76597..19a741ff 100644 --- a/rootly_sdk/models/dashboard_panel_list.py +++ b/rootly_sdk/models/dashboard_panel_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.dashboard_panel_list_data_item import DashboardPanelListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class DashboardPanelList: data (list[DashboardPanelListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[DashboardPanelListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.dashboard_panel_list_data_item import DashboardPanelListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_panel_list_data_item import DashboardPanelListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + dashboard_panel_list = cls( data=data, links=links, meta=meta, + included=included, ) dashboard_panel_list.additional_properties = d diff --git a/rootly_sdk/models/dashboard_panel_list_data_item.py b/rootly_sdk/models/dashboard_panel_list_data_item.py index dcb89dd9..067a2553 100644 --- a/rootly_sdk/models/dashboard_panel_list_data_item.py +++ b/rootly_sdk/models/dashboard_panel_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.dashboard_panel_list_data_item_type import ( - DashboardPanelListDataItemType, - check_dashboard_panel_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.dashboard_panel_list_data_item_type import check_dashboard_panel_list_data_item_type +from ..models.dashboard_panel_list_data_item_type import DashboardPanelListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.dashboard_panel import DashboardPanel @@ -33,6 +34,8 @@ class DashboardPanelListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.dashboard_panel import DashboardPanel + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/dashboard_panel_params.py b/rootly_sdk/models/dashboard_panel_params.py index 90a15121..6599bfb4 100644 --- a/rootly_sdk/models/dashboard_panel_params.py +++ b/rootly_sdk/models/dashboard_panel_params.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.dashboard_panel_params_display import DashboardPanelParamsDisplay, check_dashboard_panel_params_display from ..types import UNSET, Unset +from ..models.dashboard_panel_params_display import check_dashboard_panel_params_display +from ..models.dashboard_panel_params_display import DashboardPanelParamsDisplay +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.dashboard_panel_params_datalabels import DashboardPanelParamsDatalabels from ..models.dashboard_panel_params_datasets_item import DashboardPanelParamsDatasetsItem @@ -39,6 +43,10 @@ class DashboardPanelParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.dashboard_panel_params_datalabels import DashboardPanelParamsDatalabels + from ..models.dashboard_panel_params_legend import DashboardPanelParamsLegend + from ..models.dashboard_panel_params_datasets_item import DashboardPanelParamsDatasetsItem + display: str | Unset = UNSET if not isinstance(self.display, Unset): display = self.display diff --git a/rootly_sdk/models/dashboard_panel_params_datalabels.py b/rootly_sdk/models/dashboard_panel_params_datalabels.py index be9de80e..cc681abd 100644 --- a/rootly_sdk/models/dashboard_panel_params_datalabels.py +++ b/rootly_sdk/models/dashboard_panel_params_datalabels.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="DashboardPanelParamsDatalabels") diff --git a/rootly_sdk/models/dashboard_panel_params_datasets_item.py b/rootly_sdk/models/dashboard_panel_params_datasets_item.py index 21e85bab..cc0332f7 100644 --- a/rootly_sdk/models/dashboard_panel_params_datasets_item.py +++ b/rootly_sdk/models/dashboard_panel_params_datasets_item.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.dashboard_panel_params_datasets_item_collection import ( - DashboardPanelParamsDatasetsItemCollection, check_dashboard_panel_params_datasets_item_collection, ) +from ..models.dashboard_panel_params_datasets_item_collection import DashboardPanelParamsDatasetsItemCollection from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.dashboard_panel_params_datasets_item_aggregate_type_0 import ( @@ -50,6 +53,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.dashboard_panel_params_datasets_item_group_by_type_1_type_0 import ( DashboardPanelParamsDatasetsItemGroupByType1Type0, ) + from ..models.dashboard_panel_params_datasets_item_filter_item import DashboardPanelParamsDatasetsItemFilterItem name: None | str | Unset if isinstance(self.name, 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 1c0d2a95..68e989ec 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.dashboard_panel_params_datasets_item_aggregate_type_0_operation import ( - DashboardPanelParamsDatasetsItemAggregateType0Operation, check_dashboard_panel_params_datasets_item_aggregate_type_0_operation, ) +from ..models.dashboard_panel_params_datasets_item_aggregate_type_0_operation import ( + DashboardPanelParamsDatasetsItemAggregateType0Operation, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="DashboardPanelParamsDatasetsItemAggregateType0") 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 7d73ee70..c99b76ad 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.dashboard_panel_params_datasets_item_filter_item_operation import ( - DashboardPanelParamsDatasetsItemFilterItemOperation, check_dashboard_panel_params_datasets_item_filter_item_operation, ) +from ..models.dashboard_panel_params_datasets_item_filter_item_operation import ( + DashboardPanelParamsDatasetsItemFilterItemOperation, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item import ( @@ -34,6 +39,10 @@ class DashboardPanelParamsDatasetsItemFilterItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item import ( + DashboardPanelParamsDatasetsItemFilterItemRulesItem, + ) + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.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 8358c43c..3cfe4ea5 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item_condition import ( - DashboardPanelParamsDatasetsItemFilterItemRulesItemCondition, check_dashboard_panel_params_datasets_item_filter_item_rules_item_condition, ) +from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item_condition import ( + DashboardPanelParamsDatasetsItemFilterItemRulesItemCondition, +) from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item_operation import ( - DashboardPanelParamsDatasetsItemFilterItemRulesItemOperation, check_dashboard_panel_params_datasets_item_filter_item_rules_item_operation, ) +from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item_operation import ( + DashboardPanelParamsDatasetsItemFilterItemRulesItemOperation, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="DashboardPanelParamsDatasetsItemFilterItemRulesItem") 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 2bbe0ace..13df359e 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.dashboard_panel_params_datasets_item_group_by_type_1_type_0_key import ( - DashboardPanelParamsDatasetsItemGroupByType1Type0Key, check_dashboard_panel_params_datasets_item_group_by_type_1_type_0_key, ) +from ..models.dashboard_panel_params_datasets_item_group_by_type_1_type_0_key import ( + DashboardPanelParamsDatasetsItemGroupByType1Type0Key, +) +from typing import cast + T = TypeVar("T", bound="DashboardPanelParamsDatasetsItemGroupByType1Type0") diff --git a/rootly_sdk/models/dashboard_panel_params_legend.py b/rootly_sdk/models/dashboard_panel_params_legend.py index e39a194f..f61e5aa8 100644 --- a/rootly_sdk/models/dashboard_panel_params_legend.py +++ b/rootly_sdk/models/dashboard_panel_params_legend.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.dashboard_panel_params_legend_groups import ( - DashboardPanelParamsLegendGroups, - check_dashboard_panel_params_legend_groups, -) from ..types import UNSET, Unset +from ..models.dashboard_panel_params_legend_groups import check_dashboard_panel_params_legend_groups +from ..models.dashboard_panel_params_legend_groups import DashboardPanelParamsLegendGroups +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="DashboardPanelParamsLegend") diff --git a/rootly_sdk/models/dashboard_panel_position_type_0.py b/rootly_sdk/models/dashboard_panel_position_type_0.py index f64f7720..dc3fa3a4 100644 --- a/rootly_sdk/models/dashboard_panel_position_type_0.py +++ b/rootly_sdk/models/dashboard_panel_position_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="DashboardPanelPositionType0") diff --git a/rootly_sdk/models/dashboard_panel_response.py b/rootly_sdk/models/dashboard_panel_response.py index 93f0c50c..da80d5b6 100644 --- a/rootly_sdk/models/dashboard_panel_response.py +++ b/rootly_sdk/models/dashboard_panel_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.dashboard_panel_response_data import DashboardPanelResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="DashboardPanelResponse") @@ -18,14 +24,26 @@ class DashboardPanelResponse: """ Attributes: data (DashboardPanelResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: DashboardPanelResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.dashboard_panel_response_data import DashboardPanelResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_panel_response_data import DashboardPanelResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = DashboardPanelResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + dashboard_panel_response = cls( data=data, + included=included, ) dashboard_panel_response.additional_properties = d diff --git a/rootly_sdk/models/dashboard_panel_response_data.py b/rootly_sdk/models/dashboard_panel_response_data.py index 5e5cd3ee..0b95ea0a 100644 --- a/rootly_sdk/models/dashboard_panel_response_data.py +++ b/rootly_sdk/models/dashboard_panel_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.dashboard_panel_response_data_type import ( - DashboardPanelResponseDataType, - check_dashboard_panel_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.dashboard_panel_response_data_type import check_dashboard_panel_response_data_type +from ..models.dashboard_panel_response_data_type import DashboardPanelResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.dashboard_panel import DashboardPanel @@ -33,6 +34,8 @@ class DashboardPanelResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.dashboard_panel import DashboardPanel + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/dashboard_response.py b/rootly_sdk/models/dashboard_response.py index 7d73d1e1..347048d9 100644 --- a/rootly_sdk/models/dashboard_response.py +++ b/rootly_sdk/models/dashboard_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.dashboard_response_data import DashboardResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="DashboardResponse") @@ -18,14 +24,26 @@ class DashboardResponse: """ Attributes: data (DashboardResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: DashboardResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.dashboard_response_data import DashboardResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.dashboard_response_data import DashboardResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = DashboardResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + dashboard_response = cls( data=data, + included=included, ) dashboard_response.additional_properties = d diff --git a/rootly_sdk/models/dashboard_response_data.py b/rootly_sdk/models/dashboard_response_data.py index a650842b..05ef4249 100644 --- a/rootly_sdk/models/dashboard_response_data.py +++ b/rootly_sdk/models/dashboard_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.dashboard_response_data_type import DashboardResponseDataType, check_dashboard_response_data_type +from ..types import UNSET, Unset + +from ..models.dashboard_response_data_type import check_dashboard_response_data_type +from ..models.dashboard_response_data_type import DashboardResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.dashboard import Dashboard @@ -30,6 +34,8 @@ class DashboardResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.dashboard import Dashboard + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/delete_alert_route_response_200.py b/rootly_sdk/models/delete_alert_route_response_200.py index 87303581..4212fe2f 100644 --- a/rootly_sdk/models/delete_alert_route_response_200.py +++ b/rootly_sdk/models/delete_alert_route_response_200.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.delete_alert_route_response_200_data import DeleteAlertRouteResponse200Data @@ -26,6 +29,8 @@ class DeleteAlertRouteResponse200: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.delete_alert_route_response_200_data import DeleteAlertRouteResponse200Data + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() 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 2913fe1f..a9cb94c8 100644 --- a/rootly_sdk/models/delete_alert_route_response_200_data.py +++ b/rootly_sdk/models/delete_alert_route_response_200_data.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.delete_alert_route_response_200_data_attributes import DeleteAlertRouteResponse200DataAttributes @@ -30,6 +33,8 @@ class DeleteAlertRouteResponse200Data: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.delete_alert_route_response_200_data_attributes import DeleteAlertRouteResponse200DataAttributes + id = self.id type_ = self.type_ 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 a811a57e..34439e01 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="DeleteAlertRouteResponse200DataAttributes") diff --git a/rootly_sdk/models/duplicate_incident.py b/rootly_sdk/models/duplicate_incident.py index cbd34466..5fbe49d6 100644 --- a/rootly_sdk/models/duplicate_incident.py +++ b/rootly_sdk/models/duplicate_incident.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.duplicate_incident_data import DuplicateIncidentData @@ -24,6 +28,8 @@ class DuplicateIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.duplicate_incident_data import DuplicateIncidentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/duplicate_incident_data.py b/rootly_sdk/models/duplicate_incident_data.py index 638fc79a..0ea66018 100644 --- a/rootly_sdk/models/duplicate_incident_data.py +++ b/rootly_sdk/models/duplicate_incident_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.duplicate_incident_data_type import DuplicateIncidentDataType, check_duplicate_incident_data_type +from ..types import UNSET, Unset + +from ..models.duplicate_incident_data_type import check_duplicate_incident_data_type +from ..models.duplicate_incident_data_type import DuplicateIncidentDataType +from typing import cast if TYPE_CHECKING: from ..models.duplicate_incident_data_attributes import DuplicateIncidentDataAttributes @@ -28,6 +32,8 @@ class DuplicateIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.duplicate_incident_data_attributes import DuplicateIncidentDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/duplicate_incident_data_attributes.py b/rootly_sdk/models/duplicate_incident_data_attributes.py index 61946c43..34fc291d 100644 --- a/rootly_sdk/models/duplicate_incident_data_attributes.py +++ b/rootly_sdk/models/duplicate_incident_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="DuplicateIncidentDataAttributes") diff --git a/rootly_sdk/models/edge_connector.py b/rootly_sdk/models/edge_connector.py index c2289131..cb6cb8a9 100644 --- a/rootly_sdk/models/edge_connector.py +++ b/rootly_sdk/models/edge_connector.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.edge_connector_data import EdgeConnectorData @@ -24,6 +28,8 @@ class EdgeConnector: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.edge_connector_data import EdgeConnectorData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/edge_connector_action.py b/rootly_sdk/models/edge_connector_action.py index c805f1fa..018c9b8b 100644 --- a/rootly_sdk/models/edge_connector_action.py +++ b/rootly_sdk/models/edge_connector_action.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.edge_connector_action_data import EdgeConnectorActionData @@ -24,6 +28,8 @@ class EdgeConnectorAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.edge_connector_action_data import EdgeConnectorActionData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/edge_connector_action_data.py b/rootly_sdk/models/edge_connector_action_data.py index 91db467a..c9f7f880 100644 --- a/rootly_sdk/models/edge_connector_action_data.py +++ b/rootly_sdk/models/edge_connector_action_data.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.edge_connector_action_data_type import EdgeConnectorActionDataType, check_edge_connector_action_data_type +from ..types import UNSET, Unset + +from ..models.edge_connector_action_data_type import check_edge_connector_action_data_type +from ..models.edge_connector_action_data_type import EdgeConnectorActionDataType +from typing import cast +from uuid import UUID if TYPE_CHECKING: from ..models.edge_connector_action_data_attributes import EdgeConnectorActionDataAttributes @@ -31,6 +35,8 @@ class EdgeConnectorActionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.edge_connector_action_data_attributes import EdgeConnectorActionDataAttributes + type_: str = self.type_ id = str(self.id) diff --git a/rootly_sdk/models/edge_connector_action_data_attributes.py b/rootly_sdk/models/edge_connector_action_data_attributes.py index c0deb032..9bf2c7e9 100644 --- a/rootly_sdk/models/edge_connector_action_data_attributes.py +++ b/rootly_sdk/models/edge_connector_action_data_attributes.py @@ -1,22 +1,23 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from dateutil.parser import isoparse + +from ..types import UNSET, Unset from ..models.edge_connector_action_data_attributes_action_type import ( - EdgeConnectorActionDataAttributesActionType, check_edge_connector_action_data_attributes_action_type, ) -from ..models.edge_connector_action_data_attributes_icon import ( - EdgeConnectorActionDataAttributesIcon, - check_edge_connector_action_data_attributes_icon, -) +from ..models.edge_connector_action_data_attributes_action_type import EdgeConnectorActionDataAttributesActionType +from ..models.edge_connector_action_data_attributes_icon import check_edge_connector_action_data_attributes_icon +from ..models.edge_connector_action_data_attributes_icon import EdgeConnectorActionDataAttributesIcon from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime if TYPE_CHECKING: from ..models.edge_connector_action_data_attributes_parameters_type_0_item import ( @@ -56,6 +57,10 @@ class EdgeConnectorActionDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.edge_connector_action_data_attributes_parameters_type_0_item import ( + EdgeConnectorActionDataAttributesParametersType0Item, + ) + name = self.name action_type: str = self.action_type 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 b7212cb9..b2939ded 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.edge_connector_action_data_attributes_parameters_type_0_item_type import ( - EdgeConnectorActionDataAttributesParametersType0ItemType, check_edge_connector_action_data_attributes_parameters_type_0_item_type, ) +from ..models.edge_connector_action_data_attributes_parameters_type_0_item_type import ( + EdgeConnectorActionDataAttributesParametersType0ItemType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="EdgeConnectorActionDataAttributesParametersType0Item") diff --git a/rootly_sdk/models/edge_connector_data.py b/rootly_sdk/models/edge_connector_data.py index dc408332..05008768 100644 --- a/rootly_sdk/models/edge_connector_data.py +++ b/rootly_sdk/models/edge_connector_data.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.edge_connector_data_type import EdgeConnectorDataType, check_edge_connector_data_type +from ..types import UNSET, Unset + +from ..models.edge_connector_data_type import check_edge_connector_data_type +from ..models.edge_connector_data_type import EdgeConnectorDataType +from typing import cast +from uuid import UUID if TYPE_CHECKING: from ..models.edge_connector_data_attributes import EdgeConnectorDataAttributes @@ -31,6 +35,8 @@ class EdgeConnectorData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.edge_connector_data_attributes import EdgeConnectorDataAttributes + type_: str = self.type_ id = str(self.id) diff --git a/rootly_sdk/models/edge_connector_data_attributes.py b/rootly_sdk/models/edge_connector_data_attributes.py index 8281a4d4..3a685374 100644 --- a/rootly_sdk/models/edge_connector_data_attributes.py +++ b/rootly_sdk/models/edge_connector_data_attributes.py @@ -1,19 +1,21 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from dateutil.parser import isoparse -from ..models.edge_connector_data_attributes_status import ( - EdgeConnectorDataAttributesStatus, - check_edge_connector_data_attributes_status, -) from ..types import UNSET, Unset +from ..models.edge_connector_data_attributes_status import check_edge_connector_data_attributes_status +from ..models.edge_connector_data_attributes_status import EdgeConnectorDataAttributesStatus +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + + T = TypeVar("T", bound="EdgeConnectorDataAttributes") diff --git a/rootly_sdk/models/environment.py b/rootly_sdk/models/environment.py index 86d757c2..0b659f80 100644 --- a/rootly_sdk/models/environment.py +++ b/rootly_sdk/models/environment.py @@ -1,13 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.environment_managed_by import check_environment_managed_by +from ..models.environment_managed_by import EnvironmentManagedBy +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.environment_properties_type_0_item import EnvironmentPropertiesType0Item from ..models.environment_slack_aliases_type_0_item import EnvironmentSlackAliasesType0Item @@ -25,6 +30,9 @@ class Environment: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the environment + managed_by (EnvironmentManagedBy | Unset): How this environment is managed (provenance): web, api, terraform, + etc. Read-only. + external_id (None | str | Unset): The external id associated to this 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 @@ -40,6 +48,8 @@ class Environment: created_at: str updated_at: str slug: str | Unset = UNSET + managed_by: EnvironmentManagedBy | Unset = UNSET + external_id: None | str | Unset = UNSET description: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET color: None | str | Unset = UNSET @@ -50,6 +60,10 @@ class Environment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.environment_slack_aliases_type_0_item import EnvironmentSlackAliasesType0Item + from ..models.environment_slack_channels_type_0_item import EnvironmentSlackChannelsType0Item + from ..models.environment_properties_type_0_item import EnvironmentPropertiesType0Item + name = self.name created_at = self.created_at @@ -58,6 +72,16 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET @@ -132,6 +156,10 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by + if external_id is not UNSET: + field_dict["external_id"] = external_id if description is not UNSET: field_dict["description"] = description if notify_emails is not UNSET: @@ -164,6 +192,22 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _managed_by = d.pop("managed_by", UNSET) + managed_by: EnvironmentManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_environment_managed_by(_managed_by) + + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + def _parse_description(data: object) -> None | str | Unset: if data is None: return data @@ -283,6 +327,8 @@ def _parse_properties(data: object) -> list[EnvironmentPropertiesType0Item] | No created_at=created_at, updated_at=updated_at, slug=slug, + managed_by=managed_by, + external_id=external_id, description=description, notify_emails=notify_emails, color=color, diff --git a/rootly_sdk/models/environment_list.py b/rootly_sdk/models/environment_list.py index 9339bf0d..c0942a31 100644 --- a/rootly_sdk/models/environment_list.py +++ b/rootly_sdk/models/environment_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.environment_list_data_item import EnvironmentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class EnvironmentList: data (list[EnvironmentListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[EnvironmentListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.environment_list_data_item import EnvironmentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.environment_list_data_item import EnvironmentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + environment_list = cls( data=data, links=links, meta=meta, + included=included, ) environment_list.additional_properties = d diff --git a/rootly_sdk/models/environment_list_data_item.py b/rootly_sdk/models/environment_list_data_item.py index 59cbd582..b1b85b93 100644 --- a/rootly_sdk/models/environment_list_data_item.py +++ b/rootly_sdk/models/environment_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.environment_list_data_item_type import EnvironmentListDataItemType, check_environment_list_data_item_type +from ..types import UNSET, Unset + +from ..models.environment_list_data_item_type import check_environment_list_data_item_type +from ..models.environment_list_data_item_type import EnvironmentListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.environment import Environment @@ -30,6 +34,8 @@ class EnvironmentListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.environment import Environment + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/environment_managed_by.py b/rootly_sdk/models/environment_managed_by.py new file mode 100644 index 00000000..ee5a4ff5 --- /dev/null +++ b/rootly_sdk/models/environment_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EnvironmentManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +ENVIRONMENT_MANAGED_BY_VALUES: set[EnvironmentManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_environment_managed_by(value: str | None) -> EnvironmentManagedBy | None: + if value is None: + return None + if value in ENVIRONMENT_MANAGED_BY_VALUES: + return cast(EnvironmentManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ENVIRONMENT_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/environment_properties_type_0_item.py b/rootly_sdk/models/environment_properties_type_0_item.py index 1e6c007a..7f0e2cda 100644 --- a/rootly_sdk/models/environment_properties_type_0_item.py +++ b/rootly_sdk/models/environment_properties_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="EnvironmentPropertiesType0Item") diff --git a/rootly_sdk/models/environment_response.py b/rootly_sdk/models/environment_response.py index 7d978e8e..fd70c8fe 100644 --- a/rootly_sdk/models/environment_response.py +++ b/rootly_sdk/models/environment_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.environment_response_data import EnvironmentResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="EnvironmentResponse") @@ -18,14 +24,26 @@ class EnvironmentResponse: """ Attributes: data (EnvironmentResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: EnvironmentResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.environment_response_data import EnvironmentResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.environment_response_data import EnvironmentResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = EnvironmentResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + environment_response = cls( data=data, + included=included, ) environment_response.additional_properties = d diff --git a/rootly_sdk/models/environment_response_data.py b/rootly_sdk/models/environment_response_data.py index 5202818b..17051882 100644 --- a/rootly_sdk/models/environment_response_data.py +++ b/rootly_sdk/models/environment_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.environment_response_data_type import EnvironmentResponseDataType, check_environment_response_data_type +from ..types import UNSET, Unset + +from ..models.environment_response_data_type import check_environment_response_data_type +from ..models.environment_response_data_type import EnvironmentResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.environment import Environment @@ -30,6 +34,8 @@ class EnvironmentResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.environment import Environment + id = self.id type_: str = self.type_ 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 35b6c464..99680d69 100644 --- a/rootly_sdk/models/environment_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/environment_slack_aliases_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="EnvironmentSlackAliasesType0Item") 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 aab61759..5518e6e3 100644 --- a/rootly_sdk/models/environment_slack_channels_type_0_item.py +++ b/rootly_sdk/models/environment_slack_channels_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="EnvironmentSlackChannelsType0Item") diff --git a/rootly_sdk/models/errors_list.py b/rootly_sdk/models/errors_list.py index eb0f6933..84ecafa1 100644 --- a/rootly_sdk/models/errors_list.py +++ b/rootly_sdk/models/errors_list.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.errors_list_errors_item import ErrorsListErrorsItem @@ -26,6 +29,8 @@ class ErrorsList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.errors_list_errors_item import ErrorsListErrorsItem + errors: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.errors, Unset): errors = [] diff --git a/rootly_sdk/models/errors_list_errors_item.py b/rootly_sdk/models/errors_list_errors_item.py index 55c41afb..789ca7a0 100644 --- a/rootly_sdk/models/errors_list_errors_item.py +++ b/rootly_sdk/models/errors_list_errors_item.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="ErrorsListErrorsItem") diff --git a/rootly_sdk/models/escalate_alert.py b/rootly_sdk/models/escalate_alert.py new file mode 100644 index 00000000..ed196035 --- /dev/null +++ b/rootly_sdk/models/escalate_alert.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.escalate_alert_data import EscalateAlertData + + +T = TypeVar("T", bound="EscalateAlert") + + +@_attrs_define +class EscalateAlert: + """ + Attributes: + data (EscalateAlertData | Unset): + """ + + data: EscalateAlertData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.escalate_alert_data import EscalateAlertData + + 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.escalate_alert_data import EscalateAlertData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: EscalateAlertData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = EscalateAlertData.from_dict(_data) + + escalate_alert = cls( + data=data, + ) + + escalate_alert.additional_properties = d + return escalate_alert + + @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/escalate_alert_data.py b/rootly_sdk/models/escalate_alert_data.py new file mode 100644 index 00000000..f876f4c9 --- /dev/null +++ b/rootly_sdk/models/escalate_alert_data.py @@ -0,0 +1,97 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalate_alert_data_type import check_escalate_alert_data_type +from ..models.escalate_alert_data_type import EscalateAlertDataType +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.escalate_alert_data_attributes import EscalateAlertDataAttributes + + +T = TypeVar("T", bound="EscalateAlertData") + + +@_attrs_define +class EscalateAlertData: + """ + Attributes: + type_ (EscalateAlertDataType | Unset): + attributes (EscalateAlertDataAttributes | Unset): + """ + + type_: EscalateAlertDataType | Unset = UNSET + attributes: EscalateAlertDataAttributes | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.escalate_alert_data_attributes import EscalateAlertDataAttributes + + 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 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.escalate_alert_data_attributes import EscalateAlertDataAttributes + + d = dict(src_dict) + _type_ = d.pop("type", UNSET) + type_: EscalateAlertDataType | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_escalate_alert_data_type(_type_) + + _attributes = d.pop("attributes", UNSET) + attributes: EscalateAlertDataAttributes | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = EscalateAlertDataAttributes.from_dict(_attributes) + + escalate_alert_data = cls( + type_=type_, + attributes=attributes, + ) + + escalate_alert_data.additional_properties = d + return escalate_alert_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/escalate_alert_data_attributes.py b/rootly_sdk/models/escalate_alert_data_attributes.py new file mode 100644 index 00000000..2dbd2c7c --- /dev/null +++ b/rootly_sdk/models/escalate_alert_data_attributes.py @@ -0,0 +1,57 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="EscalateAlertDataAttributes") + + +@_attrs_define +class EscalateAlertDataAttributes: + """ + Attributes: + escalation_policy_id (str | Unset): The ID of the escalation policy to escalate to. If omitted, uses the alert's + current escalation policy from metadata. Required for resolved alerts whose metadata may have been cleared. + escalation_policy_level (int | Unset): The escalation policy level to escalate to. If omitted, defaults to the + next level (same EP) or level 1 (different EP). + """ + + escalation_policy_id: str | Unset = UNSET + escalation_policy_level: int | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + escalation_policy_id = self.escalation_policy_id + + escalation_policy_level = self.escalation_policy_level + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if escalation_policy_id is not UNSET: + field_dict["escalation_policy_id"] = escalation_policy_id + if escalation_policy_level is not UNSET: + field_dict["escalation_policy_level"] = escalation_policy_level + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + escalation_policy_id = d.pop("escalation_policy_id", UNSET) + + escalation_policy_level = d.pop("escalation_policy_level", UNSET) + + escalate_alert_data_attributes = cls( + escalation_policy_id=escalation_policy_id, + escalation_policy_level=escalation_policy_level, + ) + + return escalate_alert_data_attributes diff --git a/rootly_sdk/models/escalate_alert_data_type.py b/rootly_sdk/models/escalate_alert_data_type.py new file mode 100644 index 00000000..55b7c819 --- /dev/null +++ b/rootly_sdk/models/escalate_alert_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +EscalateAlertDataType = Literal["alerts"] + +ESCALATE_ALERT_DATA_TYPE_VALUES: set[EscalateAlertDataType] = { + "alerts", +} + + +def check_escalate_alert_data_type(value: str | None) -> EscalateAlertDataType | None: + if value is None: + return None + if value in ESCALATE_ALERT_DATA_TYPE_VALUES: + return cast(EscalateAlertDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ESCALATE_ALERT_DATA_TYPE_VALUES!r}") 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 deleted file mode 100644 index 165b2c66..00000000 --- a/rootly_sdk/models/escalation_path_rule_alert_urgency_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -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_path_rule_deferral_window.py b/rootly_sdk/models/escalation_path_rule_deferral_window.py deleted file mode 100644 index d495663f..00000000 --- a/rootly_sdk/models/escalation_path_rule_deferral_window.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_path_rule_deferral_window_rule_type import ( - EscalationPathRuleDeferralWindowRuleType, - check_escalation_path_rule_deferral_window_rule_type, -) -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_path_rule_deferral_window_time_blocks_item import ( - EscalationPathRuleDeferralWindowTimeBlocksItem, - ) - - -T = TypeVar("T", bound="EscalationPathRuleDeferralWindow") - - -@_attrs_define -class EscalationPathRuleDeferralWindow: - """ - Attributes: - 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: 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]: - 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_path_rule_deferral_window_time_blocks_item import ( - EscalationPathRuleDeferralWindowTimeBlocksItem, - ) - - d = dict(src_dict) - rule_type = check_escalation_path_rule_deferral_window_rule_type(d.pop("rule_type")) - - 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 = EscalationPathRuleDeferralWindowTimeBlocksItem.from_dict(time_blocks_item_data) - - time_blocks.append(time_blocks_item) - - escalation_path_rule_deferral_window = cls( - rule_type=rule_type, - time_zone=time_zone, - time_blocks=time_blocks, - ) - - escalation_path_rule_deferral_window.additional_properties = d - return escalation_path_rule_deferral_window - - @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_path_rule_deferral_window_rule_type.py b/rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py deleted file mode 100644 index 215b8e8d..00000000 --- a/rootly_sdk/models/escalation_path_rule_deferral_window_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -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_path_rule_deferral_window_time_blocks_item.py b/rootly_sdk/models/escalation_path_rule_deferral_window_time_blocks_item.py deleted file mode 100644 index b4c63629..00000000 --- a/rootly_sdk/models/escalation_path_rule_deferral_window_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="EscalationPathRuleDeferralWindowTimeBlocksItem") - - -@_attrs_define -class EscalationPathRuleDeferralWindowTimeBlocksItem: - """ - 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_path_rule_deferral_window_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_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]: - 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_path_rule_field_rule_type.py b/rootly_sdk/models/escalation_path_rule_field_rule_type.py deleted file mode 100644 index 414160bc..00000000 --- a/rootly_sdk/models/escalation_path_rule_field_rule_type.py +++ /dev/null @@ -1,15 +0,0 @@ -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_path_rule_json_path_operator.py b/rootly_sdk/models/escalation_path_rule_json_path_operator.py deleted file mode 100644 index ca7e74dc..00000000 --- a/rootly_sdk/models/escalation_path_rule_json_path_operator.py +++ /dev/null @@ -1,22 +0,0 @@ -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 deleted file mode 100644 index 1e4bff52..00000000 --- a/rootly_sdk/models/escalation_path_rule_json_path_rule_type.py +++ /dev/null @@ -1,15 +0,0 @@ -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_path_rule_service_rule_type.py b/rootly_sdk/models/escalation_path_rule_service_rule_type.py deleted file mode 100644 index fd8a88c8..00000000 --- a/rootly_sdk/models/escalation_path_rule_service_rule_type.py +++ /dev/null @@ -1,15 +0,0 @@ -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_path_rule_working_hour_rule_type.py b/rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py deleted file mode 100644 index a7d93d20..00000000 --- a/rootly_sdk/models/escalation_path_rule_working_hour_rule_type.py +++ /dev/null @@ -1,19 +0,0 @@ -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.py b/rootly_sdk/models/escalation_policy.py index 222eaa40..1c8ae36f 100644 --- a/rootly_sdk/models/escalation_policy.py +++ b/rootly_sdk/models/escalation_policy.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_business_hours_type_0 import EscalationPolicyBusinessHoursType0 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 2312ee81..4d311fed 100644 --- a/rootly_sdk/models/escalation_policy_business_hours_type_0.py +++ b/rootly_sdk/models/escalation_policy_business_hours_type_0.py @@ -1,20 +1,26 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.escalation_policy_business_hours_type_0_days_type_0_item import ( - EscalationPolicyBusinessHoursType0DaysType0Item, check_escalation_policy_business_hours_type_0_days_type_0_item, ) +from ..models.escalation_policy_business_hours_type_0_days_type_0_item import ( + EscalationPolicyBusinessHoursType0DaysType0Item, +) from ..models.escalation_policy_business_hours_type_0_time_zone import ( - EscalationPolicyBusinessHoursType0TimeZone, check_escalation_policy_business_hours_type_0_time_zone, ) +from ..models.escalation_policy_business_hours_type_0_time_zone import EscalationPolicyBusinessHoursType0TimeZone from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="EscalationPolicyBusinessHoursType0") 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 8b499200..e8841516 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 @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -304,8 +320,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -321,6 +339,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -332,6 +351,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -386,7 +406,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -407,6 +430,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -416,6 +440,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -522,15 +547,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -570,6 +601,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", diff --git a/rootly_sdk/models/escalation_policy_level.py b/rootly_sdk/models/escalation_policy_level.py index 71d1397a..e2b37699 100644 --- a/rootly_sdk/models/escalation_policy_level.py +++ b/rootly_sdk/models/escalation_policy_level.py @@ -1,20 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.escalation_policy_level_paging_strategy_configuration_schedule_strategy import ( - EscalationPolicyLevelPagingStrategyConfigurationScheduleStrategy, check_escalation_policy_level_paging_strategy_configuration_schedule_strategy, ) +from ..models.escalation_policy_level_paging_strategy_configuration_schedule_strategy import ( + EscalationPolicyLevelPagingStrategyConfigurationScheduleStrategy, +) from ..models.escalation_policy_level_paging_strategy_configuration_strategy import ( - EscalationPolicyLevelPagingStrategyConfigurationStrategy, check_escalation_policy_level_paging_strategy_configuration_strategy, ) +from ..models.escalation_policy_level_paging_strategy_configuration_strategy import ( + EscalationPolicyLevelPagingStrategyConfigurationStrategy, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.escalation_policy_level_notification_target_params_item_type_0 import ( diff --git a/rootly_sdk/models/escalation_policy_level_list.py b/rootly_sdk/models/escalation_policy_level_list.py index c77dc432..f4c9a165 100644 --- a/rootly_sdk/models/escalation_policy_level_list.py +++ b/rootly_sdk/models/escalation_policy_level_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_level_list_data_item import EscalationPolicyLevelListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class EscalationPolicyLevelList: data (list[EscalationPolicyLevelListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[EscalationPolicyLevelListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy_level_list_data_item import EscalationPolicyLevelListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_level_list_data_item import EscalationPolicyLevelListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_level_list = cls( data=data, links=links, meta=meta, + included=included, ) escalation_policy_level_list.additional_properties = d 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 de6c1f8a..4a8fe090 100644 --- a/rootly_sdk/models/escalation_policy_level_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_level_list_data_item.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_level import EscalationPolicyLevel @@ -26,6 +30,8 @@ class EscalationPolicyLevelListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy_level import EscalationPolicyLevel + id = self.id attributes = self.attributes.to_dict() 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 da88f065..be07d5fc 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.escalation_policy_level_notification_target_params_item_type_0_team_members import ( - EscalationPolicyLevelNotificationTargetParamsItemType0TeamMembers, check_escalation_policy_level_notification_target_params_item_type_0_team_members, ) +from ..models.escalation_policy_level_notification_target_params_item_type_0_team_members import ( + EscalationPolicyLevelNotificationTargetParamsItemType0TeamMembers, +) from ..models.escalation_policy_level_notification_target_params_item_type_0_type import ( - EscalationPolicyLevelNotificationTargetParamsItemType0Type, check_escalation_policy_level_notification_target_params_item_type_0_type, ) +from ..models.escalation_policy_level_notification_target_params_item_type_0_type import ( + EscalationPolicyLevelNotificationTargetParamsItemType0Type, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="EscalationPolicyLevelNotificationTargetParamsItemType0") diff --git a/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0_type.py b/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0_type.py index f8714fd0..eaeda31d 100644 --- a/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0_type.py +++ b/rootly_sdk/models/escalation_policy_level_notification_target_params_item_type_0_type.py @@ -1,12 +1,13 @@ from typing import Literal, cast EscalationPolicyLevelNotificationTargetParamsItemType0Type = Literal[ - "schedule", "service", "slack_channel", "team", "user" + "microsoft_teams_channel", "schedule", "service", "slack_channel", "team", "user" ] ESCALATION_POLICY_LEVEL_NOTIFICATION_TARGET_PARAMS_ITEM_TYPE_0_TYPE_VALUES: set[ EscalationPolicyLevelNotificationTargetParamsItemType0Type ] = { + "microsoft_teams_channel", "schedule", "service", "slack_channel", diff --git a/rootly_sdk/models/escalation_policy_level_response.py b/rootly_sdk/models/escalation_policy_level_response.py index 80658cce..a65a6860 100644 --- a/rootly_sdk/models/escalation_policy_level_response.py +++ b/rootly_sdk/models/escalation_policy_level_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_level_response_data import EscalationPolicyLevelResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="EscalationPolicyLevelResponse") @@ -18,14 +24,26 @@ class EscalationPolicyLevelResponse: """ Attributes: data (EscalationPolicyLevelResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: EscalationPolicyLevelResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy_level_response_data import EscalationPolicyLevelResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_level_response_data import EscalationPolicyLevelResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = EscalationPolicyLevelResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_level_response = cls( data=data, + included=included, ) escalation_policy_level_response.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_level_response_data.py b/rootly_sdk/models/escalation_policy_level_response_data.py index 49803990..d9652d3b 100644 --- a/rootly_sdk/models/escalation_policy_level_response_data.py +++ b/rootly_sdk/models/escalation_policy_level_response_data.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_level_response_data_type import ( - EscalationPolicyLevelResponseDataType, - check_escalation_policy_level_response_data_type, -) from ..types import UNSET, Unset +from ..models.escalation_policy_level_response_data_type import check_escalation_policy_level_response_data_type +from ..models.escalation_policy_level_response_data_type import EscalationPolicyLevelResponseDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_level import EscalationPolicyLevel @@ -34,6 +35,8 @@ class EscalationPolicyLevelResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy_level import EscalationPolicyLevel + id = self.id attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/escalation_policy_list.py b/rootly_sdk/models/escalation_policy_list.py index d1639d18..dd2beb27 100644 --- a/rootly_sdk/models/escalation_policy_list.py +++ b/rootly_sdk/models/escalation_policy_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_list_data_item import EscalationPolicyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class EscalationPolicyList: data (list[EscalationPolicyListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[EscalationPolicyListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.escalation_policy_list_data_item import EscalationPolicyListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_list_data_item import EscalationPolicyListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_list = cls( data=data, links=links, meta=meta, + included=included, ) escalation_policy_list.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_list_data_item.py b/rootly_sdk/models/escalation_policy_list_data_item.py index 3d4758cf..b584d977 100644 --- a/rootly_sdk/models/escalation_policy_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_list_data_item_type import ( - EscalationPolicyListDataItemType, - check_escalation_policy_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.escalation_policy_list_data_item_type import check_escalation_policy_list_data_item_type +from ..models.escalation_policy_list_data_item_type import EscalationPolicyListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.escalation_policy import EscalationPolicy @@ -33,6 +34,8 @@ class EscalationPolicyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy import EscalationPolicy + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/escalation_policy_path.py b/rootly_sdk/models/escalation_policy_path.py index 9da832f9..d690132e 100644 --- a/rootly_sdk/models/escalation_policy_path.py +++ b/rootly_sdk/models/escalation_policy_path.py @@ -1,36 +1,51 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 ..types import UNSET, Unset + +from ..models.escalation_policy_path_after_deferral_behavior import check_escalation_policy_path_after_deferral_behavior +from ..models.escalation_policy_path_after_deferral_behavior import EscalationPolicyPathAfterDeferralBehavior +from ..models.escalation_policy_path_match_mode import check_escalation_policy_path_match_mode +from ..models.escalation_policy_path_match_mode import EscalationPolicyPathMatchMode +from ..models.escalation_policy_path_path_type import check_escalation_policy_path_path_type +from ..models.escalation_policy_path_path_type import EscalationPolicyPathPathType from ..models.escalation_policy_path_time_restriction_time_zone import ( - EscalationPolicyPathTimeRestrictionTimeZone, check_escalation_policy_path_time_restriction_time_zone, ) +from ..models.escalation_policy_path_time_restriction_time_zone import EscalationPolicyPathTimeRestrictionTimeZone from ..types import UNSET, Unset +from typing import cast 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.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 import EscalationPolicyPathRulesItemType6 + from ..models.escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 + from ..models.escalation_policy_path_rules_item_type_8_type_0 import EscalationPolicyPathRulesItemType8Type0 + from ..models.escalation_policy_path_rules_item_type_8_type_1 import EscalationPolicyPathRulesItemType8Type1 + from ..models.escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 + from ..models.escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 + from ..models.escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 + from ..models.escalation_policy_path_rules_item_type_8_type_5 import EscalationPolicyPathRulesItemType8Type5 + from ..models.escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 + from ..models.escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 + from ..models.escalation_policy_path_rules_item_type_9_type_0 import EscalationPolicyPathRulesItemType9Type0 + from ..models.escalation_policy_path_rules_item_type_9_type_1 import EscalationPolicyPathRulesItemType9Type1 + from ..models.escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 + from ..models.escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 + from ..models.escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 + from ..models.escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 + from ..models.escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 + from ..models.escalation_policy_path_rules_item_type_9_type_7 import EscalationPolicyPathRulesItemType9Type7 from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem @@ -57,9 +72,18 @@ 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[EscalationPathRuleAlertUrgency | EscalationPathRuleDeferralWindow | EscalationPathRuleField | - EscalationPathRuleJsonPath | EscalationPathRuleService | EscalationPathRuleWorkingHour | None] | Unset): - Escalation path rules + rules (list[EscalationPolicyPathRulesItemType0 | EscalationPolicyPathRulesItemType1 | + EscalationPolicyPathRulesItemType2 | EscalationPolicyPathRulesItemType3 | EscalationPolicyPathRulesItemType4 | + EscalationPolicyPathRulesItemType5 | EscalationPolicyPathRulesItemType6 | EscalationPolicyPathRulesItemType7 | + EscalationPolicyPathRulesItemType8Type0 | EscalationPolicyPathRulesItemType8Type1 | + EscalationPolicyPathRulesItemType8Type2 | EscalationPolicyPathRulesItemType8Type3 | + EscalationPolicyPathRulesItemType8Type4 | EscalationPolicyPathRulesItemType8Type5 | + EscalationPolicyPathRulesItemType8Type6 | EscalationPolicyPathRulesItemType8Type7 | + EscalationPolicyPathRulesItemType9Type0 | EscalationPolicyPathRulesItemType9Type1 | + EscalationPolicyPathRulesItemType9Type2 | EscalationPolicyPathRulesItemType9Type3 | + EscalationPolicyPathRulesItemType9Type4 | EscalationPolicyPathRulesItemType9Type5 | + EscalationPolicyPathRulesItemType9Type6 | EscalationPolicyPathRulesItemType9Type7] | 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 @@ -82,13 +106,30 @@ class EscalationPolicyPath: updated_at: str | Unset = UNSET rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + EscalationPolicyPathRulesItemType0 + | EscalationPolicyPathRulesItemType1 + | EscalationPolicyPathRulesItemType2 + | EscalationPolicyPathRulesItemType3 + | EscalationPolicyPathRulesItemType4 + | EscalationPolicyPathRulesItemType5 + | EscalationPolicyPathRulesItemType6 + | EscalationPolicyPathRulesItemType7 + | EscalationPolicyPathRulesItemType8Type0 + | EscalationPolicyPathRulesItemType8Type1 + | EscalationPolicyPathRulesItemType8Type2 + | EscalationPolicyPathRulesItemType8Type3 + | EscalationPolicyPathRulesItemType8Type4 + | EscalationPolicyPathRulesItemType8Type5 + | EscalationPolicyPathRulesItemType8Type6 + | EscalationPolicyPathRulesItemType8Type7 + | EscalationPolicyPathRulesItemType9Type0 + | EscalationPolicyPathRulesItemType9Type1 + | EscalationPolicyPathRulesItemType9Type2 + | EscalationPolicyPathRulesItemType9Type3 + | EscalationPolicyPathRulesItemType9Type4 + | EscalationPolicyPathRulesItemType9Type5 + | EscalationPolicyPathRulesItemType9Type6 + | EscalationPolicyPathRulesItemType9Type7 ] | Unset ) = UNSET @@ -97,12 +138,31 @@ class EscalationPolicyPath: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 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 + from ..models.escalation_policy_path_rules_item_type_4 import EscalationPolicyPathRulesItemType4 + from ..models.escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 + from ..models.escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 + from ..models.escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 + from ..models.escalation_policy_path_rules_item_type_1 import EscalationPolicyPathRulesItemType1 + from ..models.escalation_policy_path_rules_item_type_8_type_1 import EscalationPolicyPathRulesItemType8Type1 + from ..models.escalation_policy_path_rules_item_type_9_type_7 import EscalationPolicyPathRulesItemType9Type7 + from ..models.escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 + from ..models.escalation_policy_path_rules_item_type_6 import EscalationPolicyPathRulesItemType6 + from ..models.escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 + from ..models.escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 + from ..models.escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 + from ..models.escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 + from ..models.escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 + from ..models.escalation_policy_path_rules_item_type_8_type_0 import EscalationPolicyPathRulesItemType8Type0 + from ..models.escalation_policy_path_rules_item_type_8_type_5 import EscalationPolicyPathRulesItemType8Type5 + from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 + from ..models.escalation_policy_path_rules_item_type_9_type_0 import EscalationPolicyPathRulesItemType9Type0 + from ..models.escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 + from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 + from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 + from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem + from ..models.escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 + from ..models.escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 + from ..models.escalation_policy_path_rules_item_type_9_type_1 import EscalationPolicyPathRulesItemType9Type1 name = self.name @@ -144,25 +204,60 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at - rules: list[dict[str, Any] | None] | Unset = UNSET + 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] | None - if isinstance(rules_item_data, EscalationPathRuleAlertUrgency): + rules_item: dict[str, Any] + if isinstance(rules_item_data, EscalationPolicyPathRulesItemType0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType2): + 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, EscalationPolicyPathRulesItemType4): + 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, EscalationPolicyPathRulesItemType6): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType7): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type2): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleWorkingHour): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type3): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleJsonPath): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type4): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleField): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type5): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleService): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type6): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleDeferralWindow): + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType8Type7): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type2): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type3): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type4): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, EscalationPolicyPathRulesItemType9Type6): rules_item = rules_item_data.to_dict() else: - rules_item = rules_item_data + rules_item = rules_item_data.to_dict() + rules.append(rules_item) time_restriction_time_zone: str | Unset = UNSET @@ -215,12 +310,30 @@ def to_dict(self) -> dict[str, Any]: @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.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 import EscalationPolicyPathRulesItemType6 + from ..models.escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 + from ..models.escalation_policy_path_rules_item_type_8_type_0 import EscalationPolicyPathRulesItemType8Type0 + from ..models.escalation_policy_path_rules_item_type_8_type_1 import EscalationPolicyPathRulesItemType8Type1 + from ..models.escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 + from ..models.escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 + from ..models.escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 + from ..models.escalation_policy_path_rules_item_type_8_type_5 import EscalationPolicyPathRulesItemType8Type5 + from ..models.escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 + from ..models.escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 + from ..models.escalation_policy_path_rules_item_type_9_type_0 import EscalationPolicyPathRulesItemType9Type0 + from ..models.escalation_policy_path_rules_item_type_9_type_1 import EscalationPolicyPathRulesItemType9Type1 + from ..models.escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 + from ..models.escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 + from ..models.escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 + from ..models.escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 + from ..models.escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 + from ..models.escalation_policy_path_rules_item_type_9_type_7 import EscalationPolicyPathRulesItemType9Type7 from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem d = dict(src_dict) @@ -287,13 +400,30 @@ def _parse_after_deferral_path_id(data: object) -> None | str | Unset: _rules = d.pop("rules", UNSET) rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + EscalationPolicyPathRulesItemType0 + | EscalationPolicyPathRulesItemType1 + | EscalationPolicyPathRulesItemType2 + | EscalationPolicyPathRulesItemType3 + | EscalationPolicyPathRulesItemType4 + | EscalationPolicyPathRulesItemType5 + | EscalationPolicyPathRulesItemType6 + | EscalationPolicyPathRulesItemType7 + | EscalationPolicyPathRulesItemType8Type0 + | EscalationPolicyPathRulesItemType8Type1 + | EscalationPolicyPathRulesItemType8Type2 + | EscalationPolicyPathRulesItemType8Type3 + | EscalationPolicyPathRulesItemType8Type4 + | EscalationPolicyPathRulesItemType8Type5 + | EscalationPolicyPathRulesItemType8Type6 + | EscalationPolicyPathRulesItemType8Type7 + | EscalationPolicyPathRulesItemType9Type0 + | EscalationPolicyPathRulesItemType9Type1 + | EscalationPolicyPathRulesItemType9Type2 + | EscalationPolicyPathRulesItemType9Type3 + | EscalationPolicyPathRulesItemType9Type4 + | EscalationPolicyPathRulesItemType9Type5 + | EscalationPolicyPathRulesItemType9Type6 + | EscalationPolicyPathRulesItemType9Type7 ] | Unset ) = UNSET @@ -304,20 +434,35 @@ def _parse_after_deferral_path_id(data: object) -> None | str | Unset: def _parse_rules_item( data: object, ) -> ( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + EscalationPolicyPathRulesItemType0 + | EscalationPolicyPathRulesItemType1 + | EscalationPolicyPathRulesItemType2 + | EscalationPolicyPathRulesItemType3 + | EscalationPolicyPathRulesItemType4 + | EscalationPolicyPathRulesItemType5 + | EscalationPolicyPathRulesItemType6 + | EscalationPolicyPathRulesItemType7 + | EscalationPolicyPathRulesItemType8Type0 + | EscalationPolicyPathRulesItemType8Type1 + | EscalationPolicyPathRulesItemType8Type2 + | EscalationPolicyPathRulesItemType8Type3 + | EscalationPolicyPathRulesItemType8Type4 + | EscalationPolicyPathRulesItemType8Type5 + | EscalationPolicyPathRulesItemType8Type6 + | EscalationPolicyPathRulesItemType8Type7 + | EscalationPolicyPathRulesItemType9Type0 + | EscalationPolicyPathRulesItemType9Type1 + | EscalationPolicyPathRulesItemType9Type2 + | EscalationPolicyPathRulesItemType9Type3 + | EscalationPolicyPathRulesItemType9Type4 + | EscalationPolicyPathRulesItemType9Type5 + | EscalationPolicyPathRulesItemType9Type6 + | EscalationPolicyPathRulesItemType9Type7 ): - if data is None: - return data try: if not isinstance(data, dict): raise TypeError() - rules_item_type_0 = EscalationPathRuleAlertUrgency.from_dict(data) + rules_item_type_0 = EscalationPolicyPathRulesItemType0.from_dict(data) return rules_item_type_0 except (TypeError, ValueError, AttributeError, KeyError): @@ -325,7 +470,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_1 = EscalationPathRuleWorkingHour.from_dict(data) + rules_item_type_1 = EscalationPolicyPathRulesItemType1.from_dict(data) return rules_item_type_1 except (TypeError, ValueError, AttributeError, KeyError): @@ -333,7 +478,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_2 = EscalationPathRuleJsonPath.from_dict(data) + rules_item_type_2 = EscalationPolicyPathRulesItemType2.from_dict(data) return rules_item_type_2 except (TypeError, ValueError, AttributeError, KeyError): @@ -341,7 +486,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_3 = EscalationPathRuleField.from_dict(data) + rules_item_type_3 = EscalationPolicyPathRulesItemType3.from_dict(data) return rules_item_type_3 except (TypeError, ValueError, AttributeError, KeyError): @@ -349,7 +494,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_4 = EscalationPathRuleService.from_dict(data) + rules_item_type_4 = EscalationPolicyPathRulesItemType4.from_dict(data) return rules_item_type_4 except (TypeError, ValueError, AttributeError, KeyError): @@ -357,21 +502,152 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_5 = EscalationPathRuleDeferralWindow.from_dict(data) + rules_item_type_5 = EscalationPolicyPathRulesItemType5.from_dict(data) return rules_item_type_5 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None, - data, - ) + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6 = EscalationPolicyPathRulesItemType6.from_dict(data) + + return rules_item_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_7 = EscalationPolicyPathRulesItemType7.from_dict(data) + + return rules_item_type_7 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_0 = EscalationPolicyPathRulesItemType8Type0.from_dict(data) + + return rules_item_type_8_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_1 = EscalationPolicyPathRulesItemType8Type1.from_dict(data) + + return rules_item_type_8_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_2 = EscalationPolicyPathRulesItemType8Type2.from_dict(data) + + return rules_item_type_8_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_3 = EscalationPolicyPathRulesItemType8Type3.from_dict(data) + + return rules_item_type_8_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_4 = EscalationPolicyPathRulesItemType8Type4.from_dict(data) + + return rules_item_type_8_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_5 = EscalationPolicyPathRulesItemType8Type5.from_dict(data) + + return rules_item_type_8_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_6 = EscalationPolicyPathRulesItemType8Type6.from_dict(data) + + return rules_item_type_8_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_7 = EscalationPolicyPathRulesItemType8Type7.from_dict(data) + + return rules_item_type_8_type_7 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_0 = EscalationPolicyPathRulesItemType9Type0.from_dict(data) + + return rules_item_type_9_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_1 = EscalationPolicyPathRulesItemType9Type1.from_dict(data) + + return rules_item_type_9_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_2 = EscalationPolicyPathRulesItemType9Type2.from_dict(data) + + return rules_item_type_9_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_3 = EscalationPolicyPathRulesItemType9Type3.from_dict(data) + + return rules_item_type_9_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_4 = EscalationPolicyPathRulesItemType9Type4.from_dict(data) + + return rules_item_type_9_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_5 = EscalationPolicyPathRulesItemType9Type5.from_dict(data) + + return rules_item_type_9_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_6 = EscalationPolicyPathRulesItemType9Type6.from_dict(data) + + return rules_item_type_9_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_7 = EscalationPolicyPathRulesItemType9Type7.from_dict(data) + + return rules_item_type_9_type_7 rules_item = _parse_rules_item(rules_item_data) diff --git a/rootly_sdk/models/escalation_policy_path_list.py b/rootly_sdk/models/escalation_policy_path_list.py index 8e9c2bd5..7b2dfcbf 100644 --- a/rootly_sdk/models/escalation_policy_path_list.py +++ b/rootly_sdk/models/escalation_policy_path_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_path_list_data_item import EscalationPolicyPathListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class EscalationPolicyPathList: data (list[EscalationPolicyPathListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[EscalationPolicyPathListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy_path_list_data_item import EscalationPolicyPathListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_path_list_data_item import EscalationPolicyPathListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_path_list = cls( data=data, links=links, meta=meta, + included=included, ) escalation_policy_path_list.additional_properties = d 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 7d50c763..0deb2c07 100644 --- a/rootly_sdk/models/escalation_policy_path_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_path_list_data_item.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_path import EscalationPolicyPath @@ -26,6 +30,8 @@ class EscalationPolicyPathListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy_path import EscalationPolicyPath + id = self.id attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/escalation_policy_path_response.py b/rootly_sdk/models/escalation_policy_path_response.py index 591386ad..9402f849 100644 --- a/rootly_sdk/models/escalation_policy_path_response.py +++ b/rootly_sdk/models/escalation_policy_path_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_path_response_data import EscalationPolicyPathResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="EscalationPolicyPathResponse") @@ -18,14 +24,26 @@ class EscalationPolicyPathResponse: """ Attributes: data (EscalationPolicyPathResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: EscalationPolicyPathResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.escalation_policy_path_response_data import EscalationPolicyPathResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_path_response_data import EscalationPolicyPathResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = EscalationPolicyPathResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_path_response = cls( data=data, + included=included, ) escalation_policy_path_response.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_path_response_data.py b/rootly_sdk/models/escalation_policy_path_response_data.py index a4d94aab..0822c461 100644 --- a/rootly_sdk/models/escalation_policy_path_response_data.py +++ b/rootly_sdk/models/escalation_policy_path_response_data.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_path_response_data_type import ( - EscalationPolicyPathResponseDataType, - check_escalation_policy_path_response_data_type, -) from ..types import UNSET, Unset +from ..models.escalation_policy_path_response_data_type import check_escalation_policy_path_response_data_type +from ..models.escalation_policy_path_response_data_type import EscalationPolicyPathResponseDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_path import EscalationPolicyPath @@ -34,6 +35,8 @@ class EscalationPolicyPathResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy_path import EscalationPolicyPath + id = self.id attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/escalation_path_rule_alert_urgency.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py similarity index 62% rename from rootly_sdk/models/escalation_path_rule_alert_urgency.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_0.py index 86c59b5b..6c74acb0 100644 --- a/rootly_sdk/models/escalation_path_rule_alert_urgency.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_0.py @@ -1,28 +1,32 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_alert_urgency_rule_type import ( - EscalationPathRuleAlertUrgencyRuleType, - check_escalation_path_rule_alert_urgency_rule_type, +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_0_rule_type import ( + check_escalation_policy_path_rules_item_type_0_rule_type, ) +from ..models.escalation_policy_path_rules_item_type_0_rule_type import EscalationPolicyPathRulesItemType0RuleType +from typing import cast + -T = TypeVar("T", bound="EscalationPathRuleAlertUrgency") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType0") @_attrs_define -class EscalationPathRuleAlertUrgency: +class EscalationPolicyPathRulesItemType0: """ Attributes: - rule_type (EscalationPathRuleAlertUrgencyRuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType0RuleType): The type of the escalation path rule urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used """ - rule_type: EscalationPathRuleAlertUrgencyRuleType + rule_type: EscalationPolicyPathRulesItemType0RuleType urgency_ids: list[str] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -45,17 +49,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_path_rule_alert_urgency_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_0_rule_type(d.pop("rule_type")) urgency_ids = cast(list[str], d.pop("urgency_ids")) - escalation_path_rule_alert_urgency = cls( + escalation_policy_path_rules_item_type_0 = cls( rule_type=rule_type, urgency_ids=urgency_ids, ) - escalation_path_rule_alert_urgency.additional_properties = d - return escalation_path_rule_alert_urgency + escalation_policy_path_rules_item_type_0.additional_properties = d + return escalation_policy_path_rules_item_type_0 @property def additional_keys(self) -> list[str]: 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 new file mode 100644 index 00000000..ade096f4 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_0_rule_type.py @@ -0,0 +1,19 @@ +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_path_rule_working_hour.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py similarity index 63% rename from rootly_sdk/models/escalation_path_rule_working_hour.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_1.py index c48901b4..e6f9c13c 100644 --- a/rootly_sdk/models/escalation_path_rule_working_hour.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_1.py @@ -1,28 +1,32 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_working_hour_rule_type import ( - EscalationPathRuleWorkingHourRuleType, - check_escalation_path_rule_working_hour_rule_type, +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_1_rule_type import ( + check_escalation_policy_path_rules_item_type_1_rule_type, ) +from ..models.escalation_policy_path_rules_item_type_1_rule_type import EscalationPolicyPathRulesItemType1RuleType +from typing import cast + -T = TypeVar("T", bound="EscalationPathRuleWorkingHour") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType1") @_attrs_define -class EscalationPathRuleWorkingHour: +class EscalationPolicyPathRulesItemType1: """ Attributes: - rule_type (EscalationPathRuleWorkingHourRuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType1RuleType): The type of the escalation path rule within_working_hour (bool): Whether the escalation path should be used within working hours """ - rule_type: EscalationPathRuleWorkingHourRuleType + rule_type: EscalationPolicyPathRulesItemType1RuleType within_working_hour: bool additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -45,17 +49,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_path_rule_working_hour_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_1_rule_type(d.pop("rule_type")) within_working_hour = d.pop("within_working_hour") - escalation_path_rule_working_hour = cls( + escalation_policy_path_rules_item_type_1 = cls( rule_type=rule_type, within_working_hour=within_working_hour, ) - escalation_path_rule_working_hour.additional_properties = d - return escalation_path_rule_working_hour + escalation_policy_path_rules_item_type_1.additional_properties = d + return escalation_policy_path_rules_item_type_1 @property def additional_keys(self) -> list[str]: 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 new file mode 100644 index 00000000..3ff4b383 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_1_rule_type.py @@ -0,0 +1,19 @@ +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_path_rule_json_path.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py similarity index 65% rename from rootly_sdk/models/escalation_path_rule_json_path.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_2.py index 31951043..0fb1d1f3 100644 --- a/rootly_sdk/models/escalation_path_rule_json_path.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_2.py @@ -1,38 +1,42 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_json_path_operator import ( - EscalationPathRuleJsonPathOperator, - check_escalation_path_rule_json_path_operator, +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_2_operator import ( + check_escalation_policy_path_rules_item_type_2_operator, ) -from ..models.escalation_path_rule_json_path_rule_type import ( - EscalationPathRuleJsonPathRuleType, - check_escalation_path_rule_json_path_rule_type, +from ..models.escalation_policy_path_rules_item_type_2_operator import EscalationPolicyPathRulesItemType2Operator +from ..models.escalation_policy_path_rules_item_type_2_rule_type import ( + check_escalation_policy_path_rules_item_type_2_rule_type, ) +from ..models.escalation_policy_path_rules_item_type_2_rule_type import EscalationPolicyPathRulesItemType2RuleType from ..types import UNSET, Unset +from typing import cast + -T = TypeVar("T", bound="EscalationPathRuleJsonPath") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType2") @_attrs_define -class EscalationPathRuleJsonPath: +class EscalationPolicyPathRulesItemType2: """ Attributes: - rule_type (EscalationPathRuleJsonPathRuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType2RuleType): The type of the escalation path rule json_path (str): JSON path to extract value from payload - operator (EscalationPathRuleJsonPathOperator): How JSON path value should be matched + operator (EscalationPolicyPathRulesItemType2Operator): 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: EscalationPathRuleJsonPathRuleType + rule_type: EscalationPolicyPathRulesItemType2RuleType json_path: str - operator: EscalationPathRuleJsonPathOperator + operator: EscalationPolicyPathRulesItemType2Operator value: None | str | Unset = UNSET values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -73,11 +77,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_path_rule_json_path_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_2_rule_type(d.pop("rule_type")) json_path = d.pop("json_path") - operator = check_escalation_path_rule_json_path_operator(d.pop("operator")) + operator = check_escalation_policy_path_rules_item_type_2_operator(d.pop("operator")) def _parse_value(data: object) -> None | str | Unset: if data is None: @@ -90,7 +94,7 @@ def _parse_value(data: object) -> None | str | Unset: values = cast(list[str], d.pop("values", UNSET)) - escalation_path_rule_json_path = cls( + escalation_policy_path_rules_item_type_2 = cls( rule_type=rule_type, json_path=json_path, operator=operator, @@ -98,8 +102,8 @@ def _parse_value(data: object) -> None | str | Unset: values=values, ) - escalation_path_rule_json_path.additional_properties = d - return escalation_path_rule_json_path + escalation_policy_path_rules_item_type_2.additional_properties = d + return escalation_policy_path_rules_item_type_2 @property def additional_keys(self) -> list[str]: 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 new file mode 100644 index 00000000..5ba6f8b7 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_operator.py @@ -0,0 +1,47 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_2_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType2Operator] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +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 new file mode 100644 index 00000000..ed2c358b --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_2_rule_type.py @@ -0,0 +1,19 @@ +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_path_rule_field.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py similarity index 61% rename from rootly_sdk/models/escalation_path_rule_field.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_3.py index 3df46e2c..977d1c19 100644 --- a/rootly_sdk/models/escalation_path_rule_field.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_3.py @@ -1,39 +1,43 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_field_operator import ( - EscalationPathRuleFieldOperator, - check_escalation_path_rule_field_operator, +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_3_operator import ( + check_escalation_policy_path_rules_item_type_3_operator, ) -from ..models.escalation_path_rule_field_rule_type import ( - EscalationPathRuleFieldRuleType, - check_escalation_path_rule_field_rule_type, +from ..models.escalation_policy_path_rules_item_type_3_operator import EscalationPolicyPathRulesItemType3Operator +from ..models.escalation_policy_path_rules_item_type_3_rule_type import ( + check_escalation_policy_path_rules_item_type_3_rule_type, ) +from ..models.escalation_policy_path_rules_item_type_3_rule_type import EscalationPolicyPathRulesItemType3RuleType from ..types import UNSET, Unset +from typing import cast + -T = TypeVar("T", bound="EscalationPathRuleField") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType3") @_attrs_define -class EscalationPathRuleField: +class EscalationPolicyPathRulesItemType3: """ Attributes: - rule_type (EscalationPathRuleFieldRuleType): The type of the escalation path rule + rule_type (EscalationPolicyPathRulesItemType3RuleType): 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 (EscalationPathRuleFieldOperator): How the alert field value should be matched + operator (EscalationPolicyPathRulesItemType3Operator): How the alert field value should be matched values (list[str] | Unset): Values to match against """ - rule_type: EscalationPathRuleFieldRuleType + rule_type: EscalationPolicyPathRulesItemType3RuleType fieldable_type: str fieldable_id: str - operator: EscalationPathRuleFieldOperator + operator: EscalationPolicyPathRulesItemType3Operator values: list[str] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -68,17 +72,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_path_rule_field_rule_type(d.pop("rule_type")) + rule_type = check_escalation_policy_path_rules_item_type_3_rule_type(d.pop("rule_type")) fieldable_type = d.pop("fieldable_type") fieldable_id = d.pop("fieldable_id") - operator = check_escalation_path_rule_field_operator(d.pop("operator")) + operator = check_escalation_policy_path_rules_item_type_3_operator(d.pop("operator")) values = cast(list[str], d.pop("values", UNSET)) - escalation_path_rule_field = cls( + escalation_policy_path_rules_item_type_3 = cls( rule_type=rule_type, fieldable_type=fieldable_type, fieldable_id=fieldable_id, @@ -86,8 +90,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: values=values, ) - escalation_path_rule_field.additional_properties = d - return escalation_path_rule_field + escalation_policy_path_rules_item_type_3.additional_properties = d + return escalation_policy_path_rules_item_type_3 @property def additional_keys(self) -> list[str]: diff --git a/rootly_sdk/models/escalation_path_rule_field_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_3_operator.py similarity index 51% rename from rootly_sdk/models/escalation_path_rule_field_operator.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_3_operator.py index 6258b694..d036caca 100644 --- a/rootly_sdk/models/escalation_path_rule_field_operator.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_3_operator.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPathRuleFieldOperator = Literal[ +EscalationPolicyPathRulesItemType3Operator = Literal[ "contains", "contains_key", "does_not_contain", @@ -17,7 +17,7 @@ "starts_with", ] -ESCALATION_PATH_RULE_FIELD_OPERATOR_VALUES: set[EscalationPathRuleFieldOperator] = { +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_3_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType3Operator] = { "contains", "contains_key", "does_not_contain", @@ -35,9 +35,13 @@ } -def check_escalation_path_rule_field_operator(value: str | None) -> EscalationPathRuleFieldOperator | None: +def check_escalation_policy_path_rules_item_type_3_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType3Operator | None: if value is None: return None - 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}") + 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}" + ) 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 new file mode 100644 index 00000000..7e78400c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_3_rule_type.py @@ -0,0 +1,19 @@ +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_path_rule_service.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py similarity index 62% rename from rootly_sdk/models/escalation_path_rule_service.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_4.py index 9b278181..6822abd1 100644 --- a/rootly_sdk/models/escalation_path_rule_service.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py @@ -1,28 +1,32 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_path_rule_service_rule_type import ( - EscalationPathRuleServiceRuleType, - check_escalation_path_rule_service_rule_type, +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_4_rule_type import ( + check_escalation_policy_path_rules_item_type_4_rule_type, ) +from ..models.escalation_policy_path_rules_item_type_4_rule_type import EscalationPolicyPathRulesItemType4RuleType +from typing import cast + -T = TypeVar("T", bound="EscalationPathRuleService") +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType4") @_attrs_define -class EscalationPathRuleService: +class EscalationPolicyPathRulesItemType4: """ Attributes: - rule_type (EscalationPathRuleServiceRuleType): The type of the escalation path rule + 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: EscalationPathRuleServiceRuleType + rule_type: EscalationPolicyPathRulesItemType4RuleType service_ids: list[str] additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -45,17 +49,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_path_rule_service_rule_type(d.pop("rule_type")) + 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_path_rule_service = cls( + escalation_policy_path_rules_item_type_4 = cls( rule_type=rule_type, service_ids=service_ids, ) - escalation_path_rule_service.additional_properties = d - return escalation_path_rule_service + 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]: 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_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py new file mode 100644 index 00000000..2bbd8cb1 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py @@ -0,0 +1,112 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_5_rule_type import ( + check_escalation_policy_path_rules_item_type_5_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_5_rule_type import EscalationPolicyPathRulesItemType5RuleType +from ..models.escalation_policy_path_rules_item_type_5_time_zone import ( + check_escalation_policy_path_rules_item_type_5_time_zone, +) +from ..models.escalation_policy_path_rules_item_type_5_time_zone import EscalationPolicyPathRulesItemType5TimeZone +from typing import cast + +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]: + from ..models.escalation_policy_path_rules_item_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType5TimeBlocksItem, + ) + + 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..c6514f9b --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_blocks_item.py @@ -0,0 +1,166 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5TimeBlocksItem") + + +@_attrs_define +class EscalationPolicyPathRulesItemType5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + 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) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + 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_path_rule_deferral_window_time_zone.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py similarity index 90% rename from rootly_sdk/models/escalation_path_rule_deferral_window_time_zone.py rename to rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py index dbd31352..670be050 100644 --- a/rootly_sdk/models/escalation_path_rule_deferral_window_time_zone.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5_time_zone.py @@ -1,6 +1,6 @@ from typing import Literal, cast -EscalationPathRuleDeferralWindowTimeZone = Literal[ +EscalationPolicyPathRulesItemType5TimeZone = Literal[ "Abu Dhabi", "Adelaide", "Africa/Algiers", @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -292,7 +308,7 @@ "Zurich", ] -ESCALATION_PATH_RULE_DEFERRAL_WINDOW_TIME_ZONE_VALUES: set[EscalationPathRuleDeferralWindowTimeZone] = { +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: set[EscalationPolicyPathRulesItemType5TimeZone] = { "Abu Dhabi", "Adelaide", "Africa/Algiers", @@ -304,8 +320,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -321,6 +339,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -332,6 +351,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -386,7 +406,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -407,6 +430,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -416,6 +440,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -522,15 +547,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -570,6 +601,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -585,13 +617,13 @@ } -def check_escalation_path_rule_deferral_window_time_zone( +def check_escalation_policy_path_rules_item_type_5_time_zone( value: str | None, -) -> EscalationPathRuleDeferralWindowTimeZone | None: +) -> EscalationPolicyPathRulesItemType5TimeZone | None: if value is None: return None - if value in ESCALATION_PATH_RULE_DEFERRAL_WINDOW_TIME_ZONE_VALUES: - return cast(EscalationPathRuleDeferralWindowTimeZone, value) + 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_PATH_RULE_DEFERRAL_WINDOW_TIME_ZONE_VALUES!r}" + 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_6.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6.py new file mode 100644 index 00000000..1b486b2a --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_6_operator import ( + check_escalation_policy_path_rules_item_type_6_operator, +) +from ..models.escalation_policy_path_rules_item_type_6_operator import EscalationPolicyPathRulesItemType6Operator +from ..models.escalation_policy_path_rules_item_type_6_rule_type import ( + check_escalation_policy_path_rules_item_type_6_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_6_rule_type import EscalationPolicyPathRulesItemType6RuleType +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6") + + +@_attrs_define +class EscalationPolicyPathRulesItemType6: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType6RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType6Operator): How the alert source should be matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: EscalationPolicyPathRulesItemType6RuleType + operator: EscalationPolicyPathRulesItemType6Operator + values: 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 + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "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_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + escalation_policy_path_rules_item_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + escalation_policy_path_rules_item_type_6.additional_properties = d + return escalation_policy_path_rules_item_type_6 + + @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_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_operator.py new file mode 100644 index 00000000..f841c2c3 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType6Operator] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_escalation_policy_path_rules_item_type_6_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType6Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_rule_type.py new file mode 100644 index 00000000..713ba08d --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType6RuleType = Literal["source"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType6RuleType] = { + "source", +} + + +def check_escalation_policy_path_rules_item_type_6_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType6RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py new file mode 100644 index 00000000..c0061fc8 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_7_operator import ( + check_escalation_policy_path_rules_item_type_7_operator, +) +from ..models.escalation_policy_path_rules_item_type_7_operator import EscalationPolicyPathRulesItemType7Operator +from ..models.escalation_policy_path_rules_item_type_7_rule_type import ( + check_escalation_policy_path_rules_item_type_7_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_7_rule_type import EscalationPolicyPathRulesItemType7RuleType +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7") + + +@_attrs_define +class EscalationPolicyPathRulesItemType7: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType7RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType7Operator): Whether the alert must (or must not) have related + incidents + """ + + rule_type: EscalationPolicyPathRulesItemType7RuleType + operator: EscalationPolicyPathRulesItemType7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + 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_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_7_operator(d.pop("operator")) + + escalation_policy_path_rules_item_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + escalation_policy_path_rules_item_type_7.additional_properties = d + return escalation_policy_path_rules_item_type_7 + + @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_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_operator.py new file mode 100644 index 00000000..b31cb9a2 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_operator.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7Operator = Literal["is_not_set", "is_set"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_OPERATOR_VALUES: set[EscalationPolicyPathRulesItemType7Operator] = { + "is_not_set", + "is_set", +} + + +def check_escalation_policy_path_rules_item_type_7_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType7Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_rule_type.py new file mode 100644 index 00000000..1308f650 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7_rule_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType7RuleType = Literal["related_incidents"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: set[EscalationPolicyPathRulesItemType7RuleType] = { + "related_incidents", +} + + +def check_escalation_policy_path_rules_item_type_7_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType7RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py new file mode 100644 index 00000000..16cc8c77 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_8_type_0_rule_type import ( + check_escalation_policy_path_rules_item_type_8_type_0_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_8_type_0_rule_type import ( + EscalationPolicyPathRulesItemType8Type0RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type0") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type0: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type0RuleType): The type of the escalation path rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType8Type0RuleType + 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_8_type_0_rule_type(d.pop("rule_type")) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + escalation_policy_path_rules_item_type_8_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + escalation_policy_path_rules_item_type_8_type_0.additional_properties = d + return escalation_policy_path_rules_item_type_8_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_8_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0_rule_type.py new file mode 100644 index 00000000..264602f3 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type0RuleType = Literal["alert_urgency"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type0RuleType +] = { + "alert_urgency", +} + + +def check_escalation_policy_path_rules_item_type_8_type_0_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type0RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py new file mode 100644 index 00000000..068ae869 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_8_type_1_rule_type import ( + check_escalation_policy_path_rules_item_type_8_type_1_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_8_type_1_rule_type import ( + EscalationPolicyPathRulesItemType8Type1RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type1") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type1: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type1RuleType): The type of the escalation path rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: EscalationPolicyPathRulesItemType8Type1RuleType + 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_8_type_1_rule_type(d.pop("rule_type")) + + within_working_hour = d.pop("within_working_hour") + + escalation_policy_path_rules_item_type_8_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + escalation_policy_path_rules_item_type_8_type_1.additional_properties = d + return escalation_policy_path_rules_item_type_8_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_8_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1_rule_type.py new file mode 100644 index 00000000..109e8ed2 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type1RuleType = Literal["working_hour"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type1RuleType +] = { + "working_hour", +} + + +def check_escalation_policy_path_rules_item_type_8_type_1_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type1RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py new file mode 100644 index 00000000..1fb1caa6 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_8_type_2_operator import ( + check_escalation_policy_path_rules_item_type_8_type_2_operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_2_operator import ( + EscalationPolicyPathRulesItemType8Type2Operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_2_rule_type import ( + check_escalation_policy_path_rules_item_type_8_type_2_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_8_type_2_rule_type import ( + EscalationPolicyPathRulesItemType8Type2RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type2") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type2: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (EscalationPolicyPathRulesItemType8Type2Operator): 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: EscalationPolicyPathRulesItemType8Type2RuleType + json_path: str + operator: EscalationPolicyPathRulesItemType8Type2Operator + 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_8_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_escalation_policy_path_rules_item_type_8_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_8_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + escalation_policy_path_rules_item_type_8_type_2.additional_properties = d + return escalation_policy_path_rules_item_type_8_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_8_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_operator.py new file mode 100644 index 00000000..5faeeb50 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType8Type2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_escalation_policy_path_rules_item_type_8_type_2_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type2Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_rule_type.py new file mode 100644 index 00000000..0e61520a --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type2RuleType = Literal["json_path"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type2RuleType +] = { + "json_path", +} + + +def check_escalation_policy_path_rules_item_type_8_type_2_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type2RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py new file mode 100644 index 00000000..c8acca55 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_8_type_3_operator import ( + check_escalation_policy_path_rules_item_type_8_type_3_operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_3_operator import ( + EscalationPolicyPathRulesItemType8Type3Operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_3_rule_type import ( + check_escalation_policy_path_rules_item_type_8_type_3_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_8_type_3_rule_type import ( + EscalationPolicyPathRulesItemType8Type3RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type3") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type3: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type3RuleType): 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 (EscalationPolicyPathRulesItemType8Type3Operator): How the alert field value should be matched + values (list[str] | Unset): Values to match against + """ + + rule_type: EscalationPolicyPathRulesItemType8Type3RuleType + fieldable_type: str + fieldable_id: str + operator: EscalationPolicyPathRulesItemType8Type3Operator + 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_8_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_8_type_3_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values", UNSET)) + + escalation_policy_path_rules_item_type_8_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_8_type_3.additional_properties = d + return escalation_policy_path_rules_item_type_8_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_8_type_3_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_operator.py new file mode 100644 index 00000000..2d4fbe9c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type3Operator = 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_8_TYPE_3_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType8Type3Operator +] = { + "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_8_type_3_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type3Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_rule_type.py new file mode 100644 index 00000000..0a39312e --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type3RuleType = Literal["field"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type3RuleType +] = { + "field", +} + + +def check_escalation_policy_path_rules_item_type_8_type_3_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type3RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py new file mode 100644 index 00000000..e0e1ad89 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_8_type_4_rule_type import ( + check_escalation_policy_path_rules_item_type_8_type_4_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_8_type_4_rule_type import ( + EscalationPolicyPathRulesItemType8Type4RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type4") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type4: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType8Type4RuleType + 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_8_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + escalation_policy_path_rules_item_type_8_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + escalation_policy_path_rules_item_type_8_type_4.additional_properties = d + return escalation_policy_path_rules_item_type_8_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_8_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4_rule_type.py new file mode 100644 index 00000000..bdafcbd9 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type4RuleType = Literal["service"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type4RuleType +] = { + "service", +} + + +def check_escalation_policy_path_rules_item_type_8_type_4_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type4RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py new file mode 100644 index 00000000..22bf6537 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_8_type_5_rule_type import ( + check_escalation_policy_path_rules_item_type_8_type_5_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_8_type_5_rule_type import ( + EscalationPolicyPathRulesItemType8Type5RuleType, +) +from ..models.escalation_policy_path_rules_item_type_8_type_5_time_zone import ( + check_escalation_policy_path_rules_item_type_8_type_5_time_zone, +) +from ..models.escalation_policy_path_rules_item_type_8_type_5_time_zone import ( + EscalationPolicyPathRulesItemType8Type5TimeZone, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.escalation_policy_path_rules_item_type_8_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType8Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type5") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type5: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type5RuleType): The type of the escalation path rule + time_zone (EscalationPolicyPathRulesItemType8Type5TimeZone): Time zone for the deferral window + time_blocks (list[EscalationPolicyPathRulesItemType8Type5TimeBlocksItem]): Time windows during which alerts are + deferred + """ + + rule_type: EscalationPolicyPathRulesItemType8Type5RuleType + time_zone: EscalationPolicyPathRulesItemType8Type5TimeZone + time_blocks: list[EscalationPolicyPathRulesItemType8Type5TimeBlocksItem] + 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_8_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType8Type5TimeBlocksItem, + ) + + 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_8_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType8Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_8_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_escalation_policy_path_rules_item_type_8_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 = EscalationPolicyPathRulesItemType8Type5TimeBlocksItem.from_dict(time_blocks_item_data) + + time_blocks.append(time_blocks_item) + + escalation_policy_path_rules_item_type_8_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + escalation_policy_path_rules_item_type_8_type_5.additional_properties = d + return escalation_policy_path_rules_item_type_8_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_8_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_rule_type.py new file mode 100644 index 00000000..b01151d2 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type5RuleType = Literal["deferral_window"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type5RuleType +] = { + "deferral_window", +} + + +def check_escalation_policy_path_rules_item_type_8_type_5_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type5RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py new file mode 100644 index 00000000..beaae0f7 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py @@ -0,0 +1,166 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type5TimeBlocksItem") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + 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) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + 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_8_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_8_type_5_time_blocks_item.additional_properties = d + return escalation_policy_path_rules_item_type_8_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_8_type_5_time_zone.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_zone.py new file mode 100644 index 00000000..7606e2c9 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_escalation_policy_path_rules_item_type_8_type_5_time_zone( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type5TimeZone | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py new file mode 100644 index 00000000..6fa13683 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_8_type_6_operator import ( + check_escalation_policy_path_rules_item_type_8_type_6_operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_6_operator import ( + EscalationPolicyPathRulesItemType8Type6Operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_6_rule_type import ( + check_escalation_policy_path_rules_item_type_8_type_6_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_8_type_6_rule_type import ( + EscalationPolicyPathRulesItemType8Type6RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type6") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type6: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type6RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType8Type6Operator): How the alert source should be matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: EscalationPolicyPathRulesItemType8Type6RuleType + operator: EscalationPolicyPathRulesItemType8Type6Operator + values: 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 + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "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_8_type_6_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_8_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + escalation_policy_path_rules_item_type_8_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + escalation_policy_path_rules_item_type_8_type_6.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_6 + + @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_8_type_6_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_operator.py new file mode 100644 index 00000000..ac729347 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_operator.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType8Type6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_escalation_policy_path_rules_item_type_8_type_6_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type6Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_rule_type.py new file mode 100644 index 00000000..3c5ff6b8 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type6RuleType = Literal["source"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type6RuleType +] = { + "source", +} + + +def check_escalation_policy_path_rules_item_type_8_type_6_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type6RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py new file mode 100644 index 00000000..db981f1c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_8_type_7_operator import ( + check_escalation_policy_path_rules_item_type_8_type_7_operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_7_operator import ( + EscalationPolicyPathRulesItemType8Type7Operator, +) +from ..models.escalation_policy_path_rules_item_type_8_type_7_rule_type import ( + check_escalation_policy_path_rules_item_type_8_type_7_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_8_type_7_rule_type import ( + EscalationPolicyPathRulesItemType8Type7RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type7") + + +@_attrs_define +class EscalationPolicyPathRulesItemType8Type7: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType8Type7RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType8Type7Operator): Whether the alert must (or must not) have related + incidents + """ + + rule_type: EscalationPolicyPathRulesItemType8Type7RuleType + operator: EscalationPolicyPathRulesItemType8Type7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + 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_8_type_7_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_8_type_7_operator(d.pop("operator")) + + escalation_policy_path_rules_item_type_8_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + escalation_policy_path_rules_item_type_8_type_7.additional_properties = d + return escalation_policy_path_rules_item_type_8_type_7 + + @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_8_type_7_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_operator.py new file mode 100644 index 00000000..d5297005 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type7Operator = Literal["is_not_set", "is_set"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType8Type7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_escalation_policy_path_rules_item_type_8_type_7_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type7Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_rule_type.py new file mode 100644 index 00000000..1b37193d --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType8Type7RuleType = Literal["related_incidents"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType8Type7RuleType +] = { + "related_incidents", +} + + +def check_escalation_policy_path_rules_item_type_8_type_7_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType8Type7RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType8Type7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py new file mode 100644 index 00000000..0d4c27ec --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_9_type_0_rule_type import ( + check_escalation_policy_path_rules_item_type_9_type_0_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_9_type_0_rule_type import ( + EscalationPolicyPathRulesItemType9Type0RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type0") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type0: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type0RuleType): The type of the escalation path rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType9Type0RuleType + 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_9_type_0_rule_type(d.pop("rule_type")) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + escalation_policy_path_rules_item_type_9_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + escalation_policy_path_rules_item_type_9_type_0.additional_properties = d + return escalation_policy_path_rules_item_type_9_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_9_type_0_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0_rule_type.py new file mode 100644 index 00000000..48322d7c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type0RuleType = Literal["alert_urgency"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type0RuleType +] = { + "alert_urgency", +} + + +def check_escalation_policy_path_rules_item_type_9_type_0_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type0RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py new file mode 100644 index 00000000..3a1ddb7e --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_9_type_1_rule_type import ( + check_escalation_policy_path_rules_item_type_9_type_1_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_9_type_1_rule_type import ( + EscalationPolicyPathRulesItemType9Type1RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type1") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type1: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type1RuleType): The type of the escalation path rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: EscalationPolicyPathRulesItemType9Type1RuleType + 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_9_type_1_rule_type(d.pop("rule_type")) + + within_working_hour = d.pop("within_working_hour") + + escalation_policy_path_rules_item_type_9_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + escalation_policy_path_rules_item_type_9_type_1.additional_properties = d + return escalation_policy_path_rules_item_type_9_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_9_type_1_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1_rule_type.py new file mode 100644 index 00000000..a87ebc23 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type1RuleType = Literal["working_hour"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type1RuleType +] = { + "working_hour", +} + + +def check_escalation_policy_path_rules_item_type_9_type_1_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type1RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py new file mode 100644 index 00000000..2ee64dee --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_9_type_2_operator import ( + check_escalation_policy_path_rules_item_type_9_type_2_operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_2_operator import ( + EscalationPolicyPathRulesItemType9Type2Operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_2_rule_type import ( + check_escalation_policy_path_rules_item_type_9_type_2_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_9_type_2_rule_type import ( + EscalationPolicyPathRulesItemType9Type2RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type2") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type2: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (EscalationPolicyPathRulesItemType9Type2Operator): 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: EscalationPolicyPathRulesItemType9Type2RuleType + json_path: str + operator: EscalationPolicyPathRulesItemType9Type2Operator + 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_9_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_escalation_policy_path_rules_item_type_9_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_9_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + escalation_policy_path_rules_item_type_9_type_2.additional_properties = d + return escalation_policy_path_rules_item_type_9_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_9_type_2_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_operator.py new file mode 100644 index 00000000..f28c4c22 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType9Type2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_escalation_policy_path_rules_item_type_9_type_2_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type2Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_rule_type.py new file mode 100644 index 00000000..b5356280 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type2RuleType = Literal["json_path"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type2RuleType +] = { + "json_path", +} + + +def check_escalation_policy_path_rules_item_type_9_type_2_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type2RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py new file mode 100644 index 00000000..366d4ad2 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py @@ -0,0 +1,114 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_9_type_3_operator import ( + check_escalation_policy_path_rules_item_type_9_type_3_operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_3_operator import ( + EscalationPolicyPathRulesItemType9Type3Operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_3_rule_type import ( + check_escalation_policy_path_rules_item_type_9_type_3_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_9_type_3_rule_type import ( + EscalationPolicyPathRulesItemType9Type3RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type3") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type3: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type3RuleType): 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 (EscalationPolicyPathRulesItemType9Type3Operator): How the alert field value should be matched + values (list[str] | Unset): Values to match against + """ + + rule_type: EscalationPolicyPathRulesItemType9Type3RuleType + fieldable_type: str + fieldable_id: str + operator: EscalationPolicyPathRulesItemType9Type3Operator + 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_9_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_9_type_3_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values", UNSET)) + + escalation_policy_path_rules_item_type_9_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_9_type_3.additional_properties = d + return escalation_policy_path_rules_item_type_9_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_9_type_3_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_operator.py new file mode 100644 index 00000000..0ec9653c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type3Operator = 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_9_TYPE_3_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType9Type3Operator +] = { + "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_9_type_3_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type3Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_rule_type.py new file mode 100644 index 00000000..01336e99 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type3RuleType = Literal["field"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type3RuleType +] = { + "field", +} + + +def check_escalation_policy_path_rules_item_type_9_type_3_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type3RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py new file mode 100644 index 00000000..08151c16 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_9_type_4_rule_type import ( + check_escalation_policy_path_rules_item_type_9_type_4_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_9_type_4_rule_type import ( + EscalationPolicyPathRulesItemType9Type4RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type4") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type4: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: EscalationPolicyPathRulesItemType9Type4RuleType + 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_9_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + escalation_policy_path_rules_item_type_9_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + escalation_policy_path_rules_item_type_9_type_4.additional_properties = d + return escalation_policy_path_rules_item_type_9_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_9_type_4_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4_rule_type.py new file mode 100644 index 00000000..4db178bf --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type4RuleType = Literal["service"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type4RuleType +] = { + "service", +} + + +def check_escalation_policy_path_rules_item_type_9_type_4_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type4RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py new file mode 100644 index 00000000..1ff6b9d0 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_9_type_5_rule_type import ( + check_escalation_policy_path_rules_item_type_9_type_5_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_9_type_5_rule_type import ( + EscalationPolicyPathRulesItemType9Type5RuleType, +) +from ..models.escalation_policy_path_rules_item_type_9_type_5_time_zone import ( + check_escalation_policy_path_rules_item_type_9_type_5_time_zone, +) +from ..models.escalation_policy_path_rules_item_type_9_type_5_time_zone import ( + EscalationPolicyPathRulesItemType9Type5TimeZone, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.escalation_policy_path_rules_item_type_9_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType9Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type5") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type5: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type5RuleType): The type of the escalation path rule + time_zone (EscalationPolicyPathRulesItemType9Type5TimeZone): Time zone for the deferral window + time_blocks (list[EscalationPolicyPathRulesItemType9Type5TimeBlocksItem]): Time windows during which alerts are + deferred + """ + + rule_type: EscalationPolicyPathRulesItemType9Type5RuleType + time_zone: EscalationPolicyPathRulesItemType9Type5TimeZone + time_blocks: list[EscalationPolicyPathRulesItemType9Type5TimeBlocksItem] + 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_9_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType9Type5TimeBlocksItem, + ) + + 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_9_type_5_time_blocks_item import ( + EscalationPolicyPathRulesItemType9Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_escalation_policy_path_rules_item_type_9_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_escalation_policy_path_rules_item_type_9_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 = EscalationPolicyPathRulesItemType9Type5TimeBlocksItem.from_dict(time_blocks_item_data) + + time_blocks.append(time_blocks_item) + + escalation_policy_path_rules_item_type_9_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + escalation_policy_path_rules_item_type_9_type_5.additional_properties = d + return escalation_policy_path_rules_item_type_9_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_9_type_5_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_rule_type.py new file mode 100644 index 00000000..bc896cef --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type5RuleType = Literal["deferral_window"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type5RuleType +] = { + "deferral_window", +} + + +def check_escalation_policy_path_rules_item_type_9_type_5_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type5RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py new file mode 100644 index 00000000..bb9863a1 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py @@ -0,0 +1,166 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type5TimeBlocksItem") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + 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) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + 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_9_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_9_type_5_time_blocks_item.additional_properties = d + return escalation_policy_path_rules_item_type_9_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_9_type_5_time_zone.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_zone.py new file mode 100644 index 00000000..5d1ef449 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_escalation_policy_path_rules_item_type_9_type_5_time_zone( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type5TimeZone | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py new file mode 100644 index 00000000..11d98342 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_9_type_6_operator import ( + check_escalation_policy_path_rules_item_type_9_type_6_operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_6_operator import ( + EscalationPolicyPathRulesItemType9Type6Operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_6_rule_type import ( + check_escalation_policy_path_rules_item_type_9_type_6_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_9_type_6_rule_type import ( + EscalationPolicyPathRulesItemType9Type6RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type6") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type6: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type6RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType9Type6Operator): How the alert source should be matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: EscalationPolicyPathRulesItemType9Type6RuleType + operator: EscalationPolicyPathRulesItemType9Type6Operator + values: 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 + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "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_9_type_6_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_9_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + escalation_policy_path_rules_item_type_9_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + escalation_policy_path_rules_item_type_9_type_6.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_6 + + @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_9_type_6_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_operator.py new file mode 100644 index 00000000..4a71cad8 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_operator.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType9Type6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_escalation_policy_path_rules_item_type_9_type_6_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type6Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_rule_type.py new file mode 100644 index 00000000..1b062e94 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type6RuleType = Literal["source"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type6RuleType +] = { + "source", +} + + +def check_escalation_policy_path_rules_item_type_9_type_6_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type6RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py new file mode 100644 index 00000000..93bfd13c --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.escalation_policy_path_rules_item_type_9_type_7_operator import ( + check_escalation_policy_path_rules_item_type_9_type_7_operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_7_operator import ( + EscalationPolicyPathRulesItemType9Type7Operator, +) +from ..models.escalation_policy_path_rules_item_type_9_type_7_rule_type import ( + check_escalation_policy_path_rules_item_type_9_type_7_rule_type, +) +from ..models.escalation_policy_path_rules_item_type_9_type_7_rule_type import ( + EscalationPolicyPathRulesItemType9Type7RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type7") + + +@_attrs_define +class EscalationPolicyPathRulesItemType9Type7: + """ + Attributes: + rule_type (EscalationPolicyPathRulesItemType9Type7RuleType): The type of the escalation path rule + operator (EscalationPolicyPathRulesItemType9Type7Operator): Whether the alert must (or must not) have related + incidents + """ + + rule_type: EscalationPolicyPathRulesItemType9Type7RuleType + operator: EscalationPolicyPathRulesItemType9Type7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + 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_9_type_7_rule_type(d.pop("rule_type")) + + operator = check_escalation_policy_path_rules_item_type_9_type_7_operator(d.pop("operator")) + + escalation_policy_path_rules_item_type_9_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + escalation_policy_path_rules_item_type_9_type_7.additional_properties = d + return escalation_policy_path_rules_item_type_9_type_7 + + @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_9_type_7_operator.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_operator.py new file mode 100644 index 00000000..a3b93a2a --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type7Operator = Literal["is_not_set", "is_set"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES: set[ + EscalationPolicyPathRulesItemType9Type7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_escalation_policy_path_rules_item_type_9_type_7_operator( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type7Operator | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_rule_type.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_rule_type.py new file mode 100644 index 00000000..82299509 --- /dev/null +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +EscalationPolicyPathRulesItemType9Type7RuleType = Literal["related_incidents"] + +ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES: set[ + EscalationPolicyPathRulesItemType9Type7RuleType +] = { + "related_incidents", +} + + +def check_escalation_policy_path_rules_item_type_9_type_7_rule_type( + value: str | None, +) -> EscalationPolicyPathRulesItemType9Type7RuleType | None: + if value is None: + return None + if value in ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES: + return cast(EscalationPolicyPathRulesItemType9Type7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ESCALATION_POLICY_PATH_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_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 c79145d8..c5c8d0c2 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 @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -304,8 +320,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -321,6 +339,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -332,6 +351,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -386,7 +406,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -407,6 +430,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -416,6 +440,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -522,15 +547,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -570,6 +601,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", 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 b5f130f6..a25ef92d 100644 --- a/rootly_sdk/models/escalation_policy_path_time_restrictions_item.py +++ b/rootly_sdk/models/escalation_policy_path_time_restrictions_item.py @@ -1,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.escalation_policy_path_time_restrictions_item_end_day import ( - EscalationPolicyPathTimeRestrictionsItemEndDay, check_escalation_policy_path_time_restrictions_item_end_day, ) +from ..models.escalation_policy_path_time_restrictions_item_end_day import ( + EscalationPolicyPathTimeRestrictionsItemEndDay, +) from ..models.escalation_policy_path_time_restrictions_item_start_day import ( - EscalationPolicyPathTimeRestrictionsItemStartDay, check_escalation_policy_path_time_restrictions_item_start_day, ) +from ..models.escalation_policy_path_time_restrictions_item_start_day import ( + EscalationPolicyPathTimeRestrictionsItemStartDay, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="EscalationPolicyPathTimeRestrictionsItem") diff --git a/rootly_sdk/models/escalation_policy_response.py b/rootly_sdk/models/escalation_policy_response.py index ff548478..5572e8c7 100644 --- a/rootly_sdk/models/escalation_policy_response.py +++ b/rootly_sdk/models/escalation_policy_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.escalation_policy_response_data import EscalationPolicyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="EscalationPolicyResponse") @@ -18,14 +24,26 @@ class EscalationPolicyResponse: """ Attributes: data (EscalationPolicyResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: EscalationPolicyResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy_response_data import EscalationPolicyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.escalation_policy_response_data import EscalationPolicyResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = EscalationPolicyResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + escalation_policy_response = cls( data=data, + included=included, ) escalation_policy_response.additional_properties = d diff --git a/rootly_sdk/models/escalation_policy_response_data.py b/rootly_sdk/models/escalation_policy_response_data.py index 24e804a5..e157dc85 100644 --- a/rootly_sdk/models/escalation_policy_response_data.py +++ b/rootly_sdk/models/escalation_policy_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.escalation_policy_response_data_type import ( - EscalationPolicyResponseDataType, - check_escalation_policy_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.escalation_policy_response_data_type import check_escalation_policy_response_data_type +from ..models.escalation_policy_response_data_type import EscalationPolicyResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.escalation_policy import EscalationPolicy @@ -33,6 +34,8 @@ class EscalationPolicyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.escalation_policy import EscalationPolicy + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field.py b/rootly_sdk/models/form_field.py index 37eb897e..fc5ce9ef 100644 --- a/rootly_sdk/models/form_field.py +++ b/rootly_sdk/models/form_field.py @@ -1,16 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_input_kind import FormFieldInputKind, check_form_field_input_kind -from ..models.form_field_kind import FormFieldKind, check_form_field_kind -from ..models.form_field_value_kind import FormFieldValueKind, check_form_field_value_kind from ..types import UNSET, Unset +from ..models.form_field_input_kind import check_form_field_input_kind +from ..models.form_field_input_kind import FormFieldInputKind +from ..models.form_field_kind import check_form_field_kind +from ..models.form_field_kind import FormFieldKind +from ..models.form_field_value_kind import check_form_field_value_kind +from ..models.form_field_value_kind import FormFieldValueKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="FormField") diff --git a/rootly_sdk/models/form_field_kind.py b/rootly_sdk/models/form_field_kind.py index 3620584e..a1252578 100644 --- a/rootly_sdk/models/form_field_kind.py +++ b/rootly_sdk/models/form_field_kind.py @@ -25,6 +25,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", @@ -58,6 +59,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", diff --git a/rootly_sdk/models/form_field_list.py b/rootly_sdk/models/form_field_list.py index a48ea04d..26b30185 100644 --- a/rootly_sdk/models/form_field_list.py +++ b/rootly_sdk/models/form_field_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_list_data_item import FormFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class FormFieldList: data (list[FormFieldListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_list_data_item import FormFieldListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_list_data_item import FormFieldListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_list.additional_properties = d diff --git a/rootly_sdk/models/form_field_list_data_item.py b/rootly_sdk/models/form_field_list_data_item.py index 190312ed..2b385d4b 100644 --- a/rootly_sdk/models/form_field_list_data_item.py +++ b/rootly_sdk/models/form_field_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_list_data_item_type import FormFieldListDataItemType, check_form_field_list_data_item_type +from ..types import UNSET, Unset + +from ..models.form_field_list_data_item_type import check_form_field_list_data_item_type +from ..models.form_field_list_data_item_type import FormFieldListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.form_field import FormField @@ -30,6 +34,8 @@ class FormFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field import FormField + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_option.py b/rootly_sdk/models/form_field_option.py index c26efcd3..c13d97f6 100644 --- a/rootly_sdk/models/form_field_option.py +++ b/rootly_sdk/models/form_field_option.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="FormFieldOption") diff --git a/rootly_sdk/models/form_field_option_list.py b/rootly_sdk/models/form_field_option_list.py index b4c5a091..a2416c77 100644 --- a/rootly_sdk/models/form_field_option_list.py +++ b/rootly_sdk/models/form_field_option_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_option_list_data_item import FormFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class FormFieldOptionList: data (list[FormFieldOptionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldOptionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.form_field_option_list_data_item import FormFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_option_list_data_item import FormFieldOptionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_option_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_option_list.additional_properties = d 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 b37a530e..79208553 100644 --- a/rootly_sdk/models/form_field_option_list_data_item.py +++ b/rootly_sdk/models/form_field_option_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_option_list_data_item_type import ( - FormFieldOptionListDataItemType, - check_form_field_option_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.form_field_option_list_data_item_type import check_form_field_option_list_data_item_type +from ..models.form_field_option_list_data_item_type import FormFieldOptionListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.form_field_option import FormFieldOption @@ -33,6 +34,8 @@ class FormFieldOptionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_option import FormFieldOption + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_option_response.py b/rootly_sdk/models/form_field_option_response.py index 2045abdd..c5bdd37a 100644 --- a/rootly_sdk/models/form_field_option_response.py +++ b/rootly_sdk/models/form_field_option_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_option_response_data import FormFieldOptionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldOptionResponse") @@ -18,14 +24,26 @@ class FormFieldOptionResponse: """ Attributes: data (FormFieldOptionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldOptionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_option_response_data import FormFieldOptionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_option_response_data import FormFieldOptionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldOptionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_option_response = cls( data=data, + included=included, ) form_field_option_response.additional_properties = d diff --git a/rootly_sdk/models/form_field_option_response_data.py b/rootly_sdk/models/form_field_option_response_data.py index ab893054..49b1902f 100644 --- a/rootly_sdk/models/form_field_option_response_data.py +++ b/rootly_sdk/models/form_field_option_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_option_response_data_type import ( - FormFieldOptionResponseDataType, - check_form_field_option_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.form_field_option_response_data_type import check_form_field_option_response_data_type +from ..models.form_field_option_response_data_type import FormFieldOptionResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.form_field_option import FormFieldOption @@ -33,6 +34,8 @@ class FormFieldOptionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_option import FormFieldOption + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_placement.py b/rootly_sdk/models/form_field_placement.py index e9a20d4d..2887057a 100644 --- a/rootly_sdk/models/form_field_placement.py +++ b/rootly_sdk/models/form_field_placement.py @@ -1,21 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_placement_placement_operator import ( - FormFieldPlacementPlacementOperator, - check_form_field_placement_placement_operator, -) -from ..models.form_field_placement_required_operator import ( - FormFieldPlacementRequiredOperator, - check_form_field_placement_required_operator, -) from ..types import UNSET, Unset +from ..models.form_field_placement_placement_operator import check_form_field_placement_placement_operator +from ..models.form_field_placement_placement_operator import FormFieldPlacementPlacementOperator +from ..models.form_field_placement_required_operator import check_form_field_placement_required_operator +from ..models.form_field_placement_required_operator import FormFieldPlacementRequiredOperator +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="FormFieldPlacement") diff --git a/rootly_sdk/models/form_field_placement_condition.py b/rootly_sdk/models/form_field_placement_condition.py index 727f0372..80495fae 100644 --- a/rootly_sdk/models/form_field_placement_condition.py +++ b/rootly_sdk/models/form_field_placement_condition.py @@ -1,19 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_placement_condition_comparison import ( - FormFieldPlacementConditionComparison, - check_form_field_placement_condition_comparison, -) -from ..models.form_field_placement_condition_conditioned import ( - FormFieldPlacementConditionConditioned, - check_form_field_placement_condition_conditioned, -) +from ..types import UNSET, Unset + +from ..models.form_field_placement_condition_comparison import check_form_field_placement_condition_comparison +from ..models.form_field_placement_condition_comparison import FormFieldPlacementConditionComparison +from ..models.form_field_placement_condition_conditioned import check_form_field_placement_condition_conditioned +from ..models.form_field_placement_condition_conditioned import FormFieldPlacementConditionConditioned +from typing import cast + T = TypeVar("T", bound="FormFieldPlacementCondition") diff --git a/rootly_sdk/models/form_field_placement_condition_list.py b/rootly_sdk/models/form_field_placement_condition_list.py index ca528d32..66985431 100644 --- a/rootly_sdk/models/form_field_placement_condition_list.py +++ b/rootly_sdk/models/form_field_placement_condition_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_placement_condition_list_data_item import FormFieldPlacementConditionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class FormFieldPlacementConditionList: data (list[FormFieldPlacementConditionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldPlacementConditionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_placement_condition_list_data_item import FormFieldPlacementConditionListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_placement_condition_list_data_item import FormFieldPlacementConditionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_placement_condition_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_placement_condition_list.additional_properties = d 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 f86cdeb6..ff718947 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,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.form_field_placement_condition_list_data_item_type import ( - FormFieldPlacementConditionListDataItemType, check_form_field_placement_condition_list_data_item_type, ) +from ..models.form_field_placement_condition_list_data_item_type import FormFieldPlacementConditionListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.form_field_placement_condition import FormFieldPlacementCondition @@ -33,6 +36,8 @@ class FormFieldPlacementConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_placement_condition import FormFieldPlacementCondition + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_placement_condition_response.py b/rootly_sdk/models/form_field_placement_condition_response.py index 6ecfaf5e..86d99226 100644 --- a/rootly_sdk/models/form_field_placement_condition_response.py +++ b/rootly_sdk/models/form_field_placement_condition_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_placement_condition_response_data import FormFieldPlacementConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldPlacementConditionResponse") @@ -18,14 +24,26 @@ class FormFieldPlacementConditionResponse: """ Attributes: data (FormFieldPlacementConditionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldPlacementConditionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_placement_condition_response_data import FormFieldPlacementConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_placement_condition_response_data import FormFieldPlacementConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldPlacementConditionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_placement_condition_response = cls( data=data, + included=included, ) form_field_placement_condition_response.additional_properties = d 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 72b5df8e..cd320783 100644 --- a/rootly_sdk/models/form_field_placement_condition_response_data.py +++ b/rootly_sdk/models/form_field_placement_condition_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.form_field_placement_condition_response_data_type import ( - FormFieldPlacementConditionResponseDataType, check_form_field_placement_condition_response_data_type, ) +from ..models.form_field_placement_condition_response_data_type import FormFieldPlacementConditionResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.form_field_placement_condition import FormFieldPlacementCondition @@ -33,6 +36,8 @@ class FormFieldPlacementConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_placement_condition import FormFieldPlacementCondition + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_placement_list.py b/rootly_sdk/models/form_field_placement_list.py index 64308e8d..731a85b1 100644 --- a/rootly_sdk/models/form_field_placement_list.py +++ b/rootly_sdk/models/form_field_placement_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_placement_list_data_item import FormFieldPlacementListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class FormFieldPlacementList: data (list[FormFieldPlacementListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldPlacementListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.form_field_placement_list_data_item import FormFieldPlacementListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_placement_list_data_item import FormFieldPlacementListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_placement_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_placement_list.additional_properties = d 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 ffb31c2b..d8194b71 100644 --- a/rootly_sdk/models/form_field_placement_list_data_item.py +++ b/rootly_sdk/models/form_field_placement_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_placement_list_data_item_type import ( - FormFieldPlacementListDataItemType, - check_form_field_placement_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.form_field_placement_list_data_item_type import check_form_field_placement_list_data_item_type +from ..models.form_field_placement_list_data_item_type import FormFieldPlacementListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.form_field_placement import FormFieldPlacement @@ -33,6 +34,8 @@ class FormFieldPlacementListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_placement import FormFieldPlacement + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_placement_response.py b/rootly_sdk/models/form_field_placement_response.py index 8074305f..ffd08f88 100644 --- a/rootly_sdk/models/form_field_placement_response.py +++ b/rootly_sdk/models/form_field_placement_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_placement_response_data import FormFieldPlacementResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldPlacementResponse") @@ -18,14 +24,26 @@ class FormFieldPlacementResponse: """ Attributes: data (FormFieldPlacementResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldPlacementResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_placement_response_data import FormFieldPlacementResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_placement_response_data import FormFieldPlacementResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldPlacementResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_placement_response = cls( data=data, + included=included, ) form_field_placement_response.additional_properties = d diff --git a/rootly_sdk/models/form_field_placement_response_data.py b/rootly_sdk/models/form_field_placement_response_data.py index 20c0d20f..8ee42998 100644 --- a/rootly_sdk/models/form_field_placement_response_data.py +++ b/rootly_sdk/models/form_field_placement_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_placement_response_data_type import ( - FormFieldPlacementResponseDataType, - check_form_field_placement_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.form_field_placement_response_data_type import check_form_field_placement_response_data_type +from ..models.form_field_placement_response_data_type import FormFieldPlacementResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.form_field_placement import FormFieldPlacement @@ -33,6 +34,8 @@ class FormFieldPlacementResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_placement import FormFieldPlacement + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_position.py b/rootly_sdk/models/form_field_position.py index 88003c9f..78018615 100644 --- a/rootly_sdk/models/form_field_position.py +++ b/rootly_sdk/models/form_field_position.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_position_form import FormFieldPositionForm, check_form_field_position_form +from ..types import UNSET, Unset + +from ..models.form_field_position_form import check_form_field_position_form +from ..models.form_field_position_form import FormFieldPositionForm +from typing import cast + T = TypeVar("T", bound="FormFieldPosition") diff --git a/rootly_sdk/models/form_field_position_form.py b/rootly_sdk/models/form_field_position_form.py index ff67d554..8b1043f4 100644 --- a/rootly_sdk/models/form_field_position_form.py +++ b/rootly_sdk/models/form_field_position_form.py @@ -2,6 +2,7 @@ FormFieldPositionForm = Literal[ "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -10,6 +11,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", @@ -22,6 +24,7 @@ FORM_FIELD_POSITION_FORM_VALUES: set[FormFieldPositionForm] = { "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -30,6 +33,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", diff --git a/rootly_sdk/models/form_field_position_list.py b/rootly_sdk/models/form_field_position_list.py index 7d0f35f3..3d06aea2 100644 --- a/rootly_sdk/models/form_field_position_list.py +++ b/rootly_sdk/models/form_field_position_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_position_list_data_item import FormFieldPositionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class FormFieldPositionList: data (list[FormFieldPositionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormFieldPositionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.form_field_position_list_data_item import FormFieldPositionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_position_list_data_item import FormFieldPositionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_position_list = cls( data=data, links=links, meta=meta, + included=included, ) form_field_position_list.additional_properties = d 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 c68a3ba1..e659620d 100644 --- a/rootly_sdk/models/form_field_position_list_data_item.py +++ b/rootly_sdk/models/form_field_position_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_position_list_data_item_type import ( - FormFieldPositionListDataItemType, - check_form_field_position_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.form_field_position_list_data_item_type import check_form_field_position_list_data_item_type +from ..models.form_field_position_list_data_item_type import FormFieldPositionListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.form_field_position import FormFieldPosition @@ -33,6 +34,8 @@ class FormFieldPositionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_position import FormFieldPosition + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_position_response.py b/rootly_sdk/models/form_field_position_response.py index 2a751e3c..f6dc097a 100644 --- a/rootly_sdk/models/form_field_position_response.py +++ b/rootly_sdk/models/form_field_position_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_position_response_data import FormFieldPositionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldPositionResponse") @@ -18,14 +24,26 @@ class FormFieldPositionResponse: """ Attributes: data (FormFieldPositionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldPositionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.form_field_position_response_data import FormFieldPositionResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_position_response_data import FormFieldPositionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldPositionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_position_response = cls( data=data, + included=included, ) form_field_position_response.additional_properties = d diff --git a/rootly_sdk/models/form_field_position_response_data.py b/rootly_sdk/models/form_field_position_response_data.py index 35e52e1a..909f92fa 100644 --- a/rootly_sdk/models/form_field_position_response_data.py +++ b/rootly_sdk/models/form_field_position_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_position_response_data_type import ( - FormFieldPositionResponseDataType, - check_form_field_position_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.form_field_position_response_data_type import check_form_field_position_response_data_type +from ..models.form_field_position_response_data_type import FormFieldPositionResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.form_field_position import FormFieldPosition @@ -33,6 +34,8 @@ class FormFieldPositionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field_position import FormFieldPosition + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_field_response.py b/rootly_sdk/models/form_field_response.py index af8cf6a7..712f0257 100644 --- a/rootly_sdk/models/form_field_response.py +++ b/rootly_sdk/models/form_field_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_field_response_data import FormFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormFieldResponse") @@ -18,14 +24,26 @@ class FormFieldResponse: """ Attributes: data (FormFieldResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormFieldResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.form_field_response_data import FormFieldResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_field_response_data import FormFieldResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormFieldResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_field_response = cls( data=data, + included=included, ) form_field_response.additional_properties = d diff --git a/rootly_sdk/models/form_field_response_data.py b/rootly_sdk/models/form_field_response_data.py index 10089c15..6321874d 100644 --- a/rootly_sdk/models/form_field_response_data.py +++ b/rootly_sdk/models/form_field_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_field_response_data_type import FormFieldResponseDataType, check_form_field_response_data_type +from ..types import UNSET, Unset + +from ..models.form_field_response_data_type import check_form_field_response_data_type +from ..models.form_field_response_data_type import FormFieldResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.form_field import FormField @@ -30,6 +34,8 @@ class FormFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_field import FormField + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_set.py b/rootly_sdk/models/form_set.py index 02ffd729..3c018c15 100644 --- a/rootly_sdk/models/form_set.py +++ b/rootly_sdk/models/form_set.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="FormSet") @@ -23,7 +27,7 @@ class FormSet: `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` + `slack_update_scheduled_incident_form`, `google_chat_new_incident_form`, `google_chat_update_incident_form` created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the form set diff --git a/rootly_sdk/models/form_set_condition.py b/rootly_sdk/models/form_set_condition.py index 571f0ed8..998578e9 100644 --- a/rootly_sdk/models/form_set_condition.py +++ b/rootly_sdk/models/form_set_condition.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_set_condition_comparison import FormSetConditionComparison, check_form_set_condition_comparison +from ..types import UNSET, Unset + +from ..models.form_set_condition_comparison import check_form_set_condition_comparison +from ..models.form_set_condition_comparison import FormSetConditionComparison +from typing import cast + T = TypeVar("T", bound="FormSetCondition") diff --git a/rootly_sdk/models/form_set_condition_list.py b/rootly_sdk/models/form_set_condition_list.py index 7e0ed3e8..df722af8 100644 --- a/rootly_sdk/models/form_set_condition_list.py +++ b/rootly_sdk/models/form_set_condition_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_set_condition_list_data_item import FormSetConditionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class FormSetConditionList: data (list[FormSetConditionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormSetConditionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.form_set_condition_list_data_item import FormSetConditionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_set_condition_list_data_item import FormSetConditionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_set_condition_list = cls( data=data, links=links, meta=meta, + included=included, ) form_set_condition_list.additional_properties = d 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 0525b725..13c12edf 100644 --- a/rootly_sdk/models/form_set_condition_list_data_item.py +++ b/rootly_sdk/models/form_set_condition_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_set_condition_list_data_item_type import ( - FormSetConditionListDataItemType, - check_form_set_condition_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.form_set_condition_list_data_item_type import check_form_set_condition_list_data_item_type +from ..models.form_set_condition_list_data_item_type import FormSetConditionListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.form_set_condition import FormSetCondition @@ -33,6 +34,8 @@ class FormSetConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_set_condition import FormSetCondition + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_set_condition_response.py b/rootly_sdk/models/form_set_condition_response.py index 7f0509b7..ac033acf 100644 --- a/rootly_sdk/models/form_set_condition_response.py +++ b/rootly_sdk/models/form_set_condition_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_set_condition_response_data import FormSetConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormSetConditionResponse") @@ -18,14 +24,26 @@ class FormSetConditionResponse: """ Attributes: data (FormSetConditionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormSetConditionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_set_condition_response_data import FormSetConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_set_condition_response_data import FormSetConditionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormSetConditionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_set_condition_response = cls( data=data, + included=included, ) form_set_condition_response.additional_properties = d diff --git a/rootly_sdk/models/form_set_condition_response_data.py b/rootly_sdk/models/form_set_condition_response_data.py index 6e6a3a67..e203695d 100644 --- a/rootly_sdk/models/form_set_condition_response_data.py +++ b/rootly_sdk/models/form_set_condition_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_set_condition_response_data_type import ( - FormSetConditionResponseDataType, - check_form_set_condition_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.form_set_condition_response_data_type import check_form_set_condition_response_data_type +from ..models.form_set_condition_response_data_type import FormSetConditionResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.form_set_condition import FormSetCondition @@ -33,6 +34,8 @@ class FormSetConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_set_condition import FormSetCondition + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_set_list.py b/rootly_sdk/models/form_set_list.py index f6526e07..7b59cb03 100644 --- a/rootly_sdk/models/form_set_list.py +++ b/rootly_sdk/models/form_set_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_set_list_data_item import FormSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class FormSetList: data (list[FormSetListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FormSetListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.form_set_list_data_item import FormSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_set_list_data_item import FormSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_set_list = cls( data=data, links=links, meta=meta, + included=included, ) form_set_list.additional_properties = d diff --git a/rootly_sdk/models/form_set_list_data_item.py b/rootly_sdk/models/form_set_list_data_item.py index 24f0718c..73ce85c2 100644 --- a/rootly_sdk/models/form_set_list_data_item.py +++ b/rootly_sdk/models/form_set_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_set_list_data_item_type import FormSetListDataItemType, check_form_set_list_data_item_type +from ..types import UNSET, Unset + +from ..models.form_set_list_data_item_type import check_form_set_list_data_item_type +from ..models.form_set_list_data_item_type import FormSetListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.form_set import FormSet @@ -30,6 +34,8 @@ class FormSetListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_set import FormSet + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/form_set_response.py b/rootly_sdk/models/form_set_response.py index 99022037..d7c2f95f 100644 --- a/rootly_sdk/models/form_set_response.py +++ b/rootly_sdk/models/form_set_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.form_set_response_data import FormSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FormSetResponse") @@ -18,14 +24,26 @@ class FormSetResponse: """ Attributes: data (FormSetResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FormSetResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_set_response_data import FormSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.form_set_response_data import FormSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FormSetResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + form_set_response = cls( data=data, + included=included, ) form_set_response.additional_properties = d diff --git a/rootly_sdk/models/form_set_response_data.py b/rootly_sdk/models/form_set_response_data.py index 96ccef28..580c93f3 100644 --- a/rootly_sdk/models/form_set_response_data.py +++ b/rootly_sdk/models/form_set_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.form_set_response_data_type import FormSetResponseDataType, check_form_set_response_data_type +from ..types import UNSET, Unset + +from ..models.form_set_response_data_type import check_form_set_response_data_type +from ..models.form_set_response_data_type import FormSetResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.form_set import FormSet @@ -30,6 +34,8 @@ class FormSetResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.form_set import FormSet + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/functionality.py b/rootly_sdk/models/functionality.py index 42664292..a86c3ece 100644 --- a/rootly_sdk/models/functionality.py +++ b/rootly_sdk/models/functionality.py @@ -1,13 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.functionality_managed_by import check_functionality_managed_by +from ..models.functionality_managed_by import FunctionalityManagedBy +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.functionality_properties_type_0_item import FunctionalityPropertiesType0Item from ..models.functionality_slack_aliases_type_0_item import FunctionalitySlackAliasesType0Item @@ -25,6 +30,8 @@ class Functionality: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the functionality + managed_by (FunctionalityManagedBy | Unset): How this functionality is managed (provenance): web, api, + terraform, etc. Read-only. 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 @@ -42,6 +49,7 @@ class 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 + escalation_policy_id (None | str | Unset): The escalation policy id of the functionality slack_channels (list[FunctionalitySlackChannelsType0Item] | None | Unset): Slack Channels associated with this functionality slack_aliases (list[FunctionalitySlackAliasesType0Item] | None | Unset): Slack Aliases associated with this @@ -54,6 +62,7 @@ class Functionality: created_at: str updated_at: str slug: str | Unset = UNSET + managed_by: FunctionalityManagedBy | Unset = UNSET description: None | str | Unset = UNSET public_description: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET @@ -70,12 +79,17 @@ class Functionality: service_ids: list[str] | None | Unset = UNSET owner_group_ids: list[str] | None | Unset = UNSET owner_user_ids: list[int] | None | Unset = UNSET + escalation_policy_id: None | str | 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]: + from ..models.functionality_slack_channels_type_0_item import FunctionalitySlackChannelsType0Item + from ..models.functionality_slack_aliases_type_0_item import FunctionalitySlackAliasesType0Item + from ..models.functionality_properties_type_0_item import FunctionalityPropertiesType0Item + name = self.name created_at = self.created_at @@ -84,6 +98,10 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET @@ -195,6 +213,12 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids + 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: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET @@ -242,6 +266,8 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by if description is not UNSET: field_dict["description"] = description if public_description is not UNSET: @@ -274,6 +300,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["owner_group_ids"] = owner_group_ids if owner_user_ids is not UNSET: field_dict["owner_user_ids"] = owner_user_ids + if escalation_policy_id is not UNSET: + field_dict["escalation_policy_id"] = escalation_policy_id if slack_channels is not UNSET: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: @@ -298,6 +326,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _managed_by = d.pop("managed_by", UNSET) + managed_by: FunctionalityManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_functionality_managed_by(_managed_by) + def _parse_description(data: object) -> None | str | Unset: if data is None: return data @@ -482,6 +517,15 @@ def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) + 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 | str | Unset, data) + + escalation_policy_id = _parse_escalation_policy_id(d.pop("escalation_policy_id", UNSET)) + def _parse_slack_channels(data: object) -> list[FunctionalitySlackChannelsType0Item] | None | Unset: if data is None: return data @@ -557,6 +601,7 @@ def _parse_properties(data: object) -> list[FunctionalityPropertiesType0Item] | created_at=created_at, updated_at=updated_at, slug=slug, + managed_by=managed_by, description=description, public_description=public_description, notify_emails=notify_emails, @@ -573,6 +618,7 @@ def _parse_properties(data: object) -> list[FunctionalityPropertiesType0Item] | service_ids=service_ids, owner_group_ids=owner_group_ids, owner_user_ids=owner_user_ids, + escalation_policy_id=escalation_policy_id, slack_channels=slack_channels, slack_aliases=slack_aliases, properties=properties, diff --git a/rootly_sdk/models/functionality_list.py b/rootly_sdk/models/functionality_list.py index 1aad7cf8..2a7d67f3 100644 --- a/rootly_sdk/models/functionality_list.py +++ b/rootly_sdk/models/functionality_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.functionality_list_data_item import FunctionalityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class FunctionalityList: data (list[FunctionalityListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[FunctionalityListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.functionality_list_data_item import FunctionalityListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.functionality_list_data_item import FunctionalityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + functionality_list = cls( data=data, links=links, meta=meta, + included=included, ) functionality_list.additional_properties = d diff --git a/rootly_sdk/models/functionality_list_data_item.py b/rootly_sdk/models/functionality_list_data_item.py index 62e6eee4..d5d0807e 100644 --- a/rootly_sdk/models/functionality_list_data_item.py +++ b/rootly_sdk/models/functionality_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.functionality_list_data_item_type import ( - FunctionalityListDataItemType, - check_functionality_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.functionality_list_data_item_type import check_functionality_list_data_item_type +from ..models.functionality_list_data_item_type import FunctionalityListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.functionality import Functionality @@ -33,6 +34,8 @@ class FunctionalityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.functionality import Functionality + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/functionality_managed_by.py b/rootly_sdk/models/functionality_managed_by.py new file mode 100644 index 00000000..09f413b5 --- /dev/null +++ b/rootly_sdk/models/functionality_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +FunctionalityManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +FUNCTIONALITY_MANAGED_BY_VALUES: set[FunctionalityManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_functionality_managed_by(value: str | None) -> FunctionalityManagedBy | None: + if value is None: + return None + if value in FUNCTIONALITY_MANAGED_BY_VALUES: + return cast(FunctionalityManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {FUNCTIONALITY_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/functionality_properties_type_0_item.py b/rootly_sdk/models/functionality_properties_type_0_item.py index 6bcb6048..8e7331a6 100644 --- a/rootly_sdk/models/functionality_properties_type_0_item.py +++ b/rootly_sdk/models/functionality_properties_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="FunctionalityPropertiesType0Item") diff --git a/rootly_sdk/models/functionality_response.py b/rootly_sdk/models/functionality_response.py index eb5b8f25..61da71a9 100644 --- a/rootly_sdk/models/functionality_response.py +++ b/rootly_sdk/models/functionality_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.functionality_response_data import FunctionalityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="FunctionalityResponse") @@ -18,14 +24,26 @@ class FunctionalityResponse: """ Attributes: data (FunctionalityResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: FunctionalityResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.functionality_response_data import FunctionalityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.functionality_response_data import FunctionalityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = FunctionalityResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + functionality_response = cls( data=data, + included=included, ) functionality_response.additional_properties = d diff --git a/rootly_sdk/models/functionality_response_data.py b/rootly_sdk/models/functionality_response_data.py index 21af7809..14de612d 100644 --- a/rootly_sdk/models/functionality_response_data.py +++ b/rootly_sdk/models/functionality_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.functionality_response_data_type import ( - FunctionalityResponseDataType, - check_functionality_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.functionality_response_data_type import check_functionality_response_data_type +from ..models.functionality_response_data_type import FunctionalityResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.functionality import Functionality @@ -33,6 +34,8 @@ class FunctionalityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.functionality import Functionality + id = self.id type_: str = self.type_ 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 d9afc31f..923494d9 100644 --- a/rootly_sdk/models/functionality_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/functionality_slack_aliases_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="FunctionalitySlackAliasesType0Item") 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 f2ee6b04..21dbfc17 100644 --- a/rootly_sdk/models/functionality_slack_channels_type_0_item.py +++ b/rootly_sdk/models/functionality_slack_channels_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="FunctionalitySlackChannelsType0Item") 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 121a7c18..bfa44e1e 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,10 +1,11 @@ from typing import Literal, cast -GeneratePhoneNumberLiveCallRouterCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] +GeneratePhoneNumberLiveCallRouterCountryCode = Literal["AU", "CA", "CH", "DE", "GB", "NL", "NZ", "SE", "US"] GENERATE_PHONE_NUMBER_LIVE_CALL_ROUTER_COUNTRY_CODE_VALUES: set[GeneratePhoneNumberLiveCallRouterCountryCode] = { "AU", "CA", + "CH", "DE", "GB", "NL", diff --git a/rootly_sdk/models/get_alert_include.py b/rootly_sdk/models/get_alert_include.py index 32effd82..5ac6ff9d 100644 --- a/rootly_sdk/models/get_alert_include.py +++ b/rootly_sdk/models/get_alert_include.py @@ -9,12 +9,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", ] @@ -28,12 +30,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", } diff --git a/rootly_sdk/models/get_alerts_task_params.py b/rootly_sdk/models/get_alerts_task_params.py index aa334970..b4820ea9 100644 --- a/rootly_sdk/models/get_alerts_task_params.py +++ b/rootly_sdk/models/get_alerts_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.get_alerts_task_params_task_type import ( - GetAlertsTaskParamsTaskType, - check_get_alerts_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.get_alerts_task_params_task_type import check_get_alerts_task_params_task_type +from ..models.get_alerts_task_params_task_type import GetAlertsTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.get_alerts_task_params_parent_message_thread_task import GetAlertsTaskParamsParentMessageThreadTask from ..models.get_alerts_task_params_post_to_slack_channels_item import GetAlertsTaskParamsPostToSlackChannelsItem @@ -53,6 +54,13 @@ class GetAlertsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.get_alerts_task_params_parent_message_thread_task import ( + GetAlertsTaskParamsParentMessageThreadTask, + ) + from ..models.get_alerts_task_params_post_to_slack_channels_item import ( + GetAlertsTaskParamsPostToSlackChannelsItem, + ) + past_duration = self.past_duration task_type: str | Unset = UNSET 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 1f009e1e..9035b08e 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="GetAlertsTaskParamsParentMessageThreadTask") 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 e4d3b93b..2f5d7b67 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="GetAlertsTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/get_github_commits_task_params_type_0.py b/rootly_sdk/models/get_github_commits_task_params_type_0.py new file mode 100644 index 00000000..5ff0baf4 --- /dev/null +++ b/rootly_sdk/models/get_github_commits_task_params_type_0.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="GetGithubCommitsTaskParamsType0") + + +@_attrs_define +class GetGithubCommitsTaskParamsType0: + """ + Attributes: + service_ids (list[str]): + """ + + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_ids = cast(list[str], d.pop("service_ids")) + + get_github_commits_task_params_type_0 = cls( + service_ids=service_ids, + ) + + get_github_commits_task_params_type_0.additional_properties = d + return get_github_commits_task_params_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/get_github_commits_task_params_type_1.py b/rootly_sdk/models/get_github_commits_task_params_type_1.py new file mode 100644 index 00000000..f6c8203b --- /dev/null +++ b/rootly_sdk/models/get_github_commits_task_params_type_1.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="GetGithubCommitsTaskParamsType1") + + +@_attrs_define +class GetGithubCommitsTaskParamsType1: + """ + Attributes: + github_repository_names (list[str]): + """ + + github_repository_names: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + github_repository_names = self.github_repository_names + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "github_repository_names": github_repository_names, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + github_repository_names = cast(list[str], d.pop("github_repository_names")) + + get_github_commits_task_params_type_1 = cls( + github_repository_names=github_repository_names, + ) + + get_github_commits_task_params_type_1.additional_properties = d + return get_github_commits_task_params_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/get_gitlab_commits_task_params_type_0.py b/rootly_sdk/models/get_gitlab_commits_task_params_type_0.py new file mode 100644 index 00000000..b59bd554 --- /dev/null +++ b/rootly_sdk/models/get_gitlab_commits_task_params_type_0.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="GetGitlabCommitsTaskParamsType0") + + +@_attrs_define +class GetGitlabCommitsTaskParamsType0: + """ + Attributes: + service_ids (list[str]): + """ + + service_ids: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + service_ids = self.service_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "service_ids": service_ids, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + service_ids = cast(list[str], d.pop("service_ids")) + + get_gitlab_commits_task_params_type_0 = cls( + service_ids=service_ids, + ) + + get_gitlab_commits_task_params_type_0.additional_properties = d + return get_gitlab_commits_task_params_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/get_gitlab_commits_task_params_type_1.py b/rootly_sdk/models/get_gitlab_commits_task_params_type_1.py new file mode 100644 index 00000000..21a705dc --- /dev/null +++ b/rootly_sdk/models/get_gitlab_commits_task_params_type_1.py @@ -0,0 +1,66 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + + +T = TypeVar("T", bound="GetGitlabCommitsTaskParamsType1") + + +@_attrs_define +class GetGitlabCommitsTaskParamsType1: + """ + Attributes: + gitlab_repository_names (list[str]): + """ + + gitlab_repository_names: list[str] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + gitlab_repository_names = self.gitlab_repository_names + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "gitlab_repository_names": gitlab_repository_names, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + gitlab_repository_names = cast(list[str], d.pop("gitlab_repository_names")) + + get_gitlab_commits_task_params_type_1 = cls( + gitlab_repository_names=gitlab_repository_names, + ) + + get_gitlab_commits_task_params_type_1.additional_properties = d + return get_gitlab_commits_task_params_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/get_meeting_recording_include.py b/rootly_sdk/models/get_meeting_recording_include.py new file mode 100644 index 00000000..4f766051 --- /dev/null +++ b/rootly_sdk/models/get_meeting_recording_include.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +GetMeetingRecordingInclude = Literal["transcript"] + +GET_MEETING_RECORDING_INCLUDE_VALUES: set[GetMeetingRecordingInclude] = { + "transcript", +} + + +def check_get_meeting_recording_include(value: str | None) -> GetMeetingRecordingInclude | None: + if value is None: + return None + if value in GET_MEETING_RECORDING_INCLUDE_VALUES: + return cast(GetMeetingRecordingInclude, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {GET_MEETING_RECORDING_INCLUDE_VALUES!r}") diff --git a/rootly_sdk/models/get_pulses_task_params.py b/rootly_sdk/models/get_pulses_task_params.py index 47ac664c..d959336d 100644 --- a/rootly_sdk/models/get_pulses_task_params.py +++ b/rootly_sdk/models/get_pulses_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.get_pulses_task_params_task_type import ( - GetPulsesTaskParamsTaskType, - check_get_pulses_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.get_pulses_task_params_task_type import check_get_pulses_task_params_task_type +from ..models.get_pulses_task_params_task_type import GetPulsesTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.get_pulses_task_params_parent_message_thread_task import GetPulsesTaskParamsParentMessageThreadTask from ..models.get_pulses_task_params_post_to_slack_channels_item import GetPulsesTaskParamsPostToSlackChannelsItem @@ -55,6 +56,13 @@ class GetPulsesTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.get_pulses_task_params_parent_message_thread_task import ( + GetPulsesTaskParamsParentMessageThreadTask, + ) + from ..models.get_pulses_task_params_post_to_slack_channels_item import ( + GetPulsesTaskParamsPostToSlackChannelsItem, + ) + past_duration = self.past_duration task_type: str | Unset = UNSET 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 217e26b1..d1ed0018 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="GetPulsesTaskParamsParentMessageThreadTask") 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 022888dc..483104a4 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="GetPulsesTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/get_team_include.py b/rootly_sdk/models/get_team_include.py index 6aaec09f..b59ae417 100644 --- a/rootly_sdk/models/get_team_include.py +++ b/rootly_sdk/models/get_team_include.py @@ -1,8 +1,10 @@ from typing import Literal, cast -GetTeamInclude = Literal["users"] +GetTeamInclude = Literal["escalation_policies", "schedules", "users"] GET_TEAM_INCLUDE_VALUES: set[GetTeamInclude] = { + "escalation_policies", + "schedules", "users", } diff --git a/rootly_sdk/models/heartbeat.py b/rootly_sdk/models/heartbeat.py index 221bff46..19c6250b 100644 --- a/rootly_sdk/models/heartbeat.py +++ b/rootly_sdk/models/heartbeat.py @@ -1,19 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.heartbeat_interval_unit import HeartbeatIntervalUnit, check_heartbeat_interval_unit -from ..models.heartbeat_notification_target_type import ( - HeartbeatNotificationTargetType, - check_heartbeat_notification_target_type, -) -from ..models.heartbeat_status import HeartbeatStatus, check_heartbeat_status from ..types import UNSET, Unset +from ..models.heartbeat_interval_unit import check_heartbeat_interval_unit +from ..models.heartbeat_interval_unit import HeartbeatIntervalUnit +from ..models.heartbeat_notification_target_type import check_heartbeat_notification_target_type +from ..models.heartbeat_notification_target_type import HeartbeatNotificationTargetType +from ..models.heartbeat_status import check_heartbeat_status +from ..models.heartbeat_status import HeartbeatStatus +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="Heartbeat") @@ -36,6 +40,7 @@ class Heartbeat: 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. + owner_group_ids (list[str] | Unset): List of team IDs that own this heartbeat 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. @@ -56,6 +61,7 @@ class Heartbeat: description: None | str | Unset = UNSET alert_description: None | str | Unset = UNSET alert_urgency_id: None | str | Unset = UNSET + owner_group_ids: list[str] | Unset = UNSET ping_url: None | str | Unset = UNSET secret: None | str | Unset = UNSET last_pinged_at: None | str | Unset = UNSET @@ -103,6 +109,10 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_id = self.alert_urgency_id + owner_group_ids: list[str] | Unset = UNSET + if not isinstance(self.owner_group_ids, Unset): + owner_group_ids = self.owner_group_ids + ping_url: None | str | Unset if isinstance(self.ping_url, Unset): ping_url = UNSET @@ -150,6 +160,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["alert_description"] = alert_description if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id + if owner_group_ids is not UNSET: + field_dict["owner_group_ids"] = owner_group_ids if ping_url is not UNSET: field_dict["ping_url"] = ping_url if secret is not UNSET: @@ -213,6 +225,8 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset: alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) + owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET)) + def _parse_ping_url(data: object) -> None | str | Unset: if data is None: return data @@ -264,6 +278,7 @@ def _parse_expires_at(data: object) -> None | str | Unset: description=description, alert_description=alert_description, alert_urgency_id=alert_urgency_id, + owner_group_ids=owner_group_ids, ping_url=ping_url, secret=secret, last_pinged_at=last_pinged_at, diff --git a/rootly_sdk/models/heartbeat_list.py b/rootly_sdk/models/heartbeat_list.py index 433bf7e8..0dd1f6a7 100644 --- a/rootly_sdk/models/heartbeat_list.py +++ b/rootly_sdk/models/heartbeat_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.heartbeat_list_data_item import HeartbeatListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class HeartbeatList: data (list[HeartbeatListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[HeartbeatListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.heartbeat_list_data_item import HeartbeatListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.heartbeat_list_data_item import HeartbeatListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + heartbeat_list = cls( data=data, links=links, meta=meta, + included=included, ) heartbeat_list.additional_properties = d diff --git a/rootly_sdk/models/heartbeat_list_data_item.py b/rootly_sdk/models/heartbeat_list_data_item.py index 7de52115..8939b536 100644 --- a/rootly_sdk/models/heartbeat_list_data_item.py +++ b/rootly_sdk/models/heartbeat_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.heartbeat_list_data_item_type import HeartbeatListDataItemType, check_heartbeat_list_data_item_type +from ..types import UNSET, Unset + +from ..models.heartbeat_list_data_item_type import check_heartbeat_list_data_item_type +from ..models.heartbeat_list_data_item_type import HeartbeatListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.heartbeat import Heartbeat @@ -30,6 +34,8 @@ class HeartbeatListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.heartbeat import Heartbeat + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/heartbeat_response.py b/rootly_sdk/models/heartbeat_response.py index 13d55c26..8291e91e 100644 --- a/rootly_sdk/models/heartbeat_response.py +++ b/rootly_sdk/models/heartbeat_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.heartbeat_response_data import HeartbeatResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="HeartbeatResponse") @@ -18,14 +24,26 @@ class HeartbeatResponse: """ Attributes: data (HeartbeatResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: HeartbeatResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.heartbeat_response_data import HeartbeatResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.heartbeat_response_data import HeartbeatResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = HeartbeatResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + heartbeat_response = cls( data=data, + included=included, ) heartbeat_response.additional_properties = d diff --git a/rootly_sdk/models/heartbeat_response_data.py b/rootly_sdk/models/heartbeat_response_data.py index d680b42f..15cd7583 100644 --- a/rootly_sdk/models/heartbeat_response_data.py +++ b/rootly_sdk/models/heartbeat_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.heartbeat_response_data_type import HeartbeatResponseDataType, check_heartbeat_response_data_type +from ..types import UNSET, Unset + +from ..models.heartbeat_response_data_type import check_heartbeat_response_data_type +from ..models.heartbeat_response_data_type import HeartbeatResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.heartbeat import Heartbeat @@ -30,6 +34,8 @@ class HeartbeatResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.heartbeat import Heartbeat + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/http_client_task_params.py b/rootly_sdk/models/http_client_task_params.py index aeffe9ed..f233febe 100644 --- a/rootly_sdk/models/http_client_task_params.py +++ b/rootly_sdk/models/http_client_task_params.py @@ -1,18 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.http_client_task_params_method import HttpClientTaskParamsMethod, check_http_client_task_params_method -from ..models.http_client_task_params_task_type import ( - HttpClientTaskParamsTaskType, - check_http_client_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.http_client_task_params_method import check_http_client_task_params_method +from ..models.http_client_task_params_method import HttpClientTaskParamsMethod +from ..models.http_client_task_params_task_type import check_http_client_task_params_task_type +from ..models.http_client_task_params_task_type import HttpClientTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.http_client_task_params_post_to_slack_channels_item import HttpClientTaskParamsPostToSlackChannelsItem @@ -36,6 +38,10 @@ class HttpClientTaskParams: method (HttpClientTaskParamsMethod | Unset): HTTP method Default: 'GET'. post_to_incident_timeline (bool | Unset): post_to_slack_channels (list[HttpClientTaskParamsPostToSlackChannelsItem] | Unset): + retry_count (int | Unset): Number of times to retry on HTTP 429 responses (0-4). 0 disables retry. Default: 0. + Example: 3. + retry_wait_time (int | Unset): Seconds to wait before each retry (1-15). Retry-After header is honored when + present and <= 90s, taking the larger of retry_wait_time and the header value. Default: 1. Example: 2. """ url: str @@ -49,9 +55,15 @@ class HttpClientTaskParams: method: HttpClientTaskParamsMethod | Unset = "GET" post_to_incident_timeline: bool | Unset = UNSET post_to_slack_channels: list[HttpClientTaskParamsPostToSlackChannelsItem] | Unset = UNSET + retry_count: int | Unset = 0 + retry_wait_time: int | Unset = 1 additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.http_client_task_params_post_to_slack_channels_item import ( + HttpClientTaskParamsPostToSlackChannelsItem, + ) + url = self.url succeed_on_status = self.succeed_on_status @@ -83,6 +95,10 @@ def to_dict(self) -> dict[str, Any]: post_to_slack_channels_item = post_to_slack_channels_item_data.to_dict() post_to_slack_channels.append(post_to_slack_channels_item) + retry_count = self.retry_count + + retry_wait_time = self.retry_wait_time + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -109,6 +125,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["post_to_incident_timeline"] = post_to_incident_timeline if post_to_slack_channels is not UNSET: field_dict["post_to_slack_channels"] = post_to_slack_channels + if retry_count is not UNSET: + field_dict["retry_count"] = retry_count + if retry_wait_time is not UNSET: + field_dict["retry_wait_time"] = retry_wait_time return field_dict @@ -160,6 +180,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: post_to_slack_channels.append(post_to_slack_channels_item) + retry_count = d.pop("retry_count", UNSET) + + retry_wait_time = d.pop("retry_wait_time", UNSET) + http_client_task_params = cls( url=url, succeed_on_status=succeed_on_status, @@ -172,6 +196,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: method=method, post_to_incident_timeline=post_to_incident_timeline, post_to_slack_channels=post_to_slack_channels, + retry_count=retry_count, + retry_wait_time=retry_wait_time, ) http_client_task_params.additional_properties = d 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 642bc030..e493eea7 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="HttpClientTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/import_meeting_recording.py b/rootly_sdk/models/import_meeting_recording.py new file mode 100644 index 00000000..e3512ea8 --- /dev/null +++ b/rootly_sdk/models/import_meeting_recording.py @@ -0,0 +1,170 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.import_meeting_recording_platform import check_import_meeting_recording_platform +from ..models.import_meeting_recording_platform import ImportMeetingRecordingPlatform +from ..models.import_meeting_recording_source import check_import_meeting_recording_source +from ..models.import_meeting_recording_source import ImportMeetingRecordingSource +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +from uuid import UUID +import datetime + + +T = TypeVar("T", bound="ImportMeetingRecording") + + +@_attrs_define +class ImportMeetingRecording: + """ + Attributes: + source (ImportMeetingRecordingSource): Import source (currently only "recall_desktop_sdk") + recall_recording_id (UUID): External recording UUID (required when source is recall_desktop_sdk) + platform (ImportMeetingRecordingPlatform): Meeting platform + started_at (datetime.datetime | None | Unset): When the recording started + ended_at (datetime.datetime | None | Unset): When the recording ended + meeting_url (None | str | Unset): Original meeting URL + """ + + source: ImportMeetingRecordingSource + recall_recording_id: UUID + platform: ImportMeetingRecordingPlatform + started_at: datetime.datetime | None | Unset = UNSET + ended_at: datetime.datetime | None | Unset = UNSET + meeting_url: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + source: str = self.source + + recall_recording_id = str(self.recall_recording_id) + + platform: str = self.platform + + 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 + + meeting_url: None | str | Unset + if isinstance(self.meeting_url, Unset): + meeting_url = UNSET + else: + meeting_url = self.meeting_url + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "source": source, + "recall_recording_id": recall_recording_id, + "platform": platform, + } + ) + 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 meeting_url is not UNSET: + field_dict["meeting_url"] = meeting_url + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + source = check_import_meeting_recording_source(d.pop("source")) + + recall_recording_id = UUID(d.pop("recall_recording_id")) + + platform = check_import_meeting_recording_platform(d.pop("platform")) + + 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_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + meeting_url = _parse_meeting_url(d.pop("meeting_url", UNSET)) + + import_meeting_recording = cls( + source=source, + recall_recording_id=recall_recording_id, + platform=platform, + started_at=started_at, + ended_at=ended_at, + meeting_url=meeting_url, + ) + + import_meeting_recording.additional_properties = d + return import_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/import_meeting_recording_platform.py b/rootly_sdk/models/import_meeting_recording_platform.py new file mode 100644 index 00000000..384fa62c --- /dev/null +++ b/rootly_sdk/models/import_meeting_recording_platform.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +ImportMeetingRecordingPlatform = Literal["google_meet", "microsoft_teams", "webex", "zoom"] + +IMPORT_MEETING_RECORDING_PLATFORM_VALUES: set[ImportMeetingRecordingPlatform] = { + "google_meet", + "microsoft_teams", + "webex", + "zoom", +} + + +def check_import_meeting_recording_platform(value: str | None) -> ImportMeetingRecordingPlatform | None: + if value is None: + return None + if value in IMPORT_MEETING_RECORDING_PLATFORM_VALUES: + return cast(ImportMeetingRecordingPlatform, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {IMPORT_MEETING_RECORDING_PLATFORM_VALUES!r}") diff --git a/rootly_sdk/models/import_meeting_recording_source.py b/rootly_sdk/models/import_meeting_recording_source.py new file mode 100644 index 00000000..809dea7a --- /dev/null +++ b/rootly_sdk/models/import_meeting_recording_source.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ImportMeetingRecordingSource = Literal["recall_desktop_sdk"] + +IMPORT_MEETING_RECORDING_SOURCE_VALUES: set[ImportMeetingRecordingSource] = { + "recall_desktop_sdk", +} + + +def check_import_meeting_recording_source(value: str | None) -> ImportMeetingRecordingSource | None: + if value is None: + return None + if value in IMPORT_MEETING_RECORDING_SOURCE_VALUES: + return cast(ImportMeetingRecordingSource, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {IMPORT_MEETING_RECORDING_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/in_triage_incident.py b/rootly_sdk/models/in_triage_incident.py index e8b5f987..6450f8f9 100644 --- a/rootly_sdk/models/in_triage_incident.py +++ b/rootly_sdk/models/in_triage_incident.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.in_triage_incident_data import InTriageIncidentData @@ -24,6 +28,8 @@ class InTriageIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.in_triage_incident_data import InTriageIncidentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/in_triage_incident_data.py b/rootly_sdk/models/in_triage_incident_data.py index 7b9e4f40..7533688f 100644 --- a/rootly_sdk/models/in_triage_incident_data.py +++ b/rootly_sdk/models/in_triage_incident_data.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.in_triage_incident_data_type import InTriageIncidentDataType, check_in_triage_incident_data_type +from ..types import UNSET, Unset + +from ..models.in_triage_incident_data_type import check_in_triage_incident_data_type +from ..models.in_triage_incident_data_type import InTriageIncidentDataType +from typing import cast + T = TypeVar("T", bound="InTriageIncidentData") diff --git a/rootly_sdk/models/incident.py b/rootly_sdk/models/incident.py index 651e0067..b240b93f 100644 --- a/rootly_sdk/models/incident.py +++ b/rootly_sdk/models/incident.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_retrospective_progress_status import ( - IncidentRetrospectiveProgressStatus, - check_incident_retrospective_progress_status, -) from ..types import UNSET, Unset +from ..models.incident_retrospective_progress_status import check_incident_retrospective_progress_status +from ..models.incident_retrospective_progress_status import IncidentRetrospectiveProgressStatus +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.environment_response import EnvironmentResponse from ..models.functionality_response import FunctionalityResponse @@ -84,6 +85,23 @@ class Incident: 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 + microsoft_teams_meeting_id (None | str | Unset): Microsoft Teams meeting ID + microsoft_teams_meeting_url (None | str | Unset): Microsoft Teams meeting URL + microsoft_teams_channel_id (None | str | Unset): Microsoft Teams channel ID + microsoft_teams_channel_name (None | str | Unset): Microsoft Teams channel name + microsoft_teams_channel_url (None | str | Unset): Microsoft Teams channel URL + microsoft_teams_channel_short_url (None | str | Unset): Microsoft Teams channel short URL + microsoft_teams_chat_id (None | str | Unset): Microsoft Teams chat ID + microsoft_teams_chat_url (None | str | Unset): Microsoft Teams chat URL + microsoft_teams_team_id (None | str | Unset): Microsoft Teams team ID + google_chat_space_id (None | str | Unset): Google Chat space ID + google_chat_space_name (None | str | Unset): Google Chat space name + google_chat_space_url (None | str | Unset): Google Chat space URL + google_chat_space_short_url (None | str | Unset): Google Chat space short URL + google_chat_space_archived (bool | None | Unset): Whether the Google Chat space is archived + google_chat_space_domain_id (None | str | Unset): Google Chat space domain ID + webex_meeting_id (None | str | Unset): Webex meeting ID + webex_meeting_url (None | str | Unset): Webex 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 @@ -206,6 +224,23 @@ class Incident: google_drive_url: None | str | Unset = UNSET google_meeting_id: None | str | Unset = UNSET google_meeting_url: None | str | Unset = UNSET + microsoft_teams_meeting_id: None | str | Unset = UNSET + microsoft_teams_meeting_url: None | str | Unset = UNSET + microsoft_teams_channel_id: None | str | Unset = UNSET + microsoft_teams_channel_name: None | str | Unset = UNSET + microsoft_teams_channel_url: None | str | Unset = UNSET + microsoft_teams_channel_short_url: None | str | Unset = UNSET + microsoft_teams_chat_id: None | str | Unset = UNSET + microsoft_teams_chat_url: None | str | Unset = UNSET + microsoft_teams_team_id: None | str | Unset = UNSET + google_chat_space_id: None | str | Unset = UNSET + google_chat_space_name: None | str | Unset = UNSET + google_chat_space_url: None | str | Unset = UNSET + google_chat_space_short_url: None | str | Unset = UNSET + google_chat_space_archived: bool | None | Unset = UNSET + google_chat_space_domain_id: None | str | Unset = UNSET + webex_meeting_id: None | str | Unset = UNSET + webex_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 @@ -284,14 +319,23 @@ class Incident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_cancelled_by_type_0 import IncidentCancelledByType0 from ..models.incident_closed_by_type_0 import IncidentClosedByType0 + from ..models.incident_cancelled_by_type_0 import IncidentCancelledByType0 + from ..models.team_response import TeamResponse + from ..models.functionality_response import FunctionalityResponse + from ..models.incident_type_response import IncidentTypeResponse from ..models.incident_in_triage_by_type_0 import IncidentInTriageByType0 - from ..models.incident_labels_type_0 import IncidentLabelsType0 - from ..models.incident_mitigated_by_type_0 import IncidentMitigatedByType0 - from ..models.incident_resolved_by_type_0 import IncidentResolvedByType0 + from ..models.service_response import ServiceResponse + from ..models.severity_response import SeverityResponse from ..models.incident_started_by_type_0 import IncidentStartedByType0 + from ..models.environment_response import EnvironmentResponse from ..models.incident_user_type_0 import IncidentUserType0 + from ..models.incident_labels_type_0 import IncidentLabelsType0 + from ..models.incident_resolved_by_type_0 import IncidentResolvedByType0 + from ..models.incident_zoom_meeting_global_dial_in_numbers_type_0_item import ( + IncidentZoomMeetingGlobalDialInNumbersType0Item, + ) + from ..models.incident_mitigated_by_type_0 import IncidentMitigatedByType0 title = self.title @@ -559,6 +603,108 @@ def to_dict(self) -> dict[str, Any]: else: google_meeting_url = self.google_meeting_url + microsoft_teams_meeting_id: None | str | Unset + if isinstance(self.microsoft_teams_meeting_id, Unset): + microsoft_teams_meeting_id = UNSET + else: + microsoft_teams_meeting_id = self.microsoft_teams_meeting_id + + microsoft_teams_meeting_url: None | str | Unset + if isinstance(self.microsoft_teams_meeting_url, Unset): + microsoft_teams_meeting_url = UNSET + else: + microsoft_teams_meeting_url = self.microsoft_teams_meeting_url + + microsoft_teams_channel_id: None | str | Unset + if isinstance(self.microsoft_teams_channel_id, Unset): + microsoft_teams_channel_id = UNSET + else: + microsoft_teams_channel_id = self.microsoft_teams_channel_id + + microsoft_teams_channel_name: None | str | Unset + if isinstance(self.microsoft_teams_channel_name, Unset): + microsoft_teams_channel_name = UNSET + else: + microsoft_teams_channel_name = self.microsoft_teams_channel_name + + microsoft_teams_channel_url: None | str | Unset + if isinstance(self.microsoft_teams_channel_url, Unset): + microsoft_teams_channel_url = UNSET + else: + microsoft_teams_channel_url = self.microsoft_teams_channel_url + + microsoft_teams_channel_short_url: None | str | Unset + if isinstance(self.microsoft_teams_channel_short_url, Unset): + microsoft_teams_channel_short_url = UNSET + else: + microsoft_teams_channel_short_url = self.microsoft_teams_channel_short_url + + microsoft_teams_chat_id: None | str | Unset + if isinstance(self.microsoft_teams_chat_id, Unset): + microsoft_teams_chat_id = UNSET + else: + microsoft_teams_chat_id = self.microsoft_teams_chat_id + + microsoft_teams_chat_url: None | str | Unset + if isinstance(self.microsoft_teams_chat_url, Unset): + microsoft_teams_chat_url = UNSET + else: + microsoft_teams_chat_url = self.microsoft_teams_chat_url + + microsoft_teams_team_id: None | str | Unset + if isinstance(self.microsoft_teams_team_id, Unset): + microsoft_teams_team_id = UNSET + else: + microsoft_teams_team_id = self.microsoft_teams_team_id + + google_chat_space_id: None | str | Unset + if isinstance(self.google_chat_space_id, Unset): + google_chat_space_id = UNSET + else: + google_chat_space_id = self.google_chat_space_id + + google_chat_space_name: None | str | Unset + if isinstance(self.google_chat_space_name, Unset): + google_chat_space_name = UNSET + else: + google_chat_space_name = self.google_chat_space_name + + google_chat_space_url: None | str | Unset + if isinstance(self.google_chat_space_url, Unset): + google_chat_space_url = UNSET + else: + google_chat_space_url = self.google_chat_space_url + + google_chat_space_short_url: None | str | Unset + if isinstance(self.google_chat_space_short_url, Unset): + google_chat_space_short_url = UNSET + else: + google_chat_space_short_url = self.google_chat_space_short_url + + google_chat_space_archived: bool | None | Unset + if isinstance(self.google_chat_space_archived, Unset): + google_chat_space_archived = UNSET + else: + google_chat_space_archived = self.google_chat_space_archived + + google_chat_space_domain_id: None | str | Unset + if isinstance(self.google_chat_space_domain_id, Unset): + google_chat_space_domain_id = UNSET + else: + google_chat_space_domain_id = self.google_chat_space_domain_id + + webex_meeting_id: None | str | Unset + if isinstance(self.webex_meeting_id, Unset): + webex_meeting_id = UNSET + else: + webex_meeting_id = self.webex_meeting_id + + webex_meeting_url: None | str | Unset + if isinstance(self.webex_meeting_url, Unset): + webex_meeting_url = UNSET + else: + webex_meeting_url = self.webex_meeting_url + jira_issue_key: None | str | Unset if isinstance(self.jira_issue_key, Unset): jira_issue_key = UNSET @@ -1111,6 +1257,40 @@ def to_dict(self) -> dict[str, Any]: field_dict["google_meeting_id"] = google_meeting_id if google_meeting_url is not UNSET: field_dict["google_meeting_url"] = google_meeting_url + if microsoft_teams_meeting_id is not UNSET: + field_dict["microsoft_teams_meeting_id"] = microsoft_teams_meeting_id + if microsoft_teams_meeting_url is not UNSET: + field_dict["microsoft_teams_meeting_url"] = microsoft_teams_meeting_url + if microsoft_teams_channel_id is not UNSET: + field_dict["microsoft_teams_channel_id"] = microsoft_teams_channel_id + if microsoft_teams_channel_name is not UNSET: + field_dict["microsoft_teams_channel_name"] = microsoft_teams_channel_name + if microsoft_teams_channel_url is not UNSET: + field_dict["microsoft_teams_channel_url"] = microsoft_teams_channel_url + if microsoft_teams_channel_short_url is not UNSET: + field_dict["microsoft_teams_channel_short_url"] = microsoft_teams_channel_short_url + if microsoft_teams_chat_id is not UNSET: + field_dict["microsoft_teams_chat_id"] = microsoft_teams_chat_id + if microsoft_teams_chat_url is not UNSET: + field_dict["microsoft_teams_chat_url"] = microsoft_teams_chat_url + if microsoft_teams_team_id is not UNSET: + field_dict["microsoft_teams_team_id"] = microsoft_teams_team_id + if google_chat_space_id is not UNSET: + field_dict["google_chat_space_id"] = google_chat_space_id + if google_chat_space_name is not UNSET: + field_dict["google_chat_space_name"] = google_chat_space_name + if google_chat_space_url is not UNSET: + field_dict["google_chat_space_url"] = google_chat_space_url + if google_chat_space_short_url is not UNSET: + field_dict["google_chat_space_short_url"] = google_chat_space_short_url + if google_chat_space_archived is not UNSET: + field_dict["google_chat_space_archived"] = google_chat_space_archived + if google_chat_space_domain_id is not UNSET: + field_dict["google_chat_space_domain_id"] = google_chat_space_domain_id + if webex_meeting_id is not UNSET: + field_dict["webex_meeting_id"] = webex_meeting_id + if webex_meeting_url is not UNSET: + field_dict["webex_meeting_url"] = webex_meeting_url if jira_issue_key is not UNSET: field_dict["jira_issue_key"] = jira_issue_key if jira_issue_id is not UNSET: @@ -1716,6 +1896,161 @@ def _parse_google_meeting_url(data: object) -> None | str | Unset: google_meeting_url = _parse_google_meeting_url(d.pop("google_meeting_url", UNSET)) + def _parse_microsoft_teams_meeting_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_meeting_id = _parse_microsoft_teams_meeting_id(d.pop("microsoft_teams_meeting_id", UNSET)) + + def _parse_microsoft_teams_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_meeting_url = _parse_microsoft_teams_meeting_url(d.pop("microsoft_teams_meeting_url", UNSET)) + + def _parse_microsoft_teams_channel_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_channel_id = _parse_microsoft_teams_channel_id(d.pop("microsoft_teams_channel_id", UNSET)) + + def _parse_microsoft_teams_channel_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_channel_name = _parse_microsoft_teams_channel_name(d.pop("microsoft_teams_channel_name", UNSET)) + + def _parse_microsoft_teams_channel_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_channel_url = _parse_microsoft_teams_channel_url(d.pop("microsoft_teams_channel_url", UNSET)) + + def _parse_microsoft_teams_channel_short_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_channel_short_url = _parse_microsoft_teams_channel_short_url( + d.pop("microsoft_teams_channel_short_url", UNSET) + ) + + def _parse_microsoft_teams_chat_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_chat_id = _parse_microsoft_teams_chat_id(d.pop("microsoft_teams_chat_id", UNSET)) + + def _parse_microsoft_teams_chat_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_chat_url = _parse_microsoft_teams_chat_url(d.pop("microsoft_teams_chat_url", UNSET)) + + def _parse_microsoft_teams_team_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + microsoft_teams_team_id = _parse_microsoft_teams_team_id(d.pop("microsoft_teams_team_id", UNSET)) + + def _parse_google_chat_space_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_id = _parse_google_chat_space_id(d.pop("google_chat_space_id", UNSET)) + + def _parse_google_chat_space_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_name = _parse_google_chat_space_name(d.pop("google_chat_space_name", UNSET)) + + def _parse_google_chat_space_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_url = _parse_google_chat_space_url(d.pop("google_chat_space_url", UNSET)) + + def _parse_google_chat_space_short_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_short_url = _parse_google_chat_space_short_url(d.pop("google_chat_space_short_url", UNSET)) + + def _parse_google_chat_space_archived(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + google_chat_space_archived = _parse_google_chat_space_archived(d.pop("google_chat_space_archived", UNSET)) + + def _parse_google_chat_space_domain_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + google_chat_space_domain_id = _parse_google_chat_space_domain_id(d.pop("google_chat_space_domain_id", UNSET)) + + def _parse_webex_meeting_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + webex_meeting_id = _parse_webex_meeting_id(d.pop("webex_meeting_id", UNSET)) + + def _parse_webex_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + webex_meeting_url = _parse_webex_meeting_url(d.pop("webex_meeting_url", UNSET)) + def _parse_jira_issue_key(data: object) -> None | str | Unset: if data is None: return data @@ -2489,6 +2824,23 @@ def _parse_cancelled_at(data: object) -> None | str | Unset: google_drive_url=google_drive_url, google_meeting_id=google_meeting_id, google_meeting_url=google_meeting_url, + microsoft_teams_meeting_id=microsoft_teams_meeting_id, + microsoft_teams_meeting_url=microsoft_teams_meeting_url, + microsoft_teams_channel_id=microsoft_teams_channel_id, + microsoft_teams_channel_name=microsoft_teams_channel_name, + microsoft_teams_channel_url=microsoft_teams_channel_url, + microsoft_teams_channel_short_url=microsoft_teams_channel_short_url, + microsoft_teams_chat_id=microsoft_teams_chat_id, + microsoft_teams_chat_url=microsoft_teams_chat_url, + microsoft_teams_team_id=microsoft_teams_team_id, + google_chat_space_id=google_chat_space_id, + google_chat_space_name=google_chat_space_name, + google_chat_space_url=google_chat_space_url, + google_chat_space_short_url=google_chat_space_short_url, + google_chat_space_archived=google_chat_space_archived, + google_chat_space_domain_id=google_chat_space_domain_id, + webex_meeting_id=webex_meeting_id, + webex_meeting_url=webex_meeting_url, jira_issue_key=jira_issue_key, jira_issue_id=jira_issue_id, jira_issue_url=jira_issue_url, diff --git a/rootly_sdk/models/incident_action_item.py b/rootly_sdk/models/incident_action_item.py index 1b8ee2ff..deaccfce 100644 --- a/rootly_sdk/models/incident_action_item.py +++ b/rootly_sdk/models/incident_action_item.py @@ -1,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_action_item_kind import IncidentActionItemKind, check_incident_action_item_kind -from ..models.incident_action_item_priority import IncidentActionItemPriority, check_incident_action_item_priority -from ..models.incident_action_item_status import IncidentActionItemStatus, check_incident_action_item_status from ..types import UNSET, Unset +from ..models.incident_action_item_kind import check_incident_action_item_kind +from ..models.incident_action_item_kind import IncidentActionItemKind +from ..models.incident_action_item_priority import check_incident_action_item_priority +from ..models.incident_action_item_priority import IncidentActionItemPriority +from ..models.incident_action_item_status import check_incident_action_item_status +from ..models.incident_action_item_status import IncidentActionItemStatus +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.user_flat_response import UserFlatResponse @@ -27,7 +33,8 @@ class IncidentActionItem: updated_at (str): Date of last update 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 (UserFlatResponse | Unset): Flat user attributes as returned by UserFlatSerializer (no nested + associations) 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 @@ -35,6 +42,8 @@ class IncidentActionItem: 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. + created_by (UserFlatResponse | Unset): Flat user attributes as returned by UserFlatSerializer (no nested + associations) """ summary: str @@ -50,9 +59,12 @@ class IncidentActionItem: jira_issue_id: None | str | Unset = UNSET jira_issue_key: None | str | Unset = UNSET jira_issue_url: None | str | Unset = UNSET + created_by: UserFlatResponse | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_flat_response import UserFlatResponse + summary = self.summary created_at = self.created_at @@ -114,6 +126,10 @@ def to_dict(self) -> dict[str, Any]: else: jira_issue_url = self.jira_issue_url + created_by: dict[str, Any] | Unset = UNSET + if not isinstance(self.created_by, Unset): + created_by = self.created_by.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -143,6 +159,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["jira_issue_key"] = jira_issue_key if jira_issue_url is not UNSET: field_dict["jira_issue_url"] = jira_issue_url + if created_by is not UNSET: + field_dict["created_by"] = created_by return field_dict @@ -247,6 +265,13 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) + _created_by = d.pop("created_by", UNSET) + created_by: UserFlatResponse | Unset + if isinstance(_created_by, Unset): + created_by = UNSET + else: + created_by = UserFlatResponse.from_dict(_created_by) + incident_action_item = cls( summary=summary, created_at=created_at, @@ -261,6 +286,7 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_id=jira_issue_id, jira_issue_key=jira_issue_key, jira_issue_url=jira_issue_url, + created_by=created_by, ) incident_action_item.additional_properties = d diff --git a/rootly_sdk/models/incident_action_item_list.py b/rootly_sdk/models/incident_action_item_list.py index 75eb9d7e..8448da7d 100644 --- a/rootly_sdk/models/incident_action_item_list.py +++ b/rootly_sdk/models/incident_action_item_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_action_item_list_data_item import IncidentActionItemListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentActionItemList: data (list[IncidentActionItemListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentActionItemListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_action_item_list_data_item import IncidentActionItemListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_action_item_list_data_item import IncidentActionItemListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_action_item_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_action_item_list.additional_properties = d 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 46910964..1e44486c 100644 --- a/rootly_sdk/models/incident_action_item_list_data_item.py +++ b/rootly_sdk/models/incident_action_item_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_action_item_list_data_item_type import ( - IncidentActionItemListDataItemType, - check_incident_action_item_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_action_item_list_data_item_type import check_incident_action_item_list_data_item_type +from ..models.incident_action_item_list_data_item_type import IncidentActionItemListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_action_item import IncidentActionItem @@ -33,6 +34,8 @@ class IncidentActionItemListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_action_item import IncidentActionItem + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_action_item_response.py b/rootly_sdk/models/incident_action_item_response.py index facdf5c1..da3d887d 100644 --- a/rootly_sdk/models/incident_action_item_response.py +++ b/rootly_sdk/models/incident_action_item_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_action_item_response_data import IncidentActionItemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentActionItemResponse") @@ -18,14 +24,26 @@ class IncidentActionItemResponse: """ Attributes: data (IncidentActionItemResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentActionItemResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_action_item_response_data import IncidentActionItemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_action_item_response_data import IncidentActionItemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentActionItemResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_action_item_response = cls( data=data, + included=included, ) incident_action_item_response.additional_properties = d diff --git a/rootly_sdk/models/incident_action_item_response_data.py b/rootly_sdk/models/incident_action_item_response_data.py index 162efaa1..c7d87d82 100644 --- a/rootly_sdk/models/incident_action_item_response_data.py +++ b/rootly_sdk/models/incident_action_item_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_action_item_response_data_type import ( - IncidentActionItemResponseDataType, - check_incident_action_item_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_action_item_response_data_type import check_incident_action_item_response_data_type +from ..models.incident_action_item_response_data_type import IncidentActionItemResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_action_item import IncidentActionItem @@ -33,6 +34,8 @@ class IncidentActionItemResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_action_item import IncidentActionItem + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_cancelled_by_type_0.py b/rootly_sdk/models/incident_cancelled_by_type_0.py index 0e7a89aa..85d7a5bb 100644 --- a/rootly_sdk/models/incident_cancelled_by_type_0.py +++ b/rootly_sdk/models/incident_cancelled_by_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentCancelledByType0") diff --git a/rootly_sdk/models/incident_closed_by_type_0.py b/rootly_sdk/models/incident_closed_by_type_0.py index 27fb3bfc..4e04ad14 100644 --- a/rootly_sdk/models/incident_closed_by_type_0.py +++ b/rootly_sdk/models/incident_closed_by_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentClosedByType0") diff --git a/rootly_sdk/models/incident_custom_field_selection.py b/rootly_sdk/models/incident_custom_field_selection.py index 8fb65665..4e553f96 100644 --- a/rootly_sdk/models/incident_custom_field_selection.py +++ b/rootly_sdk/models/incident_custom_field_selection.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentCustomFieldSelection") diff --git a/rootly_sdk/models/incident_custom_field_selection_list.py b/rootly_sdk/models/incident_custom_field_selection_list.py index 8727b826..5f9cfb0d 100644 --- a/rootly_sdk/models/incident_custom_field_selection_list.py +++ b/rootly_sdk/models/incident_custom_field_selection_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_custom_field_selection_list_data_item import IncidentCustomFieldSelectionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentCustomFieldSelectionList: data (list[IncidentCustomFieldSelectionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentCustomFieldSelectionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_custom_field_selection_list_data_item import IncidentCustomFieldSelectionListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_custom_field_selection_list_data_item import IncidentCustomFieldSelectionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_custom_field_selection_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_custom_field_selection_list.additional_properties = d 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 8cc9c216..59cf9a29 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,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_custom_field_selection_list_data_item_type import ( - IncidentCustomFieldSelectionListDataItemType, check_incident_custom_field_selection_list_data_item_type, ) +from ..models.incident_custom_field_selection_list_data_item_type import IncidentCustomFieldSelectionListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_custom_field_selection import IncidentCustomFieldSelection @@ -33,6 +36,8 @@ class IncidentCustomFieldSelectionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_custom_field_selection import IncidentCustomFieldSelection + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_custom_field_selection_response.py b/rootly_sdk/models/incident_custom_field_selection_response.py index 99631504..a52eea6e 100644 --- a/rootly_sdk/models/incident_custom_field_selection_response.py +++ b/rootly_sdk/models/incident_custom_field_selection_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_custom_field_selection_response_data import IncidentCustomFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentCustomFieldSelectionResponse") @@ -18,14 +24,26 @@ class IncidentCustomFieldSelectionResponse: """ Attributes: data (IncidentCustomFieldSelectionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentCustomFieldSelectionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_custom_field_selection_response_data import IncidentCustomFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_custom_field_selection_response_data import IncidentCustomFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentCustomFieldSelectionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_custom_field_selection_response = cls( data=data, + included=included, ) incident_custom_field_selection_response.additional_properties = d 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 40bee22e..c65dda61 100644 --- a/rootly_sdk/models/incident_custom_field_selection_response_data.py +++ b/rootly_sdk/models/incident_custom_field_selection_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_custom_field_selection_response_data_type import ( - IncidentCustomFieldSelectionResponseDataType, check_incident_custom_field_selection_response_data_type, ) +from ..models.incident_custom_field_selection_response_data_type import IncidentCustomFieldSelectionResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_custom_field_selection import IncidentCustomFieldSelection @@ -33,6 +36,8 @@ class IncidentCustomFieldSelectionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_custom_field_selection import IncidentCustomFieldSelection + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event.py b/rootly_sdk/models/incident_event.py index 0f1d3de6..da86e1f4 100644 --- a/rootly_sdk/models/incident_event.py +++ b/rootly_sdk/models/incident_event.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_event_visibility import IncidentEventVisibility, check_incident_event_visibility from ..types import UNSET, Unset +from ..models.incident_event_visibility import check_incident_event_visibility +from ..models.incident_event_visibility import IncidentEventVisibility +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentEvent") diff --git a/rootly_sdk/models/incident_event_functionality.py b/rootly_sdk/models/incident_event_functionality.py index 2283fbd7..8ce827b8 100644 --- a/rootly_sdk/models/incident_event_functionality.py +++ b/rootly_sdk/models/incident_event_functionality.py @@ -1,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.incident_event_functionality_status import check_incident_event_functionality_status +from ..models.incident_event_functionality_status import IncidentEventFunctionalityStatus +from typing import cast -from ..models.incident_event_functionality_status import ( - IncidentEventFunctionalityStatus, - check_incident_event_functionality_status, -) T = TypeVar("T", bound="IncidentEventFunctionality") diff --git a/rootly_sdk/models/incident_event_functionality_list.py b/rootly_sdk/models/incident_event_functionality_list.py index 98fa45b7..b476452d 100644 --- a/rootly_sdk/models/incident_event_functionality_list.py +++ b/rootly_sdk/models/incident_event_functionality_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_event_functionality_list_data_item import IncidentEventFunctionalityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentEventFunctionalityList: data (list[IncidentEventFunctionalityListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentEventFunctionalityListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.incident_event_functionality_list_data_item import IncidentEventFunctionalityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_functionality_list_data_item import IncidentEventFunctionalityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_functionality_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_event_functionality_list.additional_properties = d 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 187d9f5d..4c1452df 100644 --- a/rootly_sdk/models/incident_event_functionality_list_data_item.py +++ b/rootly_sdk/models/incident_event_functionality_list_data_item.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_event_functionality_list_data_item_type import ( - IncidentEventFunctionalityListDataItemType, check_incident_event_functionality_list_data_item_type, ) +from ..models.incident_event_functionality_list_data_item_type import IncidentEventFunctionalityListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_event_functionality import IncidentEventFunctionality @@ -33,6 +36,8 @@ class IncidentEventFunctionalityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_event_functionality import IncidentEventFunctionality + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_functionality_response.py b/rootly_sdk/models/incident_event_functionality_response.py index 40c22ff4..70135ed3 100644 --- a/rootly_sdk/models/incident_event_functionality_response.py +++ b/rootly_sdk/models/incident_event_functionality_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_event_functionality_response_data import IncidentEventFunctionalityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentEventFunctionalityResponse") @@ -18,14 +24,26 @@ class IncidentEventFunctionalityResponse: """ Attributes: data (IncidentEventFunctionalityResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentEventFunctionalityResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.incident_event_functionality_response_data import IncidentEventFunctionalityResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_functionality_response_data import IncidentEventFunctionalityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentEventFunctionalityResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_functionality_response = cls( data=data, + included=included, ) incident_event_functionality_response.additional_properties = d diff --git a/rootly_sdk/models/incident_event_functionality_response_data.py b/rootly_sdk/models/incident_event_functionality_response_data.py index a7efe600..13525275 100644 --- a/rootly_sdk/models/incident_event_functionality_response_data.py +++ b/rootly_sdk/models/incident_event_functionality_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_event_functionality_response_data_type import ( - IncidentEventFunctionalityResponseDataType, check_incident_event_functionality_response_data_type, ) +from ..models.incident_event_functionality_response_data_type import IncidentEventFunctionalityResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_event_functionality import IncidentEventFunctionality @@ -33,6 +36,8 @@ class IncidentEventFunctionalityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_event_functionality import IncidentEventFunctionality + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_list.py b/rootly_sdk/models/incident_event_list.py index 23e8187c..019a9b61 100644 --- a/rootly_sdk/models/incident_event_list.py +++ b/rootly_sdk/models/incident_event_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_event_list_data_item import IncidentEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentEventList: data (list[IncidentEventListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentEventListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.incident_event_list_data_item import IncidentEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_list_data_item import IncidentEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_event_list.additional_properties = d diff --git a/rootly_sdk/models/incident_event_list_data_item.py b/rootly_sdk/models/incident_event_list_data_item.py index ec5e4556..8e30ac6f 100644 --- a/rootly_sdk/models/incident_event_list_data_item.py +++ b/rootly_sdk/models/incident_event_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_event_list_data_item_type import ( - IncidentEventListDataItemType, - check_incident_event_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_event_list_data_item_type import check_incident_event_list_data_item_type +from ..models.incident_event_list_data_item_type import IncidentEventListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_event import IncidentEvent @@ -33,6 +34,8 @@ class IncidentEventListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_event import IncidentEvent + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_response.py b/rootly_sdk/models/incident_event_response.py index 671201d9..187b3b29 100644 --- a/rootly_sdk/models/incident_event_response.py +++ b/rootly_sdk/models/incident_event_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_event_response_data import IncidentEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentEventResponse") @@ -18,14 +24,26 @@ class IncidentEventResponse: """ Attributes: data (IncidentEventResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentEventResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.incident_event_response_data import IncidentEventResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_response_data import IncidentEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentEventResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_response = cls( data=data, + included=included, ) incident_event_response.additional_properties = d diff --git a/rootly_sdk/models/incident_event_response_data.py b/rootly_sdk/models/incident_event_response_data.py index 420a0bb2..57564173 100644 --- a/rootly_sdk/models/incident_event_response_data.py +++ b/rootly_sdk/models/incident_event_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_event_response_data_type import ( - IncidentEventResponseDataType, - check_incident_event_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_event_response_data_type import check_incident_event_response_data_type +from ..models.incident_event_response_data_type import IncidentEventResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_event import IncidentEvent @@ -33,6 +34,8 @@ class IncidentEventResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_event import IncidentEvent + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_service.py b/rootly_sdk/models/incident_event_service.py index 1353bf73..a295e27c 100644 --- a/rootly_sdk/models/incident_event_service.py +++ b/rootly_sdk/models/incident_event_service.py @@ -1,11 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.incident_event_service_status import check_incident_event_service_status +from ..models.incident_event_service_status import IncidentEventServiceStatus +from typing import cast -from ..models.incident_event_service_status import IncidentEventServiceStatus, check_incident_event_service_status T = TypeVar("T", bound="IncidentEventService") diff --git a/rootly_sdk/models/incident_event_service_list.py b/rootly_sdk/models/incident_event_service_list.py index e1ef7ee1..bcd484b1 100644 --- a/rootly_sdk/models/incident_event_service_list.py +++ b/rootly_sdk/models/incident_event_service_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_event_service_list_data_item import IncidentEventServiceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentEventServiceList: data (list[IncidentEventServiceListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentEventServiceListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_event_service_list_data_item import IncidentEventServiceListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_service_list_data_item import IncidentEventServiceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_service_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_event_service_list.additional_properties = d 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 092f03d4..36833623 100644 --- a/rootly_sdk/models/incident_event_service_list_data_item.py +++ b/rootly_sdk/models/incident_event_service_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_event_service_list_data_item_type import ( - IncidentEventServiceListDataItemType, - check_incident_event_service_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_event_service_list_data_item_type import check_incident_event_service_list_data_item_type +from ..models.incident_event_service_list_data_item_type import IncidentEventServiceListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_event_service import IncidentEventService @@ -33,6 +34,8 @@ class IncidentEventServiceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_event_service import IncidentEventService + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_event_service_response.py b/rootly_sdk/models/incident_event_service_response.py index 60539a21..0957d249 100644 --- a/rootly_sdk/models/incident_event_service_response.py +++ b/rootly_sdk/models/incident_event_service_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_event_service_response_data import IncidentEventServiceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentEventServiceResponse") @@ -18,14 +24,26 @@ class IncidentEventServiceResponse: """ Attributes: data (IncidentEventServiceResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentEventServiceResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_event_service_response_data import IncidentEventServiceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_event_service_response_data import IncidentEventServiceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentEventServiceResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_event_service_response = cls( data=data, + included=included, ) incident_event_service_response.additional_properties = d diff --git a/rootly_sdk/models/incident_event_service_response_data.py b/rootly_sdk/models/incident_event_service_response_data.py index 01413cba..7f978295 100644 --- a/rootly_sdk/models/incident_event_service_response_data.py +++ b/rootly_sdk/models/incident_event_service_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_event_service_response_data_type import ( - IncidentEventServiceResponseDataType, - check_incident_event_service_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_event_service_response_data_type import check_incident_event_service_response_data_type +from ..models.incident_event_service_response_data_type import IncidentEventServiceResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_event_service import IncidentEventService @@ -33,6 +34,8 @@ class IncidentEventServiceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_event_service import IncidentEventService + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_feedback.py b/rootly_sdk/models/incident_feedback.py index 4ea237d8..cc97403e 100644 --- a/rootly_sdk/models/incident_feedback.py +++ b/rootly_sdk/models/incident_feedback.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_feedback_rating import IncidentFeedbackRating, check_incident_feedback_rating +from ..types import UNSET, Unset + +from ..models.incident_feedback_rating import check_incident_feedback_rating +from ..models.incident_feedback_rating import IncidentFeedbackRating +from typing import cast + T = TypeVar("T", bound="IncidentFeedback") diff --git a/rootly_sdk/models/incident_feedback_list.py b/rootly_sdk/models/incident_feedback_list.py index 3553531b..5d6539cc 100644 --- a/rootly_sdk/models/incident_feedback_list.py +++ b/rootly_sdk/models/incident_feedback_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_feedback_list_data_item import IncidentFeedbackListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentFeedbackList: data (list[IncidentFeedbackListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentFeedbackListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_feedback_list_data_item import IncidentFeedbackListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_feedback_list_data_item import IncidentFeedbackListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_feedback_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_feedback_list.additional_properties = d diff --git a/rootly_sdk/models/incident_feedback_list_data_item.py b/rootly_sdk/models/incident_feedback_list_data_item.py index a71bc453..8bd199ea 100644 --- a/rootly_sdk/models/incident_feedback_list_data_item.py +++ b/rootly_sdk/models/incident_feedback_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_feedback_list_data_item_type import ( - IncidentFeedbackListDataItemType, - check_incident_feedback_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_feedback_list_data_item_type import check_incident_feedback_list_data_item_type +from ..models.incident_feedback_list_data_item_type import IncidentFeedbackListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_feedback import IncidentFeedback @@ -33,6 +34,8 @@ class IncidentFeedbackListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_feedback import IncidentFeedback + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_feedback_response.py b/rootly_sdk/models/incident_feedback_response.py index 7ef28981..88c6f6cd 100644 --- a/rootly_sdk/models/incident_feedback_response.py +++ b/rootly_sdk/models/incident_feedback_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_feedback_response_data import IncidentFeedbackResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentFeedbackResponse") @@ -18,14 +24,26 @@ class IncidentFeedbackResponse: """ Attributes: data (IncidentFeedbackResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentFeedbackResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_feedback_response_data import IncidentFeedbackResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_feedback_response_data import IncidentFeedbackResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentFeedbackResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_feedback_response = cls( data=data, + included=included, ) incident_feedback_response.additional_properties = d diff --git a/rootly_sdk/models/incident_feedback_response_data.py b/rootly_sdk/models/incident_feedback_response_data.py index e87ec38d..1faf645c 100644 --- a/rootly_sdk/models/incident_feedback_response_data.py +++ b/rootly_sdk/models/incident_feedback_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_feedback_response_data_type import ( - IncidentFeedbackResponseDataType, - check_incident_feedback_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_feedback_response_data_type import check_incident_feedback_response_data_type +from ..models.incident_feedback_response_data_type import IncidentFeedbackResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_feedback import IncidentFeedback @@ -33,6 +34,8 @@ class IncidentFeedbackResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_feedback import IncidentFeedback + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_form_field_selection.py b/rootly_sdk/models/incident_form_field_selection.py index 546b0afb..40d0a190 100644 --- a/rootly_sdk/models/incident_form_field_selection.py +++ b/rootly_sdk/models/incident_form_field_selection.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentFormFieldSelection") diff --git a/rootly_sdk/models/incident_form_field_selection_list.py b/rootly_sdk/models/incident_form_field_selection_list.py index 18e8816d..57c40191 100644 --- a/rootly_sdk/models/incident_form_field_selection_list.py +++ b/rootly_sdk/models/incident_form_field_selection_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_form_field_selection_list_data_item import IncidentFormFieldSelectionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentFormFieldSelectionList: data (list[IncidentFormFieldSelectionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentFormFieldSelectionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_form_field_selection_list_data_item import IncidentFormFieldSelectionListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_form_field_selection_list_data_item import IncidentFormFieldSelectionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_form_field_selection_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_form_field_selection_list.additional_properties = d 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 4b57072f..ae4c5cfe 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,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_form_field_selection_list_data_item_type import ( - IncidentFormFieldSelectionListDataItemType, check_incident_form_field_selection_list_data_item_type, ) +from ..models.incident_form_field_selection_list_data_item_type import IncidentFormFieldSelectionListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_form_field_selection import IncidentFormFieldSelection @@ -33,6 +36,8 @@ class IncidentFormFieldSelectionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_form_field_selection import IncidentFormFieldSelection + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_form_field_selection_response.py b/rootly_sdk/models/incident_form_field_selection_response.py index 61746484..be6c673f 100644 --- a/rootly_sdk/models/incident_form_field_selection_response.py +++ b/rootly_sdk/models/incident_form_field_selection_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_form_field_selection_response_data import IncidentFormFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentFormFieldSelectionResponse") @@ -18,14 +24,26 @@ class IncidentFormFieldSelectionResponse: """ Attributes: data (IncidentFormFieldSelectionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentFormFieldSelectionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.incident_form_field_selection_response_data import IncidentFormFieldSelectionResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_form_field_selection_response_data import IncidentFormFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentFormFieldSelectionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_form_field_selection_response = cls( data=data, + included=included, ) incident_form_field_selection_response.additional_properties = d 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 8143f17b..d35bdb35 100644 --- a/rootly_sdk/models/incident_form_field_selection_response_data.py +++ b/rootly_sdk/models/incident_form_field_selection_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_form_field_selection_response_data_type import ( - IncidentFormFieldSelectionResponseDataType, check_incident_form_field_selection_response_data_type, ) +from ..models.incident_form_field_selection_response_data_type import IncidentFormFieldSelectionResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_form_field_selection import IncidentFormFieldSelection @@ -33,6 +36,8 @@ class IncidentFormFieldSelectionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_form_field_selection import IncidentFormFieldSelection + id = self.id type_: str = self.type_ 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 d9e70a76..7e9f80d0 100644 --- a/rootly_sdk/models/incident_in_triage_by_type_0.py +++ b/rootly_sdk/models/incident_in_triage_by_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentInTriageByType0") diff --git a/rootly_sdk/models/incident_labels_type_0.py b/rootly_sdk/models/incident_labels_type_0.py index 44337a9d..a87ab663 100644 --- a/rootly_sdk/models/incident_labels_type_0.py +++ b/rootly_sdk/models/incident_labels_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentLabelsType0") diff --git a/rootly_sdk/models/incident_list.py b/rootly_sdk/models/incident_list.py index ebc240f5..ba61e423 100644 --- a/rootly_sdk/models/incident_list.py +++ b/rootly_sdk/models/incident_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_list_data_item import IncidentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentList: data (list[IncidentListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.incident_list_data_item import IncidentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_list_data_item import IncidentListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_list.additional_properties = d diff --git a/rootly_sdk/models/incident_list_data_item.py b/rootly_sdk/models/incident_list_data_item.py index 0087518b..e245c20d 100644 --- a/rootly_sdk/models/incident_list_data_item.py +++ b/rootly_sdk/models/incident_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_list_data_item_type import IncidentListDataItemType, check_incident_list_data_item_type +from ..types import UNSET, Unset + +from ..models.incident_list_data_item_type import check_incident_list_data_item_type +from ..models.incident_list_data_item_type import IncidentListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident import Incident @@ -30,6 +34,8 @@ class IncidentListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident import Incident + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_mitigated_by_type_0.py b/rootly_sdk/models/incident_mitigated_by_type_0.py index cb9cdf55..67f742cd 100644 --- a/rootly_sdk/models/incident_mitigated_by_type_0.py +++ b/rootly_sdk/models/incident_mitigated_by_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentMitigatedByType0") diff --git a/rootly_sdk/models/incident_permission_set.py b/rootly_sdk/models/incident_permission_set.py index ea4d766a..07e24708 100644 --- a/rootly_sdk/models/incident_permission_set.py +++ b/rootly_sdk/models/incident_permission_set.py @@ -1,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_permission_set_private_incident_permissions_item import ( - IncidentPermissionSetPrivateIncidentPermissionsItem, check_incident_permission_set_private_incident_permissions_item, ) +from ..models.incident_permission_set_private_incident_permissions_item import ( + IncidentPermissionSetPrivateIncidentPermissionsItem, +) from ..models.incident_permission_set_public_incident_permissions_item import ( - IncidentPermissionSetPublicIncidentPermissionsItem, check_incident_permission_set_public_incident_permissions_item, ) +from ..models.incident_permission_set_public_incident_permissions_item import ( + IncidentPermissionSetPublicIncidentPermissionsItem, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="IncidentPermissionSet") diff --git a/rootly_sdk/models/incident_permission_set_boolean.py b/rootly_sdk/models/incident_permission_set_boolean.py index 681230c8..cb873ce4 100644 --- a/rootly_sdk/models/incident_permission_set_boolean.py +++ b/rootly_sdk/models/incident_permission_set_boolean.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_permission_set_boolean_kind import ( - IncidentPermissionSetBooleanKind, - check_incident_permission_set_boolean_kind, -) from ..types import UNSET, Unset +from ..models.incident_permission_set_boolean_kind import check_incident_permission_set_boolean_kind +from ..models.incident_permission_set_boolean_kind import IncidentPermissionSetBooleanKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentPermissionSetBoolean") diff --git a/rootly_sdk/models/incident_permission_set_boolean_list.py b/rootly_sdk/models/incident_permission_set_boolean_list.py index 1494db51..de19146e 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_list.py +++ b/rootly_sdk/models/incident_permission_set_boolean_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_permission_set_boolean_list_data_item import IncidentPermissionSetBooleanListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentPermissionSetBooleanList: data (list[IncidentPermissionSetBooleanListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentPermissionSetBooleanListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.incident_permission_set_boolean_list_data_item import IncidentPermissionSetBooleanListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_boolean_list_data_item import IncidentPermissionSetBooleanListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_boolean_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_permission_set_boolean_list.additional_properties = d 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 e356914c..29ffdb77 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,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_permission_set_boolean_list_data_item_type import ( - IncidentPermissionSetBooleanListDataItemType, check_incident_permission_set_boolean_list_data_item_type, ) +from ..models.incident_permission_set_boolean_list_data_item_type import IncidentPermissionSetBooleanListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set_boolean import IncidentPermissionSetBoolean @@ -33,6 +36,8 @@ class IncidentPermissionSetBooleanListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_permission_set_boolean import IncidentPermissionSetBoolean + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_boolean_response.py b/rootly_sdk/models/incident_permission_set_boolean_response.py index 97d43997..fa4a3acf 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_response.py +++ b/rootly_sdk/models/incident_permission_set_boolean_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_permission_set_boolean_response_data import IncidentPermissionSetBooleanResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentPermissionSetBooleanResponse") @@ -18,14 +24,26 @@ class IncidentPermissionSetBooleanResponse: """ Attributes: data (IncidentPermissionSetBooleanResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentPermissionSetBooleanResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.incident_permission_set_boolean_response_data import IncidentPermissionSetBooleanResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_boolean_response_data import IncidentPermissionSetBooleanResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentPermissionSetBooleanResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_boolean_response = cls( data=data, + included=included, ) incident_permission_set_boolean_response.additional_properties = d 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 5c85b779..652d9191 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_response_data.py +++ b/rootly_sdk/models/incident_permission_set_boolean_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_permission_set_boolean_response_data_type import ( - IncidentPermissionSetBooleanResponseDataType, check_incident_permission_set_boolean_response_data_type, ) +from ..models.incident_permission_set_boolean_response_data_type import IncidentPermissionSetBooleanResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set_boolean import IncidentPermissionSetBoolean @@ -33,6 +36,8 @@ class IncidentPermissionSetBooleanResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_permission_set_boolean import IncidentPermissionSetBoolean + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_list.py b/rootly_sdk/models/incident_permission_set_list.py index c4613dc6..358ce75d 100644 --- a/rootly_sdk/models/incident_permission_set_list.py +++ b/rootly_sdk/models/incident_permission_set_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_permission_set_list_data_item import IncidentPermissionSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentPermissionSetList: data (list[IncidentPermissionSetListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentPermissionSetListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.incident_permission_set_list_data_item import IncidentPermissionSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_list_data_item import IncidentPermissionSetListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_permission_set_list.additional_properties = d 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 119ee59f..92700408 100644 --- a/rootly_sdk/models/incident_permission_set_list_data_item.py +++ b/rootly_sdk/models/incident_permission_set_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_permission_set_list_data_item_type import ( - IncidentPermissionSetListDataItemType, - check_incident_permission_set_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_permission_set_list_data_item_type import check_incident_permission_set_list_data_item_type +from ..models.incident_permission_set_list_data_item_type import IncidentPermissionSetListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set import IncidentPermissionSet @@ -33,6 +34,8 @@ class IncidentPermissionSetListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_permission_set import IncidentPermissionSet + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_resource.py b/rootly_sdk/models/incident_permission_set_resource.py index 301cd270..0f944fea 100644 --- a/rootly_sdk/models/incident_permission_set_resource.py +++ b/rootly_sdk/models/incident_permission_set_resource.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_permission_set_resource_kind import ( - IncidentPermissionSetResourceKind, - check_incident_permission_set_resource_kind, -) from ..types import UNSET, Unset +from ..models.incident_permission_set_resource_kind import check_incident_permission_set_resource_kind +from ..models.incident_permission_set_resource_kind import IncidentPermissionSetResourceKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentPermissionSetResource") diff --git a/rootly_sdk/models/incident_permission_set_resource_list.py b/rootly_sdk/models/incident_permission_set_resource_list.py index aa8b5084..96c580ae 100644 --- a/rootly_sdk/models/incident_permission_set_resource_list.py +++ b/rootly_sdk/models/incident_permission_set_resource_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_permission_set_resource_list_data_item import IncidentPermissionSetResourceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentPermissionSetResourceList: data (list[IncidentPermissionSetResourceListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentPermissionSetResourceListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.incident_permission_set_resource_list_data_item import IncidentPermissionSetResourceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_resource_list_data_item import IncidentPermissionSetResourceListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_resource_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_permission_set_resource_list.additional_properties = d 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 7d14eee6..51ee091c 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,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_permission_set_resource_list_data_item_type import ( - IncidentPermissionSetResourceListDataItemType, check_incident_permission_set_resource_list_data_item_type, ) +from ..models.incident_permission_set_resource_list_data_item_type import IncidentPermissionSetResourceListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set_resource import IncidentPermissionSetResource @@ -33,6 +36,8 @@ class IncidentPermissionSetResourceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_permission_set_resource import IncidentPermissionSetResource + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_resource_response.py b/rootly_sdk/models/incident_permission_set_resource_response.py index aa08a65a..2fb46185 100644 --- a/rootly_sdk/models/incident_permission_set_resource_response.py +++ b/rootly_sdk/models/incident_permission_set_resource_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_permission_set_resource_response_data import IncidentPermissionSetResourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentPermissionSetResourceResponse") @@ -18,14 +24,26 @@ class IncidentPermissionSetResourceResponse: """ Attributes: data (IncidentPermissionSetResourceResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentPermissionSetResourceResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_permission_set_resource_response_data import IncidentPermissionSetResourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_resource_response_data import IncidentPermissionSetResourceResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentPermissionSetResourceResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_resource_response = cls( data=data, + included=included, ) incident_permission_set_resource_response.additional_properties = d 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 7d77c245..7745b7ff 100644 --- a/rootly_sdk/models/incident_permission_set_resource_response_data.py +++ b/rootly_sdk/models/incident_permission_set_resource_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.incident_permission_set_resource_response_data_type import ( - IncidentPermissionSetResourceResponseDataType, check_incident_permission_set_resource_response_data_type, ) +from ..models.incident_permission_set_resource_response_data_type import IncidentPermissionSetResourceResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set_resource import IncidentPermissionSetResource @@ -33,6 +36,8 @@ class IncidentPermissionSetResourceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_permission_set_resource import IncidentPermissionSetResource + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_permission_set_response.py b/rootly_sdk/models/incident_permission_set_response.py index 625c9871..7904d11f 100644 --- a/rootly_sdk/models/incident_permission_set_response.py +++ b/rootly_sdk/models/incident_permission_set_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_permission_set_response_data import IncidentPermissionSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentPermissionSetResponse") @@ -18,14 +24,26 @@ class IncidentPermissionSetResponse: """ Attributes: data (IncidentPermissionSetResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentPermissionSetResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_permission_set_response_data import IncidentPermissionSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_permission_set_response_data import IncidentPermissionSetResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentPermissionSetResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_permission_set_response = cls( data=data, + included=included, ) incident_permission_set_response.additional_properties = d diff --git a/rootly_sdk/models/incident_permission_set_response_data.py b/rootly_sdk/models/incident_permission_set_response_data.py index 086da0db..40f08023 100644 --- a/rootly_sdk/models/incident_permission_set_response_data.py +++ b/rootly_sdk/models/incident_permission_set_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_permission_set_response_data_type import ( - IncidentPermissionSetResponseDataType, - check_incident_permission_set_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_permission_set_response_data_type import check_incident_permission_set_response_data_type +from ..models.incident_permission_set_response_data_type import IncidentPermissionSetResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set import IncidentPermissionSet @@ -33,6 +34,8 @@ class IncidentPermissionSetResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_permission_set import IncidentPermissionSet + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_post_mortem.py b/rootly_sdk/models/incident_post_mortem.py index b3798e39..8b90cecc 100644 --- a/rootly_sdk/models/incident_post_mortem.py +++ b/rootly_sdk/models/incident_post_mortem.py @@ -1,18 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_post_mortem_show_timeline_order import ( - IncidentPostMortemShowTimelineOrder, - check_incident_post_mortem_show_timeline_order, -) -from ..models.incident_post_mortem_status import IncidentPostMortemStatus, check_incident_post_mortem_status from ..types import UNSET, Unset +from ..models.incident_post_mortem_show_timeline_order import check_incident_post_mortem_show_timeline_order +from ..models.incident_post_mortem_show_timeline_order import IncidentPostMortemShowTimelineOrder +from ..models.incident_post_mortem_status import check_incident_post_mortem_status +from ..models.incident_post_mortem_status import IncidentPostMortemStatus +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentPostMortem") diff --git a/rootly_sdk/models/incident_post_mortem_list.py b/rootly_sdk/models/incident_post_mortem_list.py index dc7e0e30..5cc1a8d8 100644 --- a/rootly_sdk/models/incident_post_mortem_list.py +++ b/rootly_sdk/models/incident_post_mortem_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_post_mortem_list_data_item import IncidentPostMortemListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentPostMortemList: data (list[IncidentPostMortemListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentPostMortemListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.incident_post_mortem_list_data_item import IncidentPostMortemListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_post_mortem_list_data_item import IncidentPostMortemListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_post_mortem_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_post_mortem_list.additional_properties = d 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 956c4ed2..fff852cb 100644 --- a/rootly_sdk/models/incident_post_mortem_list_data_item.py +++ b/rootly_sdk/models/incident_post_mortem_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_post_mortem_list_data_item_type import ( - IncidentPostMortemListDataItemType, - check_incident_post_mortem_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_post_mortem_list_data_item_type import check_incident_post_mortem_list_data_item_type +from ..models.incident_post_mortem_list_data_item_type import IncidentPostMortemListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_post_mortem import IncidentPostMortem @@ -33,6 +34,8 @@ class IncidentPostMortemListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_post_mortem import IncidentPostMortem + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_post_mortem_response.py b/rootly_sdk/models/incident_post_mortem_response.py index bbc06c20..ab450a68 100644 --- a/rootly_sdk/models/incident_post_mortem_response.py +++ b/rootly_sdk/models/incident_post_mortem_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_post_mortem_response_data import IncidentPostMortemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentPostMortemResponse") @@ -18,14 +24,26 @@ class IncidentPostMortemResponse: """ Attributes: data (IncidentPostMortemResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentPostMortemResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_post_mortem_response_data import IncidentPostMortemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_post_mortem_response_data import IncidentPostMortemResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentPostMortemResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_post_mortem_response = cls( data=data, + included=included, ) incident_post_mortem_response.additional_properties = d diff --git a/rootly_sdk/models/incident_post_mortem_response_data.py b/rootly_sdk/models/incident_post_mortem_response_data.py index c5f49a4e..96d6c0ca 100644 --- a/rootly_sdk/models/incident_post_mortem_response_data.py +++ b/rootly_sdk/models/incident_post_mortem_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_post_mortem_response_data_type import ( - IncidentPostMortemResponseDataType, - check_incident_post_mortem_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_post_mortem_response_data_type import check_incident_post_mortem_response_data_type +from ..models.incident_post_mortem_response_data_type import IncidentPostMortemResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_post_mortem import IncidentPostMortem @@ -33,6 +34,8 @@ class IncidentPostMortemResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_post_mortem import IncidentPostMortem + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_resolved_by_type_0.py b/rootly_sdk/models/incident_resolved_by_type_0.py index 053c1026..f6b4b6dd 100644 --- a/rootly_sdk/models/incident_resolved_by_type_0.py +++ b/rootly_sdk/models/incident_resolved_by_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentResolvedByType0") diff --git a/rootly_sdk/models/incident_response.py b/rootly_sdk/models/incident_response.py index 956f0f07..10c71c19 100644 --- a/rootly_sdk/models/incident_response.py +++ b/rootly_sdk/models/incident_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_response_data import IncidentResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentResponse") @@ -18,14 +24,26 @@ class IncidentResponse: """ Attributes: data (IncidentResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_response_data import IncidentResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_response_data import IncidentResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_response = cls( data=data, + included=included, ) incident_response.additional_properties = d diff --git a/rootly_sdk/models/incident_response_data.py b/rootly_sdk/models/incident_response_data.py index 0bbe83f7..ab328923 100644 --- a/rootly_sdk/models/incident_response_data.py +++ b/rootly_sdk/models/incident_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_response_data_type import IncidentResponseDataType, check_incident_response_data_type +from ..types import UNSET, Unset + +from ..models.incident_response_data_type import check_incident_response_data_type +from ..models.incident_response_data_type import IncidentResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident import Incident @@ -30,6 +34,8 @@ class IncidentResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident import Incident + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_retrospective_step.py b/rootly_sdk/models/incident_retrospective_step.py index 96dca873..57bd9a30 100644 --- a/rootly_sdk/models/incident_retrospective_step.py +++ b/rootly_sdk/models/incident_retrospective_step.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_retrospective_step_status import ( - IncidentRetrospectiveStepStatus, - check_incident_retrospective_step_status, -) from ..types import UNSET, Unset +from ..models.incident_retrospective_step_status import check_incident_retrospective_step_status +from ..models.incident_retrospective_step_status import IncidentRetrospectiveStepStatus +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentRetrospectiveStep") diff --git a/rootly_sdk/models/incident_retrospective_step_response.py b/rootly_sdk/models/incident_retrospective_step_response.py index ad7fe343..3812a1f6 100644 --- a/rootly_sdk/models/incident_retrospective_step_response.py +++ b/rootly_sdk/models/incident_retrospective_step_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_retrospective_step_response_data import IncidentRetrospectiveStepResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentRetrospectiveStepResponse") @@ -18,14 +24,26 @@ class IncidentRetrospectiveStepResponse: """ Attributes: data (IncidentRetrospectiveStepResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentRetrospectiveStepResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_retrospective_step_response_data import IncidentRetrospectiveStepResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_retrospective_step_response_data import IncidentRetrospectiveStepResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentRetrospectiveStepResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_retrospective_step_response = cls( data=data, + included=included, ) incident_retrospective_step_response.additional_properties = d diff --git a/rootly_sdk/models/incident_retrospective_step_response_data.py b/rootly_sdk/models/incident_retrospective_step_response_data.py index d5e1b578..150af8ec 100644 --- a/rootly_sdk/models/incident_retrospective_step_response_data.py +++ b/rootly_sdk/models/incident_retrospective_step_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_retrospective_step_response_data_type import ( - IncidentRetrospectiveStepResponseDataType, - check_incident_retrospective_step_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_retrospective_step_response_data_type import check_incident_retrospective_step_response_data_type +from ..models.incident_retrospective_step_response_data_type import IncidentRetrospectiveStepResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_retrospective_step import IncidentRetrospectiveStep @@ -33,6 +34,8 @@ class IncidentRetrospectiveStepResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_retrospective_step import IncidentRetrospectiveStep + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_role.py b/rootly_sdk/models/incident_role.py index 9aa66312..31c16038 100644 --- a/rootly_sdk/models/incident_role.py +++ b/rootly_sdk/models/incident_role.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentRole") diff --git a/rootly_sdk/models/incident_role_list.py b/rootly_sdk/models/incident_role_list.py index 753a82f2..d514d8ed 100644 --- a/rootly_sdk/models/incident_role_list.py +++ b/rootly_sdk/models/incident_role_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_role_list_data_item import IncidentRoleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentRoleList: data (list[IncidentRoleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentRoleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_role_list_data_item import IncidentRoleListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_role_list_data_item import IncidentRoleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_role_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_role_list.additional_properties = d diff --git a/rootly_sdk/models/incident_role_list_data_item.py b/rootly_sdk/models/incident_role_list_data_item.py index 3a519dc9..8f057241 100644 --- a/rootly_sdk/models/incident_role_list_data_item.py +++ b/rootly_sdk/models/incident_role_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_role_list_data_item_type import ( - IncidentRoleListDataItemType, - check_incident_role_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_role_list_data_item_type import check_incident_role_list_data_item_type +from ..models.incident_role_list_data_item_type import IncidentRoleListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_role import IncidentRole @@ -33,6 +34,8 @@ class IncidentRoleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_role import IncidentRole + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_role_response.py b/rootly_sdk/models/incident_role_response.py index 7f00bd6d..8a0a0bd4 100644 --- a/rootly_sdk/models/incident_role_response.py +++ b/rootly_sdk/models/incident_role_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_role_response_data import IncidentRoleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentRoleResponse") @@ -18,14 +24,26 @@ class IncidentRoleResponse: """ Attributes: data (IncidentRoleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentRoleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_role_response_data import IncidentRoleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_role_response_data import IncidentRoleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentRoleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_role_response = cls( data=data, + included=included, ) incident_role_response.additional_properties = d diff --git a/rootly_sdk/models/incident_role_response_data.py b/rootly_sdk/models/incident_role_response_data.py index b6a7a41d..48d5137b 100644 --- a/rootly_sdk/models/incident_role_response_data.py +++ b/rootly_sdk/models/incident_role_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_role_response_data_type import ( - IncidentRoleResponseDataType, - check_incident_role_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_role_response_data_type import check_incident_role_response_data_type +from ..models.incident_role_response_data_type import IncidentRoleResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_role import IncidentRole @@ -33,6 +34,8 @@ class IncidentRoleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_role import IncidentRole + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_role_task.py b/rootly_sdk/models/incident_role_task.py index 5d7c3c97..673440a4 100644 --- a/rootly_sdk/models/incident_role_task.py +++ b/rootly_sdk/models/incident_role_task.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_role_task_priority import IncidentRoleTaskPriority, check_incident_role_task_priority from ..types import UNSET, Unset +from ..models.incident_role_task_priority import check_incident_role_task_priority +from ..models.incident_role_task_priority import IncidentRoleTaskPriority +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentRoleTask") diff --git a/rootly_sdk/models/incident_role_task_list.py b/rootly_sdk/models/incident_role_task_list.py index 3911239e..6674403d 100644 --- a/rootly_sdk/models/incident_role_task_list.py +++ b/rootly_sdk/models/incident_role_task_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_role_task_list_data_item import IncidentRoleTaskListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentRoleTaskList: data (list[IncidentRoleTaskListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentRoleTaskListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.incident_role_task_list_data_item import IncidentRoleTaskListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_role_task_list_data_item import IncidentRoleTaskListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_role_task_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_role_task_list.additional_properties = d 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 f9a55f68..76b1c57d 100644 --- a/rootly_sdk/models/incident_role_task_list_data_item.py +++ b/rootly_sdk/models/incident_role_task_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_role_task_list_data_item_type import ( - IncidentRoleTaskListDataItemType, - check_incident_role_task_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_role_task_list_data_item_type import check_incident_role_task_list_data_item_type +from ..models.incident_role_task_list_data_item_type import IncidentRoleTaskListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_role_task import IncidentRoleTask @@ -33,6 +34,8 @@ class IncidentRoleTaskListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_role_task import IncidentRoleTask + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_role_task_response.py b/rootly_sdk/models/incident_role_task_response.py index 06830b79..b1c714f7 100644 --- a/rootly_sdk/models/incident_role_task_response.py +++ b/rootly_sdk/models/incident_role_task_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_role_task_response_data import IncidentRoleTaskResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentRoleTaskResponse") @@ -18,14 +24,26 @@ class IncidentRoleTaskResponse: """ Attributes: data (IncidentRoleTaskResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentRoleTaskResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_role_task_response_data import IncidentRoleTaskResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_role_task_response_data import IncidentRoleTaskResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentRoleTaskResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_role_task_response = cls( data=data, + included=included, ) incident_role_task_response.additional_properties = d diff --git a/rootly_sdk/models/incident_role_task_response_data.py b/rootly_sdk/models/incident_role_task_response_data.py index 04f49ff4..aafc4384 100644 --- a/rootly_sdk/models/incident_role_task_response_data.py +++ b/rootly_sdk/models/incident_role_task_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_role_task_response_data_type import ( - IncidentRoleTaskResponseDataType, - check_incident_role_task_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_role_task_response_data_type import check_incident_role_task_response_data_type +from ..models.incident_role_task_response_data_type import IncidentRoleTaskResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_role_task import IncidentRoleTask @@ -33,6 +34,8 @@ class IncidentRoleTaskResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_role_task import IncidentRoleTask + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_started_by_type_0.py b/rootly_sdk/models/incident_started_by_type_0.py index 241e922c..ef08e0d7 100644 --- a/rootly_sdk/models/incident_started_by_type_0.py +++ b/rootly_sdk/models/incident_started_by_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentStartedByType0") diff --git a/rootly_sdk/models/incident_status_page_event.py b/rootly_sdk/models/incident_status_page_event.py index 77bff120..4b402d6f 100644 --- a/rootly_sdk/models/incident_status_page_event.py +++ b/rootly_sdk/models/incident_status_page_event.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_status_page_event_status import ( - IncidentStatusPageEventStatus, - check_incident_status_page_event_status, -) from ..types import UNSET, Unset +from ..models.incident_status_page_event_status import check_incident_status_page_event_status +from ..models.incident_status_page_event_status import IncidentStatusPageEventStatus +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentStatusPageEvent") diff --git a/rootly_sdk/models/incident_status_page_event_list.py b/rootly_sdk/models/incident_status_page_event_list.py index 81f6df05..3367efd2 100644 --- a/rootly_sdk/models/incident_status_page_event_list.py +++ b/rootly_sdk/models/incident_status_page_event_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_status_page_event_list_data_item import IncidentStatusPageEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentStatusPageEventList: data (list[IncidentStatusPageEventListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentStatusPageEventListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.incident_status_page_event_list_data_item import IncidentStatusPageEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_status_page_event_list_data_item import IncidentStatusPageEventListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_status_page_event_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_status_page_event_list.additional_properties = d 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 18ef50a2..10c84ca0 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,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_status_page_event_list_data_item_type import ( - IncidentStatusPageEventListDataItemType, - check_incident_status_page_event_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_status_page_event_list_data_item_type import check_incident_status_page_event_list_data_item_type +from ..models.incident_status_page_event_list_data_item_type import IncidentStatusPageEventListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_status_page_event import IncidentStatusPageEvent @@ -33,6 +34,8 @@ class IncidentStatusPageEventListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_status_page_event import IncidentStatusPageEvent + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_status_page_event_response.py b/rootly_sdk/models/incident_status_page_event_response.py index 271b772d..891c0ea3 100644 --- a/rootly_sdk/models/incident_status_page_event_response.py +++ b/rootly_sdk/models/incident_status_page_event_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_status_page_event_response_data import IncidentStatusPageEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentStatusPageEventResponse") @@ -18,14 +24,26 @@ class IncidentStatusPageEventResponse: """ Attributes: data (IncidentStatusPageEventResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentStatusPageEventResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_status_page_event_response_data import IncidentStatusPageEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_status_page_event_response_data import IncidentStatusPageEventResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentStatusPageEventResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_status_page_event_response = cls( data=data, + included=included, ) incident_status_page_event_response.additional_properties = d 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 7310f9cb..1f6792cb 100644 --- a/rootly_sdk/models/incident_status_page_event_response_data.py +++ b/rootly_sdk/models/incident_status_page_event_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_status_page_event_response_data_type import ( - IncidentStatusPageEventResponseDataType, - check_incident_status_page_event_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_status_page_event_response_data_type import check_incident_status_page_event_response_data_type +from ..models.incident_status_page_event_response_data_type import IncidentStatusPageEventResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_status_page_event import IncidentStatusPageEvent @@ -33,6 +34,8 @@ class IncidentStatusPageEventResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_status_page_event import IncidentStatusPageEvent + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_sub_status.py b/rootly_sdk/models/incident_sub_status.py index 5fa71a29..e0b26959 100644 --- a/rootly_sdk/models/incident_sub_status.py +++ b/rootly_sdk/models/incident_sub_status.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="IncidentSubStatus") diff --git a/rootly_sdk/models/incident_sub_status_list.py b/rootly_sdk/models/incident_sub_status_list.py index 0bb5d1a5..b3cfbf4f 100644 --- a/rootly_sdk/models/incident_sub_status_list.py +++ b/rootly_sdk/models/incident_sub_status_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_sub_status_list_data_item import IncidentSubStatusListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentSubStatusList: data (list[IncidentSubStatusListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentSubStatusListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.links import Links + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.incident_sub_status_list_data_item import IncidentSubStatusListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_sub_status_list_data_item import IncidentSubStatusListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_sub_status_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_sub_status_list.additional_properties = d 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 d008330e..3059747b 100644 --- a/rootly_sdk/models/incident_sub_status_list_data_item.py +++ b/rootly_sdk/models/incident_sub_status_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_sub_status_list_data_item_type import ( - IncidentSubStatusListDataItemType, - check_incident_sub_status_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_sub_status_list_data_item_type import check_incident_sub_status_list_data_item_type +from ..models.incident_sub_status_list_data_item_type import IncidentSubStatusListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_sub_status import IncidentSubStatus @@ -33,6 +34,8 @@ class IncidentSubStatusListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_sub_status import IncidentSubStatus + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_sub_status_response.py b/rootly_sdk/models/incident_sub_status_response.py index 6856f8e2..b66f9025 100644 --- a/rootly_sdk/models/incident_sub_status_response.py +++ b/rootly_sdk/models/incident_sub_status_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_sub_status_response_data import IncidentSubStatusResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentSubStatusResponse") @@ -18,14 +24,26 @@ class IncidentSubStatusResponse: """ Attributes: data (IncidentSubStatusResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentSubStatusResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_sub_status_response_data import IncidentSubStatusResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_sub_status_response_data import IncidentSubStatusResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentSubStatusResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_sub_status_response = cls( data=data, + included=included, ) incident_sub_status_response.additional_properties = d diff --git a/rootly_sdk/models/incident_sub_status_response_data.py b/rootly_sdk/models/incident_sub_status_response_data.py index 2ed85e51..3557f524 100644 --- a/rootly_sdk/models/incident_sub_status_response_data.py +++ b/rootly_sdk/models/incident_sub_status_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_sub_status_response_data_type import ( - IncidentSubStatusResponseDataType, - check_incident_sub_status_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_sub_status_response_data_type import check_incident_sub_status_response_data_type +from ..models.incident_sub_status_response_data_type import IncidentSubStatusResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_sub_status import IncidentSubStatus @@ -33,6 +34,8 @@ class IncidentSubStatusResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_sub_status import IncidentSubStatus + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_trigger_params.py b/rootly_sdk/models/incident_trigger_params.py index 003abd73..ed2e832e 100644 --- a/rootly_sdk/models/incident_trigger_params.py +++ b/rootly_sdk/models/incident_trigger_params.py @@ -1,108 +1,134 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_trigger_params_incident_condition import ( - IncidentTriggerParamsIncidentCondition, - check_incident_trigger_params_incident_condition, +from ..types import UNSET, Unset + +from ..models.incident_trigger_params_incident_condition import check_incident_trigger_params_incident_condition +from ..models.incident_trigger_params_incident_condition import IncidentTriggerParamsIncidentCondition +from ..models.incident_trigger_params_incident_condition_acknowledged_at import ( + check_incident_trigger_params_incident_condition_acknowledged_at, ) -from ..models.incident_trigger_params_incident_condition_acknowledged_at_type_1 import ( - IncidentTriggerParamsIncidentConditionAcknowledgedAtType1, - check_incident_trigger_params_incident_condition_acknowledged_at_type_1, +from ..models.incident_trigger_params_incident_condition_acknowledged_at import ( + IncidentTriggerParamsIncidentConditionAcknowledgedAt, ) from ..models.incident_trigger_params_incident_condition_cause import ( - IncidentTriggerParamsIncidentConditionCause, check_incident_trigger_params_incident_condition_cause, ) -from ..models.incident_trigger_params_incident_condition_detected_at_type_1 import ( - IncidentTriggerParamsIncidentConditionDetectedAtType1, - check_incident_trigger_params_incident_condition_detected_at_type_1, +from ..models.incident_trigger_params_incident_condition_cause import IncidentTriggerParamsIncidentConditionCause +from ..models.incident_trigger_params_incident_condition_detected_at import ( + check_incident_trigger_params_incident_condition_detected_at, +) +from ..models.incident_trigger_params_incident_condition_detected_at import ( + IncidentTriggerParamsIncidentConditionDetectedAt, ) from ..models.incident_trigger_params_incident_condition_environment import ( - IncidentTriggerParamsIncidentConditionEnvironment, check_incident_trigger_params_incident_condition_environment, ) +from ..models.incident_trigger_params_incident_condition_environment import ( + IncidentTriggerParamsIncidentConditionEnvironment, +) from ..models.incident_trigger_params_incident_condition_functionality import ( - IncidentTriggerParamsIncidentConditionFunctionality, check_incident_trigger_params_incident_condition_functionality, ) +from ..models.incident_trigger_params_incident_condition_functionality import ( + IncidentTriggerParamsIncidentConditionFunctionality, +) from ..models.incident_trigger_params_incident_condition_group import ( - IncidentTriggerParamsIncidentConditionGroup, check_incident_trigger_params_incident_condition_group, ) +from ..models.incident_trigger_params_incident_condition_group import IncidentTriggerParamsIncidentConditionGroup from ..models.incident_trigger_params_incident_condition_incident_roles import ( - IncidentTriggerParamsIncidentConditionIncidentRoles, check_incident_trigger_params_incident_condition_incident_roles, ) +from ..models.incident_trigger_params_incident_condition_incident_roles import ( + IncidentTriggerParamsIncidentConditionIncidentRoles, +) from ..models.incident_trigger_params_incident_condition_incident_type import ( - IncidentTriggerParamsIncidentConditionIncidentType, check_incident_trigger_params_incident_condition_incident_type, ) +from ..models.incident_trigger_params_incident_condition_incident_type import ( + IncidentTriggerParamsIncidentConditionIncidentType, +) from ..models.incident_trigger_params_incident_condition_kind import ( - IncidentTriggerParamsIncidentConditionKind, check_incident_trigger_params_incident_condition_kind, ) -from ..models.incident_trigger_params_incident_condition_mitigated_at_type_1 import ( - IncidentTriggerParamsIncidentConditionMitigatedAtType1, - check_incident_trigger_params_incident_condition_mitigated_at_type_1, +from ..models.incident_trigger_params_incident_condition_kind import IncidentTriggerParamsIncidentConditionKind +from ..models.incident_trigger_params_incident_condition_label import ( + check_incident_trigger_params_incident_condition_label, +) +from ..models.incident_trigger_params_incident_condition_label import IncidentTriggerParamsIncidentConditionLabel +from ..models.incident_trigger_params_incident_condition_mitigated_at import ( + check_incident_trigger_params_incident_condition_mitigated_at, +) +from ..models.incident_trigger_params_incident_condition_mitigated_at import ( + IncidentTriggerParamsIncidentConditionMitigatedAt, ) -from ..models.incident_trigger_params_incident_condition_resolved_at_type_1 import ( - IncidentTriggerParamsIncidentConditionResolvedAtType1, - check_incident_trigger_params_incident_condition_resolved_at_type_1, +from ..models.incident_trigger_params_incident_condition_resolved_at import ( + check_incident_trigger_params_incident_condition_resolved_at, +) +from ..models.incident_trigger_params_incident_condition_resolved_at import ( + IncidentTriggerParamsIncidentConditionResolvedAt, ) from ..models.incident_trigger_params_incident_condition_service import ( - IncidentTriggerParamsIncidentConditionService, check_incident_trigger_params_incident_condition_service, ) +from ..models.incident_trigger_params_incident_condition_service import IncidentTriggerParamsIncidentConditionService from ..models.incident_trigger_params_incident_condition_severity import ( - IncidentTriggerParamsIncidentConditionSeverity, check_incident_trigger_params_incident_condition_severity, ) -from ..models.incident_trigger_params_incident_condition_started_at_type_1 import ( - IncidentTriggerParamsIncidentConditionStartedAtType1, - check_incident_trigger_params_incident_condition_started_at_type_1, +from ..models.incident_trigger_params_incident_condition_severity import IncidentTriggerParamsIncidentConditionSeverity +from ..models.incident_trigger_params_incident_condition_started_at import ( + check_incident_trigger_params_incident_condition_started_at, +) +from ..models.incident_trigger_params_incident_condition_started_at import ( + IncidentTriggerParamsIncidentConditionStartedAt, ) from ..models.incident_trigger_params_incident_condition_status import ( - IncidentTriggerParamsIncidentConditionStatus, check_incident_trigger_params_incident_condition_status, ) +from ..models.incident_trigger_params_incident_condition_status import IncidentTriggerParamsIncidentConditionStatus from ..models.incident_trigger_params_incident_condition_sub_status import ( - IncidentTriggerParamsIncidentConditionSubStatus, check_incident_trigger_params_incident_condition_sub_status, ) -from ..models.incident_trigger_params_incident_condition_summary_type_1 import ( - IncidentTriggerParamsIncidentConditionSummaryType1, - check_incident_trigger_params_incident_condition_summary_type_1, +from ..models.incident_trigger_params_incident_condition_sub_status import ( + IncidentTriggerParamsIncidentConditionSubStatus, +) +from ..models.incident_trigger_params_incident_condition_summary import ( + check_incident_trigger_params_incident_condition_summary, ) +from ..models.incident_trigger_params_incident_condition_summary import IncidentTriggerParamsIncidentConditionSummary from ..models.incident_trigger_params_incident_condition_visibility import ( - IncidentTriggerParamsIncidentConditionVisibility, check_incident_trigger_params_incident_condition_visibility, ) -from ..models.incident_trigger_params_incident_conditional_inactivity_type_1 import ( - IncidentTriggerParamsIncidentConditionalInactivityType1, - check_incident_trigger_params_incident_conditional_inactivity_type_1, +from ..models.incident_trigger_params_incident_condition_visibility import ( + IncidentTriggerParamsIncidentConditionVisibility, +) +from ..models.incident_trigger_params_incident_conditional_inactivity import ( + check_incident_trigger_params_incident_conditional_inactivity, ) -from ..models.incident_trigger_params_incident_kinds_item import ( - IncidentTriggerParamsIncidentKindsItem, - check_incident_trigger_params_incident_kinds_item, +from ..models.incident_trigger_params_incident_conditional_inactivity import ( + IncidentTriggerParamsIncidentConditionalInactivity, ) +from ..models.incident_trigger_params_incident_kinds_item import check_incident_trigger_params_incident_kinds_item +from ..models.incident_trigger_params_incident_kinds_item import IncidentTriggerParamsIncidentKindsItem from ..models.incident_trigger_params_incident_post_mortem_condition_cause import ( - IncidentTriggerParamsIncidentPostMortemConditionCause, check_incident_trigger_params_incident_post_mortem_condition_cause, ) -from ..models.incident_trigger_params_incident_statuses_item import ( - IncidentTriggerParamsIncidentStatusesItem, - check_incident_trigger_params_incident_statuses_item, -) -from ..models.incident_trigger_params_trigger_type import ( - IncidentTriggerParamsTriggerType, - check_incident_trigger_params_trigger_type, +from ..models.incident_trigger_params_incident_post_mortem_condition_cause import ( + IncidentTriggerParamsIncidentPostMortemConditionCause, ) +from ..models.incident_trigger_params_incident_statuses_item import check_incident_trigger_params_incident_statuses_item +from ..models.incident_trigger_params_incident_statuses_item import IncidentTriggerParamsIncidentStatusesItem +from ..models.incident_trigger_params_trigger_type import check_incident_trigger_params_trigger_type +from ..models.incident_trigger_params_trigger_type import IncidentTriggerParamsTriggerType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="IncidentTriggerParams") @@ -116,7 +142,7 @@ class IncidentTriggerParams: incident_visibilities (list[bool] | Unset): incident_kinds (list[IncidentTriggerParamsIncidentKindsItem] | Unset): incident_statuses (list[IncidentTriggerParamsIncidentStatusesItem] | Unset): - incident_inactivity_duration (None | str | Unset): + incident_inactivity_duration (None | str | Unset): ex. 10 min, 1h, 3 days, 2 weeks incident_condition (IncidentTriggerParamsIncidentCondition | Unset): Default: 'ALL'. incident_condition_visibility (IncidentTriggerParamsIncidentConditionVisibility | Unset): Default: 'ANY'. incident_condition_kind (IncidentTriggerParamsIncidentConditionKind | Unset): Default: 'IS'. @@ -131,15 +157,18 @@ class IncidentTriggerParams: incident_condition_functionality (IncidentTriggerParamsIncidentConditionFunctionality | Unset): Default: 'ANY'. incident_condition_group (IncidentTriggerParamsIncidentConditionGroup | Unset): Default: 'ANY'. incident_condition_cause (IncidentTriggerParamsIncidentConditionCause | Unset): Default: 'ANY'. + incident_condition_label (IncidentTriggerParamsIncidentConditionLabel | Unset): Default: 'ANY'. + incident_condition_label_use_regexp (bool | Unset): Default: False. + incident_labels (list[str] | Unset): incident_post_mortem_condition_cause (IncidentTriggerParamsIncidentPostMortemConditionCause | Unset): [DEPRECATED] Use incident_condition_cause instead Default: 'ANY'. - 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): + incident_condition_summary (IncidentTriggerParamsIncidentConditionSummary | Unset): + incident_condition_started_at (IncidentTriggerParamsIncidentConditionStartedAt | Unset): + incident_condition_detected_at (IncidentTriggerParamsIncidentConditionDetectedAt | Unset): + incident_condition_acknowledged_at (IncidentTriggerParamsIncidentConditionAcknowledgedAt | Unset): + incident_condition_mitigated_at (IncidentTriggerParamsIncidentConditionMitigatedAt | Unset): + incident_condition_resolved_at (IncidentTriggerParamsIncidentConditionResolvedAt | Unset): + incident_conditional_inactivity (IncidentTriggerParamsIncidentConditionalInactivity | Unset): """ trigger_type: IncidentTriggerParamsTriggerType @@ -161,14 +190,17 @@ class IncidentTriggerParams: incident_condition_functionality: IncidentTriggerParamsIncidentConditionFunctionality | Unset = "ANY" incident_condition_group: IncidentTriggerParamsIncidentConditionGroup | Unset = "ANY" incident_condition_cause: IncidentTriggerParamsIncidentConditionCause | Unset = "ANY" + incident_condition_label: IncidentTriggerParamsIncidentConditionLabel | Unset = "ANY" + incident_condition_label_use_regexp: bool | Unset = False + incident_labels: list[str] | Unset = UNSET 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 - incident_condition_acknowledged_at: IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset = UNSET - incident_condition_mitigated_at: IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset = UNSET - incident_condition_resolved_at: IncidentTriggerParamsIncidentConditionResolvedAtType1 | None | Unset = UNSET - incident_conditional_inactivity: IncidentTriggerParamsIncidentConditionalInactivityType1 | None | Unset = UNSET + incident_condition_summary: IncidentTriggerParamsIncidentConditionSummary | Unset = UNSET + incident_condition_started_at: IncidentTriggerParamsIncidentConditionStartedAt | Unset = UNSET + incident_condition_detected_at: IncidentTriggerParamsIncidentConditionDetectedAt | Unset = UNSET + incident_condition_acknowledged_at: IncidentTriggerParamsIncidentConditionAcknowledgedAt | Unset = UNSET + incident_condition_mitigated_at: IncidentTriggerParamsIncidentConditionMitigatedAt | Unset = UNSET + incident_condition_resolved_at: IncidentTriggerParamsIncidentConditionResolvedAt | Unset = UNSET + incident_conditional_inactivity: IncidentTriggerParamsIncidentConditionalInactivity | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -254,64 +286,46 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.incident_condition_cause, Unset): incident_condition_cause = self.incident_condition_cause + incident_condition_label: str | Unset = UNSET + if not isinstance(self.incident_condition_label, Unset): + incident_condition_label = self.incident_condition_label + + incident_condition_label_use_regexp = self.incident_condition_label_use_regexp + + incident_labels: list[str] | Unset = UNSET + if not isinstance(self.incident_labels, Unset): + incident_labels = self.incident_labels + 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 | str | Unset - if isinstance(self.incident_condition_summary, Unset): - incident_condition_summary = UNSET - elif isinstance(self.incident_condition_summary, str): - incident_condition_summary = self.incident_condition_summary - else: + incident_condition_summary: str | Unset = UNSET + if not isinstance(self.incident_condition_summary, Unset): incident_condition_summary = self.incident_condition_summary - 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): - incident_condition_started_at = self.incident_condition_started_at - else: + incident_condition_started_at: str | Unset = UNSET + if not isinstance(self.incident_condition_started_at, Unset): incident_condition_started_at = self.incident_condition_started_at - 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): - incident_condition_detected_at = self.incident_condition_detected_at - else: + incident_condition_detected_at: str | Unset = UNSET + if not isinstance(self.incident_condition_detected_at, Unset): incident_condition_detected_at = self.incident_condition_detected_at - 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): - incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - else: + incident_condition_acknowledged_at: str | Unset = UNSET + if not isinstance(self.incident_condition_acknowledged_at, Unset): incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - 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): - incident_condition_mitigated_at = self.incident_condition_mitigated_at - else: + incident_condition_mitigated_at: str | Unset = UNSET + if not isinstance(self.incident_condition_mitigated_at, Unset): incident_condition_mitigated_at = self.incident_condition_mitigated_at - 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): - incident_condition_resolved_at = self.incident_condition_resolved_at - else: + incident_condition_resolved_at: str | Unset = UNSET + if not isinstance(self.incident_condition_resolved_at, Unset): incident_condition_resolved_at = self.incident_condition_resolved_at - incident_conditional_inactivity: None | str | Unset - if isinstance(self.incident_conditional_inactivity, Unset): - incident_conditional_inactivity = UNSET - elif isinstance(self.incident_conditional_inactivity, str): - incident_conditional_inactivity = self.incident_conditional_inactivity - else: + incident_conditional_inactivity: str | Unset = UNSET + if not isinstance(self.incident_conditional_inactivity, Unset): incident_conditional_inactivity = self.incident_conditional_inactivity field_dict: dict[str, Any] = {} @@ -357,6 +371,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_condition_group"] = incident_condition_group if incident_condition_cause is not UNSET: field_dict["incident_condition_cause"] = incident_condition_cause + if incident_condition_label is not UNSET: + field_dict["incident_condition_label"] = incident_condition_label + if incident_condition_label_use_regexp is not UNSET: + field_dict["incident_condition_label_use_regexp"] = incident_condition_label_use_regexp + if incident_labels is not UNSET: + field_dict["incident_labels"] = incident_labels if incident_post_mortem_condition_cause is not UNSET: field_dict["incident_post_mortem_condition_cause"] = incident_post_mortem_condition_cause if incident_condition_summary is not UNSET: @@ -523,6 +543,17 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: else: incident_condition_cause = check_incident_trigger_params_incident_condition_cause(_incident_condition_cause) + _incident_condition_label = d.pop("incident_condition_label", UNSET) + incident_condition_label: IncidentTriggerParamsIncidentConditionLabel | Unset + if isinstance(_incident_condition_label, Unset): + incident_condition_label = UNSET + else: + incident_condition_label = check_incident_trigger_params_incident_condition_label(_incident_condition_label) + + incident_condition_label_use_regexp = d.pop("incident_condition_label_use_regexp", UNSET) + + incident_labels = cast(list[str], d.pop("incident_labels", UNSET)) + _incident_post_mortem_condition_cause = d.pop("incident_post_mortem_condition_cause", UNSET) incident_post_mortem_condition_cause: IncidentTriggerParamsIncidentPostMortemConditionCause | Unset if isinstance(_incident_post_mortem_condition_cause, Unset): @@ -532,164 +563,68 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: _incident_post_mortem_condition_cause ) - def _parse_incident_condition_summary( - data: object, - ) -> IncidentTriggerParamsIncidentConditionSummaryType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_summary_type_1 = check_incident_trigger_params_incident_condition_summary_type_1( - data - ) - - return incident_condition_summary_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionSummaryType1 | None | Unset, data) - - incident_condition_summary = _parse_incident_condition_summary(d.pop("incident_condition_summary", UNSET)) - - def _parse_incident_condition_started_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionStartedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_started_at_type_1 = ( - check_incident_trigger_params_incident_condition_started_at_type_1(data) - ) - - return incident_condition_started_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionStartedAtType1 | None | Unset, data) - - incident_condition_started_at = _parse_incident_condition_started_at( - d.pop("incident_condition_started_at", UNSET) - ) - - def _parse_incident_condition_detected_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionDetectedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_detected_at_type_1 = ( - check_incident_trigger_params_incident_condition_detected_at_type_1(data) - ) - - return incident_condition_detected_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionDetectedAtType1 | None | Unset, data) - - incident_condition_detected_at = _parse_incident_condition_detected_at( - d.pop("incident_condition_detected_at", UNSET) - ) - - def _parse_incident_condition_acknowledged_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_acknowledged_at_type_1 = ( - check_incident_trigger_params_incident_condition_acknowledged_at_type_1(data) - ) - - return incident_condition_acknowledged_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None | Unset, data) - - incident_condition_acknowledged_at = _parse_incident_condition_acknowledged_at( - d.pop("incident_condition_acknowledged_at", UNSET) - ) - - def _parse_incident_condition_mitigated_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_mitigated_at_type_1 = ( - check_incident_trigger_params_incident_condition_mitigated_at_type_1(data) - ) - - return incident_condition_mitigated_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None | Unset, data) - - incident_condition_mitigated_at = _parse_incident_condition_mitigated_at( - d.pop("incident_condition_mitigated_at", UNSET) - ) + _incident_condition_summary = d.pop("incident_condition_summary", UNSET) + incident_condition_summary: IncidentTriggerParamsIncidentConditionSummary | Unset + if isinstance(_incident_condition_summary, Unset): + incident_condition_summary = UNSET + else: + incident_condition_summary = check_incident_trigger_params_incident_condition_summary( + _incident_condition_summary + ) - def _parse_incident_condition_resolved_at( - data: object, - ) -> IncidentTriggerParamsIncidentConditionResolvedAtType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_resolved_at_type_1 = ( - check_incident_trigger_params_incident_condition_resolved_at_type_1(data) - ) + _incident_condition_started_at = d.pop("incident_condition_started_at", UNSET) + incident_condition_started_at: IncidentTriggerParamsIncidentConditionStartedAt | Unset + if isinstance(_incident_condition_started_at, Unset): + incident_condition_started_at = UNSET + else: + incident_condition_started_at = check_incident_trigger_params_incident_condition_started_at( + _incident_condition_started_at + ) - return incident_condition_resolved_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionResolvedAtType1 | None | Unset, data) + _incident_condition_detected_at = d.pop("incident_condition_detected_at", UNSET) + incident_condition_detected_at: IncidentTriggerParamsIncidentConditionDetectedAt | Unset + if isinstance(_incident_condition_detected_at, Unset): + incident_condition_detected_at = UNSET + else: + incident_condition_detected_at = check_incident_trigger_params_incident_condition_detected_at( + _incident_condition_detected_at + ) - incident_condition_resolved_at = _parse_incident_condition_resolved_at( - d.pop("incident_condition_resolved_at", UNSET) - ) + _incident_condition_acknowledged_at = d.pop("incident_condition_acknowledged_at", UNSET) + incident_condition_acknowledged_at: IncidentTriggerParamsIncidentConditionAcknowledgedAt | Unset + if isinstance(_incident_condition_acknowledged_at, Unset): + incident_condition_acknowledged_at = UNSET + else: + incident_condition_acknowledged_at = check_incident_trigger_params_incident_condition_acknowledged_at( + _incident_condition_acknowledged_at + ) - def _parse_incident_conditional_inactivity( - data: object, - ) -> IncidentTriggerParamsIncidentConditionalInactivityType1 | None | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_conditional_inactivity_type_1 = ( - check_incident_trigger_params_incident_conditional_inactivity_type_1(data) - ) + _incident_condition_mitigated_at = d.pop("incident_condition_mitigated_at", UNSET) + incident_condition_mitigated_at: IncidentTriggerParamsIncidentConditionMitigatedAt | Unset + if isinstance(_incident_condition_mitigated_at, Unset): + incident_condition_mitigated_at = UNSET + else: + incident_condition_mitigated_at = check_incident_trigger_params_incident_condition_mitigated_at( + _incident_condition_mitigated_at + ) - return incident_conditional_inactivity_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(IncidentTriggerParamsIncidentConditionalInactivityType1 | None | Unset, data) + _incident_condition_resolved_at = d.pop("incident_condition_resolved_at", UNSET) + incident_condition_resolved_at: IncidentTriggerParamsIncidentConditionResolvedAt | Unset + if isinstance(_incident_condition_resolved_at, Unset): + incident_condition_resolved_at = UNSET + else: + incident_condition_resolved_at = check_incident_trigger_params_incident_condition_resolved_at( + _incident_condition_resolved_at + ) - incident_conditional_inactivity = _parse_incident_conditional_inactivity( - d.pop("incident_conditional_inactivity", UNSET) - ) + _incident_conditional_inactivity = d.pop("incident_conditional_inactivity", UNSET) + incident_conditional_inactivity: IncidentTriggerParamsIncidentConditionalInactivity | Unset + if isinstance(_incident_conditional_inactivity, Unset): + incident_conditional_inactivity = UNSET + else: + incident_conditional_inactivity = check_incident_trigger_params_incident_conditional_inactivity( + _incident_conditional_inactivity + ) incident_trigger_params = cls( trigger_type=trigger_type, @@ -711,6 +646,9 @@ def _parse_incident_conditional_inactivity( incident_condition_functionality=incident_condition_functionality, incident_condition_group=incident_condition_group, incident_condition_cause=incident_condition_cause, + incident_condition_label=incident_condition_label, + incident_condition_label_use_regexp=incident_condition_label_use_regexp, + incident_labels=incident_labels, incident_post_mortem_condition_cause=incident_post_mortem_condition_cause, incident_condition_summary=incident_condition_summary, incident_condition_started_at=incident_condition_started_at, diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at.py b/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at.py new file mode 100644 index 00000000..68d83d81 --- /dev/null +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +IncidentTriggerParamsIncidentConditionAcknowledgedAt = Literal["SET", "UNSET"] + +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: set[ + IncidentTriggerParamsIncidentConditionAcknowledgedAt +] = { + "SET", + "UNSET", +} + + +def check_incident_trigger_params_incident_condition_acknowledged_at( + value: str | None, +) -> IncidentTriggerParamsIncidentConditionAcknowledgedAt | None: + if value is None: + return None + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionAcknowledgedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at_type_1.py deleted file mode 100644 index 87c71b8a..00000000 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_acknowledged_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 = Literal["SET", "UNSET"] - -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_incident_trigger_params_incident_condition_acknowledged_at_type_1( - value: str | None, -) -> IncidentTriggerParamsIncidentConditionAcknowledgedAtType1 | None: - if value is None: - return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionAcknowledgedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_detected_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_detected_at.py similarity index 50% rename from rootly_sdk/models/incident_trigger_params_incident_condition_detected_at_type_1.py rename to rootly_sdk/models/incident_trigger_params_incident_condition_detected_at.py index 43c2fd3a..69645f09 100644 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_detected_at_type_1.py +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_detected_at.py @@ -1,22 +1,20 @@ from typing import Literal, cast -IncidentTriggerParamsIncidentConditionDetectedAtType1 = Literal["SET", "UNSET"] +IncidentTriggerParamsIncidentConditionDetectedAt = Literal["SET", "UNSET"] -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionDetectedAtType1 -] = { +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: set[IncidentTriggerParamsIncidentConditionDetectedAt] = { "SET", "UNSET", } -def check_incident_trigger_params_incident_condition_detected_at_type_1( +def check_incident_trigger_params_incident_condition_detected_at( value: str | None, -) -> IncidentTriggerParamsIncidentConditionDetectedAtType1 | None: +) -> IncidentTriggerParamsIncidentConditionDetectedAt | None: if value is None: return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionDetectedAtType1, value) + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionDetectedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_label.py b/rootly_sdk/models/incident_trigger_params_incident_condition_label.py new file mode 100644 index 00000000..7f2f1c13 --- /dev/null +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_label.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +IncidentTriggerParamsIncidentConditionLabel = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: set[IncidentTriggerParamsIncidentConditionLabel] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_incident_trigger_params_incident_condition_label( + value: str | None, +) -> IncidentTriggerParamsIncidentConditionLabel | None: + if value is None: + return None + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: + return cast(IncidentTriggerParamsIncidentConditionLabel, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES!r}" + ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at.py similarity index 50% rename from rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at_type_1.py rename to rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at.py index 369b81e4..bd798922 100644 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at_type_1.py +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_mitigated_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -IncidentTriggerParamsIncidentConditionMitigatedAtType1 = Literal["SET", "UNSET"] +IncidentTriggerParamsIncidentConditionMitigatedAt = Literal["SET", "UNSET"] -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionMitigatedAtType1 +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: set[ + IncidentTriggerParamsIncidentConditionMitigatedAt ] = { "SET", "UNSET", } -def check_incident_trigger_params_incident_condition_mitigated_at_type_1( +def check_incident_trigger_params_incident_condition_mitigated_at( value: str | None, -) -> IncidentTriggerParamsIncidentConditionMitigatedAtType1 | None: +) -> IncidentTriggerParamsIncidentConditionMitigatedAt | None: if value is None: return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionMitigatedAtType1, value) + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionMitigatedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at.py similarity index 50% rename from rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at_type_1.py rename to rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at.py index cc8ce6f7..a53536db 100644 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at_type_1.py +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_resolved_at.py @@ -1,22 +1,20 @@ from typing import Literal, cast -IncidentTriggerParamsIncidentConditionResolvedAtType1 = Literal["SET", "UNSET"] +IncidentTriggerParamsIncidentConditionResolvedAt = Literal["SET", "UNSET"] -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionResolvedAtType1 -] = { +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: set[IncidentTriggerParamsIncidentConditionResolvedAt] = { "SET", "UNSET", } -def check_incident_trigger_params_incident_condition_resolved_at_type_1( +def check_incident_trigger_params_incident_condition_resolved_at( value: str | None, -) -> IncidentTriggerParamsIncidentConditionResolvedAtType1 | None: +) -> IncidentTriggerParamsIncidentConditionResolvedAt | None: if value is None: return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionResolvedAtType1, value) + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionResolvedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_started_at.py b/rootly_sdk/models/incident_trigger_params_incident_condition_started_at.py new file mode 100644 index 00000000..b54da9c5 --- /dev/null +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_started_at.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +IncidentTriggerParamsIncidentConditionStartedAt = Literal["SET", "UNSET"] + +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: set[IncidentTriggerParamsIncidentConditionStartedAt] = { + "SET", + "UNSET", +} + + +def check_incident_trigger_params_incident_condition_started_at( + value: str | None, +) -> IncidentTriggerParamsIncidentConditionStartedAt | None: + if value is None: + return None + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: + return cast(IncidentTriggerParamsIncidentConditionStartedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_started_at_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_started_at_type_1.py deleted file mode 100644 index 6b680522..00000000 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_started_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -IncidentTriggerParamsIncidentConditionStartedAtType1 = Literal["SET", "UNSET"] - -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionStartedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_incident_trigger_params_incident_condition_started_at_type_1( - value: str | None, -) -> IncidentTriggerParamsIncidentConditionStartedAtType1 | None: - if value is None: - return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionStartedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_summary.py b/rootly_sdk/models/incident_trigger_params_incident_condition_summary.py new file mode 100644 index 00000000..59059de1 --- /dev/null +++ b/rootly_sdk/models/incident_trigger_params_incident_condition_summary.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +IncidentTriggerParamsIncidentConditionSummary = Literal["SET", "UNSET"] + +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: set[IncidentTriggerParamsIncidentConditionSummary] = { + "SET", + "UNSET", +} + + +def check_incident_trigger_params_incident_condition_summary( + value: str | None, +) -> IncidentTriggerParamsIncidentConditionSummary | None: + if value is None: + return None + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: + return cast(IncidentTriggerParamsIncidentConditionSummary, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES!r}" + ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_condition_summary_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_condition_summary_type_1.py deleted file mode 100644 index 847088c7..00000000 --- a/rootly_sdk/models/incident_trigger_params_incident_condition_summary_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -IncidentTriggerParamsIncidentConditionSummaryType1 = Literal["SET", "UNSET"] - -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionSummaryType1 -] = { - "SET", - "UNSET", -} - - -def check_incident_trigger_params_incident_condition_summary_type_1( - value: str | None, -) -> IncidentTriggerParamsIncidentConditionSummaryType1 | None: - if value is None: - return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionSummaryType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity_type_1.py b/rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity.py similarity index 50% rename from rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity_type_1.py rename to rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity.py index 668dfb88..561aff65 100644 --- a/rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity_type_1.py +++ b/rootly_sdk/models/incident_trigger_params_incident_conditional_inactivity.py @@ -1,21 +1,21 @@ from typing import Literal, cast -IncidentTriggerParamsIncidentConditionalInactivityType1 = Literal["IS"] +IncidentTriggerParamsIncidentConditionalInactivity = Literal["IS"] -INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: set[ - IncidentTriggerParamsIncidentConditionalInactivityType1 +INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: set[ + IncidentTriggerParamsIncidentConditionalInactivity ] = { "IS", } -def check_incident_trigger_params_incident_conditional_inactivity_type_1( +def check_incident_trigger_params_incident_conditional_inactivity( value: str | None, -) -> IncidentTriggerParamsIncidentConditionalInactivityType1 | None: +) -> IncidentTriggerParamsIncidentConditionalInactivity | None: if value is None: return None - if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: - return cast(IncidentTriggerParamsIncidentConditionalInactivityType1, value) + if value in INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: + return cast(IncidentTriggerParamsIncidentConditionalInactivity, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {INCIDENT_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES!r}" ) diff --git a/rootly_sdk/models/incident_type.py b/rootly_sdk/models/incident_type.py index a467d2f2..32343550 100644 --- a/rootly_sdk/models/incident_type.py +++ b/rootly_sdk/models/incident_type.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_type_properties_item import IncidentTypePropertiesItem from ..models.incident_type_slack_aliases_type_0_item import IncidentTypeSlackAliasesType0Item @@ -50,6 +53,10 @@ class IncidentType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_type_slack_channels_type_0_item import IncidentTypeSlackChannelsType0Item + from ..models.incident_type_properties_item import IncidentTypePropertiesItem + from ..models.incident_type_slack_aliases_type_0_item import IncidentTypeSlackAliasesType0Item + name = self.name created_at = self.created_at diff --git a/rootly_sdk/models/incident_type_list.py b/rootly_sdk/models/incident_type_list.py index 9e9c5c8c..95963a91 100644 --- a/rootly_sdk/models/incident_type_list.py +++ b/rootly_sdk/models/incident_type_list.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_type_list_data_item import IncidentTypeListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -22,14 +28,21 @@ class IncidentTypeList: data (list[IncidentTypeListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[IncidentTypeListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.incident_type_list_data_item import IncidentTypeListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,12 +68,15 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_type_list_data_item import IncidentTypeListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_type_list = cls( data=data, links=links, meta=meta, + included=included, ) incident_type_list.additional_properties = d diff --git a/rootly_sdk/models/incident_type_list_data_item.py b/rootly_sdk/models/incident_type_list_data_item.py index 3f11a9a3..426d6f52 100644 --- a/rootly_sdk/models/incident_type_list_data_item.py +++ b/rootly_sdk/models/incident_type_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_type_list_data_item_type import ( - IncidentTypeListDataItemType, - check_incident_type_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.incident_type_list_data_item_type import check_incident_type_list_data_item_type +from ..models.incident_type_list_data_item_type import IncidentTypeListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.incident_type import IncidentType @@ -33,6 +34,8 @@ class IncidentTypeListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_type import IncidentType + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/incident_type_properties_item.py b/rootly_sdk/models/incident_type_properties_item.py index 5bcab317..b7bc0429 100644 --- a/rootly_sdk/models/incident_type_properties_item.py +++ b/rootly_sdk/models/incident_type_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentTypePropertiesItem") diff --git a/rootly_sdk/models/incident_type_response.py b/rootly_sdk/models/incident_type_response.py index 4ce5945a..e5345de8 100644 --- a/rootly_sdk/models/incident_type_response.py +++ b/rootly_sdk/models/incident_type_response.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.incident_type_response_data import IncidentTypeResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource T = TypeVar("T", bound="IncidentTypeResponse") @@ -18,14 +24,26 @@ class IncidentTypeResponse: """ Attributes: data (IncidentTypeResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: IncidentTypeResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_type_response_data import IncidentTypeResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.incident_type_response_data import IncidentTypeResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource d = dict(src_dict) data = IncidentTypeResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + incident_type_response = cls( data=data, + included=included, ) incident_type_response.additional_properties = d diff --git a/rootly_sdk/models/incident_type_response_data.py b/rootly_sdk/models/incident_type_response_data.py index 022302b0..eb07ef19 100644 --- a/rootly_sdk/models/incident_type_response_data.py +++ b/rootly_sdk/models/incident_type_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.incident_type_response_data_type import ( - IncidentTypeResponseDataType, - check_incident_type_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.incident_type_response_data_type import check_incident_type_response_data_type +from ..models.incident_type_response_data_type import IncidentTypeResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.incident_type import IncidentType @@ -33,6 +34,8 @@ class IncidentTypeResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incident_type import IncidentType + id = self.id type_: str = self.type_ 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 e60d5ce2..035c0361 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentTypeSlackAliasesType0Item") 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 b579c633..d096eae3 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentTypeSlackChannelsType0Item") diff --git a/rootly_sdk/models/incident_user_type_0.py b/rootly_sdk/models/incident_user_type_0.py index dce50314..2a80d969 100644 --- a/rootly_sdk/models/incident_user_type_0.py +++ b/rootly_sdk/models/incident_user_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentUserType0") 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 index 3bfaac57..e22fa440 100644 --- 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 @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="IncidentZoomMeetingGlobalDialInNumbersType0Item") diff --git a/rootly_sdk/models/incidents_chart_response.py b/rootly_sdk/models/incidents_chart_response.py index df356900..db20baba 100644 --- a/rootly_sdk/models/incidents_chart_response.py +++ b/rootly_sdk/models/incidents_chart_response.py @@ -1,31 +1,57 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.incidents_chart_response_data import IncidentsChartResponseData + + T = TypeVar("T", bound="IncidentsChartResponse") @_attrs_define class IncidentsChartResponse: - """ """ + """ + Attributes: + data (IncidentsChartResponseData): + """ + data: IncidentsChartResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.incidents_chart_response_data import IncidentsChartResponseData + + 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.incidents_chart_response_data import IncidentsChartResponseData + d = dict(src_dict) - incidents_chart_response = cls() + data = IncidentsChartResponseData.from_dict(d.pop("data")) + + incidents_chart_response = cls( + data=data, + ) incidents_chart_response.additional_properties = d return incidents_chart_response diff --git a/rootly_sdk/models/incidents_chart_response_data.py b/rootly_sdk/models/incidents_chart_response_data.py new file mode 100644 index 00000000..0265af92 --- /dev/null +++ b/rootly_sdk/models/incidents_chart_response_data.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="IncidentsChartResponseData") + + +@_attrs_define +class IncidentsChartResponseData: + """ """ + + 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) + incidents_chart_response_data = cls() + + incidents_chart_response_data.additional_properties = d + return incidents_chart_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/invite_to_google_chat_space_task_params.py b/rootly_sdk/models/invite_to_google_chat_space_task_params.py new file mode 100644 index 00000000..eb2a0590 --- /dev/null +++ b/rootly_sdk/models/invite_to_google_chat_space_task_params.py @@ -0,0 +1,102 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.invite_to_google_chat_space_task_params_task_type import ( + check_invite_to_google_chat_space_task_params_task_type, +) +from ..models.invite_to_google_chat_space_task_params_task_type import InviteToGoogleChatSpaceTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.invite_to_google_chat_space_task_params_space import InviteToGoogleChatSpaceTaskParamsSpace + + +T = TypeVar("T", bound="InviteToGoogleChatSpaceTaskParams") + + +@_attrs_define +class InviteToGoogleChatSpaceTaskParams: + """ + Attributes: + space (InviteToGoogleChatSpaceTaskParamsSpace): + emails (str): Comma separated list of emails to invite + task_type (InviteToGoogleChatSpaceTaskParamsTaskType | Unset): + """ + + space: InviteToGoogleChatSpaceTaskParamsSpace + emails: str + task_type: InviteToGoogleChatSpaceTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.invite_to_google_chat_space_task_params_space import InviteToGoogleChatSpaceTaskParamsSpace + + space = self.space.to_dict() + + emails = self.emails + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "space": space, + "emails": emails, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.invite_to_google_chat_space_task_params_space import InviteToGoogleChatSpaceTaskParamsSpace + + d = dict(src_dict) + space = InviteToGoogleChatSpaceTaskParamsSpace.from_dict(d.pop("space")) + + emails = d.pop("emails") + + _task_type = d.pop("task_type", UNSET) + task_type: InviteToGoogleChatSpaceTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_invite_to_google_chat_space_task_params_task_type(_task_type) + + invite_to_google_chat_space_task_params = cls( + space=space, + emails=emails, + task_type=task_type, + ) + + invite_to_google_chat_space_task_params.additional_properties = d + return invite_to_google_chat_space_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/invite_to_google_chat_space_task_params_space.py b/rootly_sdk/models/invite_to_google_chat_space_task_params_space.py new file mode 100644 index 00000000..f5f70c84 --- /dev/null +++ b/rootly_sdk/models/invite_to_google_chat_space_task_params_space.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToGoogleChatSpaceTaskParamsSpace") + + +@_attrs_define +class InviteToGoogleChatSpaceTaskParamsSpace: + """ + 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) + + invite_to_google_chat_space_task_params_space = cls( + id=id, + name=name, + ) + + invite_to_google_chat_space_task_params_space.additional_properties = d + return invite_to_google_chat_space_task_params_space + + @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/invite_to_google_chat_space_task_params_task_type.py b/rootly_sdk/models/invite_to_google_chat_space_task_params_task_type.py new file mode 100644 index 00000000..8c0ddf59 --- /dev/null +++ b/rootly_sdk/models/invite_to_google_chat_space_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +InviteToGoogleChatSpaceTaskParamsTaskType = Literal["invite_to_google_chat_space"] + +INVITE_TO_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: set[InviteToGoogleChatSpaceTaskParamsTaskType] = { + "invite_to_google_chat_space", +} + + +def check_invite_to_google_chat_space_task_params_task_type( + value: str | None, +) -> InviteToGoogleChatSpaceTaskParamsTaskType | None: + if value is None: + return None + if value in INVITE_TO_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(InviteToGoogleChatSpaceTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INVITE_TO_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py new file mode 100644 index 00000000..7b5ae4e7 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py @@ -0,0 +1,246 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.invite_to_microsoft_teams_channel_rootly_task_params_task_type import ( + check_invite_to_microsoft_teams_channel_rootly_task_params_task_type, +) +from ..models.invite_to_microsoft_teams_channel_rootly_task_params_task_type import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType, +) +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_channel import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_group_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_schedule_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_service_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_team import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_user_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget, + ) + + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParams") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParams: + """ + Attributes: + team (InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam): + channel (InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel): + task_type (InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType | Unset): + escalation_policy_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget | Unset): + service_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget | Unset): + user_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget | Unset): + group_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget | Unset): + schedule_target (InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget | Unset): + """ + + team: InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam + channel: InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel + task_type: InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType | Unset = UNSET + escalation_policy_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget | Unset = UNSET + service_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget | Unset = UNSET + user_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget | Unset = UNSET + group_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget | Unset = UNSET + schedule_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_team import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_group_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_channel import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_service_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_user_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_schedule_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget, + ) + + team = self.team.to_dict() + + channel = self.channel.to_dict() + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + 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: dict[str, Any] | Unset = UNSET + if not isinstance(self.service_target, Unset): + service_target = self.service_target.to_dict() + + user_target: dict[str, Any] | Unset = UNSET + if not isinstance(self.user_target, Unset): + user_target = self.user_target.to_dict() + + group_target: dict[str, Any] | Unset = UNSET + if not isinstance(self.group_target, Unset): + group_target = self.group_target.to_dict() + + schedule_target: dict[str, Any] | Unset = UNSET + if not isinstance(self.schedule_target, Unset): + schedule_target = self.schedule_target.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "team": team, + "channel": channel, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if escalation_policy_target is not UNSET: + field_dict["escalation_policy_target"] = escalation_policy_target + if service_target is not UNSET: + field_dict["service_target"] = service_target + if user_target is not UNSET: + field_dict["user_target"] = user_target + if group_target is not UNSET: + field_dict["group_target"] = group_target + if schedule_target is not UNSET: + field_dict["schedule_target"] = schedule_target + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_channel import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_group_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_schedule_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_service_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_team import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam, + ) + from ..models.invite_to_microsoft_teams_channel_rootly_task_params_user_target import ( + InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget, + ) + + d = dict(src_dict) + team = InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam.from_dict(d.pop("team")) + + channel = InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel.from_dict(d.pop("channel")) + + _task_type = d.pop("task_type", UNSET) + task_type: InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_invite_to_microsoft_teams_channel_rootly_task_params_task_type(_task_type) + + _escalation_policy_target = d.pop("escalation_policy_target", UNSET) + escalation_policy_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget | Unset + if isinstance(_escalation_policy_target, Unset): + escalation_policy_target = UNSET + else: + escalation_policy_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget.from_dict( + _escalation_policy_target + ) + + _service_target = d.pop("service_target", UNSET) + service_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget | Unset + if isinstance(_service_target, Unset): + service_target = UNSET + else: + service_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget.from_dict(_service_target) + + _user_target = d.pop("user_target", UNSET) + user_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget | Unset + if isinstance(_user_target, Unset): + user_target = UNSET + else: + user_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget.from_dict(_user_target) + + _group_target = d.pop("group_target", UNSET) + group_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget | Unset + if isinstance(_group_target, Unset): + group_target = UNSET + else: + group_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget.from_dict(_group_target) + + _schedule_target = d.pop("schedule_target", UNSET) + schedule_target: InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget | Unset + if isinstance(_schedule_target, Unset): + schedule_target = UNSET + else: + schedule_target = InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget.from_dict(_schedule_target) + + invite_to_microsoft_teams_channel_rootly_task_params = cls( + team=team, + channel=channel, + task_type=task_type, + escalation_policy_target=escalation_policy_target, + service_target=service_target, + user_target=user_target, + group_target=group_target, + schedule_target=schedule_target, + ) + + invite_to_microsoft_teams_channel_rootly_task_params.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_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/invite_to_microsoft_teams_channel_rootly_task_params_channel.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py new file mode 100644 index 00000000..9cde426a --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel: + """ + 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) + + invite_to_microsoft_teams_channel_rootly_task_params_channel = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_channel.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_channel + + @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/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py new file mode 100644 index 00000000..6ab59701 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget: + """ + 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) + + invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_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/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py new file mode 100644 index 00000000..f26c4624 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget: + """ + 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) + + invite_to_microsoft_teams_channel_rootly_task_params_group_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_group_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_group_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/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py new file mode 100644 index 00000000..eb8cfa26 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget: + """ + 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) + + invite_to_microsoft_teams_channel_rootly_task_params_schedule_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_schedule_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/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py new file mode 100644 index 00000000..f9148073 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget: + """ + 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) + + invite_to_microsoft_teams_channel_rootly_task_params_service_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_service_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_service_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/invite_to_microsoft_teams_channel_rootly_task_params_task_type.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_task_type.py new file mode 100644 index 00000000..b84a5230 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_task_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType = Literal["invite_to_microsoft_teams_channel_rootly"] + +INVITE_TO_MICROSOFT_TEAMS_CHANNEL_ROOTLY_TASK_PARAMS_TASK_TYPE_VALUES: set[ + InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType +] = { + "invite_to_microsoft_teams_channel_rootly", +} + + +def check_invite_to_microsoft_teams_channel_rootly_task_params_task_type( + value: str | None, +) -> InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType | None: + if value is None: + return None + if value in INVITE_TO_MICROSOFT_TEAMS_CHANNEL_ROOTLY_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {INVITE_TO_MICROSOFT_TEAMS_CHANNEL_ROOTLY_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py new file mode 100644 index 00000000..8cdf37bc --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam: + """ + 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) + + invite_to_microsoft_teams_channel_rootly_task_params_team = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_team.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_team + + @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/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py new file mode 100644 index 00000000..92f1fa62 --- /dev/null +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget") + + +@_attrs_define +class InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget: + """ + 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) + + invite_to_microsoft_teams_channel_rootly_task_params_user_target = cls( + id=id, + name=name, + ) + + invite_to_microsoft_teams_channel_rootly_task_params_user_target.additional_properties = d + return invite_to_microsoft_teams_channel_rootly_task_params_user_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/invite_to_microsoft_teams_channel_task_params.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_task_params.py index c9e9c3fa..958642e0 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.invite_to_microsoft_teams_channel_task_params_task_type import ( - InviteToMicrosoftTeamsChannelTaskParamsTaskType, check_invite_to_microsoft_teams_channel_task_params_task_type, ) +from ..models.invite_to_microsoft_teams_channel_task_params_task_type import ( + InviteToMicrosoftTeamsChannelTaskParamsTaskType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.invite_to_microsoft_teams_channel_task_params_channel import ( @@ -39,6 +44,13 @@ class InviteToMicrosoftTeamsChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.invite_to_microsoft_teams_channel_task_params_team import ( + InviteToMicrosoftTeamsChannelTaskParamsTeam, + ) + from ..models.invite_to_microsoft_teams_channel_task_params_channel import ( + InviteToMicrosoftTeamsChannelTaskParamsChannel, + ) + channel = self.channel.to_dict() emails = self.emails 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 08fe1c78..d534b741 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelTaskParamsChannel") 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 8e6139f7..6713c658 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelTaskParamsTeam") 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 7e1b9b24..75b8fd65 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.invite_to_slack_channel_opsgenie_task_params_task_type import ( - InviteToSlackChannelOpsgenieTaskParamsTaskType, check_invite_to_slack_channel_opsgenie_task_params_task_type, ) +from ..models.invite_to_slack_channel_opsgenie_task_params_task_type import ( + InviteToSlackChannelOpsgenieTaskParamsTaskType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.invite_to_slack_channel_opsgenie_task_params_channels_item import ( @@ -39,6 +44,13 @@ class InviteToSlackChannelOpsgenieTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.invite_to_slack_channel_opsgenie_task_params_schedule import ( + InviteToSlackChannelOpsgenieTaskParamsSchedule, + ) + from ..models.invite_to_slack_channel_opsgenie_task_params_channels_item import ( + InviteToSlackChannelOpsgenieTaskParamsChannelsItem, + ) + channels = [] for channels_item_data in self.channels: channels_item = channels_item_data.to_dict() 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 203b4beb..2568cf64 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelOpsgenieTaskParamsChannelsItem") 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 395e06bf..a2006009 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelOpsgenieTaskParamsSchedule") diff --git a/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py new file mode 100644 index 00000000..2d773026 --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToSlackChannelPagerdutyTaskParamsType0EscalationPolicy") + + +@_attrs_define +class InviteToSlackChannelPagerdutyTaskParamsType0EscalationPolicy: + """ + 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) + + invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy = cls( + id=id, + name=name, + ) + + invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.additional_properties = d + return invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy + + @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/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py new file mode 100644 index 00000000..41fb73e4 --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToSlackChannelPagerdutyTaskParamsType1Schedule") + + +@_attrs_define +class InviteToSlackChannelPagerdutyTaskParamsType1Schedule: + """ + 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) + + invite_to_slack_channel_pagerduty_task_params_type_1_schedule = cls( + id=id, + name=name, + ) + + invite_to_slack_channel_pagerduty_task_params_type_1_schedule.additional_properties = d + return invite_to_slack_channel_pagerduty_task_params_type_1_schedule + + @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/invite_to_slack_channel_rootly_task_params.py b/rootly_sdk/models/invite_to_slack_channel_rootly_task_params.py index 591cb3c9..c3ecad1c 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,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.invite_to_slack_channel_rootly_task_params_task_type import ( - InviteToSlackChannelRootlyTaskParamsTaskType, check_invite_to_slack_channel_rootly_task_params_task_type, ) +from ..models.invite_to_slack_channel_rootly_task_params_task_type import InviteToSlackChannelRootlyTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.invite_to_slack_channel_rootly_task_params_channels_item import ( @@ -59,6 +62,25 @@ class InviteToSlackChannelRootlyTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.invite_to_slack_channel_rootly_task_params_user_target import ( + InviteToSlackChannelRootlyTaskParamsUserTarget, + ) + from ..models.invite_to_slack_channel_rootly_task_params_service_target import ( + InviteToSlackChannelRootlyTaskParamsServiceTarget, + ) + from ..models.invite_to_slack_channel_rootly_task_params_escalation_policy_target import ( + InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget, + ) + from ..models.invite_to_slack_channel_rootly_task_params_group_target import ( + InviteToSlackChannelRootlyTaskParamsGroupTarget, + ) + from ..models.invite_to_slack_channel_rootly_task_params_schedule_target import ( + InviteToSlackChannelRootlyTaskParamsScheduleTarget, + ) + from ..models.invite_to_slack_channel_rootly_task_params_channels_item import ( + InviteToSlackChannelRootlyTaskParamsChannelsItem, + ) + channels = [] for channels_item_data in self.channels: channels_item = channels_item_data.to_dict() 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 dc0a4aeb..ba16e026 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsChannelsItem") 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 c1ec962e..59fd0916 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget") 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 ddd9bad8..a043e6ac 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsGroupTarget") 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 66307c41..809250d0 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsScheduleTarget") 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 93a0ddb1..1e160014 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsServiceTarget") 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 6ba36eae..ca4c25d9 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsUserTarget") diff --git a/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py b/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py new file mode 100644 index 00000000..6c745b76 --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToSlackChannelTaskParamsType0SlackUsersItem") + + +@_attrs_define +class InviteToSlackChannelTaskParamsType0SlackUsersItem: + """ + 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) + + invite_to_slack_channel_task_params_type_0_slack_users_item = cls( + id=id, + name=name, + ) + + invite_to_slack_channel_task_params_type_0_slack_users_item.additional_properties = d + return invite_to_slack_channel_task_params_type_0_slack_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/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py b/rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py new file mode 100644 index 00000000..912c2291 --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToSlackChannelTaskParamsType1SlackUserGroupsItem") + + +@_attrs_define +class InviteToSlackChannelTaskParamsType1SlackUserGroupsItem: + """ + 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) + + invite_to_slack_channel_task_params_type_1_slack_user_groups_item = cls( + id=id, + name=name, + ) + + invite_to_slack_channel_task_params_type_1_slack_user_groups_item.additional_properties = d + return invite_to_slack_channel_task_params_type_1_slack_user_groups_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/invite_to_slack_channel_task_params_type_2.py b/rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py new file mode 100644 index 00000000..d909c902 --- /dev/null +++ b/rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py @@ -0,0 +1,64 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="InviteToSlackChannelTaskParamsType2") + + +@_attrs_define +class InviteToSlackChannelTaskParamsType2: + """ + Attributes: + slack_emails (str): + """ + + slack_emails: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + slack_emails = self.slack_emails + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "slack_emails": slack_emails, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + slack_emails = d.pop("slack_emails") + + invite_to_slack_channel_task_params_type_2 = cls( + slack_emails=slack_emails, + ) + + invite_to_slack_channel_task_params_type_2.additional_properties = d + return invite_to_slack_channel_task_params_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/invite_to_slack_channel_victor_ops_task_params.py b/rootly_sdk/models/invite_to_slack_channel_victor_ops_task_params.py index 53822b1d..fa10efdd 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.invite_to_slack_channel_victor_ops_task_params_task_type import ( - InviteToSlackChannelVictorOpsTaskParamsTaskType, check_invite_to_slack_channel_victor_ops_task_params_task_type, ) +from ..models.invite_to_slack_channel_victor_ops_task_params_task_type import ( + InviteToSlackChannelVictorOpsTaskParamsTaskType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.invite_to_slack_channel_victor_ops_task_params_channels_item import ( @@ -37,6 +42,13 @@ class InviteToSlackChannelVictorOpsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.invite_to_slack_channel_victor_ops_task_params_team import ( + InviteToSlackChannelVictorOpsTaskParamsTeam, + ) + from ..models.invite_to_slack_channel_victor_ops_task_params_channels_item import ( + InviteToSlackChannelVictorOpsTaskParamsChannelsItem, + ) + channels = [] for channels_item_data in self.channels: channels_item = channels_item_data.to_dict() 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 bb0cad1b..34442f9e 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelVictorOpsTaskParamsChannelsItem") 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 b00e5aa4..5b2f7b1f 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="InviteToSlackChannelVictorOpsTaskParamsTeam") diff --git a/rootly_sdk/models/ip_ranges.py b/rootly_sdk/models/ip_ranges.py index f959ae26..dad7d465 100644 --- a/rootly_sdk/models/ip_ranges.py +++ b/rootly_sdk/models/ip_ranges.py @@ -1,11 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + + T = TypeVar("T", bound="IpRanges") diff --git a/rootly_sdk/models/ip_ranges_response.py b/rootly_sdk/models/ip_ranges_response.py index b38ca535..4fdb056c 100644 --- a/rootly_sdk/models/ip_ranges_response.py +++ b/rootly_sdk/models/ip_ranges_response.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.ip_ranges_response_data import IpRangesResponseData @@ -24,6 +28,8 @@ class IpRangesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.ip_ranges_response_data import IpRangesResponseData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/ip_ranges_response_data.py b/rootly_sdk/models/ip_ranges_response_data.py index 3c0ea6ff..8c09d27f 100644 --- a/rootly_sdk/models/ip_ranges_response_data.py +++ b/rootly_sdk/models/ip_ranges_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.ip_ranges_response_data_type import IpRangesResponseDataType, check_ip_ranges_response_data_type +from ..types import UNSET, Unset + +from ..models.ip_ranges_response_data_type import check_ip_ranges_response_data_type +from ..models.ip_ranges_response_data_type import IpRangesResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.ip_ranges import IpRanges @@ -30,6 +34,8 @@ class IpRangesResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.ip_ranges import IpRanges + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/jsonapi_included_resource.py b/rootly_sdk/models/jsonapi_included_resource.py new file mode 100644 index 00000000..e18fcf19 --- /dev/null +++ b/rootly_sdk/models/jsonapi_included_resource.py @@ -0,0 +1,117 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource_attributes import JsonapiIncludedResourceAttributes + from ..models.jsonapi_included_resource_relationships import JsonapiIncludedResourceRelationships + + +T = TypeVar("T", bound="JsonapiIncludedResource") + + +@_attrs_define +class JsonapiIncludedResource: + """ + Attributes: + id (str): + type_ (str): + attributes (JsonapiIncludedResourceAttributes | Unset): + relationships (JsonapiIncludedResourceRelationships | Unset): + """ + + id: str + type_: str + attributes: JsonapiIncludedResourceAttributes | Unset = UNSET + relationships: JsonapiIncludedResourceRelationships | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource_attributes import JsonapiIncludedResourceAttributes + from ..models.jsonapi_included_resource_relationships import JsonapiIncludedResourceRelationships + + id = self.id + + type_ = self.type_ + + attributes: dict[str, Any] | Unset = UNSET + if not isinstance(self.attributes, Unset): + attributes = self.attributes.to_dict() + + relationships: dict[str, Any] | Unset = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + } + ) + if attributes is not UNSET: + field_dict["attributes"] = attributes + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource_attributes import JsonapiIncludedResourceAttributes + from ..models.jsonapi_included_resource_relationships import JsonapiIncludedResourceRelationships + + d = dict(src_dict) + id = d.pop("id") + + type_ = d.pop("type") + + _attributes = d.pop("attributes", UNSET) + attributes: JsonapiIncludedResourceAttributes | Unset + if isinstance(_attributes, Unset): + attributes = UNSET + else: + attributes = JsonapiIncludedResourceAttributes.from_dict(_attributes) + + _relationships = d.pop("relationships", UNSET) + relationships: JsonapiIncludedResourceRelationships | Unset + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = JsonapiIncludedResourceRelationships.from_dict(_relationships) + + jsonapi_included_resource = cls( + id=id, + type_=type_, + attributes=attributes, + relationships=relationships, + ) + + jsonapi_included_resource.additional_properties = d + return jsonapi_included_resource + + @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/jsonapi_included_resource_attributes.py b/rootly_sdk/models/jsonapi_included_resource_attributes.py new file mode 100644 index 00000000..5868f3b3 --- /dev/null +++ b/rootly_sdk/models/jsonapi_included_resource_attributes.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="JsonapiIncludedResourceAttributes") + + +@_attrs_define +class JsonapiIncludedResourceAttributes: + """ """ + + 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) + jsonapi_included_resource_attributes = cls() + + jsonapi_included_resource_attributes.additional_properties = d + return jsonapi_included_resource_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/jsonapi_included_resource_relationships.py b/rootly_sdk/models/jsonapi_included_resource_relationships.py new file mode 100644 index 00000000..58097847 --- /dev/null +++ b/rootly_sdk/models/jsonapi_included_resource_relationships.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="JsonapiIncludedResourceRelationships") + + +@_attrs_define +class JsonapiIncludedResourceRelationships: + """ """ + + 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) + jsonapi_included_resource_relationships = cls() + + jsonapi_included_resource_relationships.additional_properties = d + return jsonapi_included_resource_relationships + + @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/links.py b/rootly_sdk/models/links.py index 48bcff63..04d6f508 100644 --- a/rootly_sdk/models/links.py +++ b/rootly_sdk/models/links.py @@ -1,11 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + + T = TypeVar("T", bound="Links") diff --git a/rootly_sdk/models/list_alert_events_feed_filteraction.py b/rootly_sdk/models/list_alert_events_feed_filteraction.py new file mode 100644 index 00000000..3fdfb294 --- /dev/null +++ b/rootly_sdk/models/list_alert_events_feed_filteraction.py @@ -0,0 +1,77 @@ +from typing import Literal, cast + +ListAlertEventsFeedFilteraction = Literal[ + "acknowledged", + "added", + "answered", + "attached", + "call_lifecycle", + "called", + "created", + "deferred", + "emailed", + "escalated", + "escalation_policy_paged", + "google_chat_messaged", + "ignored_alert_request", + "level_skipped", + "marked", + "ms_teams_messaged", + "muted", + "not_marked", + "notified", + "open", + "opened", + "paged", + "removed", + "resolved", + "retriggered", + "skipped", + "slacked", + "snoozed", + "texted", + "triggered", + "updated", +] + +LIST_ALERT_EVENTS_FEED_FILTERACTION_VALUES: set[ListAlertEventsFeedFilteraction] = { + "acknowledged", + "added", + "answered", + "attached", + "call_lifecycle", + "called", + "created", + "deferred", + "emailed", + "escalated", + "escalation_policy_paged", + "google_chat_messaged", + "ignored_alert_request", + "level_skipped", + "marked", + "ms_teams_messaged", + "muted", + "not_marked", + "notified", + "open", + "opened", + "paged", + "removed", + "resolved", + "retriggered", + "skipped", + "slacked", + "snoozed", + "texted", + "triggered", + "updated", +} + + +def check_list_alert_events_feed_filteraction(value: str | None) -> ListAlertEventsFeedFilteraction | None: + if value is None: + return None + if value in LIST_ALERT_EVENTS_FEED_FILTERACTION_VALUES: + return cast(ListAlertEventsFeedFilteraction, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ALERT_EVENTS_FEED_FILTERACTION_VALUES!r}") diff --git a/rootly_sdk/models/list_alert_events_feed_filterkind.py b/rootly_sdk/models/list_alert_events_feed_filterkind.py new file mode 100644 index 00000000..511c5438 --- /dev/null +++ b/rootly_sdk/models/list_alert_events_feed_filterkind.py @@ -0,0 +1,39 @@ +from typing import Literal, cast + +ListAlertEventsFeedFilterkind = Literal[ + "action", + "alert_grouping", + "alert_routing", + "alert_urgency", + "deferral", + "informational", + "maintenance", + "noise", + "note", + "notification", + "recording", + "status_update", +] + +LIST_ALERT_EVENTS_FEED_FILTERKIND_VALUES: set[ListAlertEventsFeedFilterkind] = { + "action", + "alert_grouping", + "alert_routing", + "alert_urgency", + "deferral", + "informational", + "maintenance", + "noise", + "note", + "notification", + "recording", + "status_update", +} + + +def check_list_alert_events_feed_filterkind(value: str | None) -> ListAlertEventsFeedFilterkind | None: + if value is None: + return None + if value in LIST_ALERT_EVENTS_FEED_FILTERKIND_VALUES: + return cast(ListAlertEventsFeedFilterkind, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ALERT_EVENTS_FEED_FILTERKIND_VALUES!r}") diff --git a/rootly_sdk/models/list_alert_events_feed_sort.py b/rootly_sdk/models/list_alert_events_feed_sort.py new file mode 100644 index 00000000..f154e60c --- /dev/null +++ b/rootly_sdk/models/list_alert_events_feed_sort.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +ListAlertEventsFeedSort = Literal["-created_at", "created_at"] + +LIST_ALERT_EVENTS_FEED_SORT_VALUES: set[ListAlertEventsFeedSort] = { + "-created_at", + "created_at", +} + + +def check_list_alert_events_feed_sort(value: str | None) -> ListAlertEventsFeedSort | None: + if value is None: + return None + if value in LIST_ALERT_EVENTS_FEED_SORT_VALUES: + return cast(ListAlertEventsFeedSort, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ALERT_EVENTS_FEED_SORT_VALUES!r}") diff --git a/rootly_sdk/models/list_alerts_include.py b/rootly_sdk/models/list_alerts_include.py index b1c5e932..239b223d 100644 --- a/rootly_sdk/models/list_alerts_include.py +++ b/rootly_sdk/models/list_alerts_include.py @@ -9,12 +9,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", ] @@ -28,12 +30,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", } diff --git a/rootly_sdk/models/list_escalation_paths_filterpath_type.py b/rootly_sdk/models/list_escalation_paths_filterpath_type.py new file mode 100644 index 00000000..ecde9f6a --- /dev/null +++ b/rootly_sdk/models/list_escalation_paths_filterpath_type.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +ListEscalationPathsFilterpathType = Literal["deferral", "escalation"] + +LIST_ESCALATION_PATHS_FILTERPATH_TYPE_VALUES: set[ListEscalationPathsFilterpathType] = { + "deferral", + "escalation", +} + + +def check_list_escalation_paths_filterpath_type(value: str | None) -> ListEscalationPathsFilterpathType | None: + if value is None: + return None + if value in LIST_ESCALATION_PATHS_FILTERPATH_TYPE_VALUES: + return cast(ListEscalationPathsFilterpathType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {LIST_ESCALATION_PATHS_FILTERPATH_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/list_incident_alerts_include.py b/rootly_sdk/models/list_incident_alerts_include.py index a8448883..bc706824 100644 --- a/rootly_sdk/models/list_incident_alerts_include.py +++ b/rootly_sdk/models/list_incident_alerts_include.py @@ -9,12 +9,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", ] @@ -28,12 +30,14 @@ "environments", "escalation_policies", "events", + "functionalities", "group_leader_alert", "group_member_alerts", "groups", "heartbeat", "incidents", "live_call_router", + "notified_users", "responders", "services", } diff --git a/rootly_sdk/models/list_teams_include.py b/rootly_sdk/models/list_teams_include.py index 8c2db5ef..dd467bfa 100644 --- a/rootly_sdk/models/list_teams_include.py +++ b/rootly_sdk/models/list_teams_include.py @@ -1,8 +1,10 @@ from typing import Literal, cast -ListTeamsInclude = Literal["users"] +ListTeamsInclude = Literal["escalation_policies", "schedules", "users"] LIST_TEAMS_INCLUDE_VALUES: set[ListTeamsInclude] = { + "escalation_policies", + "schedules", "users", } diff --git a/rootly_sdk/models/live_call_router.py b/rootly_sdk/models/live_call_router.py index 99bf8142..c3aa2fff 100644 --- a/rootly_sdk/models/live_call_router.py +++ b/rootly_sdk/models/live_call_router.py @@ -1,20 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.live_call_router_country_code import LiveCallRouterCountryCode, check_live_call_router_country_code -from ..models.live_call_router_kind import LiveCallRouterKind, check_live_call_router_kind -from ..models.live_call_router_phone_type import LiveCallRouterPhoneType, check_live_call_router_phone_type -from ..models.live_call_router_waiting_music_url import ( - LiveCallRouterWaitingMusicUrl, - check_live_call_router_waiting_music_url, -) from ..types import UNSET, Unset +from ..models.live_call_router_country_code import check_live_call_router_country_code +from ..models.live_call_router_country_code import LiveCallRouterCountryCode +from ..models.live_call_router_kind import check_live_call_router_kind +from ..models.live_call_router_kind import LiveCallRouterKind +from ..models.live_call_router_phone_type import check_live_call_router_phone_type +from ..models.live_call_router_phone_type import LiveCallRouterPhoneType +from ..models.live_call_router_waiting_music_url import check_live_call_router_waiting_music_url +from ..models.live_call_router_waiting_music_url import LiveCallRouterWaitingMusicUrl +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.live_call_router_escalation_policy_trigger_params import LiveCallRouterEscalationPolicyTriggerParams from ..models.live_call_router_paging_targets_item import LiveCallRouterPagingTargetsItem @@ -39,12 +43,19 @@ class LiveCallRouter: to register 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 + unavailable_responder_message (None | str | Unset): The message played to the caller when a responder doesn't + answer and the call moves on to the next person in the escalation. Leave blank to use the default message. 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 + notify_via_sms (bool | Unset): Whether responders are also notified via SMS when this router pages them + notify_via_push_notification (bool | Unset): Whether responders are also notified via push notification when + this router pages them + informational_notification_message (None | str | Unset): Optional message included in the SMS/push notification. + Supports variables such as {{ alert.url }}, {{ alert.data.* }}, and {{ alert.alert_urgency.name }}. 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 @@ -63,11 +74,15 @@ class LiveCallRouter: phone_number: str | Unset = UNSET voicemail_greeting: str | Unset = UNSET caller_greeting: str | Unset = UNSET + unavailable_responder_message: None | 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 + notify_via_sms: bool | Unset = UNSET + notify_via_push_notification: bool | Unset = UNSET + informational_notification_message: None | str | Unset = UNSET alert_urgency_id: str | Unset = UNSET calling_tree_prompt: str | Unset = UNSET paging_targets: list[LiveCallRouterPagingTargetsItem] | Unset = UNSET @@ -75,6 +90,11 @@ class LiveCallRouter: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.live_call_router_paging_targets_item import LiveCallRouterPagingTargetsItem + from ..models.live_call_router_escalation_policy_trigger_params import ( + LiveCallRouterEscalationPolicyTriggerParams, + ) + name = self.name created_at = self.created_at @@ -101,6 +121,12 @@ def to_dict(self) -> dict[str, Any]: caller_greeting = self.caller_greeting + unavailable_responder_message: None | str | Unset + if isinstance(self.unavailable_responder_message, Unset): + unavailable_responder_message = UNSET + else: + unavailable_responder_message = self.unavailable_responder_message + waiting_music_url: str | Unset = UNSET if not isinstance(self.waiting_music_url, Unset): waiting_music_url = self.waiting_music_url @@ -113,6 +139,16 @@ def to_dict(self) -> dict[str, Any]: should_auto_resolve_alert_on_call_end = self.should_auto_resolve_alert_on_call_end + notify_via_sms = self.notify_via_sms + + notify_via_push_notification = self.notify_via_push_notification + + informational_notification_message: None | str | Unset + if isinstance(self.informational_notification_message, Unset): + informational_notification_message = UNSET + else: + informational_notification_message = self.informational_notification_message + alert_urgency_id = self.alert_urgency_id calling_tree_prompt = self.calling_tree_prompt @@ -151,6 +187,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["voicemail_greeting"] = voicemail_greeting if caller_greeting is not UNSET: field_dict["caller_greeting"] = caller_greeting + if unavailable_responder_message is not UNSET: + field_dict["unavailable_responder_message"] = unavailable_responder_message if waiting_music_url is not UNSET: field_dict["waiting_music_url"] = waiting_music_url if sent_to_voicemail_delay is not UNSET: @@ -161,6 +199,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["escalation_level_delay_in_seconds"] = escalation_level_delay_in_seconds if should_auto_resolve_alert_on_call_end is not UNSET: field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end + if notify_via_sms is not UNSET: + field_dict["notify_via_sms"] = notify_via_sms + if notify_via_push_notification is not UNSET: + field_dict["notify_via_push_notification"] = notify_via_push_notification + if informational_notification_message is not UNSET: + field_dict["informational_notification_message"] = informational_notification_message if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id if calling_tree_prompt is not UNSET: @@ -215,6 +259,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: caller_greeting = d.pop("caller_greeting", UNSET) + def _parse_unavailable_responder_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + unavailable_responder_message = _parse_unavailable_responder_message( + d.pop("unavailable_responder_message", UNSET) + ) + _waiting_music_url = d.pop("waiting_music_url", UNSET) waiting_music_url: LiveCallRouterWaitingMusicUrl | Unset if isinstance(_waiting_music_url, Unset): @@ -230,6 +285,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: should_auto_resolve_alert_on_call_end = d.pop("should_auto_resolve_alert_on_call_end", UNSET) + notify_via_sms = d.pop("notify_via_sms", UNSET) + + notify_via_push_notification = d.pop("notify_via_push_notification", UNSET) + + def _parse_informational_notification_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + informational_notification_message = _parse_informational_notification_message( + d.pop("informational_notification_message", UNSET) + ) + alert_urgency_id = d.pop("alert_urgency_id", UNSET) calling_tree_prompt = d.pop("calling_tree_prompt", UNSET) @@ -263,11 +333,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: phone_number=phone_number, voicemail_greeting=voicemail_greeting, caller_greeting=caller_greeting, + unavailable_responder_message=unavailable_responder_message, waiting_music_url=waiting_music_url, sent_to_voicemail_delay=sent_to_voicemail_delay, should_redirect_to_voicemail_on_no_answer=should_redirect_to_voicemail_on_no_answer, escalation_level_delay_in_seconds=escalation_level_delay_in_seconds, should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end, + notify_via_sms=notify_via_sms, + notify_via_push_notification=notify_via_push_notification, + informational_notification_message=informational_notification_message, alert_urgency_id=alert_urgency_id, calling_tree_prompt=calling_tree_prompt, paging_targets=paging_targets, diff --git a/rootly_sdk/models/live_call_router_country_code.py b/rootly_sdk/models/live_call_router_country_code.py index c9309c8f..3085b226 100644 --- a/rootly_sdk/models/live_call_router_country_code.py +++ b/rootly_sdk/models/live_call_router_country_code.py @@ -1,10 +1,11 @@ from typing import Literal, cast -LiveCallRouterCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] +LiveCallRouterCountryCode = Literal["AU", "CA", "CH", "DE", "GB", "NL", "NZ", "SE", "US"] LIVE_CALL_ROUTER_COUNTRY_CODE_VALUES: set[LiveCallRouterCountryCode] = { "AU", "CA", + "CH", "DE", "GB", "NL", 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 4963b65f..c9a97556 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.live_call_router_escalation_policy_trigger_params_type import ( - LiveCallRouterEscalationPolicyTriggerParamsType, check_live_call_router_escalation_policy_trigger_params_type, ) +from ..models.live_call_router_escalation_policy_trigger_params_type import ( + LiveCallRouterEscalationPolicyTriggerParamsType, +) +from typing import cast + T = TypeVar("T", bound="LiveCallRouterEscalationPolicyTriggerParams") diff --git a/rootly_sdk/models/live_call_router_list.py b/rootly_sdk/models/live_call_router_list.py index 1b74775b..35dab700 100644 --- a/rootly_sdk/models/live_call_router_list.py +++ b/rootly_sdk/models/live_call_router_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.live_call_router_list_data_item import LiveCallRouterListDataItem from ..models.meta import Meta @@ -22,14 +28,21 @@ class LiveCallRouterList: data (list[LiveCallRouterListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[LiveCallRouterListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.live_call_router_list_data_item import LiveCallRouterListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.live_call_router_list_data_item import LiveCallRouterListDataItem from ..models.meta import Meta @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + live_call_router_list = cls( data=data, links=links, meta=meta, + included=included, ) live_call_router_list.additional_properties = d 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 622c19a8..9d54d043 100644 --- a/rootly_sdk/models/live_call_router_list_data_item.py +++ b/rootly_sdk/models/live_call_router_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.live_call_router_list_data_item_type import ( - LiveCallRouterListDataItemType, - check_live_call_router_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.live_call_router_list_data_item_type import check_live_call_router_list_data_item_type +from ..models.live_call_router_list_data_item_type import LiveCallRouterListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.live_call_router import LiveCallRouter @@ -33,6 +34,8 @@ class LiveCallRouterListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.live_call_router import LiveCallRouter + id = self.id type_: str = self.type_ 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 33e6941c..85cd628e 100644 --- a/rootly_sdk/models/live_call_router_paging_targets_item.py +++ b/rootly_sdk/models/live_call_router_paging_targets_item.py @@ -1,15 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.live_call_router_paging_targets_item_type import ( - LiveCallRouterPagingTargetsItemType, - check_live_call_router_paging_targets_item_type, -) +from ..types import UNSET, Unset + +from ..models.live_call_router_paging_targets_item_type import check_live_call_router_paging_targets_item_type +from ..models.live_call_router_paging_targets_item_type import LiveCallRouterPagingTargetsItemType +from typing import cast + T = TypeVar("T", bound="LiveCallRouterPagingTargetsItem") diff --git a/rootly_sdk/models/live_call_router_response.py b/rootly_sdk/models/live_call_router_response.py index bcf58bdc..360a9a67 100644 --- a/rootly_sdk/models/live_call_router_response.py +++ b/rootly_sdk/models/live_call_router_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.live_call_router_response_data import LiveCallRouterResponseData @@ -18,14 +24,26 @@ class LiveCallRouterResponse: """ Attributes: data (LiveCallRouterResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: LiveCallRouterResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.live_call_router_response_data import LiveCallRouterResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.live_call_router_response_data import LiveCallRouterResponseData d = dict(src_dict) data = LiveCallRouterResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + live_call_router_response = cls( data=data, + included=included, ) live_call_router_response.additional_properties = d diff --git a/rootly_sdk/models/live_call_router_response_data.py b/rootly_sdk/models/live_call_router_response_data.py index 3618b0d6..adefdd71 100644 --- a/rootly_sdk/models/live_call_router_response_data.py +++ b/rootly_sdk/models/live_call_router_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.live_call_router_response_data_type import ( - LiveCallRouterResponseDataType, - check_live_call_router_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.live_call_router_response_data_type import check_live_call_router_response_data_type +from ..models.live_call_router_response_data_type import LiveCallRouterResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.live_call_router import LiveCallRouter @@ -33,6 +34,8 @@ class LiveCallRouterResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.live_call_router import LiveCallRouter + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/meeting_recording.py b/rootly_sdk/models/meeting_recording.py index 02298be2..3f83497b 100644 --- a/rootly_sdk/models/meeting_recording.py +++ b/rootly_sdk/models/meeting_recording.py @@ -1,17 +1,23 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.meeting_recording_platform import check_meeting_recording_platform +from ..models.meeting_recording_platform import MeetingRecordingPlatform +from ..models.meeting_recording_status import check_meeting_recording_status +from ..models.meeting_recording_status import MeetingRecordingStatus +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + + T = TypeVar("T", bound="MeetingRecording") @@ -32,7 +38,10 @@ class MeetingRecording: 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 + title (None | str | Unset): Human-readable label for the recording session + meeting_url (None | str | Unset): Original meeting URL + video_url (None | str | Unset): Signed URL to stream/download the video recording + created_by (None | str | Unset): Source that created the recording (e.g. desktop_sdk, recall_bot) """ platform: MeetingRecordingPlatform @@ -46,7 +55,10 @@ class MeetingRecording: speaker_count: int | Unset = UNSET word_count: int | Unset = UNSET transcript_summary: None | str | Unset = UNSET - has_video: bool | Unset = UNSET + title: None | str | Unset = UNSET + meeting_url: None | str | Unset = UNSET + video_url: None | str | Unset = UNSET + created_by: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -92,7 +104,29 @@ def to_dict(self) -> dict[str, Any]: else: transcript_summary = self.transcript_summary - has_video = self.has_video + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + meeting_url: None | str | Unset + if isinstance(self.meeting_url, Unset): + meeting_url = UNSET + else: + meeting_url = self.meeting_url + + video_url: None | str | Unset + if isinstance(self.video_url, Unset): + video_url = UNSET + else: + video_url = self.video_url + + created_by: None | str | Unset + if isinstance(self.created_by, Unset): + created_by = UNSET + else: + created_by = self.created_by field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) @@ -117,8 +151,14 @@ def to_dict(self) -> dict[str, Any]: 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 + if title is not UNSET: + field_dict["title"] = title + if meeting_url is not UNSET: + field_dict["meeting_url"] = meeting_url + if video_url is not UNSET: + field_dict["video_url"] = video_url + if created_by is not UNSET: + field_dict["created_by"] = created_by return field_dict @@ -191,7 +231,41 @@ def _parse_transcript_summary(data: object) -> None | str | Unset: transcript_summary = _parse_transcript_summary(d.pop("transcript_summary", UNSET)) - has_video = d.pop("has_video", UNSET) + 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)) + + def _parse_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + meeting_url = _parse_meeting_url(d.pop("meeting_url", UNSET)) + + def _parse_video_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + video_url = _parse_video_url(d.pop("video_url", UNSET)) + + def _parse_created_by(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + created_by = _parse_created_by(d.pop("created_by", UNSET)) meeting_recording = cls( platform=platform, @@ -205,7 +279,10 @@ def _parse_transcript_summary(data: object) -> None | str | Unset: speaker_count=speaker_count, word_count=word_count, transcript_summary=transcript_summary, - has_video=has_video, + title=title, + meeting_url=meeting_url, + video_url=video_url, + created_by=created_by, ) meeting_recording.additional_properties = d diff --git a/rootly_sdk/models/meeting_recording_detail.py b/rootly_sdk/models/meeting_recording_detail.py new file mode 100644 index 00000000..4b11873d --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail.py @@ -0,0 +1,419 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.meeting_recording_platform import check_meeting_recording_platform +from ..models.meeting_recording_platform import MeetingRecordingPlatform +from ..models.meeting_recording_status import check_meeting_recording_status +from ..models.meeting_recording_status import MeetingRecordingStatus +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + +if TYPE_CHECKING: + from ..models.meeting_recording_detail_transcript_type_1 import MeetingRecordingDetailTranscriptType1 + from ..models.meeting_recording_transcript_segment import MeetingRecordingTranscriptSegment + + +T = TypeVar("T", bound="MeetingRecordingDetail") + + +@_attrs_define +class MeetingRecordingDetail: + """ + 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) + title (None | str | Unset): Human-readable label for the recording session + meeting_url (None | str | Unset): Original meeting URL + video_url (None | str | Unset): Signed URL to stream/download the video recording + created_by (None | str | Unset): Source that created the recording (e.g. desktop_sdk, recall_bot) + transcript (list[MeetingRecordingTranscriptSegment] | MeetingRecordingDetailTranscriptType1 | Unset): Array of + speaker segments when populated, empty object when no transcript exists. + recall_upload_id (None | str | Unset): Recall upload identifier + recordable_id (None | str | Unset): UUID of the associated recordable (e.g. incident) + recordable_type (None | str | Unset): Type of the associated recordable (e.g. Incident) + """ + + 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 + title: None | str | Unset = UNSET + meeting_url: None | str | Unset = UNSET + video_url: None | str | Unset = UNSET + created_by: None | str | Unset = UNSET + transcript: list[MeetingRecordingTranscriptSegment] | MeetingRecordingDetailTranscriptType1 | Unset = UNSET + recall_upload_id: None | str | Unset = UNSET + recordable_id: None | str | Unset = UNSET + recordable_type: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.meeting_recording_transcript_segment import MeetingRecordingTranscriptSegment + from ..models.meeting_recording_detail_transcript_type_1 import MeetingRecordingDetailTranscriptType1 + + 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 + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + meeting_url: None | str | Unset + if isinstance(self.meeting_url, Unset): + meeting_url = UNSET + else: + meeting_url = self.meeting_url + + video_url: None | str | Unset + if isinstance(self.video_url, Unset): + video_url = UNSET + else: + video_url = self.video_url + + created_by: None | str | Unset + if isinstance(self.created_by, Unset): + created_by = UNSET + else: + created_by = self.created_by + + transcript: dict[str, Any] | list[dict[str, Any]] | Unset + if isinstance(self.transcript, Unset): + transcript = UNSET + elif isinstance(self.transcript, list): + transcript = [] + for transcript_type_0_item_data in self.transcript: + transcript_type_0_item = transcript_type_0_item_data.to_dict() + transcript.append(transcript_type_0_item) + + else: + transcript = self.transcript.to_dict() + + recall_upload_id: None | str | Unset + if isinstance(self.recall_upload_id, Unset): + recall_upload_id = UNSET + else: + recall_upload_id = self.recall_upload_id + + recordable_id: None | str | Unset + if isinstance(self.recordable_id, Unset): + recordable_id = UNSET + else: + recordable_id = self.recordable_id + + recordable_type: None | str | Unset + if isinstance(self.recordable_type, Unset): + recordable_type = UNSET + else: + recordable_type = self.recordable_type + + 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 title is not UNSET: + field_dict["title"] = title + if meeting_url is not UNSET: + field_dict["meeting_url"] = meeting_url + if video_url is not UNSET: + field_dict["video_url"] = video_url + if created_by is not UNSET: + field_dict["created_by"] = created_by + if transcript is not UNSET: + field_dict["transcript"] = transcript + if recall_upload_id is not UNSET: + field_dict["recall_upload_id"] = recall_upload_id + if recordable_id is not UNSET: + field_dict["recordable_id"] = recordable_id + if recordable_type is not UNSET: + field_dict["recordable_type"] = recordable_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording_detail_transcript_type_1 import MeetingRecordingDetailTranscriptType1 + from ..models.meeting_recording_transcript_segment import MeetingRecordingTranscriptSegment + + 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)) + + 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)) + + def _parse_meeting_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + meeting_url = _parse_meeting_url(d.pop("meeting_url", UNSET)) + + def _parse_video_url(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + video_url = _parse_video_url(d.pop("video_url", UNSET)) + + def _parse_created_by(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + created_by = _parse_created_by(d.pop("created_by", UNSET)) + + def _parse_transcript( + data: object, + ) -> list[MeetingRecordingTranscriptSegment] | MeetingRecordingDetailTranscriptType1 | Unset: + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + transcript_type_0 = [] + _transcript_type_0 = data + for transcript_type_0_item_data in _transcript_type_0: + transcript_type_0_item = MeetingRecordingTranscriptSegment.from_dict(transcript_type_0_item_data) + + transcript_type_0.append(transcript_type_0_item) + + return transcript_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + transcript_type_1 = MeetingRecordingDetailTranscriptType1.from_dict(data) + + return transcript_type_1 + + transcript = _parse_transcript(d.pop("transcript", UNSET)) + + def _parse_recall_upload_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + recall_upload_id = _parse_recall_upload_id(d.pop("recall_upload_id", UNSET)) + + def _parse_recordable_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + recordable_id = _parse_recordable_id(d.pop("recordable_id", UNSET)) + + def _parse_recordable_type(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + recordable_type = _parse_recordable_type(d.pop("recordable_type", UNSET)) + + meeting_recording_detail = 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, + title=title, + meeting_url=meeting_url, + video_url=video_url, + created_by=created_by, + transcript=transcript, + recall_upload_id=recall_upload_id, + recordable_id=recordable_id, + recordable_type=recordable_type, + ) + + meeting_recording_detail.additional_properties = d + return meeting_recording_detail + + @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_detail_response.py b/rootly_sdk/models/meeting_recording_detail_response.py new file mode 100644 index 00000000..260e3c0f --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail_response.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.meeting_recording_detail_response_data import MeetingRecordingDetailResponseData + + +T = TypeVar("T", bound="MeetingRecordingDetailResponse") + + +@_attrs_define +class MeetingRecordingDetailResponse: + """ + Attributes: + data (MeetingRecordingDetailResponseData): + """ + + data: MeetingRecordingDetailResponseData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.meeting_recording_detail_response_data import MeetingRecordingDetailResponseData + + 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.meeting_recording_detail_response_data import MeetingRecordingDetailResponseData + + d = dict(src_dict) + data = MeetingRecordingDetailResponseData.from_dict(d.pop("data")) + + meeting_recording_detail_response = cls( + data=data, + ) + + meeting_recording_detail_response.additional_properties = d + return meeting_recording_detail_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/meeting_recording_detail_response_data.py b/rootly_sdk/models/meeting_recording_detail_response_data.py new file mode 100644 index 00000000..1a994495 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail_response_data.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.meeting_recording_detail_response_data_type import check_meeting_recording_detail_response_data_type +from ..models.meeting_recording_detail_response_data_type import MeetingRecordingDetailResponseDataType +from typing import cast + +if TYPE_CHECKING: + from ..models.meeting_recording_detail import MeetingRecordingDetail + + +T = TypeVar("T", bound="MeetingRecordingDetailResponseData") + + +@_attrs_define +class MeetingRecordingDetailResponseData: + """ + Attributes: + id (str): Unique UUID of the meeting recording + type_ (MeetingRecordingDetailResponseDataType): + attributes (MeetingRecordingDetail): + """ + + id: str + type_: MeetingRecordingDetailResponseDataType + attributes: MeetingRecordingDetail + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.meeting_recording_detail import MeetingRecordingDetail + + 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_detail import MeetingRecordingDetail + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_meeting_recording_detail_response_data_type(d.pop("type")) + + attributes = MeetingRecordingDetail.from_dict(d.pop("attributes")) + + meeting_recording_detail_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + meeting_recording_detail_response_data.additional_properties = d + return meeting_recording_detail_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/meeting_recording_detail_response_data_type.py b/rootly_sdk/models/meeting_recording_detail_response_data_type.py new file mode 100644 index 00000000..ba51d718 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail_response_data_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +MeetingRecordingDetailResponseDataType = Literal["meeting_recordings"] + +MEETING_RECORDING_DETAIL_RESPONSE_DATA_TYPE_VALUES: set[MeetingRecordingDetailResponseDataType] = { + "meeting_recordings", +} + + +def check_meeting_recording_detail_response_data_type( + value: str | None, +) -> MeetingRecordingDetailResponseDataType | None: + if value is None: + return None + if value in MEETING_RECORDING_DETAIL_RESPONSE_DATA_TYPE_VALUES: + return cast(MeetingRecordingDetailResponseDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {MEETING_RECORDING_DETAIL_RESPONSE_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py b/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py new file mode 100644 index 00000000..6651fa03 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="MeetingRecordingDetailTranscriptType1") + + +@_attrs_define +class MeetingRecordingDetailTranscriptType1: + """ """ + + 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) + meeting_recording_detail_transcript_type_1 = cls() + + meeting_recording_detail_transcript_type_1.additional_properties = d + return meeting_recording_detail_transcript_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/meeting_recording_list.py b/rootly_sdk/models/meeting_recording_list.py index 0590db47..d08c81b9 100644 --- a/rootly_sdk/models/meeting_recording_list.py +++ b/rootly_sdk/models/meeting_recording_list.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.meeting_recording_list_data_item import MeetingRecordingListDataItem from ..models.meta import Meta @@ -29,6 +32,9 @@ class MeetingRecordingList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meeting_recording_list_data_item import MeetingRecordingListDataItem + from ..models.meta import Meta + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() diff --git a/rootly_sdk/models/meeting_recording_list_data_item.py b/rootly_sdk/models/meeting_recording_list_data_item.py index 7b57bf19..8e715de3 100644 --- a/rootly_sdk/models/meeting_recording_list_data_item.py +++ b/rootly_sdk/models/meeting_recording_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.meeting_recording_list_data_item_type import check_meeting_recording_list_data_item_type +from ..models.meeting_recording_list_data_item_type import MeetingRecordingListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.meeting_recording import MeetingRecording @@ -33,6 +34,8 @@ class MeetingRecordingListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meeting_recording import MeetingRecording + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/meeting_recording_response.py b/rootly_sdk/models/meeting_recording_response.py new file mode 100644 index 00000000..daee2744 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_response.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.meeting_recording_response_data import MeetingRecordingResponseData + + +T = TypeVar("T", bound="MeetingRecordingResponse") + + +@_attrs_define +class MeetingRecordingResponse: + """ + Attributes: + data (MeetingRecordingResponseData): + """ + + data: MeetingRecordingResponseData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.meeting_recording_response_data import MeetingRecordingResponseData + + 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.meeting_recording_response_data import MeetingRecordingResponseData + + d = dict(src_dict) + data = MeetingRecordingResponseData.from_dict(d.pop("data")) + + meeting_recording_response = cls( + data=data, + ) + + meeting_recording_response.additional_properties = d + return meeting_recording_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/meeting_recording_response_data.py b/rootly_sdk/models/meeting_recording_response_data.py new file mode 100644 index 00000000..debc5035 --- /dev/null +++ b/rootly_sdk/models/meeting_recording_response_data.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.meeting_recording_response_data_type import check_meeting_recording_response_data_type +from ..models.meeting_recording_response_data_type import MeetingRecordingResponseDataType +from typing import cast + +if TYPE_CHECKING: + from ..models.meeting_recording import MeetingRecording + + +T = TypeVar("T", bound="MeetingRecordingResponseData") + + +@_attrs_define +class MeetingRecordingResponseData: + """ + Attributes: + id (str): Unique UUID of the meeting recording + type_ (MeetingRecordingResponseDataType): + attributes (MeetingRecording): + """ + + id: str + type_: MeetingRecordingResponseDataType + attributes: MeetingRecording + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.meeting_recording import MeetingRecording + + 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_response_data_type(d.pop("type")) + + attributes = MeetingRecording.from_dict(d.pop("attributes")) + + meeting_recording_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + meeting_recording_response_data.additional_properties = d + return meeting_recording_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/meeting_recording_response_data_type.py b/rootly_sdk/models/meeting_recording_response_data_type.py new file mode 100644 index 00000000..934de58e --- /dev/null +++ b/rootly_sdk/models/meeting_recording_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +MeetingRecordingResponseDataType = Literal["meeting_recordings"] + +MEETING_RECORDING_RESPONSE_DATA_TYPE_VALUES: set[MeetingRecordingResponseDataType] = { + "meeting_recordings", +} + + +def check_meeting_recording_response_data_type(value: str | None) -> MeetingRecordingResponseDataType | None: + if value is None: + return None + if value in MEETING_RECORDING_RESPONSE_DATA_TYPE_VALUES: + return cast(MeetingRecordingResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {MEETING_RECORDING_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/meeting_recording_transcript_segment.py b/rootly_sdk/models/meeting_recording_transcript_segment.py new file mode 100644 index 00000000..3345f37a --- /dev/null +++ b/rootly_sdk/models/meeting_recording_transcript_segment.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.meeting_recording_transcript_word import MeetingRecordingTranscriptWord + + +T = TypeVar("T", bound="MeetingRecordingTranscriptSegment") + + +@_attrs_define +class MeetingRecordingTranscriptSegment: + """ + Attributes: + speaker (str): Speaker label (e.g. Speaker 1) + words (list[MeetingRecordingTranscriptWord]): Timestamped words spoken by this speaker + """ + + speaker: str + words: list[MeetingRecordingTranscriptWord] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.meeting_recording_transcript_word import MeetingRecordingTranscriptWord + + speaker = self.speaker + + words = [] + for words_item_data in self.words: + words_item = words_item_data.to_dict() + words.append(words_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "speaker": speaker, + "words": words, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.meeting_recording_transcript_word import MeetingRecordingTranscriptWord + + d = dict(src_dict) + speaker = d.pop("speaker") + + words = [] + _words = d.pop("words") + for words_item_data in _words: + words_item = MeetingRecordingTranscriptWord.from_dict(words_item_data) + + words.append(words_item) + + meeting_recording_transcript_segment = cls( + speaker=speaker, + words=words, + ) + + meeting_recording_transcript_segment.additional_properties = d + return meeting_recording_transcript_segment + + @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_transcript_word.py b/rootly_sdk/models/meeting_recording_transcript_word.py new file mode 100644 index 00000000..697e93fb --- /dev/null +++ b/rootly_sdk/models/meeting_recording_transcript_word.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="MeetingRecordingTranscriptWord") + + +@_attrs_define +class MeetingRecordingTranscriptWord: + """ + Attributes: + text (str): Transcribed word + start_timestamp (float | Unset): Start time in seconds from recording start + end_timestamp (float | Unset): End time in seconds from recording start + """ + + text: str + start_timestamp: float | Unset = UNSET + end_timestamp: float | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + text = self.text + + start_timestamp = self.start_timestamp + + end_timestamp = self.end_timestamp + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "text": text, + } + ) + if start_timestamp is not UNSET: + field_dict["start_timestamp"] = start_timestamp + if end_timestamp is not UNSET: + field_dict["end_timestamp"] = end_timestamp + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + text = d.pop("text") + + start_timestamp = d.pop("start_timestamp", UNSET) + + end_timestamp = d.pop("end_timestamp", UNSET) + + meeting_recording_transcript_word = cls( + text=text, + start_timestamp=start_timestamp, + end_timestamp=end_timestamp, + ) + + meeting_recording_transcript_word.additional_properties = d + return meeting_recording_transcript_word + + @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/meta.py b/rootly_sdk/models/meta.py index 5612bb1e..cfe72785 100644 --- a/rootly_sdk/models/meta.py +++ b/rootly_sdk/models/meta.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="Meta") diff --git a/rootly_sdk/models/mitigate_incident.py b/rootly_sdk/models/mitigate_incident.py index a81c52a8..dd012654 100644 --- a/rootly_sdk/models/mitigate_incident.py +++ b/rootly_sdk/models/mitigate_incident.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.mitigate_incident_data import MitigateIncidentData @@ -24,6 +28,8 @@ class MitigateIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.mitigate_incident_data import MitigateIncidentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/mitigate_incident_data.py b/rootly_sdk/models/mitigate_incident_data.py index 755f1f4e..3bb4a873 100644 --- a/rootly_sdk/models/mitigate_incident_data.py +++ b/rootly_sdk/models/mitigate_incident_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.mitigate_incident_data_type import MitigateIncidentDataType, check_mitigate_incident_data_type +from ..types import UNSET, Unset + +from ..models.mitigate_incident_data_type import check_mitigate_incident_data_type +from ..models.mitigate_incident_data_type import MitigateIncidentDataType +from typing import cast if TYPE_CHECKING: from ..models.mitigate_incident_data_attributes import MitigateIncidentDataAttributes @@ -28,6 +32,8 @@ class MitigateIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.mitigate_incident_data_attributes import MitigateIncidentDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/mitigate_incident_data_attributes.py b/rootly_sdk/models/mitigate_incident_data_attributes.py index 58606b79..982fd993 100644 --- a/rootly_sdk/models/mitigate_incident_data_attributes.py +++ b/rootly_sdk/models/mitigate_incident_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="MitigateIncidentDataAttributes") diff --git a/rootly_sdk/models/new_alert.py b/rootly_sdk/models/new_alert.py index 37faac29..8e224c03 100644 --- a/rootly_sdk/models/new_alert.py +++ b/rootly_sdk/models/new_alert.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_data import NewAlertData @@ -24,6 +28,8 @@ class NewAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_data import NewAlertData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_data.py b/rootly_sdk/models/new_alert_data.py index 09c26da5..08c2287a 100644 --- a/rootly_sdk/models/new_alert_data.py +++ b/rootly_sdk/models/new_alert_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_alert_data_type import NewAlertDataType, check_new_alert_data_type +from ..types import UNSET, Unset + +from ..models.new_alert_data_type import check_new_alert_data_type +from ..models.new_alert_data_type import NewAlertDataType +from typing import cast if TYPE_CHECKING: from ..models.new_alert_data_attributes import NewAlertDataAttributes @@ -28,6 +32,8 @@ class NewAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_data_attributes import NewAlertDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_data_attributes.py b/rootly_sdk/models/new_alert_data_attributes.py index 658edf63..47846556 100644 --- a/rootly_sdk/models/new_alert_data_attributes.py +++ b/rootly_sdk/models/new_alert_data_attributes.py @@ -1,26 +1,25 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset -from ..models.new_alert_data_attributes_noise import NewAlertDataAttributesNoise, check_new_alert_data_attributes_noise +from ..models.new_alert_data_attributes_noise import check_new_alert_data_attributes_noise +from ..models.new_alert_data_attributes_noise import NewAlertDataAttributesNoise from ..models.new_alert_data_attributes_notification_target_type import ( - NewAlertDataAttributesNotificationTargetType, check_new_alert_data_attributes_notification_target_type, ) -from ..models.new_alert_data_attributes_source import ( - NewAlertDataAttributesSource, - check_new_alert_data_attributes_source, -) -from ..models.new_alert_data_attributes_status import ( - NewAlertDataAttributesStatus, - check_new_alert_data_attributes_status, -) +from ..models.new_alert_data_attributes_notification_target_type import NewAlertDataAttributesNotificationTargetType +from ..models.new_alert_data_attributes_status import check_new_alert_data_attributes_status +from ..models.new_alert_data_attributes_status import NewAlertDataAttributesStatus from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime if TYPE_CHECKING: from ..models.new_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( @@ -28,6 +27,9 @@ ) from ..models.new_alert_data_attributes_data_type_0 import NewAlertDataAttributesDataType0 from ..models.new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 + from ..models.new_alert_data_attributes_notification_targets_type_0_item import ( + NewAlertDataAttributesNotificationTargetsType0Item, + ) T = TypeVar("T", bound="NewAlertDataAttributes") @@ -37,9 +39,10 @@ class NewAlertDataAttributes: """ Attributes: - source (NewAlertDataAttributesSource): The source of the alert summary (str): The summary of the alert noise (NewAlertDataAttributesNoise | Unset): Whether the alert is marked as noise + source (str | Unset): Deprecated. Accepted for backwards compatibility; new clients should omit. Defaults to + `api`. 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 @@ -47,6 +50,7 @@ class NewAlertDataAttributes: 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. + functionality_ids (list[str] | None | Unset): The Functionality 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 @@ -54,9 +58,16 @@ class NewAlertDataAttributes: 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. + organizations with Rootly On-Call enabled. Can be one of Group, Service, EscalationPolicy, Functionality, User. + Please contact support if you encounter issues using `Functionality` as a notification target type. notification_target_id (None | str | Unset): Only available for organizations with Rootly On-Call enabled. The _identifier_ of the notification target object. + notification_targets (list[NewAlertDataAttributesNotificationTargetsType0Item] | None | Unset): Only available + for organizations with Rootly On-Call enabled. Page multiple destinations (any combination of Group, Service, + EscalationPolicy, Functionality, or User) in a single request. `Functionality` targets require the + `enable_paging_functionalities` feature; a request that includes one while it is disabled is rejected. Applies + to alert creation only. When provided, this takes precedence over the singular `notification_target_type` / + `notification_target_id` fields. 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. @@ -64,13 +75,14 @@ class NewAlertDataAttributes: Custom alert field values to create with the alert """ - source: NewAlertDataAttributesSource summary: str noise: NewAlertDataAttributesNoise | Unset = UNSET + source: str | 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 + functionality_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 @@ -79,6 +91,7 @@ class NewAlertDataAttributes: alert_urgency_id: None | str | Unset = UNSET notification_target_type: NewAlertDataAttributesNotificationTargetType | Unset = UNSET notification_target_id: None | str | Unset = UNSET + notification_targets: list[NewAlertDataAttributesNotificationTargetsType0Item] | None | Unset = UNSET labels: list[NewAlertDataAttributesLabelsItemType0 | None] | Unset = UNSET data: NewAlertDataAttributesDataType0 | None | Unset = UNSET deduplication_key: None | str | Unset = UNSET @@ -87,13 +100,14 @@ class NewAlertDataAttributes: ) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_data_attributes_notification_targets_type_0_item import ( + NewAlertDataAttributesNotificationTargetsType0Item, + ) + from ..models.new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 from ..models.new_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( NewAlertDataAttributesAlertFieldValuesAttributesItemType0, ) from ..models.new_alert_data_attributes_data_type_0 import NewAlertDataAttributesDataType0 - from ..models.new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 - - source: str = self.source summary = self.summary @@ -101,6 +115,8 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.noise, Unset): noise = self.noise + source = self.source + status: str | Unset = UNSET if not isinstance(self.status, Unset): status = self.status @@ -129,6 +145,15 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids + functionality_ids: list[str] | None | Unset + if isinstance(self.functionality_ids, Unset): + functionality_ids = UNSET + elif isinstance(self.functionality_ids, list): + functionality_ids = self.functionality_ids + + else: + functionality_ids = self.functionality_ids + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET @@ -182,6 +207,18 @@ def to_dict(self) -> dict[str, Any]: else: notification_target_id = self.notification_target_id + notification_targets: list[dict[str, Any]] | None | Unset + if isinstance(self.notification_targets, Unset): + notification_targets = UNSET + elif isinstance(self.notification_targets, list): + notification_targets = [] + for notification_targets_type_0_item_data in self.notification_targets: + notification_targets_type_0_item = notification_targets_type_0_item_data.to_dict() + notification_targets.append(notification_targets_type_0_item) + + else: + notification_targets = self.notification_targets + labels: list[dict[str, Any] | None] | Unset = UNSET if not isinstance(self.labels, Unset): labels = [] @@ -224,12 +261,13 @@ def to_dict(self) -> dict[str, Any]: field_dict.update( { - "source": source, "summary": summary, } ) if noise is not UNSET: field_dict["noise"] = noise + if source is not UNSET: + field_dict["source"] = source if status is not UNSET: field_dict["status"] = status if description is not UNSET: @@ -238,6 +276,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["service_ids"] = service_ids if group_ids is not UNSET: field_dict["group_ids"] = group_ids + if functionality_ids is not UNSET: + field_dict["functionality_ids"] = functionality_ids if environment_ids is not UNSET: field_dict["environment_ids"] = environment_ids if started_at is not UNSET: @@ -254,6 +294,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["notification_target_type"] = notification_target_type if notification_target_id is not UNSET: field_dict["notification_target_id"] = notification_target_id + if notification_targets is not UNSET: + field_dict["notification_targets"] = notification_targets if labels is not UNSET: field_dict["labels"] = labels if data is not UNSET: @@ -272,10 +314,11 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: ) from ..models.new_alert_data_attributes_data_type_0 import NewAlertDataAttributesDataType0 from ..models.new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 + from ..models.new_alert_data_attributes_notification_targets_type_0_item import ( + NewAlertDataAttributesNotificationTargetsType0Item, + ) d = dict(src_dict) - source = check_new_alert_data_attributes_source(d.pop("source")) - summary = d.pop("summary") _noise = d.pop("noise", UNSET) @@ -285,6 +328,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: noise = check_new_alert_data_attributes_noise(_noise) + source = d.pop("source", UNSET) + _status = d.pop("status", UNSET) status: NewAlertDataAttributesStatus | Unset if isinstance(_status, Unset): @@ -335,6 +380,23 @@ def _parse_group_ids(data: object) -> list[str] | None | Unset: group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) + def _parse_functionality_ids(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() + functionality_ids_type_0 = cast(list[str], data) + + return functionality_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data @@ -431,6 +493,32 @@ def _parse_notification_target_id(data: object) -> None | str | Unset: notification_target_id = _parse_notification_target_id(d.pop("notification_target_id", UNSET)) + def _parse_notification_targets( + data: object, + ) -> list[NewAlertDataAttributesNotificationTargetsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + notification_targets_type_0 = [] + _notification_targets_type_0 = data + for notification_targets_type_0_item_data in _notification_targets_type_0: + notification_targets_type_0_item = NewAlertDataAttributesNotificationTargetsType0Item.from_dict( + notification_targets_type_0_item_data + ) + + notification_targets_type_0.append(notification_targets_type_0_item) + + return notification_targets_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[NewAlertDataAttributesNotificationTargetsType0Item] | None | Unset, data) + + notification_targets = _parse_notification_targets(d.pop("notification_targets", UNSET)) + _labels = d.pop("labels", UNSET) labels: list[NewAlertDataAttributesLabelsItemType0 | None] | Unset = UNSET if _labels is not UNSET: @@ -512,13 +600,14 @@ def _parse_alert_field_values_attributes_item( alert_field_values_attributes.append(alert_field_values_attributes_item) new_alert_data_attributes = cls( - source=source, summary=summary, noise=noise, + source=source, status=status, description=description, service_ids=service_ids, group_ids=group_ids, + functionality_ids=functionality_ids, environment_ids=environment_ids, started_at=started_at, ended_at=ended_at, @@ -527,6 +616,7 @@ def _parse_alert_field_values_attributes_item( alert_urgency_id=alert_urgency_id, notification_target_type=notification_target_type, notification_target_id=notification_target_id, + notification_targets=notification_targets, labels=labels, data=data, deduplication_key=deduplication_key, 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 d6390a5a..60c442d6 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewAlertDataAttributesAlertFieldValuesAttributesItemType0") 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 407a47f0..2a7e220a 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewAlertDataAttributesDataType0") 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 024b581d..804a92ea 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,11 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + + T = TypeVar("T", bound="NewAlertDataAttributesLabelsItemType0") diff --git a/rootly_sdk/models/new_alert_data_attributes_notification_target_type.py b/rootly_sdk/models/new_alert_data_attributes_notification_target_type.py index 84782102..8a0d0429 100644 --- a/rootly_sdk/models/new_alert_data_attributes_notification_target_type.py +++ b/rootly_sdk/models/new_alert_data_attributes_notification_target_type.py @@ -1,9 +1,10 @@ from typing import Literal, cast -NewAlertDataAttributesNotificationTargetType = Literal["EscalationPolicy", "Group", "Service", "User"] +NewAlertDataAttributesNotificationTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service", "User"] NEW_ALERT_DATA_ATTRIBUTES_NOTIFICATION_TARGET_TYPE_VALUES: set[NewAlertDataAttributesNotificationTargetType] = { "EscalationPolicy", + "Functionality", "Group", "Service", "User", diff --git a/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py new file mode 100644 index 00000000..7b27a82d --- /dev/null +++ b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py @@ -0,0 +1,63 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_alert_data_attributes_notification_targets_type_0_item_type import ( + check_new_alert_data_attributes_notification_targets_type_0_item_type, +) +from ..models.new_alert_data_attributes_notification_targets_type_0_item_type import ( + NewAlertDataAttributesNotificationTargetsType0ItemType, +) +from typing import cast + + +T = TypeVar("T", bound="NewAlertDataAttributesNotificationTargetsType0Item") + + +@_attrs_define +class NewAlertDataAttributesNotificationTargetsType0Item: + """ + Attributes: + type_ (NewAlertDataAttributesNotificationTargetsType0ItemType): The type of the notification target. Can be one + of Group, Service, EscalationPolicy, Functionality, User. + id (str): The identifier of the notification target object. + """ + + type_: NewAlertDataAttributesNotificationTargetsType0ItemType + id: str + + def to_dict(self) -> dict[str, Any]: + type_: str = self.type_ + + id = self.id + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "type": type_, + "id": id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + type_ = check_new_alert_data_attributes_notification_targets_type_0_item_type(d.pop("type")) + + id = d.pop("id") + + new_alert_data_attributes_notification_targets_type_0_item = cls( + type_=type_, + id=id, + ) + + return new_alert_data_attributes_notification_targets_type_0_item diff --git a/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item_type.py b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item_type.py new file mode 100644 index 00000000..4e4263ba --- /dev/null +++ b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item_type.py @@ -0,0 +1,27 @@ +from typing import Literal, cast + +NewAlertDataAttributesNotificationTargetsType0ItemType = Literal[ + "EscalationPolicy", "Functionality", "Group", "Service", "User" +] + +NEW_ALERT_DATA_ATTRIBUTES_NOTIFICATION_TARGETS_TYPE_0_ITEM_TYPE_VALUES: set[ + NewAlertDataAttributesNotificationTargetsType0ItemType +] = { + "EscalationPolicy", + "Functionality", + "Group", + "Service", + "User", +} + + +def check_new_alert_data_attributes_notification_targets_type_0_item_type( + value: str | None, +) -> NewAlertDataAttributesNotificationTargetsType0ItemType | None: + if value is None: + return None + if value in NEW_ALERT_DATA_ATTRIBUTES_NOTIFICATION_TARGETS_TYPE_0_ITEM_TYPE_VALUES: + return cast(NewAlertDataAttributesNotificationTargetsType0ItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ALERT_DATA_ATTRIBUTES_NOTIFICATION_TARGETS_TYPE_0_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_alert_data_attributes_source.py b/rootly_sdk/models/new_alert_data_attributes_source.py deleted file mode 100644 index 0dd3748a..00000000 --- a/rootly_sdk/models/new_alert_data_attributes_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -NewAlertDataAttributesSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -NEW_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES: set[NewAlertDataAttributesSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_new_alert_data_attributes_source(value: str | None) -> NewAlertDataAttributesSource | None: - if value is None: - return None - if value in NEW_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES: - return cast(NewAlertDataAttributesSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/new_alert_event.py b/rootly_sdk/models/new_alert_event.py index b15ea50d..09e4cd59 100644 --- a/rootly_sdk/models/new_alert_event.py +++ b/rootly_sdk/models/new_alert_event.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_event_data import NewAlertEventData @@ -24,6 +28,8 @@ class NewAlertEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_event_data import NewAlertEventData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_event_data.py b/rootly_sdk/models/new_alert_event_data.py index b1834ca4..08466157 100644 --- a/rootly_sdk/models/new_alert_event_data.py +++ b/rootly_sdk/models/new_alert_event_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_alert_event_data_type import NewAlertEventDataType, check_new_alert_event_data_type +from ..types import UNSET, Unset + +from ..models.new_alert_event_data_type import check_new_alert_event_data_type +from ..models.new_alert_event_data_type import NewAlertEventDataType +from typing import cast if TYPE_CHECKING: from ..models.new_alert_event_data_attributes import NewAlertEventDataAttributes @@ -28,6 +32,8 @@ class NewAlertEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_event_data_attributes import NewAlertEventDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_event_data_attributes.py b/rootly_sdk/models/new_alert_event_data_attributes.py index fa2ef336..9fd68507 100644 --- a/rootly_sdk/models/new_alert_event_data_attributes.py +++ b/rootly_sdk/models/new_alert_event_data_attributes.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_alert_event_data_attributes_kind import ( - NewAlertEventDataAttributesKind, - check_new_alert_event_data_attributes_kind, -) from ..types import UNSET, Unset +from ..models.new_alert_event_data_attributes_kind import check_new_alert_event_data_attributes_kind +from ..models.new_alert_event_data_attributes_kind import NewAlertEventDataAttributesKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewAlertEventDataAttributes") diff --git a/rootly_sdk/models/new_alert_field.py b/rootly_sdk/models/new_alert_field.py index fe39f1f2..fcb70fb3 100644 --- a/rootly_sdk/models/new_alert_field.py +++ b/rootly_sdk/models/new_alert_field.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_field_data import NewAlertFieldData @@ -24,6 +28,8 @@ class NewAlertField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_field_data import NewAlertFieldData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_field_data.py b/rootly_sdk/models/new_alert_field_data.py index e339edd9..a39411a0 100644 --- a/rootly_sdk/models/new_alert_field_data.py +++ b/rootly_sdk/models/new_alert_field_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_alert_field_data_type import NewAlertFieldDataType, check_new_alert_field_data_type +from ..types import UNSET, Unset + +from ..models.new_alert_field_data_type import check_new_alert_field_data_type +from ..models.new_alert_field_data_type import NewAlertFieldDataType +from typing import cast if TYPE_CHECKING: from ..models.new_alert_field_data_attributes import NewAlertFieldDataAttributes @@ -28,6 +32,8 @@ class NewAlertFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_field_data_attributes import NewAlertFieldDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_field_data_attributes.py b/rootly_sdk/models/new_alert_field_data_attributes.py index d3021a24..9931fa39 100644 --- a/rootly_sdk/models/new_alert_field_data_attributes.py +++ b/rootly_sdk/models/new_alert_field_data_attributes.py @@ -1,9 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + T = TypeVar("T", bound="NewAlertFieldDataAttributes") diff --git a/rootly_sdk/models/new_alert_group.py b/rootly_sdk/models/new_alert_group.py index 31fe2fcf..c0da165a 100644 --- a/rootly_sdk/models/new_alert_group.py +++ b/rootly_sdk/models/new_alert_group.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_group_data import NewAlertGroupData @@ -24,6 +28,8 @@ class NewAlertGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_group_data import NewAlertGroupData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_group_data.py b/rootly_sdk/models/new_alert_group_data.py index 9f3ad58e..49b1c634 100644 --- a/rootly_sdk/models/new_alert_group_data.py +++ b/rootly_sdk/models/new_alert_group_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_alert_group_data_type import NewAlertGroupDataType, check_new_alert_group_data_type +from ..types import UNSET, Unset + +from ..models.new_alert_group_data_type import check_new_alert_group_data_type +from ..models.new_alert_group_data_type import NewAlertGroupDataType +from typing import cast if TYPE_CHECKING: from ..models.new_alert_group_data_attributes import NewAlertGroupDataAttributes @@ -28,6 +32,8 @@ class NewAlertGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_group_data_attributes import NewAlertGroupDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_group_data_attributes.py b/rootly_sdk/models/new_alert_group_data_attributes.py index 61040f9b..6ae3ea27 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes.py +++ b/rootly_sdk/models/new_alert_group_data_attributes.py @@ -1,23 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_alert_group_data_attributes_condition_type import ( - NewAlertGroupDataAttributesConditionType, - check_new_alert_group_data_attributes_condition_type, -) +from ..types import UNSET, Unset + +from ..models.new_alert_group_data_attributes_condition_type import check_new_alert_group_data_attributes_condition_type +from ..models.new_alert_group_data_attributes_condition_type import NewAlertGroupDataAttributesConditionType from ..models.new_alert_group_data_attributes_group_by_alert_title import ( - NewAlertGroupDataAttributesGroupByAlertTitle, check_new_alert_group_data_attributes_group_by_alert_title, ) +from ..models.new_alert_group_data_attributes_group_by_alert_title import NewAlertGroupDataAttributesGroupByAlertTitle from ..models.new_alert_group_data_attributes_group_by_alert_urgency import ( - NewAlertGroupDataAttributesGroupByAlertUrgency, check_new_alert_group_data_attributes_group_by_alert_urgency, ) +from ..models.new_alert_group_data_attributes_group_by_alert_urgency import ( + NewAlertGroupDataAttributesGroupByAlertUrgency, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_alert_group_data_attributes_attributes_item import NewAlertGroupDataAttributesAttributesItem @@ -60,6 +64,10 @@ class NewAlertGroupDataAttributes: conditions: list[NewAlertGroupDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_group_data_attributes_conditions_item import NewAlertGroupDataAttributesConditionsItem + from ..models.new_alert_group_data_attributes_attributes_item import NewAlertGroupDataAttributesAttributesItem + from ..models.new_alert_group_data_attributes_targets_item import NewAlertGroupDataAttributesTargetsItem + name = self.name description: None | str | Unset 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 32f2336b..c02ae335 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewAlertGroupDataAttributesAttributesItem") 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 b4add325..547d25f6 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,24 +1,34 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alert_group_data_attributes_conditions_item_conditionable_type import ( - NewAlertGroupDataAttributesConditionsItemConditionableType, check_new_alert_group_data_attributes_conditions_item_conditionable_type, ) +from ..models.new_alert_group_data_attributes_conditions_item_conditionable_type import ( + NewAlertGroupDataAttributesConditionsItemConditionableType, +) from ..models.new_alert_group_data_attributes_conditions_item_property_field_condition_type import ( - NewAlertGroupDataAttributesConditionsItemPropertyFieldConditionType, check_new_alert_group_data_attributes_conditions_item_property_field_condition_type, ) +from ..models.new_alert_group_data_attributes_conditions_item_property_field_condition_type import ( + NewAlertGroupDataAttributesConditionsItemPropertyFieldConditionType, +) from ..models.new_alert_group_data_attributes_conditions_item_property_field_type import ( - NewAlertGroupDataAttributesConditionsItemPropertyFieldType, check_new_alert_group_data_attributes_conditions_item_property_field_type, ) +from ..models.new_alert_group_data_attributes_conditions_item_property_field_type import ( + NewAlertGroupDataAttributesConditionsItemPropertyFieldType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewAlertGroupDataAttributesConditionsItem") 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 74afd762..b8b0ab0b 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alert_group_data_attributes_targets_item_target_type import ( - NewAlertGroupDataAttributesTargetsItemTargetType, check_new_alert_group_data_attributes_targets_item_target_type, ) +from ..models.new_alert_group_data_attributes_targets_item_target_type import ( + NewAlertGroupDataAttributesTargetsItemTargetType, +) +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="NewAlertGroupDataAttributesTargetsItem") @@ -19,8 +25,9 @@ class NewAlertGroupDataAttributesTargetsItem: """ Attributes: - target_type (NewAlertGroupDataAttributesTargetsItemTargetType): The type of the target. - target_id (UUID): id for the Group, Service or EscalationPolicy + target_type (NewAlertGroupDataAttributesTargetsItemTargetType): The type of the target. Please contact support + if you encounter issues using `Functionality` as a target type. + target_id (UUID): id for the Group, Service, EscalationPolicy or Functionality """ target_type: NewAlertGroupDataAttributesTargetsItemTargetType diff --git a/rootly_sdk/models/new_alert_group_data_attributes_targets_item_target_type.py b/rootly_sdk/models/new_alert_group_data_attributes_targets_item_target_type.py index 6423ba1d..aa9c58d0 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes_targets_item_target_type.py +++ b/rootly_sdk/models/new_alert_group_data_attributes_targets_item_target_type.py @@ -1,11 +1,12 @@ from typing import Literal, cast -NewAlertGroupDataAttributesTargetsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +NewAlertGroupDataAttributesTargetsItemTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] NEW_ALERT_GROUP_DATA_ATTRIBUTES_TARGETS_ITEM_TARGET_TYPE_VALUES: set[ NewAlertGroupDataAttributesTargetsItemTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/new_alert_route.py b/rootly_sdk/models/new_alert_route.py index 79625248..3df66236 100644 --- a/rootly_sdk/models/new_alert_route.py +++ b/rootly_sdk/models/new_alert_route.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_route_data import NewAlertRouteData @@ -26,6 +29,8 @@ class NewAlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_route_data import NewAlertRouteData + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/new_alert_route_data.py b/rootly_sdk/models/new_alert_route_data.py index 13b160fb..215410de 100644 --- a/rootly_sdk/models/new_alert_route_data.py +++ b/rootly_sdk/models/new_alert_route_data.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_alert_route_data_type import NewAlertRouteDataType, check_new_alert_route_data_type from ..types import UNSET, Unset +from ..models.new_alert_route_data_type import check_new_alert_route_data_type +from ..models.new_alert_route_data_type import NewAlertRouteDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_route_data_attributes import NewAlertRouteDataAttributes @@ -29,6 +33,8 @@ class NewAlertRouteData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_route_data_attributes import NewAlertRouteDataAttributes + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/new_alert_route_data_attributes.py b/rootly_sdk/models/new_alert_route_data_attributes.py index 8ed8b1a7..5bdb29ba 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes.py +++ b/rootly_sdk/models/new_alert_route_data_attributes.py @@ -1,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + if TYPE_CHECKING: from ..models.new_alert_route_data_attributes_rules_item import NewAlertRouteDataAttributesRulesItem @@ -35,6 +38,8 @@ class NewAlertRouteDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_route_data_attributes_rules_item import NewAlertRouteDataAttributesRulesItem + name = self.name alerts_source_ids = [] 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 8e5042f2..20835287 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item import ( NewAlertRouteDataAttributesRulesItemConditionGroupsItem, @@ -39,6 +42,13 @@ class NewAlertRouteDataAttributesRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_route_data_attributes_rules_item_destinations_item import ( + NewAlertRouteDataAttributesRulesItemDestinationsItem, + ) + from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item import ( + NewAlertRouteDataAttributesRulesItemConditionGroupsItem, + ) + name = self.name destinations = [] 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 b32250f0..bae52877 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, @@ -30,6 +33,10 @@ class NewAlertRouteDataAttributesRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( + NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, + ) + conditions = [] for conditions_item_data in self.conditions: conditions_item = conditions_item_data.to_dict() 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 22a91c83..62383a19 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,25 +1,35 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( - NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType, check_new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type, ) +from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( + NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType, +) from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( - NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, check_new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type, ) +from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( + NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, +) from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( - NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType, check_new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type, ) +from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( + NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType, +) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem") 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 988b84be..a092f4b6 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alert_route_data_attributes_rules_item_destinations_item_target_type import ( - NewAlertRouteDataAttributesRulesItemDestinationsItemTargetType, check_new_alert_route_data_attributes_rules_item_destinations_item_target_type, ) +from ..models.new_alert_route_data_attributes_rules_item_destinations_item_target_type import ( + NewAlertRouteDataAttributesRulesItemDestinationsItemTargetType, +) +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="NewAlertRouteDataAttributesRulesItemDestinationsItem") diff --git a/rootly_sdk/models/new_alert_routing_rule.py b/rootly_sdk/models/new_alert_routing_rule.py index f60b001a..e28a0e48 100644 --- a/rootly_sdk/models/new_alert_routing_rule.py +++ b/rootly_sdk/models/new_alert_routing_rule.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_routing_rule_data import NewAlertRoutingRuleData @@ -24,6 +28,8 @@ class NewAlertRoutingRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_routing_rule_data import NewAlertRoutingRuleData + data = self.data.to_dict() field_dict: 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 81681d74..ae8ef489 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data.py +++ b/rootly_sdk/models/new_alert_routing_rule_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_alert_routing_rule_data_type import ( - NewAlertRoutingRuleDataType, - check_new_alert_routing_rule_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_alert_routing_rule_data_type import check_new_alert_routing_rule_data_type +from ..models.new_alert_routing_rule_data_type import NewAlertRoutingRuleDataType +from typing import cast if TYPE_CHECKING: from ..models.new_alert_routing_rule_data_attributes import NewAlertRoutingRuleDataAttributes @@ -31,6 +32,8 @@ class NewAlertRoutingRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_routing_rule_data_attributes import NewAlertRoutingRuleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 384761d5..c47a6a90 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data_attributes.py +++ b/rootly_sdk/models/new_alert_routing_rule_data_attributes.py @@ -1,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_alert_routing_rule_data_attributes_condition_type import ( - NewAlertRoutingRuleDataAttributesConditionType, check_new_alert_routing_rule_data_attributes_condition_type, ) +from ..models.new_alert_routing_rule_data_attributes_condition_type import ( + NewAlertRoutingRuleDataAttributesConditionType, +) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID if TYPE_CHECKING: from ..models.new_alert_routing_rule_data_attributes_conditions_item import ( @@ -49,6 +55,13 @@ class NewAlertRoutingRuleDataAttributes: conditions: list[NewAlertRoutingRuleDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_routing_rule_data_attributes_destination import ( + NewAlertRoutingRuleDataAttributesDestination, + ) + from ..models.new_alert_routing_rule_data_attributes_conditions_item import ( + NewAlertRoutingRuleDataAttributesConditionsItem, + ) + name = self.name alerts_source_id = str(self.alerts_source_id) 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 8d4358b9..f8506d05 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type import ( - NewAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType, check_new_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type, ) +from ..models.new_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type import ( + NewAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType, +) from ..models.new_alert_routing_rule_data_attributes_conditions_item_property_field_type import ( - NewAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType, check_new_alert_routing_rule_data_attributes_conditions_item_property_field_type, ) +from ..models.new_alert_routing_rule_data_attributes_conditions_item_property_field_type import ( + NewAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewAlertRoutingRuleDataAttributesConditionsItem") 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 09bebab5..51990ec1 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alert_routing_rule_data_attributes_destination_target_type import ( - NewAlertRoutingRuleDataAttributesDestinationTargetType, check_new_alert_routing_rule_data_attributes_destination_target_type, ) +from ..models.new_alert_routing_rule_data_attributes_destination_target_type import ( + NewAlertRoutingRuleDataAttributesDestinationTargetType, +) +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="NewAlertRoutingRuleDataAttributesDestination") diff --git a/rootly_sdk/models/new_alert_urgency.py b/rootly_sdk/models/new_alert_urgency.py index 14f3b152..0b25e31b 100644 --- a/rootly_sdk/models/new_alert_urgency.py +++ b/rootly_sdk/models/new_alert_urgency.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_alert_urgency_data import NewAlertUrgencyData @@ -24,6 +28,8 @@ class NewAlertUrgency: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_urgency_data import NewAlertUrgencyData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alert_urgency_data.py b/rootly_sdk/models/new_alert_urgency_data.py index 05d2e804..748153ba 100644 --- a/rootly_sdk/models/new_alert_urgency_data.py +++ b/rootly_sdk/models/new_alert_urgency_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_alert_urgency_data_type import NewAlertUrgencyDataType, check_new_alert_urgency_data_type +from ..types import UNSET, Unset + +from ..models.new_alert_urgency_data_type import check_new_alert_urgency_data_type +from ..models.new_alert_urgency_data_type import NewAlertUrgencyDataType +from typing import cast if TYPE_CHECKING: from ..models.new_alert_urgency_data_attributes import NewAlertUrgencyDataAttributes @@ -28,6 +32,8 @@ class NewAlertUrgencyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alert_urgency_data_attributes import NewAlertUrgencyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alert_urgency_data_attributes.py b/rootly_sdk/models/new_alert_urgency_data_attributes.py index 9a51775d..624cb712 100644 --- a/rootly_sdk/models/new_alert_urgency_data_attributes.py +++ b/rootly_sdk/models/new_alert_urgency_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewAlertUrgencyDataAttributes") diff --git a/rootly_sdk/models/new_alerts_source.py b/rootly_sdk/models/new_alerts_source.py index 4ea3cade..540f42cb 100644 --- a/rootly_sdk/models/new_alerts_source.py +++ b/rootly_sdk/models/new_alerts_source.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_alerts_source_data import NewAlertsSourceData @@ -24,6 +28,8 @@ class NewAlertsSource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alerts_source_data import NewAlertsSourceData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_alerts_source_data.py b/rootly_sdk/models/new_alerts_source_data.py index 41b6af4d..f32c8b23 100644 --- a/rootly_sdk/models/new_alerts_source_data.py +++ b/rootly_sdk/models/new_alerts_source_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_alerts_source_data_type import NewAlertsSourceDataType, check_new_alerts_source_data_type +from ..types import UNSET, Unset + +from ..models.new_alerts_source_data_type import check_new_alerts_source_data_type +from ..models.new_alerts_source_data_type import NewAlertsSourceDataType +from typing import cast if TYPE_CHECKING: from ..models.new_alerts_source_data_attributes import NewAlertsSourceDataAttributes @@ -28,6 +32,8 @@ class NewAlertsSourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alerts_source_data_attributes import NewAlertsSourceDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_alerts_source_data_attributes.py b/rootly_sdk/models/new_alerts_source_data_attributes.py index 72099088..cd3f8c85 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes.py @@ -1,19 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_alerts_source_data_attributes_deduplication_key_kind import ( - NewAlertsSourceDataAttributesDeduplicationKeyKind, check_new_alerts_source_data_attributes_deduplication_key_kind, ) -from ..models.new_alerts_source_data_attributes_source_type import ( - NewAlertsSourceDataAttributesSourceType, - check_new_alerts_source_data_attributes_source_type, +from ..models.new_alerts_source_data_attributes_deduplication_key_kind import ( + NewAlertsSourceDataAttributesDeduplicationKeyKind, ) +from ..models.new_alerts_source_data_attributes_source_type import check_new_alerts_source_data_attributes_source_type +from ..models.new_alerts_source_data_attributes_source_type import NewAlertsSourceDataAttributesSourceType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_alerts_source_data_attributes_alert_source_fields_attributes_item import ( @@ -41,6 +45,8 @@ class NewAlertsSourceDataAttributes: """ Attributes: name (str): The name of the alert source + enabled (bool | Unset): Whether the alert source is enabled. Disabled sources do not create alerts from incoming + events. 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, @@ -64,6 +70,7 @@ class NewAlertsSourceDataAttributes: """ name: str + enabled: bool | Unset = UNSET source_type: NewAlertsSourceDataAttributesSourceType | Unset = UNSET alert_urgency_id: str | Unset = UNSET deduplicate_alerts_by_key: bool | Unset = UNSET @@ -80,6 +87,12 @@ class NewAlertsSourceDataAttributes: alert_source_fields_attributes: list[NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item import ( + NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem, + ) + from ..models.new_alerts_source_data_attributes_alert_source_fields_attributes_item import ( + NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem, + ) from ..models.new_alerts_source_data_attributes_alert_template_attributes_type_0 import ( NewAlertsSourceDataAttributesAlertTemplateAttributesType0, ) @@ -92,6 +105,8 @@ def to_dict(self) -> dict[str, Any]: name = self.name + enabled = self.enabled + source_type: str | Unset = UNSET if not isinstance(self.source_type, Unset): source_type = self.source_type @@ -165,6 +180,8 @@ def to_dict(self) -> dict[str, Any]: "name": name, } ) + if enabled is not UNSET: + field_dict["enabled"] = enabled if source_type is not UNSET: field_dict["source_type"] = source_type if alert_urgency_id is not UNSET: @@ -213,6 +230,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name") + enabled = d.pop("enabled", UNSET) + _source_type = d.pop("source_type", UNSET) source_type: NewAlertsSourceDataAttributesSourceType | Unset if isinstance(_source_type, Unset): @@ -346,6 +365,7 @@ def _parse_resolution_rule_attributes( new_alerts_source_data_attributes = cls( name=name, + enabled=enabled, source_type=source_type, alert_urgency_id=alert_urgency_id, deduplicate_alerts_by_key=deduplicate_alerts_by_key, 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 7b99100f..0e80a55b 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem") 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 a410af64..195df5cb 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,24 +1,34 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type import ( - NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType, check_new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type, ) +from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type import ( + NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType, +) from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind import ( - NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind, check_new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind, ) +from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind import ( + NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind, +) from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator import ( - NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator, check_new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator, ) +from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator import ( + NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem") 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 7d672082..db17888d 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewAlertsSourceDataAttributesAlertTemplateAttributesType0") 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 f1890f82..a67c2f40 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,24 +1,33 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type import ( - NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType, check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type, ) +from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type import ( + NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType, +) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type import ( - NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType, check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type, ) +from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type import ( + NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType, +) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind import ( - NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind, check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind, ) +from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind import ( + NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item import ( @@ -68,6 +77,10 @@ class NewAlertsSourceDataAttributesResolutionRuleAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item import ( + NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem, + ) + enabled = self.enabled condition_type: str | Unset = UNSET 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 a3163489..2212983a 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,24 +1,34 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( - NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType, check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type, ) +from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( + NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType, +) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( - NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind, check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind, ) +from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( + NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind, +) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( - NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator, check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator, ) +from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( + NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem") 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 47ce1af4..e479af82 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 @@ -11,6 +11,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", @@ -37,6 +38,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", 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 3fe2cadd..b93c412f 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item import ( NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem, @@ -41,6 +44,10 @@ class NewAlertsSourceDataAttributesSourceableAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item import ( + NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem, + ) + auto_resolve = self.auto_resolve resolve_state: None | str | Unset 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 b76f4001..a94840db 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( - NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField, check_new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field, ) +from ..models.new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( + NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem") @@ -22,7 +28,8 @@ class NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttribu 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 + evaluation. For `notification_target_id` only: if your account has opted in to Dynamic Notification Targets, + this may also be a Liquid template that resolves to a notification target id at routing time. """ field: NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset = UNSET diff --git a/rootly_sdk/models/new_api_key.py b/rootly_sdk/models/new_api_key.py index 4a091d1c..d45b55d0 100644 --- a/rootly_sdk/models/new_api_key.py +++ b/rootly_sdk/models/new_api_key.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_api_key_data import NewApiKeyData @@ -24,6 +28,8 @@ class NewApiKey: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_api_key_data import NewApiKeyData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_api_key_data.py b/rootly_sdk/models/new_api_key_data.py index ce01acec..9591a6e9 100644 --- a/rootly_sdk/models/new_api_key_data.py +++ b/rootly_sdk/models/new_api_key_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.new_api_key_data_type import check_new_api_key_data_type +from ..models.new_api_key_data_type import NewApiKeyDataType +from typing import cast if TYPE_CHECKING: from ..models.new_api_key_data_attributes import NewApiKeyDataAttributes @@ -28,6 +32,8 @@ class NewApiKeyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_api_key_data_attributes import NewApiKeyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_api_key_data_attributes.py b/rootly_sdk/models/new_api_key_data_attributes.py index 8c211349..ec2680e4 100644 --- a/rootly_sdk/models/new_api_key_data_attributes.py +++ b/rootly_sdk/models/new_api_key_data_attributes.py @@ -1,17 +1,20 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset -from ..models.new_api_key_data_attributes_kind import ( - NewApiKeyDataAttributesKind, - check_new_api_key_data_attributes_kind, -) +from ..models.new_api_key_data_attributes_kind import check_new_api_key_data_attributes_kind +from ..models.new_api_key_data_attributes_kind import NewApiKeyDataAttributesKind from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="NewApiKeyDataAttributes") diff --git a/rootly_sdk/models/new_authorization.py b/rootly_sdk/models/new_authorization.py index 796d7ade..214981d7 100644 --- a/rootly_sdk/models/new_authorization.py +++ b/rootly_sdk/models/new_authorization.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_authorization_data import NewAuthorizationData @@ -24,6 +28,8 @@ class NewAuthorization: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_authorization_data import NewAuthorizationData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_authorization_data.py b/rootly_sdk/models/new_authorization_data.py index 7d6db6dd..9c0cb7c1 100644 --- a/rootly_sdk/models/new_authorization_data.py +++ b/rootly_sdk/models/new_authorization_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_authorization_data_type import NewAuthorizationDataType, check_new_authorization_data_type +from ..types import UNSET, Unset + +from ..models.new_authorization_data_type import check_new_authorization_data_type +from ..models.new_authorization_data_type import NewAuthorizationDataType +from typing import cast if TYPE_CHECKING: from ..models.new_authorization_data_attributes import NewAuthorizationDataAttributes @@ -28,6 +32,8 @@ class NewAuthorizationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_authorization_data_attributes import NewAuthorizationDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_authorization_data_attributes.py b/rootly_sdk/models/new_authorization_data_attributes.py index b0ef4f6f..f56c0865 100644 --- a/rootly_sdk/models/new_authorization_data_attributes.py +++ b/rootly_sdk/models/new_authorization_data_attributes.py @@ -1,22 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_authorization_data_attributes_authorizable_type import ( - NewAuthorizationDataAttributesAuthorizableType, check_new_authorization_data_attributes_authorizable_type, ) -from ..models.new_authorization_data_attributes_grantee_type import ( - NewAuthorizationDataAttributesGranteeType, - check_new_authorization_data_attributes_grantee_type, -) +from ..models.new_authorization_data_attributes_authorizable_type import NewAuthorizationDataAttributesAuthorizableType +from ..models.new_authorization_data_attributes_grantee_type import check_new_authorization_data_attributes_grantee_type +from ..models.new_authorization_data_attributes_grantee_type import NewAuthorizationDataAttributesGranteeType from ..models.new_authorization_data_attributes_permissions_item import ( - NewAuthorizationDataAttributesPermissionsItem, check_new_authorization_data_attributes_permissions_item, ) +from ..models.new_authorization_data_attributes_permissions_item import NewAuthorizationDataAttributesPermissionsItem +from typing import cast + T = TypeVar("T", bound="NewAuthorizationDataAttributes") diff --git a/rootly_sdk/models/new_catalog.py b/rootly_sdk/models/new_catalog.py index ea8382b6..953e33e9 100644 --- a/rootly_sdk/models/new_catalog.py +++ b/rootly_sdk/models/new_catalog.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_catalog_data import NewCatalogData @@ -24,6 +28,8 @@ class NewCatalog: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_data import NewCatalogData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_checklist_template.py b/rootly_sdk/models/new_catalog_checklist_template.py index b407d01c..63db9dbe 100644 --- a/rootly_sdk/models/new_catalog_checklist_template.py +++ b/rootly_sdk/models/new_catalog_checklist_template.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_catalog_checklist_template_data import NewCatalogChecklistTemplateData @@ -24,6 +28,8 @@ class NewCatalogChecklistTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_checklist_template_data import NewCatalogChecklistTemplateData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_checklist_template_data.py b/rootly_sdk/models/new_catalog_checklist_template_data.py index 30791aec..6e0be884 100644 --- a/rootly_sdk/models/new_catalog_checklist_template_data.py +++ b/rootly_sdk/models/new_catalog_checklist_template_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.new_catalog_checklist_template_data_type import check_new_catalog_checklist_template_data_type +from ..models.new_catalog_checklist_template_data_type import NewCatalogChecklistTemplateDataType +from typing import cast if TYPE_CHECKING: from ..models.new_catalog_checklist_template_data_attributes import NewCatalogChecklistTemplateDataAttributes @@ -31,6 +32,8 @@ class NewCatalogChecklistTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_checklist_template_data_attributes import NewCatalogChecklistTemplateDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py index 1d8669c8..6928e8f4 100644 --- a/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py @@ -1,19 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset 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_catalog_type import ( + NewCatalogChecklistTemplateDataAttributesCatalogType, +) from ..models.new_catalog_checklist_template_data_attributes_scope_type import ( - NewCatalogChecklistTemplateDataAttributesScopeType, check_new_catalog_checklist_template_data_attributes_scope_type, ) +from ..models.new_catalog_checklist_template_data_attributes_scope_type import ( + NewCatalogChecklistTemplateDataAttributesScopeType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_catalog_checklist_template_data_attributes_builtin_field import ( @@ -60,9 +68,15 @@ class NewCatalogChecklistTemplateDataAttributes: owners: list[NewCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_checklist_template_data_attributes_custom_field import ( + NewCatalogChecklistTemplateDataAttributesCustomField, + ) from ..models.new_catalog_checklist_template_data_attributes_builtin_field import ( NewCatalogChecklistTemplateDataAttributesBuiltinField, ) + from ..models.new_catalog_checklist_template_data_attributes_owners_type_0_item import ( + NewCatalogChecklistTemplateDataAttributesOwnersType0Item, + ) name = self.name 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 index 59cbd408..7260d3c4 100644 --- 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 @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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, ) +from ..models.new_catalog_checklist_template_data_attributes_builtin_field_field_source import ( + NewCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource, +) +from typing import cast + T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributesBuiltinField") 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 index 4c8ca431..4cd2844d 100644 --- 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 @@ -1,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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 ..models.new_catalog_checklist_template_data_attributes_custom_field_field_source import ( + NewCatalogChecklistTemplateDataAttributesCustomFieldFieldSource, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributesCustomField") 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 index 36a28929..bca849b0 100644 --- 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 @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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, ) +from ..models.new_catalog_checklist_template_data_attributes_owners_type_0_item_type import ( + NewCatalogChecklistTemplateDataAttributesOwnersType0ItemType, +) +from typing import cast + T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributesOwnersType0Item") diff --git a/rootly_sdk/models/new_catalog_data.py b/rootly_sdk/models/new_catalog_data.py index 783329ff..a1059e2f 100644 --- a/rootly_sdk/models/new_catalog_data.py +++ b/rootly_sdk/models/new_catalog_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_catalog_data_type import NewCatalogDataType, check_new_catalog_data_type +from ..types import UNSET, Unset + +from ..models.new_catalog_data_type import check_new_catalog_data_type +from ..models.new_catalog_data_type import NewCatalogDataType +from typing import cast if TYPE_CHECKING: from ..models.new_catalog_data_attributes import NewCatalogDataAttributes @@ -28,6 +32,8 @@ class NewCatalogData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_data_attributes import NewCatalogDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_data_attributes.py b/rootly_sdk/models/new_catalog_data_attributes.py index a6d96bb9..096e2400 100644 --- a/rootly_sdk/models/new_catalog_data_attributes.py +++ b/rootly_sdk/models/new_catalog_data_attributes.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_catalog_data_attributes_icon import ( - NewCatalogDataAttributesIcon, - check_new_catalog_data_attributes_icon, -) from ..types import UNSET, Unset +from ..models.new_catalog_data_attributes_icon import check_new_catalog_data_attributes_icon +from ..models.new_catalog_data_attributes_icon import NewCatalogDataAttributesIcon +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewCatalogDataAttributes") @@ -22,12 +25,14 @@ class NewCatalogDataAttributes: description (None | str | Unset): icon (NewCatalogDataAttributesIcon | Unset): position (int | None | Unset): Default position of the catalog when displayed in a list. + external_id (None | str | Unset): An external identifier for this catalog. Must be unique within the team. """ name: str description: None | str | Unset = UNSET icon: NewCatalogDataAttributesIcon | Unset = UNSET position: int | None | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -48,6 +53,12 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update( @@ -61,6 +72,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["icon"] = icon if position is not UNSET: field_dict["position"] = position + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -94,11 +107,21 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + new_catalog_data_attributes = cls( name=name, description=description, icon=icon, position=position, + external_id=external_id, ) return new_catalog_data_attributes diff --git a/rootly_sdk/models/new_catalog_entity.py b/rootly_sdk/models/new_catalog_entity.py index 205712e1..0c33099a 100644 --- a/rootly_sdk/models/new_catalog_entity.py +++ b/rootly_sdk/models/new_catalog_entity.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_catalog_entity_data import NewCatalogEntityData @@ -24,6 +28,8 @@ class NewCatalogEntity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_entity_data import NewCatalogEntityData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_entity_data.py b/rootly_sdk/models/new_catalog_entity_data.py index c8ccfd27..c3c6b918 100644 --- a/rootly_sdk/models/new_catalog_entity_data.py +++ b/rootly_sdk/models/new_catalog_entity_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_catalog_entity_data_type import NewCatalogEntityDataType, check_new_catalog_entity_data_type +from ..types import UNSET, Unset + +from ..models.new_catalog_entity_data_type import check_new_catalog_entity_data_type +from ..models.new_catalog_entity_data_type import NewCatalogEntityDataType +from typing import cast if TYPE_CHECKING: from ..models.new_catalog_entity_data_attributes import NewCatalogEntityDataAttributes @@ -28,6 +32,8 @@ class NewCatalogEntityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_entity_data_attributes import NewCatalogEntityDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_entity_data_attributes.py b/rootly_sdk/models/new_catalog_entity_data_attributes.py index ac88c87a..428cb7a9 100644 --- a/rootly_sdk/models/new_catalog_entity_data_attributes.py +++ b/rootly_sdk/models/new_catalog_entity_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_catalog_entity_data_attributes_properties_item import NewCatalogEntityDataAttributesPropertiesItem @@ -21,6 +25,9 @@ class NewCatalogEntityDataAttributes: name (str): description (None | str | Unset): position (int | None | Unset): Default position of the item when displayed in a list. + backstage_id (None | str | Unset): The Backstage entity ID this catalog entity is linked to. + external_id (None | str | Unset): An external identifier for this catalog entity. Must be unique within the + catalog. properties (list[NewCatalogEntityDataAttributesPropertiesItem] | Unset): Array of property values for this catalog entity """ @@ -28,9 +35,15 @@ class NewCatalogEntityDataAttributes: name: str description: None | str | Unset = UNSET position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET properties: list[NewCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_entity_data_attributes_properties_item import ( + NewCatalogEntityDataAttributesPropertiesItem, + ) + name = self.name description: None | str | Unset @@ -45,6 +58,18 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -63,6 +88,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if position is not UNSET: field_dict["position"] = position + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if external_id is not UNSET: + field_dict["external_id"] = external_id if properties is not UNSET: field_dict["properties"] = properties @@ -95,6 +124,24 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + _properties = d.pop("properties", UNSET) properties: list[NewCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -108,6 +155,8 @@ def _parse_position(data: object) -> int | None | Unset: name=name, description=description, position=position, + backstage_id=backstage_id, + external_id=external_id, properties=properties, ) diff --git a/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py b/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py index f5636592..fc566190 100644 --- a/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewCatalogEntityDataAttributesPropertiesItem") diff --git a/rootly_sdk/models/new_catalog_entity_property.py b/rootly_sdk/models/new_catalog_entity_property.py index 83d2b11e..4793ef9f 100644 --- a/rootly_sdk/models/new_catalog_entity_property.py +++ b/rootly_sdk/models/new_catalog_entity_property.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_catalog_entity_property_data import NewCatalogEntityPropertyData @@ -26,6 +30,8 @@ class NewCatalogEntityProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_entity_property_data import NewCatalogEntityPropertyData + data = self.data.to_dict() field_dict: 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 e6683ffd..13d61bb7 100644 --- a/rootly_sdk/models/new_catalog_entity_property_data.py +++ b/rootly_sdk/models/new_catalog_entity_property_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_catalog_entity_property_data_type import ( - NewCatalogEntityPropertyDataType, - check_new_catalog_entity_property_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_catalog_entity_property_data_type import check_new_catalog_entity_property_data_type +from ..models.new_catalog_entity_property_data_type import NewCatalogEntityPropertyDataType +from typing import cast if TYPE_CHECKING: from ..models.new_catalog_entity_property_data_attributes import NewCatalogEntityPropertyDataAttributes @@ -31,6 +32,8 @@ class NewCatalogEntityPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_entity_property_data_attributes import NewCatalogEntityPropertyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 b1521147..3f6c8f43 100644 --- a/rootly_sdk/models/new_catalog_entity_property_data_attributes.py +++ b/rootly_sdk/models/new_catalog_entity_property_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_catalog_entity_property_data_attributes_key import ( - NewCatalogEntityPropertyDataAttributesKey, check_new_catalog_entity_property_data_attributes_key, ) +from ..models.new_catalog_entity_property_data_attributes_key import NewCatalogEntityPropertyDataAttributesKey from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewCatalogEntityPropertyDataAttributes") diff --git a/rootly_sdk/models/new_catalog_field.py b/rootly_sdk/models/new_catalog_field.py index b899e41e..6de66618 100644 --- a/rootly_sdk/models/new_catalog_field.py +++ b/rootly_sdk/models/new_catalog_field.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_catalog_field_data import NewCatalogFieldData @@ -25,6 +29,8 @@ class NewCatalogField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_field_data import NewCatalogFieldData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_field_data.py b/rootly_sdk/models/new_catalog_field_data.py index 095d3491..f7522a1c 100644 --- a/rootly_sdk/models/new_catalog_field_data.py +++ b/rootly_sdk/models/new_catalog_field_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_catalog_field_data_type import NewCatalogFieldDataType, check_new_catalog_field_data_type +from ..types import UNSET, Unset + +from ..models.new_catalog_field_data_type import check_new_catalog_field_data_type +from ..models.new_catalog_field_data_type import NewCatalogFieldDataType +from typing import cast if TYPE_CHECKING: from ..models.new_catalog_field_data_attributes import NewCatalogFieldDataAttributes @@ -28,6 +32,8 @@ class NewCatalogFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_field_data_attributes import NewCatalogFieldDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_field_data_attributes.py b/rootly_sdk/models/new_catalog_field_data_attributes.py index e6ed87d5..8a5679bc 100644 --- a/rootly_sdk/models/new_catalog_field_data_attributes.py +++ b/rootly_sdk/models/new_catalog_field_data_attributes.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_catalog_field_data_attributes_catalog_type import ( - NewCatalogFieldDataAttributesCatalogType, - check_new_catalog_field_data_attributes_catalog_type, -) -from ..models.new_catalog_field_data_attributes_kind import ( - NewCatalogFieldDataAttributesKind, - check_new_catalog_field_data_attributes_kind, -) from ..types import UNSET, Unset +from ..models.new_catalog_field_data_attributes_catalog_type import check_new_catalog_field_data_attributes_catalog_type +from ..models.new_catalog_field_data_attributes_catalog_type import NewCatalogFieldDataAttributesCatalogType +from ..models.new_catalog_field_data_attributes_kind import check_new_catalog_field_data_attributes_kind +from ..models.new_catalog_field_data_attributes_kind import NewCatalogFieldDataAttributesKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewCatalogFieldDataAttributes") @@ -29,6 +30,8 @@ class NewCatalogFieldDataAttributes: 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. + external_id (None | str | Unset): An external identifier for this catalog field. Must be unique within the + scope. """ name: str @@ -38,6 +41,7 @@ class NewCatalogFieldDataAttributes: position: int | None | Unset = UNSET required: bool | Unset = UNSET catalog_type: NewCatalogFieldDataAttributesCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -64,6 +68,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update( @@ -82,6 +92,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -121,6 +133,15 @@ def _parse_position(data: object) -> int | None | Unset: else: catalog_type = check_new_catalog_field_data_attributes_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + new_catalog_field_data_attributes = cls( name=name, kind=kind, @@ -129,6 +150,7 @@ def _parse_position(data: object) -> int | None | Unset: position=position, required=required, catalog_type=catalog_type, + external_id=external_id, ) return new_catalog_field_data_attributes diff --git a/rootly_sdk/models/new_catalog_property.py b/rootly_sdk/models/new_catalog_property.py index a8c21f3d..03c59dab 100644 --- a/rootly_sdk/models/new_catalog_property.py +++ b/rootly_sdk/models/new_catalog_property.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_catalog_property_data import NewCatalogPropertyData @@ -25,6 +29,8 @@ class NewCatalogProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_property_data import NewCatalogPropertyData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_catalog_property_data.py b/rootly_sdk/models/new_catalog_property_data.py index 2823db19..0d6ae74a 100644 --- a/rootly_sdk/models/new_catalog_property_data.py +++ b/rootly_sdk/models/new_catalog_property_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.new_catalog_property_data_type import check_new_catalog_property_data_type +from ..models.new_catalog_property_data_type import NewCatalogPropertyDataType +from typing import cast if TYPE_CHECKING: from ..models.new_catalog_property_data_attributes import NewCatalogPropertyDataAttributes @@ -28,6 +32,8 @@ class NewCatalogPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_catalog_property_data_attributes import NewCatalogPropertyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_catalog_property_data_attributes.py b/rootly_sdk/models/new_catalog_property_data_attributes.py index 9e42a192..c6d6306e 100644 --- a/rootly_sdk/models/new_catalog_property_data_attributes.py +++ b/rootly_sdk/models/new_catalog_property_data_attributes.py @@ -1,19 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset 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 ..models.new_catalog_property_data_attributes_catalog_type import NewCatalogPropertyDataAttributesCatalogType +from ..models.new_catalog_property_data_attributes_kind import check_new_catalog_property_data_attributes_kind +from ..models.new_catalog_property_data_attributes_kind import NewCatalogPropertyDataAttributesKind from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewCatalogPropertyDataAttributes") @@ -29,6 +32,8 @@ class NewCatalogPropertyDataAttributes: 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. + external_id (None | str | Unset): An external identifier for this catalog property. Must be unique within the + scope. """ name: str @@ -38,6 +43,7 @@ class NewCatalogPropertyDataAttributes: position: int | None | Unset = UNSET required: bool | Unset = UNSET catalog_type: NewCatalogPropertyDataAttributesCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -64,6 +70,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update( @@ -82,6 +94,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -121,6 +135,15 @@ def _parse_position(data: object) -> int | None | Unset: else: catalog_type = check_new_catalog_property_data_attributes_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + new_catalog_property_data_attributes = cls( name=name, kind=kind, @@ -129,6 +152,7 @@ def _parse_position(data: object) -> int | None | Unset: position=position, required=required, catalog_type=catalog_type, + external_id=external_id, ) return new_catalog_property_data_attributes diff --git a/rootly_sdk/models/new_cause.py b/rootly_sdk/models/new_cause.py index 4daf1828..f00eced9 100644 --- a/rootly_sdk/models/new_cause.py +++ b/rootly_sdk/models/new_cause.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_cause_data import NewCauseData @@ -24,6 +28,8 @@ class NewCause: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_cause_data import NewCauseData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_cause_data.py b/rootly_sdk/models/new_cause_data.py index 96dd5a44..3de05de2 100644 --- a/rootly_sdk/models/new_cause_data.py +++ b/rootly_sdk/models/new_cause_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_cause_data_type import NewCauseDataType, check_new_cause_data_type +from ..types import UNSET, Unset + +from ..models.new_cause_data_type import check_new_cause_data_type +from ..models.new_cause_data_type import NewCauseDataType +from typing import cast if TYPE_CHECKING: from ..models.new_cause_data_attributes import NewCauseDataAttributes @@ -28,6 +32,8 @@ class NewCauseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_cause_data_attributes import NewCauseDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_cause_data_attributes.py b/rootly_sdk/models/new_cause_data_attributes.py index f0655b4e..d21e1844 100644 --- a/rootly_sdk/models/new_cause_data_attributes.py +++ b/rootly_sdk/models/new_cause_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_cause_data_attributes_properties_item import NewCauseDataAttributesPropertiesItem @@ -30,6 +34,8 @@ class NewCauseDataAttributes: properties: list[NewCauseDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_cause_data_attributes_properties_item import NewCauseDataAttributesPropertiesItem + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/new_cause_data_attributes_properties_item.py b/rootly_sdk/models/new_cause_data_attributes_properties_item.py index da071245..07f685b5 100644 --- a/rootly_sdk/models/new_cause_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_cause_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewCauseDataAttributesPropertiesItem") diff --git a/rootly_sdk/models/new_communications_group.py b/rootly_sdk/models/new_communications_group.py index 5cf224fc..b34ef0e0 100644 --- a/rootly_sdk/models/new_communications_group.py +++ b/rootly_sdk/models/new_communications_group.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_communications_group_data import NewCommunicationsGroupData @@ -24,6 +28,8 @@ class NewCommunicationsGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_group_data import NewCommunicationsGroupData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_communications_group_data.py b/rootly_sdk/models/new_communications_group_data.py index 19358383..da0c2046 100644 --- a/rootly_sdk/models/new_communications_group_data.py +++ b/rootly_sdk/models/new_communications_group_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_communications_group_data_type import ( - NewCommunicationsGroupDataType, - check_new_communications_group_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_communications_group_data_type import check_new_communications_group_data_type +from ..models.new_communications_group_data_type import NewCommunicationsGroupDataType +from typing import cast if TYPE_CHECKING: from ..models.new_communications_group_data_attributes import NewCommunicationsGroupDataAttributes @@ -31,6 +32,8 @@ class NewCommunicationsGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_group_data_attributes import NewCommunicationsGroupDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_communications_group_data_attributes.py b/rootly_sdk/models/new_communications_group_data_attributes.py index a605c9dc..b60075c7 100644 --- a/rootly_sdk/models/new_communications_group_data_attributes.py +++ b/rootly_sdk/models/new_communications_group_data_attributes.py @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_communications_group_data_attributes_condition_type import ( - NewCommunicationsGroupDataAttributesConditionType, check_new_communications_group_data_attributes_condition_type, ) +from ..models.new_communications_group_data_attributes_condition_type import ( + NewCommunicationsGroupDataAttributesConditionType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_communications_group_data_attributes_communication_external_group_members_type_0_item import ( @@ -60,6 +66,13 @@ class NewCommunicationsGroupDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_group_data_attributes_communication_group_conditions_type_0_item import ( + NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item, + ) + from ..models.new_communications_group_data_attributes_communication_external_group_members_type_0_item import ( + NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item, + ) + name = self.name communication_type_id = self.communication_type_id 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 4cb512ee..f9970489 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item") 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 06d190a0..f1c17c7b 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type import ( - NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType, check_new_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type, ) +from ..models.new_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type import ( + NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item") diff --git a/rootly_sdk/models/new_communications_stage.py b/rootly_sdk/models/new_communications_stage.py index d11ef2f1..17619d51 100644 --- a/rootly_sdk/models/new_communications_stage.py +++ b/rootly_sdk/models/new_communications_stage.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_communications_stage_data import NewCommunicationsStageData @@ -24,6 +28,8 @@ class NewCommunicationsStage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_stage_data import NewCommunicationsStageData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_communications_stage_data.py b/rootly_sdk/models/new_communications_stage_data.py index e805f5f3..b6b42aa3 100644 --- a/rootly_sdk/models/new_communications_stage_data.py +++ b/rootly_sdk/models/new_communications_stage_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_communications_stage_data_type import ( - NewCommunicationsStageDataType, - check_new_communications_stage_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_communications_stage_data_type import check_new_communications_stage_data_type +from ..models.new_communications_stage_data_type import NewCommunicationsStageDataType +from typing import cast if TYPE_CHECKING: from ..models.new_communications_stage_data_attributes import NewCommunicationsStageDataAttributes @@ -31,6 +32,8 @@ class NewCommunicationsStageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_stage_data_attributes import NewCommunicationsStageDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_communications_stage_data_attributes.py b/rootly_sdk/models/new_communications_stage_data_attributes.py index 625f18e7..50ddece2 100644 --- a/rootly_sdk/models/new_communications_stage_data_attributes.py +++ b/rootly_sdk/models/new_communications_stage_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewCommunicationsStageDataAttributes") diff --git a/rootly_sdk/models/new_communications_template.py b/rootly_sdk/models/new_communications_template.py index d92e27ed..57b22779 100644 --- a/rootly_sdk/models/new_communications_template.py +++ b/rootly_sdk/models/new_communications_template.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_communications_template_data import NewCommunicationsTemplateData @@ -24,6 +28,8 @@ class NewCommunicationsTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_template_data import NewCommunicationsTemplateData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_communications_template_data.py b/rootly_sdk/models/new_communications_template_data.py index 36258107..27363e95 100644 --- a/rootly_sdk/models/new_communications_template_data.py +++ b/rootly_sdk/models/new_communications_template_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_communications_template_data_type import ( - NewCommunicationsTemplateDataType, - check_new_communications_template_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_communications_template_data_type import check_new_communications_template_data_type +from ..models.new_communications_template_data_type import NewCommunicationsTemplateDataType +from typing import cast if TYPE_CHECKING: from ..models.new_communications_template_data_attributes import NewCommunicationsTemplateDataAttributes @@ -31,6 +32,8 @@ class NewCommunicationsTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_template_data_attributes import NewCommunicationsTemplateDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_communications_template_data_attributes.py b/rootly_sdk/models/new_communications_template_data_attributes.py index 32c12e4a..da8e4a02 100644 --- a/rootly_sdk/models/new_communications_template_data_attributes.py +++ b/rootly_sdk/models/new_communications_template_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_communications_template_data_attributes_communication_template_stages_attributes_type_0_item import ( NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item, @@ -38,6 +42,10 @@ class NewCommunicationsTemplateDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_template_data_attributes_communication_template_stages_attributes_type_0_item import ( + NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item, + ) + name = self.name communication_type_id = self.communication_type_id 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 07f47a09..0b8977d2 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item") diff --git a/rootly_sdk/models/new_communications_type.py b/rootly_sdk/models/new_communications_type.py index 078ae90a..97472ef9 100644 --- a/rootly_sdk/models/new_communications_type.py +++ b/rootly_sdk/models/new_communications_type.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_communications_type_data import NewCommunicationsTypeData @@ -24,6 +28,8 @@ class NewCommunicationsType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_type_data import NewCommunicationsTypeData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_communications_type_data.py b/rootly_sdk/models/new_communications_type_data.py index 435176de..7812bd27 100644 --- a/rootly_sdk/models/new_communications_type_data.py +++ b/rootly_sdk/models/new_communications_type_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_communications_type_data_type import ( - NewCommunicationsTypeDataType, - check_new_communications_type_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_communications_type_data_type import check_new_communications_type_data_type +from ..models.new_communications_type_data_type import NewCommunicationsTypeDataType +from typing import cast if TYPE_CHECKING: from ..models.new_communications_type_data_attributes import NewCommunicationsTypeDataAttributes @@ -31,6 +32,8 @@ class NewCommunicationsTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_communications_type_data_attributes import NewCommunicationsTypeDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_communications_type_data_attributes.py b/rootly_sdk/models/new_communications_type_data_attributes.py index 3d65eda4..deaf518c 100644 --- a/rootly_sdk/models/new_communications_type_data_attributes.py +++ b/rootly_sdk/models/new_communications_type_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewCommunicationsTypeDataAttributes") diff --git a/rootly_sdk/models/new_custom_field.py b/rootly_sdk/models/new_custom_field.py index 837b303d..b65177ad 100644 --- a/rootly_sdk/models/new_custom_field.py +++ b/rootly_sdk/models/new_custom_field.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_custom_field_data import NewCustomFieldData @@ -24,6 +28,8 @@ class NewCustomField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_custom_field_data import NewCustomFieldData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_custom_field_data.py b/rootly_sdk/models/new_custom_field_data.py index f6f5a39d..ced5487c 100644 --- a/rootly_sdk/models/new_custom_field_data.py +++ b/rootly_sdk/models/new_custom_field_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_custom_field_data_type import NewCustomFieldDataType, check_new_custom_field_data_type +from ..types import UNSET, Unset + +from ..models.new_custom_field_data_type import check_new_custom_field_data_type +from ..models.new_custom_field_data_type import NewCustomFieldDataType +from typing import cast if TYPE_CHECKING: from ..models.new_custom_field_data_attributes import NewCustomFieldDataAttributes @@ -28,6 +32,8 @@ class NewCustomFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_custom_field_data_attributes import NewCustomFieldDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_custom_field_data_attributes.py b/rootly_sdk/models/new_custom_field_data_attributes.py index f91d2f06..6418f1a4 100644 --- a/rootly_sdk/models/new_custom_field_data_attributes.py +++ b/rootly_sdk/models/new_custom_field_data_attributes.py @@ -1,19 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_custom_field_data_attributes_required_type_0_item import ( - NewCustomFieldDataAttributesRequiredType0Item, check_new_custom_field_data_attributes_required_type_0_item, ) -from ..models.new_custom_field_data_attributes_shown_item import ( - NewCustomFieldDataAttributesShownItem, - check_new_custom_field_data_attributes_shown_item, -) +from ..models.new_custom_field_data_attributes_required_type_0_item import NewCustomFieldDataAttributesRequiredType0Item +from ..models.new_custom_field_data_attributes_shown_item import check_new_custom_field_data_attributes_shown_item +from ..models.new_custom_field_data_attributes_shown_item import NewCustomFieldDataAttributesShownItem from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewCustomFieldDataAttributes") diff --git a/rootly_sdk/models/new_custom_field_option.py b/rootly_sdk/models/new_custom_field_option.py index 818c5ca1..32be86b5 100644 --- a/rootly_sdk/models/new_custom_field_option.py +++ b/rootly_sdk/models/new_custom_field_option.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_custom_field_option_data import NewCustomFieldOptionData @@ -24,6 +28,8 @@ class NewCustomFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_custom_field_option_data import NewCustomFieldOptionData + data = self.data.to_dict() field_dict: 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 e1cd69c1..379d39ad 100644 --- a/rootly_sdk/models/new_custom_field_option_data.py +++ b/rootly_sdk/models/new_custom_field_option_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_custom_field_option_data_type import ( - NewCustomFieldOptionDataType, - check_new_custom_field_option_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_custom_field_option_data_type import check_new_custom_field_option_data_type +from ..models.new_custom_field_option_data_type import NewCustomFieldOptionDataType +from typing import cast if TYPE_CHECKING: from ..models.new_custom_field_option_data_attributes import NewCustomFieldOptionDataAttributes @@ -31,6 +32,8 @@ class NewCustomFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_custom_field_option_data_attributes import NewCustomFieldOptionDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 327dadf0..28325b4f 100644 --- a/rootly_sdk/models/new_custom_field_option_data_attributes.py +++ b/rootly_sdk/models/new_custom_field_option_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewCustomFieldOptionDataAttributes") diff --git a/rootly_sdk/models/new_custom_form.py b/rootly_sdk/models/new_custom_form.py index 82676702..f8f40254 100644 --- a/rootly_sdk/models/new_custom_form.py +++ b/rootly_sdk/models/new_custom_form.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_custom_form_data import NewCustomFormData @@ -24,6 +28,8 @@ class NewCustomForm: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_custom_form_data import NewCustomFormData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_custom_form_data.py b/rootly_sdk/models/new_custom_form_data.py index 426c7e13..f4be0b5d 100644 --- a/rootly_sdk/models/new_custom_form_data.py +++ b/rootly_sdk/models/new_custom_form_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_custom_form_data_type import NewCustomFormDataType, check_new_custom_form_data_type +from ..types import UNSET, Unset + +from ..models.new_custom_form_data_type import check_new_custom_form_data_type +from ..models.new_custom_form_data_type import NewCustomFormDataType +from typing import cast if TYPE_CHECKING: from ..models.new_custom_form_data_attributes import NewCustomFormDataAttributes @@ -28,6 +32,8 @@ class NewCustomFormData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_custom_form_data_attributes import NewCustomFormDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_custom_form_data_attributes.py b/rootly_sdk/models/new_custom_form_data_attributes.py index 747cac35..3b2d4d55 100644 --- a/rootly_sdk/models/new_custom_form_data_attributes.py +++ b/rootly_sdk/models/new_custom_form_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewCustomFormDataAttributes") diff --git a/rootly_sdk/models/new_dashboard.py b/rootly_sdk/models/new_dashboard.py index 108a2f0f..2c3c34f2 100644 --- a/rootly_sdk/models/new_dashboard.py +++ b/rootly_sdk/models/new_dashboard.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_dashboard_data import NewDashboardData @@ -24,6 +28,8 @@ class NewDashboard: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_dashboard_data import NewDashboardData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_dashboard_data.py b/rootly_sdk/models/new_dashboard_data.py index b4f8d6aa..e82062af 100644 --- a/rootly_sdk/models/new_dashboard_data.py +++ b/rootly_sdk/models/new_dashboard_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_dashboard_data_type import NewDashboardDataType, check_new_dashboard_data_type +from ..types import UNSET, Unset + +from ..models.new_dashboard_data_type import check_new_dashboard_data_type +from ..models.new_dashboard_data_type import NewDashboardDataType +from typing import cast if TYPE_CHECKING: from ..models.new_dashboard_data_attributes import NewDashboardDataAttributes @@ -28,6 +32,8 @@ class NewDashboardData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_dashboard_data_attributes import NewDashboardDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_dashboard_data_attributes.py b/rootly_sdk/models/new_dashboard_data_attributes.py index 95617d9a..fe8c96f4 100644 --- a/rootly_sdk/models/new_dashboard_data_attributes.py +++ b/rootly_sdk/models/new_dashboard_data_attributes.py @@ -1,24 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_dashboard_data_attributes_color import ( - NewDashboardDataAttributesColor, - check_new_dashboard_data_attributes_color, -) -from ..models.new_dashboard_data_attributes_owner import ( - NewDashboardDataAttributesOwner, - check_new_dashboard_data_attributes_owner, -) -from ..models.new_dashboard_data_attributes_period import ( - NewDashboardDataAttributesPeriod, - check_new_dashboard_data_attributes_period, -) from ..types import UNSET, Unset +from ..models.new_dashboard_data_attributes_color import check_new_dashboard_data_attributes_color +from ..models.new_dashboard_data_attributes_color import NewDashboardDataAttributesColor +from ..models.new_dashboard_data_attributes_owner import check_new_dashboard_data_attributes_owner +from ..models.new_dashboard_data_attributes_owner import NewDashboardDataAttributesOwner +from ..models.new_dashboard_data_attributes_period import check_new_dashboard_data_attributes_period +from ..models.new_dashboard_data_attributes_period import NewDashboardDataAttributesPeriod +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewDashboardDataAttributes") diff --git a/rootly_sdk/models/new_dashboard_panel.py b/rootly_sdk/models/new_dashboard_panel.py index 5683778a..53477f21 100644 --- a/rootly_sdk/models/new_dashboard_panel.py +++ b/rootly_sdk/models/new_dashboard_panel.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_dashboard_panel_data import NewDashboardPanelData @@ -24,6 +28,8 @@ class NewDashboardPanel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_dashboard_panel_data import NewDashboardPanelData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_dashboard_panel_data.py b/rootly_sdk/models/new_dashboard_panel_data.py index 28985bdf..da0d3a29 100644 --- a/rootly_sdk/models/new_dashboard_panel_data.py +++ b/rootly_sdk/models/new_dashboard_panel_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_dashboard_panel_data_type import NewDashboardPanelDataType, check_new_dashboard_panel_data_type +from ..types import UNSET, Unset + +from ..models.new_dashboard_panel_data_type import check_new_dashboard_panel_data_type +from ..models.new_dashboard_panel_data_type import NewDashboardPanelDataType +from typing import cast if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes import NewDashboardPanelDataAttributes @@ -28,6 +32,8 @@ class NewDashboardPanelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_dashboard_panel_data_attributes import NewDashboardPanelDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes.py b/rootly_sdk/models/new_dashboard_panel_data_attributes.py index 3571d9eb..18d8b63e 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes_params import NewDashboardPanelDataAttributesParams from ..models.new_dashboard_panel_data_attributes_position_type_0 import ( @@ -34,6 +38,7 @@ def to_dict(self) -> dict[str, Any]: from ..models.new_dashboard_panel_data_attributes_position_type_0 import ( NewDashboardPanelDataAttributesPositionType0, ) + from ..models.new_dashboard_panel_data_attributes_params import NewDashboardPanelDataAttributesParams params = self.params.to_dict() 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 3bb4b26d..8a4ec239 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_dashboard_panel_data_attributes_params_display import ( - NewDashboardPanelDataAttributesParamsDisplay, check_new_dashboard_panel_data_attributes_params_display, ) +from ..models.new_dashboard_panel_data_attributes_params_display import NewDashboardPanelDataAttributesParamsDisplay from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes_params_datalabels import ( @@ -46,6 +49,16 @@ class NewDashboardPanelDataAttributesParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_dashboard_panel_data_attributes_params_datalabels import ( + NewDashboardPanelDataAttributesParamsDatalabels, + ) + from ..models.new_dashboard_panel_data_attributes_params_legend import ( + NewDashboardPanelDataAttributesParamsLegend, + ) + from ..models.new_dashboard_panel_data_attributes_params_datasets_item import ( + NewDashboardPanelDataAttributesParamsDatasetsItem, + ) + display: str | Unset = UNSET if not isinstance(self.display, Unset): display = self.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 adb508ca..e52a1be1 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsDatalabels") 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 5e2ae7c9..b5f4a4f1 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_dashboard_panel_data_attributes_params_datasets_item_collection import ( - NewDashboardPanelDataAttributesParamsDatasetsItemCollection, check_new_dashboard_panel_data_attributes_params_datasets_item_collection, ) +from ..models.new_dashboard_panel_data_attributes_params_datasets_item_collection import ( + NewDashboardPanelDataAttributesParamsDatasetsItemCollection, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0 import ( @@ -46,6 +51,9 @@ class NewDashboardPanelDataAttributesParamsDatasetsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item import ( + NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem, + ) from ..models.new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0 import ( NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0, ) 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 e3ed83f7..53bd7092 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation import ( - NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation, check_new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation, ) +from ..models.new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation import ( + NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0") 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 eba2d965..6be97c23 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation import ( - NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation, check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation, ) +from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation import ( + NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item import ( @@ -34,6 +39,10 @@ class NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item import ( + NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem, + ) + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.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 1e50dd93..318c2e85 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition import ( - NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition, check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition, ) +from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition import ( + NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition, +) from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation import ( - NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation, check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation, ) +from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation import ( + NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem") 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 7119aaa4..adb3598d 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key import ( - NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key, check_new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key, ) +from ..models.new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key import ( + NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key, +) +from typing import cast + T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0") 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 7628e602..a8c958c5 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_dashboard_panel_data_attributes_params_legend_groups import ( - NewDashboardPanelDataAttributesParamsLegendGroups, check_new_dashboard_panel_data_attributes_params_legend_groups, ) +from ..models.new_dashboard_panel_data_attributes_params_legend_groups import ( + NewDashboardPanelDataAttributesParamsLegendGroups, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsLegend") 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 4937e4d2..d44c91b0 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewDashboardPanelDataAttributesPositionType0") diff --git a/rootly_sdk/models/new_edge_connector.py b/rootly_sdk/models/new_edge_connector.py index ad031287..6441c368 100644 --- a/rootly_sdk/models/new_edge_connector.py +++ b/rootly_sdk/models/new_edge_connector.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_edge_connector_edge_connector import NewEdgeConnectorEdgeConnector @@ -24,6 +28,8 @@ class NewEdgeConnector: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_edge_connector_edge_connector import NewEdgeConnectorEdgeConnector + edge_connector = self.edge_connector.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_edge_connector_action.py b/rootly_sdk/models/new_edge_connector_action.py index 83cba905..4ae6b5e3 100644 --- a/rootly_sdk/models/new_edge_connector_action.py +++ b/rootly_sdk/models/new_edge_connector_action.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_edge_connector_action_action import NewEdgeConnectorActionAction @@ -24,6 +28,8 @@ class NewEdgeConnectorAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_edge_connector_action_action import NewEdgeConnectorActionAction + action = self.action.to_dict() field_dict: 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 de102e90..adf38e3b 100644 --- a/rootly_sdk/models/new_edge_connector_action_action.py +++ b/rootly_sdk/models/new_edge_connector_action_action.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_edge_connector_action_action_action_type import ( - NewEdgeConnectorActionActionActionType, - check_new_edge_connector_action_action_action_type, -) from ..types import UNSET, Unset +from ..models.new_edge_connector_action_action_action_type import check_new_edge_connector_action_action_action_type +from ..models.new_edge_connector_action_action_action_type import NewEdgeConnectorActionActionActionType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_edge_connector_action_action_metadata import NewEdgeConnectorActionActionMetadata @@ -34,6 +35,8 @@ class NewEdgeConnectorActionAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_edge_connector_action_action_metadata import NewEdgeConnectorActionActionMetadata + name = self.name action_type: str = self.action_type 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 19cb7566..2acce08e 100644 --- a/rootly_sdk/models/new_edge_connector_action_action_metadata.py +++ b/rootly_sdk/models/new_edge_connector_action_action_metadata.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_edge_connector_action_action_metadata_icon import ( - NewEdgeConnectorActionActionMetadataIcon, - check_new_edge_connector_action_action_metadata_icon, -) from ..types import UNSET, Unset +from ..models.new_edge_connector_action_action_metadata_icon import check_new_edge_connector_action_action_metadata_icon +from ..models.new_edge_connector_action_action_metadata_icon import NewEdgeConnectorActionActionMetadataIcon +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_edge_connector_action_action_metadata_parameters_type_0_item import ( NewEdgeConnectorActionActionMetadataParametersType0Item, @@ -38,6 +39,10 @@ class NewEdgeConnectorActionActionMetadata: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_edge_connector_action_action_metadata_parameters_type_0_item import ( + NewEdgeConnectorActionActionMetadataParametersType0Item, + ) + description: None | str | Unset if isinstance(self.description, Unset): description = 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 0cce53dd..da9db5f3 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_edge_connector_action_action_metadata_parameters_type_0_item_type import ( - NewEdgeConnectorActionActionMetadataParametersType0ItemType, check_new_edge_connector_action_action_metadata_parameters_type_0_item_type, ) +from ..models.new_edge_connector_action_action_metadata_parameters_type_0_item_type import ( + NewEdgeConnectorActionActionMetadataParametersType0ItemType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewEdgeConnectorActionActionMetadataParametersType0Item") diff --git a/rootly_sdk/models/new_edge_connector_edge_connector.py b/rootly_sdk/models/new_edge_connector_edge_connector.py index c5d16dd9..1fddefe0 100644 --- a/rootly_sdk/models/new_edge_connector_edge_connector.py +++ b/rootly_sdk/models/new_edge_connector_edge_connector.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_edge_connector_edge_connector_status import ( - NewEdgeConnectorEdgeConnectorStatus, - check_new_edge_connector_edge_connector_status, -) from ..types import UNSET, Unset +from ..models.new_edge_connector_edge_connector_status import check_new_edge_connector_edge_connector_status +from ..models.new_edge_connector_edge_connector_status import NewEdgeConnectorEdgeConnectorStatus +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewEdgeConnectorEdgeConnector") diff --git a/rootly_sdk/models/new_environment.py b/rootly_sdk/models/new_environment.py index 2f201db7..8163a74f 100644 --- a/rootly_sdk/models/new_environment.py +++ b/rootly_sdk/models/new_environment.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_environment_data import NewEnvironmentData @@ -24,6 +28,8 @@ class NewEnvironment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_environment_data import NewEnvironmentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_environment_data.py b/rootly_sdk/models/new_environment_data.py index c460b14e..d6c0694f 100644 --- a/rootly_sdk/models/new_environment_data.py +++ b/rootly_sdk/models/new_environment_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_environment_data_type import NewEnvironmentDataType, check_new_environment_data_type +from ..types import UNSET, Unset + +from ..models.new_environment_data_type import check_new_environment_data_type +from ..models.new_environment_data_type import NewEnvironmentDataType +from typing import cast if TYPE_CHECKING: from ..models.new_environment_data_attributes import NewEnvironmentDataAttributes @@ -28,6 +32,8 @@ class NewEnvironmentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_environment_data_attributes import NewEnvironmentDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_environment_data_attributes.py b/rootly_sdk/models/new_environment_data_attributes.py index d86a5dfe..a09fc25d 100644 --- a/rootly_sdk/models/new_environment_data_attributes.py +++ b/rootly_sdk/models/new_environment_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_environment_data_attributes_properties_item import NewEnvironmentDataAttributesPropertiesItem from ..models.new_environment_data_attributes_slack_aliases_type_0_item import ( @@ -28,6 +32,7 @@ class NewEnvironmentDataAttributes: 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 + external_id (None | str | Unset): The external id associated to this 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 @@ -41,12 +46,21 @@ class NewEnvironmentDataAttributes: description: None | str | Unset = UNSET color: None | str | Unset = UNSET position: int | None | Unset = UNSET + external_id: None | str | 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]: + from ..models.new_environment_data_attributes_properties_item import NewEnvironmentDataAttributesPropertiesItem + from ..models.new_environment_data_attributes_slack_channels_type_0_item import ( + NewEnvironmentDataAttributesSlackChannelsType0Item, + ) + from ..models.new_environment_data_attributes_slack_aliases_type_0_item import ( + NewEnvironmentDataAttributesSlackAliasesType0Item, + ) + name = self.name description: None | str | Unset @@ -67,6 +81,12 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET @@ -120,6 +140,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["color"] = color if position is not UNSET: field_dict["position"] = position + if external_id is not UNSET: + field_dict["external_id"] = external_id if notify_emails is not UNSET: field_dict["notify_emails"] = notify_emails if slack_channels is not UNSET: @@ -171,6 +193,15 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data @@ -254,6 +285,7 @@ def _parse_slack_aliases( description=description, color=color, position=position, + external_id=external_id, notify_emails=notify_emails, slack_channels=slack_channels, slack_aliases=slack_aliases, diff --git a/rootly_sdk/models/new_environment_data_attributes_properties_item.py b/rootly_sdk/models/new_environment_data_attributes_properties_item.py index 417ca4ce..6f1bd57b 100644 --- a/rootly_sdk/models/new_environment_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_environment_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewEnvironmentDataAttributesPropertiesItem") 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 cc449822..7e0cd9d3 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewEnvironmentDataAttributesSlackAliasesType0Item") 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 49ec61b3..cd2d0049 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewEnvironmentDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_escalation_policy.py b/rootly_sdk/models/new_escalation_policy.py index 60d3191b..0829bf7d 100644 --- a/rootly_sdk/models/new_escalation_policy.py +++ b/rootly_sdk/models/new_escalation_policy.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_escalation_policy_data import NewEscalationPolicyData @@ -24,6 +28,8 @@ class NewEscalationPolicy: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_escalation_policy_data import NewEscalationPolicyData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_escalation_policy_data.py b/rootly_sdk/models/new_escalation_policy_data.py index df094d83..566d556c 100644 --- a/rootly_sdk/models/new_escalation_policy_data.py +++ b/rootly_sdk/models/new_escalation_policy_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_escalation_policy_data_type import NewEscalationPolicyDataType, check_new_escalation_policy_data_type +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_data_type import check_new_escalation_policy_data_type +from ..models.new_escalation_policy_data_type import NewEscalationPolicyDataType +from typing import cast if TYPE_CHECKING: from ..models.new_escalation_policy_data_attributes import NewEscalationPolicyDataAttributes @@ -28,6 +32,8 @@ class NewEscalationPolicyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_escalation_policy_data_attributes import NewEscalationPolicyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_escalation_policy_data_attributes.py b/rootly_sdk/models/new_escalation_policy_data_attributes.py index ca904842..acd4598c 100644 --- a/rootly_sdk/models/new_escalation_policy_data_attributes.py +++ b/rootly_sdk/models/new_escalation_policy_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_escalation_policy_data_attributes_business_hours_type_0 import ( NewEscalationPolicyDataAttributesBusinessHoursType0, 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 60b5e2e1..a980cd1c 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item import ( - NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item, check_new_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item, ) +from ..models.new_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item import ( + NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item, +) from ..models.new_escalation_policy_data_attributes_business_hours_type_0_time_zone import ( - NewEscalationPolicyDataAttributesBusinessHoursType0TimeZone, check_new_escalation_policy_data_attributes_business_hours_type_0_time_zone, ) +from ..models.new_escalation_policy_data_attributes_business_hours_type_0_time_zone import ( + NewEscalationPolicyDataAttributesBusinessHoursType0TimeZone, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewEscalationPolicyDataAttributesBusinessHoursType0") 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 c73cb5a8..306d49f4 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 @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -306,8 +322,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -323,6 +341,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -334,6 +353,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -388,7 +408,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -409,6 +432,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -418,6 +442,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -524,15 +549,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -572,6 +603,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", diff --git a/rootly_sdk/models/new_escalation_policy_level.py b/rootly_sdk/models/new_escalation_policy_level.py index 9564eea6..4d744267 100644 --- a/rootly_sdk/models/new_escalation_policy_level.py +++ b/rootly_sdk/models/new_escalation_policy_level.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_escalation_policy_level_data import NewEscalationPolicyLevelData @@ -24,6 +28,8 @@ class NewEscalationPolicyLevel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_escalation_policy_level_data import NewEscalationPolicyLevelData + data = self.data.to_dict() field_dict: 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 2e3a2b6b..cd59e7e5 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data.py +++ b/rootly_sdk/models/new_escalation_policy_level_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_escalation_policy_level_data_type import ( - NewEscalationPolicyLevelDataType, - check_new_escalation_policy_level_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_level_data_type import check_new_escalation_policy_level_data_type +from ..models.new_escalation_policy_level_data_type import NewEscalationPolicyLevelDataType +from typing import cast if TYPE_CHECKING: from ..models.new_escalation_policy_level_data_attributes import NewEscalationPolicyLevelDataAttributes @@ -31,6 +32,8 @@ class NewEscalationPolicyLevelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_escalation_policy_level_data_attributes import NewEscalationPolicyLevelDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 247dcb2b..04994317 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data_attributes.py +++ b/rootly_sdk/models/new_escalation_policy_level_data_attributes.py @@ -1,19 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy import ( - NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy, check_new_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy, ) +from ..models.new_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy import ( + NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy, +) from ..models.new_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy import ( - NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy, check_new_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy, ) +from ..models.new_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy import ( + NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0 import ( 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 8a9782da..32d73870 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members import ( - NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers, check_new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members, ) +from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members import ( + NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers, +) from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type import ( - NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type, check_new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type, ) +from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type import ( + NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0") @@ -23,7 +31,8 @@ class NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0: """ Attributes: - id (str): The ID of notification target. If Slack channel, then id of the slack channel (eg. C06Q2JK7RQW) + id (str): The ID of notification target. If Slack channel, then id of the slack channel (eg. C06Q2JK7RQW). If + Microsoft Teams channel, then the Rootly channel UUID. type_ (NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type): The type of the notification target team_members (NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers | Unset): For diff --git a/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py b/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py index 9011ac86..b15dd98e 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py +++ b/rootly_sdk/models/new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py @@ -1,12 +1,13 @@ from typing import Literal, cast NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type = Literal[ - "schedule", "service", "slack_channel", "team", "user" + "microsoft_teams_channel", "schedule", "service", "slack_channel", "team", "user" ] NEW_ESCALATION_POLICY_LEVEL_DATA_ATTRIBUTES_NOTIFICATION_TARGET_PARAMS_ITEM_TYPE_0_TYPE_VALUES: set[ NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type ] = { + "microsoft_teams_channel", "schedule", "service", "slack_channel", diff --git a/rootly_sdk/models/new_escalation_policy_path.py b/rootly_sdk/models/new_escalation_policy_path.py index ad311e9d..1d3ead49 100644 --- a/rootly_sdk/models/new_escalation_policy_path.py +++ b/rootly_sdk/models/new_escalation_policy_path.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_escalation_policy_path_data import NewEscalationPolicyPathData @@ -24,6 +28,8 @@ class NewEscalationPolicyPath: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_escalation_policy_path_data import NewEscalationPolicyPathData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_escalation_policy_path_data.py b/rootly_sdk/models/new_escalation_policy_path_data.py index 355e1ec9..cc9050b9 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data.py +++ b/rootly_sdk/models/new_escalation_policy_path_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_path_data_type import check_new_escalation_policy_path_data_type +from ..models.new_escalation_policy_path_data_type import NewEscalationPolicyPathDataType +from typing import cast if TYPE_CHECKING: from ..models.new_escalation_policy_path_data_attributes import NewEscalationPolicyPathDataAttributes @@ -31,6 +32,8 @@ class NewEscalationPolicyPathData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_escalation_policy_path_data_attributes import NewEscalationPolicyPathDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes.py index b3313c07..e56cb160 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes.py @@ -1,39 +1,69 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset 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_after_deferral_behavior import ( + NewEscalationPolicyPathDataAttributesAfterDeferralBehavior, +) 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_match_mode import ( + NewEscalationPolicyPathDataAttributesMatchMode, +) 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_notification_type import ( + NewEscalationPolicyPathDataAttributesNotificationType, +) 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_path_type import NewEscalationPolicyPathDataAttributesPathType 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 ..models.new_escalation_policy_path_data_attributes_time_restriction_time_zone import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, +) from ..types import UNSET, Unset +from typing import cast 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_rules_item_type_0 import ( + NewEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1 import ( + NewEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2 import ( + NewEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3 import ( + NewEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4 import ( + NewEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5 import ( + NewEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6 import ( + NewEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7 import ( + NewEscalationPolicyPathDataAttributesRulesItemType7, + ) from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item import ( NewEscalationPolicyPathDataAttributesTimeRestrictionsItem, ) @@ -63,9 +93,11 @@ class NewEscalationPolicyPathDataAttributes: 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 + rules (list[NewEscalationPolicyPathDataAttributesRulesItemType0 | + NewEscalationPolicyPathDataAttributesRulesItemType1 | NewEscalationPolicyPathDataAttributesRulesItemType2 | + NewEscalationPolicyPathDataAttributesRulesItemType3 | NewEscalationPolicyPathDataAttributesRulesItemType4 | + NewEscalationPolicyPathDataAttributesRulesItemType5 | NewEscalationPolicyPathDataAttributesRulesItemType6 | + NewEscalationPolicyPathDataAttributesRulesItemType7] | Unset): Escalation path conditions time_restriction_time_zone (NewEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset): Time zone used for time restrictions. time_restrictions (list[NewEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset): If time @@ -86,12 +118,14 @@ class NewEscalationPolicyPathDataAttributes: initial_delay: int | Unset = UNSET rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour + NewEscalationPolicyPathDataAttributesRulesItemType0 + | NewEscalationPolicyPathDataAttributesRulesItemType1 + | NewEscalationPolicyPathDataAttributesRulesItemType2 + | NewEscalationPolicyPathDataAttributesRulesItemType3 + | NewEscalationPolicyPathDataAttributesRulesItemType4 + | NewEscalationPolicyPathDataAttributesRulesItemType5 + | NewEscalationPolicyPathDataAttributesRulesItemType6 + | NewEscalationPolicyPathDataAttributesRulesItemType7 ] | Unset ) = UNSET @@ -99,11 +133,33 @@ class NewEscalationPolicyPathDataAttributes: 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 + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6 import ( + NewEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5 import ( + NewEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2 import ( + NewEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3 import ( + NewEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItem, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4 import ( + NewEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1 import ( + NewEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0 import ( + NewEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7 import ( + NewEscalationPolicyPathDataAttributesRulesItemType7, + ) name = self.name @@ -156,15 +212,19 @@ def to_dict(self) -> dict[str, Any]: rules = [] for rules_item_data in self.rules: rules_item: dict[str, Any] - if isinstance(rules_item_data, EscalationPathRuleAlertUrgency): + if isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType1): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleWorkingHour): + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType2): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleJsonPath): + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType3): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleField): + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType4): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleService): + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, NewEscalationPolicyPathDataAttributesRulesItemType6): rules_item = rules_item_data.to_dict() else: rules_item = rules_item_data.to_dict() @@ -220,12 +280,30 @@ def to_dict(self) -> dict[str, Any]: @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_rules_item_type_0 import ( + NewEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1 import ( + NewEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2 import ( + NewEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3 import ( + NewEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4 import ( + NewEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5 import ( + NewEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6 import ( + NewEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7 import ( + NewEscalationPolicyPathDataAttributesRulesItemType7, + ) from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item import ( NewEscalationPolicyPathDataAttributesTimeRestrictionsItem, ) @@ -306,12 +384,14 @@ def _parse_repeat_count(data: object) -> int | None | Unset: _rules = d.pop("rules", UNSET) rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour + NewEscalationPolicyPathDataAttributesRulesItemType0 + | NewEscalationPolicyPathDataAttributesRulesItemType1 + | NewEscalationPolicyPathDataAttributesRulesItemType2 + | NewEscalationPolicyPathDataAttributesRulesItemType3 + | NewEscalationPolicyPathDataAttributesRulesItemType4 + | NewEscalationPolicyPathDataAttributesRulesItemType5 + | NewEscalationPolicyPathDataAttributesRulesItemType6 + | NewEscalationPolicyPathDataAttributesRulesItemType7 ] | Unset ) = UNSET @@ -322,17 +402,19 @@ def _parse_repeat_count(data: object) -> int | None | Unset: def _parse_rules_item( data: object, ) -> ( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour + NewEscalationPolicyPathDataAttributesRulesItemType0 + | NewEscalationPolicyPathDataAttributesRulesItemType1 + | NewEscalationPolicyPathDataAttributesRulesItemType2 + | NewEscalationPolicyPathDataAttributesRulesItemType3 + | NewEscalationPolicyPathDataAttributesRulesItemType4 + | NewEscalationPolicyPathDataAttributesRulesItemType5 + | NewEscalationPolicyPathDataAttributesRulesItemType6 + | NewEscalationPolicyPathDataAttributesRulesItemType7 ): try: if not isinstance(data, dict): raise TypeError() - rules_item_type_0 = EscalationPathRuleAlertUrgency.from_dict(data) + rules_item_type_0 = NewEscalationPolicyPathDataAttributesRulesItemType0.from_dict(data) return rules_item_type_0 except (TypeError, ValueError, AttributeError, KeyError): @@ -340,7 +422,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_1 = EscalationPathRuleWorkingHour.from_dict(data) + rules_item_type_1 = NewEscalationPolicyPathDataAttributesRulesItemType1.from_dict(data) return rules_item_type_1 except (TypeError, ValueError, AttributeError, KeyError): @@ -348,7 +430,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_2 = EscalationPathRuleJsonPath.from_dict(data) + rules_item_type_2 = NewEscalationPolicyPathDataAttributesRulesItemType2.from_dict(data) return rules_item_type_2 except (TypeError, ValueError, AttributeError, KeyError): @@ -356,7 +438,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_3 = EscalationPathRuleField.from_dict(data) + rules_item_type_3 = NewEscalationPolicyPathDataAttributesRulesItemType3.from_dict(data) return rules_item_type_3 except (TypeError, ValueError, AttributeError, KeyError): @@ -364,16 +446,32 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_4 = EscalationPathRuleService.from_dict(data) + rules_item_type_4 = NewEscalationPolicyPathDataAttributesRulesItemType4.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 = NewEscalationPolicyPathDataAttributesRulesItemType5.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 = NewEscalationPolicyPathDataAttributesRulesItemType6.from_dict(data) + + return rules_item_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass if not isinstance(data, dict): raise TypeError() - rules_item_type_5 = EscalationPathRuleDeferralWindow.from_dict(data) + rules_item_type_7 = NewEscalationPolicyPathDataAttributesRulesItemType7.from_dict(data) - return rules_item_type_5 + return rules_item_type_7 rules_item = _parse_rules_item(rules_item_data) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py new file mode 100644 index 00000000..efa278ed --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType0RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType0") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType0: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType0RuleType): The type of the escalation path rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType0RuleType + 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_new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type(d.pop("rule_type")) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + new_escalation_policy_path_data_attributes_rules_item_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_0.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_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/new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py new file mode 100644 index 00000000..b1dfa9a7 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType0RuleType = Literal["alert_urgency"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType0RuleType +] = { + "alert_urgency", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType0RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py new file mode 100644 index 00000000..39f72e14 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType1RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType1") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType1: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType1RuleType): The type of the escalation path rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType1RuleType + 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_new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type(d.pop("rule_type")) + + within_working_hour = d.pop("within_working_hour") + + new_escalation_policy_path_data_attributes_rules_item_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_1.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_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/new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py new file mode 100644 index 00000000..2c1f68e6 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType1RuleType = Literal["working_hour"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType1RuleType +] = { + "working_hour", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType1RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py new file mode 100644 index 00000000..ba861f26 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_2_operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType2Operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType2RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType2") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType2: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (NewEscalationPolicyPathDataAttributesRulesItemType2Operator): 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: NewEscalationPolicyPathDataAttributesRulesItemType2RuleType + json_path: str + operator: NewEscalationPolicyPathDataAttributesRulesItemType2Operator + 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_new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_new_escalation_policy_path_data_attributes_rules_item_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)) + + new_escalation_policy_path_data_attributes_rules_item_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_2.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_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/new_escalation_policy_path_data_attributes_rules_item_type_2_operator.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_operator.py new file mode 100644 index 00000000..87b1e1e7 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_2_operator( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType2Operator | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py new file mode 100644 index 00000000..24525fa5 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType2RuleType = Literal["json_path"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType2RuleType +] = { + "json_path", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType2RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py new file mode 100644 index 00000000..ad29da8f --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_3_operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType3Operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType3RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType3") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType3: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType3RuleType): 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 (NewEscalationPolicyPathDataAttributesRulesItemType3Operator): How the alert field value should be + matched + values (list[str] | Unset): Values to match against + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType3RuleType + fieldable_type: str + fieldable_id: str + operator: NewEscalationPolicyPathDataAttributesRulesItemType3Operator + 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_new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type(d.pop("rule_type")) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_new_escalation_policy_path_data_attributes_rules_item_type_3_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values", UNSET)) + + new_escalation_policy_path_data_attributes_rules_item_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_3.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_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/new_escalation_policy_path_data_attributes_rules_item_type_3_operator.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_operator.py new file mode 100644 index 00000000..bc9ff796 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType3Operator = 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", +] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType3Operator +] = { + "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_new_escalation_policy_path_data_attributes_rules_item_type_3_operator( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType3Operator | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py new file mode 100644 index 00000000..5e3ed532 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType3RuleType = Literal["field"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType3RuleType +] = { + "field", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType3RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py new file mode 100644 index 00000000..dcaf0d44 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType4RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType4") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType4: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType4RuleType + 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_new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + new_escalation_policy_path_data_attributes_rules_item_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_4.additional_properties = d + return new_escalation_policy_path_data_attributes_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/new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py new file mode 100644 index 00000000..8220fddf --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType4RuleType = Literal["service"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType4RuleType +] = { + "service", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType4RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py new file mode 100644 index 00000000..7ed3af02 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType5RuleType, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType5") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType5: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType5RuleType): The type of the escalation path rule + time_zone (NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone): Time zone for the deferral window + time_blocks (list[NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem]): Time windows during which + alerts are deferred + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType5RuleType + time_zone: NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone + time_blocks: list[NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + 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.new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_new_escalation_policy_path_data_attributes_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 = NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem.from_dict( + time_blocks_item_data + ) + + time_blocks.append(time_blocks_item) + + new_escalation_policy_path_data_attributes_rules_item_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_5.additional_properties = d + return new_escalation_policy_path_data_attributes_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/new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py new file mode 100644 index 00000000..0a9a168d --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType5RuleType = Literal["deferral_window"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType5RuleType +] = { + "deferral_window", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType5RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py new file mode 100644 index 00000000..7159a034 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py @@ -0,0 +1,166 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + 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) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + 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)) + + new_escalation_policy_path_data_attributes_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, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.additional_properties = d + return new_escalation_policy_path_data_attributes_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/new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py new file mode 100644 index 00000000..ade83f44 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py new file mode 100644 index 00000000..b727831c --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_6_operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType6Operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType6RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType6") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType6: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType6RuleType): The type of the escalation path rule + operator (NewEscalationPolicyPathDataAttributesRulesItemType6Operator): How the alert source should be matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType6RuleType + operator: NewEscalationPolicyPathDataAttributesRulesItemType6Operator + values: 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 + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "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_new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type(d.pop("rule_type")) + + operator = check_new_escalation_policy_path_data_attributes_rules_item_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + new_escalation_policy_path_data_attributes_rules_item_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_6.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_6 + + @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_rules_item_type_6_operator.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_operator.py new file mode 100644 index 00000000..f933ec8d --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_operator.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_6_operator( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType6Operator | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py new file mode 100644 index 00000000..e845dc2e --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType6RuleType = Literal["source"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType6RuleType +] = { + "source", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType6RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py new file mode 100644 index 00000000..4871d499 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_7_operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + NewEscalationPolicyPathDataAttributesRulesItemType7Operator, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + check_new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type, +) +from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + NewEscalationPolicyPathDataAttributesRulesItemType7RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType7") + + +@_attrs_define +class NewEscalationPolicyPathDataAttributesRulesItemType7: + """ + Attributes: + rule_type (NewEscalationPolicyPathDataAttributesRulesItemType7RuleType): The type of the escalation path rule + operator (NewEscalationPolicyPathDataAttributesRulesItemType7Operator): Whether the alert must (or must not) + have related incidents + """ + + rule_type: NewEscalationPolicyPathDataAttributesRulesItemType7RuleType + operator: NewEscalationPolicyPathDataAttributesRulesItemType7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type(d.pop("rule_type")) + + operator = check_new_escalation_policy_path_data_attributes_rules_item_type_7_operator(d.pop("operator")) + + new_escalation_policy_path_data_attributes_rules_item_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + new_escalation_policy_path_data_attributes_rules_item_type_7.additional_properties = d + return new_escalation_policy_path_data_attributes_rules_item_type_7 + + @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_rules_item_type_7_operator.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_operator.py new file mode 100644 index 00000000..57e6eef1 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType7Operator = Literal["is_not_set", "is_set"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_7_operator( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType7Operator | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py new file mode 100644 index 00000000..0b7e76b5 --- /dev/null +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +NewEscalationPolicyPathDataAttributesRulesItemType7RuleType = Literal["related_incidents"] + +NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: set[ + NewEscalationPolicyPathDataAttributesRulesItemType7RuleType +] = { + "related_incidents", +} + + +def check_new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type( + value: str | None, +) -> NewEscalationPolicyPathDataAttributesRulesItemType7RuleType | None: + if value is None: + return None + if value in NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: + return cast(NewEscalationPolicyPathDataAttributesRulesItemType7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py index 750288dc..8f8492c7 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_time_restriction_time_zone.py @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -306,8 +322,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -323,6 +341,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -334,6 +353,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -388,7 +408,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -409,6 +432,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -418,6 +442,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -524,15 +549,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -572,6 +603,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", 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 index 6b6d14be..43fbd635 100644 --- 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 @@ -1,19 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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_end_day import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, +) 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, ) +from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item_start_day import ( + NewEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay, +) +from typing import cast + T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesTimeRestrictionsItem") diff --git a/rootly_sdk/models/new_form_field.py b/rootly_sdk/models/new_form_field.py index 23c1709b..26f39f18 100644 --- a/rootly_sdk/models/new_form_field.py +++ b/rootly_sdk/models/new_form_field.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_form_field_data import NewFormFieldData @@ -24,6 +28,8 @@ class NewFormField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_data import NewFormFieldData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_form_field_data.py b/rootly_sdk/models/new_form_field_data.py index 62d7fcd6..53c419cd 100644 --- a/rootly_sdk/models/new_form_field_data.py +++ b/rootly_sdk/models/new_form_field_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_form_field_data_type import NewFormFieldDataType, check_new_form_field_data_type +from ..types import UNSET, Unset + +from ..models.new_form_field_data_type import check_new_form_field_data_type +from ..models.new_form_field_data_type import NewFormFieldDataType +from typing import cast if TYPE_CHECKING: from ..models.new_form_field_data_attributes import NewFormFieldDataAttributes @@ -28,6 +32,8 @@ class NewFormFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_data_attributes import NewFormFieldDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_form_field_data_attributes.py b/rootly_sdk/models/new_form_field_data_attributes.py index b33f425d..b289e241 100644 --- a/rootly_sdk/models/new_form_field_data_attributes.py +++ b/rootly_sdk/models/new_form_field_data_attributes.py @@ -1,24 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_form_field_data_attributes_input_kind import ( - NewFormFieldDataAttributesInputKind, - check_new_form_field_data_attributes_input_kind, -) -from ..models.new_form_field_data_attributes_kind import ( - NewFormFieldDataAttributesKind, - check_new_form_field_data_attributes_kind, -) -from ..models.new_form_field_data_attributes_value_kind import ( - NewFormFieldDataAttributesValueKind, - check_new_form_field_data_attributes_value_kind, -) from ..types import UNSET, Unset +from ..models.new_form_field_data_attributes_input_kind import check_new_form_field_data_attributes_input_kind +from ..models.new_form_field_data_attributes_input_kind import NewFormFieldDataAttributesInputKind +from ..models.new_form_field_data_attributes_kind import check_new_form_field_data_attributes_kind +from ..models.new_form_field_data_attributes_kind import NewFormFieldDataAttributesKind +from ..models.new_form_field_data_attributes_value_kind import check_new_form_field_data_attributes_value_kind +from ..models.new_form_field_data_attributes_value_kind import NewFormFieldDataAttributesValueKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewFormFieldDataAttributes") diff --git a/rootly_sdk/models/new_form_field_data_attributes_kind.py b/rootly_sdk/models/new_form_field_data_attributes_kind.py index 6d6e648d..44de3a00 100644 --- a/rootly_sdk/models/new_form_field_data_attributes_kind.py +++ b/rootly_sdk/models/new_form_field_data_attributes_kind.py @@ -25,6 +25,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", @@ -58,6 +59,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", diff --git a/rootly_sdk/models/new_form_field_option.py b/rootly_sdk/models/new_form_field_option.py index 88305549..3bd5c9fa 100644 --- a/rootly_sdk/models/new_form_field_option.py +++ b/rootly_sdk/models/new_form_field_option.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_form_field_option_data import NewFormFieldOptionData @@ -24,6 +28,8 @@ class NewFormFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_option_data import NewFormFieldOptionData + data = self.data.to_dict() field_dict: 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 4bd5f1a1..5f8d4d93 100644 --- a/rootly_sdk/models/new_form_field_option_data.py +++ b/rootly_sdk/models/new_form_field_option_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_form_field_option_data_type import NewFormFieldOptionDataType, check_new_form_field_option_data_type +from ..types import UNSET, Unset + +from ..models.new_form_field_option_data_type import check_new_form_field_option_data_type +from ..models.new_form_field_option_data_type import NewFormFieldOptionDataType +from typing import cast if TYPE_CHECKING: from ..models.new_form_field_option_data_attributes import NewFormFieldOptionDataAttributes @@ -28,6 +32,8 @@ class NewFormFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_option_data_attributes import NewFormFieldOptionDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 b9f918b7..3b96e873 100644 --- a/rootly_sdk/models/new_form_field_option_data_attributes.py +++ b/rootly_sdk/models/new_form_field_option_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewFormFieldOptionDataAttributes") diff --git a/rootly_sdk/models/new_form_field_placement.py b/rootly_sdk/models/new_form_field_placement.py index 0bcb1658..0fb57a98 100644 --- a/rootly_sdk/models/new_form_field_placement.py +++ b/rootly_sdk/models/new_form_field_placement.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_form_field_placement_data import NewFormFieldPlacementData @@ -24,6 +28,8 @@ class NewFormFieldPlacement: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_placement_data import NewFormFieldPlacementData + data = self.data.to_dict() field_dict: 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 bfe8014b..9418b228 100644 --- a/rootly_sdk/models/new_form_field_placement_condition.py +++ b/rootly_sdk/models/new_form_field_placement_condition.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_form_field_placement_condition_data import NewFormFieldPlacementConditionData @@ -24,6 +28,8 @@ class NewFormFieldPlacementCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_placement_condition_data import NewFormFieldPlacementConditionData + data = self.data.to_dict() field_dict: 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 76c152f4..feace383 100644 --- a/rootly_sdk/models/new_form_field_placement_condition_data.py +++ b/rootly_sdk/models/new_form_field_placement_condition_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_form_field_placement_condition_data_type import ( - NewFormFieldPlacementConditionDataType, - check_new_form_field_placement_condition_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_form_field_placement_condition_data_type import check_new_form_field_placement_condition_data_type +from ..models.new_form_field_placement_condition_data_type import NewFormFieldPlacementConditionDataType +from typing import cast if TYPE_CHECKING: from ..models.new_form_field_placement_condition_data_attributes import NewFormFieldPlacementConditionDataAttributes @@ -31,6 +32,10 @@ class NewFormFieldPlacementConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_placement_condition_data_attributes import ( + NewFormFieldPlacementConditionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 eef1987c..41b5b8d6 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_form_field_placement_condition_data_attributes_comparison import ( - NewFormFieldPlacementConditionDataAttributesComparison, check_new_form_field_placement_condition_data_attributes_comparison, ) +from ..models.new_form_field_placement_condition_data_attributes_comparison import ( + NewFormFieldPlacementConditionDataAttributesComparison, +) from ..models.new_form_field_placement_condition_data_attributes_conditioned import ( - NewFormFieldPlacementConditionDataAttributesConditioned, check_new_form_field_placement_condition_data_attributes_conditioned, ) +from ..models.new_form_field_placement_condition_data_attributes_conditioned import ( + NewFormFieldPlacementConditionDataAttributesConditioned, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewFormFieldPlacementConditionDataAttributes") diff --git a/rootly_sdk/models/new_form_field_placement_data.py b/rootly_sdk/models/new_form_field_placement_data.py index 4e2ff019..a82e90d6 100644 --- a/rootly_sdk/models/new_form_field_placement_data.py +++ b/rootly_sdk/models/new_form_field_placement_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_form_field_placement_data_type import ( - NewFormFieldPlacementDataType, - check_new_form_field_placement_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_form_field_placement_data_type import check_new_form_field_placement_data_type +from ..models.new_form_field_placement_data_type import NewFormFieldPlacementDataType +from typing import cast if TYPE_CHECKING: from ..models.new_form_field_placement_data_attributes import NewFormFieldPlacementDataAttributes @@ -31,6 +32,8 @@ class NewFormFieldPlacementData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_placement_data_attributes import NewFormFieldPlacementDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 a424cde9..b5d25099 100644 --- a/rootly_sdk/models/new_form_field_placement_data_attributes.py +++ b/rootly_sdk/models/new_form_field_placement_data_attributes.py @@ -1,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_form_field_placement_data_attributes_placement_operator import ( - NewFormFieldPlacementDataAttributesPlacementOperator, check_new_form_field_placement_data_attributes_placement_operator, ) +from ..models.new_form_field_placement_data_attributes_placement_operator import ( + NewFormFieldPlacementDataAttributesPlacementOperator, +) from ..models.new_form_field_placement_data_attributes_required_operator import ( - NewFormFieldPlacementDataAttributesRequiredOperator, check_new_form_field_placement_data_attributes_required_operator, ) +from ..models.new_form_field_placement_data_attributes_required_operator import ( + NewFormFieldPlacementDataAttributesRequiredOperator, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewFormFieldPlacementDataAttributes") diff --git a/rootly_sdk/models/new_form_field_position.py b/rootly_sdk/models/new_form_field_position.py index 64dfd111..a34ac990 100644 --- a/rootly_sdk/models/new_form_field_position.py +++ b/rootly_sdk/models/new_form_field_position.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_form_field_position_data import NewFormFieldPositionData @@ -24,6 +28,8 @@ class NewFormFieldPosition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_position_data import NewFormFieldPositionData + data = self.data.to_dict() field_dict: 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 d470c33e..af1e88d0 100644 --- a/rootly_sdk/models/new_form_field_position_data.py +++ b/rootly_sdk/models/new_form_field_position_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_form_field_position_data_type import ( - NewFormFieldPositionDataType, - check_new_form_field_position_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_form_field_position_data_type import check_new_form_field_position_data_type +from ..models.new_form_field_position_data_type import NewFormFieldPositionDataType +from typing import cast if TYPE_CHECKING: from ..models.new_form_field_position_data_attributes import NewFormFieldPositionDataAttributes @@ -31,6 +32,8 @@ class NewFormFieldPositionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_field_position_data_attributes import NewFormFieldPositionDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 8bbc0e05..a55600d7 100644 --- a/rootly_sdk/models/new_form_field_position_data_attributes.py +++ b/rootly_sdk/models/new_form_field_position_data_attributes.py @@ -1,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_form_field_position_data_attributes_form import check_new_form_field_position_data_attributes_form +from ..models.new_form_field_position_data_attributes_form import NewFormFieldPositionDataAttributesForm +from typing import cast -from ..models.new_form_field_position_data_attributes_form import ( - NewFormFieldPositionDataAttributesForm, - check_new_form_field_position_data_attributes_form, -) T = TypeVar("T", bound="NewFormFieldPositionDataAttributes") diff --git a/rootly_sdk/models/new_form_field_position_data_attributes_form.py b/rootly_sdk/models/new_form_field_position_data_attributes_form.py index 1c6994a7..7903b4c1 100644 --- a/rootly_sdk/models/new_form_field_position_data_attributes_form.py +++ b/rootly_sdk/models/new_form_field_position_data_attributes_form.py @@ -2,6 +2,7 @@ NewFormFieldPositionDataAttributesForm = Literal[ "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -10,6 +11,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", @@ -22,6 +24,7 @@ NEW_FORM_FIELD_POSITION_DATA_ATTRIBUTES_FORM_VALUES: set[NewFormFieldPositionDataAttributesForm] = { "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -30,6 +33,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", diff --git a/rootly_sdk/models/new_form_set.py b/rootly_sdk/models/new_form_set.py index f8cc6714..9b41da55 100644 --- a/rootly_sdk/models/new_form_set.py +++ b/rootly_sdk/models/new_form_set.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_form_set_data import NewFormSetData @@ -24,6 +28,8 @@ class NewFormSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_set_data import NewFormSetData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_form_set_condition.py b/rootly_sdk/models/new_form_set_condition.py index 10ca9707..126e70ae 100644 --- a/rootly_sdk/models/new_form_set_condition.py +++ b/rootly_sdk/models/new_form_set_condition.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_form_set_condition_data import NewFormSetConditionData @@ -24,6 +28,8 @@ class NewFormSetCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_set_condition_data import NewFormSetConditionData + data = self.data.to_dict() field_dict: 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 782a46c9..fd61cfb6 100644 --- a/rootly_sdk/models/new_form_set_condition_data.py +++ b/rootly_sdk/models/new_form_set_condition_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_form_set_condition_data_type import ( - NewFormSetConditionDataType, - check_new_form_set_condition_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_form_set_condition_data_type import check_new_form_set_condition_data_type +from ..models.new_form_set_condition_data_type import NewFormSetConditionDataType +from typing import cast if TYPE_CHECKING: from ..models.new_form_set_condition_data_attributes import NewFormSetConditionDataAttributes @@ -31,6 +32,8 @@ class NewFormSetConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_set_condition_data_attributes import NewFormSetConditionDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 072db657..b21fb518 100644 --- a/rootly_sdk/models/new_form_set_condition_data_attributes.py +++ b/rootly_sdk/models/new_form_set_condition_data_attributes.py @@ -1,15 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_form_set_condition_data_attributes_comparison import ( - NewFormSetConditionDataAttributesComparison, check_new_form_set_condition_data_attributes_comparison, ) +from ..models.new_form_set_condition_data_attributes_comparison import NewFormSetConditionDataAttributesComparison +from typing import cast + T = TypeVar("T", bound="NewFormSetConditionDataAttributes") diff --git a/rootly_sdk/models/new_form_set_data.py b/rootly_sdk/models/new_form_set_data.py index 18988ea0..a574695b 100644 --- a/rootly_sdk/models/new_form_set_data.py +++ b/rootly_sdk/models/new_form_set_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_form_set_data_type import NewFormSetDataType, check_new_form_set_data_type +from ..types import UNSET, Unset + +from ..models.new_form_set_data_type import check_new_form_set_data_type +from ..models.new_form_set_data_type import NewFormSetDataType +from typing import cast if TYPE_CHECKING: from ..models.new_form_set_data_attributes import NewFormSetDataAttributes @@ -28,6 +32,8 @@ class NewFormSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_form_set_data_attributes import NewFormSetDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_form_set_data_attributes.py b/rootly_sdk/models/new_form_set_data_attributes.py index 8547badd..ac1c317d 100644 --- a/rootly_sdk/models/new_form_set_data_attributes.py +++ b/rootly_sdk/models/new_form_set_data_attributes.py @@ -1,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="NewFormSetDataAttributes") @@ -19,7 +25,7 @@ class NewFormSetDataAttributes: `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` + `slack_update_scheduled_incident_form`, `google_chat_new_incident_form`, `google_chat_update_incident_form` """ name: str diff --git a/rootly_sdk/models/new_functionality.py b/rootly_sdk/models/new_functionality.py index 74f3df0d..46865bd3 100644 --- a/rootly_sdk/models/new_functionality.py +++ b/rootly_sdk/models/new_functionality.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_functionality_data import NewFunctionalityData @@ -24,6 +28,8 @@ class NewFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_functionality_data import NewFunctionalityData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_functionality_data.py b/rootly_sdk/models/new_functionality_data.py index 21eb1b4a..3c78af72 100644 --- a/rootly_sdk/models/new_functionality_data.py +++ b/rootly_sdk/models/new_functionality_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_functionality_data_type import NewFunctionalityDataType, check_new_functionality_data_type +from ..types import UNSET, Unset + +from ..models.new_functionality_data_type import check_new_functionality_data_type +from ..models.new_functionality_data_type import NewFunctionalityDataType +from typing import cast if TYPE_CHECKING: from ..models.new_functionality_data_attributes import NewFunctionalityDataAttributes @@ -28,6 +32,8 @@ class NewFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_functionality_data_attributes import NewFunctionalityDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_functionality_data_attributes.py b/rootly_sdk/models/new_functionality_data_attributes.py index a3f21577..4d4dcb6c 100644 --- a/rootly_sdk/models/new_functionality_data_attributes.py +++ b/rootly_sdk/models/new_functionality_data_attributes.py @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_functionality_data_attributes_show_uptime_last_days import ( - NewFunctionalityDataAttributesShowUptimeLastDays, check_new_functionality_data_attributes_show_uptime_last_days, ) +from ..models.new_functionality_data_attributes_show_uptime_last_days import ( + NewFunctionalityDataAttributesShowUptimeLastDays, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_functionality_data_attributes_properties_item import NewFunctionalityDataAttributesPropertiesItem @@ -49,6 +55,7 @@ class NewFunctionalityDataAttributes: 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 + escalation_policy_id (None | str | Unset): The escalation policy id of the functionality slack_channels (list[NewFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this functionality slack_aliases (list[NewFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases @@ -76,11 +83,22 @@ class NewFunctionalityDataAttributes: service_ids: list[str] | None | Unset = UNSET owner_group_ids: list[str] | None | Unset = UNSET owner_user_ids: list[int] | None | Unset = UNSET + escalation_policy_id: None | str | 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]: + from ..models.new_functionality_data_attributes_slack_channels_type_0_item import ( + NewFunctionalityDataAttributesSlackChannelsType0Item, + ) + from ..models.new_functionality_data_attributes_properties_item import ( + NewFunctionalityDataAttributesPropertiesItem, + ) + from ..models.new_functionality_data_attributes_slack_aliases_type_0_item import ( + NewFunctionalityDataAttributesSlackAliasesType0Item, + ) + name = self.name description: None | str | Unset @@ -204,6 +222,12 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids + 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: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET @@ -278,6 +302,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["owner_group_ids"] = owner_group_ids if owner_user_ids is not UNSET: field_dict["owner_user_ids"] = owner_user_ids + if escalation_policy_id is not UNSET: + field_dict["escalation_policy_id"] = escalation_policy_id if slack_channels is not UNSET: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: @@ -504,6 +530,15 @@ def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) + 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 | str | Unset, data) + + escalation_policy_id = _parse_escalation_policy_id(d.pop("escalation_policy_id", UNSET)) + def _parse_slack_channels( data: object, ) -> list[NewFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset: @@ -585,6 +620,7 @@ def _parse_slack_aliases( service_ids=service_ids, owner_group_ids=owner_group_ids, owner_user_ids=owner_user_ids, + escalation_policy_id=escalation_policy_id, slack_channels=slack_channels, slack_aliases=slack_aliases, properties=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 index b3518fb5..cfecc091 100644 --- a/rootly_sdk/models/new_functionality_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_functionality_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewFunctionalityDataAttributesPropertiesItem") 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 ca6ead65..80b6045a 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewFunctionalityDataAttributesSlackAliasesType0Item") 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 2d997f77..f45c9776 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewFunctionalityDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_heartbeat.py b/rootly_sdk/models/new_heartbeat.py index 295e7de4..20b24c5b 100644 --- a/rootly_sdk/models/new_heartbeat.py +++ b/rootly_sdk/models/new_heartbeat.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_heartbeat_data import NewHeartbeatData @@ -24,6 +28,8 @@ class NewHeartbeat: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_heartbeat_data import NewHeartbeatData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_heartbeat_data.py b/rootly_sdk/models/new_heartbeat_data.py index b6263e13..06e0a437 100644 --- a/rootly_sdk/models/new_heartbeat_data.py +++ b/rootly_sdk/models/new_heartbeat_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_heartbeat_data_type import NewHeartbeatDataType, check_new_heartbeat_data_type +from ..types import UNSET, Unset + +from ..models.new_heartbeat_data_type import check_new_heartbeat_data_type +from ..models.new_heartbeat_data_type import NewHeartbeatDataType +from typing import cast if TYPE_CHECKING: from ..models.new_heartbeat_data_attributes import NewHeartbeatDataAttributes @@ -28,6 +32,8 @@ class NewHeartbeatData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_heartbeat_data_attributes import NewHeartbeatDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_heartbeat_data_attributes.py b/rootly_sdk/models/new_heartbeat_data_attributes.py index 05a9817f..062b72ea 100644 --- a/rootly_sdk/models/new_heartbeat_data_attributes.py +++ b/rootly_sdk/models/new_heartbeat_data_attributes.py @@ -1,19 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_heartbeat_data_attributes_interval_unit import ( - NewHeartbeatDataAttributesIntervalUnit, - check_new_heartbeat_data_attributes_interval_unit, +from ..types import UNSET, Unset + +from ..models.new_heartbeat_data_attributes_interval_unit import check_new_heartbeat_data_attributes_interval_unit +from ..models.new_heartbeat_data_attributes_interval_unit import NewHeartbeatDataAttributesIntervalUnit +from ..models.new_heartbeat_data_attributes_notification_target_type import ( + check_new_heartbeat_data_attributes_notification_target_type, ) from ..models.new_heartbeat_data_attributes_notification_target_type import ( NewHeartbeatDataAttributesNotificationTargetType, - check_new_heartbeat_data_attributes_notification_target_type, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewHeartbeatDataAttributes") @@ -32,6 +37,7 @@ class NewHeartbeatDataAttributes: 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. + owner_group_ids (list[str] | Unset): List of team IDs that own this heartbeat enabled (bool | Unset): Whether to trigger alerts when heartbeat is expired. """ @@ -44,6 +50,7 @@ class NewHeartbeatDataAttributes: description: None | str | Unset = UNSET alert_description: None | str | Unset = UNSET alert_urgency_id: None | str | Unset = UNSET + owner_group_ids: list[str] | Unset = UNSET enabled: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: @@ -77,6 +84,10 @@ def to_dict(self) -> dict[str, Any]: else: alert_urgency_id = self.alert_urgency_id + owner_group_ids: list[str] | Unset = UNSET + if not isinstance(self.owner_group_ids, Unset): + owner_group_ids = self.owner_group_ids + enabled = self.enabled field_dict: dict[str, Any] = {} @@ -97,6 +108,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["alert_description"] = alert_description if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id + if owner_group_ids is not UNSET: + field_dict["owner_group_ids"] = owner_group_ids if enabled is not UNSET: field_dict["enabled"] = enabled @@ -146,6 +159,8 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset: alert_urgency_id = _parse_alert_urgency_id(d.pop("alert_urgency_id", UNSET)) + owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET)) + enabled = d.pop("enabled", UNSET) new_heartbeat_data_attributes = cls( @@ -158,6 +173,7 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset: description=description, alert_description=alert_description, alert_urgency_id=alert_urgency_id, + owner_group_ids=owner_group_ids, enabled=enabled, ) diff --git a/rootly_sdk/models/new_incident.py b/rootly_sdk/models/new_incident.py index 87aa5321..c60ef88b 100644 --- a/rootly_sdk/models/new_incident.py +++ b/rootly_sdk/models/new_incident.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_data import NewIncidentData @@ -24,6 +28,8 @@ class NewIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_data import NewIncidentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_action_item.py b/rootly_sdk/models/new_incident_action_item.py index 086ae407..76a36526 100644 --- a/rootly_sdk/models/new_incident_action_item.py +++ b/rootly_sdk/models/new_incident_action_item.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_action_item_data import NewIncidentActionItemData @@ -24,6 +28,8 @@ class NewIncidentActionItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_action_item_data import NewIncidentActionItemData + data = self.data.to_dict() field_dict: 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 d11d9f3c..1b6f8b0e 100644 --- a/rootly_sdk/models/new_incident_action_item_data.py +++ b/rootly_sdk/models/new_incident_action_item_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_action_item_data_type import ( - NewIncidentActionItemDataType, - check_new_incident_action_item_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_action_item_data_type import check_new_incident_action_item_data_type +from ..models.new_incident_action_item_data_type import NewIncidentActionItemDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_action_item_data_attributes import NewIncidentActionItemDataAttributes @@ -31,6 +32,8 @@ class NewIncidentActionItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_action_item_data_attributes import NewIncidentActionItemDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 45137063..4ef18edf 100644 --- a/rootly_sdk/models/new_incident_action_item_data_attributes.py +++ b/rootly_sdk/models/new_incident_action_item_data_attributes.py @@ -1,23 +1,31 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_incident_action_item_data_attributes_kind import ( - NewIncidentActionItemDataAttributesKind, - check_new_incident_action_item_data_attributes_kind, -) +from ..types import UNSET, Unset + +from ..models.new_incident_action_item_data_attributes_kind import check_new_incident_action_item_data_attributes_kind +from ..models.new_incident_action_item_data_attributes_kind import NewIncidentActionItemDataAttributesKind from ..models.new_incident_action_item_data_attributes_priority import ( - NewIncidentActionItemDataAttributesPriority, check_new_incident_action_item_data_attributes_priority, ) +from ..models.new_incident_action_item_data_attributes_priority import NewIncidentActionItemDataAttributesPriority from ..models.new_incident_action_item_data_attributes_status import ( - NewIncidentActionItemDataAttributesStatus, check_new_incident_action_item_data_attributes_status, ) +from ..models.new_incident_action_item_data_attributes_status import NewIncidentActionItemDataAttributesStatus from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.new_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + T = TypeVar("T", bound="NewIncidentActionItemDataAttributes") @@ -37,6 +45,9 @@ class NewIncidentActionItemDataAttributes: 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. + form_field_selections (list[NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset): + Custom field values to set on the action item. Ignored unless custom fields for action items are enabled for the + organization. """ summary: str @@ -50,8 +61,13 @@ class NewIncidentActionItemDataAttributes: jira_issue_id: None | str | Unset = UNSET jira_issue_key: None | str | Unset = UNSET jira_issue_url: None | str | Unset = UNSET + form_field_selections: list[NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + summary = self.summary description: None | str | Unset @@ -106,6 +122,18 @@ def to_dict(self) -> dict[str, Any]: else: jira_issue_url = self.jira_issue_url + form_field_selections: list[dict[str, Any]] | None | Unset + if isinstance(self.form_field_selections, Unset): + form_field_selections = UNSET + elif isinstance(self.form_field_selections, list): + form_field_selections = [] + for form_field_selections_type_0_item_data in self.form_field_selections: + form_field_selections_type_0_item = form_field_selections_type_0_item_data.to_dict() + form_field_selections.append(form_field_selections_type_0_item) + + else: + form_field_selections = self.form_field_selections + field_dict: dict[str, Any] = {} field_dict.update( @@ -133,11 +161,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["jira_issue_key"] = jira_issue_key if jira_issue_url is not UNSET: field_dict["jira_issue_url"] = jira_issue_url + if form_field_selections is not UNSET: + field_dict["form_field_selections"] = form_field_selections return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + d = dict(src_dict) summary = d.pop("summary") @@ -218,6 +252,34 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) + def _parse_form_field_selections( + data: object, + ) -> list[NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + form_field_selections_type_0 = [] + _form_field_selections_type_0 = data + for form_field_selections_type_0_item_data in _form_field_selections_type_0: + form_field_selections_type_0_item = ( + NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item.from_dict( + form_field_selections_type_0_item_data + ) + ) + + form_field_selections_type_0.append(form_field_selections_type_0_item) + + return form_field_selections_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset, data) + + form_field_selections = _parse_form_field_selections(d.pop("form_field_selections", UNSET)) + new_incident_action_item_data_attributes = cls( summary=summary, description=description, @@ -230,6 +292,7 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_id=jira_issue_id, jira_issue_key=jira_issue_key, jira_issue_url=jira_issue_url, + form_field_selections=form_field_selections, ) return new_incident_action_item_data_attributes diff --git a/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py b/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py new file mode 100644 index 00000000..bc0f708d --- /dev/null +++ b/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py @@ -0,0 +1,209 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item") + + +@_attrs_define +class NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item: + """ + Attributes: + form_field_id (str): ID of the custom field + id (str | Unset): ID of an existing selection. Required when updating or removing a field's existing value. + value (list[str] | None | str | Unset): Value for text, textarea, rich text, date, datetime, number, checkbox, + or tag fields + selected_option_ids (list[str] | Unset): IDs of the selected custom field options + selected_user_ids (list[int] | Unset): IDs of the selected users + selected_group_ids (list[str] | Unset): IDs of the selected teams + selected_service_ids (list[str] | Unset): IDs of the selected services + selected_functionality_ids (list[str] | Unset): IDs of the selected functionalities + selected_catalog_entity_ids (list[str] | Unset): IDs of the selected catalog entities + selected_environment_ids (list[str] | Unset): IDs of the selected environments + selected_cause_ids (list[str] | Unset): IDs of the selected causes + selected_incident_type_ids (list[str] | Unset): IDs of the selected incident types + field_destroy (bool | None | Unset): Set to true to remove the field's value from the action item + """ + + form_field_id: str + id: str | Unset = UNSET + value: list[str] | None | str | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET + field_destroy: bool | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + form_field_id = self.form_field_id + + id = self.id + + value: list[str] | None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + elif isinstance(self.value, list): + value = self.value + + else: + value = self.value + + selected_option_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_option_ids, Unset): + selected_option_ids = self.selected_option_ids + + selected_user_ids: list[int] | Unset = UNSET + if not isinstance(self.selected_user_ids, Unset): + selected_user_ids = self.selected_user_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_service_ids, Unset): + selected_service_ids = self.selected_service_ids + + selected_functionality_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_functionality_ids, Unset): + selected_functionality_ids = self.selected_functionality_ids + + 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_environment_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_environment_ids, Unset): + selected_environment_ids = self.selected_environment_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_incident_type_ids, Unset): + selected_incident_type_ids = self.selected_incident_type_ids + + field_destroy: bool | None | Unset + if isinstance(self.field_destroy, Unset): + field_destroy = UNSET + else: + field_destroy = self.field_destroy + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "form_field_id": form_field_id, + } + ) + if id is not UNSET: + field_dict["id"] = id + if value is not UNSET: + field_dict["value"] = value + if selected_option_ids is not UNSET: + field_dict["selected_option_ids"] = selected_option_ids + if selected_user_ids is not UNSET: + field_dict["selected_user_ids"] = selected_user_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_catalog_entity_ids is not UNSET: + field_dict["selected_catalog_entity_ids"] = selected_catalog_entity_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + if field_destroy is not UNSET: + field_dict["_destroy"] = field_destroy + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + form_field_id = d.pop("form_field_id") + + id = d.pop("id", UNSET) + + def _parse_value(data: object) -> list[str] | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + value_type_1 = cast(list[str], data) + + return value_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids", UNSET)) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + def _parse_field_destroy(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + field_destroy = _parse_field_destroy(d.pop("_destroy", UNSET)) + + new_incident_action_item_data_attributes_form_field_selections_type_0_item = cls( + form_field_id=form_field_id, + id=id, + value=value, + selected_option_ids=selected_option_ids, + selected_user_ids=selected_user_ids, + selected_group_ids=selected_group_ids, + selected_service_ids=selected_service_ids, + selected_functionality_ids=selected_functionality_ids, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_environment_ids=selected_environment_ids, + selected_cause_ids=selected_cause_ids, + selected_incident_type_ids=selected_incident_type_ids, + field_destroy=field_destroy, + ) + + return new_incident_action_item_data_attributes_form_field_selections_type_0_item diff --git a/rootly_sdk/models/new_incident_custom_field_selection.py b/rootly_sdk/models/new_incident_custom_field_selection.py index aaac33e2..e71f306e 100644 --- a/rootly_sdk/models/new_incident_custom_field_selection.py +++ b/rootly_sdk/models/new_incident_custom_field_selection.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_custom_field_selection_data import NewIncidentCustomFieldSelectionData @@ -24,6 +28,8 @@ class NewIncidentCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_custom_field_selection_data import NewIncidentCustomFieldSelectionData + data = self.data.to_dict() field_dict: 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 326ecdd6..54d553f5 100644 --- a/rootly_sdk/models/new_incident_custom_field_selection_data.py +++ b/rootly_sdk/models/new_incident_custom_field_selection_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_custom_field_selection_data_type import ( - NewIncidentCustomFieldSelectionDataType, - check_new_incident_custom_field_selection_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_custom_field_selection_data_type import check_new_incident_custom_field_selection_data_type +from ..models.new_incident_custom_field_selection_data_type import NewIncidentCustomFieldSelectionDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_custom_field_selection_data_attributes import ( @@ -33,6 +34,10 @@ class NewIncidentCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_custom_field_selection_data_attributes import ( + NewIncidentCustomFieldSelectionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 9d28b839..467b5444 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,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewIncidentCustomFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/new_incident_data.py b/rootly_sdk/models/new_incident_data.py index dbe22c6f..3e1e3cb8 100644 --- a/rootly_sdk/models/new_incident_data.py +++ b/rootly_sdk/models/new_incident_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_data_type import NewIncidentDataType, check_new_incident_data_type +from ..types import UNSET, Unset + +from ..models.new_incident_data_type import check_new_incident_data_type +from ..models.new_incident_data_type import NewIncidentDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_data_attributes import NewIncidentDataAttributes @@ -28,6 +32,8 @@ class NewIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_data_attributes import NewIncidentDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_data_attributes.py b/rootly_sdk/models/new_incident_data_attributes.py index 8a795611..1575417c 100644 --- a/rootly_sdk/models/new_incident_data_attributes.py +++ b/rootly_sdk/models/new_incident_data_attributes.py @@ -1,20 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_incident_data_attributes_kind import ( - NewIncidentDataAttributesKind, - check_new_incident_data_attributes_kind, -) -from ..models.new_incident_data_attributes_status import ( - NewIncidentDataAttributesStatus, - check_new_incident_data_attributes_status, -) from ..types import UNSET, Unset +from ..models.new_incident_data_attributes_kind import check_new_incident_data_attributes_kind +from ..models.new_incident_data_attributes_kind import NewIncidentDataAttributesKind +from ..models.new_incident_data_attributes_status import check_new_incident_data_attributes_status +from ..models.new_incident_data_attributes_status import NewIncidentDataAttributesStatus +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_data_attributes_labels_type_0 import NewIncidentDataAttributesLabelsType0 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 5e4e81b3..da6f4ea8 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewIncidentDataAttributesLabelsType0") diff --git a/rootly_sdk/models/new_incident_event.py b/rootly_sdk/models/new_incident_event.py index 823c24c2..84217994 100644 --- a/rootly_sdk/models/new_incident_event.py +++ b/rootly_sdk/models/new_incident_event.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_event_data import NewIncidentEventData @@ -24,6 +28,8 @@ class NewIncidentEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_event_data import NewIncidentEventData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_event_data.py b/rootly_sdk/models/new_incident_event_data.py index 5b1ad4c1..374a4bba 100644 --- a/rootly_sdk/models/new_incident_event_data.py +++ b/rootly_sdk/models/new_incident_event_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_event_data_type import NewIncidentEventDataType, check_new_incident_event_data_type +from ..types import UNSET, Unset + +from ..models.new_incident_event_data_type import check_new_incident_event_data_type +from ..models.new_incident_event_data_type import NewIncidentEventDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_event_data_attributes import NewIncidentEventDataAttributes @@ -28,6 +32,8 @@ class NewIncidentEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_event_data_attributes import NewIncidentEventDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_event_data_attributes.py b/rootly_sdk/models/new_incident_event_data_attributes.py index c7702049..f050a895 100644 --- a/rootly_sdk/models/new_incident_event_data_attributes.py +++ b/rootly_sdk/models/new_incident_event_data_attributes.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_incident_event_data_attributes_visibility import ( - NewIncidentEventDataAttributesVisibility, - check_new_incident_event_data_attributes_visibility, -) from ..types import UNSET, Unset +from ..models.new_incident_event_data_attributes_visibility import check_new_incident_event_data_attributes_visibility +from ..models.new_incident_event_data_attributes_visibility import NewIncidentEventDataAttributesVisibility +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewIncidentEventDataAttributes") diff --git a/rootly_sdk/models/new_incident_event_functionality.py b/rootly_sdk/models/new_incident_event_functionality.py index 9fb2df7e..cb5a3eb1 100644 --- a/rootly_sdk/models/new_incident_event_functionality.py +++ b/rootly_sdk/models/new_incident_event_functionality.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_event_functionality_data import NewIncidentEventFunctionalityData @@ -24,6 +28,8 @@ class NewIncidentEventFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_event_functionality_data import NewIncidentEventFunctionalityData + data = self.data.to_dict() field_dict: 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 61b6fde9..34047198 100644 --- a/rootly_sdk/models/new_incident_event_functionality_data.py +++ b/rootly_sdk/models/new_incident_event_functionality_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_event_functionality_data_type import ( - NewIncidentEventFunctionalityDataType, - check_new_incident_event_functionality_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_event_functionality_data_type import check_new_incident_event_functionality_data_type +from ..models.new_incident_event_functionality_data_type import NewIncidentEventFunctionalityDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_event_functionality_data_attributes import NewIncidentEventFunctionalityDataAttributes @@ -31,6 +32,10 @@ class NewIncidentEventFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_event_functionality_data_attributes import ( + NewIncidentEventFunctionalityDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 e14b6383..1b85c299 100644 --- a/rootly_sdk/models/new_incident_event_functionality_data_attributes.py +++ b/rootly_sdk/models/new_incident_event_functionality_data_attributes.py @@ -1,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_incident_event_functionality_data_attributes_status import ( - NewIncidentEventFunctionalityDataAttributesStatus, check_new_incident_event_functionality_data_attributes_status, ) +from ..models.new_incident_event_functionality_data_attributes_status import ( + NewIncidentEventFunctionalityDataAttributesStatus, +) +from typing import cast + T = TypeVar("T", bound="NewIncidentEventFunctionalityDataAttributes") diff --git a/rootly_sdk/models/new_incident_event_service.py b/rootly_sdk/models/new_incident_event_service.py index 098597f3..388e4e23 100644 --- a/rootly_sdk/models/new_incident_event_service.py +++ b/rootly_sdk/models/new_incident_event_service.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_event_service_data import NewIncidentEventServiceData @@ -24,6 +28,8 @@ class NewIncidentEventService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_event_service_data import NewIncidentEventServiceData + data = self.data.to_dict() field_dict: 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 786ba6db..055ab3ef 100644 --- a/rootly_sdk/models/new_incident_event_service_data.py +++ b/rootly_sdk/models/new_incident_event_service_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_event_service_data_type import ( - NewIncidentEventServiceDataType, - check_new_incident_event_service_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_event_service_data_type import check_new_incident_event_service_data_type +from ..models.new_incident_event_service_data_type import NewIncidentEventServiceDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_event_service_data_attributes import NewIncidentEventServiceDataAttributes @@ -31,6 +32,8 @@ class NewIncidentEventServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_event_service_data_attributes import NewIncidentEventServiceDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 8e2c72b4..616a7063 100644 --- a/rootly_sdk/models/new_incident_event_service_data_attributes.py +++ b/rootly_sdk/models/new_incident_event_service_data_attributes.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_incident_event_service_data_attributes_status import ( - NewIncidentEventServiceDataAttributesStatus, check_new_incident_event_service_data_attributes_status, ) +from ..models.new_incident_event_service_data_attributes_status import NewIncidentEventServiceDataAttributesStatus +from typing import cast + T = TypeVar("T", bound="NewIncidentEventServiceDataAttributes") diff --git a/rootly_sdk/models/new_incident_feedback.py b/rootly_sdk/models/new_incident_feedback.py index 1f6d9c6c..e0a0a056 100644 --- a/rootly_sdk/models/new_incident_feedback.py +++ b/rootly_sdk/models/new_incident_feedback.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_feedback_data import NewIncidentFeedbackData @@ -24,6 +28,8 @@ class NewIncidentFeedback: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_feedback_data import NewIncidentFeedbackData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_feedback_data.py b/rootly_sdk/models/new_incident_feedback_data.py index 67126f31..0f53c1ea 100644 --- a/rootly_sdk/models/new_incident_feedback_data.py +++ b/rootly_sdk/models/new_incident_feedback_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_feedback_data_type import NewIncidentFeedbackDataType, check_new_incident_feedback_data_type +from ..types import UNSET, Unset + +from ..models.new_incident_feedback_data_type import check_new_incident_feedback_data_type +from ..models.new_incident_feedback_data_type import NewIncidentFeedbackDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_feedback_data_attributes import NewIncidentFeedbackDataAttributes @@ -28,6 +32,8 @@ class NewIncidentFeedbackData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_feedback_data_attributes import NewIncidentFeedbackDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_feedback_data_attributes.py b/rootly_sdk/models/new_incident_feedback_data_attributes.py index 0f7b6fec..19994961 100644 --- a/rootly_sdk/models/new_incident_feedback_data_attributes.py +++ b/rootly_sdk/models/new_incident_feedback_data_attributes.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_incident_feedback_data_attributes_rating import ( - NewIncidentFeedbackDataAttributesRating, - check_new_incident_feedback_data_attributes_rating, -) from ..types import UNSET, Unset +from ..models.new_incident_feedback_data_attributes_rating import check_new_incident_feedback_data_attributes_rating +from ..models.new_incident_feedback_data_attributes_rating import NewIncidentFeedbackDataAttributesRating +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewIncidentFeedbackDataAttributes") diff --git a/rootly_sdk/models/new_incident_form_field_selection.py b/rootly_sdk/models/new_incident_form_field_selection.py index fd48d34f..71d2e9ec 100644 --- a/rootly_sdk/models/new_incident_form_field_selection.py +++ b/rootly_sdk/models/new_incident_form_field_selection.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_form_field_selection_data import NewIncidentFormFieldSelectionData @@ -24,6 +28,8 @@ class NewIncidentFormFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_form_field_selection_data import NewIncidentFormFieldSelectionData + data = self.data.to_dict() field_dict: 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 327f7a4a..a87bfde3 100644 --- a/rootly_sdk/models/new_incident_form_field_selection_data.py +++ b/rootly_sdk/models/new_incident_form_field_selection_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_form_field_selection_data_type import ( - NewIncidentFormFieldSelectionDataType, - check_new_incident_form_field_selection_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_form_field_selection_data_type import check_new_incident_form_field_selection_data_type +from ..models.new_incident_form_field_selection_data_type import NewIncidentFormFieldSelectionDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_form_field_selection_data_attributes import NewIncidentFormFieldSelectionDataAttributes @@ -31,6 +32,10 @@ class NewIncidentFormFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_form_field_selection_data_attributes import ( + NewIncidentFormFieldSelectionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 10a4cf9e..2b61bc02 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,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewIncidentFormFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/new_incident_permission_set.py b/rootly_sdk/models/new_incident_permission_set.py index 202c8a3c..cd4e5a37 100644 --- a/rootly_sdk/models/new_incident_permission_set.py +++ b/rootly_sdk/models/new_incident_permission_set.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_permission_set_data import NewIncidentPermissionSetData @@ -24,6 +28,8 @@ class NewIncidentPermissionSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_permission_set_data import NewIncidentPermissionSetData + data = self.data.to_dict() field_dict: 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 e8f90d1a..d12fa44d 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_permission_set_boolean_data import NewIncidentPermissionSetBooleanData @@ -24,6 +28,8 @@ class NewIncidentPermissionSetBoolean: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_permission_set_boolean_data import NewIncidentPermissionSetBooleanData + data = self.data.to_dict() field_dict: 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 03268ed5..756f5b18 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean_data.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_permission_set_boolean_data_type import ( - NewIncidentPermissionSetBooleanDataType, - check_new_incident_permission_set_boolean_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_permission_set_boolean_data_type import check_new_incident_permission_set_boolean_data_type +from ..models.new_incident_permission_set_boolean_data_type import NewIncidentPermissionSetBooleanDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_permission_set_boolean_data_attributes import ( @@ -33,6 +34,10 @@ class NewIncidentPermissionSetBooleanData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_permission_set_boolean_data_attributes import ( + NewIncidentPermissionSetBooleanDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 1410bb1e..eddf1d89 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_incident_permission_set_boolean_data_attributes_kind import ( - NewIncidentPermissionSetBooleanDataAttributesKind, check_new_incident_permission_set_boolean_data_attributes_kind, ) +from ..models.new_incident_permission_set_boolean_data_attributes_kind import ( + NewIncidentPermissionSetBooleanDataAttributesKind, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_incident_permission_set_boolean_data_attributes_severity_params import ( @@ -38,6 +44,10 @@ class NewIncidentPermissionSetBooleanDataAttributes: severity_params: NewIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_permission_set_boolean_data_attributes_severity_params import ( + NewIncidentPermissionSetBooleanDataAttributesSeverityParams, + ) + incident_permission_set_id = self.incident_permission_set_id kind: str = self.kind 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 8785fea3..fd87367e 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewIncidentPermissionSetBooleanDataAttributesSeverityParams") diff --git a/rootly_sdk/models/new_incident_permission_set_data.py b/rootly_sdk/models/new_incident_permission_set_data.py index bf0aa2b4..e152b8b4 100644 --- a/rootly_sdk/models/new_incident_permission_set_data.py +++ b/rootly_sdk/models/new_incident_permission_set_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_permission_set_data_type import ( - NewIncidentPermissionSetDataType, - check_new_incident_permission_set_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_permission_set_data_type import check_new_incident_permission_set_data_type +from ..models.new_incident_permission_set_data_type import NewIncidentPermissionSetDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_permission_set_data_attributes import NewIncidentPermissionSetDataAttributes @@ -31,6 +32,8 @@ class NewIncidentPermissionSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_permission_set_data_attributes import NewIncidentPermissionSetDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 6da0aeb4..236ea9a5 100644 --- a/rootly_sdk/models/new_incident_permission_set_data_attributes.py +++ b/rootly_sdk/models/new_incident_permission_set_data_attributes.py @@ -1,19 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_incident_permission_set_data_attributes_private_incident_permissions_item import ( - NewIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem, check_new_incident_permission_set_data_attributes_private_incident_permissions_item, ) +from ..models.new_incident_permission_set_data_attributes_private_incident_permissions_item import ( + NewIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem, +) from ..models.new_incident_permission_set_data_attributes_public_incident_permissions_item import ( - NewIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem, check_new_incident_permission_set_data_attributes_public_incident_permissions_item, ) +from ..models.new_incident_permission_set_data_attributes_public_incident_permissions_item import ( + NewIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewIncidentPermissionSetDataAttributes") diff --git a/rootly_sdk/models/new_incident_permission_set_resource.py b/rootly_sdk/models/new_incident_permission_set_resource.py index f41a674e..bf58585f 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource.py +++ b/rootly_sdk/models/new_incident_permission_set_resource.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_permission_set_resource_data import NewIncidentPermissionSetResourceData @@ -24,6 +28,8 @@ class NewIncidentPermissionSetResource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_permission_set_resource_data import NewIncidentPermissionSetResourceData + data = self.data.to_dict() field_dict: 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 0e9e9b04..a467f9a8 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource_data.py +++ b/rootly_sdk/models/new_incident_permission_set_resource_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_permission_set_resource_data_type import ( - NewIncidentPermissionSetResourceDataType, - check_new_incident_permission_set_resource_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_permission_set_resource_data_type import check_new_incident_permission_set_resource_data_type +from ..models.new_incident_permission_set_resource_data_type import NewIncidentPermissionSetResourceDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_permission_set_resource_data_attributes import ( @@ -33,6 +34,10 @@ class NewIncidentPermissionSetResourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_permission_set_resource_data_attributes import ( + NewIncidentPermissionSetResourceDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 579e08c2..e62a5a9d 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_incident_permission_set_resource_data_attributes_kind import ( - NewIncidentPermissionSetResourceDataAttributesKind, check_new_incident_permission_set_resource_data_attributes_kind, ) +from ..models.new_incident_permission_set_resource_data_attributes_kind import ( + NewIncidentPermissionSetResourceDataAttributesKind, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_incident_permission_set_resource_data_attributes_severity_params import ( @@ -40,6 +46,10 @@ class NewIncidentPermissionSetResourceDataAttributes: severity_params: NewIncidentPermissionSetResourceDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_permission_set_resource_data_attributes_severity_params import ( + NewIncidentPermissionSetResourceDataAttributesSeverityParams, + ) + incident_permission_set_id = self.incident_permission_set_id kind: str = self.kind 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 c5db1e9f..1147d721 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewIncidentPermissionSetResourceDataAttributesSeverityParams") diff --git a/rootly_sdk/models/new_incident_role.py b/rootly_sdk/models/new_incident_role.py index b7ba608f..0e03f611 100644 --- a/rootly_sdk/models/new_incident_role.py +++ b/rootly_sdk/models/new_incident_role.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_role_data import NewIncidentRoleData @@ -24,6 +28,8 @@ class NewIncidentRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_role_data import NewIncidentRoleData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_role_data.py b/rootly_sdk/models/new_incident_role_data.py index 2a142da6..22eb9aa5 100644 --- a/rootly_sdk/models/new_incident_role_data.py +++ b/rootly_sdk/models/new_incident_role_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_role_data_type import NewIncidentRoleDataType, check_new_incident_role_data_type +from ..types import UNSET, Unset + +from ..models.new_incident_role_data_type import check_new_incident_role_data_type +from ..models.new_incident_role_data_type import NewIncidentRoleDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_role_data_attributes import NewIncidentRoleDataAttributes @@ -28,6 +32,8 @@ class NewIncidentRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_role_data_attributes import NewIncidentRoleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_role_data_attributes.py b/rootly_sdk/models/new_incident_role_data_attributes.py index bdf3cc53..6b020b93 100644 --- a/rootly_sdk/models/new_incident_role_data_attributes.py +++ b/rootly_sdk/models/new_incident_role_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewIncidentRoleDataAttributes") diff --git a/rootly_sdk/models/new_incident_role_task.py b/rootly_sdk/models/new_incident_role_task.py index 2513fa9a..542c5fb3 100644 --- a/rootly_sdk/models/new_incident_role_task.py +++ b/rootly_sdk/models/new_incident_role_task.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_role_task_data import NewIncidentRoleTaskData @@ -24,6 +28,8 @@ class NewIncidentRoleTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_role_task_data import NewIncidentRoleTaskData + data = self.data.to_dict() field_dict: 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 53735fc8..f76f8f67 100644 --- a/rootly_sdk/models/new_incident_role_task_data.py +++ b/rootly_sdk/models/new_incident_role_task_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_role_task_data_type import ( - NewIncidentRoleTaskDataType, - check_new_incident_role_task_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_role_task_data_type import check_new_incident_role_task_data_type +from ..models.new_incident_role_task_data_type import NewIncidentRoleTaskDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_role_task_data_attributes import NewIncidentRoleTaskDataAttributes @@ -31,6 +32,8 @@ class NewIncidentRoleTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_role_task_data_attributes import NewIncidentRoleTaskDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 9de0da86..47dbddb9 100644 --- a/rootly_sdk/models/new_incident_role_task_data_attributes.py +++ b/rootly_sdk/models/new_incident_role_task_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_incident_role_task_data_attributes_priority import ( - NewIncidentRoleTaskDataAttributesPriority, check_new_incident_role_task_data_attributes_priority, ) +from ..models.new_incident_role_task_data_attributes_priority import NewIncidentRoleTaskDataAttributesPriority from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewIncidentRoleTaskDataAttributes") diff --git a/rootly_sdk/models/new_incident_status_page_event.py b/rootly_sdk/models/new_incident_status_page_event.py index bfb8fbe5..b1a778af 100644 --- a/rootly_sdk/models/new_incident_status_page_event.py +++ b/rootly_sdk/models/new_incident_status_page_event.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_status_page_event_data import NewIncidentStatusPageEventData @@ -24,6 +28,8 @@ class NewIncidentStatusPageEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_status_page_event_data import NewIncidentStatusPageEventData + data = self.data.to_dict() field_dict: 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 8724c5b4..f5624902 100644 --- a/rootly_sdk/models/new_incident_status_page_event_data.py +++ b/rootly_sdk/models/new_incident_status_page_event_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_status_page_event_data_type import ( - NewIncidentStatusPageEventDataType, - check_new_incident_status_page_event_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_status_page_event_data_type import check_new_incident_status_page_event_data_type +from ..models.new_incident_status_page_event_data_type import NewIncidentStatusPageEventDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_status_page_event_data_attributes import NewIncidentStatusPageEventDataAttributes @@ -31,6 +32,8 @@ class NewIncidentStatusPageEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_status_page_event_data_attributes import NewIncidentStatusPageEventDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 1d5a7003..7ebcb483 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,15 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_incident_status_page_event_data_attributes_status import ( - NewIncidentStatusPageEventDataAttributesStatus, check_new_incident_status_page_event_data_attributes_status, ) +from ..models.new_incident_status_page_event_data_attributes_status import ( + NewIncidentStatusPageEventDataAttributesStatus, +) from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="NewIncidentStatusPageEventDataAttributes") @@ -24,6 +33,7 @@ class NewIncidentStatusPageEventDataAttributes: 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. + started_at (datetime.datetime | None | Unset): When the event started. Defaults to the time of creation. """ event: str @@ -31,6 +41,7 @@ class NewIncidentStatusPageEventDataAttributes: status: NewIncidentStatusPageEventDataAttributesStatus | Unset = UNSET notify_subscribers: bool | None | Unset = False should_tweet: bool | None | Unset = False + started_at: datetime.datetime | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: event = self.event @@ -53,6 +64,14 @@ def to_dict(self) -> dict[str, Any]: else: should_tweet = self.should_tweet + 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 + field_dict: dict[str, Any] = {} field_dict.update( @@ -68,6 +87,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["notify_subscribers"] = notify_subscribers if should_tweet is not UNSET: field_dict["should_tweet"] = should_tweet + if started_at is not UNSET: + field_dict["started_at"] = started_at return field_dict @@ -103,12 +124,30 @@ def _parse_should_tweet(data: object) -> bool | None | Unset: should_tweet = _parse_should_tweet(d.pop("should_tweet", UNSET)) + 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)) + new_incident_status_page_event_data_attributes = cls( event=event, status_page_id=status_page_id, status=status, notify_subscribers=notify_subscribers, should_tweet=should_tweet, + started_at=started_at, ) return new_incident_status_page_event_data_attributes diff --git a/rootly_sdk/models/new_incident_sub_status.py b/rootly_sdk/models/new_incident_sub_status.py index 8f448073..136aa867 100644 --- a/rootly_sdk/models/new_incident_sub_status.py +++ b/rootly_sdk/models/new_incident_sub_status.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_sub_status_data import NewIncidentSubStatusData @@ -24,6 +28,8 @@ class NewIncidentSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_sub_status_data import NewIncidentSubStatusData + data = self.data.to_dict() field_dict: 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 2fe9ea36..1750b15d 100644 --- a/rootly_sdk/models/new_incident_sub_status_data.py +++ b/rootly_sdk/models/new_incident_sub_status_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_sub_status_data_type import ( - NewIncidentSubStatusDataType, - check_new_incident_sub_status_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_incident_sub_status_data_type import check_new_incident_sub_status_data_type +from ..models.new_incident_sub_status_data_type import NewIncidentSubStatusDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_sub_status_data_attributes import NewIncidentSubStatusDataAttributes @@ -31,6 +32,8 @@ class NewIncidentSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_sub_status_data_attributes import NewIncidentSubStatusDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 b63d1823..61d71e21 100644 --- a/rootly_sdk/models/new_incident_sub_status_data_attributes.py +++ b/rootly_sdk/models/new_incident_sub_status_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewIncidentSubStatusDataAttributes") diff --git a/rootly_sdk/models/new_incident_type.py b/rootly_sdk/models/new_incident_type.py index 0a7d41a3..f191429d 100644 --- a/rootly_sdk/models/new_incident_type.py +++ b/rootly_sdk/models/new_incident_type.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_type_data import NewIncidentTypeData @@ -24,6 +28,8 @@ class NewIncidentType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_type_data import NewIncidentTypeData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_incident_type_data.py b/rootly_sdk/models/new_incident_type_data.py index ca57d013..6ac7b601 100644 --- a/rootly_sdk/models/new_incident_type_data.py +++ b/rootly_sdk/models/new_incident_type_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_incident_type_data_type import NewIncidentTypeDataType, check_new_incident_type_data_type +from ..types import UNSET, Unset + +from ..models.new_incident_type_data_type import check_new_incident_type_data_type +from ..models.new_incident_type_data_type import NewIncidentTypeDataType +from typing import cast if TYPE_CHECKING: from ..models.new_incident_type_data_attributes import NewIncidentTypeDataAttributes @@ -28,6 +32,8 @@ class NewIncidentTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_incident_type_data_attributes import NewIncidentTypeDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_incident_type_data_attributes.py b/rootly_sdk/models/new_incident_type_data_attributes.py index 4d12991d..e3c14a31 100644 --- a/rootly_sdk/models/new_incident_type_data_attributes.py +++ b/rootly_sdk/models/new_incident_type_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_incident_type_data_attributes_properties_item import NewIncidentTypeDataAttributesPropertiesItem from ..models.new_incident_type_data_attributes_slack_aliases_type_0_item import ( @@ -47,6 +51,16 @@ class NewIncidentTypeDataAttributes: properties: list[NewIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + 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, + ) + from ..models.new_incident_type_data_attributes_slack_channels_type_0_item import ( + NewIncidentTypeDataAttributesSlackChannelsType0Item, + ) + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py b/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py index 5d2658eb..ca42ade8 100644 --- a/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewIncidentTypeDataAttributesPropertiesItem") 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 99bf6dd1..23177812 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewIncidentTypeDataAttributesSlackAliasesType0Item") 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 722bc1fe..a4007fc6 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewIncidentTypeDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_live_call_router.py b/rootly_sdk/models/new_live_call_router.py index c1c0d252..becfe898 100644 --- a/rootly_sdk/models/new_live_call_router.py +++ b/rootly_sdk/models/new_live_call_router.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_live_call_router_data import NewLiveCallRouterData @@ -24,6 +28,8 @@ class NewLiveCallRouter: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_live_call_router_data import NewLiveCallRouterData + data = self.data.to_dict() field_dict: 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 594947f7..4136963f 100644 --- a/rootly_sdk/models/new_live_call_router_data.py +++ b/rootly_sdk/models/new_live_call_router_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_live_call_router_data_type import NewLiveCallRouterDataType, check_new_live_call_router_data_type +from ..types import UNSET, Unset + +from ..models.new_live_call_router_data_type import check_new_live_call_router_data_type +from ..models.new_live_call_router_data_type import NewLiveCallRouterDataType +from typing import cast if TYPE_CHECKING: from ..models.new_live_call_router_data_attributes import NewLiveCallRouterDataAttributes @@ -28,6 +32,8 @@ class NewLiveCallRouterData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_live_call_router_data_attributes import NewLiveCallRouterDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 e1bc4571..ad89529b 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes.py @@ -1,27 +1,31 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_live_call_router_data_attributes_country_code import ( - NewLiveCallRouterDataAttributesCountryCode, check_new_live_call_router_data_attributes_country_code, ) -from ..models.new_live_call_router_data_attributes_kind import ( - NewLiveCallRouterDataAttributesKind, - check_new_live_call_router_data_attributes_kind, -) +from ..models.new_live_call_router_data_attributes_country_code import NewLiveCallRouterDataAttributesCountryCode +from ..models.new_live_call_router_data_attributes_kind import check_new_live_call_router_data_attributes_kind +from ..models.new_live_call_router_data_attributes_kind import NewLiveCallRouterDataAttributesKind from ..models.new_live_call_router_data_attributes_phone_type import ( - NewLiveCallRouterDataAttributesPhoneType, check_new_live_call_router_data_attributes_phone_type, ) +from ..models.new_live_call_router_data_attributes_phone_type import NewLiveCallRouterDataAttributesPhoneType from ..models.new_live_call_router_data_attributes_waiting_music_url import ( - NewLiveCallRouterDataAttributesWaitingMusicUrl, check_new_live_call_router_data_attributes_waiting_music_url, ) +from ..models.new_live_call_router_data_attributes_waiting_music_url import ( + NewLiveCallRouterDataAttributesWaitingMusicUrl, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_live_call_router_data_attributes_escalation_policy_trigger_params import ( @@ -51,6 +55,8 @@ class NewLiveCallRouterDataAttributes: 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 + unavailable_responder_message (None | str | Unset): The message played to the caller when a responder doesn't + answer and the call moves on to the next person in the escalation. Leave blank to use the default message. waiting_music_url (NewLiveCallRouterDataAttributesWaitingMusicUrl | 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 @@ -58,6 +64,11 @@ class NewLiveCallRouterDataAttributes: 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 + notify_via_sms (bool | Unset): Whether responders are also notified via SMS when this router pages them + notify_via_push_notification (bool | Unset): Whether responders are also notified via push notification when + this router pages them + informational_notification_message (None | str | Unset): Optional message included in the SMS/push notification. + Supports variables such as {{ alert.url }}, {{ alert.data.* }}, and {{ alert.alert_urgency.name }}. 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 @@ -75,17 +86,28 @@ class NewLiveCallRouterDataAttributes: paging_targets: list[NewLiveCallRouterDataAttributesPagingTargetsItem] enabled: bool | Unset = UNSET caller_greeting: str | Unset = UNSET + unavailable_responder_message: None | 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 + notify_via_sms: bool | Unset = UNSET + notify_via_push_notification: bool | Unset = UNSET + informational_notification_message: None | str | 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 def to_dict(self) -> dict[str, Any]: + from ..models.new_live_call_router_data_attributes_escalation_policy_trigger_params import ( + NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams, + ) + from ..models.new_live_call_router_data_attributes_paging_targets_item import ( + NewLiveCallRouterDataAttributesPagingTargetsItem, + ) + kind: str = self.kind name = self.name @@ -107,6 +129,12 @@ def to_dict(self) -> dict[str, Any]: caller_greeting = self.caller_greeting + unavailable_responder_message: None | str | Unset + if isinstance(self.unavailable_responder_message, Unset): + unavailable_responder_message = UNSET + else: + unavailable_responder_message = self.unavailable_responder_message + waiting_music_url: str | Unset = UNSET if not isinstance(self.waiting_music_url, Unset): waiting_music_url = self.waiting_music_url @@ -119,6 +147,16 @@ def to_dict(self) -> dict[str, Any]: should_auto_resolve_alert_on_call_end = self.should_auto_resolve_alert_on_call_end + notify_via_sms = self.notify_via_sms + + notify_via_push_notification = self.notify_via_push_notification + + informational_notification_message: None | str | Unset + if isinstance(self.informational_notification_message, Unset): + informational_notification_message = UNSET + else: + informational_notification_message = self.informational_notification_message + alert_urgency_id = self.alert_urgency_id calling_tree_enabled = self.calling_tree_enabled @@ -146,6 +184,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["enabled"] = enabled if caller_greeting is not UNSET: field_dict["caller_greeting"] = caller_greeting + if unavailable_responder_message is not UNSET: + field_dict["unavailable_responder_message"] = unavailable_responder_message if waiting_music_url is not UNSET: field_dict["waiting_music_url"] = waiting_music_url if sent_to_voicemail_delay is not UNSET: @@ -156,6 +196,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["escalation_level_delay_in_seconds"] = escalation_level_delay_in_seconds if should_auto_resolve_alert_on_call_end is not UNSET: field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end + if notify_via_sms is not UNSET: + field_dict["notify_via_sms"] = notify_via_sms + if notify_via_push_notification is not UNSET: + field_dict["notify_via_push_notification"] = notify_via_push_notification + if informational_notification_message is not UNSET: + field_dict["informational_notification_message"] = informational_notification_message if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id if calling_tree_enabled is not UNSET: @@ -200,6 +246,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: caller_greeting = d.pop("caller_greeting", UNSET) + def _parse_unavailable_responder_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + unavailable_responder_message = _parse_unavailable_responder_message( + d.pop("unavailable_responder_message", UNSET) + ) + _waiting_music_url = d.pop("waiting_music_url", UNSET) waiting_music_url: NewLiveCallRouterDataAttributesWaitingMusicUrl | Unset if isinstance(_waiting_music_url, Unset): @@ -215,6 +272,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: should_auto_resolve_alert_on_call_end = d.pop("should_auto_resolve_alert_on_call_end", UNSET) + notify_via_sms = d.pop("notify_via_sms", UNSET) + + notify_via_push_notification = d.pop("notify_via_push_notification", UNSET) + + def _parse_informational_notification_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + informational_notification_message = _parse_informational_notification_message( + d.pop("informational_notification_message", UNSET) + ) + alert_urgency_id = d.pop("alert_urgency_id", UNSET) calling_tree_enabled = d.pop("calling_tree_enabled", UNSET) @@ -240,11 +312,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: paging_targets=paging_targets, enabled=enabled, caller_greeting=caller_greeting, + unavailable_responder_message=unavailable_responder_message, waiting_music_url=waiting_music_url, sent_to_voicemail_delay=sent_to_voicemail_delay, should_redirect_to_voicemail_on_no_answer=should_redirect_to_voicemail_on_no_answer, escalation_level_delay_in_seconds=escalation_level_delay_in_seconds, should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end, + notify_via_sms=notify_via_sms, + notify_via_push_notification=notify_via_push_notification, + informational_notification_message=informational_notification_message, alert_urgency_id=alert_urgency_id, calling_tree_enabled=calling_tree_enabled, calling_tree_prompt=calling_tree_prompt, 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 e60e3f08..c4917ffb 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,10 +1,11 @@ from typing import Literal, cast -NewLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] +NewLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "CH", "DE", "GB", "NL", "NZ", "SE", "US"] NEW_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_COUNTRY_CODE_VALUES: set[NewLiveCallRouterDataAttributesCountryCode] = { "AU", "CA", + "CH", "DE", "GB", "NL", 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 53411b43..c54e8a90 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_live_call_router_data_attributes_escalation_policy_trigger_params_type import ( - NewLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType, check_new_live_call_router_data_attributes_escalation_policy_trigger_params_type, ) +from ..models.new_live_call_router_data_attributes_escalation_policy_trigger_params_type import ( + NewLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType, +) +from typing import cast + T = TypeVar("T", bound="NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams") 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 fbd27620..66502648 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_live_call_router_data_attributes_paging_targets_item_type import ( - NewLiveCallRouterDataAttributesPagingTargetsItemType, check_new_live_call_router_data_attributes_paging_targets_item_type, ) +from ..models.new_live_call_router_data_attributes_paging_targets_item_type import ( + NewLiveCallRouterDataAttributesPagingTargetsItemType, +) +from typing import cast + T = TypeVar("T", bound="NewLiveCallRouterDataAttributesPagingTargetsItem") diff --git a/rootly_sdk/models/new_on_call_pay_report.py b/rootly_sdk/models/new_on_call_pay_report.py index 7e2724df..bce61f52 100644 --- a/rootly_sdk/models/new_on_call_pay_report.py +++ b/rootly_sdk/models/new_on_call_pay_report.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_on_call_pay_report_data import NewOnCallPayReportData @@ -24,6 +28,8 @@ class NewOnCallPayReport: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_on_call_pay_report_data import NewOnCallPayReportData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_on_call_pay_report_data.py b/rootly_sdk/models/new_on_call_pay_report_data.py index 3c6e1181..2935a2f2 100644 --- a/rootly_sdk/models/new_on_call_pay_report_data.py +++ b/rootly_sdk/models/new_on_call_pay_report_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.new_on_call_pay_report_data_type import check_new_on_call_pay_report_data_type +from ..models.new_on_call_pay_report_data_type import NewOnCallPayReportDataType +from typing import cast if TYPE_CHECKING: from ..models.new_on_call_pay_report_data_attributes import NewOnCallPayReportDataAttributes @@ -28,6 +32,8 @@ class NewOnCallPayReportData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_on_call_pay_report_data_attributes import NewOnCallPayReportDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 index 0f1861c1..3072e917 100644 --- a/rootly_sdk/models/new_on_call_pay_report_data_attributes.py +++ b/rootly_sdk/models/new_on_call_pay_report_data_attributes.py @@ -1,13 +1,18 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="NewOnCallPayReportDataAttributes") @@ -19,11 +24,17 @@ class NewOnCallPayReportDataAttributes: 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. + time_zone (str | Unset): IANA timezone used to compute day and weekend boundaries. Defaults to the team's + timezone. + use_responders_time_zone (bool | Unset): When true, day and weekend boundaries are computed in each responder's + personal timezone instead of the report-wide timezone. """ start_date: datetime.date end_date: datetime.date schedule_ids: list[str] | Unset = UNSET + time_zone: str | Unset = UNSET + use_responders_time_zone: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: start_date = self.start_date.isoformat() @@ -34,6 +45,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.schedule_ids, Unset): schedule_ids = self.schedule_ids + time_zone = self.time_zone + + use_responders_time_zone = self.use_responders_time_zone + field_dict: dict[str, Any] = {} field_dict.update( @@ -44,6 +59,10 @@ def to_dict(self) -> dict[str, Any]: ) if schedule_ids is not UNSET: field_dict["schedule_ids"] = schedule_ids + if time_zone is not UNSET: + field_dict["time_zone"] = time_zone + if use_responders_time_zone is not UNSET: + field_dict["use_responders_time_zone"] = use_responders_time_zone return field_dict @@ -56,10 +75,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_ids = cast(list[str], d.pop("schedule_ids", UNSET)) + time_zone = d.pop("time_zone", UNSET) + + use_responders_time_zone = d.pop("use_responders_time_zone", UNSET) + new_on_call_pay_report_data_attributes = cls( start_date=start_date, end_date=end_date, schedule_ids=schedule_ids, + time_zone=time_zone, + use_responders_time_zone=use_responders_time_zone, ) return new_on_call_pay_report_data_attributes diff --git a/rootly_sdk/models/new_on_call_role.py b/rootly_sdk/models/new_on_call_role.py index 5d5272ff..a55dbc48 100644 --- a/rootly_sdk/models/new_on_call_role.py +++ b/rootly_sdk/models/new_on_call_role.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_on_call_role_data import NewOnCallRoleData @@ -24,6 +28,8 @@ class NewOnCallRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_on_call_role_data import NewOnCallRoleData + data = self.data.to_dict() field_dict: 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 2dc68062..4e949cf7 100644 --- a/rootly_sdk/models/new_on_call_role_data.py +++ b/rootly_sdk/models/new_on_call_role_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_on_call_role_data_type import NewOnCallRoleDataType, check_new_on_call_role_data_type +from ..types import UNSET, Unset + +from ..models.new_on_call_role_data_type import check_new_on_call_role_data_type +from ..models.new_on_call_role_data_type import NewOnCallRoleDataType +from typing import cast if TYPE_CHECKING: from ..models.new_on_call_role_data_attributes import NewOnCallRoleDataAttributes @@ -28,6 +32,8 @@ class NewOnCallRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_on_call_role_data_attributes import NewOnCallRoleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 fb8da60a..f849cded 100644 --- a/rootly_sdk/models/new_on_call_role_data_attributes.py +++ b/rootly_sdk/models/new_on_call_role_data_attributes.py @@ -1,99 +1,160 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_on_call_role_data_attributes_alert_fields_permissions_item import ( - NewOnCallRoleDataAttributesAlertFieldsPermissionsItem, check_new_on_call_role_data_attributes_alert_fields_permissions_item, ) +from ..models.new_on_call_role_data_attributes_alert_fields_permissions_item import ( + NewOnCallRoleDataAttributesAlertFieldsPermissionsItem, +) from ..models.new_on_call_role_data_attributes_alert_groups_permissions_item import ( - NewOnCallRoleDataAttributesAlertGroupsPermissionsItem, check_new_on_call_role_data_attributes_alert_groups_permissions_item, ) +from ..models.new_on_call_role_data_attributes_alert_groups_permissions_item import ( + NewOnCallRoleDataAttributesAlertGroupsPermissionsItem, +) from ..models.new_on_call_role_data_attributes_alert_routing_rules_permissions_item import ( - NewOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem, check_new_on_call_role_data_attributes_alert_routing_rules_permissions_item, ) +from ..models.new_on_call_role_data_attributes_alert_routing_rules_permissions_item import ( + NewOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem, +) from ..models.new_on_call_role_data_attributes_alert_sources_permissions_item import ( - NewOnCallRoleDataAttributesAlertSourcesPermissionsItem, check_new_on_call_role_data_attributes_alert_sources_permissions_item, ) +from ..models.new_on_call_role_data_attributes_alert_sources_permissions_item import ( + NewOnCallRoleDataAttributesAlertSourcesPermissionsItem, +) from ..models.new_on_call_role_data_attributes_alert_urgency_permissions_item import ( - NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem, check_new_on_call_role_data_attributes_alert_urgency_permissions_item, ) +from ..models.new_on_call_role_data_attributes_alert_urgency_permissions_item import ( + NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem, +) from ..models.new_on_call_role_data_attributes_alerts_permissions_item import ( - NewOnCallRoleDataAttributesAlertsPermissionsItem, check_new_on_call_role_data_attributes_alerts_permissions_item, ) +from ..models.new_on_call_role_data_attributes_alerts_permissions_item import ( + NewOnCallRoleDataAttributesAlertsPermissionsItem, +) from ..models.new_on_call_role_data_attributes_api_keys_permissions_item import ( - NewOnCallRoleDataAttributesApiKeysPermissionsItem, check_new_on_call_role_data_attributes_api_keys_permissions_item, ) +from ..models.new_on_call_role_data_attributes_api_keys_permissions_item import ( + NewOnCallRoleDataAttributesApiKeysPermissionsItem, +) from ..models.new_on_call_role_data_attributes_audits_permissions_item import ( - NewOnCallRoleDataAttributesAuditsPermissionsItem, check_new_on_call_role_data_attributes_audits_permissions_item, ) +from ..models.new_on_call_role_data_attributes_audits_permissions_item import ( + NewOnCallRoleDataAttributesAuditsPermissionsItem, +) +from ..models.new_on_call_role_data_attributes_catalogs_permissions_item import ( + check_new_on_call_role_data_attributes_catalogs_permissions_item, +) +from ..models.new_on_call_role_data_attributes_catalogs_permissions_item import ( + NewOnCallRoleDataAttributesCatalogsPermissionsItem, +) from ..models.new_on_call_role_data_attributes_contacts_permissions_item import ( - NewOnCallRoleDataAttributesContactsPermissionsItem, check_new_on_call_role_data_attributes_contacts_permissions_item, ) +from ..models.new_on_call_role_data_attributes_contacts_permissions_item import ( + NewOnCallRoleDataAttributesContactsPermissionsItem, +) from ..models.new_on_call_role_data_attributes_escalation_policies_permissions_item import ( - NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, check_new_on_call_role_data_attributes_escalation_policies_permissions_item, ) +from ..models.new_on_call_role_data_attributes_escalation_policies_permissions_item import ( + NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, +) +from ..models.new_on_call_role_data_attributes_functionalities_permissions_item import ( + check_new_on_call_role_data_attributes_functionalities_permissions_item, +) +from ..models.new_on_call_role_data_attributes_functionalities_permissions_item import ( + NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem, +) from ..models.new_on_call_role_data_attributes_groups_permissions_item import ( - NewOnCallRoleDataAttributesGroupsPermissionsItem, check_new_on_call_role_data_attributes_groups_permissions_item, ) +from ..models.new_on_call_role_data_attributes_groups_permissions_item import ( + NewOnCallRoleDataAttributesGroupsPermissionsItem, +) from ..models.new_on_call_role_data_attributes_heartbeats_permissions_item import ( - NewOnCallRoleDataAttributesHeartbeatsPermissionsItem, check_new_on_call_role_data_attributes_heartbeats_permissions_item, ) +from ..models.new_on_call_role_data_attributes_heartbeats_permissions_item import ( + NewOnCallRoleDataAttributesHeartbeatsPermissionsItem, +) from ..models.new_on_call_role_data_attributes_integrations_permissions_item import ( - NewOnCallRoleDataAttributesIntegrationsPermissionsItem, check_new_on_call_role_data_attributes_integrations_permissions_item, ) +from ..models.new_on_call_role_data_attributes_integrations_permissions_item import ( + NewOnCallRoleDataAttributesIntegrationsPermissionsItem, +) from ..models.new_on_call_role_data_attributes_invitations_permissions_item import ( - NewOnCallRoleDataAttributesInvitationsPermissionsItem, check_new_on_call_role_data_attributes_invitations_permissions_item, ) +from ..models.new_on_call_role_data_attributes_invitations_permissions_item import ( + NewOnCallRoleDataAttributesInvitationsPermissionsItem, +) from ..models.new_on_call_role_data_attributes_live_call_routing_permissions_item import ( - NewOnCallRoleDataAttributesLiveCallRoutingPermissionsItem, check_new_on_call_role_data_attributes_live_call_routing_permissions_item, ) +from ..models.new_on_call_role_data_attributes_live_call_routing_permissions_item import ( + NewOnCallRoleDataAttributesLiveCallRoutingPermissionsItem, +) from ..models.new_on_call_role_data_attributes_on_call_readiness_report_permissions_item import ( - NewOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem, check_new_on_call_role_data_attributes_on_call_readiness_report_permissions_item, ) +from ..models.new_on_call_role_data_attributes_on_call_readiness_report_permissions_item import ( + NewOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem, +) from ..models.new_on_call_role_data_attributes_on_call_roles_permissions_item import ( - NewOnCallRoleDataAttributesOnCallRolesPermissionsItem, check_new_on_call_role_data_attributes_on_call_roles_permissions_item, ) +from ..models.new_on_call_role_data_attributes_on_call_roles_permissions_item import ( + NewOnCallRoleDataAttributesOnCallRolesPermissionsItem, +) from ..models.new_on_call_role_data_attributes_schedule_override_permissions_item import ( - NewOnCallRoleDataAttributesScheduleOverridePermissionsItem, check_new_on_call_role_data_attributes_schedule_override_permissions_item, ) +from ..models.new_on_call_role_data_attributes_schedule_override_permissions_item import ( + NewOnCallRoleDataAttributesScheduleOverridePermissionsItem, +) from ..models.new_on_call_role_data_attributes_schedules_permissions_item import ( - NewOnCallRoleDataAttributesSchedulesPermissionsItem, check_new_on_call_role_data_attributes_schedules_permissions_item, ) +from ..models.new_on_call_role_data_attributes_schedules_permissions_item import ( + NewOnCallRoleDataAttributesSchedulesPermissionsItem, +) from ..models.new_on_call_role_data_attributes_services_permissions_item import ( - NewOnCallRoleDataAttributesServicesPermissionsItem, check_new_on_call_role_data_attributes_services_permissions_item, ) +from ..models.new_on_call_role_data_attributes_services_permissions_item import ( + NewOnCallRoleDataAttributesServicesPermissionsItem, +) from ..models.new_on_call_role_data_attributes_webhooks_permissions_item import ( - NewOnCallRoleDataAttributesWebhooksPermissionsItem, check_new_on_call_role_data_attributes_webhooks_permissions_item, ) +from ..models.new_on_call_role_data_attributes_webhooks_permissions_item import ( + NewOnCallRoleDataAttributesWebhooksPermissionsItem, +) from ..models.new_on_call_role_data_attributes_workflows_permissions_item import ( - NewOnCallRoleDataAttributesWorkflowsPermissionsItem, check_new_on_call_role_data_attributes_workflows_permissions_item, ) +from ..models.new_on_call_role_data_attributes_workflows_permissions_item import ( + NewOnCallRoleDataAttributesWorkflowsPermissionsItem, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewOnCallRoleDataAttributes") @@ -125,8 +186,10 @@ class NewOnCallRoleDataAttributes: schedule_override_permissions (list[NewOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset): schedules_permissions (list[NewOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset): services_permissions (list[NewOnCallRoleDataAttributesServicesPermissionsItem] | Unset): + functionalities_permissions (list[NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset): webhooks_permissions (list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset): workflows_permissions (list[NewOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset): + catalogs_permissions (list[NewOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset): """ name: str @@ -153,8 +216,10 @@ class NewOnCallRoleDataAttributes: schedule_override_permissions: list[NewOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset = UNSET schedules_permissions: list[NewOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset = UNSET services_permissions: list[NewOnCallRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + functionalities_permissions: list[NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET webhooks_permissions: list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET workflows_permissions: list[NewOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + catalogs_permissions: list[NewOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -301,6 +366,13 @@ def to_dict(self) -> dict[str, Any]: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) + 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) + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] @@ -315,6 +387,13 @@ def to_dict(self) -> dict[str, Any]: 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) + field_dict: dict[str, Any] = {} field_dict.update( @@ -364,10 +443,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["schedules_permissions"] = schedules_permissions if services_permissions is not UNSET: field_dict["services_permissions"] = services_permissions + if functionalities_permissions is not UNSET: + field_dict["functionalities_permissions"] = functionalities_permissions if webhooks_permissions is not UNSET: 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 return field_dict @@ -614,6 +697,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: services_permissions.append(services_permissions_item) + _functionalities_permissions = d.pop("functionalities_permissions", UNSET) + functionalities_permissions: list[NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET + if _functionalities_permissions is not UNSET: + functionalities_permissions = [] + for functionalities_permissions_item_data in _functionalities_permissions: + functionalities_permissions_item = ( + check_new_on_call_role_data_attributes_functionalities_permissions_item( + functionalities_permissions_item_data + ) + ) + + functionalities_permissions.append(functionalities_permissions_item) + _webhooks_permissions = d.pop("webhooks_permissions", UNSET) webhooks_permissions: list[NewOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET if _webhooks_permissions is not UNSET: @@ -636,6 +732,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: workflows_permissions.append(workflows_permissions_item) + _catalogs_permissions = d.pop("catalogs_permissions", UNSET) + catalogs_permissions: list[NewOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET + if _catalogs_permissions is not UNSET: + catalogs_permissions = [] + for catalogs_permissions_item_data in _catalogs_permissions: + catalogs_permissions_item = check_new_on_call_role_data_attributes_catalogs_permissions_item( + catalogs_permissions_item_data + ) + + catalogs_permissions.append(catalogs_permissions_item) + new_on_call_role_data_attributes = cls( name=name, system_role=system_role, @@ -659,8 +766,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_override_permissions=schedule_override_permissions, schedules_permissions=schedules_permissions, services_permissions=services_permissions, + functionalities_permissions=functionalities_permissions, webhooks_permissions=webhooks_permissions, workflows_permissions=workflows_permissions, + catalogs_permissions=catalogs_permissions, ) return new_on_call_role_data_attributes diff --git a/rootly_sdk/models/new_on_call_role_data_attributes_catalogs_permissions_item.py b/rootly_sdk/models/new_on_call_role_data_attributes_catalogs_permissions_item.py new file mode 100644 index 00000000..67995029 --- /dev/null +++ b/rootly_sdk/models/new_on_call_role_data_attributes_catalogs_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewOnCallRoleDataAttributesCatalogsPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: set[ + NewOnCallRoleDataAttributesCatalogsPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_on_call_role_data_attributes_catalogs_permissions_item( + value: str | None, +) -> NewOnCallRoleDataAttributesCatalogsPermissionsItem | None: + if value is None: + return None + if value in NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: + return cast(NewOnCallRoleDataAttributesCatalogsPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_on_call_role_data_attributes_functionalities_permissions_item.py b/rootly_sdk/models/new_on_call_role_data_attributes_functionalities_permissions_item.py new file mode 100644 index 00000000..8782bccc --- /dev/null +++ b/rootly_sdk/models/new_on_call_role_data_attributes_functionalities_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem = Literal["create", "delete", "read", "update"] + +NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: set[ + NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_new_on_call_role_data_attributes_functionalities_permissions_item( + value: str | None, +) -> NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem | None: + if value is None: + return None + if value in NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: + return cast(NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_on_call_shadow.py b/rootly_sdk/models/new_on_call_shadow.py index 7eecd798..0d343e13 100644 --- a/rootly_sdk/models/new_on_call_shadow.py +++ b/rootly_sdk/models/new_on_call_shadow.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_on_call_shadow_data import NewOnCallShadowData @@ -24,6 +28,8 @@ class NewOnCallShadow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_on_call_shadow_data import NewOnCallShadowData + data = self.data.to_dict() field_dict: 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 c649641d..08660bba 100644 --- a/rootly_sdk/models/new_on_call_shadow_data.py +++ b/rootly_sdk/models/new_on_call_shadow_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_on_call_shadow_data_type import NewOnCallShadowDataType, check_new_on_call_shadow_data_type +from ..types import UNSET, Unset + +from ..models.new_on_call_shadow_data_type import check_new_on_call_shadow_data_type +from ..models.new_on_call_shadow_data_type import NewOnCallShadowDataType +from typing import cast if TYPE_CHECKING: from ..models.new_on_call_shadow_data_attributes import NewOnCallShadowDataAttributes @@ -28,6 +32,8 @@ class NewOnCallShadowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_on_call_shadow_data_attributes import NewOnCallShadowDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 f0ea1c0b..10caff6e 100644 --- a/rootly_sdk/models/new_on_call_shadow_data_attributes.py +++ b/rootly_sdk/models/new_on_call_shadow_data_attributes.py @@ -1,16 +1,21 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_on_call_shadow_data_attributes_shadowable_type import ( - NewOnCallShadowDataAttributesShadowableType, check_new_on_call_shadow_data_attributes_shadowable_type, ) +from ..models.new_on_call_shadow_data_attributes_shadowable_type import NewOnCallShadowDataAttributesShadowableType +from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="NewOnCallShadowDataAttributes") diff --git a/rootly_sdk/models/new_override_shift.py b/rootly_sdk/models/new_override_shift.py index a0bda87a..ab8418e1 100644 --- a/rootly_sdk/models/new_override_shift.py +++ b/rootly_sdk/models/new_override_shift.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_override_shift_data import NewOverrideShiftData @@ -24,6 +28,8 @@ class NewOverrideShift: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_override_shift_data import NewOverrideShiftData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_override_shift_data.py b/rootly_sdk/models/new_override_shift_data.py index 2be8633b..fec80c40 100644 --- a/rootly_sdk/models/new_override_shift_data.py +++ b/rootly_sdk/models/new_override_shift_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_override_shift_data_type import NewOverrideShiftDataType, check_new_override_shift_data_type +from ..types import UNSET, Unset + +from ..models.new_override_shift_data_type import check_new_override_shift_data_type +from ..models.new_override_shift_data_type import NewOverrideShiftDataType +from typing import cast if TYPE_CHECKING: from ..models.new_override_shift_data_attributes import NewOverrideShiftDataAttributes @@ -28,6 +32,8 @@ class NewOverrideShiftData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_override_shift_data_attributes import NewOverrideShiftDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_override_shift_data_attributes.py b/rootly_sdk/models/new_override_shift_data_attributes.py index 028469d7..ce42cbc7 100644 --- a/rootly_sdk/models/new_override_shift_data_attributes.py +++ b/rootly_sdk/models/new_override_shift_data_attributes.py @@ -1,11 +1,17 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="NewOverrideShiftDataAttributes") diff --git a/rootly_sdk/models/new_playbook.py b/rootly_sdk/models/new_playbook.py index dac6a6d8..0422988f 100644 --- a/rootly_sdk/models/new_playbook.py +++ b/rootly_sdk/models/new_playbook.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_playbook_data import NewPlaybookData @@ -24,6 +28,8 @@ class NewPlaybook: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_playbook_data import NewPlaybookData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_playbook_data.py b/rootly_sdk/models/new_playbook_data.py index 7c263a52..4a781381 100644 --- a/rootly_sdk/models/new_playbook_data.py +++ b/rootly_sdk/models/new_playbook_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_playbook_data_type import NewPlaybookDataType, check_new_playbook_data_type +from ..types import UNSET, Unset + +from ..models.new_playbook_data_type import check_new_playbook_data_type +from ..models.new_playbook_data_type import NewPlaybookDataType +from typing import cast if TYPE_CHECKING: from ..models.new_playbook_data_attributes import NewPlaybookDataAttributes @@ -28,6 +32,8 @@ class NewPlaybookData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_playbook_data_attributes import NewPlaybookDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_playbook_data_attributes.py b/rootly_sdk/models/new_playbook_data_attributes.py index 5dae9c85..b85e3d88 100644 --- a/rootly_sdk/models/new_playbook_data_attributes.py +++ b/rootly_sdk/models/new_playbook_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewPlaybookDataAttributes") diff --git a/rootly_sdk/models/new_playbook_task.py b/rootly_sdk/models/new_playbook_task.py index 47a722bb..f9854fce 100644 --- a/rootly_sdk/models/new_playbook_task.py +++ b/rootly_sdk/models/new_playbook_task.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_playbook_task_data import NewPlaybookTaskData @@ -24,6 +28,8 @@ class NewPlaybookTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_playbook_task_data import NewPlaybookTaskData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_playbook_task_data.py b/rootly_sdk/models/new_playbook_task_data.py index 7537c231..9f359c4f 100644 --- a/rootly_sdk/models/new_playbook_task_data.py +++ b/rootly_sdk/models/new_playbook_task_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_playbook_task_data_type import NewPlaybookTaskDataType, check_new_playbook_task_data_type +from ..types import UNSET, Unset + +from ..models.new_playbook_task_data_type import check_new_playbook_task_data_type +from ..models.new_playbook_task_data_type import NewPlaybookTaskDataType +from typing import cast if TYPE_CHECKING: from ..models.new_playbook_task_data_attributes import NewPlaybookTaskDataAttributes @@ -28,6 +32,8 @@ class NewPlaybookTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_playbook_task_data_attributes import NewPlaybookTaskDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_playbook_task_data_attributes.py b/rootly_sdk/models/new_playbook_task_data_attributes.py index 7888c99c..2b93c5b5 100644 --- a/rootly_sdk/models/new_playbook_task_data_attributes.py +++ b/rootly_sdk/models/new_playbook_task_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewPlaybookTaskDataAttributes") diff --git a/rootly_sdk/models/new_post_mortem_template.py b/rootly_sdk/models/new_post_mortem_template.py index a5337ac9..c5d55dcf 100644 --- a/rootly_sdk/models/new_post_mortem_template.py +++ b/rootly_sdk/models/new_post_mortem_template.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_post_mortem_template_data import NewPostMortemTemplateData @@ -24,6 +28,8 @@ class NewPostMortemTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_post_mortem_template_data import NewPostMortemTemplateData + data = self.data.to_dict() field_dict: 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 e18d907e..cbfb237d 100644 --- a/rootly_sdk/models/new_post_mortem_template_data.py +++ b/rootly_sdk/models/new_post_mortem_template_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_post_mortem_template_data_type import ( - NewPostMortemTemplateDataType, - check_new_post_mortem_template_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_post_mortem_template_data_type import check_new_post_mortem_template_data_type +from ..models.new_post_mortem_template_data_type import NewPostMortemTemplateDataType +from typing import cast if TYPE_CHECKING: from ..models.new_post_mortem_template_data_attributes import NewPostMortemTemplateDataAttributes @@ -31,6 +32,8 @@ class NewPostMortemTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_post_mortem_template_data_attributes import NewPostMortemTemplateDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 a90a8526..da42c003 100644 --- a/rootly_sdk/models/new_post_mortem_template_data_attributes.py +++ b/rootly_sdk/models/new_post_mortem_template_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_post_mortem_template_data_attributes_format import ( - NewPostMortemTemplateDataAttributesFormat, check_new_post_mortem_template_data_attributes_format, ) +from ..models.new_post_mortem_template_data_attributes_format import NewPostMortemTemplateDataAttributesFormat from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewPostMortemTemplateDataAttributes") diff --git a/rootly_sdk/models/new_pulse.py b/rootly_sdk/models/new_pulse.py index cdd2c0cc..125b2cb3 100644 --- a/rootly_sdk/models/new_pulse.py +++ b/rootly_sdk/models/new_pulse.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_pulse_data import NewPulseData @@ -24,6 +28,8 @@ class NewPulse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_pulse_data import NewPulseData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_pulse_data.py b/rootly_sdk/models/new_pulse_data.py index 4b26421b..ec2ca557 100644 --- a/rootly_sdk/models/new_pulse_data.py +++ b/rootly_sdk/models/new_pulse_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_pulse_data_type import NewPulseDataType, check_new_pulse_data_type +from ..types import UNSET, Unset + +from ..models.new_pulse_data_type import check_new_pulse_data_type +from ..models.new_pulse_data_type import NewPulseDataType +from typing import cast if TYPE_CHECKING: from ..models.new_pulse_data_attributes import NewPulseDataAttributes @@ -28,6 +32,8 @@ class NewPulseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_pulse_data_attributes import NewPulseDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_pulse_data_attributes.py b/rootly_sdk/models/new_pulse_data_attributes.py index c16515c8..6c244458 100644 --- a/rootly_sdk/models/new_pulse_data_attributes.py +++ b/rootly_sdk/models/new_pulse_data_attributes.py @@ -1,13 +1,17 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime if TYPE_CHECKING: from ..models.new_pulse_data_attributes_data_type_0 import NewPulseDataAttributesDataType0 @@ -47,8 +51,8 @@ class NewPulseDataAttributes: def to_dict(self) -> dict[str, Any]: from ..models.new_pulse_data_attributes_data_type_0 import NewPulseDataAttributesDataType0 - from ..models.new_pulse_data_attributes_labels_item_type_0 import NewPulseDataAttributesLabelsItemType0 from ..models.new_pulse_data_attributes_refs_item_type_0 import NewPulseDataAttributesRefsItemType0 + from ..models.new_pulse_data_attributes_labels_item_type_0 import NewPulseDataAttributesLabelsItemType0 summary = self.summary 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 03734676..64853a52 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewPulseDataAttributesDataType0") 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 b85f9272..ce76c671 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewPulseDataAttributesLabelsItemType0") 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 dafc0f72..403b65c5 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewPulseDataAttributesRefsItemType0") diff --git a/rootly_sdk/models/new_retrospective_process.py b/rootly_sdk/models/new_retrospective_process.py index db872de5..786332f4 100644 --- a/rootly_sdk/models/new_retrospective_process.py +++ b/rootly_sdk/models/new_retrospective_process.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_retrospective_process_data import NewRetrospectiveProcessData @@ -24,6 +28,8 @@ class NewRetrospectiveProcess: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_retrospective_process_data import NewRetrospectiveProcessData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_retrospective_process_data.py b/rootly_sdk/models/new_retrospective_process_data.py index a81d545f..add0293f 100644 --- a/rootly_sdk/models/new_retrospective_process_data.py +++ b/rootly_sdk/models/new_retrospective_process_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_retrospective_process_data_type import ( - NewRetrospectiveProcessDataType, - check_new_retrospective_process_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_retrospective_process_data_type import check_new_retrospective_process_data_type +from ..models.new_retrospective_process_data_type import NewRetrospectiveProcessDataType +from typing import cast if TYPE_CHECKING: from ..models.new_retrospective_process_data_attributes import NewRetrospectiveProcessDataAttributes @@ -31,6 +32,8 @@ class NewRetrospectiveProcessData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_retrospective_process_data_attributes import NewRetrospectiveProcessDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_retrospective_process_data_attributes.py b/rootly_sdk/models/new_retrospective_process_data_attributes.py index 49bfd3bf..ef8f9b22 100644 --- a/rootly_sdk/models/new_retrospective_process_data_attributes.py +++ b/rootly_sdk/models/new_retrospective_process_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0 import ( NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0, @@ -47,6 +51,9 @@ class NewRetrospectiveProcessDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2 import ( + NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2, + ) from ..models.new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0 import ( NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0, ) 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 bb07129a..ff1d8a5a 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,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0") 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 452c2da5..b0e950c8 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,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1") 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 5645b537..aec4fb34 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,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2") diff --git a/rootly_sdk/models/new_retrospective_process_group.py b/rootly_sdk/models/new_retrospective_process_group.py index b4879e14..a9259b26 100644 --- a/rootly_sdk/models/new_retrospective_process_group.py +++ b/rootly_sdk/models/new_retrospective_process_group.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_retrospective_process_group_data import NewRetrospectiveProcessGroupData @@ -24,6 +28,8 @@ class NewRetrospectiveProcessGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_retrospective_process_group_data import NewRetrospectiveProcessGroupData + data = self.data.to_dict() field_dict: 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 95af45ea..bbca31ad 100644 --- a/rootly_sdk/models/new_retrospective_process_group_data.py +++ b/rootly_sdk/models/new_retrospective_process_group_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_retrospective_process_group_data_type import ( - NewRetrospectiveProcessGroupDataType, - check_new_retrospective_process_group_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_retrospective_process_group_data_type import check_new_retrospective_process_group_data_type +from ..models.new_retrospective_process_group_data_type import NewRetrospectiveProcessGroupDataType +from typing import cast if TYPE_CHECKING: from ..models.new_retrospective_process_group_data_attributes import NewRetrospectiveProcessGroupDataAttributes @@ -31,6 +32,8 @@ class NewRetrospectiveProcessGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_retrospective_process_group_data_attributes import NewRetrospectiveProcessGroupDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 a9d822d9..d5dc514a 100644 --- a/rootly_sdk/models/new_retrospective_process_group_data_attributes.py +++ b/rootly_sdk/models/new_retrospective_process_group_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewRetrospectiveProcessGroupDataAttributes") diff --git a/rootly_sdk/models/new_retrospective_process_group_step.py b/rootly_sdk/models/new_retrospective_process_group_step.py index 51c3de7e..9b0e63c7 100644 --- a/rootly_sdk/models/new_retrospective_process_group_step.py +++ b/rootly_sdk/models/new_retrospective_process_group_step.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_retrospective_process_group_step_data import NewRetrospectiveProcessGroupStepData @@ -24,6 +28,8 @@ class NewRetrospectiveProcessGroupStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_retrospective_process_group_step_data import NewRetrospectiveProcessGroupStepData + data = self.data.to_dict() field_dict: 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 55e5225b..90faeaaa 100644 --- a/rootly_sdk/models/new_retrospective_process_group_step_data.py +++ b/rootly_sdk/models/new_retrospective_process_group_step_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_retrospective_process_group_step_data_type import ( - NewRetrospectiveProcessGroupStepDataType, - check_new_retrospective_process_group_step_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_retrospective_process_group_step_data_type import check_new_retrospective_process_group_step_data_type +from ..models.new_retrospective_process_group_step_data_type import NewRetrospectiveProcessGroupStepDataType +from typing import cast if TYPE_CHECKING: from ..models.new_retrospective_process_group_step_data_attributes import ( @@ -33,6 +34,10 @@ class NewRetrospectiveProcessGroupStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_retrospective_process_group_step_data_attributes import ( + NewRetrospectiveProcessGroupStepDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 5374e922..7deb3453 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,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewRetrospectiveProcessGroupStepDataAttributes") diff --git a/rootly_sdk/models/new_retrospective_step.py b/rootly_sdk/models/new_retrospective_step.py index fcd3c6f9..7a7f504e 100644 --- a/rootly_sdk/models/new_retrospective_step.py +++ b/rootly_sdk/models/new_retrospective_step.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_retrospective_step_data import NewRetrospectiveStepData @@ -24,6 +28,8 @@ class NewRetrospectiveStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_retrospective_step_data import NewRetrospectiveStepData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_retrospective_step_data.py b/rootly_sdk/models/new_retrospective_step_data.py index c2d74e95..13f136f0 100644 --- a/rootly_sdk/models/new_retrospective_step_data.py +++ b/rootly_sdk/models/new_retrospective_step_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_retrospective_step_data_type import ( - NewRetrospectiveStepDataType, - check_new_retrospective_step_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_retrospective_step_data_type import check_new_retrospective_step_data_type +from ..models.new_retrospective_step_data_type import NewRetrospectiveStepDataType +from typing import cast if TYPE_CHECKING: from ..models.new_retrospective_step_data_attributes import NewRetrospectiveStepDataAttributes @@ -31,6 +32,8 @@ class NewRetrospectiveStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_retrospective_step_data_attributes import NewRetrospectiveStepDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_retrospective_step_data_attributes.py b/rootly_sdk/models/new_retrospective_step_data_attributes.py index 3b6079ec..d93ae994 100644 --- a/rootly_sdk/models/new_retrospective_step_data_attributes.py +++ b/rootly_sdk/models/new_retrospective_step_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewRetrospectiveStepDataAttributes") diff --git a/rootly_sdk/models/new_role.py b/rootly_sdk/models/new_role.py index 7ecd0d51..b16d90b7 100644 --- a/rootly_sdk/models/new_role.py +++ b/rootly_sdk/models/new_role.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_role_data import NewRoleData @@ -24,6 +28,8 @@ class NewRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_role_data import NewRoleData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_role_data.py b/rootly_sdk/models/new_role_data.py index 75843462..f25364db 100644 --- a/rootly_sdk/models/new_role_data.py +++ b/rootly_sdk/models/new_role_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_role_data_type import NewRoleDataType, check_new_role_data_type +from ..types import UNSET, Unset + +from ..models.new_role_data_type import check_new_role_data_type +from ..models.new_role_data_type import NewRoleDataType +from typing import cast if TYPE_CHECKING: from ..models.new_role_data_attributes import NewRoleDataAttributes @@ -28,6 +32,8 @@ class NewRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_role_data_attributes import NewRoleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_role_data_attributes.py b/rootly_sdk/models/new_role_data_attributes.py index db2e7aa3..1e0152e5 100644 --- a/rootly_sdk/models/new_role_data_attributes.py +++ b/rootly_sdk/models/new_role_data_attributes.py @@ -1,143 +1,178 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_role_data_attributes_alerts_permissions_item import ( - NewRoleDataAttributesAlertsPermissionsItem, check_new_role_data_attributes_alerts_permissions_item, ) +from ..models.new_role_data_attributes_alerts_permissions_item import NewRoleDataAttributesAlertsPermissionsItem from ..models.new_role_data_attributes_api_keys_permissions_item import ( - NewRoleDataAttributesApiKeysPermissionsItem, check_new_role_data_attributes_api_keys_permissions_item, ) +from ..models.new_role_data_attributes_api_keys_permissions_item import NewRoleDataAttributesApiKeysPermissionsItem from ..models.new_role_data_attributes_audits_permissions_item import ( - NewRoleDataAttributesAuditsPermissionsItem, check_new_role_data_attributes_audits_permissions_item, ) +from ..models.new_role_data_attributes_audits_permissions_item import NewRoleDataAttributesAuditsPermissionsItem from ..models.new_role_data_attributes_billing_permissions_item import ( - NewRoleDataAttributesBillingPermissionsItem, check_new_role_data_attributes_billing_permissions_item, ) +from ..models.new_role_data_attributes_billing_permissions_item import NewRoleDataAttributesBillingPermissionsItem 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_catalogs_permissions_item import NewRoleDataAttributesCatalogsPermissionsItem 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_communication_permissions_item import ( + NewRoleDataAttributesCommunicationPermissionsItem, +) 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_edge_connector_permissions_item import ( + NewRoleDataAttributesEdgeConnectorPermissionsItem, +) from ..models.new_role_data_attributes_environments_permissions_item import ( - NewRoleDataAttributesEnvironmentsPermissionsItem, check_new_role_data_attributes_environments_permissions_item, ) +from ..models.new_role_data_attributes_environments_permissions_item import ( + NewRoleDataAttributesEnvironmentsPermissionsItem, +) from ..models.new_role_data_attributes_form_fields_permissions_item import ( - NewRoleDataAttributesFormFieldsPermissionsItem, check_new_role_data_attributes_form_fields_permissions_item, ) +from ..models.new_role_data_attributes_form_fields_permissions_item import ( + NewRoleDataAttributesFormFieldsPermissionsItem, +) from ..models.new_role_data_attributes_functionalities_permissions_item import ( - NewRoleDataAttributesFunctionalitiesPermissionsItem, check_new_role_data_attributes_functionalities_permissions_item, ) +from ..models.new_role_data_attributes_functionalities_permissions_item import ( + NewRoleDataAttributesFunctionalitiesPermissionsItem, +) from ..models.new_role_data_attributes_groups_permissions_item import ( - NewRoleDataAttributesGroupsPermissionsItem, check_new_role_data_attributes_groups_permissions_item, ) +from ..models.new_role_data_attributes_groups_permissions_item import NewRoleDataAttributesGroupsPermissionsItem from ..models.new_role_data_attributes_incident_causes_permissions_item import ( - NewRoleDataAttributesIncidentCausesPermissionsItem, check_new_role_data_attributes_incident_causes_permissions_item, ) +from ..models.new_role_data_attributes_incident_causes_permissions_item import ( + NewRoleDataAttributesIncidentCausesPermissionsItem, +) 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_communication_permissions_item import ( + NewRoleDataAttributesIncidentCommunicationPermissionsItem, +) from ..models.new_role_data_attributes_incident_feedbacks_permissions_item import ( - NewRoleDataAttributesIncidentFeedbacksPermissionsItem, check_new_role_data_attributes_incident_feedbacks_permissions_item, ) +from ..models.new_role_data_attributes_incident_feedbacks_permissions_item import ( + NewRoleDataAttributesIncidentFeedbacksPermissionsItem, +) from ..models.new_role_data_attributes_incident_roles_permissions_item import ( - NewRoleDataAttributesIncidentRolesPermissionsItem, check_new_role_data_attributes_incident_roles_permissions_item, ) +from ..models.new_role_data_attributes_incident_roles_permissions_item import ( + NewRoleDataAttributesIncidentRolesPermissionsItem, +) from ..models.new_role_data_attributes_incident_types_permissions_item import ( - NewRoleDataAttributesIncidentTypesPermissionsItem, check_new_role_data_attributes_incident_types_permissions_item, ) +from ..models.new_role_data_attributes_incident_types_permissions_item import ( + NewRoleDataAttributesIncidentTypesPermissionsItem, +) from ..models.new_role_data_attributes_incidents_permissions_item import ( - NewRoleDataAttributesIncidentsPermissionsItem, check_new_role_data_attributes_incidents_permissions_item, ) +from ..models.new_role_data_attributes_incidents_permissions_item import NewRoleDataAttributesIncidentsPermissionsItem from ..models.new_role_data_attributes_integrations_permissions_item import ( - NewRoleDataAttributesIntegrationsPermissionsItem, check_new_role_data_attributes_integrations_permissions_item, ) +from ..models.new_role_data_attributes_integrations_permissions_item import ( + NewRoleDataAttributesIntegrationsPermissionsItem, +) from ..models.new_role_data_attributes_invitations_permissions_item import ( - NewRoleDataAttributesInvitationsPermissionsItem, check_new_role_data_attributes_invitations_permissions_item, ) +from ..models.new_role_data_attributes_invitations_permissions_item import ( + NewRoleDataAttributesInvitationsPermissionsItem, +) 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_paging_permissions_item import NewRoleDataAttributesPagingPermissionsItem from ..models.new_role_data_attributes_playbooks_permissions_item import ( - NewRoleDataAttributesPlaybooksPermissionsItem, check_new_role_data_attributes_playbooks_permissions_item, ) +from ..models.new_role_data_attributes_playbooks_permissions_item import NewRoleDataAttributesPlaybooksPermissionsItem from ..models.new_role_data_attributes_private_incidents_permissions_item import ( - NewRoleDataAttributesPrivateIncidentsPermissionsItem, check_new_role_data_attributes_private_incidents_permissions_item, ) +from ..models.new_role_data_attributes_private_incidents_permissions_item import ( + NewRoleDataAttributesPrivateIncidentsPermissionsItem, +) from ..models.new_role_data_attributes_pulses_permissions_item import ( - NewRoleDataAttributesPulsesPermissionsItem, check_new_role_data_attributes_pulses_permissions_item, ) +from ..models.new_role_data_attributes_pulses_permissions_item import NewRoleDataAttributesPulsesPermissionsItem from ..models.new_role_data_attributes_retrospective_permissions_item import ( - NewRoleDataAttributesRetrospectivePermissionsItem, check_new_role_data_attributes_retrospective_permissions_item, ) +from ..models.new_role_data_attributes_retrospective_permissions_item import ( + NewRoleDataAttributesRetrospectivePermissionsItem, +) from ..models.new_role_data_attributes_roles_permissions_item import ( - NewRoleDataAttributesRolesPermissionsItem, check_new_role_data_attributes_roles_permissions_item, ) +from ..models.new_role_data_attributes_roles_permissions_item import NewRoleDataAttributesRolesPermissionsItem from ..models.new_role_data_attributes_secrets_permissions_item import ( - NewRoleDataAttributesSecretsPermissionsItem, check_new_role_data_attributes_secrets_permissions_item, ) +from ..models.new_role_data_attributes_secrets_permissions_item import NewRoleDataAttributesSecretsPermissionsItem from ..models.new_role_data_attributes_services_permissions_item import ( - NewRoleDataAttributesServicesPermissionsItem, check_new_role_data_attributes_services_permissions_item, ) +from ..models.new_role_data_attributes_services_permissions_item import NewRoleDataAttributesServicesPermissionsItem from ..models.new_role_data_attributes_severities_permissions_item import ( - 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_severities_permissions_item import NewRoleDataAttributesSeveritiesPermissionsItem +from ..models.new_role_data_attributes_slas_permissions_item import check_new_role_data_attributes_slas_permissions_item +from ..models.new_role_data_attributes_slas_permissions_item import NewRoleDataAttributesSlasPermissionsItem +from ..models.new_role_data_attributes_status_pages_permissions_item import ( + check_new_role_data_attributes_status_pages_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_sub_statuses_permissions_item import ( + NewRoleDataAttributesSubStatusesPermissionsItem, +) from ..models.new_role_data_attributes_webhooks_permissions_item import ( - NewRoleDataAttributesWebhooksPermissionsItem, check_new_role_data_attributes_webhooks_permissions_item, ) +from ..models.new_role_data_attributes_webhooks_permissions_item import NewRoleDataAttributesWebhooksPermissionsItem from ..models.new_role_data_attributes_workflows_permissions_item import ( - NewRoleDataAttributesWorkflowsPermissionsItem, check_new_role_data_attributes_workflows_permissions_item, ) +from ..models.new_role_data_attributes_workflows_permissions_item import NewRoleDataAttributesWorkflowsPermissionsItem from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewRoleDataAttributes") diff --git a/rootly_sdk/models/new_schedule.py b/rootly_sdk/models/new_schedule.py index 8dfa2c2f..4b975b0d 100644 --- a/rootly_sdk/models/new_schedule.py +++ b/rootly_sdk/models/new_schedule.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_schedule_data import NewScheduleData @@ -24,6 +28,8 @@ class NewSchedule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_data import NewScheduleData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_schedule_data.py b/rootly_sdk/models/new_schedule_data.py index 3503c7c1..0526a9f8 100644 --- a/rootly_sdk/models/new_schedule_data.py +++ b/rootly_sdk/models/new_schedule_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_schedule_data_type import NewScheduleDataType, check_new_schedule_data_type +from ..types import UNSET, Unset + +from ..models.new_schedule_data_type import check_new_schedule_data_type +from ..models.new_schedule_data_type import NewScheduleDataType +from typing import cast if TYPE_CHECKING: from ..models.new_schedule_data_attributes import NewScheduleDataAttributes @@ -28,6 +32,8 @@ class NewScheduleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_data_attributes import NewScheduleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_schedule_data_attributes.py b/rootly_sdk/models/new_schedule_data_attributes.py index dd1a68e6..da6811c8 100644 --- a/rootly_sdk/models/new_schedule_data_attributes.py +++ b/rootly_sdk/models/new_schedule_data_attributes.py @@ -1,12 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.new_schedule_data_attributes_shift_report_day_of_week import ( + check_new_schedule_data_attributes_shift_report_day_of_week, +) +from ..models.new_schedule_data_attributes_shift_report_day_of_week import NewScheduleDataAttributesShiftReportDayOfWeek +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_schedule_data_attributes_slack_channel_type_0 import NewScheduleDataAttributesSlackChannelType0 from ..models.new_schedule_data_attributes_slack_user_group import NewScheduleDataAttributesSlackUserGroup @@ -26,6 +34,21 @@ class NewScheduleDataAttributes: slack_user_group (NewScheduleDataAttributesSlackUserGroup | Unset): slack_channel (NewScheduleDataAttributesSlackChannelType0 | None | Unset): owner_group_ids (list[str] | Unset): Owning teams. + sync_linear_enabled (bool | None | Unset): Whether the schedule is synced with Linear + include_shadows_in_slack_notifications (bool | None | Unset): Whether shadow users are included in Slack + notifications and user group syncing. Requires `slack_channel` to be set; otherwise this value is forced to + false on save. + shift_start_notifications_enabled (bool | None | Unset): Whether shift-start notifications are enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_update_notifications_enabled (bool | None | Unset): Whether shift-update notifications are enabled. + Requires `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_enabled (bool | None | Unset): Whether the weekly shift summary report is enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_day_of_week (NewScheduleDataAttributesShiftReportDayOfWeek | Unset): Day of week the weekly shift + summary is sent + shift_report_time_of_day (None | str | Unset): Time of day the weekly shift summary is sent, in HH:MM 24-hour + format + shift_report_time_zone (None | str | Unset): IANA time zone used for the weekly shift summary """ name: str @@ -35,8 +58,17 @@ class NewScheduleDataAttributes: slack_user_group: NewScheduleDataAttributesSlackUserGroup | Unset = UNSET slack_channel: NewScheduleDataAttributesSlackChannelType0 | None | Unset = UNSET owner_group_ids: list[str] | Unset = UNSET + sync_linear_enabled: bool | None | Unset = UNSET + include_shadows_in_slack_notifications: bool | None | Unset = UNSET + shift_start_notifications_enabled: bool | None | Unset = UNSET + shift_update_notifications_enabled: bool | None | Unset = UNSET + shift_report_enabled: bool | None | Unset = UNSET + shift_report_day_of_week: NewScheduleDataAttributesShiftReportDayOfWeek | Unset = UNSET + shift_report_time_of_day: None | str | Unset = UNSET + shift_report_time_zone: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_data_attributes_slack_user_group import NewScheduleDataAttributesSlackUserGroup from ..models.new_schedule_data_attributes_slack_channel_type_0 import ( NewScheduleDataAttributesSlackChannelType0, ) @@ -73,6 +105,52 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids + sync_linear_enabled: bool | None | Unset + if isinstance(self.sync_linear_enabled, Unset): + sync_linear_enabled = UNSET + else: + sync_linear_enabled = self.sync_linear_enabled + + include_shadows_in_slack_notifications: bool | None | Unset + if isinstance(self.include_shadows_in_slack_notifications, Unset): + include_shadows_in_slack_notifications = UNSET + else: + include_shadows_in_slack_notifications = self.include_shadows_in_slack_notifications + + shift_start_notifications_enabled: bool | None | Unset + if isinstance(self.shift_start_notifications_enabled, Unset): + shift_start_notifications_enabled = UNSET + else: + shift_start_notifications_enabled = self.shift_start_notifications_enabled + + shift_update_notifications_enabled: bool | None | Unset + if isinstance(self.shift_update_notifications_enabled, Unset): + shift_update_notifications_enabled = UNSET + else: + shift_update_notifications_enabled = self.shift_update_notifications_enabled + + shift_report_enabled: bool | None | Unset + if isinstance(self.shift_report_enabled, Unset): + shift_report_enabled = UNSET + else: + shift_report_enabled = self.shift_report_enabled + + shift_report_day_of_week: str | Unset = UNSET + if not isinstance(self.shift_report_day_of_week, Unset): + shift_report_day_of_week = self.shift_report_day_of_week + + shift_report_time_of_day: None | str | Unset + if isinstance(self.shift_report_time_of_day, Unset): + shift_report_time_of_day = UNSET + else: + shift_report_time_of_day = self.shift_report_time_of_day + + shift_report_time_zone: None | str | Unset + if isinstance(self.shift_report_time_zone, Unset): + shift_report_time_zone = UNSET + else: + shift_report_time_zone = self.shift_report_time_zone + field_dict: dict[str, Any] = {} field_dict.update( @@ -91,6 +169,22 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channel"] = slack_channel if owner_group_ids is not UNSET: field_dict["owner_group_ids"] = owner_group_ids + if sync_linear_enabled is not UNSET: + field_dict["sync_linear_enabled"] = sync_linear_enabled + if include_shadows_in_slack_notifications is not UNSET: + field_dict["include_shadows_in_slack_notifications"] = include_shadows_in_slack_notifications + if shift_start_notifications_enabled is not UNSET: + field_dict["shift_start_notifications_enabled"] = shift_start_notifications_enabled + if shift_update_notifications_enabled is not UNSET: + field_dict["shift_update_notifications_enabled"] = shift_update_notifications_enabled + if shift_report_enabled is not UNSET: + field_dict["shift_report_enabled"] = shift_report_enabled + if shift_report_day_of_week is not UNSET: + field_dict["shift_report_day_of_week"] = shift_report_day_of_week + if shift_report_time_of_day is not UNSET: + field_dict["shift_report_time_of_day"] = shift_report_time_of_day + if shift_report_time_zone is not UNSET: + field_dict["shift_report_time_zone"] = shift_report_time_zone return field_dict @@ -150,6 +244,84 @@ def _parse_slack_channel(data: object) -> NewScheduleDataAttributesSlackChannelT owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET)) + def _parse_sync_linear_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + sync_linear_enabled = _parse_sync_linear_enabled(d.pop("sync_linear_enabled", UNSET)) + + def _parse_include_shadows_in_slack_notifications(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + include_shadows_in_slack_notifications = _parse_include_shadows_in_slack_notifications( + d.pop("include_shadows_in_slack_notifications", UNSET) + ) + + def _parse_shift_start_notifications_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_start_notifications_enabled = _parse_shift_start_notifications_enabled( + d.pop("shift_start_notifications_enabled", UNSET) + ) + + def _parse_shift_update_notifications_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_update_notifications_enabled = _parse_shift_update_notifications_enabled( + d.pop("shift_update_notifications_enabled", UNSET) + ) + + def _parse_shift_report_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_report_enabled = _parse_shift_report_enabled(d.pop("shift_report_enabled", UNSET)) + + _shift_report_day_of_week = d.pop("shift_report_day_of_week", UNSET) + shift_report_day_of_week: NewScheduleDataAttributesShiftReportDayOfWeek | Unset + if isinstance(_shift_report_day_of_week, Unset): + shift_report_day_of_week = UNSET + else: + shift_report_day_of_week = check_new_schedule_data_attributes_shift_report_day_of_week( + _shift_report_day_of_week + ) + + def _parse_shift_report_time_of_day(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shift_report_time_of_day = _parse_shift_report_time_of_day(d.pop("shift_report_time_of_day", UNSET)) + + def _parse_shift_report_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) + + shift_report_time_zone = _parse_shift_report_time_zone(d.pop("shift_report_time_zone", UNSET)) + new_schedule_data_attributes = cls( name=name, owner_user_id=owner_user_id, @@ -158,6 +330,14 @@ def _parse_slack_channel(data: object) -> NewScheduleDataAttributesSlackChannelT slack_user_group=slack_user_group, slack_channel=slack_channel, owner_group_ids=owner_group_ids, + sync_linear_enabled=sync_linear_enabled, + include_shadows_in_slack_notifications=include_shadows_in_slack_notifications, + shift_start_notifications_enabled=shift_start_notifications_enabled, + shift_update_notifications_enabled=shift_update_notifications_enabled, + shift_report_enabled=shift_report_enabled, + shift_report_day_of_week=shift_report_day_of_week, + shift_report_time_of_day=shift_report_time_of_day, + shift_report_time_zone=shift_report_time_zone, ) return new_schedule_data_attributes diff --git a/rootly_sdk/models/new_schedule_data_attributes_shift_report_day_of_week.py b/rootly_sdk/models/new_schedule_data_attributes_shift_report_day_of_week.py new file mode 100644 index 00000000..06bc44a2 --- /dev/null +++ b/rootly_sdk/models/new_schedule_data_attributes_shift_report_day_of_week.py @@ -0,0 +1,27 @@ +from typing import Literal, cast + +NewScheduleDataAttributesShiftReportDayOfWeek = Literal[ + "friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday" +] + +NEW_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES: set[NewScheduleDataAttributesShiftReportDayOfWeek] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_new_schedule_data_attributes_shift_report_day_of_week( + value: str | None, +) -> NewScheduleDataAttributesShiftReportDayOfWeek | None: + if value is None: + return None + if value in NEW_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES: + return cast(NewScheduleDataAttributesShiftReportDayOfWeek, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES!r}" + ) 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 7ba412f5..5748a3ca 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewScheduleDataAttributesSlackChannelType0") 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 14467737..e83db1bb 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewScheduleDataAttributesSlackUserGroup") diff --git a/rootly_sdk/models/new_schedule_rotation.py b/rootly_sdk/models/new_schedule_rotation.py index 258896ae..bc75487d 100644 --- a/rootly_sdk/models/new_schedule_rotation.py +++ b/rootly_sdk/models/new_schedule_rotation.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_schedule_rotation_data import NewScheduleRotationData @@ -24,6 +28,8 @@ class NewScheduleRotation: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_rotation_data import NewScheduleRotationData + data = self.data.to_dict() field_dict: 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 8eaeed71..be9b2b8e 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_schedule_rotation_active_day_data import NewScheduleRotationActiveDayData @@ -24,6 +28,8 @@ class NewScheduleRotationActiveDay: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_rotation_active_day_data import NewScheduleRotationActiveDayData + data = self.data.to_dict() field_dict: 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 c53fded7..f29790b0 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day_data.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_schedule_rotation_active_day_data_type import ( - NewScheduleRotationActiveDayDataType, - check_new_schedule_rotation_active_day_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_schedule_rotation_active_day_data_type import check_new_schedule_rotation_active_day_data_type +from ..models.new_schedule_rotation_active_day_data_type import NewScheduleRotationActiveDayDataType +from typing import cast if TYPE_CHECKING: from ..models.new_schedule_rotation_active_day_data_attributes import NewScheduleRotationActiveDayDataAttributes @@ -31,6 +32,8 @@ class NewScheduleRotationActiveDayData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_rotation_active_day_data_attributes import NewScheduleRotationActiveDayDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 d8ce7dc3..14a000d5 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,14 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_schedule_rotation_active_day_data_attributes_day_name import ( - NewScheduleRotationActiveDayDataAttributesDayName, check_new_schedule_rotation_active_day_data_attributes_day_name, ) +from ..models.new_schedule_rotation_active_day_data_attributes_day_name import ( + NewScheduleRotationActiveDayDataAttributesDayName, +) +from typing import cast if TYPE_CHECKING: from ..models.new_schedule_rotation_active_day_data_attributes_active_time_attributes_item import ( @@ -33,6 +39,10 @@ class NewScheduleRotationActiveDayDataAttributes: active_time_attributes: list[NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_rotation_active_day_data_attributes_active_time_attributes_item import ( + NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem, + ) + day_name: str = self.day_name active_time_attributes = [] 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 de2a9d11..2f1bc597 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem") diff --git a/rootly_sdk/models/new_schedule_rotation_data.py b/rootly_sdk/models/new_schedule_rotation_data.py index 6738b8cb..fe46dcba 100644 --- a/rootly_sdk/models/new_schedule_rotation_data.py +++ b/rootly_sdk/models/new_schedule_rotation_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_schedule_rotation_data_type import NewScheduleRotationDataType, check_new_schedule_rotation_data_type +from ..types import UNSET, Unset + +from ..models.new_schedule_rotation_data_type import check_new_schedule_rotation_data_type +from ..models.new_schedule_rotation_data_type import NewScheduleRotationDataType +from typing import cast if TYPE_CHECKING: from ..models.new_schedule_rotation_data_attributes import NewScheduleRotationDataAttributes @@ -28,6 +32,8 @@ class NewScheduleRotationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_rotation_data_attributes import NewScheduleRotationDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes.py b/rootly_sdk/models/new_schedule_rotation_data_attributes.py index a070e8e0..bff6c6fc 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes.py @@ -1,21 +1,29 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_schedule_rotation_data_attributes_active_days_item import ( - NewScheduleRotationDataAttributesActiveDaysItem, check_new_schedule_rotation_data_attributes_active_days_item, ) +from ..models.new_schedule_rotation_data_attributes_active_days_item import ( + NewScheduleRotationDataAttributesActiveDaysItem, +) from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_type import ( - NewScheduleRotationDataAttributesScheduleRotationableType, check_new_schedule_rotation_data_attributes_schedule_rotationable_type, ) +from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_type import ( + NewScheduleRotationDataAttributesScheduleRotationableType, +) from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime if TYPE_CHECKING: from ..models.new_schedule_rotation_data_attributes_active_time_attributes_item import ( @@ -58,9 +66,9 @@ class NewScheduleRotationDataAttributes: 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 + start_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation starts. Shifts will only be created after this time. - end_time (datetime.date | None | Unset): ISO8601 date and time when rotation ends. Shifts will only be created + end_time (datetime.datetime | None | Unset): RFC3339 date-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 @@ -80,8 +88,8 @@ class NewScheduleRotationDataAttributes: 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 + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET schedule_rotation_members: ( list[NewScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset ) = UNSET @@ -90,9 +98,18 @@ def to_dict(self) -> dict[str, Any]: from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0 import ( NewScheduleRotationDataAttributesScheduleRotationableAttributesType0, ) + from ..models.new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item import ( + NewScheduleRotationDataAttributesScheduleRotationMembersType0Item, + ) + from ..models.new_schedule_rotation_data_attributes_active_time_attributes_item import ( + NewScheduleRotationDataAttributesActiveTimeAttributesItem, + ) from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1 import ( NewScheduleRotationDataAttributesScheduleRotationableAttributesType1, ) + from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3 import ( + NewScheduleRotationDataAttributesScheduleRotationableAttributesType3, + ) from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2 import ( NewScheduleRotationDataAttributesScheduleRotationableAttributesType2, ) @@ -142,7 +159,7 @@ def to_dict(self) -> dict[str, Any]: start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET - elif isinstance(self.start_time, datetime.date): + elif isinstance(self.start_time, datetime.datetime): start_time = self.start_time.isoformat() else: start_time = self.start_time @@ -150,7 +167,7 @@ def to_dict(self) -> dict[str, Any]: end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET - elif isinstance(self.end_time, datetime.date): + elif isinstance(self.end_time, datetime.datetime): end_time = self.end_time.isoformat() else: end_time = self.end_time @@ -303,7 +320,7 @@ def _parse_schedule_rotationable_attributes( time_zone = d.pop("time_zone", UNSET) - def _parse_start_time(data: object) -> datetime.date | None | Unset: + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -311,16 +328,16 @@ def _parse_start_time(data: object) -> datetime.date | None | Unset: try: if not isinstance(data, str): raise TypeError() - start_time_type_0 = isoparse(data).date() + start_time_type_0 = isoparse(data) return start_time_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(datetime.date | None | Unset, data) + return cast(datetime.datetime | None | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> datetime.date | None | Unset: + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -328,12 +345,12 @@ def _parse_end_time(data: object) -> datetime.date | None | Unset: try: if not isinstance(data, str): raise TypeError() - end_time_type_0 = isoparse(data).date() + end_time_type_0 = isoparse(data) return end_time_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(datetime.date | None | Unset, data) + return cast(datetime.datetime | None | Unset, data) end_time = _parse_end_time(d.pop("end_time", 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 ea904017..4bc97cca 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewScheduleRotationDataAttributesActiveTimeAttributesItem") 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 a92b1c18..b861aadb 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type import ( - NewScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType, check_new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type, ) +from ..models.new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type import ( + NewScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewScheduleRotationDataAttributesScheduleRotationMembersType0Item") 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 449f524c..82bfa7eb 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,9 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + T = TypeVar("T", bound="NewScheduleRotationDataAttributesScheduleRotationableAttributesType0") 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 e9acdcbb..54ecf4e8 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,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day import ( - NewScheduleRotationDataAttributesScheduleRotationableAttributesType1HandoffDay, check_new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day, ) +from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day import ( + NewScheduleRotationDataAttributesScheduleRotationableAttributesType1HandoffDay, +) +from typing import cast + T = TypeVar("T", bound="NewScheduleRotationDataAttributesScheduleRotationableAttributesType1") 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 138831b9..9f020760 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,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day import ( - NewScheduleRotationDataAttributesScheduleRotationableAttributesType2HandoffDay, check_new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day, ) +from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day import ( + NewScheduleRotationDataAttributesScheduleRotationableAttributesType2HandoffDay, +) +from typing import cast + T = TypeVar("T", bound="NewScheduleRotationDataAttributesScheduleRotationableAttributesType2") 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 2f076f7f..fd599201 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,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit import ( - NewScheduleRotationDataAttributesScheduleRotationableAttributesType3ShiftLengthUnit, check_new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit, ) +from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit import ( + NewScheduleRotationDataAttributesScheduleRotationableAttributesType3ShiftLengthUnit, +) +from typing import cast + T = TypeVar("T", bound="NewScheduleRotationDataAttributesScheduleRotationableAttributesType3") diff --git a/rootly_sdk/models/new_schedule_rotation_user.py b/rootly_sdk/models/new_schedule_rotation_user.py index 9bfed8be..ddc2efd1 100644 --- a/rootly_sdk/models/new_schedule_rotation_user.py +++ b/rootly_sdk/models/new_schedule_rotation_user.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_schedule_rotation_user_data import NewScheduleRotationUserData @@ -26,6 +29,8 @@ class NewScheduleRotationUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_rotation_user_data import NewScheduleRotationUserData + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/new_schedule_rotation_user_data.py b/rootly_sdk/models/new_schedule_rotation_user_data.py index dae70928..c2ee1d6a 100644 --- a/rootly_sdk/models/new_schedule_rotation_user_data.py +++ b/rootly_sdk/models/new_schedule_rotation_user_data.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_schedule_rotation_user_data_type import ( - NewScheduleRotationUserDataType, - check_new_schedule_rotation_user_data_type, -) from ..types import UNSET, Unset +from ..models.new_schedule_rotation_user_data_type import check_new_schedule_rotation_user_data_type +from ..models.new_schedule_rotation_user_data_type import NewScheduleRotationUserDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_schedule_rotation_user_data_attributes import NewScheduleRotationUserDataAttributes @@ -32,6 +33,8 @@ class NewScheduleRotationUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_schedule_rotation_user_data_attributes import NewScheduleRotationUserDataAttributes + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ 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 0c5bb168..1526c1d6 100644 --- a/rootly_sdk/models/new_schedule_rotation_user_data_attributes.py +++ b/rootly_sdk/models/new_schedule_rotation_user_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewScheduleRotationUserDataAttributes") diff --git a/rootly_sdk/models/new_secret.py b/rootly_sdk/models/new_secret.py index e6b520cb..191dae76 100644 --- a/rootly_sdk/models/new_secret.py +++ b/rootly_sdk/models/new_secret.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_secret_data import NewSecretData @@ -24,6 +28,8 @@ class NewSecret: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_secret_data import NewSecretData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_secret_data.py b/rootly_sdk/models/new_secret_data.py index 9936cb2e..697197b3 100644 --- a/rootly_sdk/models/new_secret_data.py +++ b/rootly_sdk/models/new_secret_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_secret_data_type import NewSecretDataType, check_new_secret_data_type +from ..types import UNSET, Unset + +from ..models.new_secret_data_type import check_new_secret_data_type +from ..models.new_secret_data_type import NewSecretDataType +from typing import cast if TYPE_CHECKING: from ..models.new_secret_data_attributes import NewSecretDataAttributes @@ -28,6 +32,8 @@ class NewSecretData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_secret_data_attributes import NewSecretDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_secret_data_attributes.py b/rootly_sdk/models/new_secret_data_attributes.py index 53d1dd68..f6cf4a08 100644 --- a/rootly_sdk/models/new_secret_data_attributes.py +++ b/rootly_sdk/models/new_secret_data_attributes.py @@ -1,13 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_secret_data_attributes_kind import NewSecretDataAttributesKind, check_new_secret_data_attributes_kind from ..types import UNSET, Unset +from ..models.new_secret_data_attributes_kind import check_new_secret_data_attributes_kind +from ..models.new_secret_data_attributes_kind import NewSecretDataAttributesKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewSecretDataAttributes") diff --git a/rootly_sdk/models/new_service.py b/rootly_sdk/models/new_service.py index 87867ede..116c856d 100644 --- a/rootly_sdk/models/new_service.py +++ b/rootly_sdk/models/new_service.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_service_data import NewServiceData @@ -24,6 +28,8 @@ class NewService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_service_data import NewServiceData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_service_data.py b/rootly_sdk/models/new_service_data.py index c38a2dc7..a40ea8f8 100644 --- a/rootly_sdk/models/new_service_data.py +++ b/rootly_sdk/models/new_service_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_service_data_type import NewServiceDataType, check_new_service_data_type +from ..types import UNSET, Unset + +from ..models.new_service_data_type import check_new_service_data_type +from ..models.new_service_data_type import NewServiceDataType +from typing import cast if TYPE_CHECKING: from ..models.new_service_data_attributes import NewServiceDataAttributes @@ -28,6 +32,8 @@ class NewServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_service_data_attributes import NewServiceDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_service_data_attributes.py b/rootly_sdk/models/new_service_data_attributes.py index 2420ad46..2fbda657 100644 --- a/rootly_sdk/models/new_service_data_attributes.py +++ b/rootly_sdk/models/new_service_data_attributes.py @@ -1,15 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_service_data_attributes_show_uptime_last_days import ( - NewServiceDataAttributesShowUptimeLastDays, check_new_service_data_attributes_show_uptime_last_days, ) +from ..models.new_service_data_attributes_show_uptime_last_days import NewServiceDataAttributesShowUptimeLastDays from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.new_service_data_attributes_alert_broadcast_channel_type_0 import ( @@ -114,11 +118,18 @@ class NewServiceDataAttributes: properties: list[NewServiceDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_service_data_attributes_incident_broadcast_channel_type_0 import ( + NewServiceDataAttributesIncidentBroadcastChannelType0, + ) from ..models.new_service_data_attributes_alert_broadcast_channel_type_0 import ( NewServiceDataAttributesAlertBroadcastChannelType0, ) - 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_channels_type_0_item import ( + NewServiceDataAttributesSlackChannelsType0Item, + ) + from ..models.new_service_data_attributes_slack_aliases_type_0_item import ( + NewServiceDataAttributesSlackAliasesType0Item, ) name = self.name 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 43dd3797..6a71612a 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewServiceDataAttributesAlertBroadcastChannelType0") 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 52b0f470..0133720b 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewServiceDataAttributesIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/new_service_data_attributes_properties_item.py b/rootly_sdk/models/new_service_data_attributes_properties_item.py index 3110be0d..36c464fc 100644 --- a/rootly_sdk/models/new_service_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_service_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewServiceDataAttributesPropertiesItem") 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 279bbaa6..51c49388 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewServiceDataAttributesSlackAliasesType0Item") 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 f7b9709a..b2e13da4 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewServiceDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_severity.py b/rootly_sdk/models/new_severity.py index bf2f358f..e01e0d2b 100644 --- a/rootly_sdk/models/new_severity.py +++ b/rootly_sdk/models/new_severity.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_severity_data import NewSeverityData @@ -24,6 +28,8 @@ class NewSeverity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_severity_data import NewSeverityData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_severity_data.py b/rootly_sdk/models/new_severity_data.py index 288d9c37..39ea5dac 100644 --- a/rootly_sdk/models/new_severity_data.py +++ b/rootly_sdk/models/new_severity_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_severity_data_type import NewSeverityDataType, check_new_severity_data_type +from ..types import UNSET, Unset + +from ..models.new_severity_data_type import check_new_severity_data_type +from ..models.new_severity_data_type import NewSeverityDataType +from typing import cast if TYPE_CHECKING: from ..models.new_severity_data_attributes import NewSeverityDataAttributes @@ -28,6 +32,8 @@ class NewSeverityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_severity_data_attributes import NewSeverityDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_severity_data_attributes.py b/rootly_sdk/models/new_severity_data_attributes.py index d13b25ac..5645af95 100644 --- a/rootly_sdk/models/new_severity_data_attributes.py +++ b/rootly_sdk/models/new_severity_data_attributes.py @@ -1,16 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_severity_data_attributes_severity import ( - NewSeverityDataAttributesSeverity, - check_new_severity_data_attributes_severity, -) from ..types import UNSET, Unset +from ..models.new_severity_data_attributes_severity import check_new_severity_data_attributes_severity +from ..models.new_severity_data_attributes_severity import NewSeverityDataAttributesSeverity +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_severity_data_attributes_slack_aliases_type_0_item import ( NewSeverityDataAttributesSlackAliasesType0Item, @@ -49,6 +51,13 @@ class NewSeverityDataAttributes: slack_aliases: list[NewSeverityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_severity_data_attributes_slack_aliases_type_0_item import ( + NewSeverityDataAttributesSlackAliasesType0Item, + ) + from ..models.new_severity_data_attributes_slack_channels_type_0_item import ( + NewSeverityDataAttributesSlackChannelsType0Item, + ) + name = self.name description: None | str | 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 67bf462e..5dc7b42f 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewSeverityDataAttributesSlackAliasesType0Item") 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 eed8d124..476e0aa0 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewSeverityDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_shift_coverage_request.py b/rootly_sdk/models/new_shift_coverage_request.py new file mode 100644 index 00000000..d0f8d0fb --- /dev/null +++ b/rootly_sdk/models/new_shift_coverage_request.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.new_shift_coverage_request_data import NewShiftCoverageRequestData + + +T = TypeVar("T", bound="NewShiftCoverageRequest") + + +@_attrs_define +class NewShiftCoverageRequest: + """ + Attributes: + data (NewShiftCoverageRequestData): + """ + + data: NewShiftCoverageRequestData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.new_shift_coverage_request_data import NewShiftCoverageRequestData + + 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_shift_coverage_request_data import NewShiftCoverageRequestData + + d = dict(src_dict) + data = NewShiftCoverageRequestData.from_dict(d.pop("data")) + + new_shift_coverage_request = cls( + data=data, + ) + + new_shift_coverage_request.additional_properties = d + return new_shift_coverage_request + + @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_shift_coverage_request_data.py b/rootly_sdk/models/new_shift_coverage_request_data.py new file mode 100644 index 00000000..58edc6f8 --- /dev/null +++ b/rootly_sdk/models/new_shift_coverage_request_data.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_shift_coverage_request_data_type import check_new_shift_coverage_request_data_type +from ..models.new_shift_coverage_request_data_type import NewShiftCoverageRequestDataType +from typing import cast + +if TYPE_CHECKING: + from ..models.new_shift_coverage_request_data_attributes import NewShiftCoverageRequestDataAttributes + + +T = TypeVar("T", bound="NewShiftCoverageRequestData") + + +@_attrs_define +class NewShiftCoverageRequestData: + """ + Attributes: + type_ (NewShiftCoverageRequestDataType): + attributes (NewShiftCoverageRequestDataAttributes): + """ + + type_: NewShiftCoverageRequestDataType + attributes: NewShiftCoverageRequestDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.new_shift_coverage_request_data_attributes import NewShiftCoverageRequestDataAttributes + + 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_shift_coverage_request_data_attributes import NewShiftCoverageRequestDataAttributes + + d = dict(src_dict) + type_ = check_new_shift_coverage_request_data_type(d.pop("type")) + + attributes = NewShiftCoverageRequestDataAttributes.from_dict(d.pop("attributes")) + + new_shift_coverage_request_data = cls( + type_=type_, + attributes=attributes, + ) + + new_shift_coverage_request_data.additional_properties = d + return new_shift_coverage_request_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_shift_coverage_request_data_attributes.py b/rootly_sdk/models/new_shift_coverage_request_data_attributes.py new file mode 100644 index 00000000..2223aa4a --- /dev/null +++ b/rootly_sdk/models/new_shift_coverage_request_data_attributes.py @@ -0,0 +1,69 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + + +T = TypeVar("T", bound="NewShiftCoverageRequestDataAttributes") + + +@_attrs_define +class NewShiftCoverageRequestDataAttributes: + """ + Attributes: + starts_at (datetime.datetime): Start datetime of the time range to request coverage for + ends_at (datetime.datetime): End datetime of the time range to request coverage for + user_id (int | Unset): Optional. Restrict coverage to shifts assigned to this user. When omitted, every shift + overlapping the time range is covered. + """ + + starts_at: datetime.datetime + ends_at: datetime.datetime + user_id: int | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + starts_at = self.starts_at.isoformat() + + ends_at = self.ends_at.isoformat() + + user_id = self.user_id + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "starts_at": starts_at, + "ends_at": ends_at, + } + ) + if user_id is not UNSET: + field_dict["user_id"] = user_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + starts_at = isoparse(d.pop("starts_at")) + + ends_at = isoparse(d.pop("ends_at")) + + user_id = d.pop("user_id", UNSET) + + new_shift_coverage_request_data_attributes = cls( + starts_at=starts_at, + ends_at=ends_at, + user_id=user_id, + ) + + return new_shift_coverage_request_data_attributes diff --git a/rootly_sdk/models/new_shift_coverage_request_data_type.py b/rootly_sdk/models/new_shift_coverage_request_data_type.py new file mode 100644 index 00000000..3880a968 --- /dev/null +++ b/rootly_sdk/models/new_shift_coverage_request_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +NewShiftCoverageRequestDataType = Literal["shift_coverage_requests"] + +NEW_SHIFT_COVERAGE_REQUEST_DATA_TYPE_VALUES: set[NewShiftCoverageRequestDataType] = { + "shift_coverage_requests", +} + + +def check_new_shift_coverage_request_data_type(value: str | None) -> NewShiftCoverageRequestDataType | None: + if value is None: + return None + if value in NEW_SHIFT_COVERAGE_REQUEST_DATA_TYPE_VALUES: + return cast(NewShiftCoverageRequestDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {NEW_SHIFT_COVERAGE_REQUEST_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/new_sla.py b/rootly_sdk/models/new_sla.py index 22576867..fde851f3 100644 --- a/rootly_sdk/models/new_sla.py +++ b/rootly_sdk/models/new_sla.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_sla_data import NewSlaData @@ -24,6 +28,8 @@ class NewSla: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_sla_data import NewSlaData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_sla_data.py b/rootly_sdk/models/new_sla_data.py index e309aa9b..d3d445e0 100644 --- a/rootly_sdk/models/new_sla_data.py +++ b/rootly_sdk/models/new_sla_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.new_sla_data_type import check_new_sla_data_type +from ..models.new_sla_data_type import NewSlaDataType +from typing import cast if TYPE_CHECKING: from ..models.new_sla_data_attributes import NewSlaDataAttributes @@ -28,6 +32,8 @@ class NewSlaData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_sla_data_attributes import NewSlaDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_sla_data_attributes.py b/rootly_sdk/models/new_sla_data_attributes.py index e5113257..76e55053 100644 --- a/rootly_sdk/models/new_sla_data_attributes.py +++ b/rootly_sdk/models/new_sla_data_attributes.py @@ -1,32 +1,38 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset 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_days import NewSlaDataAttributesAssignmentDeadlineDays 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_assignment_deadline_parent_status import ( + NewSlaDataAttributesAssignmentDeadlineParentStatus, +) 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_days import NewSlaDataAttributesCompletionDeadlineDays 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 ..models.new_sla_data_attributes_completion_deadline_parent_status import ( + NewSlaDataAttributesCompletionDeadlineParentStatus, ) +from ..models.new_sla_data_attributes_condition_match_type import check_new_sla_data_attributes_condition_match_type +from ..models.new_sla_data_attributes_condition_match_type import NewSlaDataAttributesConditionMatchType from ..types import UNSET, Unset +from typing import cast +from uuid import UUID if TYPE_CHECKING: from ..models.new_sla_data_attributes_conditions_item import NewSlaDataAttributesConditionsItem @@ -88,6 +94,11 @@ class NewSlaDataAttributes: notification_configurations: list[NewSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_sla_data_attributes_conditions_item import NewSlaDataAttributesConditionsItem + from ..models.new_sla_data_attributes_notification_configurations_item import ( + NewSlaDataAttributesNotificationConfigurationsItem, + ) + name = self.name assignment_deadline_days: int = self.assignment_deadline_days diff --git a/rootly_sdk/models/new_sla_data_attributes_conditions_item.py b/rootly_sdk/models/new_sla_data_attributes_conditions_item.py index c46c27c4..9f2baa3e 100644 --- a/rootly_sdk/models/new_sla_data_attributes_conditions_item.py +++ b/rootly_sdk/models/new_sla_data_attributes_conditions_item.py @@ -1,21 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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_conditionable_type import ( + NewSlaDataAttributesConditionsItemConditionableType, +) from ..models.new_sla_data_attributes_conditions_item_property import ( - NewSlaDataAttributesConditionsItemProperty, check_new_sla_data_attributes_conditions_item_property, ) +from ..models.new_sla_data_attributes_conditions_item_property import NewSlaDataAttributesConditionsItemProperty from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="NewSlaDataAttributesConditionsItem") @@ -27,7 +33,9 @@ class NewSlaDataAttributesConditionsItem: conditionable_type (NewSlaDataAttributesConditionsItemConditionableType): The type of condition operator (str): The comparison operator property_ (NewSlaDataAttributesConditionsItemProperty | Unset): The property to evaluate (for built-in field - conditions) + conditions). When the team has custom lifecycle statuses enabled, use 'sub_status' (with sub-status IDs as + values); otherwise use 'status' (with parent status names). Sending the wrong one will return a validation + error. 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 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 index 33589513..a33a3e2b 100644 --- a/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item.py +++ b/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item.py @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.new_sla_data_attributes_notification_configurations_item_offset_type import ( - NewSlaDataAttributesNotificationConfigurationsItemOffsetType, check_new_sla_data_attributes_notification_configurations_item_offset_type, ) +from ..models.new_sla_data_attributes_notification_configurations_item_offset_type import ( + NewSlaDataAttributesNotificationConfigurationsItemOffsetType, +) +from typing import cast + T = TypeVar("T", bound="NewSlaDataAttributesNotificationConfigurationsItem") diff --git a/rootly_sdk/models/new_status_page.py b/rootly_sdk/models/new_status_page.py index 61ef3293..520f13f6 100644 --- a/rootly_sdk/models/new_status_page.py +++ b/rootly_sdk/models/new_status_page.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_status_page_data import NewStatusPageData @@ -24,6 +28,8 @@ class NewStatusPage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_status_page_data import NewStatusPageData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_status_page_data.py b/rootly_sdk/models/new_status_page_data.py index 5ea4944d..dab69190 100644 --- a/rootly_sdk/models/new_status_page_data.py +++ b/rootly_sdk/models/new_status_page_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_status_page_data_type import NewStatusPageDataType, check_new_status_page_data_type +from ..types import UNSET, Unset + +from ..models.new_status_page_data_type import check_new_status_page_data_type +from ..models.new_status_page_data_type import NewStatusPageDataType +from typing import cast if TYPE_CHECKING: from ..models.new_status_page_data_attributes import NewStatusPageDataAttributes @@ -28,6 +32,8 @@ class NewStatusPageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_status_page_data_attributes import NewStatusPageDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_status_page_data_attributes.py b/rootly_sdk/models/new_status_page_data_attributes.py index a19825e4..e227b185 100644 --- a/rootly_sdk/models/new_status_page_data_attributes.py +++ b/rootly_sdk/models/new_status_page_data_attributes.py @@ -1,27 +1,38 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_status_page_data_attributes_authentication_method import ( - NewStatusPageDataAttributesAuthenticationMethod, check_new_status_page_data_attributes_authentication_method, ) +from ..models.new_status_page_data_attributes_authentication_method import ( + NewStatusPageDataAttributesAuthenticationMethod, +) from ..models.new_status_page_data_attributes_saml_name_identifier_format import ( - NewStatusPageDataAttributesSamlNameIdentifierFormat, check_new_status_page_data_attributes_saml_name_identifier_format, ) +from ..models.new_status_page_data_attributes_saml_name_identifier_format import ( + NewStatusPageDataAttributesSamlNameIdentifierFormat, +) 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_section_order_type_0_item import ( + NewStatusPageDataAttributesSectionOrderType0Item, +) from ..models.new_status_page_data_attributes_show_uptime_last_days import ( - NewStatusPageDataAttributesShowUptimeLastDays, check_new_status_page_data_attributes_show_uptime_last_days, ) +from ..models.new_status_page_data_attributes_show_uptime_last_days import NewStatusPageDataAttributesShowUptimeLastDays from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewStatusPageDataAttributes") diff --git a/rootly_sdk/models/new_status_page_template.py b/rootly_sdk/models/new_status_page_template.py index 38d7f145..2a270353 100644 --- a/rootly_sdk/models/new_status_page_template.py +++ b/rootly_sdk/models/new_status_page_template.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_status_page_template_data import NewStatusPageTemplateData @@ -24,6 +28,8 @@ class NewStatusPageTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_status_page_template_data import NewStatusPageTemplateData + data = self.data.to_dict() field_dict: 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 0ab02f3e..23472878 100644 --- a/rootly_sdk/models/new_status_page_template_data.py +++ b/rootly_sdk/models/new_status_page_template_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_status_page_template_data_type import ( - NewStatusPageTemplateDataType, - check_new_status_page_template_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_status_page_template_data_type import check_new_status_page_template_data_type +from ..models.new_status_page_template_data_type import NewStatusPageTemplateDataType +from typing import cast if TYPE_CHECKING: from ..models.new_status_page_template_data_attributes import NewStatusPageTemplateDataAttributes @@ -31,6 +32,8 @@ class NewStatusPageTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_status_page_template_data_attributes import NewStatusPageTemplateDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 c6d188d0..4e5d037a 100644 --- a/rootly_sdk/models/new_status_page_template_data_attributes.py +++ b/rootly_sdk/models/new_status_page_template_data_attributes.py @@ -1,19 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_status_page_template_data_attributes_kind import ( - NewStatusPageTemplateDataAttributesKind, - check_new_status_page_template_data_attributes_kind, +from ..types import UNSET, Unset + +from ..models.new_status_page_template_data_attributes_kind import check_new_status_page_template_data_attributes_kind +from ..models.new_status_page_template_data_attributes_kind import NewStatusPageTemplateDataAttributesKind +from ..models.new_status_page_template_data_attributes_update_status import ( + check_new_status_page_template_data_attributes_update_status, ) from ..models.new_status_page_template_data_attributes_update_status import ( NewStatusPageTemplateDataAttributesUpdateStatus, - check_new_status_page_template_data_attributes_update_status, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewStatusPageTemplateDataAttributes") diff --git a/rootly_sdk/models/new_sub_status.py b/rootly_sdk/models/new_sub_status.py index 290c756f..797d2276 100644 --- a/rootly_sdk/models/new_sub_status.py +++ b/rootly_sdk/models/new_sub_status.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_sub_status_data import NewSubStatusData @@ -24,6 +28,8 @@ class NewSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_sub_status_data import NewSubStatusData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_sub_status_data.py b/rootly_sdk/models/new_sub_status_data.py index 7c29942c..8400bcad 100644 --- a/rootly_sdk/models/new_sub_status_data.py +++ b/rootly_sdk/models/new_sub_status_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_sub_status_data_type import NewSubStatusDataType, check_new_sub_status_data_type +from ..types import UNSET, Unset + +from ..models.new_sub_status_data_type import check_new_sub_status_data_type +from ..models.new_sub_status_data_type import NewSubStatusDataType +from typing import cast if TYPE_CHECKING: from ..models.new_sub_status_data_attributes import NewSubStatusDataAttributes @@ -28,6 +32,8 @@ class NewSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_sub_status_data_attributes import NewSubStatusDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_sub_status_data_attributes.py b/rootly_sdk/models/new_sub_status_data_attributes.py index c228516b..40b4b1d6 100644 --- a/rootly_sdk/models/new_sub_status_data_attributes.py +++ b/rootly_sdk/models/new_sub_status_data_attributes.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_sub_status_data_attributes_parent_status import ( - NewSubStatusDataAttributesParentStatus, - check_new_sub_status_data_attributes_parent_status, -) from ..types import UNSET, Unset +from ..models.new_sub_status_data_attributes_parent_status import check_new_sub_status_data_attributes_parent_status +from ..models.new_sub_status_data_attributes_parent_status import NewSubStatusDataAttributesParentStatus +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewSubStatusDataAttributes") diff --git a/rootly_sdk/models/new_team.py b/rootly_sdk/models/new_team.py index fb3a16a2..dcc66912 100644 --- a/rootly_sdk/models/new_team.py +++ b/rootly_sdk/models/new_team.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_team_data import NewTeamData @@ -24,6 +28,8 @@ class NewTeam: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_team_data import NewTeamData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_team_data.py b/rootly_sdk/models/new_team_data.py index 4aecd241..0573ce7c 100644 --- a/rootly_sdk/models/new_team_data.py +++ b/rootly_sdk/models/new_team_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_team_data_type import NewTeamDataType, check_new_team_data_type +from ..types import UNSET, Unset + +from ..models.new_team_data_type import check_new_team_data_type +from ..models.new_team_data_type import NewTeamDataType +from typing import cast if TYPE_CHECKING: from ..models.new_team_data_attributes import NewTeamDataAttributes @@ -28,6 +32,8 @@ class NewTeamData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_team_data_attributes import NewTeamDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_team_data_attributes.py b/rootly_sdk/models/new_team_data_attributes.py index 9ab22d75..82829f1f 100644 --- a/rootly_sdk/models/new_team_data_attributes.py +++ b/rootly_sdk/models/new_team_data_attributes.py @@ -1,12 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.new_team_data_attributes_auto_add_members_scope import ( + check_new_team_data_attributes_auto_add_members_scope, +) +from ..models.new_team_data_attributes_auto_add_members_scope import NewTeamDataAttributesAutoAddMembersScope +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_team_data_attributes_alert_broadcast_channel_type_0 import ( NewTeamDataAttributesAlertBroadcastChannelType0, @@ -58,6 +66,9 @@ class NewTeamDataAttributes: 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 + auto_add_members_scope (NewTeamDataAttributesAutoAddMembersScope | Unset): Visibility-scoped auto-add behavior. + Only present when the `enable_scoped_incident_channel_auto_add` feature flag is on for the organization. When + set, it overrides `auto_add_members_when_attached`. properties (list[NewTeamDataAttributesPropertiesItem] | Unset): Array of property values for this team. """ @@ -87,15 +98,23 @@ class NewTeamDataAttributes: incident_broadcast_enabled: bool | None | Unset = UNSET incident_broadcast_channel: NewTeamDataAttributesIncidentBroadcastChannelType0 | None | Unset = UNSET auto_add_members_when_attached: bool | None | Unset = UNSET + auto_add_members_scope: NewTeamDataAttributesAutoAddMembersScope | 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 ( NewTeamDataAttributesAlertBroadcastChannelType0, ) + 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_incident_broadcast_channel_type_0 import ( NewTeamDataAttributesIncidentBroadcastChannelType0, ) + from ..models.new_team_data_attributes_slack_channels_type_0_item import ( + NewTeamDataAttributesSlackChannelsType0Item, + ) name = self.name @@ -274,6 +293,10 @@ def to_dict(self) -> dict[str, Any]: else: auto_add_members_when_attached = self.auto_add_members_when_attached + auto_add_members_scope: str | Unset = UNSET + if not isinstance(self.auto_add_members_scope, Unset): + auto_add_members_scope = self.auto_add_members_scope + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -338,6 +361,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 auto_add_members_scope is not UNSET: + field_dict["auto_add_members_scope"] = auto_add_members_scope if properties is not UNSET: field_dict["properties"] = properties @@ -663,6 +688,13 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: d.pop("auto_add_members_when_attached", UNSET) ) + _auto_add_members_scope = d.pop("auto_add_members_scope", UNSET) + auto_add_members_scope: NewTeamDataAttributesAutoAddMembersScope | Unset + if isinstance(_auto_add_members_scope, Unset): + auto_add_members_scope = UNSET + else: + auto_add_members_scope = check_new_team_data_attributes_auto_add_members_scope(_auto_add_members_scope) + _properties = d.pop("properties", UNSET) properties: list[NewTeamDataAttributesPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -699,6 +731,7 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, auto_add_members_when_attached=auto_add_members_when_attached, + auto_add_members_scope=auto_add_members_scope, properties=properties, ) 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 1450dc9d..ec2f9065 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewTeamDataAttributesAlertBroadcastChannelType0") diff --git a/rootly_sdk/models/new_team_data_attributes_auto_add_members_scope.py b/rootly_sdk/models/new_team_data_attributes_auto_add_members_scope.py new file mode 100644 index 00000000..86b962c6 --- /dev/null +++ b/rootly_sdk/models/new_team_data_attributes_auto_add_members_scope.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +NewTeamDataAttributesAutoAddMembersScope = Literal["all", "off", "public_and_test", "public_only"] + +NEW_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES: set[NewTeamDataAttributesAutoAddMembersScope] = { + "all", + "off", + "public_and_test", + "public_only", +} + + +def check_new_team_data_attributes_auto_add_members_scope( + value: str | None, +) -> NewTeamDataAttributesAutoAddMembersScope | None: + if value is None: + return None + if value in NEW_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES: + return cast(NewTeamDataAttributesAutoAddMembersScope, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES!r}" + ) 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 6521da45..9c022472 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewTeamDataAttributesIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/new_team_data_attributes_properties_item.py b/rootly_sdk/models/new_team_data_attributes_properties_item.py index ec6700ba..a99fc513 100644 --- a/rootly_sdk/models/new_team_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_team_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewTeamDataAttributesPropertiesItem") 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 716b07cb..48d219c8 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewTeamDataAttributesSlackAliasesType0Item") 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 4d03a45f..0d6de2f4 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewTeamDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_user_email_address.py b/rootly_sdk/models/new_user_email_address.py index 3a0e04da..36d94d7b 100644 --- a/rootly_sdk/models/new_user_email_address.py +++ b/rootly_sdk/models/new_user_email_address.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_user_email_address_data import NewUserEmailAddressData @@ -24,6 +28,8 @@ class NewUserEmailAddress: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_user_email_address_data import NewUserEmailAddressData + data = self.data.to_dict() field_dict: 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 dc5e0749..843ecde6 100644 --- a/rootly_sdk/models/new_user_email_address_data.py +++ b/rootly_sdk/models/new_user_email_address_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_user_email_address_data_type import ( - NewUserEmailAddressDataType, - check_new_user_email_address_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_user_email_address_data_type import check_new_user_email_address_data_type +from ..models.new_user_email_address_data_type import NewUserEmailAddressDataType +from typing import cast if TYPE_CHECKING: from ..models.new_user_email_address_data_attributes import NewUserEmailAddressDataAttributes @@ -31,6 +32,8 @@ class NewUserEmailAddressData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_user_email_address_data_attributes import NewUserEmailAddressDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 8ff3d016..2be98c91 100644 --- a/rootly_sdk/models/new_user_email_address_data_attributes.py +++ b/rootly_sdk/models/new_user_email_address_data_attributes.py @@ -1,9 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + T = TypeVar("T", bound="NewUserEmailAddressDataAttributes") diff --git a/rootly_sdk/models/new_user_notification_rule.py b/rootly_sdk/models/new_user_notification_rule.py index bbab1368..e2b40ef6 100644 --- a/rootly_sdk/models/new_user_notification_rule.py +++ b/rootly_sdk/models/new_user_notification_rule.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_user_notification_rule_data import NewUserNotificationRuleData @@ -24,6 +28,8 @@ class NewUserNotificationRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_user_notification_rule_data import NewUserNotificationRuleData + data = self.data.to_dict() field_dict: 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 a620e47c..1f2a1cb9 100644 --- a/rootly_sdk/models/new_user_notification_rule_data.py +++ b/rootly_sdk/models/new_user_notification_rule_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_user_notification_rule_data_type import ( - NewUserNotificationRuleDataType, - check_new_user_notification_rule_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_user_notification_rule_data_type import check_new_user_notification_rule_data_type +from ..models.new_user_notification_rule_data_type import NewUserNotificationRuleDataType +from typing import cast if TYPE_CHECKING: from ..models.new_user_notification_rule_data_attributes import NewUserNotificationRuleDataAttributes @@ -31,6 +32,8 @@ class NewUserNotificationRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_user_notification_rule_data_attributes import NewUserNotificationRuleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 1139cb20..0f6ede4d 100644 --- a/rootly_sdk/models/new_user_notification_rule_data_attributes.py +++ b/rootly_sdk/models/new_user_notification_rule_data_attributes.py @@ -1,15 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_user_notification_rule_data_attributes_enabled_contact_types_item import ( - NewUserNotificationRuleDataAttributesEnabledContactTypesItem, check_new_user_notification_rule_data_attributes_enabled_contact_types_item, ) +from ..models.new_user_notification_rule_data_attributes_enabled_contact_types_item import ( + NewUserNotificationRuleDataAttributesEnabledContactTypesItem, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewUserNotificationRuleDataAttributes") diff --git a/rootly_sdk/models/new_user_notification_rule_data_attributes_enabled_contact_types_item.py b/rootly_sdk/models/new_user_notification_rule_data_attributes_enabled_contact_types_item.py index 8a7a6146..fe523a7e 100644 --- a/rootly_sdk/models/new_user_notification_rule_data_attributes_enabled_contact_types_item.py +++ b/rootly_sdk/models/new_user_notification_rule_data_attributes_enabled_contact_types_item.py @@ -1,7 +1,7 @@ from typing import Literal, cast NewUserNotificationRuleDataAttributesEnabledContactTypesItem = Literal[ - "call", "device", "email", "non_critical_device", "slack", "sms" + "call", "device", "email", "google_chat", "non_critical_device", "slack", "sms" ] NEW_USER_NOTIFICATION_RULE_DATA_ATTRIBUTES_ENABLED_CONTACT_TYPES_ITEM_VALUES: set[ @@ -10,6 +10,7 @@ "call", "device", "email", + "google_chat", "non_critical_device", "slack", "sms", diff --git a/rootly_sdk/models/new_user_phone_number.py b/rootly_sdk/models/new_user_phone_number.py index 619a9bc9..141ad15e 100644 --- a/rootly_sdk/models/new_user_phone_number.py +++ b/rootly_sdk/models/new_user_phone_number.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_user_phone_number_data import NewUserPhoneNumberData @@ -24,6 +28,8 @@ class NewUserPhoneNumber: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_user_phone_number_data import NewUserPhoneNumberData + data = self.data.to_dict() field_dict: 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 f8594381..bf7ea950 100644 --- a/rootly_sdk/models/new_user_phone_number_data.py +++ b/rootly_sdk/models/new_user_phone_number_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_user_phone_number_data_type import NewUserPhoneNumberDataType, check_new_user_phone_number_data_type +from ..types import UNSET, Unset + +from ..models.new_user_phone_number_data_type import check_new_user_phone_number_data_type +from ..models.new_user_phone_number_data_type import NewUserPhoneNumberDataType +from typing import cast if TYPE_CHECKING: from ..models.new_user_phone_number_data_attributes import NewUserPhoneNumberDataAttributes @@ -28,6 +32,8 @@ class NewUserPhoneNumberData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_user_phone_number_data_attributes import NewUserPhoneNumberDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 6e977204..45221541 100644 --- a/rootly_sdk/models/new_user_phone_number_data_attributes.py +++ b/rootly_sdk/models/new_user_phone_number_data_attributes.py @@ -1,9 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + T = TypeVar("T", bound="NewUserPhoneNumberDataAttributes") diff --git a/rootly_sdk/models/new_webhooks_endpoint.py b/rootly_sdk/models/new_webhooks_endpoint.py index 3c2e4976..17fb59b5 100644 --- a/rootly_sdk/models/new_webhooks_endpoint.py +++ b/rootly_sdk/models/new_webhooks_endpoint.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_webhooks_endpoint_data import NewWebhooksEndpointData @@ -24,6 +28,8 @@ class NewWebhooksEndpoint: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_webhooks_endpoint_data import NewWebhooksEndpointData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_webhooks_endpoint_data.py b/rootly_sdk/models/new_webhooks_endpoint_data.py index 63c5b888..6e4b76ea 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_webhooks_endpoint_data_type import NewWebhooksEndpointDataType, check_new_webhooks_endpoint_data_type +from ..types import UNSET, Unset + +from ..models.new_webhooks_endpoint_data_type import check_new_webhooks_endpoint_data_type +from ..models.new_webhooks_endpoint_data_type import NewWebhooksEndpointDataType +from typing import cast if TYPE_CHECKING: from ..models.new_webhooks_endpoint_data_attributes import NewWebhooksEndpointDataAttributes @@ -28,6 +32,8 @@ class NewWebhooksEndpointData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_webhooks_endpoint_data_attributes import NewWebhooksEndpointDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py b/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py index d4e0e058..22b036a3 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py @@ -1,15 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_webhooks_endpoint_data_attributes_event_types_item import ( - NewWebhooksEndpointDataAttributesEventTypesItem, check_new_webhooks_endpoint_data_attributes_event_types_item, ) +from ..models.new_webhooks_endpoint_data_attributes_event_types_item import ( + NewWebhooksEndpointDataAttributesEventTypesItem, +) from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.new_webhooks_endpoint_data_attributes_custom_headers_item import ( + NewWebhooksEndpointDataAttributesCustomHeadersItem, + ) + T = TypeVar("T", bound="NewWebhooksEndpointDataAttributes") @@ -23,6 +35,8 @@ class NewWebhooksEndpointDataAttributes: secret (str | Unset): The webhook signing secret used to verify webhook requests. event_types (list[NewWebhooksEndpointDataAttributesEventTypesItem] | Unset): enabled (bool | Unset): + custom_headers (list[NewWebhooksEndpointDataAttributesCustomHeadersItem] | Unset): Custom HTTP headers sent with + each delivery. Max 10. Reserved names (Content-Type, X-Rootly-Signature, Host, etc.) are rejected. """ name: str @@ -30,8 +44,13 @@ class NewWebhooksEndpointDataAttributes: secret: str | Unset = UNSET event_types: list[NewWebhooksEndpointDataAttributesEventTypesItem] | Unset = UNSET enabled: bool | Unset = UNSET + custom_headers: list[NewWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.new_webhooks_endpoint_data_attributes_custom_headers_item import ( + NewWebhooksEndpointDataAttributesCustomHeadersItem, + ) + name = self.name url = self.url @@ -47,6 +66,13 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled + custom_headers: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.custom_headers, Unset): + custom_headers = [] + for custom_headers_item_data in self.custom_headers: + custom_headers_item = custom_headers_item_data.to_dict() + custom_headers.append(custom_headers_item) + field_dict: dict[str, Any] = {} field_dict.update( @@ -61,11 +87,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["event_types"] = event_types if enabled is not UNSET: field_dict["enabled"] = enabled + if custom_headers is not UNSET: + field_dict["custom_headers"] = custom_headers return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.new_webhooks_endpoint_data_attributes_custom_headers_item import ( + NewWebhooksEndpointDataAttributesCustomHeadersItem, + ) + d = dict(src_dict) name = d.pop("name") @@ -84,12 +116,24 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) + _custom_headers = d.pop("custom_headers", UNSET) + custom_headers: list[NewWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET + if _custom_headers is not UNSET: + custom_headers = [] + for custom_headers_item_data in _custom_headers: + custom_headers_item = NewWebhooksEndpointDataAttributesCustomHeadersItem.from_dict( + custom_headers_item_data + ) + + custom_headers.append(custom_headers_item) + new_webhooks_endpoint_data_attributes = cls( name=name, url=url, secret=secret, event_types=event_types, enabled=enabled, + custom_headers=custom_headers, ) return new_webhooks_endpoint_data_attributes diff --git a/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py new file mode 100644 index 00000000..6bfa854b --- /dev/null +++ b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="NewWebhooksEndpointDataAttributesCustomHeadersItem") + + +@_attrs_define +class NewWebhooksEndpointDataAttributesCustomHeadersItem: + """ + Attributes: + name (str): + value (str): + """ + + name: str + value: str + + def to_dict(self) -> dict[str, Any]: + name = self.name + + value = self.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + value = d.pop("value") + + new_webhooks_endpoint_data_attributes_custom_headers_item = cls( + name=name, + value=value, + ) + + return new_webhooks_endpoint_data_attributes_custom_headers_item diff --git a/rootly_sdk/models/new_webhooks_endpoint_data_attributes_event_types_item.py b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_event_types_item.py index d88b85f3..0ba141cc 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data_attributes_event_types_item.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_event_types_item.py @@ -2,6 +2,7 @@ NewWebhooksEndpointDataAttributesEventTypesItem = Literal[ "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -30,10 +31,12 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", ] NEW_WEBHOOKS_ENDPOINT_DATA_ATTRIBUTES_EVENT_TYPES_ITEM_VALUES: set[NewWebhooksEndpointDataAttributesEventTypesItem] = { "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -62,6 +65,7 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", } diff --git a/rootly_sdk/models/new_workflow.py b/rootly_sdk/models/new_workflow.py index b425b0f9..0d9230b3 100644 --- a/rootly_sdk/models/new_workflow.py +++ b/rootly_sdk/models/new_workflow.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_data import NewWorkflowData @@ -24,6 +28,8 @@ class NewWorkflow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_data import NewWorkflowData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..7f855c82 --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition.py @@ -0,0 +1,77 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.new_workflow_action_item_form_field_condition_data import NewWorkflowActionItemFormFieldConditionData + + +T = TypeVar("T", bound="NewWorkflowActionItemFormFieldCondition") + + +@_attrs_define +class NewWorkflowActionItemFormFieldCondition: + """ + Attributes: + data (NewWorkflowActionItemFormFieldConditionData): + """ + + data: NewWorkflowActionItemFormFieldConditionData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_action_item_form_field_condition_data import ( + NewWorkflowActionItemFormFieldConditionData, + ) + + 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_workflow_action_item_form_field_condition_data import ( + NewWorkflowActionItemFormFieldConditionData, + ) + + d = dict(src_dict) + data = NewWorkflowActionItemFormFieldConditionData.from_dict(d.pop("data")) + + new_workflow_action_item_form_field_condition = cls( + data=data, + ) + + new_workflow_action_item_form_field_condition.additional_properties = d + return new_workflow_action_item_form_field_condition + + @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_workflow_action_item_form_field_condition_data.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py new file mode 100644 index 00000000..167eae34 --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_workflow_action_item_form_field_condition_data_type import ( + check_new_workflow_action_item_form_field_condition_data_type, +) +from ..models.new_workflow_action_item_form_field_condition_data_type import ( + NewWorkflowActionItemFormFieldConditionDataType, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.new_workflow_action_item_form_field_condition_data_attributes import ( + NewWorkflowActionItemFormFieldConditionDataAttributes, + ) + + +T = TypeVar("T", bound="NewWorkflowActionItemFormFieldConditionData") + + +@_attrs_define +class NewWorkflowActionItemFormFieldConditionData: + """ + Attributes: + type_ (NewWorkflowActionItemFormFieldConditionDataType): + attributes (NewWorkflowActionItemFormFieldConditionDataAttributes): + """ + + type_: NewWorkflowActionItemFormFieldConditionDataType + attributes: NewWorkflowActionItemFormFieldConditionDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_action_item_form_field_condition_data_attributes import ( + NewWorkflowActionItemFormFieldConditionDataAttributes, + ) + + 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_workflow_action_item_form_field_condition_data_attributes import ( + NewWorkflowActionItemFormFieldConditionDataAttributes, + ) + + d = dict(src_dict) + type_ = check_new_workflow_action_item_form_field_condition_data_type(d.pop("type")) + + attributes = NewWorkflowActionItemFormFieldConditionDataAttributes.from_dict(d.pop("attributes")) + + new_workflow_action_item_form_field_condition_data = cls( + type_=type_, + attributes=attributes, + ) + + new_workflow_action_item_form_field_condition_data.additional_properties = d + return new_workflow_action_item_form_field_condition_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_workflow_action_item_form_field_condition_data_attributes.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py new file mode 100644 index 00000000..2aadf0fe --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py @@ -0,0 +1,178 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.new_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + check_new_workflow_action_item_form_field_condition_data_attributes_action_item_condition, +) +from ..models.new_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="NewWorkflowActionItemFormFieldConditionDataAttributes") + + +@_attrs_define +class NewWorkflowActionItemFormFieldConditionDataAttributes: + """ + Attributes: + form_field_id (str): The custom field for this condition + action_item_condition (NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition): The trigger + condition Default: 'ANY'. + 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 + action_item_condition: NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition = "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]: + form_field_id = self.form_field_id + + action_item_condition: str = self.action_item_condition + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_functionality_ids, Unset): + selected_functionality_ids = self.selected_functionality_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_option_ids, Unset): + selected_option_ids = self.selected_option_ids + + 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: list[int] | Unset = UNSET + if not isinstance(self.selected_user_ids, Unset): + selected_user_ids = self.selected_user_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_environment_ids, Unset): + selected_environment_ids = self.selected_environment_ids + + 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 + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "form_field_id": form_field_id, + "action_item_condition": action_item_condition, + } + ) + if values is not UNSET: + field_dict["values"] = values + if selected_catalog_entity_ids is not UNSET: + field_dict["selected_catalog_entity_ids"] = selected_catalog_entity_ids + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_option_ids is not UNSET: + field_dict["selected_option_ids"] = selected_option_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_user_ids is not UNSET: + field_dict["selected_user_ids"] = selected_user_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + form_field_id = d.pop("form_field_id") + + action_item_condition = ( + check_new_workflow_action_item_form_field_condition_data_attributes_action_item_condition( + d.pop("action_item_condition") + ) + ) + + values = cast(list[str], d.pop("values", UNSET)) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + new_workflow_action_item_form_field_condition_data_attributes = cls( + form_field_id=form_field_id, + action_item_condition=action_item_condition, + values=values, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_functionality_ids=selected_functionality_ids, + selected_group_ids=selected_group_ids, + selected_option_ids=selected_option_ids, + selected_service_ids=selected_service_ids, + selected_user_ids=selected_user_ids, + selected_cause_ids=selected_cause_ids, + selected_environment_ids=selected_environment_ids, + selected_incident_type_ids=selected_incident_type_ids, + ) + + return new_workflow_action_item_form_field_condition_data_attributes diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py new file mode 100644 index 00000000..074b8b71 --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py @@ -0,0 +1,31 @@ +from typing import Literal, cast + +NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES: set[ + NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition +] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_new_workflow_action_item_form_field_condition_data_attributes_action_item_condition( + value: str | None, +) -> NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | None: + if value is None: + return None + if value in NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES: + return cast(NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_type.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_type.py new file mode 100644 index 00000000..ed3349fe --- /dev/null +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +NewWorkflowActionItemFormFieldConditionDataType = Literal["workflow_action_item_form_field_conditions"] + +NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES: set[NewWorkflowActionItemFormFieldConditionDataType] = { + "workflow_action_item_form_field_conditions", +} + + +def check_new_workflow_action_item_form_field_condition_data_type( + value: str | None, +) -> NewWorkflowActionItemFormFieldConditionDataType | None: + if value is None: + return None + if value in NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES: + return cast(NewWorkflowActionItemFormFieldConditionDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {NEW_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/new_workflow_custom_field_selection.py b/rootly_sdk/models/new_workflow_custom_field_selection.py index 72ba1344..272327b7 100644 --- a/rootly_sdk/models/new_workflow_custom_field_selection.py +++ b/rootly_sdk/models/new_workflow_custom_field_selection.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_custom_field_selection_data import NewWorkflowCustomFieldSelectionData @@ -24,6 +28,8 @@ class NewWorkflowCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_custom_field_selection_data import NewWorkflowCustomFieldSelectionData + data = self.data.to_dict() field_dict: 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 170d0090..0b15d793 100644 --- a/rootly_sdk/models/new_workflow_custom_field_selection_data.py +++ b/rootly_sdk/models/new_workflow_custom_field_selection_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_workflow_custom_field_selection_data_type import ( - NewWorkflowCustomFieldSelectionDataType, - check_new_workflow_custom_field_selection_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_workflow_custom_field_selection_data_type import check_new_workflow_custom_field_selection_data_type +from ..models.new_workflow_custom_field_selection_data_type import NewWorkflowCustomFieldSelectionDataType +from typing import cast if TYPE_CHECKING: from ..models.new_workflow_custom_field_selection_data_attributes import ( @@ -33,6 +34,10 @@ class NewWorkflowCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_custom_field_selection_data_attributes import ( + NewWorkflowCustomFieldSelectionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 fecb492e..3fcbd407 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,15 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_workflow_custom_field_selection_data_attributes_incident_condition import ( - NewWorkflowCustomFieldSelectionDataAttributesIncidentCondition, check_new_workflow_custom_field_selection_data_attributes_incident_condition, ) +from ..models.new_workflow_custom_field_selection_data_attributes_incident_condition import ( + NewWorkflowCustomFieldSelectionDataAttributesIncidentCondition, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewWorkflowCustomFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/new_workflow_data.py b/rootly_sdk/models/new_workflow_data.py index 6ba3ef1b..0d1f19c7 100644 --- a/rootly_sdk/models/new_workflow_data.py +++ b/rootly_sdk/models/new_workflow_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_workflow_data_type import NewWorkflowDataType, check_new_workflow_data_type +from ..types import UNSET, Unset + +from ..models.new_workflow_data_type import check_new_workflow_data_type +from ..models.new_workflow_data_type import NewWorkflowDataType +from typing import cast if TYPE_CHECKING: from ..models.new_workflow_data_attributes import NewWorkflowDataAttributes @@ -28,6 +32,8 @@ class NewWorkflowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_data_attributes import NewWorkflowDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_workflow_data_attributes.py b/rootly_sdk/models/new_workflow_data_attributes.py index 8badb4d0..4b44dda6 100644 --- a/rootly_sdk/models/new_workflow_data_attributes.py +++ b/rootly_sdk/models/new_workflow_data_attributes.py @@ -1,20 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.new_workflow_data_attributes_priority import ( - NewWorkflowDataAttributesPriority, - check_new_workflow_data_attributes_priority, -) -from ..models.new_workflow_data_attributes_repeat_on_item import ( - NewWorkflowDataAttributesRepeatOnItem, - check_new_workflow_data_attributes_repeat_on_item, -) from ..types import UNSET, Unset +from ..models.new_workflow_data_attributes_priority import check_new_workflow_data_attributes_priority +from ..models.new_workflow_data_attributes_priority import NewWorkflowDataAttributesPriority +from ..models.new_workflow_data_attributes_repeat_on_item import check_new_workflow_data_attributes_repeat_on_item +from ..models.new_workflow_data_attributes_repeat_on_item import NewWorkflowDataAttributesRepeatOnItem +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.action_item_trigger_params import ActionItemTriggerParams from ..models.alert_trigger_params import AlertTriggerParams @@ -96,9 +96,10 @@ class NewWorkflowDataAttributes: sub_status_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.action_item_trigger_params import ActionItemTriggerParams - from ..models.alert_trigger_params import AlertTriggerParams + from ..models.simple_trigger_params import SimpleTriggerParams from ..models.incident_trigger_params import IncidentTriggerParams + from ..models.alert_trigger_params import AlertTriggerParams + from ..models.action_item_trigger_params import ActionItemTriggerParams from ..models.pulse_trigger_params import PulseTriggerParams name = self.name diff --git a/rootly_sdk/models/new_workflow_form_field_condition.py b/rootly_sdk/models/new_workflow_form_field_condition.py index 774c79b3..246aea42 100644 --- a/rootly_sdk/models/new_workflow_form_field_condition.py +++ b/rootly_sdk/models/new_workflow_form_field_condition.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_form_field_condition_data import NewWorkflowFormFieldConditionData @@ -24,6 +28,8 @@ class NewWorkflowFormFieldCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_form_field_condition_data import NewWorkflowFormFieldConditionData + data = self.data.to_dict() field_dict: 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 3e2578eb..9d78b65a 100644 --- a/rootly_sdk/models/new_workflow_form_field_condition_data.py +++ b/rootly_sdk/models/new_workflow_form_field_condition_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_workflow_form_field_condition_data_type import ( - NewWorkflowFormFieldConditionDataType, - check_new_workflow_form_field_condition_data_type, -) +from ..types import UNSET, Unset + +from ..models.new_workflow_form_field_condition_data_type import check_new_workflow_form_field_condition_data_type +from ..models.new_workflow_form_field_condition_data_type import NewWorkflowFormFieldConditionDataType +from typing import cast if TYPE_CHECKING: from ..models.new_workflow_form_field_condition_data_attributes import NewWorkflowFormFieldConditionDataAttributes @@ -31,6 +32,10 @@ class NewWorkflowFormFieldConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_form_field_condition_data_attributes import ( + NewWorkflowFormFieldConditionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 5c662698..c7e12f93 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,15 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.new_workflow_form_field_condition_data_attributes_incident_condition import ( - NewWorkflowFormFieldConditionDataAttributesIncidentCondition, check_new_workflow_form_field_condition_data_attributes_incident_condition, ) +from ..models.new_workflow_form_field_condition_data_attributes_incident_condition import ( + NewWorkflowFormFieldConditionDataAttributesIncidentCondition, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="NewWorkflowFormFieldConditionDataAttributes") diff --git a/rootly_sdk/models/new_workflow_group.py b/rootly_sdk/models/new_workflow_group.py index bb41aa39..cd958860 100644 --- a/rootly_sdk/models/new_workflow_group.py +++ b/rootly_sdk/models/new_workflow_group.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_group_data import NewWorkflowGroupData @@ -24,6 +28,8 @@ class NewWorkflowGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_group_data import NewWorkflowGroupData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_group_data.py b/rootly_sdk/models/new_workflow_group_data.py index 9325f311..7b39860b 100644 --- a/rootly_sdk/models/new_workflow_group_data.py +++ b/rootly_sdk/models/new_workflow_group_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_workflow_group_data_type import NewWorkflowGroupDataType, check_new_workflow_group_data_type +from ..types import UNSET, Unset + +from ..models.new_workflow_group_data_type import check_new_workflow_group_data_type +from ..models.new_workflow_group_data_type import NewWorkflowGroupDataType +from typing import cast if TYPE_CHECKING: from ..models.new_workflow_group_data_attributes import NewWorkflowGroupDataAttributes @@ -28,6 +32,8 @@ class NewWorkflowGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_group_data_attributes import NewWorkflowGroupDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_workflow_group_data_attributes.py b/rootly_sdk/models/new_workflow_group_data_attributes.py index 29d5a22d..4147dde2 100644 --- a/rootly_sdk/models/new_workflow_group_data_attributes.py +++ b/rootly_sdk/models/new_workflow_group_data_attributes.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_workflow_group_data_attributes_kind import ( - NewWorkflowGroupDataAttributesKind, - check_new_workflow_group_data_attributes_kind, -) from ..types import UNSET, Unset +from ..models.new_workflow_group_data_attributes_kind import check_new_workflow_group_data_attributes_kind +from ..models.new_workflow_group_data_attributes_kind import NewWorkflowGroupDataAttributesKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="NewWorkflowGroupDataAttributes") diff --git a/rootly_sdk/models/new_workflow_run.py b/rootly_sdk/models/new_workflow_run.py index 86601dd8..5e1c238b 100644 --- a/rootly_sdk/models/new_workflow_run.py +++ b/rootly_sdk/models/new_workflow_run.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_run_data import NewWorkflowRunData @@ -24,6 +28,8 @@ class NewWorkflowRun: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_run_data import NewWorkflowRunData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_run_data.py b/rootly_sdk/models/new_workflow_run_data.py index 6f30cb5c..fcd124bb 100644 --- a/rootly_sdk/models/new_workflow_run_data.py +++ b/rootly_sdk/models/new_workflow_run_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_workflow_run_data_type import NewWorkflowRunDataType, check_new_workflow_run_data_type +from ..types import UNSET, Unset + +from ..models.new_workflow_run_data_type import check_new_workflow_run_data_type +from ..models.new_workflow_run_data_type import NewWorkflowRunDataType +from typing import cast if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_0 import NewWorkflowRunDataAttributesType0 @@ -42,11 +46,12 @@ class NewWorkflowRunData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_run_data_attributes_type_0 import NewWorkflowRunDataAttributesType0 - from ..models.new_workflow_run_data_attributes_type_1 import NewWorkflowRunDataAttributesType1 + from ..models.new_workflow_run_data_attributes_type_4 import NewWorkflowRunDataAttributesType4 from ..models.new_workflow_run_data_attributes_type_2 import NewWorkflowRunDataAttributesType2 + from ..models.new_workflow_run_data_attributes_type_1 import NewWorkflowRunDataAttributesType1 + from ..models.new_workflow_run_data_attributes_type_0 import NewWorkflowRunDataAttributesType0 + from ..models.new_workflow_run_data_attributes_type_5 import NewWorkflowRunDataAttributesType5 from ..models.new_workflow_run_data_attributes_type_3 import NewWorkflowRunDataAttributesType3 - from ..models.new_workflow_run_data_attributes_type_4 import NewWorkflowRunDataAttributesType4 type_: str = self.type_ 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 08d05bd7..11406258 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_0_context import NewWorkflowRunDataAttributesType0Context @@ -32,6 +35,8 @@ class NewWorkflowRunDataAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_run_data_attributes_type_0_context import NewWorkflowRunDataAttributesType0Context + immediate: bool | None | Unset if isinstance(self.immediate, Unset): immediate = UNSET 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 9bce16b4..cd409813 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewWorkflowRunDataAttributesType0Context") 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 6111792e..ab90d2d9 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_1_context import NewWorkflowRunDataAttributesType1Context @@ -33,6 +36,8 @@ class NewWorkflowRunDataAttributesType1: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_run_data_attributes_type_1_context import NewWorkflowRunDataAttributesType1Context + incident_id = self.incident_id immediate: bool | None | Unset 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 20304b26..5d420a30 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewWorkflowRunDataAttributesType1Context") 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 7344a64d..697bbe0f 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_2_context import NewWorkflowRunDataAttributesType2Context @@ -33,6 +36,8 @@ class NewWorkflowRunDataAttributesType2: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_run_data_attributes_type_2_context import NewWorkflowRunDataAttributesType2Context + post_mortem_id = self.post_mortem_id immediate: bool | None | Unset 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 739fa7bc..2b3f37e7 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewWorkflowRunDataAttributesType2Context") 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 9b25708a..d4b09166 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_3_context import NewWorkflowRunDataAttributesType3Context @@ -33,6 +36,8 @@ class NewWorkflowRunDataAttributesType3: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_run_data_attributes_type_3_context import NewWorkflowRunDataAttributesType3Context + action_item_id = self.action_item_id immediate: bool | None | Unset 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 25eabc0f..4b152c07 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewWorkflowRunDataAttributesType3Context") 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 a01ead3d..05454f18 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_4_context import NewWorkflowRunDataAttributesType4Context @@ -33,6 +36,8 @@ class NewWorkflowRunDataAttributesType4: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_run_data_attributes_type_4_context import NewWorkflowRunDataAttributesType4Context + alert_id = self.alert_id immediate: bool | None | Unset 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 8c969b82..efc24594 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewWorkflowRunDataAttributesType4Context") 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 678f16da..89435782 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_5_context import NewWorkflowRunDataAttributesType5Context @@ -33,6 +36,8 @@ class NewWorkflowRunDataAttributesType5: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_run_data_attributes_type_5_context import NewWorkflowRunDataAttributesType5Context + pulse_id = self.pulse_id immediate: bool | None | Unset 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 02e65077..feddc784 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="NewWorkflowRunDataAttributesType5Context") diff --git a/rootly_sdk/models/new_workflow_task.py b/rootly_sdk/models/new_workflow_task.py index d32d2579..a70f46be 100644 --- a/rootly_sdk/models/new_workflow_task.py +++ b/rootly_sdk/models/new_workflow_task.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.new_workflow_task_data import NewWorkflowTaskData @@ -24,6 +28,8 @@ class NewWorkflowTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_task_data import NewWorkflowTaskData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/new_workflow_task_data.py b/rootly_sdk/models/new_workflow_task_data.py index 7888ac5a..ee7bf083 100644 --- a/rootly_sdk/models/new_workflow_task_data.py +++ b/rootly_sdk/models/new_workflow_task_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.new_workflow_task_data_type import NewWorkflowTaskDataType, check_new_workflow_task_data_type +from ..types import UNSET, Unset + +from ..models.new_workflow_task_data_type import check_new_workflow_task_data_type +from ..models.new_workflow_task_data_type import NewWorkflowTaskDataType +from typing import cast if TYPE_CHECKING: from ..models.new_workflow_task_data_attributes import NewWorkflowTaskDataAttributes @@ -28,6 +32,8 @@ class NewWorkflowTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.new_workflow_task_data_attributes import NewWorkflowTaskDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/new_workflow_task_data_attributes.py b/rootly_sdk/models/new_workflow_task_data_attributes.py index 58fa6ade..020a24f1 100644 --- a/rootly_sdk/models/new_workflow_task_data_attributes.py +++ b/rootly_sdk/models/new_workflow_task_data_attributes.py @@ -1,25 +1,38 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import AttachRetrospectivePdfToJiraIssueTaskParams from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -34,6 +47,7 @@ from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -60,6 +74,8 @@ from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -70,26 +86,60 @@ from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 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 + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -110,6 +160,7 @@ from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -141,41 +192,56 @@ class NewWorkflowTaskDataAttributes: """ Attributes: - 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 | + task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams | AddSlackBookmarkTaskParamsType0 | + AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams | + ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | + AttachDatadogDashboardsTaskParams | AttachRetrospectivePdfToJiraIssueTaskParams | + AutoAssignRoleOpsgenieTaskParams | AutoAssignRolePagerdutyTaskParamsType0 | + AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | + CallPeopleTaskParams | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | + CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | + CreateAsanaTaskTaskParams | CreateClickupTaskTaskParams | CreateCodaPageTaskParams | + CreateConfluencePageTaskParams | CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | + CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | + CreateGoogleChatSpaceTaskParams | 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 | CreateShortcutStoryTaskParamsType0 | + CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | + CreateSubIncidentTaskParams | CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | + CreateWebexMeetingTaskParams | CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | + CreateZoomMeetingTaskParams | GetAlertsTaskParams | GetGithubCommitsTaskParamsType0 | + GetGithubCommitsTaskParamsType1 | GetGitlabCommitsTaskParamsType0 | GetGitlabCommitsTaskParamsType1 | + GetPulsesTaskParams | HttpClientTaskParams | InviteToGoogleChatSpaceTaskParams | + InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | + InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelPagerdutyTaskParamsType0 | + InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams | + InviteToSlackChannelTaskParamsType0 | InviteToSlackChannelTaskParamsType1 | InviteToSlackChannelTaskParamsType2 + | 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 | + PageRootlyOnCallRespondersTaskParams | PageVictorOpsOnCallRespondersTaskParamsType0 | + PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | + RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams | RenameGoogleChatSpaceTaskParams | + RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | + SendDashboardReportTaskParams | SendEmailTaskParams | SendGoogleChatAttachmentsTaskParams | + SendGoogleChatMessageTaskParams | SendMicrosoftTeamsBlocksTaskParamsType0 | + SendMicrosoftTeamsChatMessageTaskParams | SendMicrosoftTeamsMessageTaskParamsType0 | + SendSlackBlocksTaskParamsType0 | SendSlackBlocksTaskParamsType1 | SendSlackBlocksTaskParamsType2 | + SendSlackMessageTaskParamsType0 | SendSlackMessageTaskParamsType1 | SendSlackMessageTaskParamsType2 | + SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams | + SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | SnapshotNewRelicGraphTaskParams | + TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | UpdateActionItemTaskParams | + UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | UpdateAttachedAlertsTaskParams | + UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | UpdateConfluencePageTaskParams | + UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | UpdateGithubIssueTaskParams | + UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams | UpdateIncidentTaskParams | UpdateJiraIssueTaskParams | UpdateLinearIssueTaskParams | UpdateMotionTaskTaskParams | UpdateNotionPageTaskParams | UpdateOpsgenieAlertTaskParams | UpdateOpsgenieIncidentTaskParams | @@ -192,17 +258,25 @@ class NewWorkflowTaskDataAttributes: task_params: ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -216,6 +290,7 @@ class NewWorkflowTaskDataAttributes: | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -243,6 +318,8 @@ class NewWorkflowTaskDataAttributes: | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -253,26 +330,50 @@ class NewWorkflowTaskDataAttributes: | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -293,6 +394,7 @@ class NewWorkflowTaskDataAttributes: | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -322,138 +424,191 @@ class NewWorkflowTaskDataAttributes: enabled: bool | Unset = True def to_dict(self) -> dict[str, Any]: - from ..models.add_action_item_task_params import AddActionItemTaskParams - from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams - from ..models.add_role_task_params import AddRoleTaskParams - from ..models.add_team_task_params import AddTeamTaskParams - from ..models.add_to_timeline_task_params import AddToTimelineTaskParams - from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams - from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 + from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams + from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams - from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams - from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams - from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams - from ..models.call_people_task_params import CallPeopleTaskParams - from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams - from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams - from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams - from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams - from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams - from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams - from ..models.create_coda_page_task_params import CreateCodaPageTaskParams + from ..models.create_notion_page_task_params import CreateNotionPageTaskParams + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.create_confluence_page_task_params import CreateConfluencePageTaskParams - from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams - from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams - from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams - from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams + from ..models.send_sms_task_params import SendSmsTaskParams + from ..models.call_people_task_params import CallPeopleTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams + from ..models.create_incident_task_params import CreateIncidentTaskParams + from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 + from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams + from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams + from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams + from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams + from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams + from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams + from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams + from ..models.get_pulses_task_params import GetPulsesTaskParams + from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams + from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams + from ..models.publish_incident_task_params import PublishIncidentTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams + from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams + from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams + from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams + from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams - from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams - from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams + from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams + from ..models.update_incident_task_params import UpdateIncidentTaskParams + from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.add_team_task_params import AddTeamTaskParams + from ..models.update_status_task_params import UpdateStatusTaskParams + from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 + from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams + from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) + from ..models.redis_client_task_params import RedisClientTaskParams + from ..models.add_action_item_task_params import AddActionItemTaskParams + from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams + from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.http_client_task_params import HttpClientTaskParams + from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams from ..models.create_google_meeting_task_params import CreateGoogleMeetingTaskParams - from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams - 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.update_asana_task_task_params import UpdateAsanaTaskTaskParams + from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 + from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams + from ..models.create_coda_page_task_params import CreateCodaPageTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) 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 - from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams - from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams - from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams - from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams + from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams + from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams + from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams + from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams + from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams + from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams + from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams + from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_motion_task_task_params import CreateMotionTaskTaskParams - from ..models.create_notion_page_task_params import CreateNotionPageTaskParams - from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams - from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams - from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams - from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams - from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams + from ..models.update_action_item_task_params import UpdateActionItemTaskParams + from ..models.print_task_params import PrintTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.create_quip_page_task_params import CreateQuipPageTaskParams + from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams + from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams + from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams - from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams - from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams - from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams - from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams - from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams - from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams + from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams + from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams + from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams + from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams + from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.create_webex_meeting_task_params import CreateWebexMeetingTaskParams - from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams - from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams - from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams - from ..models.get_alerts_task_params import GetAlertsTaskParams - from ..models.get_pulses_task_params import GetPulsesTaskParams - from ..models.http_client_task_params import HttpClientTaskParams - from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams - 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 - from ..models.print_task_params import PrintTaskParams - from ..models.publish_incident_task_params import PublishIncidentTaskParams - from ..models.redis_client_task_params import RedisClientTaskParams + from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams + from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams + from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams + from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams + from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams + from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams + from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams + from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams + from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams + from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams + from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.add_role_task_params import AddRoleTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams - from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams - from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams - from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams + from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams + from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams + from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.send_email_task_params import SendEmailTaskParams - from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams - from ..models.send_sms_task_params import SendSmsTaskParams - from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams - from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams - from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams + from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.snapshot_looker_look_task_params import SnapshotLookerLookTaskParams - from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams - from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams - from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams - from ..models.update_action_item_task_params import UpdateActionItemTaskParams - from ..models.update_airtable_table_record_task_params import UpdateAirtableTableRecordTaskParams - from ..models.update_asana_task_task_params import UpdateAsanaTaskTaskParams - from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams + from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams + from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams + from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams + from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams from ..models.update_clickup_task_task_params import UpdateClickupTaskTaskParams - from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams - from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams - from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams - from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams - from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams + from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.update_airtable_table_record_task_params import UpdateAirtableTableRecordTaskParams + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams + from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 + from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams - from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams - from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams - from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams - from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams - from ..models.update_incident_task_params import UpdateIncidentTaskParams - from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams - from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams - from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams - from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams - from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams + from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams from ..models.update_opsgenie_incident_task_params import UpdateOpsgenieIncidentTaskParams - from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams - from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams - from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams - from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams - from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams - from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams - from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams - from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams - from ..models.update_status_task_params import UpdateStatusTaskParams - from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams - from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams - from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams + from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams + from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams + from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams - task_params: Any | dict[str, Any] + task_params: dict[str, Any] if isinstance(self.task_params, AddActionItemTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateActionItemTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddRoleTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddTeamTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddToTimelineTaskParams): @@ -466,6 +621,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, AutoAssignRoleRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdatePagerdutyIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreatePagerdutyStatusUpdateTaskParams): @@ -530,6 +689,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateJiraSubtaskTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AttachRetrospectivePdfToJiraIssueTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearIssueTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearSubtaskIssueTaskParams): @@ -542,8 +703,28 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMicrosoftTeamsChatTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddMicrosoftTeamsChatTabTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatMessageTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatAttachmentsTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ArchiveGoogleChatSpacesTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, RenameGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, UpdateGoogleChatSpaceDescriptionTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ChangeGoogleChatSpacePrivacyTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, ArchiveMicrosoftTeamsChannelsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, RenameMicrosoftTeamsChannelTaskParams): @@ -552,8 +733,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateNotionPageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsMessageTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendMicrosoftTeamsChatMessageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsBlocksTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateNotionPageTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateQuipPageTaskParams): @@ -568,6 +753,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateServiceNowIncidentTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateShortcutTaskTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateTrelloCardTaskParams): @@ -584,6 +773,14 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateZoomMeetingTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetPulsesTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetAlertsTaskParams): @@ -594,6 +791,18 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToMicrosoftTeamsChannelRootlyTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelVictorOpsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PageOpsgenieOnCallRespondersTaskParams): @@ -612,6 +821,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, PagePagerdutyOnCallRespondersTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateVictorOpsIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PrintTaskParams): @@ -632,6 +845,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateSlackChannelTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendSmsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendWhatsappMessageTaskParams): @@ -686,6 +905,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, TriggerWorkflowTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateOpenaiChatCompletionTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateWatsonxChatCompletionTaskParams): @@ -694,10 +919,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMistralChatCompletionTaskParams): task_params = self.task_params.to_dict() - elif isinstance(self.task_params, CreateAnthropicChatCompletionTaskParams): - task_params = self.task_params.to_dict() else: - task_params = self.task_params + task_params = self.task_params.to_dict() name = self.name @@ -729,16 +952,27 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -753,6 +987,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -779,6 +1014,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -789,26 +1026,60 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 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 + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -829,6 +1100,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -859,17 +1131,25 @@ def _parse_task_params( ) -> ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -883,6 +1163,7 @@ def _parse_task_params( | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -910,6 +1191,8 @@ def _parse_task_params( | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -920,26 +1203,50 @@ def _parse_task_params( | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -960,6 +1267,7 @@ def _parse_task_params( | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -1007,6 +1315,22 @@ def _parse_task_params( return task_params_type_2 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_0 = AddSlackBookmarkTaskParamsType0.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_1 = AddSlackBookmarkTaskParamsType1.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1055,6 +1379,26 @@ def _parse_task_params( return task_params_type_9 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_0 = ( + AutoAssignRolePagerdutyTaskParamsType0.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_1 = ( + AutoAssignRolePagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1314,7 +1658,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_43 = CreateLinearIssueTaskParams.from_dict(data) + task_params_type_43 = AttachRetrospectivePdfToJiraIssueTaskParams.from_dict(data) return task_params_type_43 except (TypeError, ValueError, AttributeError, KeyError): @@ -1322,7 +1666,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_44 = CreateLinearSubtaskIssueTaskParams.from_dict(data) + task_params_type_44 = CreateLinearIssueTaskParams.from_dict(data) return task_params_type_44 except (TypeError, ValueError, AttributeError, KeyError): @@ -1330,7 +1674,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_45 = CreateLinearIssueCommentTaskParams.from_dict(data) + task_params_type_45 = CreateLinearSubtaskIssueTaskParams.from_dict(data) return task_params_type_45 except (TypeError, ValueError, AttributeError, KeyError): @@ -1338,7 +1682,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_46 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) + task_params_type_46 = CreateLinearIssueCommentTaskParams.from_dict(data) return task_params_type_46 except (TypeError, ValueError, AttributeError, KeyError): @@ -1346,7 +1690,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_47 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_47 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) return task_params_type_47 except (TypeError, ValueError, AttributeError, KeyError): @@ -1354,7 +1698,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_48 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + task_params_type_48 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_48 except (TypeError, ValueError, AttributeError, KeyError): @@ -1362,15 +1706,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_50 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) + task_params_type_49 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + + return task_params_type_49 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_microsoft_teams_tab_task_params_type_0 = ( + AddMicrosoftTeamsTabTaskParamsType0.from_dict(data) + ) - return task_params_type_50 + return componentsschemasadd_microsoft_teams_tab_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_51 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) + componentsschemasadd_microsoft_teams_tab_task_params_type_1 = ( + AddMicrosoftTeamsTabTaskParamsType1.from_dict(data) + ) + + return componentsschemasadd_microsoft_teams_tab_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_51 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) return task_params_type_51 except (TypeError, ValueError, AttributeError, KeyError): @@ -1378,7 +1742,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_52 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_52 = CreateGoogleChatSpaceTaskParams.from_dict(data) return task_params_type_52 except (TypeError, ValueError, AttributeError, KeyError): @@ -1386,7 +1750,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_53 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_53 = SendGoogleChatMessageTaskParams.from_dict(data) return task_params_type_53 except (TypeError, ValueError, AttributeError, KeyError): @@ -1394,7 +1758,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_54 = CreateNotionPageTaskParams.from_dict(data) + task_params_type_54 = SendGoogleChatAttachmentsTaskParams.from_dict(data) return task_params_type_54 except (TypeError, ValueError, AttributeError, KeyError): @@ -1402,7 +1766,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_56 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) + task_params_type_55 = InviteToGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_55 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_56 = ArchiveGoogleChatSpacesTaskParams.from_dict(data) return task_params_type_56 except (TypeError, ValueError, AttributeError, KeyError): @@ -1410,7 +1782,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_58 = UpdateNotionPageTaskParams.from_dict(data) + task_params_type_57 = RenameGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_57 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_58 = UpdateGoogleChatSpaceDescriptionTaskParams.from_dict(data) return task_params_type_58 except (TypeError, ValueError, AttributeError, KeyError): @@ -1418,7 +1798,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_59 = UpdateQuipPageTaskParams.from_dict(data) + task_params_type_59 = ChangeGoogleChatSpacePrivacyTaskParams.from_dict(data) return task_params_type_59 except (TypeError, ValueError, AttributeError, KeyError): @@ -1426,7 +1806,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_60 = UpdateConfluencePageTaskParams.from_dict(data) + task_params_type_60 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) return task_params_type_60 except (TypeError, ValueError, AttributeError, KeyError): @@ -1434,7 +1814,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_61 = UpdateSharepointPageTaskParams.from_dict(data) + task_params_type_61 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_61 except (TypeError, ValueError, AttributeError, KeyError): @@ -1442,7 +1822,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_62 = UpdateDropboxPaperPageTaskParams.from_dict(data) + task_params_type_62 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_62 except (TypeError, ValueError, AttributeError, KeyError): @@ -1450,7 +1830,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_63 = UpdateDatadogNotebookTaskParams.from_dict(data) + task_params_type_63 = CreateNotionPageTaskParams.from_dict(data) return task_params_type_63 except (TypeError, ValueError, AttributeError, KeyError): @@ -1458,23 +1838,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_64 = CreateServiceNowIncidentTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_message_task_params_type_0 = ( + SendMicrosoftTeamsMessageTaskParamsType0.from_dict(data) + ) + + return componentsschemassend_microsoft_teams_message_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_65 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) - return task_params_type_64 + return task_params_type_65 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_66 = CreateShortcutTaskTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_blocks_task_params_type_0 = ( + SendMicrosoftTeamsBlocksTaskParamsType0.from_dict(data) + ) - return task_params_type_66 + return componentsschemassend_microsoft_teams_blocks_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_67 = CreateTrelloCardTaskParams.from_dict(data) + task_params_type_67 = UpdateNotionPageTaskParams.from_dict(data) return task_params_type_67 except (TypeError, ValueError, AttributeError, KeyError): @@ -1482,7 +1874,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_68 = CreateWebexMeetingTaskParams.from_dict(data) + task_params_type_68 = UpdateQuipPageTaskParams.from_dict(data) return task_params_type_68 except (TypeError, ValueError, AttributeError, KeyError): @@ -1490,7 +1882,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_69 = CreateZendeskTicketTaskParams.from_dict(data) + task_params_type_69 = UpdateConfluencePageTaskParams.from_dict(data) return task_params_type_69 except (TypeError, ValueError, AttributeError, KeyError): @@ -1498,7 +1890,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_70 = CreateZendeskJiraLinkTaskParams.from_dict(data) + task_params_type_70 = UpdateSharepointPageTaskParams.from_dict(data) return task_params_type_70 except (TypeError, ValueError, AttributeError, KeyError): @@ -1506,7 +1898,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_71 = CreateClickupTaskTaskParams.from_dict(data) + task_params_type_71 = UpdateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_71 except (TypeError, ValueError, AttributeError, KeyError): @@ -1514,7 +1906,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_72 = CreateMotionTaskTaskParams.from_dict(data) + task_params_type_72 = UpdateDatadogNotebookTaskParams.from_dict(data) return task_params_type_72 except (TypeError, ValueError, AttributeError, KeyError): @@ -1522,7 +1914,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_73 = CreateZoomMeetingTaskParams.from_dict(data) + task_params_type_73 = CreateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_73 except (TypeError, ValueError, AttributeError, KeyError): @@ -1530,7 +1922,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_76 = GetPulsesTaskParams.from_dict(data) + componentsschemascreate_shortcut_story_task_params_type_0 = ( + CreateShortcutStoryTaskParamsType0.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemascreate_shortcut_story_task_params_type_1 = ( + CreateShortcutStoryTaskParamsType1.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_75 = CreateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_75 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_76 = CreateTrelloCardTaskParams.from_dict(data) return task_params_type_76 except (TypeError, ValueError, AttributeError, KeyError): @@ -1538,7 +1958,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_77 = GetAlertsTaskParams.from_dict(data) + task_params_type_77 = CreateWebexMeetingTaskParams.from_dict(data) return task_params_type_77 except (TypeError, ValueError, AttributeError, KeyError): @@ -1546,7 +1966,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_78 = HttpClientTaskParams.from_dict(data) + task_params_type_78 = CreateZendeskTicketTaskParams.from_dict(data) return task_params_type_78 except (TypeError, ValueError, AttributeError, KeyError): @@ -1554,7 +1974,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_79 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) + task_params_type_79 = CreateZendeskJiraLinkTaskParams.from_dict(data) return task_params_type_79 except (TypeError, ValueError, AttributeError, KeyError): @@ -1562,7 +1982,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_80 = InviteToSlackChannelRootlyTaskParams.from_dict(data) + task_params_type_80 = CreateClickupTaskTaskParams.from_dict(data) return task_params_type_80 except (TypeError, ValueError, AttributeError, KeyError): @@ -1570,23 +1990,55 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_83 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) + task_params_type_81 = CreateMotionTaskTaskParams.from_dict(data) + + return task_params_type_81 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_82 = CreateZoomMeetingTaskParams.from_dict(data) + + return task_params_type_82 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_0 = GetGithubCommitsTaskParamsType0.from_dict(data) + + return componentsschemasget_github_commits_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_1 = GetGithubCommitsTaskParamsType1.from_dict(data) - return task_params_type_83 + return componentsschemasget_github_commits_task_params_type_1 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_84 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_0 = GetGitlabCommitsTaskParamsType0.from_dict(data) - return task_params_type_84 + return componentsschemasget_gitlab_commits_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_85 = CreateOpsgenieAlertTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_1 = GetGitlabCommitsTaskParamsType1.from_dict(data) + + return componentsschemasget_gitlab_commits_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_85 = GetPulsesTaskParams.from_dict(data) return task_params_type_85 except (TypeError, ValueError, AttributeError, KeyError): @@ -1594,7 +2046,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_86 = CreateJsmopsAlertTaskParams.from_dict(data) + task_params_type_86 = GetAlertsTaskParams.from_dict(data) return task_params_type_86 except (TypeError, ValueError, AttributeError, KeyError): @@ -1602,7 +2054,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_87 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) + task_params_type_87 = HttpClientTaskParams.from_dict(data) return task_params_type_87 except (TypeError, ValueError, AttributeError, KeyError): @@ -1610,7 +2062,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_88 = UpdateOpsgenieAlertTaskParams.from_dict(data) + task_params_type_88 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) return task_params_type_88 except (TypeError, ValueError, AttributeError, KeyError): @@ -1618,7 +2070,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_89 = UpdateOpsgenieIncidentTaskParams.from_dict(data) + task_params_type_89 = InviteToSlackChannelRootlyTaskParams.from_dict(data) return task_params_type_89 except (TypeError, ValueError, AttributeError, KeyError): @@ -1626,7 +2078,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_90 = PageRootlyOnCallRespondersTaskParams.from_dict(data) + task_params_type_90 = InviteToMicrosoftTeamsChannelRootlyTaskParams.from_dict(data) return task_params_type_90 except (TypeError, ValueError, AttributeError, KeyError): @@ -1634,15 +2086,57 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_91 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 = ( + InviteToSlackChannelPagerdutyTaskParamsType0.from_dict(data) + ) - return task_params_type_91 + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_93 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 = ( + InviteToSlackChannelPagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_0 = ( + InviteToSlackChannelTaskParamsType0.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_1 = ( + InviteToSlackChannelTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_2 = ( + InviteToSlackChannelTaskParamsType2.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_93 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) return task_params_type_93 except (TypeError, ValueError, AttributeError, KeyError): @@ -1650,7 +2144,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_94 = PrintTaskParams.from_dict(data) + task_params_type_94 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) return task_params_type_94 except (TypeError, ValueError, AttributeError, KeyError): @@ -1658,7 +2152,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_95 = PublishIncidentTaskParams.from_dict(data) + task_params_type_95 = CreateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_95 except (TypeError, ValueError, AttributeError, KeyError): @@ -1666,7 +2160,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_96 = RedisClientTaskParams.from_dict(data) + task_params_type_96 = CreateJsmopsAlertTaskParams.from_dict(data) return task_params_type_96 except (TypeError, ValueError, AttributeError, KeyError): @@ -1674,7 +2168,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_97 = RenameSlackChannelTaskParams.from_dict(data) + task_params_type_97 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) return task_params_type_97 except (TypeError, ValueError, AttributeError, KeyError): @@ -1682,7 +2176,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_98 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) + task_params_type_98 = UpdateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_98 except (TypeError, ValueError, AttributeError, KeyError): @@ -1690,7 +2184,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_99 = RunCommandHerokuTaskParams.from_dict(data) + task_params_type_99 = UpdateOpsgenieIncidentTaskParams.from_dict(data) return task_params_type_99 except (TypeError, ValueError, AttributeError, KeyError): @@ -1698,7 +2192,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_100 = SendEmailTaskParams.from_dict(data) + task_params_type_100 = PageRootlyOnCallRespondersTaskParams.from_dict(data) return task_params_type_100 except (TypeError, ValueError, AttributeError, KeyError): @@ -1706,7 +2200,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_101 = SendDashboardReportTaskParams.from_dict(data) + task_params_type_101 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) return task_params_type_101 except (TypeError, ValueError, AttributeError, KeyError): @@ -1714,15 +2208,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_102 = CreateSlackChannelTaskParams.from_dict(data) + componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 = ( + PageVictorOpsOnCallRespondersTaskParamsType0.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 = ( + PageVictorOpsOnCallRespondersTaskParamsType1.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_103 = UpdateVictorOpsIncidentTaskParams.from_dict(data) - return task_params_type_102 + return task_params_type_103 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_104 = SendSmsTaskParams.from_dict(data) + task_params_type_104 = PrintTaskParams.from_dict(data) return task_params_type_104 except (TypeError, ValueError, AttributeError, KeyError): @@ -1730,7 +2244,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_105 = SendWhatsappMessageTaskParams.from_dict(data) + task_params_type_105 = PublishIncidentTaskParams.from_dict(data) return task_params_type_105 except (TypeError, ValueError, AttributeError, KeyError): @@ -1738,7 +2252,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_106 = SnapshotDatadogGraphTaskParams.from_dict(data) + task_params_type_106 = RedisClientTaskParams.from_dict(data) return task_params_type_106 except (TypeError, ValueError, AttributeError, KeyError): @@ -1746,7 +2260,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_107 = SnapshotGrafanaDashboardTaskParams.from_dict(data) + task_params_type_107 = RenameSlackChannelTaskParams.from_dict(data) return task_params_type_107 except (TypeError, ValueError, AttributeError, KeyError): @@ -1754,7 +2268,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_108 = SnapshotLookerLookTaskParams.from_dict(data) + task_params_type_108 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) return task_params_type_108 except (TypeError, ValueError, AttributeError, KeyError): @@ -1762,7 +2276,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_109 = SnapshotNewRelicGraphTaskParams.from_dict(data) + task_params_type_109 = RunCommandHerokuTaskParams.from_dict(data) return task_params_type_109 except (TypeError, ValueError, AttributeError, KeyError): @@ -1770,7 +2284,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_110 = TweetTwitterMessageTaskParams.from_dict(data) + task_params_type_110 = SendEmailTaskParams.from_dict(data) return task_params_type_110 except (TypeError, ValueError, AttributeError, KeyError): @@ -1778,7 +2292,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_111 = UpdateAirtableTableRecordTaskParams.from_dict(data) + task_params_type_111 = SendDashboardReportTaskParams.from_dict(data) return task_params_type_111 except (TypeError, ValueError, AttributeError, KeyError): @@ -1786,7 +2300,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_112 = UpdateAsanaTaskTaskParams.from_dict(data) + task_params_type_112 = CreateSlackChannelTaskParams.from_dict(data) return task_params_type_112 except (TypeError, ValueError, AttributeError, KeyError): @@ -1794,15 +2308,31 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_113 = UpdateGithubIssueTaskParams.from_dict(data) + componentsschemassend_slack_message_task_params_type_0 = SendSlackMessageTaskParamsType0.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_message_task_params_type_1 = SendSlackMessageTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_message_task_params_type_2 = SendSlackMessageTaskParamsType2.from_dict(data) - return task_params_type_113 + return componentsschemassend_slack_message_task_params_type_2 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_114 = UpdateGitlabIssueTaskParams.from_dict(data) + task_params_type_114 = SendSmsTaskParams.from_dict(data) return task_params_type_114 except (TypeError, ValueError, AttributeError, KeyError): @@ -1810,7 +2340,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_115 = UpdateIncidentTaskParams.from_dict(data) + task_params_type_115 = SendWhatsappMessageTaskParams.from_dict(data) return task_params_type_115 except (TypeError, ValueError, AttributeError, KeyError): @@ -1818,7 +2348,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_116 = UpdateIncidentPostmortemTaskParams.from_dict(data) + task_params_type_116 = SnapshotDatadogGraphTaskParams.from_dict(data) return task_params_type_116 except (TypeError, ValueError, AttributeError, KeyError): @@ -1826,7 +2356,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_117 = UpdateJiraIssueTaskParams.from_dict(data) + task_params_type_117 = SnapshotGrafanaDashboardTaskParams.from_dict(data) return task_params_type_117 except (TypeError, ValueError, AttributeError, KeyError): @@ -1834,7 +2364,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_118 = UpdateLinearIssueTaskParams.from_dict(data) + task_params_type_118 = SnapshotLookerLookTaskParams.from_dict(data) return task_params_type_118 except (TypeError, ValueError, AttributeError, KeyError): @@ -1842,7 +2372,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_119 = UpdateServiceNowIncidentTaskParams.from_dict(data) + task_params_type_119 = SnapshotNewRelicGraphTaskParams.from_dict(data) return task_params_type_119 except (TypeError, ValueError, AttributeError, KeyError): @@ -1850,7 +2380,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_120 = UpdateShortcutStoryTaskParams.from_dict(data) + task_params_type_120 = TweetTwitterMessageTaskParams.from_dict(data) return task_params_type_120 except (TypeError, ValueError, AttributeError, KeyError): @@ -1858,7 +2388,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_121 = UpdateShortcutTaskTaskParams.from_dict(data) + task_params_type_121 = UpdateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_121 except (TypeError, ValueError, AttributeError, KeyError): @@ -1866,7 +2396,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_122 = UpdateSlackChannelTopicTaskParams.from_dict(data) + task_params_type_122 = UpdateAsanaTaskTaskParams.from_dict(data) return task_params_type_122 except (TypeError, ValueError, AttributeError, KeyError): @@ -1874,7 +2404,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_123 = UpdateStatusTaskParams.from_dict(data) + task_params_type_123 = UpdateGithubIssueTaskParams.from_dict(data) return task_params_type_123 except (TypeError, ValueError, AttributeError, KeyError): @@ -1882,7 +2412,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_124 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) + task_params_type_124 = UpdateGitlabIssueTaskParams.from_dict(data) return task_params_type_124 except (TypeError, ValueError, AttributeError, KeyError): @@ -1890,7 +2420,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_125 = UpdateTrelloCardTaskParams.from_dict(data) + task_params_type_125 = UpdateIncidentTaskParams.from_dict(data) return task_params_type_125 except (TypeError, ValueError, AttributeError, KeyError): @@ -1898,7 +2428,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_126 = UpdateClickupTaskTaskParams.from_dict(data) + task_params_type_126 = UpdateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_126 except (TypeError, ValueError, AttributeError, KeyError): @@ -1906,7 +2436,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_127 = UpdateMotionTaskTaskParams.from_dict(data) + task_params_type_127 = UpdateJiraIssueTaskParams.from_dict(data) return task_params_type_127 except (TypeError, ValueError, AttributeError, KeyError): @@ -1914,7 +2444,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_128 = UpdateZendeskTicketTaskParams.from_dict(data) + task_params_type_128 = UpdateLinearIssueTaskParams.from_dict(data) return task_params_type_128 except (TypeError, ValueError, AttributeError, KeyError): @@ -1922,7 +2452,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_129 = UpdateAttachedAlertsTaskParams.from_dict(data) + task_params_type_129 = UpdateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_129 except (TypeError, ValueError, AttributeError, KeyError): @@ -1930,7 +2460,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_130 = TriggerWorkflowTaskParams.from_dict(data) + task_params_type_130 = UpdateShortcutStoryTaskParams.from_dict(data) return task_params_type_130 except (TypeError, ValueError, AttributeError, KeyError): @@ -1938,7 +2468,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_132 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + task_params_type_131 = UpdateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_131 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_132 = UpdateSlackChannelTopicTaskParams.from_dict(data) return task_params_type_132 except (TypeError, ValueError, AttributeError, KeyError): @@ -1946,7 +2484,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_133 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + task_params_type_133 = UpdateStatusTaskParams.from_dict(data) return task_params_type_133 except (TypeError, ValueError, AttributeError, KeyError): @@ -1954,7 +2492,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_134 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + task_params_type_134 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) return task_params_type_134 except (TypeError, ValueError, AttributeError, KeyError): @@ -1962,7 +2500,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_135 = CreateMistralChatCompletionTaskParams.from_dict(data) + task_params_type_135 = UpdateTrelloCardTaskParams.from_dict(data) return task_params_type_135 except (TypeError, ValueError, AttributeError, KeyError): @@ -1970,139 +2508,104 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_136 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + task_params_type_136 = UpdateClickupTaskTaskParams.from_dict(data) return task_params_type_136 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - 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, - ) + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_137 = UpdateMotionTaskTaskParams.from_dict(data) + + return task_params_type_137 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_138 = UpdateZendeskTicketTaskParams.from_dict(data) + + return task_params_type_138 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_139 = UpdateAttachedAlertsTaskParams.from_dict(data) + + return task_params_type_139 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_140 = TriggerWorkflowTaskParams.from_dict(data) + + return task_params_type_140 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_0 = SendSlackBlocksTaskParamsType0.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_1 = SendSlackBlocksTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_2 = SendSlackBlocksTaskParamsType2.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_142 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + + return task_params_type_142 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_143 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + + return task_params_type_143 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_144 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + + return task_params_type_144 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_145 = CreateMistralChatCompletionTaskParams.from_dict(data) + + return task_params_type_145 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + task_params_type_146 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + + return task_params_type_146 task_params = _parse_task_params(d.pop("task_params")) diff --git a/rootly_sdk/models/on_call_pay_report.py b/rootly_sdk/models/on_call_pay_report.py index 566fea98..089edad9 100644 --- a/rootly_sdk/models/on_call_pay_report.py +++ b/rootly_sdk/models/on_call_pay_report.py @@ -1,17 +1,23 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.on_call_pay_report_pay_type import check_on_call_pay_report_pay_type +from ..models.on_call_pay_report_pay_type import OnCallPayReportPayType +from ..models.on_call_pay_report_status import check_on_call_pay_report_status +from ..models.on_call_pay_report_status import OnCallPayReportStatus +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + + T = TypeVar("T", bound="OnCallPayReport") @@ -36,7 +42,10 @@ 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. + time_zone (None | str | Unset): The IANA timezone used to compute day and weekend boundaries for this report. + Defaults to the team's timezone. + use_responders_time_zone (bool | Unset): When true, each responder's personal timezone is used for their pay + calculation; otherwise the report-wide time_zone is used. 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 @@ -61,6 +70,7 @@ class OnCallPayReport: enabled_granular_time_breakdown: bool | Unset = UNSET last_generated_at: datetime.datetime | None | Unset = UNSET time_zone: None | str | Unset = UNSET + use_responders_time_zone: bool | 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) @@ -114,6 +124,8 @@ def to_dict(self) -> dict[str, Any]: else: time_zone = self.time_zone + use_responders_time_zone = self.use_responders_time_zone + csv_file_url: None | str | Unset if isinstance(self.csv_file_url, Unset): csv_file_url = UNSET @@ -163,6 +175,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["last_generated_at"] = last_generated_at if time_zone is not UNSET: field_dict["time_zone"] = time_zone + if use_responders_time_zone is not UNSET: + field_dict["use_responders_time_zone"] = use_responders_time_zone if csv_file_url is not UNSET: field_dict["csv_file_url"] = csv_file_url if xlsx_file_url is not UNSET: @@ -236,6 +250,8 @@ def _parse_time_zone(data: object) -> None | str | Unset: time_zone = _parse_time_zone(d.pop("time_zone", UNSET)) + use_responders_time_zone = d.pop("use_responders_time_zone", UNSET) + def _parse_csv_file_url(data: object) -> None | str | Unset: if data is None: return data @@ -273,6 +289,7 @@ def _parse_xlsx_file_url(data: object) -> None | str | Unset: enabled_granular_time_breakdown=enabled_granular_time_breakdown, last_generated_at=last_generated_at, time_zone=time_zone, + use_responders_time_zone=use_responders_time_zone, csv_file_url=csv_file_url, xlsx_file_url=xlsx_file_url, ) diff --git a/rootly_sdk/models/on_call_pay_report_list.py b/rootly_sdk/models/on_call_pay_report_list.py index 57e63961..ad0784b9 100644 --- a/rootly_sdk/models/on_call_pay_report_list.py +++ b/rootly_sdk/models/on_call_pay_report_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_pay_report_list_data_item import OnCallPayReportListDataItem @@ -22,14 +28,21 @@ class OnCallPayReportList: data (list[OnCallPayReportListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[OnCallPayReportListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.on_call_pay_report_list_data_item import OnCallPayReportListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_pay_report_list_data_item import OnCallPayReportListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_pay_report_list = cls( data=data, links=links, meta=meta, + included=included, ) on_call_pay_report_list.additional_properties = d 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 index 19d63be2..a4dfebea 100644 --- a/rootly_sdk/models/on_call_pay_report_list_data_item.py +++ b/rootly_sdk/models/on_call_pay_report_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.on_call_pay_report_list_data_item_type import check_on_call_pay_report_list_data_item_type +from ..models.on_call_pay_report_list_data_item_type import OnCallPayReportListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.on_call_pay_report import OnCallPayReport @@ -33,6 +34,8 @@ class OnCallPayReportListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.on_call_pay_report import OnCallPayReport + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_pay_report_response.py b/rootly_sdk/models/on_call_pay_report_response.py index 28700909..b3feec3b 100644 --- a/rootly_sdk/models/on_call_pay_report_response.py +++ b/rootly_sdk/models/on_call_pay_report_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_pay_report_response_data import OnCallPayReportResponseData @@ -18,14 +24,26 @@ class OnCallPayReportResponse: """ Attributes: data (OnCallPayReportResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: OnCallPayReportResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.on_call_pay_report_response_data import OnCallPayReportResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_pay_report_response_data import OnCallPayReportResponseData d = dict(src_dict) data = OnCallPayReportResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_pay_report_response = cls( data=data, + included=included, ) on_call_pay_report_response.additional_properties = d diff --git a/rootly_sdk/models/on_call_pay_report_response_data.py b/rootly_sdk/models/on_call_pay_report_response_data.py index b783bdaa..770b6888 100644 --- a/rootly_sdk/models/on_call_pay_report_response_data.py +++ b/rootly_sdk/models/on_call_pay_report_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.on_call_pay_report_response_data_type import check_on_call_pay_report_response_data_type +from ..models.on_call_pay_report_response_data_type import OnCallPayReportResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.on_call_pay_report import OnCallPayReport @@ -33,6 +34,8 @@ class OnCallPayReportResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.on_call_pay_report import OnCallPayReport + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_role.py b/rootly_sdk/models/on_call_role.py index b948aaca..81487dc5 100644 --- a/rootly_sdk/models/on_call_role.py +++ b/rootly_sdk/models/on_call_role.py @@ -1,100 +1,76 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.on_call_role_alert_fields_permissions_item import ( - OnCallRoleAlertFieldsPermissionsItem, - check_on_call_role_alert_fields_permissions_item, -) -from ..models.on_call_role_alert_groups_permissions_item import ( - OnCallRoleAlertGroupsPermissionsItem, - check_on_call_role_alert_groups_permissions_item, -) +from ..types import UNSET, Unset + +from ..models.on_call_role_alert_fields_permissions_item import check_on_call_role_alert_fields_permissions_item +from ..models.on_call_role_alert_fields_permissions_item import OnCallRoleAlertFieldsPermissionsItem +from ..models.on_call_role_alert_groups_permissions_item import check_on_call_role_alert_groups_permissions_item +from ..models.on_call_role_alert_groups_permissions_item import OnCallRoleAlertGroupsPermissionsItem from ..models.on_call_role_alert_routing_rules_permissions_item import ( - OnCallRoleAlertRoutingRulesPermissionsItem, check_on_call_role_alert_routing_rules_permissions_item, ) -from ..models.on_call_role_alert_sources_permissions_item import ( - OnCallRoleAlertSourcesPermissionsItem, - check_on_call_role_alert_sources_permissions_item, -) -from ..models.on_call_role_alert_urgency_permissions_item import ( - OnCallRoleAlertUrgencyPermissionsItem, - check_on_call_role_alert_urgency_permissions_item, -) -from ..models.on_call_role_alerts_permissions_item import ( - OnCallRoleAlertsPermissionsItem, - check_on_call_role_alerts_permissions_item, -) -from ..models.on_call_role_api_keys_permissions_item import ( - OnCallRoleApiKeysPermissionsItem, - check_on_call_role_api_keys_permissions_item, -) -from ..models.on_call_role_audits_permissions_item import ( - OnCallRoleAuditsPermissionsItem, - check_on_call_role_audits_permissions_item, -) -from ..models.on_call_role_contacts_permissions_item import ( - OnCallRoleContactsPermissionsItem, - check_on_call_role_contacts_permissions_item, -) +from ..models.on_call_role_alert_routing_rules_permissions_item import OnCallRoleAlertRoutingRulesPermissionsItem +from ..models.on_call_role_alert_sources_permissions_item import check_on_call_role_alert_sources_permissions_item +from ..models.on_call_role_alert_sources_permissions_item import OnCallRoleAlertSourcesPermissionsItem +from ..models.on_call_role_alert_urgency_permissions_item import check_on_call_role_alert_urgency_permissions_item +from ..models.on_call_role_alert_urgency_permissions_item import OnCallRoleAlertUrgencyPermissionsItem +from ..models.on_call_role_alerts_permissions_item import check_on_call_role_alerts_permissions_item +from ..models.on_call_role_alerts_permissions_item import OnCallRoleAlertsPermissionsItem +from ..models.on_call_role_api_keys_permissions_item import check_on_call_role_api_keys_permissions_item +from ..models.on_call_role_api_keys_permissions_item import OnCallRoleApiKeysPermissionsItem +from ..models.on_call_role_audits_permissions_item import check_on_call_role_audits_permissions_item +from ..models.on_call_role_audits_permissions_item import OnCallRoleAuditsPermissionsItem +from ..models.on_call_role_catalogs_permissions_item import check_on_call_role_catalogs_permissions_item +from ..models.on_call_role_catalogs_permissions_item import OnCallRoleCatalogsPermissionsItem +from ..models.on_call_role_contacts_permissions_item import check_on_call_role_contacts_permissions_item +from ..models.on_call_role_contacts_permissions_item import OnCallRoleContactsPermissionsItem from ..models.on_call_role_escalation_policies_permissions_item import ( - OnCallRoleEscalationPoliciesPermissionsItem, check_on_call_role_escalation_policies_permissions_item, ) -from ..models.on_call_role_groups_permissions_item import ( - OnCallRoleGroupsPermissionsItem, - check_on_call_role_groups_permissions_item, -) -from ..models.on_call_role_heartbeats_permissions_item import ( - OnCallRoleHeartbeatsPermissionsItem, - check_on_call_role_heartbeats_permissions_item, -) -from ..models.on_call_role_integrations_permissions_item import ( - OnCallRoleIntegrationsPermissionsItem, - check_on_call_role_integrations_permissions_item, -) -from ..models.on_call_role_invitations_permissions_item import ( - OnCallRoleInvitationsPermissionsItem, - check_on_call_role_invitations_permissions_item, -) +from ..models.on_call_role_escalation_policies_permissions_item import OnCallRoleEscalationPoliciesPermissionsItem +from ..models.on_call_role_functionalities_permissions_item import check_on_call_role_functionalities_permissions_item +from ..models.on_call_role_functionalities_permissions_item import OnCallRoleFunctionalitiesPermissionsItem +from ..models.on_call_role_groups_permissions_item import check_on_call_role_groups_permissions_item +from ..models.on_call_role_groups_permissions_item import OnCallRoleGroupsPermissionsItem +from ..models.on_call_role_heartbeats_permissions_item import check_on_call_role_heartbeats_permissions_item +from ..models.on_call_role_heartbeats_permissions_item import OnCallRoleHeartbeatsPermissionsItem +from ..models.on_call_role_integrations_permissions_item import check_on_call_role_integrations_permissions_item +from ..models.on_call_role_integrations_permissions_item import OnCallRoleIntegrationsPermissionsItem +from ..models.on_call_role_invitations_permissions_item import check_on_call_role_invitations_permissions_item +from ..models.on_call_role_invitations_permissions_item import OnCallRoleInvitationsPermissionsItem from ..models.on_call_role_live_call_routing_permissions_item import ( - OnCallRoleLiveCallRoutingPermissionsItem, check_on_call_role_live_call_routing_permissions_item, ) +from ..models.on_call_role_live_call_routing_permissions_item import OnCallRoleLiveCallRoutingPermissionsItem from ..models.on_call_role_on_call_readiness_report_permissions_item import ( - OnCallRoleOnCallReadinessReportPermissionsItem, check_on_call_role_on_call_readiness_report_permissions_item, ) -from ..models.on_call_role_on_call_roles_permissions_item import ( - OnCallRoleOnCallRolesPermissionsItem, - check_on_call_role_on_call_roles_permissions_item, +from ..models.on_call_role_on_call_readiness_report_permissions_item import ( + OnCallRoleOnCallReadinessReportPermissionsItem, ) +from ..models.on_call_role_on_call_roles_permissions_item import check_on_call_role_on_call_roles_permissions_item +from ..models.on_call_role_on_call_roles_permissions_item import OnCallRoleOnCallRolesPermissionsItem from ..models.on_call_role_schedule_override_permissions_item import ( - OnCallRoleScheduleOverridePermissionsItem, check_on_call_role_schedule_override_permissions_item, ) -from ..models.on_call_role_schedules_permissions_item import ( - OnCallRoleSchedulesPermissionsItem, - check_on_call_role_schedules_permissions_item, -) -from ..models.on_call_role_services_permissions_item import ( - OnCallRoleServicesPermissionsItem, - check_on_call_role_services_permissions_item, -) -from ..models.on_call_role_webhooks_permissions_item import ( - OnCallRoleWebhooksPermissionsItem, - check_on_call_role_webhooks_permissions_item, -) -from ..models.on_call_role_workflows_permissions_item import ( - OnCallRoleWorkflowsPermissionsItem, - check_on_call_role_workflows_permissions_item, -) +from ..models.on_call_role_schedule_override_permissions_item import OnCallRoleScheduleOverridePermissionsItem +from ..models.on_call_role_schedules_permissions_item import check_on_call_role_schedules_permissions_item +from ..models.on_call_role_schedules_permissions_item import OnCallRoleSchedulesPermissionsItem +from ..models.on_call_role_services_permissions_item import check_on_call_role_services_permissions_item +from ..models.on_call_role_services_permissions_item import OnCallRoleServicesPermissionsItem +from ..models.on_call_role_webhooks_permissions_item import check_on_call_role_webhooks_permissions_item +from ..models.on_call_role_webhooks_permissions_item import OnCallRoleWebhooksPermissionsItem +from ..models.on_call_role_workflows_permissions_item import check_on_call_role_workflows_permissions_item +from ..models.on_call_role_workflows_permissions_item import OnCallRoleWorkflowsPermissionsItem from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="OnCallRole") @@ -128,8 +104,10 @@ class OnCallRole: schedule_override_permissions (list[OnCallRoleScheduleOverridePermissionsItem] | Unset): schedules_permissions (list[OnCallRoleSchedulesPermissionsItem] | Unset): services_permissions (list[OnCallRoleServicesPermissionsItem] | Unset): + functionalities_permissions (list[OnCallRoleFunctionalitiesPermissionsItem] | Unset): webhooks_permissions (list[OnCallRoleWebhooksPermissionsItem] | Unset): workflows_permissions (list[OnCallRoleWorkflowsPermissionsItem] | Unset): + catalogs_permissions (list[OnCallRoleCatalogsPermissionsItem] | Unset): """ name: str @@ -157,8 +135,10 @@ class OnCallRole: schedule_override_permissions: list[OnCallRoleScheduleOverridePermissionsItem] | Unset = UNSET schedules_permissions: list[OnCallRoleSchedulesPermissionsItem] | Unset = UNSET services_permissions: list[OnCallRoleServicesPermissionsItem] | Unset = UNSET + functionalities_permissions: list[OnCallRoleFunctionalitiesPermissionsItem] | Unset = UNSET webhooks_permissions: list[OnCallRoleWebhooksPermissionsItem] | Unset = UNSET workflows_permissions: list[OnCallRoleWorkflowsPermissionsItem] | Unset = UNSET + catalogs_permissions: list[OnCallRoleCatalogsPermissionsItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -312,6 +292,13 @@ def to_dict(self) -> dict[str, Any]: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) + 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) + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] @@ -326,6 +313,13 @@ def to_dict(self) -> dict[str, Any]: 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) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -379,10 +373,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["schedules_permissions"] = schedules_permissions if services_permissions is not UNSET: field_dict["services_permissions"] = services_permissions + if functionalities_permissions is not UNSET: + field_dict["functionalities_permissions"] = functionalities_permissions if webhooks_permissions is not UNSET: 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 return field_dict @@ -609,6 +607,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: services_permissions.append(services_permissions_item) + _functionalities_permissions = d.pop("functionalities_permissions", UNSET) + functionalities_permissions: list[OnCallRoleFunctionalitiesPermissionsItem] | Unset = UNSET + if _functionalities_permissions is not UNSET: + functionalities_permissions = [] + for functionalities_permissions_item_data in _functionalities_permissions: + functionalities_permissions_item = check_on_call_role_functionalities_permissions_item( + functionalities_permissions_item_data + ) + + functionalities_permissions.append(functionalities_permissions_item) + _webhooks_permissions = d.pop("webhooks_permissions", UNSET) webhooks_permissions: list[OnCallRoleWebhooksPermissionsItem] | Unset = UNSET if _webhooks_permissions is not UNSET: @@ -629,6 +638,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: workflows_permissions.append(workflows_permissions_item) + _catalogs_permissions = d.pop("catalogs_permissions", UNSET) + catalogs_permissions: list[OnCallRoleCatalogsPermissionsItem] | Unset = UNSET + if _catalogs_permissions is not UNSET: + catalogs_permissions = [] + for catalogs_permissions_item_data in _catalogs_permissions: + catalogs_permissions_item = check_on_call_role_catalogs_permissions_item(catalogs_permissions_item_data) + + catalogs_permissions.append(catalogs_permissions_item) + on_call_role = cls( name=name, created_at=created_at, @@ -655,8 +673,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_override_permissions=schedule_override_permissions, schedules_permissions=schedules_permissions, services_permissions=services_permissions, + functionalities_permissions=functionalities_permissions, webhooks_permissions=webhooks_permissions, workflows_permissions=workflows_permissions, + catalogs_permissions=catalogs_permissions, ) on_call_role.additional_properties = d diff --git a/rootly_sdk/models/on_call_role_catalogs_permissions_item.py b/rootly_sdk/models/on_call_role_catalogs_permissions_item.py new file mode 100644 index 00000000..bf74a60e --- /dev/null +++ b/rootly_sdk/models/on_call_role_catalogs_permissions_item.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +OnCallRoleCatalogsPermissionsItem = Literal["create", "delete", "read", "update"] + +ON_CALL_ROLE_CATALOGS_PERMISSIONS_ITEM_VALUES: set[OnCallRoleCatalogsPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_on_call_role_catalogs_permissions_item(value: str | None) -> OnCallRoleCatalogsPermissionsItem | None: + if value is None: + return None + if value in ON_CALL_ROLE_CATALOGS_PERMISSIONS_ITEM_VALUES: + return cast(OnCallRoleCatalogsPermissionsItem, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ON_CALL_ROLE_CATALOGS_PERMISSIONS_ITEM_VALUES!r}") diff --git a/rootly_sdk/models/on_call_role_functionalities_permissions_item.py b/rootly_sdk/models/on_call_role_functionalities_permissions_item.py new file mode 100644 index 00000000..851ab807 --- /dev/null +++ b/rootly_sdk/models/on_call_role_functionalities_permissions_item.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +OnCallRoleFunctionalitiesPermissionsItem = Literal["create", "delete", "read", "update"] + +ON_CALL_ROLE_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: set[OnCallRoleFunctionalitiesPermissionsItem] = { + "create", + "delete", + "read", + "update", +} + + +def check_on_call_role_functionalities_permissions_item( + value: str | None, +) -> OnCallRoleFunctionalitiesPermissionsItem | None: + if value is None: + return None + if value in ON_CALL_ROLE_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: + return cast(OnCallRoleFunctionalitiesPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ON_CALL_ROLE_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/on_call_role_list.py b/rootly_sdk/models/on_call_role_list.py index 18aeada7..85b1d4cd 100644 --- a/rootly_sdk/models/on_call_role_list.py +++ b/rootly_sdk/models/on_call_role_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_role_list_data_item import OnCallRoleListDataItem @@ -22,14 +28,21 @@ class OnCallRoleList: data (list[OnCallRoleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[OnCallRoleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.on_call_role_list_data_item import OnCallRoleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_role_list_data_item import OnCallRoleListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_role_list = cls( data=data, links=links, meta=meta, + included=included, ) on_call_role_list.additional_properties = d 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 bd50500c..ea8bc573 100644 --- a/rootly_sdk/models/on_call_role_list_data_item.py +++ b/rootly_sdk/models/on_call_role_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.on_call_role_list_data_item_type import OnCallRoleListDataItemType, check_on_call_role_list_data_item_type +from ..types import UNSET, Unset + +from ..models.on_call_role_list_data_item_type import check_on_call_role_list_data_item_type +from ..models.on_call_role_list_data_item_type import OnCallRoleListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.on_call_role import OnCallRole @@ -30,6 +34,8 @@ class OnCallRoleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.on_call_role import OnCallRole + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_role_relationship.py b/rootly_sdk/models/on_call_role_relationship.py index b1385f6f..b712edfb 100644 --- a/rootly_sdk/models/on_call_role_relationship.py +++ b/rootly_sdk/models/on_call_role_relationship.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.on_call_role_relationship_data_type_0 import OnCallRoleRelationshipDataType0 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 20a1e8a6..51181c88 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,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.on_call_role_relationship_data_type_0_type import ( - OnCallRoleRelationshipDataType0Type, - check_on_call_role_relationship_data_type_0_type, -) from ..types import UNSET, Unset +from ..models.on_call_role_relationship_data_type_0_type import check_on_call_role_relationship_data_type_0_type +from ..models.on_call_role_relationship_data_type_0_type import OnCallRoleRelationshipDataType0Type +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="OnCallRoleRelationshipDataType0") diff --git a/rootly_sdk/models/on_call_role_response.py b/rootly_sdk/models/on_call_role_response.py index b574095c..6ff08084 100644 --- a/rootly_sdk/models/on_call_role_response.py +++ b/rootly_sdk/models/on_call_role_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_role_response_data import OnCallRoleResponseData @@ -18,14 +24,26 @@ class OnCallRoleResponse: """ Attributes: data (OnCallRoleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: OnCallRoleResponseData + included: list[JsonapiIncludedResource] | 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_response_data import OnCallRoleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_role_response_data import OnCallRoleResponseData d = dict(src_dict) data = OnCallRoleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_role_response = cls( data=data, + included=included, ) on_call_role_response.additional_properties = d diff --git a/rootly_sdk/models/on_call_role_response_data.py b/rootly_sdk/models/on_call_role_response_data.py index 2a33ab10..ef5af7fe 100644 --- a/rootly_sdk/models/on_call_role_response_data.py +++ b/rootly_sdk/models/on_call_role_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.on_call_role_response_data_type import OnCallRoleResponseDataType, check_on_call_role_response_data_type +from ..types import UNSET, Unset + +from ..models.on_call_role_response_data_type import check_on_call_role_response_data_type +from ..models.on_call_role_response_data_type import OnCallRoleResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.on_call_role import OnCallRole @@ -30,6 +34,8 @@ class OnCallRoleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.on_call_role import OnCallRole + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_shadow.py b/rootly_sdk/models/on_call_shadow.py index c04b4ed3..e78a3a8d 100644 --- a/rootly_sdk/models/on_call_shadow.py +++ b/rootly_sdk/models/on_call_shadow.py @@ -1,16 +1,21 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from dateutil.parser import isoparse -from ..models.on_call_shadow_shadowable_type import OnCallShadowShadowableType, check_on_call_shadow_shadowable_type from ..types import UNSET, Unset +from ..models.on_call_shadow_shadowable_type import check_on_call_shadow_shadowable_type +from ..models.on_call_shadow_shadowable_type import OnCallShadowShadowableType +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + + T = TypeVar("T", bound="OnCallShadow") diff --git a/rootly_sdk/models/on_call_shadow_response.py b/rootly_sdk/models/on_call_shadow_response.py index 1aff7e81..beb76314 100644 --- a/rootly_sdk/models/on_call_shadow_response.py +++ b/rootly_sdk/models/on_call_shadow_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_shadow_response_data import OnCallShadowResponseData @@ -18,14 +24,26 @@ class OnCallShadowResponse: """ Attributes: data (OnCallShadowResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: OnCallShadowResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.on_call_shadow_response_data import OnCallShadowResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_shadow_response_data import OnCallShadowResponseData d = dict(src_dict) data = OnCallShadowResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_shadow_response = cls( data=data, + included=included, ) on_call_shadow_response.additional_properties = d diff --git a/rootly_sdk/models/on_call_shadow_response_data.py b/rootly_sdk/models/on_call_shadow_response_data.py index 021f310f..517c9ac8 100644 --- a/rootly_sdk/models/on_call_shadow_response_data.py +++ b/rootly_sdk/models/on_call_shadow_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.on_call_shadow_response_data_type import ( - OnCallShadowResponseDataType, - check_on_call_shadow_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.on_call_shadow_response_data_type import check_on_call_shadow_response_data_type +from ..models.on_call_shadow_response_data_type import OnCallShadowResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.on_call_shadow import OnCallShadow @@ -33,6 +34,8 @@ class OnCallShadowResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.on_call_shadow import OnCallShadow + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/on_call_shadows_list.py b/rootly_sdk/models/on_call_shadows_list.py index 1a0e65b1..373bd52a 100644 --- a/rootly_sdk/models/on_call_shadows_list.py +++ b/rootly_sdk/models/on_call_shadows_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_shadows_list_data_item import OnCallShadowsListDataItem @@ -22,14 +28,21 @@ class OnCallShadowsList: data (list[OnCallShadowsListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[OnCallShadowsListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.on_call_shadows_list_data_item import OnCallShadowsListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.on_call_shadows_list_data_item import OnCallShadowsListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + on_call_shadows_list = cls( data=data, links=links, meta=meta, + included=included, ) on_call_shadows_list.additional_properties = d 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 5709fc25..50b0efd1 100644 --- a/rootly_sdk/models/on_call_shadows_list_data_item.py +++ b/rootly_sdk/models/on_call_shadows_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.on_call_shadows_list_data_item_type import ( - OnCallShadowsListDataItemType, - check_on_call_shadows_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.on_call_shadows_list_data_item_type import check_on_call_shadows_list_data_item_type +from ..models.on_call_shadows_list_data_item_type import OnCallShadowsListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.on_call_shadow import OnCallShadow @@ -33,6 +34,8 @@ class OnCallShadowsListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.on_call_shadow import OnCallShadow + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/oncall.py b/rootly_sdk/models/oncall.py new file mode 100644 index 00000000..2a09bceb --- /dev/null +++ b/rootly_sdk/models/oncall.py @@ -0,0 +1,228 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.oncall_notification_type import check_oncall_notification_type +from ..models.oncall_notification_type import OncallNotificationType +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + + +T = TypeVar("T", bound="Oncall") + + +@_attrs_define +class Oncall: + """ + Attributes: + escalation_policy_id (str): ID of the escalation policy + escalation_policy_name (str): Name of the escalation policy + user_id (int): ID of the on-call user + starts_at (datetime.datetime): Start datetime of the on-call shift + ends_at (datetime.datetime): End datetime of the on-call shift + escalation_policy_path_id (None | str | Unset): ID of the escalation policy path + escalation_policy_path_name (None | str | Unset): Name of the escalation policy path + notification_type (OncallNotificationType | Unset): Notification type of the escalation path (audible or quiet) + is_default_path (bool | None | Unset): Whether this is the default escalation path + escalation_level (int | Unset): Level within the escalation policy + schedule_id (None | str | Unset): ID of the schedule + schedule_name (None | str | Unset): Name of the schedule + """ + + escalation_policy_id: str + escalation_policy_name: str + user_id: int + starts_at: datetime.datetime + ends_at: datetime.datetime + escalation_policy_path_id: None | str | Unset = UNSET + escalation_policy_path_name: None | str | Unset = UNSET + notification_type: OncallNotificationType | Unset = UNSET + is_default_path: bool | None | Unset = UNSET + escalation_level: int | Unset = UNSET + schedule_id: None | str | Unset = UNSET + schedule_name: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + escalation_policy_id = self.escalation_policy_id + + escalation_policy_name = self.escalation_policy_name + + user_id = self.user_id + + starts_at = self.starts_at.isoformat() + + ends_at = self.ends_at.isoformat() + + 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 + + escalation_policy_path_name: None | str | Unset + if isinstance(self.escalation_policy_path_name, Unset): + escalation_policy_path_name = UNSET + else: + escalation_policy_path_name = self.escalation_policy_path_name + + notification_type: str | Unset = UNSET + if not isinstance(self.notification_type, Unset): + notification_type = self.notification_type + + is_default_path: bool | None | Unset + if isinstance(self.is_default_path, Unset): + is_default_path = UNSET + else: + is_default_path = self.is_default_path + + escalation_level = self.escalation_level + + schedule_id: None | str | Unset + if isinstance(self.schedule_id, Unset): + schedule_id = UNSET + else: + schedule_id = self.schedule_id + + schedule_name: None | str | Unset + if isinstance(self.schedule_name, Unset): + schedule_name = UNSET + else: + schedule_name = self.schedule_name + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "escalation_policy_id": escalation_policy_id, + "escalation_policy_name": escalation_policy_name, + "user_id": user_id, + "starts_at": starts_at, + "ends_at": ends_at, + } + ) + if escalation_policy_path_id is not UNSET: + field_dict["escalation_policy_path_id"] = escalation_policy_path_id + if escalation_policy_path_name is not UNSET: + field_dict["escalation_policy_path_name"] = escalation_policy_path_name + if notification_type is not UNSET: + field_dict["notification_type"] = notification_type + if is_default_path is not UNSET: + field_dict["is_default_path"] = is_default_path + if escalation_level is not UNSET: + field_dict["escalation_level"] = escalation_level + if schedule_id is not UNSET: + field_dict["schedule_id"] = schedule_id + if schedule_name is not UNSET: + field_dict["schedule_name"] = schedule_name + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + escalation_policy_id = d.pop("escalation_policy_id") + + escalation_policy_name = d.pop("escalation_policy_name") + + user_id = d.pop("user_id") + + starts_at = isoparse(d.pop("starts_at")) + + ends_at = isoparse(d.pop("ends_at")) + + 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 | str | Unset, data) + + escalation_policy_path_id = _parse_escalation_policy_path_id(d.pop("escalation_policy_path_id", UNSET)) + + def _parse_escalation_policy_path_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + escalation_policy_path_name = _parse_escalation_policy_path_name(d.pop("escalation_policy_path_name", UNSET)) + + _notification_type = d.pop("notification_type", UNSET) + notification_type: OncallNotificationType | Unset + if isinstance(_notification_type, Unset): + notification_type = UNSET + else: + notification_type = check_oncall_notification_type(_notification_type) + + def _parse_is_default_path(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + is_default_path = _parse_is_default_path(d.pop("is_default_path", UNSET)) + + escalation_level = d.pop("escalation_level", UNSET) + + def _parse_schedule_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + schedule_id = _parse_schedule_id(d.pop("schedule_id", UNSET)) + + def _parse_schedule_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + schedule_name = _parse_schedule_name(d.pop("schedule_name", UNSET)) + + oncall = cls( + escalation_policy_id=escalation_policy_id, + escalation_policy_name=escalation_policy_name, + user_id=user_id, + starts_at=starts_at, + ends_at=ends_at, + escalation_policy_path_id=escalation_policy_path_id, + escalation_policy_path_name=escalation_policy_path_name, + notification_type=notification_type, + is_default_path=is_default_path, + escalation_level=escalation_level, + schedule_id=schedule_id, + schedule_name=schedule_name, + ) + + oncall.additional_properties = d + return oncall + + @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/oncall_list.py b/rootly_sdk/models/oncall_list.py new file mode 100644 index 00000000..edc881f2 --- /dev/null +++ b/rootly_sdk/models/oncall_list.py @@ -0,0 +1,106 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.oncall_list_data_item import OncallListDataItem + + +T = TypeVar("T", bound="OncallList") + + +@_attrs_define +class OncallList: + """ + Attributes: + data (list[OncallListDataItem]): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: list[OncallListDataItem] + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.oncall_list_data_item import OncallListDataItem + + data = [] + for data_item_data in self.data: + data_item = data_item_data.to_dict() + data.append(data_item) + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.oncall_list_data_item import OncallListDataItem + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = OncallListDataItem.from_dict(data_item_data) + + data.append(data_item) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + oncall_list = cls( + data=data, + included=included, + ) + + oncall_list.additional_properties = d + return oncall_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/oncall_list_data_item.py b/rootly_sdk/models/oncall_list_data_item.py new file mode 100644 index 00000000..7a122904 --- /dev/null +++ b/rootly_sdk/models/oncall_list_data_item.py @@ -0,0 +1,111 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.oncall_list_data_item_type import check_oncall_list_data_item_type +from ..models.oncall_list_data_item_type import OncallListDataItemType +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.oncall import Oncall + from ..models.oncall_relationships import OncallRelationships + + +T = TypeVar("T", bound="OncallListDataItem") + + +@_attrs_define +class OncallListDataItem: + """ + Attributes: + id (str): Unique ID of the on-call entry + type_ (OncallListDataItemType): + attributes (Oncall): + relationships (OncallRelationships | Unset): + """ + + id: str + type_: OncallListDataItemType + attributes: Oncall + relationships: OncallRelationships | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.oncall_relationships import OncallRelationships + from ..models.oncall import Oncall + + id = self.id + + type_: str = self.type_ + + attributes = self.attributes.to_dict() + + relationships: dict[str, Any] | Unset = UNSET + if not isinstance(self.relationships, Unset): + relationships = self.relationships.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "id": id, + "type": type_, + "attributes": attributes, + } + ) + if relationships is not UNSET: + field_dict["relationships"] = relationships + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.oncall import Oncall + from ..models.oncall_relationships import OncallRelationships + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_oncall_list_data_item_type(d.pop("type")) + + attributes = Oncall.from_dict(d.pop("attributes")) + + _relationships = d.pop("relationships", UNSET) + relationships: OncallRelationships | Unset + if isinstance(_relationships, Unset): + relationships = UNSET + else: + relationships = OncallRelationships.from_dict(_relationships) + + oncall_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + relationships=relationships, + ) + + oncall_list_data_item.additional_properties = d + return oncall_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/oncall_list_data_item_type.py b/rootly_sdk/models/oncall_list_data_item_type.py new file mode 100644 index 00000000..f95be48a --- /dev/null +++ b/rootly_sdk/models/oncall_list_data_item_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +OncallListDataItemType = Literal["on_call_resources"] + +ONCALL_LIST_DATA_ITEM_TYPE_VALUES: set[OncallListDataItemType] = { + "on_call_resources", +} + + +def check_oncall_list_data_item_type(value: str | None) -> OncallListDataItemType | None: + if value is None: + return None + if value in ONCALL_LIST_DATA_ITEM_TYPE_VALUES: + return cast(OncallListDataItemType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ONCALL_LIST_DATA_ITEM_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/oncall_notification_type.py b/rootly_sdk/models/oncall_notification_type.py new file mode 100644 index 00000000..7795813b --- /dev/null +++ b/rootly_sdk/models/oncall_notification_type.py @@ -0,0 +1,16 @@ +from typing import Literal, cast + +OncallNotificationType = Literal["audible", "quiet"] + +ONCALL_NOTIFICATION_TYPE_VALUES: set[OncallNotificationType] = { + "audible", + "quiet", +} + + +def check_oncall_notification_type(value: str | None) -> OncallNotificationType | None: + if value is None: + return None + if value in ONCALL_NOTIFICATION_TYPE_VALUES: + return cast(OncallNotificationType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {ONCALL_NOTIFICATION_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/oncall_relationships.py b/rootly_sdk/models/oncall_relationships.py new file mode 100644 index 00000000..d61c947a --- /dev/null +++ b/rootly_sdk/models/oncall_relationships.py @@ -0,0 +1,117 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.oncall_relationships_escalation_policy import OncallRelationshipsEscalationPolicy + from ..models.oncall_relationships_schedule import OncallRelationshipsSchedule + from ..models.oncall_relationships_user import OncallRelationshipsUser + + +T = TypeVar("T", bound="OncallRelationships") + + +@_attrs_define +class OncallRelationships: + """ + Attributes: + user (OncallRelationshipsUser | Unset): + schedule (OncallRelationshipsSchedule | Unset): + escalation_policy (OncallRelationshipsEscalationPolicy | Unset): + """ + + user: OncallRelationshipsUser | Unset = UNSET + schedule: OncallRelationshipsSchedule | Unset = UNSET + escalation_policy: OncallRelationshipsEscalationPolicy | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.oncall_relationships_escalation_policy import OncallRelationshipsEscalationPolicy + from ..models.oncall_relationships_schedule import OncallRelationshipsSchedule + from ..models.oncall_relationships_user import OncallRelationshipsUser + + user: dict[str, Any] | Unset = UNSET + if not isinstance(self.user, Unset): + user = self.user.to_dict() + + schedule: dict[str, Any] | Unset = UNSET + if not isinstance(self.schedule, Unset): + schedule = self.schedule.to_dict() + + escalation_policy: dict[str, Any] | Unset = UNSET + if not isinstance(self.escalation_policy, Unset): + escalation_policy = self.escalation_policy.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if user is not UNSET: + field_dict["user"] = user + if schedule is not UNSET: + field_dict["schedule"] = schedule + if escalation_policy is not UNSET: + field_dict["escalation_policy"] = escalation_policy + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.oncall_relationships_escalation_policy import OncallRelationshipsEscalationPolicy + from ..models.oncall_relationships_schedule import OncallRelationshipsSchedule + from ..models.oncall_relationships_user import OncallRelationshipsUser + + d = dict(src_dict) + _user = d.pop("user", UNSET) + user: OncallRelationshipsUser | Unset + if isinstance(_user, Unset): + user = UNSET + else: + user = OncallRelationshipsUser.from_dict(_user) + + _schedule = d.pop("schedule", UNSET) + schedule: OncallRelationshipsSchedule | Unset + if isinstance(_schedule, Unset): + schedule = UNSET + else: + schedule = OncallRelationshipsSchedule.from_dict(_schedule) + + _escalation_policy = d.pop("escalation_policy", UNSET) + escalation_policy: OncallRelationshipsEscalationPolicy | Unset + if isinstance(_escalation_policy, Unset): + escalation_policy = UNSET + else: + escalation_policy = OncallRelationshipsEscalationPolicy.from_dict(_escalation_policy) + + oncall_relationships = cls( + user=user, + schedule=schedule, + escalation_policy=escalation_policy, + ) + + oncall_relationships.additional_properties = d + return oncall_relationships + + @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/oncall_relationships_escalation_policy.py b/rootly_sdk/models/oncall_relationships_escalation_policy.py new file mode 100644 index 00000000..87b8a802 --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_escalation_policy.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.oncall_relationships_escalation_policy_data_type_0 import OncallRelationshipsEscalationPolicyDataType0 + + +T = TypeVar("T", bound="OncallRelationshipsEscalationPolicy") + + +@_attrs_define +class OncallRelationshipsEscalationPolicy: + """ + Attributes: + data (None | OncallRelationshipsEscalationPolicyDataType0 | Unset): + """ + + data: None | OncallRelationshipsEscalationPolicyDataType0 | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.oncall_relationships_escalation_policy_data_type_0 import ( + OncallRelationshipsEscalationPolicyDataType0, + ) + + data: dict[str, Any] | None | Unset + if isinstance(self.data, Unset): + data = UNSET + elif isinstance(self.data, OncallRelationshipsEscalationPolicyDataType0): + data = self.data.to_dict() + else: + data = self.data + + 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.oncall_relationships_escalation_policy_data_type_0 import ( + OncallRelationshipsEscalationPolicyDataType0, + ) + + d = dict(src_dict) + + def _parse_data(data: object) -> None | OncallRelationshipsEscalationPolicyDataType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + data_type_0 = OncallRelationshipsEscalationPolicyDataType0.from_dict(data) + + return data_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | OncallRelationshipsEscalationPolicyDataType0 | Unset, data) + + data = _parse_data(d.pop("data", UNSET)) + + oncall_relationships_escalation_policy = cls( + data=data, + ) + + oncall_relationships_escalation_policy.additional_properties = d + return oncall_relationships_escalation_policy + + @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/oncall_relationships_escalation_policy_data_type_0.py b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py new file mode 100644 index 00000000..0363ab4a --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.oncall_relationships_escalation_policy_data_type_0_type import ( + check_oncall_relationships_escalation_policy_data_type_0_type, +) +from ..models.oncall_relationships_escalation_policy_data_type_0_type import ( + OncallRelationshipsEscalationPolicyDataType0Type, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="OncallRelationshipsEscalationPolicyDataType0") + + +@_attrs_define +class OncallRelationshipsEscalationPolicyDataType0: + """ + Attributes: + id (str | Unset): + type_ (OncallRelationshipsEscalationPolicyDataType0Type | Unset): + """ + + id: str | Unset = UNSET + type_: OncallRelationshipsEscalationPolicyDataType0Type | 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_: OncallRelationshipsEscalationPolicyDataType0Type | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_oncall_relationships_escalation_policy_data_type_0_type(_type_) + + oncall_relationships_escalation_policy_data_type_0 = cls( + id=id, + type_=type_, + ) + + oncall_relationships_escalation_policy_data_type_0.additional_properties = d + return oncall_relationships_escalation_policy_data_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/oncall_relationships_escalation_policy_data_type_0_type.py b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0_type.py new file mode 100644 index 00000000..1ccacf6c --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +OncallRelationshipsEscalationPolicyDataType0Type = Literal["escalation_policies"] + +ONCALL_RELATIONSHIPS_ESCALATION_POLICY_DATA_TYPE_0_TYPE_VALUES: set[ + OncallRelationshipsEscalationPolicyDataType0Type +] = { + "escalation_policies", +} + + +def check_oncall_relationships_escalation_policy_data_type_0_type( + value: str | None, +) -> OncallRelationshipsEscalationPolicyDataType0Type | None: + if value is None: + return None + if value in ONCALL_RELATIONSHIPS_ESCALATION_POLICY_DATA_TYPE_0_TYPE_VALUES: + return cast(OncallRelationshipsEscalationPolicyDataType0Type, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ONCALL_RELATIONSHIPS_ESCALATION_POLICY_DATA_TYPE_0_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/oncall_relationships_schedule.py b/rootly_sdk/models/oncall_relationships_schedule.py new file mode 100644 index 00000000..eaa0a3cf --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_schedule.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.oncall_relationships_schedule_data_type_0 import OncallRelationshipsScheduleDataType0 + + +T = TypeVar("T", bound="OncallRelationshipsSchedule") + + +@_attrs_define +class OncallRelationshipsSchedule: + """ + Attributes: + data (None | OncallRelationshipsScheduleDataType0 | Unset): + """ + + data: None | OncallRelationshipsScheduleDataType0 | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.oncall_relationships_schedule_data_type_0 import OncallRelationshipsScheduleDataType0 + + data: dict[str, Any] | None | Unset + if isinstance(self.data, Unset): + data = UNSET + elif isinstance(self.data, OncallRelationshipsScheduleDataType0): + data = self.data.to_dict() + else: + data = self.data + + 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.oncall_relationships_schedule_data_type_0 import OncallRelationshipsScheduleDataType0 + + d = dict(src_dict) + + def _parse_data(data: object) -> None | OncallRelationshipsScheduleDataType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + data_type_0 = OncallRelationshipsScheduleDataType0.from_dict(data) + + return data_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | OncallRelationshipsScheduleDataType0 | Unset, data) + + data = _parse_data(d.pop("data", UNSET)) + + oncall_relationships_schedule = cls( + data=data, + ) + + oncall_relationships_schedule.additional_properties = d + return oncall_relationships_schedule + + @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/oncall_relationships_schedule_data_type_0.py b/rootly_sdk/models/oncall_relationships_schedule_data_type_0.py new file mode 100644 index 00000000..b37f924b --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_schedule_data_type_0.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.oncall_relationships_schedule_data_type_0_type import check_oncall_relationships_schedule_data_type_0_type +from ..models.oncall_relationships_schedule_data_type_0_type import OncallRelationshipsScheduleDataType0Type +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="OncallRelationshipsScheduleDataType0") + + +@_attrs_define +class OncallRelationshipsScheduleDataType0: + """ + Attributes: + id (str | Unset): + type_ (OncallRelationshipsScheduleDataType0Type | Unset): + """ + + id: str | Unset = UNSET + type_: OncallRelationshipsScheduleDataType0Type | 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_: OncallRelationshipsScheduleDataType0Type | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_oncall_relationships_schedule_data_type_0_type(_type_) + + oncall_relationships_schedule_data_type_0 = cls( + id=id, + type_=type_, + ) + + oncall_relationships_schedule_data_type_0.additional_properties = d + return oncall_relationships_schedule_data_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/oncall_relationships_schedule_data_type_0_type.py b/rootly_sdk/models/oncall_relationships_schedule_data_type_0_type.py new file mode 100644 index 00000000..16aec7b8 --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_schedule_data_type_0_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +OncallRelationshipsScheduleDataType0Type = Literal["schedules"] + +ONCALL_RELATIONSHIPS_SCHEDULE_DATA_TYPE_0_TYPE_VALUES: set[OncallRelationshipsScheduleDataType0Type] = { + "schedules", +} + + +def check_oncall_relationships_schedule_data_type_0_type( + value: str | None, +) -> OncallRelationshipsScheduleDataType0Type | None: + if value is None: + return None + if value in ONCALL_RELATIONSHIPS_SCHEDULE_DATA_TYPE_0_TYPE_VALUES: + return cast(OncallRelationshipsScheduleDataType0Type, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ONCALL_RELATIONSHIPS_SCHEDULE_DATA_TYPE_0_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/oncall_relationships_user.py b/rootly_sdk/models/oncall_relationships_user.py new file mode 100644 index 00000000..cdbd6f45 --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_user.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.oncall_relationships_user_data_type_0 import OncallRelationshipsUserDataType0 + + +T = TypeVar("T", bound="OncallRelationshipsUser") + + +@_attrs_define +class OncallRelationshipsUser: + """ + Attributes: + data (None | OncallRelationshipsUserDataType0 | Unset): + """ + + data: None | OncallRelationshipsUserDataType0 | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.oncall_relationships_user_data_type_0 import OncallRelationshipsUserDataType0 + + data: dict[str, Any] | None | Unset + if isinstance(self.data, Unset): + data = UNSET + elif isinstance(self.data, OncallRelationshipsUserDataType0): + data = self.data.to_dict() + else: + data = self.data + + 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.oncall_relationships_user_data_type_0 import OncallRelationshipsUserDataType0 + + d = dict(src_dict) + + def _parse_data(data: object) -> None | OncallRelationshipsUserDataType0 | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, dict): + raise TypeError() + data_type_0 = OncallRelationshipsUserDataType0.from_dict(data) + + return data_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(None | OncallRelationshipsUserDataType0 | Unset, data) + + data = _parse_data(d.pop("data", UNSET)) + + oncall_relationships_user = cls( + data=data, + ) + + oncall_relationships_user.additional_properties = d + return oncall_relationships_user + + @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/oncall_relationships_user_data_type_0.py b/rootly_sdk/models/oncall_relationships_user_data_type_0.py new file mode 100644 index 00000000..efbe81a8 --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_user_data_type_0.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.oncall_relationships_user_data_type_0_type import check_oncall_relationships_user_data_type_0_type +from ..models.oncall_relationships_user_data_type_0_type import OncallRelationshipsUserDataType0Type +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="OncallRelationshipsUserDataType0") + + +@_attrs_define +class OncallRelationshipsUserDataType0: + """ + Attributes: + id (str | Unset): + type_ (OncallRelationshipsUserDataType0Type | Unset): + """ + + id: str | Unset = UNSET + type_: OncallRelationshipsUserDataType0Type | 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_: OncallRelationshipsUserDataType0Type | Unset + if isinstance(_type_, Unset): + type_ = UNSET + else: + type_ = check_oncall_relationships_user_data_type_0_type(_type_) + + oncall_relationships_user_data_type_0 = cls( + id=id, + type_=type_, + ) + + oncall_relationships_user_data_type_0.additional_properties = d + return oncall_relationships_user_data_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/oncall_relationships_user_data_type_0_type.py b/rootly_sdk/models/oncall_relationships_user_data_type_0_type.py new file mode 100644 index 00000000..12ea76ea --- /dev/null +++ b/rootly_sdk/models/oncall_relationships_user_data_type_0_type.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +OncallRelationshipsUserDataType0Type = Literal["users"] + +ONCALL_RELATIONSHIPS_USER_DATA_TYPE_0_TYPE_VALUES: set[OncallRelationshipsUserDataType0Type] = { + "users", +} + + +def check_oncall_relationships_user_data_type_0_type(value: str | None) -> OncallRelationshipsUserDataType0Type | None: + if value is None: + return None + if value in ONCALL_RELATIONSHIPS_USER_DATA_TYPE_0_TYPE_VALUES: + return cast(OncallRelationshipsUserDataType0Type, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {ONCALL_RELATIONSHIPS_USER_DATA_TYPE_0_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/override_shift.py b/rootly_sdk/models/override_shift.py index 5e3e9dd1..e95e29a8 100644 --- a/rootly_sdk/models/override_shift.py +++ b/rootly_sdk/models/override_shift.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.shift_override_response import ShiftOverrideResponse from ..models.user_response import UserResponse @@ -45,6 +48,9 @@ class OverrideShift: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_response import UserResponse + from ..models.shift_override_response import ShiftOverrideResponse + schedule_id = self.schedule_id rotation_id: None | str diff --git a/rootly_sdk/models/override_shift_list.py b/rootly_sdk/models/override_shift_list.py index 70a96a4b..77ac1206 100644 --- a/rootly_sdk/models/override_shift_list.py +++ b/rootly_sdk/models/override_shift_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.override_shift_list_data_item import OverrideShiftListDataItem @@ -22,14 +28,21 @@ class OverrideShiftList: data (list[OverrideShiftListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[OverrideShiftListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.links import Links + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.override_shift_list_data_item import OverrideShiftListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.override_shift_list_data_item import OverrideShiftListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + override_shift_list = cls( data=data, links=links, meta=meta, + included=included, ) override_shift_list.additional_properties = d diff --git a/rootly_sdk/models/override_shift_list_data_item.py b/rootly_sdk/models/override_shift_list_data_item.py index 512ffce1..93a7f501 100644 --- a/rootly_sdk/models/override_shift_list_data_item.py +++ b/rootly_sdk/models/override_shift_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.override_shift_list_data_item_type import ( - OverrideShiftListDataItemType, - check_override_shift_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.override_shift_list_data_item_type import check_override_shift_list_data_item_type +from ..models.override_shift_list_data_item_type import OverrideShiftListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.override_shift import OverrideShift @@ -33,6 +34,8 @@ class OverrideShiftListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.override_shift import OverrideShift + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/override_shift_response.py b/rootly_sdk/models/override_shift_response.py index e216bac1..0c7753a6 100644 --- a/rootly_sdk/models/override_shift_response.py +++ b/rootly_sdk/models/override_shift_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.override_shift_response_data import OverrideShiftResponseData @@ -18,14 +24,26 @@ class OverrideShiftResponse: """ Attributes: data (OverrideShiftResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: OverrideShiftResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.override_shift_response_data import OverrideShiftResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.override_shift_response_data import OverrideShiftResponseData d = dict(src_dict) data = OverrideShiftResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + override_shift_response = cls( data=data, + included=included, ) override_shift_response.additional_properties = d diff --git a/rootly_sdk/models/override_shift_response_data.py b/rootly_sdk/models/override_shift_response_data.py index ee954420..cff7afbe 100644 --- a/rootly_sdk/models/override_shift_response_data.py +++ b/rootly_sdk/models/override_shift_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.override_shift_response_data_type import ( - OverrideShiftResponseDataType, - check_override_shift_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.override_shift_response_data_type import check_override_shift_response_data_type +from ..models.override_shift_response_data_type import OverrideShiftResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.override_shift import OverrideShift @@ -33,6 +34,8 @@ class OverrideShiftResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.override_shift import OverrideShift + id = self.id type_: str = self.type_ 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 index 23fc21d3..4b463b6d 100644 --- a/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py +++ b/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py @@ -1,20 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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_priority import PageJsmopsOnCallRespondersTaskParamsPriority from ..models.page_jsmops_on_call_responders_task_params_task_type import ( - PageJsmopsOnCallRespondersTaskParamsTaskType, check_page_jsmops_on_call_responders_task_params_task_type, ) +from ..models.page_jsmops_on_call_responders_task_params_task_type import PageJsmopsOnCallRespondersTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.page_jsmops_on_call_responders_task_params_teams_item import ( @@ -52,6 +55,13 @@ class PageJsmopsOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + 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, + ) + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type 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 index 9dee4774..b44eb7f3 100644 --- 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 @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PageJsmopsOnCallRespondersTaskParamsTeamsItem") 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 index 24aa7ba3..eb7a9677 100644 --- 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 @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PageJsmopsOnCallRespondersTaskParamsUsersItem") 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 635e4069..e93bcf95 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,20 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.page_opsgenie_on_call_responders_task_params_priority import ( - PageOpsgenieOnCallRespondersTaskParamsPriority, check_page_opsgenie_on_call_responders_task_params_priority, ) +from ..models.page_opsgenie_on_call_responders_task_params_priority import ( + PageOpsgenieOnCallRespondersTaskParamsPriority, +) from ..models.page_opsgenie_on_call_responders_task_params_task_type import ( - PageOpsgenieOnCallRespondersTaskParamsTaskType, check_page_opsgenie_on_call_responders_task_params_task_type, ) +from ..models.page_opsgenie_on_call_responders_task_params_task_type import ( + PageOpsgenieOnCallRespondersTaskParamsTaskType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.page_opsgenie_on_call_responders_task_params_teams_item import ( @@ -52,6 +59,13 @@ class PageOpsgenieOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.page_opsgenie_on_call_responders_task_params_users_item import ( + PageOpsgenieOnCallRespondersTaskParamsUsersItem, + ) + from ..models.page_opsgenie_on_call_responders_task_params_teams_item import ( + PageOpsgenieOnCallRespondersTaskParamsTeamsItem, + ) + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type 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 50c3593a..1af810e1 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PageOpsgenieOnCallRespondersTaskParamsTeamsItem") 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 9c55df3e..c865ec58 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PageOpsgenieOnCallRespondersTaskParamsUsersItem") 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 07ecfd04..a3c17f2e 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,20 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.page_pagerduty_on_call_responders_task_params_task_type import ( - PagePagerdutyOnCallRespondersTaskParamsTaskType, check_page_pagerduty_on_call_responders_task_params_task_type, ) +from ..models.page_pagerduty_on_call_responders_task_params_task_type import ( + PagePagerdutyOnCallRespondersTaskParamsTaskType, +) from ..models.page_pagerduty_on_call_responders_task_params_urgency import ( - PagePagerdutyOnCallRespondersTaskParamsUrgency, check_page_pagerduty_on_call_responders_task_params_urgency, ) +from ..models.page_pagerduty_on_call_responders_task_params_urgency import ( + PagePagerdutyOnCallRespondersTaskParamsUrgency, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.page_pagerduty_on_call_responders_task_params_escalation_policies_item import ( @@ -62,6 +69,16 @@ class PagePagerdutyOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.page_pagerduty_on_call_responders_task_params_escalation_policies_item import ( + PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem, + ) + from ..models.page_pagerduty_on_call_responders_task_params_users_item import ( + PagePagerdutyOnCallRespondersTaskParamsUsersItem, + ) + from ..models.page_pagerduty_on_call_responders_task_params_service import ( + PagePagerdutyOnCallRespondersTaskParamsService, + ) + service = self.service.to_dict() task_type: str | Unset = UNSET 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 2d743482..9cf742aa 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem") 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 5d7c2c8e..e877c6cf 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PagePagerdutyOnCallRespondersTaskParamsService") 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 bd0237ac..bfa1b3f3 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PagePagerdutyOnCallRespondersTaskParamsUsersItem") 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 9fff57f9..ae3f9b70 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,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.page_rootly_on_call_responders_task_params_task_type import ( - PageRootlyOnCallRespondersTaskParamsTaskType, check_page_rootly_on_call_responders_task_params_task_type, ) +from ..models.page_rootly_on_call_responders_task_params_task_type import PageRootlyOnCallRespondersTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.page_rootly_on_call_responders_task_params_escalation_policy_target import ( @@ -47,6 +50,8 @@ class PageRootlyOnCallRespondersTaskParams: functionality_target (PageRootlyOnCallRespondersTaskParamsFunctionalityTarget | Unset): description (str | Unset): Alert description escalation_note (str | Unset): + create_new_alert (bool | Unset): When true, always create a new alert instead of re-paging the alert that + triggered the workflow Default: False. """ alert_urgency_id: str @@ -59,9 +64,26 @@ class PageRootlyOnCallRespondersTaskParams: functionality_target: PageRootlyOnCallRespondersTaskParamsFunctionalityTarget | Unset = UNSET description: str | Unset = UNSET escalation_note: str | Unset = UNSET + create_new_alert: bool | Unset = False additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.page_rootly_on_call_responders_task_params_user_target import ( + PageRootlyOnCallRespondersTaskParamsUserTarget, + ) + from ..models.page_rootly_on_call_responders_task_params_service_target import ( + PageRootlyOnCallRespondersTaskParamsServiceTarget, + ) + 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, + ) + from ..models.page_rootly_on_call_responders_task_params_escalation_policy_target import ( + PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget, + ) + alert_urgency_id = self.alert_urgency_id summary = self.summary @@ -94,6 +116,8 @@ def to_dict(self) -> dict[str, Any]: escalation_note = self.escalation_note + create_new_alert = self.create_new_alert + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -118,6 +142,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if escalation_note is not UNSET: field_dict["escalation_note"] = escalation_note + if create_new_alert is not UNSET: + field_dict["create_new_alert"] = create_new_alert return field_dict @@ -194,6 +220,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: escalation_note = d.pop("escalation_note", UNSET) + create_new_alert = d.pop("create_new_alert", UNSET) + page_rootly_on_call_responders_task_params = cls( alert_urgency_id=alert_urgency_id, summary=summary, @@ -205,6 +233,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: functionality_target=functionality_target, description=description, escalation_note=escalation_note, + create_new_alert=create_new_alert, ) page_rootly_on_call_responders_task_params.additional_properties = d 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 3120e18c..f93db879 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget") 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 index 9d0b0fcf..cd339f87 100644 --- 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 @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsFunctionalityTarget") 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 e66c01e4..e8bdabbe 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsGroupTarget") 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 8bdb97c4..343232bb 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsServiceTarget") 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 5dd0f4fe..58d40aef 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsUserTarget") diff --git a/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py new file mode 100644 index 00000000..fb84fc01 --- /dev/null +++ b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="PageVictorOpsOnCallRespondersTaskParamsType0UsersItem") + + +@_attrs_define +class PageVictorOpsOnCallRespondersTaskParamsType0UsersItem: + """ + 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_victor_ops_on_call_responders_task_params_type_0_users_item = cls( + id=id, + name=name, + ) + + page_victor_ops_on_call_responders_task_params_type_0_users_item.additional_properties = d + return page_victor_ops_on_call_responders_task_params_type_0_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_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py new file mode 100644 index 00000000..5270737d --- /dev/null +++ b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="PageVictorOpsOnCallRespondersTaskParamsType1EscalationPoliciesItem") + + +@_attrs_define +class PageVictorOpsOnCallRespondersTaskParamsType1EscalationPoliciesItem: + """ + 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_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item = cls( + id=id, + name=name, + ) + + page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.additional_properties = d + return page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_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/patch_alert_route.py b/rootly_sdk/models/patch_alert_route.py index 3de7ca00..9257444c 100644 --- a/rootly_sdk/models/patch_alert_route.py +++ b/rootly_sdk/models/patch_alert_route.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.patch_alert_route_data import PatchAlertRouteData @@ -24,6 +28,8 @@ class PatchAlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.patch_alert_route_data import PatchAlertRouteData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/patch_alert_route_data.py b/rootly_sdk/models/patch_alert_route_data.py index 7bfa311f..58e57480 100644 --- a/rootly_sdk/models/patch_alert_route_data.py +++ b/rootly_sdk/models/patch_alert_route_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.patch_alert_route_data_type import PatchAlertRouteDataType, check_patch_alert_route_data_type +from ..types import UNSET, Unset + +from ..models.patch_alert_route_data_type import check_patch_alert_route_data_type +from ..models.patch_alert_route_data_type import PatchAlertRouteDataType +from typing import cast if TYPE_CHECKING: from ..models.patch_alert_route_data_attributes import PatchAlertRouteDataAttributes @@ -28,6 +32,8 @@ class PatchAlertRouteData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.patch_alert_route_data_attributes import PatchAlertRouteDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/patch_alert_route_data_attributes.py b/rootly_sdk/models/patch_alert_route_data_attributes.py index b6dde929..57656b6e 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..types import UNSET, Unset +from typing import cast +from uuid import UUID if TYPE_CHECKING: from ..models.patch_alert_route_data_attributes_rules_item import PatchAlertRouteDataAttributesRulesItem @@ -33,6 +37,8 @@ class PatchAlertRouteDataAttributes: rules: list[PatchAlertRouteDataAttributesRulesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.patch_alert_route_data_attributes_rules_item import PatchAlertRouteDataAttributesRulesItem + name = self.name enabled = self.enabled 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 28b135b6..c3514e26 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,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + if TYPE_CHECKING: from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item import ( PatchAlertRouteDataAttributesRulesItemConditionGroupsItem, @@ -44,6 +47,13 @@ class PatchAlertRouteDataAttributesRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.patch_alert_route_data_attributes_rules_item_destinations_item import ( + PatchAlertRouteDataAttributesRulesItemDestinationsItem, + ) + from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item import ( + PatchAlertRouteDataAttributesRulesItemConditionGroupsItem, + ) + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.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 763e8dd0..5887cdd3 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,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + if TYPE_CHECKING: from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, @@ -35,6 +38,10 @@ class PatchAlertRouteDataAttributesRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, + ) + id: str | Unset = UNSET if not isinstance(self.id, Unset): id = str(self.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 d9b6fcc0..fb9ba625 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,25 +1,35 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( - PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType, check_patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type, ) +from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType, +) from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( - PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, check_patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type, ) +from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, +) from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( - PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType, check_patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type, ) +from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( + PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType, +) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem") 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 237f4198..7b20639f 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,17 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.patch_alert_route_data_attributes_rules_item_destinations_item_target_type import ( - PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType, check_patch_alert_route_data_attributes_rules_item_destinations_item_target_type, ) +from ..models.patch_alert_route_data_attributes_rules_item_destinations_item_target_type import ( + PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType, +) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="PatchAlertRouteDataAttributesRulesItemDestinationsItem") diff --git a/rootly_sdk/models/phone_verification_response.py b/rootly_sdk/models/phone_verification_response.py index 636cfa5a..353135f3 100644 --- a/rootly_sdk/models/phone_verification_response.py +++ b/rootly_sdk/models/phone_verification_response.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PhoneVerificationResponse") diff --git a/rootly_sdk/models/playbook.py b/rootly_sdk/models/playbook.py index cc9126ef..2788435e 100644 --- a/rootly_sdk/models/playbook.py +++ b/rootly_sdk/models/playbook.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="Playbook") diff --git a/rootly_sdk/models/playbook_list.py b/rootly_sdk/models/playbook_list.py index 02de0316..8c109251 100644 --- a/rootly_sdk/models/playbook_list.py +++ b/rootly_sdk/models/playbook_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.playbook_list_data_item import PlaybookListDataItem @@ -22,14 +28,21 @@ class PlaybookList: data (list[PlaybookListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[PlaybookListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.playbook_list_data_item import PlaybookListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.playbook_list_data_item import PlaybookListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + playbook_list = cls( data=data, links=links, meta=meta, + included=included, ) playbook_list.additional_properties = d diff --git a/rootly_sdk/models/playbook_list_data_item.py b/rootly_sdk/models/playbook_list_data_item.py index 598e3cdc..a8ffafe2 100644 --- a/rootly_sdk/models/playbook_list_data_item.py +++ b/rootly_sdk/models/playbook_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.playbook_list_data_item_type import PlaybookListDataItemType, check_playbook_list_data_item_type +from ..types import UNSET, Unset + +from ..models.playbook_list_data_item_type import check_playbook_list_data_item_type +from ..models.playbook_list_data_item_type import PlaybookListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.playbook import Playbook @@ -30,6 +34,8 @@ class PlaybookListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.playbook import Playbook + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/playbook_response.py b/rootly_sdk/models/playbook_response.py index bbefb288..f6cb4955 100644 --- a/rootly_sdk/models/playbook_response.py +++ b/rootly_sdk/models/playbook_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_response_data import PlaybookResponseData @@ -18,14 +24,26 @@ class PlaybookResponse: """ Attributes: data (PlaybookResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: PlaybookResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.playbook_response_data import PlaybookResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_response_data import PlaybookResponseData d = dict(src_dict) data = PlaybookResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + playbook_response = cls( data=data, + included=included, ) playbook_response.additional_properties = d diff --git a/rootly_sdk/models/playbook_response_data.py b/rootly_sdk/models/playbook_response_data.py index b559f9f7..b0b11ef8 100644 --- a/rootly_sdk/models/playbook_response_data.py +++ b/rootly_sdk/models/playbook_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.playbook_response_data_type import PlaybookResponseDataType, check_playbook_response_data_type +from ..types import UNSET, Unset + +from ..models.playbook_response_data_type import check_playbook_response_data_type +from ..models.playbook_response_data_type import PlaybookResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.playbook import Playbook @@ -30,6 +34,8 @@ class PlaybookResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.playbook import Playbook + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/playbook_task.py b/rootly_sdk/models/playbook_task.py index 401f39aa..d4dfe32d 100644 --- a/rootly_sdk/models/playbook_task.py +++ b/rootly_sdk/models/playbook_task.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="PlaybookTask") diff --git a/rootly_sdk/models/playbook_task_list.py b/rootly_sdk/models/playbook_task_list.py index 128b3689..0f0ab552 100644 --- a/rootly_sdk/models/playbook_task_list.py +++ b/rootly_sdk/models/playbook_task_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.playbook_task_list_data_item import PlaybookTaskListDataItem @@ -22,14 +28,21 @@ class PlaybookTaskList: data (list[PlaybookTaskListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[PlaybookTaskListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.playbook_task_list_data_item import PlaybookTaskListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.playbook_task_list_data_item import PlaybookTaskListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + playbook_task_list = cls( data=data, links=links, meta=meta, + included=included, ) playbook_task_list.additional_properties = d diff --git a/rootly_sdk/models/playbook_task_list_data_item.py b/rootly_sdk/models/playbook_task_list_data_item.py index 9c529ab0..16c99dc8 100644 --- a/rootly_sdk/models/playbook_task_list_data_item.py +++ b/rootly_sdk/models/playbook_task_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.playbook_task_list_data_item_type import ( - PlaybookTaskListDataItemType, - check_playbook_task_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.playbook_task_list_data_item_type import check_playbook_task_list_data_item_type +from ..models.playbook_task_list_data_item_type import PlaybookTaskListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.playbook_task import PlaybookTask @@ -33,6 +34,8 @@ class PlaybookTaskListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.playbook_task import PlaybookTask + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/playbook_task_response.py b/rootly_sdk/models/playbook_task_response.py index 0753e7a1..d2d17a91 100644 --- a/rootly_sdk/models/playbook_task_response.py +++ b/rootly_sdk/models/playbook_task_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_task_response_data import PlaybookTaskResponseData @@ -18,14 +24,26 @@ class PlaybookTaskResponse: """ Attributes: data (PlaybookTaskResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: PlaybookTaskResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.playbook_task_response_data import PlaybookTaskResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_task_response_data import PlaybookTaskResponseData d = dict(src_dict) data = PlaybookTaskResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + playbook_task_response = cls( data=data, + included=included, ) playbook_task_response.additional_properties = d diff --git a/rootly_sdk/models/playbook_task_response_data.py b/rootly_sdk/models/playbook_task_response_data.py index 3cb5185c..f7318f9a 100644 --- a/rootly_sdk/models/playbook_task_response_data.py +++ b/rootly_sdk/models/playbook_task_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.playbook_task_response_data_type import ( - PlaybookTaskResponseDataType, - check_playbook_task_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.playbook_task_response_data_type import check_playbook_task_response_data_type +from ..models.playbook_task_response_data_type import PlaybookTaskResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.playbook_task import PlaybookTask @@ -33,6 +34,8 @@ class PlaybookTaskResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.playbook_task import PlaybookTask + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/post_mortem_template.py b/rootly_sdk/models/post_mortem_template.py index 175b93d9..62e938f0 100644 --- a/rootly_sdk/models/post_mortem_template.py +++ b/rootly_sdk/models/post_mortem_template.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.post_mortem_template_format import PostMortemTemplateFormat, check_post_mortem_template_format from ..types import UNSET, Unset +from ..models.post_mortem_template_format import check_post_mortem_template_format +from ..models.post_mortem_template_format import PostMortemTemplateFormat +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.post_mortem_template_content_json_type_0 import PostMortemTemplateContentJsonType0 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 0375e77a..6aedaf3a 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PostMortemTemplateContentJsonType0") diff --git a/rootly_sdk/models/post_mortem_template_list.py b/rootly_sdk/models/post_mortem_template_list.py index 83676bfc..0705cc01 100644 --- a/rootly_sdk/models/post_mortem_template_list.py +++ b/rootly_sdk/models/post_mortem_template_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.post_mortem_template_list_data_item import PostMortemTemplateListDataItem @@ -22,14 +28,21 @@ class PostMortemTemplateList: data (list[PostMortemTemplateListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[PostMortemTemplateListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.post_mortem_template_list_data_item import PostMortemTemplateListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.post_mortem_template_list_data_item import PostMortemTemplateListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + post_mortem_template_list = cls( data=data, links=links, meta=meta, + included=included, ) post_mortem_template_list.additional_properties = d 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 e3823d0d..762ec30c 100644 --- a/rootly_sdk/models/post_mortem_template_list_data_item.py +++ b/rootly_sdk/models/post_mortem_template_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.post_mortem_template_list_data_item_type import ( - PostMortemTemplateListDataItemType, - check_post_mortem_template_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.post_mortem_template_list_data_item_type import check_post_mortem_template_list_data_item_type +from ..models.post_mortem_template_list_data_item_type import PostMortemTemplateListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.post_mortem_template import PostMortemTemplate @@ -33,6 +34,8 @@ class PostMortemTemplateListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.post_mortem_template import PostMortemTemplate + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/post_mortem_template_response.py b/rootly_sdk/models/post_mortem_template_response.py index cb8516aa..bdc2ed8a 100644 --- a/rootly_sdk/models/post_mortem_template_response.py +++ b/rootly_sdk/models/post_mortem_template_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.post_mortem_template_response_data import PostMortemTemplateResponseData @@ -18,14 +24,26 @@ class PostMortemTemplateResponse: """ Attributes: data (PostMortemTemplateResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: PostMortemTemplateResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.post_mortem_template_response_data import PostMortemTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.post_mortem_template_response_data import PostMortemTemplateResponseData d = dict(src_dict) data = PostMortemTemplateResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + post_mortem_template_response = cls( data=data, + included=included, ) post_mortem_template_response.additional_properties = d diff --git a/rootly_sdk/models/post_mortem_template_response_data.py b/rootly_sdk/models/post_mortem_template_response_data.py index 4e622ebb..ff81261e 100644 --- a/rootly_sdk/models/post_mortem_template_response_data.py +++ b/rootly_sdk/models/post_mortem_template_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.post_mortem_template_response_data_type import ( - PostMortemTemplateResponseDataType, - check_post_mortem_template_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.post_mortem_template_response_data_type import check_post_mortem_template_response_data_type +from ..models.post_mortem_template_response_data_type import PostMortemTemplateResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.post_mortem_template import PostMortemTemplate @@ -33,6 +34,8 @@ class PostMortemTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.post_mortem_template import PostMortemTemplate + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/post_mortem_trigger_params.py b/rootly_sdk/models/post_mortem_trigger_params.py index 0f6c8673..ae9f06a2 100644 --- a/rootly_sdk/models/post_mortem_trigger_params.py +++ b/rootly_sdk/models/post_mortem_trigger_params.py @@ -1,120 +1,160 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.post_mortem_trigger_params_incident_condition import ( - PostMortemTriggerParamsIncidentCondition, - check_post_mortem_trigger_params_incident_condition, +from ..types import UNSET, Unset + +from ..models.post_mortem_trigger_params_incident_condition import check_post_mortem_trigger_params_incident_condition +from ..models.post_mortem_trigger_params_incident_condition import PostMortemTriggerParamsIncidentCondition +from ..models.post_mortem_trigger_params_incident_condition_acknowledged_at import ( + check_post_mortem_trigger_params_incident_condition_acknowledged_at, ) -from ..models.post_mortem_trigger_params_incident_condition_acknowledged_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1, - check_post_mortem_trigger_params_incident_condition_acknowledged_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_acknowledged_at import ( + PostMortemTriggerParamsIncidentConditionAcknowledgedAt, ) from ..models.post_mortem_trigger_params_incident_condition_cause import ( - PostMortemTriggerParamsIncidentConditionCause, check_post_mortem_trigger_params_incident_condition_cause, ) -from ..models.post_mortem_trigger_params_incident_condition_detected_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionDetectedAtType1, - check_post_mortem_trigger_params_incident_condition_detected_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_cause import PostMortemTriggerParamsIncidentConditionCause +from ..models.post_mortem_trigger_params_incident_condition_detected_at import ( + check_post_mortem_trigger_params_incident_condition_detected_at, +) +from ..models.post_mortem_trigger_params_incident_condition_detected_at import ( + PostMortemTriggerParamsIncidentConditionDetectedAt, ) from ..models.post_mortem_trigger_params_incident_condition_environment import ( - PostMortemTriggerParamsIncidentConditionEnvironment, check_post_mortem_trigger_params_incident_condition_environment, ) +from ..models.post_mortem_trigger_params_incident_condition_environment import ( + PostMortemTriggerParamsIncidentConditionEnvironment, +) from ..models.post_mortem_trigger_params_incident_condition_functionality import ( - PostMortemTriggerParamsIncidentConditionFunctionality, check_post_mortem_trigger_params_incident_condition_functionality, ) +from ..models.post_mortem_trigger_params_incident_condition_functionality import ( + PostMortemTriggerParamsIncidentConditionFunctionality, +) from ..models.post_mortem_trigger_params_incident_condition_group import ( - PostMortemTriggerParamsIncidentConditionGroup, check_post_mortem_trigger_params_incident_condition_group, ) +from ..models.post_mortem_trigger_params_incident_condition_group import PostMortemTriggerParamsIncidentConditionGroup from ..models.post_mortem_trigger_params_incident_condition_incident_roles import ( - PostMortemTriggerParamsIncidentConditionIncidentRoles, check_post_mortem_trigger_params_incident_condition_incident_roles, ) +from ..models.post_mortem_trigger_params_incident_condition_incident_roles import ( + PostMortemTriggerParamsIncidentConditionIncidentRoles, +) from ..models.post_mortem_trigger_params_incident_condition_incident_type import ( - PostMortemTriggerParamsIncidentConditionIncidentType, check_post_mortem_trigger_params_incident_condition_incident_type, ) +from ..models.post_mortem_trigger_params_incident_condition_incident_type import ( + PostMortemTriggerParamsIncidentConditionIncidentType, +) from ..models.post_mortem_trigger_params_incident_condition_kind import ( - PostMortemTriggerParamsIncidentConditionKind, check_post_mortem_trigger_params_incident_condition_kind, ) -from ..models.post_mortem_trigger_params_incident_condition_mitigated_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionMitigatedAtType1, - check_post_mortem_trigger_params_incident_condition_mitigated_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_kind import PostMortemTriggerParamsIncidentConditionKind +from ..models.post_mortem_trigger_params_incident_condition_label import ( + check_post_mortem_trigger_params_incident_condition_label, +) +from ..models.post_mortem_trigger_params_incident_condition_label import PostMortemTriggerParamsIncidentConditionLabel +from ..models.post_mortem_trigger_params_incident_condition_mitigated_at import ( + check_post_mortem_trigger_params_incident_condition_mitigated_at, +) +from ..models.post_mortem_trigger_params_incident_condition_mitigated_at import ( + PostMortemTriggerParamsIncidentConditionMitigatedAt, ) -from ..models.post_mortem_trigger_params_incident_condition_resolved_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionResolvedAtType1, - check_post_mortem_trigger_params_incident_condition_resolved_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_resolved_at import ( + check_post_mortem_trigger_params_incident_condition_resolved_at, +) +from ..models.post_mortem_trigger_params_incident_condition_resolved_at import ( + PostMortemTriggerParamsIncidentConditionResolvedAt, ) from ..models.post_mortem_trigger_params_incident_condition_service import ( - PostMortemTriggerParamsIncidentConditionService, check_post_mortem_trigger_params_incident_condition_service, ) +from ..models.post_mortem_trigger_params_incident_condition_service import ( + PostMortemTriggerParamsIncidentConditionService, +) from ..models.post_mortem_trigger_params_incident_condition_severity import ( - PostMortemTriggerParamsIncidentConditionSeverity, check_post_mortem_trigger_params_incident_condition_severity, ) -from ..models.post_mortem_trigger_params_incident_condition_started_at_type_1 import ( - PostMortemTriggerParamsIncidentConditionStartedAtType1, - check_post_mortem_trigger_params_incident_condition_started_at_type_1, +from ..models.post_mortem_trigger_params_incident_condition_severity import ( + PostMortemTriggerParamsIncidentConditionSeverity, +) +from ..models.post_mortem_trigger_params_incident_condition_started_at import ( + check_post_mortem_trigger_params_incident_condition_started_at, +) +from ..models.post_mortem_trigger_params_incident_condition_started_at import ( + PostMortemTriggerParamsIncidentConditionStartedAt, ) from ..models.post_mortem_trigger_params_incident_condition_status import ( - PostMortemTriggerParamsIncidentConditionStatus, check_post_mortem_trigger_params_incident_condition_status, ) +from ..models.post_mortem_trigger_params_incident_condition_status import PostMortemTriggerParamsIncidentConditionStatus from ..models.post_mortem_trigger_params_incident_condition_sub_status import ( - PostMortemTriggerParamsIncidentConditionSubStatus, check_post_mortem_trigger_params_incident_condition_sub_status, ) -from ..models.post_mortem_trigger_params_incident_condition_summary_type_1 import ( - PostMortemTriggerParamsIncidentConditionSummaryType1, - check_post_mortem_trigger_params_incident_condition_summary_type_1, +from ..models.post_mortem_trigger_params_incident_condition_sub_status import ( + PostMortemTriggerParamsIncidentConditionSubStatus, +) +from ..models.post_mortem_trigger_params_incident_condition_summary import ( + check_post_mortem_trigger_params_incident_condition_summary, +) +from ..models.post_mortem_trigger_params_incident_condition_summary import ( + PostMortemTriggerParamsIncidentConditionSummary, ) from ..models.post_mortem_trigger_params_incident_condition_visibility import ( - PostMortemTriggerParamsIncidentConditionVisibility, check_post_mortem_trigger_params_incident_condition_visibility, ) -from ..models.post_mortem_trigger_params_incident_conditional_inactivity_type_1 import ( - PostMortemTriggerParamsIncidentConditionalInactivityType1, - check_post_mortem_trigger_params_incident_conditional_inactivity_type_1, +from ..models.post_mortem_trigger_params_incident_condition_visibility import ( + PostMortemTriggerParamsIncidentConditionVisibility, ) -from ..models.post_mortem_trigger_params_incident_kinds_item import ( - PostMortemTriggerParamsIncidentKindsItem, - check_post_mortem_trigger_params_incident_kinds_item, +from ..models.post_mortem_trigger_params_incident_conditional_inactivity import ( + check_post_mortem_trigger_params_incident_conditional_inactivity, ) +from ..models.post_mortem_trigger_params_incident_conditional_inactivity import ( + PostMortemTriggerParamsIncidentConditionalInactivity, +) +from ..models.post_mortem_trigger_params_incident_kinds_item import check_post_mortem_trigger_params_incident_kinds_item +from ..models.post_mortem_trigger_params_incident_kinds_item import PostMortemTriggerParamsIncidentKindsItem from ..models.post_mortem_trigger_params_incident_post_mortem_condition import ( - PostMortemTriggerParamsIncidentPostMortemCondition, check_post_mortem_trigger_params_incident_post_mortem_condition, ) +from ..models.post_mortem_trigger_params_incident_post_mortem_condition import ( + PostMortemTriggerParamsIncidentPostMortemCondition, +) from ..models.post_mortem_trigger_params_incident_post_mortem_condition_cause import ( - PostMortemTriggerParamsIncidentPostMortemConditionCause, check_post_mortem_trigger_params_incident_post_mortem_condition_cause, ) +from ..models.post_mortem_trigger_params_incident_post_mortem_condition_cause import ( + PostMortemTriggerParamsIncidentPostMortemConditionCause, +) from ..models.post_mortem_trigger_params_incident_post_mortem_condition_status import ( - PostMortemTriggerParamsIncidentPostMortemConditionStatus, check_post_mortem_trigger_params_incident_post_mortem_condition_status, ) +from ..models.post_mortem_trigger_params_incident_post_mortem_condition_status import ( + PostMortemTriggerParamsIncidentPostMortemConditionStatus, +) from ..models.post_mortem_trigger_params_incident_post_mortem_statuses_item import ( - PostMortemTriggerParamsIncidentPostMortemStatusesItem, check_post_mortem_trigger_params_incident_post_mortem_statuses_item, ) +from ..models.post_mortem_trigger_params_incident_post_mortem_statuses_item import ( + PostMortemTriggerParamsIncidentPostMortemStatusesItem, +) from ..models.post_mortem_trigger_params_incident_statuses_item import ( - PostMortemTriggerParamsIncidentStatusesItem, check_post_mortem_trigger_params_incident_statuses_item, ) -from ..models.post_mortem_trigger_params_trigger_type import ( - PostMortemTriggerParamsTriggerType, - check_post_mortem_trigger_params_trigger_type, -) +from ..models.post_mortem_trigger_params_incident_statuses_item import PostMortemTriggerParamsIncidentStatusesItem +from ..models.post_mortem_trigger_params_trigger_type import check_post_mortem_trigger_params_trigger_type +from ..models.post_mortem_trigger_params_trigger_type import PostMortemTriggerParamsTriggerType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="PostMortemTriggerParams") @@ -128,7 +168,7 @@ class PostMortemTriggerParams: incident_visibilities (list[bool] | Unset): incident_kinds (list[PostMortemTriggerParamsIncidentKindsItem] | Unset): incident_statuses (list[PostMortemTriggerParamsIncidentStatusesItem] | Unset): - incident_inactivity_duration (None | str | Unset): + incident_inactivity_duration (None | str | Unset): ex. 10 min, 1h, 3 days, 2 weeks incident_condition (PostMortemTriggerParamsIncidentCondition | Unset): Default: 'ALL'. incident_condition_visibility (PostMortemTriggerParamsIncidentConditionVisibility | Unset): Default: 'ANY'. incident_condition_kind (PostMortemTriggerParamsIncidentConditionKind | Unset): Default: 'IS'. @@ -145,15 +185,18 @@ class PostMortemTriggerParams: 'ANY'. incident_condition_group (PostMortemTriggerParamsIncidentConditionGroup | Unset): Default: 'ANY'. incident_condition_cause (PostMortemTriggerParamsIncidentConditionCause | Unset): Default: 'ANY'. + incident_condition_label (PostMortemTriggerParamsIncidentConditionLabel | Unset): Default: 'ANY'. + incident_condition_label_use_regexp (bool | Unset): Default: False. + incident_labels (list[str] | Unset): incident_post_mortem_condition_cause (PostMortemTriggerParamsIncidentPostMortemConditionCause | Unset): [DEPRECATED] Use incident_condition_cause instead Default: 'ANY'. - 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_condition_summary (PostMortemTriggerParamsIncidentConditionSummary | Unset): + incident_condition_started_at (PostMortemTriggerParamsIncidentConditionStartedAt | Unset): + incident_condition_detected_at (PostMortemTriggerParamsIncidentConditionDetectedAt | Unset): + incident_condition_acknowledged_at (PostMortemTriggerParamsIncidentConditionAcknowledgedAt | Unset): + incident_condition_mitigated_at (PostMortemTriggerParamsIncidentConditionMitigatedAt | Unset): + incident_condition_resolved_at (PostMortemTriggerParamsIncidentConditionResolvedAt | Unset): + incident_conditional_inactivity (PostMortemTriggerParamsIncidentConditionalInactivity | Unset): incident_post_mortem_condition (PostMortemTriggerParamsIncidentPostMortemCondition | Unset): incident_post_mortem_condition_status (PostMortemTriggerParamsIncidentPostMortemConditionStatus | Unset): Default: 'ANY'. @@ -179,16 +222,17 @@ class PostMortemTriggerParams: incident_condition_functionality: PostMortemTriggerParamsIncidentConditionFunctionality | Unset = "ANY" incident_condition_group: PostMortemTriggerParamsIncidentConditionGroup | Unset = "ANY" incident_condition_cause: PostMortemTriggerParamsIncidentConditionCause | Unset = "ANY" + incident_condition_label: PostMortemTriggerParamsIncidentConditionLabel | Unset = "ANY" + incident_condition_label_use_regexp: bool | Unset = False + incident_labels: list[str] | Unset = UNSET 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 - incident_condition_acknowledged_at: None | PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | Unset = ( - UNSET - ) - incident_condition_mitigated_at: None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset = UNSET - incident_condition_resolved_at: None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset = UNSET - incident_conditional_inactivity: None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset = UNSET + incident_condition_summary: PostMortemTriggerParamsIncidentConditionSummary | Unset = UNSET + incident_condition_started_at: PostMortemTriggerParamsIncidentConditionStartedAt | Unset = UNSET + incident_condition_detected_at: PostMortemTriggerParamsIncidentConditionDetectedAt | Unset = UNSET + incident_condition_acknowledged_at: PostMortemTriggerParamsIncidentConditionAcknowledgedAt | Unset = UNSET + incident_condition_mitigated_at: PostMortemTriggerParamsIncidentConditionMitigatedAt | Unset = UNSET + incident_condition_resolved_at: PostMortemTriggerParamsIncidentConditionResolvedAt | Unset = UNSET + incident_conditional_inactivity: PostMortemTriggerParamsIncidentConditionalInactivity | Unset = UNSET incident_post_mortem_condition: PostMortemTriggerParamsIncidentPostMortemCondition | Unset = UNSET incident_post_mortem_condition_status: PostMortemTriggerParamsIncidentPostMortemConditionStatus | Unset = "ANY" incident_post_mortem_statuses: list[PostMortemTriggerParamsIncidentPostMortemStatusesItem] | Unset = UNSET @@ -277,64 +321,46 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.incident_condition_cause, Unset): incident_condition_cause = self.incident_condition_cause + incident_condition_label: str | Unset = UNSET + if not isinstance(self.incident_condition_label, Unset): + incident_condition_label = self.incident_condition_label + + incident_condition_label_use_regexp = self.incident_condition_label_use_regexp + + incident_labels: list[str] | Unset = UNSET + if not isinstance(self.incident_labels, Unset): + incident_labels = self.incident_labels + 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 | str | Unset - if isinstance(self.incident_condition_summary, Unset): - incident_condition_summary = UNSET - elif isinstance(self.incident_condition_summary, str): - incident_condition_summary = self.incident_condition_summary - else: + incident_condition_summary: str | Unset = UNSET + if not isinstance(self.incident_condition_summary, Unset): incident_condition_summary = self.incident_condition_summary - 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): - incident_condition_started_at = self.incident_condition_started_at - else: + incident_condition_started_at: str | Unset = UNSET + if not isinstance(self.incident_condition_started_at, Unset): incident_condition_started_at = self.incident_condition_started_at - 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): - incident_condition_detected_at = self.incident_condition_detected_at - else: + incident_condition_detected_at: str | Unset = UNSET + if not isinstance(self.incident_condition_detected_at, Unset): incident_condition_detected_at = self.incident_condition_detected_at - 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): - incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - else: + incident_condition_acknowledged_at: str | Unset = UNSET + if not isinstance(self.incident_condition_acknowledged_at, Unset): incident_condition_acknowledged_at = self.incident_condition_acknowledged_at - 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): - incident_condition_mitigated_at = self.incident_condition_mitigated_at - else: + incident_condition_mitigated_at: str | Unset = UNSET + if not isinstance(self.incident_condition_mitigated_at, Unset): incident_condition_mitigated_at = self.incident_condition_mitigated_at - 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): - incident_condition_resolved_at = self.incident_condition_resolved_at - else: + incident_condition_resolved_at: str | Unset = UNSET + if not isinstance(self.incident_condition_resolved_at, Unset): incident_condition_resolved_at = self.incident_condition_resolved_at - incident_conditional_inactivity: None | str | Unset - if isinstance(self.incident_conditional_inactivity, Unset): - incident_conditional_inactivity = UNSET - elif isinstance(self.incident_conditional_inactivity, str): - incident_conditional_inactivity = self.incident_conditional_inactivity - else: + incident_conditional_inactivity: str | Unset = UNSET + if not isinstance(self.incident_conditional_inactivity, Unset): incident_conditional_inactivity = self.incident_conditional_inactivity incident_post_mortem_condition: str | Unset = UNSET @@ -395,6 +421,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["incident_condition_group"] = incident_condition_group if incident_condition_cause is not UNSET: field_dict["incident_condition_cause"] = incident_condition_cause + if incident_condition_label is not UNSET: + field_dict["incident_condition_label"] = incident_condition_label + if incident_condition_label_use_regexp is not UNSET: + field_dict["incident_condition_label_use_regexp"] = incident_condition_label_use_regexp + if incident_labels is not UNSET: + field_dict["incident_labels"] = incident_labels if incident_post_mortem_condition_cause is not UNSET: field_dict["incident_post_mortem_condition_cause"] = incident_post_mortem_condition_cause if incident_condition_summary is not UNSET: @@ -571,6 +603,19 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: _incident_condition_cause ) + _incident_condition_label = d.pop("incident_condition_label", UNSET) + incident_condition_label: PostMortemTriggerParamsIncidentConditionLabel | Unset + if isinstance(_incident_condition_label, Unset): + incident_condition_label = UNSET + else: + incident_condition_label = check_post_mortem_trigger_params_incident_condition_label( + _incident_condition_label + ) + + incident_condition_label_use_regexp = d.pop("incident_condition_label_use_regexp", UNSET) + + incident_labels = cast(list[str], d.pop("incident_labels", UNSET)) + _incident_post_mortem_condition_cause = d.pop("incident_post_mortem_condition_cause", UNSET) incident_post_mortem_condition_cause: PostMortemTriggerParamsIncidentPostMortemConditionCause | Unset if isinstance(_incident_post_mortem_condition_cause, Unset): @@ -582,164 +627,68 @@ def _parse_incident_inactivity_duration(data: object) -> None | str | Unset: ) ) - def _parse_incident_condition_summary( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionSummaryType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_summary_type_1 = check_post_mortem_trigger_params_incident_condition_summary_type_1( - data - ) - - return incident_condition_summary_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionSummaryType1 | Unset, data) - - incident_condition_summary = _parse_incident_condition_summary(d.pop("incident_condition_summary", UNSET)) - - def _parse_incident_condition_started_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionStartedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_started_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_started_at_type_1(data) - ) - - return incident_condition_started_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionStartedAtType1 | Unset, data) - - incident_condition_started_at = _parse_incident_condition_started_at( - d.pop("incident_condition_started_at", UNSET) - ) - - def _parse_incident_condition_detected_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionDetectedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_detected_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_detected_at_type_1(data) - ) - - return incident_condition_detected_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionDetectedAtType1 | Unset, data) - - incident_condition_detected_at = _parse_incident_condition_detected_at( - d.pop("incident_condition_detected_at", UNSET) - ) - - def _parse_incident_condition_acknowledged_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_acknowledged_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_acknowledged_at_type_1(data) - ) - - return incident_condition_acknowledged_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | Unset, data) - - incident_condition_acknowledged_at = _parse_incident_condition_acknowledged_at( - d.pop("incident_condition_acknowledged_at", UNSET) - ) - - def _parse_incident_condition_mitigated_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_mitigated_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_mitigated_at_type_1(data) - ) - - return incident_condition_mitigated_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | Unset, data) - - incident_condition_mitigated_at = _parse_incident_condition_mitigated_at( - d.pop("incident_condition_mitigated_at", UNSET) - ) + _incident_condition_summary = d.pop("incident_condition_summary", UNSET) + incident_condition_summary: PostMortemTriggerParamsIncidentConditionSummary | Unset + if isinstance(_incident_condition_summary, Unset): + incident_condition_summary = UNSET + else: + incident_condition_summary = check_post_mortem_trigger_params_incident_condition_summary( + _incident_condition_summary + ) - def _parse_incident_condition_resolved_at( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_condition_resolved_at_type_1 = ( - check_post_mortem_trigger_params_incident_condition_resolved_at_type_1(data) - ) + _incident_condition_started_at = d.pop("incident_condition_started_at", UNSET) + incident_condition_started_at: PostMortemTriggerParamsIncidentConditionStartedAt | Unset + if isinstance(_incident_condition_started_at, Unset): + incident_condition_started_at = UNSET + else: + incident_condition_started_at = check_post_mortem_trigger_params_incident_condition_started_at( + _incident_condition_started_at + ) - return incident_condition_resolved_at_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionResolvedAtType1 | Unset, data) + _incident_condition_detected_at = d.pop("incident_condition_detected_at", UNSET) + incident_condition_detected_at: PostMortemTriggerParamsIncidentConditionDetectedAt | Unset + if isinstance(_incident_condition_detected_at, Unset): + incident_condition_detected_at = UNSET + else: + incident_condition_detected_at = check_post_mortem_trigger_params_incident_condition_detected_at( + _incident_condition_detected_at + ) - incident_condition_resolved_at = _parse_incident_condition_resolved_at( - d.pop("incident_condition_resolved_at", UNSET) - ) + _incident_condition_acknowledged_at = d.pop("incident_condition_acknowledged_at", UNSET) + incident_condition_acknowledged_at: PostMortemTriggerParamsIncidentConditionAcknowledgedAt | Unset + if isinstance(_incident_condition_acknowledged_at, Unset): + incident_condition_acknowledged_at = UNSET + else: + incident_condition_acknowledged_at = check_post_mortem_trigger_params_incident_condition_acknowledged_at( + _incident_condition_acknowledged_at + ) - def _parse_incident_conditional_inactivity( - data: object, - ) -> None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset: - if data is None: - return data - if isinstance(data, Unset): - return data - try: - if not isinstance(data, str): - raise TypeError() - incident_conditional_inactivity_type_1 = ( - check_post_mortem_trigger_params_incident_conditional_inactivity_type_1(data) - ) + _incident_condition_mitigated_at = d.pop("incident_condition_mitigated_at", UNSET) + incident_condition_mitigated_at: PostMortemTriggerParamsIncidentConditionMitigatedAt | Unset + if isinstance(_incident_condition_mitigated_at, Unset): + incident_condition_mitigated_at = UNSET + else: + incident_condition_mitigated_at = check_post_mortem_trigger_params_incident_condition_mitigated_at( + _incident_condition_mitigated_at + ) - return incident_conditional_inactivity_type_1 - except (TypeError, ValueError, AttributeError, KeyError): - pass - return cast(None | PostMortemTriggerParamsIncidentConditionalInactivityType1 | Unset, data) + _incident_condition_resolved_at = d.pop("incident_condition_resolved_at", UNSET) + incident_condition_resolved_at: PostMortemTriggerParamsIncidentConditionResolvedAt | Unset + if isinstance(_incident_condition_resolved_at, Unset): + incident_condition_resolved_at = UNSET + else: + incident_condition_resolved_at = check_post_mortem_trigger_params_incident_condition_resolved_at( + _incident_condition_resolved_at + ) - incident_conditional_inactivity = _parse_incident_conditional_inactivity( - d.pop("incident_conditional_inactivity", UNSET) - ) + _incident_conditional_inactivity = d.pop("incident_conditional_inactivity", UNSET) + incident_conditional_inactivity: PostMortemTriggerParamsIncidentConditionalInactivity | Unset + if isinstance(_incident_conditional_inactivity, Unset): + incident_conditional_inactivity = UNSET + else: + incident_conditional_inactivity = check_post_mortem_trigger_params_incident_conditional_inactivity( + _incident_conditional_inactivity + ) _incident_post_mortem_condition = d.pop("incident_post_mortem_condition", UNSET) incident_post_mortem_condition: PostMortemTriggerParamsIncidentPostMortemCondition | Unset @@ -794,6 +743,9 @@ def _parse_incident_conditional_inactivity( incident_condition_functionality=incident_condition_functionality, incident_condition_group=incident_condition_group, incident_condition_cause=incident_condition_cause, + incident_condition_label=incident_condition_label, + incident_condition_label_use_regexp=incident_condition_label_use_regexp, + incident_labels=incident_labels, incident_post_mortem_condition_cause=incident_post_mortem_condition_cause, incident_condition_summary=incident_condition_summary, incident_condition_started_at=incident_condition_started_at, diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at.py new file mode 100644 index 00000000..8e2e6426 --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionAcknowledgedAt = Literal["SET", "UNSET"] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionAcknowledgedAt +] = { + "SET", + "UNSET", +} + + +def check_post_mortem_trigger_params_incident_condition_acknowledged_at( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionAcknowledgedAt | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionAcknowledgedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at_type_1.py deleted file mode 100644 index bf9de673..00000000 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_acknowledged_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 = Literal["SET", "UNSET"] - -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_post_mortem_trigger_params_incident_condition_acknowledged_at_type_1( - value: str | None, -) -> PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1 | None: - if value is None: - return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionAcknowledgedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_ACKNOWLEDGED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at.py similarity index 50% rename from rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at_type_1.py rename to rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at.py index aa6622e9..f1118d2b 100644 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at_type_1.py +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_detected_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -PostMortemTriggerParamsIncidentConditionDetectedAtType1 = Literal["SET", "UNSET"] +PostMortemTriggerParamsIncidentConditionDetectedAt = Literal["SET", "UNSET"] -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionDetectedAtType1 +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionDetectedAt ] = { "SET", "UNSET", } -def check_post_mortem_trigger_params_incident_condition_detected_at_type_1( +def check_post_mortem_trigger_params_incident_condition_detected_at( value: str | None, -) -> PostMortemTriggerParamsIncidentConditionDetectedAtType1 | None: +) -> PostMortemTriggerParamsIncidentConditionDetectedAt | None: if value is None: return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionDetectedAtType1, value) + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionDetectedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_DETECTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_label.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_label.py new file mode 100644 index 00000000..20d5d0a7 --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_label.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionLabel = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: set[PostMortemTriggerParamsIncidentConditionLabel] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_post_mortem_trigger_params_incident_condition_label( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionLabel | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionLabel, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_LABEL_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at.py new file mode 100644 index 00000000..0c8665b0 --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionMitigatedAt = Literal["SET", "UNSET"] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionMitigatedAt +] = { + "SET", + "UNSET", +} + + +def check_post_mortem_trigger_params_incident_condition_mitigated_at( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionMitigatedAt | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionMitigatedAt, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at_type_1.py deleted file mode 100644 index d81c4ad4..00000000 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_mitigated_at_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -PostMortemTriggerParamsIncidentConditionMitigatedAtType1 = Literal["SET", "UNSET"] - -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionMitigatedAtType1 -] = { - "SET", - "UNSET", -} - - -def check_post_mortem_trigger_params_incident_condition_mitigated_at_type_1( - value: str | None, -) -> PostMortemTriggerParamsIncidentConditionMitigatedAtType1 | None: - if value is None: - return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionMitigatedAtType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_MITIGATED_AT_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at.py similarity index 50% rename from rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at_type_1.py rename to rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at.py index 3762f4a3..844afdf3 100644 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at_type_1.py +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_resolved_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -PostMortemTriggerParamsIncidentConditionResolvedAtType1 = Literal["SET", "UNSET"] +PostMortemTriggerParamsIncidentConditionResolvedAt = Literal["SET", "UNSET"] -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionResolvedAtType1 +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionResolvedAt ] = { "SET", "UNSET", } -def check_post_mortem_trigger_params_incident_condition_resolved_at_type_1( +def check_post_mortem_trigger_params_incident_condition_resolved_at( value: str | None, -) -> PostMortemTriggerParamsIncidentConditionResolvedAtType1 | None: +) -> PostMortemTriggerParamsIncidentConditionResolvedAt | None: if value is None: return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionResolvedAtType1, value) + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionResolvedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_RESOLVED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at.py similarity index 50% rename from rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at_type_1.py rename to rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at.py index a4b9246f..6e5ef9f7 100644 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at_type_1.py +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_started_at.py @@ -1,22 +1,22 @@ from typing import Literal, cast -PostMortemTriggerParamsIncidentConditionStartedAtType1 = Literal["SET", "UNSET"] +PostMortemTriggerParamsIncidentConditionStartedAt = Literal["SET", "UNSET"] -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionStartedAtType1 +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: set[ + PostMortemTriggerParamsIncidentConditionStartedAt ] = { "SET", "UNSET", } -def check_post_mortem_trigger_params_incident_condition_started_at_type_1( +def check_post_mortem_trigger_params_incident_condition_started_at( value: str | None, -) -> PostMortemTriggerParamsIncidentConditionStartedAtType1 | None: +) -> PostMortemTriggerParamsIncidentConditionStartedAt | None: if value is None: return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionStartedAtType1, value) + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionStartedAt, value) raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_TYPE_1_VALUES!r}" + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_STARTED_AT_VALUES!r}" ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary.py new file mode 100644 index 00000000..d3ffa58a --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionSummary = Literal["SET", "UNSET"] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: set[PostMortemTriggerParamsIncidentConditionSummary] = { + "SET", + "UNSET", +} + + +def check_post_mortem_trigger_params_incident_condition_summary( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionSummary | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionSummary, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary_type_1.py deleted file mode 100644 index f9b7ca36..00000000 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_condition_summary_type_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from typing import Literal, cast - -PostMortemTriggerParamsIncidentConditionSummaryType1 = Literal["SET", "UNSET"] - -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionSummaryType1 -] = { - "SET", - "UNSET", -} - - -def check_post_mortem_trigger_params_incident_condition_summary_type_1( - value: str | None, -) -> PostMortemTriggerParamsIncidentConditionSummaryType1 | None: - if value is None: - return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionSummaryType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITION_SUMMARY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity.py b/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity.py new file mode 100644 index 00000000..22520d48 --- /dev/null +++ b/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +PostMortemTriggerParamsIncidentConditionalInactivity = Literal["IS"] + +POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: set[ + PostMortemTriggerParamsIncidentConditionalInactivity +] = { + "IS", +} + + +def check_post_mortem_trigger_params_incident_conditional_inactivity( + value: str | None, +) -> PostMortemTriggerParamsIncidentConditionalInactivity | None: + if value is None: + return None + if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES: + return cast(PostMortemTriggerParamsIncidentConditionalInactivity, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_VALUES!r}" + ) diff --git a/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity_type_1.py b/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity_type_1.py deleted file mode 100644 index b1a3bca7..00000000 --- a/rootly_sdk/models/post_mortem_trigger_params_incident_conditional_inactivity_type_1.py +++ /dev/null @@ -1,21 +0,0 @@ -from typing import Literal, cast - -PostMortemTriggerParamsIncidentConditionalInactivityType1 = Literal["IS"] - -POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: set[ - PostMortemTriggerParamsIncidentConditionalInactivityType1 -] = { - "IS", -} - - -def check_post_mortem_trigger_params_incident_conditional_inactivity_type_1( - value: str | None, -) -> PostMortemTriggerParamsIncidentConditionalInactivityType1 | None: - if value is None: - return None - if value in POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES: - return cast(PostMortemTriggerParamsIncidentConditionalInactivityType1, value) - raise TypeError( - f"Unexpected value {value!r}. Expected one of {POST_MORTEM_TRIGGER_PARAMS_INCIDENT_CONDITIONAL_INACTIVITY_TYPE_1_VALUES!r}" - ) diff --git a/rootly_sdk/models/print_task_params.py b/rootly_sdk/models/print_task_params.py index caf8f707..3d663b5d 100644 --- a/rootly_sdk/models/print_task_params.py +++ b/rootly_sdk/models/print_task_params.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.print_task_params_task_type import PrintTaskParamsTaskType, check_print_task_params_task_type from ..types import UNSET, Unset +from ..models.print_task_params_task_type import check_print_task_params_task_type +from ..models.print_task_params_task_type import PrintTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="PrintTaskParams") diff --git a/rootly_sdk/models/publish_incident_task_params.py b/rootly_sdk/models/publish_incident_task_params.py index f5600ce0..75638948 100644 --- a/rootly_sdk/models/publish_incident_task_params.py +++ b/rootly_sdk/models/publish_incident_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.publish_incident_task_params_status import ( - PublishIncidentTaskParamsStatus, - check_publish_incident_task_params_status, -) -from ..models.publish_incident_task_params_task_type import ( - PublishIncidentTaskParamsTaskType, - check_publish_incident_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.publish_incident_task_params_status import check_publish_incident_task_params_status +from ..models.publish_incident_task_params_status import PublishIncidentTaskParamsStatus +from ..models.publish_incident_task_params_task_type import check_publish_incident_task_params_task_type +from ..models.publish_incident_task_params_task_type import PublishIncidentTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.publish_incident_task_params_incident import PublishIncidentTaskParamsIncident from ..models.publish_incident_task_params_status_page_template import PublishIncidentTaskParamsStatusPageTemplate @@ -56,6 +55,11 @@ class PublishIncidentTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.publish_incident_task_params_incident import PublishIncidentTaskParamsIncident + from ..models.publish_incident_task_params_status_page_template import ( + PublishIncidentTaskParamsStatusPageTemplate, + ) + incident = self.incident.to_dict() public_title = self.public_title diff --git a/rootly_sdk/models/publish_incident_task_params_incident.py b/rootly_sdk/models/publish_incident_task_params_incident.py index 2b20e7ca..37c1d35f 100644 --- a/rootly_sdk/models/publish_incident_task_params_incident.py +++ b/rootly_sdk/models/publish_incident_task_params_incident.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PublishIncidentTaskParamsIncident") 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 05bd965f..cc8a21e7 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PublishIncidentTaskParamsStatusPageTemplate") diff --git a/rootly_sdk/models/pulse.py b/rootly_sdk/models/pulse.py index d5f9b38b..4d4613b8 100644 --- a/rootly_sdk/models/pulse.py +++ b/rootly_sdk/models/pulse.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.environment import Environment from ..models.pulse_data_type_0 import PulseDataType0 @@ -48,9 +51,11 @@ class Pulse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.pulse_data_type_0 import PulseDataType0 from ..models.pulse_labels_item_type_0 import PulseLabelsItemType0 + from ..models.service import Service from ..models.pulse_refs_item_type_0 import PulseRefsItemType0 + from ..models.environment import Environment + from ..models.pulse_data_type_0 import PulseDataType0 summary = self.summary diff --git a/rootly_sdk/models/pulse_data_type_0.py b/rootly_sdk/models/pulse_data_type_0.py index afcb2bbc..ee60671b 100644 --- a/rootly_sdk/models/pulse_data_type_0.py +++ b/rootly_sdk/models/pulse_data_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PulseDataType0") diff --git a/rootly_sdk/models/pulse_labels_item_type_0.py b/rootly_sdk/models/pulse_labels_item_type_0.py index ff7e4e81..7e6081f6 100644 --- a/rootly_sdk/models/pulse_labels_item_type_0.py +++ b/rootly_sdk/models/pulse_labels_item_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PulseLabelsItemType0") diff --git a/rootly_sdk/models/pulse_list.py b/rootly_sdk/models/pulse_list.py index ec980c37..1639dbaa 100644 --- a/rootly_sdk/models/pulse_list.py +++ b/rootly_sdk/models/pulse_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.pulse_list_data_item import PulseListDataItem @@ -22,14 +28,21 @@ class PulseList: data (list[PulseListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[PulseListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.pulse_list_data_item import PulseListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.pulse_list_data_item import PulseListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + pulse_list = cls( data=data, links=links, meta=meta, + included=included, ) pulse_list.additional_properties = d diff --git a/rootly_sdk/models/pulse_list_data_item.py b/rootly_sdk/models/pulse_list_data_item.py index 8a4f7e68..11ec3cbd 100644 --- a/rootly_sdk/models/pulse_list_data_item.py +++ b/rootly_sdk/models/pulse_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.pulse_list_data_item_type import PulseListDataItemType, check_pulse_list_data_item_type +from ..types import UNSET, Unset + +from ..models.pulse_list_data_item_type import check_pulse_list_data_item_type +from ..models.pulse_list_data_item_type import PulseListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.pulse import Pulse @@ -30,6 +34,8 @@ class PulseListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.pulse import Pulse + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/pulse_refs_item_type_0.py b/rootly_sdk/models/pulse_refs_item_type_0.py index c65c8b53..74c82441 100644 --- a/rootly_sdk/models/pulse_refs_item_type_0.py +++ b/rootly_sdk/models/pulse_refs_item_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="PulseRefsItemType0") diff --git a/rootly_sdk/models/pulse_response.py b/rootly_sdk/models/pulse_response.py index 663d9fec..c04b37d0 100644 --- a/rootly_sdk/models/pulse_response.py +++ b/rootly_sdk/models/pulse_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.pulse_response_data import PulseResponseData @@ -18,14 +24,26 @@ class PulseResponse: """ Attributes: data (PulseResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: PulseResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.pulse_response_data import PulseResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.pulse_response_data import PulseResponseData d = dict(src_dict) data = PulseResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + pulse_response = cls( data=data, + included=included, ) pulse_response.additional_properties = d diff --git a/rootly_sdk/models/pulse_response_data.py b/rootly_sdk/models/pulse_response_data.py index f9fe8791..ee1c5888 100644 --- a/rootly_sdk/models/pulse_response_data.py +++ b/rootly_sdk/models/pulse_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.pulse_response_data_type import PulseResponseDataType, check_pulse_response_data_type +from ..types import UNSET, Unset + +from ..models.pulse_response_data_type import check_pulse_response_data_type +from ..models.pulse_response_data_type import PulseResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.pulse import Pulse @@ -30,6 +34,8 @@ class PulseResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.pulse import Pulse + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/pulse_trigger_params.py b/rootly_sdk/models/pulse_trigger_params.py index 138e75d9..c28f2608 100644 --- a/rootly_sdk/models/pulse_trigger_params.py +++ b/rootly_sdk/models/pulse_trigger_params.py @@ -1,37 +1,29 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.pulse_trigger_params_pulse_condition import ( - PulseTriggerParamsPulseCondition, - check_pulse_trigger_params_pulse_condition, -) -from ..models.pulse_trigger_params_pulse_condition_label import ( - PulseTriggerParamsPulseConditionLabel, - check_pulse_trigger_params_pulse_condition_label, -) -from ..models.pulse_trigger_params_pulse_condition_payload import ( - PulseTriggerParamsPulseConditionPayload, - check_pulse_trigger_params_pulse_condition_payload, -) -from ..models.pulse_trigger_params_pulse_condition_source import ( - PulseTriggerParamsPulseConditionSource, - check_pulse_trigger_params_pulse_condition_source, -) -from ..models.pulse_trigger_params_trigger_type import ( - PulseTriggerParamsTriggerType, - check_pulse_trigger_params_trigger_type, -) -from ..models.pulse_trigger_params_triggers_item import ( - PulseTriggerParamsTriggersItem, - check_pulse_trigger_params_triggers_item, -) from ..types import UNSET, Unset +from ..models.pulse_trigger_params_pulse_condition import check_pulse_trigger_params_pulse_condition +from ..models.pulse_trigger_params_pulse_condition import PulseTriggerParamsPulseCondition +from ..models.pulse_trigger_params_pulse_condition_label import check_pulse_trigger_params_pulse_condition_label +from ..models.pulse_trigger_params_pulse_condition_label import PulseTriggerParamsPulseConditionLabel +from ..models.pulse_trigger_params_pulse_condition_payload import check_pulse_trigger_params_pulse_condition_payload +from ..models.pulse_trigger_params_pulse_condition_payload import PulseTriggerParamsPulseConditionPayload +from ..models.pulse_trigger_params_pulse_condition_source import check_pulse_trigger_params_pulse_condition_source +from ..models.pulse_trigger_params_pulse_condition_source import PulseTriggerParamsPulseConditionSource +from ..models.pulse_trigger_params_trigger_type import check_pulse_trigger_params_trigger_type +from ..models.pulse_trigger_params_trigger_type import PulseTriggerParamsTriggerType +from ..models.pulse_trigger_params_triggers_item import check_pulse_trigger_params_triggers_item +from ..models.pulse_trigger_params_triggers_item import PulseTriggerParamsTriggersItem +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="PulseTriggerParams") diff --git a/rootly_sdk/models/receipt.py b/rootly_sdk/models/receipt.py new file mode 100644 index 00000000..77508ed9 --- /dev/null +++ b/rootly_sdk/models/receipt.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.receipt_reason import check_receipt_reason +from ..models.receipt_reason import ReceiptReason +from ..models.receipt_state import check_receipt_state +from ..models.receipt_state import ReceiptState +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="Receipt") + + +@_attrs_define +class Receipt: + """ + Attributes: + state (ReceiptState): Delivery state of the receipt. + reason (ReceiptReason | Unset): Reason a receipt failed. Present when state is failed. + resource_type (str | Unset): Type of the referenced resource (present when set). + resource_id (str | Unset): ID of the referenced resource (present when set). + """ + + state: ReceiptState + reason: ReceiptReason | Unset = UNSET + resource_type: str | Unset = UNSET + resource_id: str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + state: str = self.state + + reason: str | Unset = UNSET + if not isinstance(self.reason, Unset): + reason = self.reason + + resource_type = self.resource_type + + resource_id = self.resource_id + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "state": state, + } + ) + if reason is not UNSET: + field_dict["reason"] = reason + if resource_type is not UNSET: + field_dict["resource_type"] = resource_type + if resource_id is not UNSET: + field_dict["resource_id"] = resource_id + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + state = check_receipt_state(d.pop("state")) + + _reason = d.pop("reason", UNSET) + reason: ReceiptReason | Unset + if isinstance(_reason, Unset): + reason = UNSET + else: + reason = check_receipt_reason(_reason) + + resource_type = d.pop("resource_type", UNSET) + + resource_id = d.pop("resource_id", UNSET) + + receipt = cls( + state=state, + reason=reason, + resource_type=resource_type, + resource_id=resource_id, + ) + + receipt.additional_properties = d + return receipt + + @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/receipt_reason.py b/rootly_sdk/models/receipt_reason.py new file mode 100644 index 00000000..ebafb401 --- /dev/null +++ b/rootly_sdk/models/receipt_reason.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +ReceiptReason = Literal["deduplicated", "no_route_matched", "suppressed", "validation_error"] + +RECEIPT_REASON_VALUES: set[ReceiptReason] = { + "deduplicated", + "no_route_matched", + "suppressed", + "validation_error", +} + + +def check_receipt_reason(value: str | None) -> ReceiptReason | None: + if value is None: + return None + if value in RECEIPT_REASON_VALUES: + return cast(ReceiptReason, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {RECEIPT_REASON_VALUES!r}") diff --git a/rootly_sdk/models/receipt_state.py b/rootly_sdk/models/receipt_state.py new file mode 100644 index 00000000..b4e11286 --- /dev/null +++ b/rootly_sdk/models/receipt_state.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +ReceiptState = Literal["done", "failed", "pending"] + +RECEIPT_STATE_VALUES: set[ReceiptState] = { + "done", + "failed", + "pending", +} + + +def check_receipt_state(value: str | None) -> ReceiptState | None: + if value is None: + return None + if value in RECEIPT_STATE_VALUES: + return cast(ReceiptState, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {RECEIPT_STATE_VALUES!r}") diff --git a/rootly_sdk/models/redis_client_task_params.py b/rootly_sdk/models/redis_client_task_params.py index 62446bca..8944ff6f 100644 --- a/rootly_sdk/models/redis_client_task_params.py +++ b/rootly_sdk/models/redis_client_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.redis_client_task_params_task_type import ( - RedisClientTaskParamsTaskType, - check_redis_client_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.redis_client_task_params_task_type import check_redis_client_task_params_task_type +from ..models.redis_client_task_params_task_type import RedisClientTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.redis_client_task_params_post_to_slack_channels_item import ( RedisClientTaskParamsPostToSlackChannelsItem, @@ -44,6 +45,10 @@ class RedisClientTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.redis_client_task_params_post_to_slack_channels_item import ( + RedisClientTaskParamsPostToSlackChannelsItem, + ) + url = self.url commands = self.commands 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 f9bb82cb..f8381c51 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="RedisClientTaskParamsPostToSlackChannelsItem") 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 4caa857f..31c38b06 100644 --- a/rootly_sdk/models/remove_google_docs_permissions_task_params.py +++ b/rootly_sdk/models/remove_google_docs_permissions_task_params.py @@ -1,20 +1,26 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.remove_google_docs_permissions_task_params_attribute_to_query_by import ( - RemoveGoogleDocsPermissionsTaskParamsAttributeToQueryBy, check_remove_google_docs_permissions_task_params_attribute_to_query_by, ) +from ..models.remove_google_docs_permissions_task_params_attribute_to_query_by import ( + RemoveGoogleDocsPermissionsTaskParamsAttributeToQueryBy, +) from ..models.remove_google_docs_permissions_task_params_task_type import ( - RemoveGoogleDocsPermissionsTaskParamsTaskType, check_remove_google_docs_permissions_task_params_task_type, ) +from ..models.remove_google_docs_permissions_task_params_task_type import RemoveGoogleDocsPermissionsTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="RemoveGoogleDocsPermissionsTaskParams") diff --git a/rootly_sdk/models/remove_subscribers.py b/rootly_sdk/models/remove_subscribers.py index 7393a0e3..126858f8 100644 --- a/rootly_sdk/models/remove_subscribers.py +++ b/rootly_sdk/models/remove_subscribers.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.remove_subscribers_data import RemoveSubscribersData @@ -24,6 +28,8 @@ class RemoveSubscribers: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.remove_subscribers_data import RemoveSubscribersData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/remove_subscribers_data.py b/rootly_sdk/models/remove_subscribers_data.py index cc8fd21e..550c0335 100644 --- a/rootly_sdk/models/remove_subscribers_data.py +++ b/rootly_sdk/models/remove_subscribers_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.remove_subscribers_data_type import RemoveSubscribersDataType, check_remove_subscribers_data_type +from ..types import UNSET, Unset + +from ..models.remove_subscribers_data_type import check_remove_subscribers_data_type +from ..models.remove_subscribers_data_type import RemoveSubscribersDataType +from typing import cast if TYPE_CHECKING: from ..models.remove_subscribers_data_attributes import RemoveSubscribersDataAttributes @@ -28,6 +32,8 @@ class RemoveSubscribersData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.remove_subscribers_data_attributes import RemoveSubscribersDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/remove_subscribers_data_attributes.py b/rootly_sdk/models/remove_subscribers_data_attributes.py index a2b72357..2b30ec4d 100644 --- a/rootly_sdk/models/remove_subscribers_data_attributes.py +++ b/rootly_sdk/models/remove_subscribers_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="RemoveSubscribersDataAttributes") diff --git a/rootly_sdk/models/rename_google_chat_space_task_params.py b/rootly_sdk/models/rename_google_chat_space_task_params.py new file mode 100644 index 00000000..66af95f5 --- /dev/null +++ b/rootly_sdk/models/rename_google_chat_space_task_params.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.rename_google_chat_space_task_params_task_type import check_rename_google_chat_space_task_params_task_type +from ..models.rename_google_chat_space_task_params_task_type import RenameGoogleChatSpaceTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.rename_google_chat_space_task_params_space import RenameGoogleChatSpaceTaskParamsSpace + + +T = TypeVar("T", bound="RenameGoogleChatSpaceTaskParams") + + +@_attrs_define +class RenameGoogleChatSpaceTaskParams: + """ + Attributes: + space (RenameGoogleChatSpaceTaskParamsSpace): + title (str): + task_type (RenameGoogleChatSpaceTaskParamsTaskType | Unset): + """ + + space: RenameGoogleChatSpaceTaskParamsSpace + title: str + task_type: RenameGoogleChatSpaceTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.rename_google_chat_space_task_params_space import RenameGoogleChatSpaceTaskParamsSpace + + space = self.space.to_dict() + + title = self.title + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "space": space, + "title": title, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.rename_google_chat_space_task_params_space import RenameGoogleChatSpaceTaskParamsSpace + + d = dict(src_dict) + space = RenameGoogleChatSpaceTaskParamsSpace.from_dict(d.pop("space")) + + title = d.pop("title") + + _task_type = d.pop("task_type", UNSET) + task_type: RenameGoogleChatSpaceTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_rename_google_chat_space_task_params_task_type(_task_type) + + rename_google_chat_space_task_params = cls( + space=space, + title=title, + task_type=task_type, + ) + + rename_google_chat_space_task_params.additional_properties = d + return rename_google_chat_space_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/rename_google_chat_space_task_params_space.py b/rootly_sdk/models/rename_google_chat_space_task_params_space.py new file mode 100644 index 00000000..d078ccb0 --- /dev/null +++ b/rootly_sdk/models/rename_google_chat_space_task_params_space.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="RenameGoogleChatSpaceTaskParamsSpace") + + +@_attrs_define +class RenameGoogleChatSpaceTaskParamsSpace: + """ + 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) + + rename_google_chat_space_task_params_space = cls( + id=id, + name=name, + ) + + rename_google_chat_space_task_params_space.additional_properties = d + return rename_google_chat_space_task_params_space + + @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/rename_google_chat_space_task_params_task_type.py b/rootly_sdk/models/rename_google_chat_space_task_params_task_type.py new file mode 100644 index 00000000..1b672166 --- /dev/null +++ b/rootly_sdk/models/rename_google_chat_space_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +RenameGoogleChatSpaceTaskParamsTaskType = Literal["rename_google_chat_space"] + +RENAME_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: set[RenameGoogleChatSpaceTaskParamsTaskType] = { + "rename_google_chat_space", +} + + +def check_rename_google_chat_space_task_params_task_type( + value: str | None, +) -> RenameGoogleChatSpaceTaskParamsTaskType | None: + if value is None: + return None + if value in RENAME_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(RenameGoogleChatSpaceTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {RENAME_GOOGLE_CHAT_SPACE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) 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 c5ecded6..195ccae1 100644 --- a/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.rename_microsoft_teams_channel_task_params_task_type import ( - RenameMicrosoftTeamsChannelTaskParamsTaskType, check_rename_microsoft_teams_channel_task_params_task_type, ) +from ..models.rename_microsoft_teams_channel_task_params_task_type import RenameMicrosoftTeamsChannelTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.rename_microsoft_teams_channel_task_params_channel import RenameMicrosoftTeamsChannelTaskParamsChannel @@ -37,6 +40,11 @@ class RenameMicrosoftTeamsChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.rename_microsoft_teams_channel_task_params_channel import ( + RenameMicrosoftTeamsChannelTaskParamsChannel, + ) + from ..models.rename_microsoft_teams_channel_task_params_team import RenameMicrosoftTeamsChannelTaskParamsTeam + team = self.team.to_dict() channel = self.channel.to_dict() 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 adc80c16..fe14a8ad 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="RenameMicrosoftTeamsChannelTaskParamsChannel") 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 45eda40c..c4dda761 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="RenameMicrosoftTeamsChannelTaskParamsTeam") diff --git a/rootly_sdk/models/rename_slack_channel_task_params.py b/rootly_sdk/models/rename_slack_channel_task_params.py index e5b419ff..50d5c18e 100644 --- a/rootly_sdk/models/rename_slack_channel_task_params.py +++ b/rootly_sdk/models/rename_slack_channel_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.rename_slack_channel_task_params_task_type import ( - RenameSlackChannelTaskParamsTaskType, - check_rename_slack_channel_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.rename_slack_channel_task_params_task_type import check_rename_slack_channel_task_params_task_type +from ..models.rename_slack_channel_task_params_task_type import RenameSlackChannelTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.rename_slack_channel_task_params_channel import RenameSlackChannelTaskParamsChannel @@ -34,6 +35,8 @@ class RenameSlackChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.rename_slack_channel_task_params_channel import RenameSlackChannelTaskParamsChannel + channel = self.channel.to_dict() title = self.title 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 e2cc7d5f..8c60de6d 100644 --- a/rootly_sdk/models/rename_slack_channel_task_params_channel.py +++ b/rootly_sdk/models/rename_slack_channel_task_params_channel.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="RenameSlackChannelTaskParamsChannel") diff --git a/rootly_sdk/models/resolve_alert.py b/rootly_sdk/models/resolve_alert.py index 70892c51..2e3c5cf8 100644 --- a/rootly_sdk/models/resolve_alert.py +++ b/rootly_sdk/models/resolve_alert.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.resolve_alert_data import ResolveAlertData @@ -26,6 +29,8 @@ class ResolveAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.resolve_alert_data import ResolveAlertData + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/resolve_alert_data.py b/rootly_sdk/models/resolve_alert_data.py index e35a0113..73df8cd0 100644 --- a/rootly_sdk/models/resolve_alert_data.py +++ b/rootly_sdk/models/resolve_alert_data.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.resolve_alert_data_type import ResolveAlertDataType, check_resolve_alert_data_type from ..types import UNSET, Unset +from ..models.resolve_alert_data_type import check_resolve_alert_data_type +from ..models.resolve_alert_data_type import ResolveAlertDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.resolve_alert_data_attributes import ResolveAlertDataAttributes @@ -29,6 +33,8 @@ class ResolveAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.resolve_alert_data_attributes import ResolveAlertDataAttributes + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/resolve_alert_data_attributes.py b/rootly_sdk/models/resolve_alert_data_attributes.py index 145979dc..85281970 100644 --- a/rootly_sdk/models/resolve_alert_data_attributes.py +++ b/rootly_sdk/models/resolve_alert_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="ResolveAlertDataAttributes") diff --git a/rootly_sdk/models/resolve_incident.py b/rootly_sdk/models/resolve_incident.py index 466294e2..ddc07c28 100644 --- a/rootly_sdk/models/resolve_incident.py +++ b/rootly_sdk/models/resolve_incident.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.resolve_incident_data import ResolveIncidentData @@ -24,6 +28,8 @@ class ResolveIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.resolve_incident_data import ResolveIncidentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/resolve_incident_data.py b/rootly_sdk/models/resolve_incident_data.py index 79454ac7..43702cfe 100644 --- a/rootly_sdk/models/resolve_incident_data.py +++ b/rootly_sdk/models/resolve_incident_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.resolve_incident_data_type import ResolveIncidentDataType, check_resolve_incident_data_type +from ..types import UNSET, Unset + +from ..models.resolve_incident_data_type import check_resolve_incident_data_type +from ..models.resolve_incident_data_type import ResolveIncidentDataType +from typing import cast if TYPE_CHECKING: from ..models.resolve_incident_data_attributes import ResolveIncidentDataAttributes @@ -28,6 +32,8 @@ class ResolveIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.resolve_incident_data_attributes import ResolveIncidentDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/resolve_incident_data_attributes.py b/rootly_sdk/models/resolve_incident_data_attributes.py index f692c9d9..68a84eff 100644 --- a/rootly_sdk/models/resolve_incident_data_attributes.py +++ b/rootly_sdk/models/resolve_incident_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="ResolveIncidentDataAttributes") diff --git a/rootly_sdk/models/restart_incident.py b/rootly_sdk/models/restart_incident.py index 87a940c1..876c066b 100644 --- a/rootly_sdk/models/restart_incident.py +++ b/rootly_sdk/models/restart_incident.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.restart_incident_data import RestartIncidentData @@ -24,6 +28,8 @@ class RestartIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.restart_incident_data import RestartIncidentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/restart_incident_data.py b/rootly_sdk/models/restart_incident_data.py index 149161b4..34dfc0ff 100644 --- a/rootly_sdk/models/restart_incident_data.py +++ b/rootly_sdk/models/restart_incident_data.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.restart_incident_data_type import RestartIncidentDataType, check_restart_incident_data_type from ..types import UNSET, Unset +from ..models.restart_incident_data_type import check_restart_incident_data_type +from ..models.restart_incident_data_type import RestartIncidentDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.restart_incident_data_attributes import RestartIncidentDataAttributes @@ -29,6 +33,8 @@ class RestartIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.restart_incident_data_attributes import RestartIncidentDataAttributes + type_: str = self.type_ attributes: dict[str, Any] | Unset = UNSET diff --git a/rootly_sdk/models/restart_incident_data_attributes.py b/rootly_sdk/models/restart_incident_data_attributes.py index 3d95b753..feba786c 100644 --- a/rootly_sdk/models/restart_incident_data_attributes.py +++ b/rootly_sdk/models/restart_incident_data_attributes.py @@ -1,9 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + T = TypeVar("T", bound="RestartIncidentDataAttributes") diff --git a/rootly_sdk/models/retrospective_configuration.py b/rootly_sdk/models/retrospective_configuration.py index f2ccd845..48793c1a 100644 --- a/rootly_sdk/models/retrospective_configuration.py +++ b/rootly_sdk/models/retrospective_configuration.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.retrospective_configuration_kind import ( - RetrospectiveConfigurationKind, - check_retrospective_configuration_kind, -) from ..types import UNSET, Unset +from ..models.retrospective_configuration_kind import check_retrospective_configuration_kind +from ..models.retrospective_configuration_kind import RetrospectiveConfigurationKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="RetrospectiveConfiguration") diff --git a/rootly_sdk/models/retrospective_configuration_list.py b/rootly_sdk/models/retrospective_configuration_list.py index 30398957..c077e708 100644 --- a/rootly_sdk/models/retrospective_configuration_list.py +++ b/rootly_sdk/models/retrospective_configuration_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_list_data_item import RetrospectiveConfigurationListDataItem @@ -18,17 +24,29 @@ class RetrospectiveConfigurationList: """ Attributes: data (list[RetrospectiveConfigurationListDataItem]): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveConfigurationListDataItem] + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_configuration_list_data_item import RetrospectiveConfigurationListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() data.append(data_item) + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -36,11 +54,14 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_list_data_item import RetrospectiveConfigurationListDataItem d = dict(src_dict) @@ -51,8 +72,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: data.append(data_item) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_configuration_list = cls( data=data, + included=included, ) retrospective_configuration_list.additional_properties = d diff --git a/rootly_sdk/models/retrospective_configuration_list_data_item.py b/rootly_sdk/models/retrospective_configuration_list_data_item.py index 55494c90..784722ab 100644 --- a/rootly_sdk/models/retrospective_configuration_list_data_item.py +++ b/rootly_sdk/models/retrospective_configuration_list_data_item.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.retrospective_configuration_list_data_item_type import ( - RetrospectiveConfigurationListDataItemType, check_retrospective_configuration_list_data_item_type, ) +from ..models.retrospective_configuration_list_data_item_type import RetrospectiveConfigurationListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_configuration import RetrospectiveConfiguration @@ -33,6 +36,8 @@ class RetrospectiveConfigurationListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_configuration import RetrospectiveConfiguration + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_configuration_response.py b/rootly_sdk/models/retrospective_configuration_response.py index 56b42d68..51633a9c 100644 --- a/rootly_sdk/models/retrospective_configuration_response.py +++ b/rootly_sdk/models/retrospective_configuration_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_response_data import RetrospectiveConfigurationResponseData @@ -18,14 +24,26 @@ class RetrospectiveConfigurationResponse: """ Attributes: data (RetrospectiveConfigurationResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveConfigurationResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_configuration_response_data import RetrospectiveConfigurationResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_response_data import RetrospectiveConfigurationResponseData d = dict(src_dict) data = RetrospectiveConfigurationResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_configuration_response = cls( data=data, + included=included, ) retrospective_configuration_response.additional_properties = d diff --git a/rootly_sdk/models/retrospective_configuration_response_data.py b/rootly_sdk/models/retrospective_configuration_response_data.py index 430c8851..8d170052 100644 --- a/rootly_sdk/models/retrospective_configuration_response_data.py +++ b/rootly_sdk/models/retrospective_configuration_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.retrospective_configuration_response_data_type import ( - RetrospectiveConfigurationResponseDataType, - check_retrospective_configuration_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.retrospective_configuration_response_data_type import check_retrospective_configuration_response_data_type +from ..models.retrospective_configuration_response_data_type import RetrospectiveConfigurationResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_configuration import RetrospectiveConfiguration @@ -33,6 +34,8 @@ class RetrospectiveConfigurationResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_configuration import RetrospectiveConfiguration + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process.py b/rootly_sdk/models/retrospective_process.py index 05b0511d..3fb99528 100644 --- a/rootly_sdk/models/retrospective_process.py +++ b/rootly_sdk/models/retrospective_process.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.retrospective_process_retrospective_process_matching_criteria_type_0 import ( RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0, @@ -53,12 +56,15 @@ class RetrospectiveProcess: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process_retrospective_process_matching_criteria_type_0 import ( - RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0, + from ..models.retrospective_process_retrospective_process_matching_criteria_type_2 import ( + RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2, ) from ..models.retrospective_process_retrospective_process_matching_criteria_type_1 import ( RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1, ) + from ..models.retrospective_process_retrospective_process_matching_criteria_type_0 import ( + RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0, + ) name = self.name diff --git a/rootly_sdk/models/retrospective_process_group.py b/rootly_sdk/models/retrospective_process_group.py index c6214add..f17f622c 100644 --- a/rootly_sdk/models/retrospective_process_group.py +++ b/rootly_sdk/models/retrospective_process_group.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="RetrospectiveProcessGroup") diff --git a/rootly_sdk/models/retrospective_process_group_list.py b/rootly_sdk/models/retrospective_process_group_list.py index e55e6833..fc85ec05 100644 --- a/rootly_sdk/models/retrospective_process_group_list.py +++ b/rootly_sdk/models/retrospective_process_group_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_group_list_data_item import RetrospectiveProcessGroupListDataItem @@ -22,14 +28,21 @@ class RetrospectiveProcessGroupList: data (list[RetrospectiveProcessGroupListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveProcessGroupListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.retrospective_process_group_list_data_item import RetrospectiveProcessGroupListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_group_list_data_item import RetrospectiveProcessGroupListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_group_list = cls( data=data, links=links, meta=meta, + included=included, ) retrospective_process_group_list.additional_properties = d 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 bd83fc5d..4d49fe51 100644 --- a/rootly_sdk/models/retrospective_process_group_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_group_list_data_item.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.retrospective_process_group_list_data_item_type import ( - RetrospectiveProcessGroupListDataItemType, check_retrospective_process_group_list_data_item_type, ) +from ..models.retrospective_process_group_list_data_item_type import RetrospectiveProcessGroupListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_process_group import RetrospectiveProcessGroup @@ -33,6 +36,8 @@ class RetrospectiveProcessGroupListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_process_group import RetrospectiveProcessGroup + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_group_response.py b/rootly_sdk/models/retrospective_process_group_response.py index 28a77ec2..85ccde29 100644 --- a/rootly_sdk/models/retrospective_process_group_response.py +++ b/rootly_sdk/models/retrospective_process_group_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_response_data import RetrospectiveProcessGroupResponseData @@ -18,14 +24,26 @@ class RetrospectiveProcessGroupResponse: """ Attributes: data (RetrospectiveProcessGroupResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveProcessGroupResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.retrospective_process_group_response_data import RetrospectiveProcessGroupResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_response_data import RetrospectiveProcessGroupResponseData d = dict(src_dict) data = RetrospectiveProcessGroupResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_group_response = cls( data=data, + included=included, ) retrospective_process_group_response.additional_properties = d diff --git a/rootly_sdk/models/retrospective_process_group_response_data.py b/rootly_sdk/models/retrospective_process_group_response_data.py index e031954a..59cddffb 100644 --- a/rootly_sdk/models/retrospective_process_group_response_data.py +++ b/rootly_sdk/models/retrospective_process_group_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.retrospective_process_group_response_data_type import ( - RetrospectiveProcessGroupResponseDataType, - check_retrospective_process_group_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.retrospective_process_group_response_data_type import check_retrospective_process_group_response_data_type +from ..models.retrospective_process_group_response_data_type import RetrospectiveProcessGroupResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_process_group import RetrospectiveProcessGroup @@ -33,6 +34,8 @@ class RetrospectiveProcessGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_process_group import RetrospectiveProcessGroup + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_group_step.py b/rootly_sdk/models/retrospective_process_group_step.py index d03eeab7..3aa14e0b 100644 --- a/rootly_sdk/models/retrospective_process_group_step.py +++ b/rootly_sdk/models/retrospective_process_group_step.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="RetrospectiveProcessGroupStep") diff --git a/rootly_sdk/models/retrospective_process_group_step_list.py b/rootly_sdk/models/retrospective_process_group_step_list.py index 215c2e5f..9fe5a3fe 100644 --- a/rootly_sdk/models/retrospective_process_group_step_list.py +++ b/rootly_sdk/models/retrospective_process_group_step_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_group_step_list_data_item import RetrospectiveProcessGroupStepListDataItem @@ -22,14 +28,21 @@ class RetrospectiveProcessGroupStepList: data (list[RetrospectiveProcessGroupStepListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveProcessGroupStepListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_process_group_step_list_data_item import RetrospectiveProcessGroupStepListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_group_step_list_data_item import RetrospectiveProcessGroupStepListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_group_step_list = cls( data=data, links=links, meta=meta, + included=included, ) retrospective_process_group_step_list.additional_properties = d 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 51a6371d..0ce8c5d9 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,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.retrospective_process_group_step_list_data_item_type import ( - RetrospectiveProcessGroupStepListDataItemType, check_retrospective_process_group_step_list_data_item_type, ) +from ..models.retrospective_process_group_step_list_data_item_type import RetrospectiveProcessGroupStepListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_process_group_step import RetrospectiveProcessGroupStep @@ -33,6 +36,8 @@ class RetrospectiveProcessGroupStepListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_process_group_step import RetrospectiveProcessGroupStep + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_group_step_response.py b/rootly_sdk/models/retrospective_process_group_step_response.py index 2a20a98c..773bf1ac 100644 --- a/rootly_sdk/models/retrospective_process_group_step_response.py +++ b/rootly_sdk/models/retrospective_process_group_step_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_step_response_data import RetrospectiveProcessGroupStepResponseData @@ -18,14 +24,26 @@ class RetrospectiveProcessGroupStepResponse: """ Attributes: data (RetrospectiveProcessGroupStepResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveProcessGroupStepResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_process_group_step_response_data import RetrospectiveProcessGroupStepResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_step_response_data import RetrospectiveProcessGroupStepResponseData d = dict(src_dict) data = RetrospectiveProcessGroupStepResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_group_step_response = cls( data=data, + included=included, ) retrospective_process_group_step_response.additional_properties = d 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 786a454c..83ba8529 100644 --- a/rootly_sdk/models/retrospective_process_group_step_response_data.py +++ b/rootly_sdk/models/retrospective_process_group_step_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.retrospective_process_group_step_response_data_type import ( - RetrospectiveProcessGroupStepResponseDataType, check_retrospective_process_group_step_response_data_type, ) +from ..models.retrospective_process_group_step_response_data_type import RetrospectiveProcessGroupStepResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_process_group_step import RetrospectiveProcessGroupStep @@ -33,6 +36,8 @@ class RetrospectiveProcessGroupStepResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_process_group_step import RetrospectiveProcessGroupStep + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_list.py b/rootly_sdk/models/retrospective_process_list.py index 1026fd52..6fbe08f4 100644 --- a/rootly_sdk/models/retrospective_process_list.py +++ b/rootly_sdk/models/retrospective_process_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_list_data_item import RetrospectiveProcessListDataItem @@ -22,14 +28,21 @@ class RetrospectiveProcessList: data (list[RetrospectiveProcessListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveProcessListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.retrospective_process_list_data_item import RetrospectiveProcessListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_process_list_data_item import RetrospectiveProcessListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_list = cls( data=data, links=links, meta=meta, + included=included, ) retrospective_process_list.additional_properties = d diff --git a/rootly_sdk/models/retrospective_process_list_data_item.py b/rootly_sdk/models/retrospective_process_list_data_item.py index a63c45f5..23f308b3 100644 --- a/rootly_sdk/models/retrospective_process_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.retrospective_process_list_data_item_type import ( - RetrospectiveProcessListDataItemType, - check_retrospective_process_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.retrospective_process_list_data_item_type import check_retrospective_process_list_data_item_type +from ..models.retrospective_process_list_data_item_type import RetrospectiveProcessListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_process import RetrospectiveProcess @@ -33,6 +34,8 @@ class RetrospectiveProcessListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_process import RetrospectiveProcess + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_process_response.py b/rootly_sdk/models/retrospective_process_response.py index 7070b2eb..132b6d56 100644 --- a/rootly_sdk/models/retrospective_process_response.py +++ b/rootly_sdk/models/retrospective_process_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_response_data import RetrospectiveProcessResponseData @@ -18,14 +24,26 @@ class RetrospectiveProcessResponse: """ Attributes: data (RetrospectiveProcessResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveProcessResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_process_response_data import RetrospectiveProcessResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_response_data import RetrospectiveProcessResponseData d = dict(src_dict) data = RetrospectiveProcessResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_process_response = cls( data=data, + included=included, ) retrospective_process_response.additional_properties = d diff --git a/rootly_sdk/models/retrospective_process_response_data.py b/rootly_sdk/models/retrospective_process_response_data.py index 2b72ed88..bb4029df 100644 --- a/rootly_sdk/models/retrospective_process_response_data.py +++ b/rootly_sdk/models/retrospective_process_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.retrospective_process_response_data_type import ( - RetrospectiveProcessResponseDataType, - check_retrospective_process_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.retrospective_process_response_data_type import check_retrospective_process_response_data_type +from ..models.retrospective_process_response_data_type import RetrospectiveProcessResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_process import RetrospectiveProcess @@ -33,6 +34,8 @@ class RetrospectiveProcessResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_process import RetrospectiveProcess + id = self.id type_: str = self.type_ 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 dc946fab..9f974ab8 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,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0") 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 07a6c5da..6eaed4b9 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,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1") 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 4243efab..9426cb50 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,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2") diff --git a/rootly_sdk/models/retrospective_step.py b/rootly_sdk/models/retrospective_step.py index 2f2c7941..72bd6cbd 100644 --- a/rootly_sdk/models/retrospective_step.py +++ b/rootly_sdk/models/retrospective_step.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="RetrospectiveStep") diff --git a/rootly_sdk/models/retrospective_step_list.py b/rootly_sdk/models/retrospective_step_list.py index 0637abde..7a95dc96 100644 --- a/rootly_sdk/models/retrospective_step_list.py +++ b/rootly_sdk/models/retrospective_step_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_step_list_data_item import RetrospectiveStepListDataItem @@ -22,14 +28,21 @@ class RetrospectiveStepList: data (list[RetrospectiveStepListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RetrospectiveStepListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_step_list_data_item import RetrospectiveStepListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.retrospective_step_list_data_item import RetrospectiveStepListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_step_list = cls( data=data, links=links, meta=meta, + included=included, ) retrospective_step_list.additional_properties = d diff --git a/rootly_sdk/models/retrospective_step_list_data_item.py b/rootly_sdk/models/retrospective_step_list_data_item.py index 3080ab76..00f0b08f 100644 --- a/rootly_sdk/models/retrospective_step_list_data_item.py +++ b/rootly_sdk/models/retrospective_step_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.retrospective_step_list_data_item_type import ( - RetrospectiveStepListDataItemType, - check_retrospective_step_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.retrospective_step_list_data_item_type import check_retrospective_step_list_data_item_type +from ..models.retrospective_step_list_data_item_type import RetrospectiveStepListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_step import RetrospectiveStep @@ -33,6 +34,8 @@ class RetrospectiveStepListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_step import RetrospectiveStep + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/retrospective_step_response.py b/rootly_sdk/models/retrospective_step_response.py index 4b45f083..1fd905fe 100644 --- a/rootly_sdk/models/retrospective_step_response.py +++ b/rootly_sdk/models/retrospective_step_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_step_response_data import RetrospectiveStepResponseData @@ -18,14 +24,26 @@ class RetrospectiveStepResponse: """ Attributes: data (RetrospectiveStepResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RetrospectiveStepResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_step_response_data import RetrospectiveStepResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_step_response_data import RetrospectiveStepResponseData d = dict(src_dict) data = RetrospectiveStepResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + retrospective_step_response = cls( data=data, + included=included, ) retrospective_step_response.additional_properties = d diff --git a/rootly_sdk/models/retrospective_step_response_data.py b/rootly_sdk/models/retrospective_step_response_data.py index db9cd74c..9a8ec7f1 100644 --- a/rootly_sdk/models/retrospective_step_response_data.py +++ b/rootly_sdk/models/retrospective_step_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.retrospective_step_response_data_type import ( - RetrospectiveStepResponseDataType, - check_retrospective_step_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.retrospective_step_response_data_type import check_retrospective_step_response_data_type +from ..models.retrospective_step_response_data_type import RetrospectiveStepResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.retrospective_step import RetrospectiveStep @@ -33,6 +34,8 @@ class RetrospectiveStepResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.retrospective_step import RetrospectiveStep + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/role.py b/rootly_sdk/models/role.py index 58edeedd..d4353f5a 100644 --- a/rootly_sdk/models/role.py +++ b/rootly_sdk/models/role.py @@ -1,97 +1,83 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.role_alerts_permissions_item import RoleAlertsPermissionsItem, check_role_alerts_permissions_item -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, -) -from ..models.role_form_fields_permissions_item import ( - RoleFormFieldsPermissionsItem, - check_role_form_fields_permissions_item, -) -from ..models.role_functionalities_permissions_item import ( - RoleFunctionalitiesPermissionsItem, - check_role_functionalities_permissions_item, -) -from ..models.role_groups_permissions_item import RoleGroupsPermissionsItem, check_role_groups_permissions_item -from ..models.role_incident_causes_permissions_item import ( - 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, -) -from ..models.role_incident_roles_permissions_item import ( - RoleIncidentRolesPermissionsItem, - check_role_incident_roles_permissions_item, -) -from ..models.role_incident_types_permissions_item import ( - RoleIncidentTypesPermissionsItem, - check_role_incident_types_permissions_item, -) -from ..models.role_incidents_permissions_item import RoleIncidentsPermissionsItem, check_role_incidents_permissions_item -from ..models.role_integrations_permissions_item import ( - RoleIntegrationsPermissionsItem, - check_role_integrations_permissions_item, -) -from ..models.role_invitations_permissions_item import ( - 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, - check_role_private_incidents_permissions_item, -) -from ..models.role_pulses_permissions_item import RolePulsesPermissionsItem, check_role_pulses_permissions_item -from ..models.role_retrospective_permissions_item import ( - RoleRetrospectivePermissionsItem, - check_role_retrospective_permissions_item, -) -from ..models.role_roles_permissions_item import RoleRolesPermissionsItem, check_role_roles_permissions_item -from ..models.role_secrets_permissions_item import RoleSecretsPermissionsItem, check_role_secrets_permissions_item -from ..models.role_services_permissions_item import RoleServicesPermissionsItem, check_role_services_permissions_item -from ..models.role_severities_permissions_item import ( - 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 +from ..models.role_alerts_permissions_item import check_role_alerts_permissions_item +from ..models.role_alerts_permissions_item import RoleAlertsPermissionsItem +from ..models.role_api_keys_permissions_item import check_role_api_keys_permissions_item +from ..models.role_api_keys_permissions_item import RoleApiKeysPermissionsItem +from ..models.role_audits_permissions_item import check_role_audits_permissions_item +from ..models.role_audits_permissions_item import RoleAuditsPermissionsItem +from ..models.role_billing_permissions_item import check_role_billing_permissions_item +from ..models.role_billing_permissions_item import RoleBillingPermissionsItem +from ..models.role_catalogs_permissions_item import check_role_catalogs_permissions_item +from ..models.role_catalogs_permissions_item import RoleCatalogsPermissionsItem +from ..models.role_communication_permissions_item import check_role_communication_permissions_item +from ..models.role_communication_permissions_item import RoleCommunicationPermissionsItem +from ..models.role_edge_connector_permissions_item import check_role_edge_connector_permissions_item +from ..models.role_edge_connector_permissions_item import RoleEdgeConnectorPermissionsItem +from ..models.role_environments_permissions_item import check_role_environments_permissions_item +from ..models.role_environments_permissions_item import RoleEnvironmentsPermissionsItem +from ..models.role_form_fields_permissions_item import check_role_form_fields_permissions_item +from ..models.role_form_fields_permissions_item import RoleFormFieldsPermissionsItem +from ..models.role_functionalities_permissions_item import check_role_functionalities_permissions_item +from ..models.role_functionalities_permissions_item import RoleFunctionalitiesPermissionsItem +from ..models.role_groups_permissions_item import check_role_groups_permissions_item +from ..models.role_groups_permissions_item import RoleGroupsPermissionsItem +from ..models.role_incident_causes_permissions_item import check_role_incident_causes_permissions_item +from ..models.role_incident_causes_permissions_item import RoleIncidentCausesPermissionsItem +from ..models.role_incident_communication_permissions_item import check_role_incident_communication_permissions_item +from ..models.role_incident_communication_permissions_item import RoleIncidentCommunicationPermissionsItem +from ..models.role_incident_feedbacks_permissions_item import check_role_incident_feedbacks_permissions_item +from ..models.role_incident_feedbacks_permissions_item import RoleIncidentFeedbacksPermissionsItem +from ..models.role_incident_roles_permissions_item import check_role_incident_roles_permissions_item +from ..models.role_incident_roles_permissions_item import RoleIncidentRolesPermissionsItem +from ..models.role_incident_types_permissions_item import check_role_incident_types_permissions_item +from ..models.role_incident_types_permissions_item import RoleIncidentTypesPermissionsItem +from ..models.role_incidents_permissions_item import check_role_incidents_permissions_item +from ..models.role_incidents_permissions_item import RoleIncidentsPermissionsItem +from ..models.role_integrations_permissions_item import check_role_integrations_permissions_item +from ..models.role_integrations_permissions_item import RoleIntegrationsPermissionsItem +from ..models.role_invitations_permissions_item import check_role_invitations_permissions_item +from ..models.role_invitations_permissions_item import RoleInvitationsPermissionsItem +from ..models.role_paging_permissions_item import check_role_paging_permissions_item +from ..models.role_paging_permissions_item import RolePagingPermissionsItem +from ..models.role_playbooks_permissions_item import check_role_playbooks_permissions_item +from ..models.role_playbooks_permissions_item import RolePlaybooksPermissionsItem +from ..models.role_private_incidents_permissions_item import check_role_private_incidents_permissions_item +from ..models.role_private_incidents_permissions_item import RolePrivateIncidentsPermissionsItem +from ..models.role_pulses_permissions_item import check_role_pulses_permissions_item +from ..models.role_pulses_permissions_item import RolePulsesPermissionsItem +from ..models.role_retrospective_permissions_item import check_role_retrospective_permissions_item +from ..models.role_retrospective_permissions_item import RoleRetrospectivePermissionsItem +from ..models.role_roles_permissions_item import check_role_roles_permissions_item +from ..models.role_roles_permissions_item import RoleRolesPermissionsItem +from ..models.role_secrets_permissions_item import check_role_secrets_permissions_item +from ..models.role_secrets_permissions_item import RoleSecretsPermissionsItem +from ..models.role_services_permissions_item import check_role_services_permissions_item +from ..models.role_services_permissions_item import RoleServicesPermissionsItem +from ..models.role_severities_permissions_item import check_role_severities_permissions_item +from ..models.role_severities_permissions_item import RoleSeveritiesPermissionsItem +from ..models.role_slas_permissions_item import check_role_slas_permissions_item +from ..models.role_slas_permissions_item import RoleSlasPermissionsItem +from ..models.role_status_pages_permissions_item import check_role_status_pages_permissions_item +from ..models.role_status_pages_permissions_item import RoleStatusPagesPermissionsItem +from ..models.role_sub_statuses_permissions_item import check_role_sub_statuses_permissions_item +from ..models.role_sub_statuses_permissions_item import RoleSubStatusesPermissionsItem +from ..models.role_webhooks_permissions_item import check_role_webhooks_permissions_item +from ..models.role_webhooks_permissions_item import RoleWebhooksPermissionsItem +from ..models.role_workflows_permissions_item import check_role_workflows_permissions_item +from ..models.role_workflows_permissions_item import RoleWorkflowsPermissionsItem +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="Role") diff --git a/rootly_sdk/models/role_list.py b/rootly_sdk/models/role_list.py index c7559c21..103839fc 100644 --- a/rootly_sdk/models/role_list.py +++ b/rootly_sdk/models/role_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.role_list_data_item import RoleListDataItem @@ -22,14 +28,21 @@ class RoleList: data (list[RoleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[RoleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.role_list_data_item import RoleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.role_list_data_item import RoleListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + role_list = cls( data=data, links=links, meta=meta, + included=included, ) role_list.additional_properties = d diff --git a/rootly_sdk/models/role_list_data_item.py b/rootly_sdk/models/role_list_data_item.py index 8fccfd1c..a7634784 100644 --- a/rootly_sdk/models/role_list_data_item.py +++ b/rootly_sdk/models/role_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.role_list_data_item_type import RoleListDataItemType, check_role_list_data_item_type +from ..types import UNSET, Unset + +from ..models.role_list_data_item_type import check_role_list_data_item_type +from ..models.role_list_data_item_type import RoleListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.role import Role @@ -30,6 +34,8 @@ class RoleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.role import Role + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/role_relationship.py b/rootly_sdk/models/role_relationship.py index a8a730e0..b7b8ad95 100644 --- a/rootly_sdk/models/role_relationship.py +++ b/rootly_sdk/models/role_relationship.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.role_relationship_data_type_0 import RoleRelationshipDataType0 diff --git a/rootly_sdk/models/role_relationship_data_type_0.py b/rootly_sdk/models/role_relationship_data_type_0.py index 6a7576ec..e175dabf 100644 --- a/rootly_sdk/models/role_relationship_data_type_0.py +++ b/rootly_sdk/models/role_relationship_data_type_0.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.role_relationship_data_type_0_type import ( - RoleRelationshipDataType0Type, - check_role_relationship_data_type_0_type, -) from ..types import UNSET, Unset +from ..models.role_relationship_data_type_0_type import check_role_relationship_data_type_0_type +from ..models.role_relationship_data_type_0_type import RoleRelationshipDataType0Type +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="RoleRelationshipDataType0") diff --git a/rootly_sdk/models/role_response.py b/rootly_sdk/models/role_response.py index 6c71767b..fed433ca 100644 --- a/rootly_sdk/models/role_response.py +++ b/rootly_sdk/models/role_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.role_response_data import RoleResponseData @@ -18,14 +24,26 @@ class RoleResponse: """ Attributes: data (RoleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: RoleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.role_response_data import RoleResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.role_response_data import RoleResponseData d = dict(src_dict) data = RoleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + role_response = cls( data=data, + included=included, ) role_response.additional_properties = d diff --git a/rootly_sdk/models/role_response_data.py b/rootly_sdk/models/role_response_data.py index 9f83836c..3c335695 100644 --- a/rootly_sdk/models/role_response_data.py +++ b/rootly_sdk/models/role_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.role_response_data_type import RoleResponseDataType, check_role_response_data_type +from ..types import UNSET, Unset + +from ..models.role_response_data_type import check_role_response_data_type +from ..models.role_response_data_type import RoleResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.role import Role @@ -30,6 +34,8 @@ class RoleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.role import Role + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/rotate_api_key.py b/rootly_sdk/models/rotate_api_key.py index 56c7a0ae..f88735d8 100644 --- a/rootly_sdk/models/rotate_api_key.py +++ b/rootly_sdk/models/rotate_api_key.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.rotate_api_key_data import RotateApiKeyData @@ -24,6 +28,8 @@ class RotateApiKey: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.rotate_api_key_data import RotateApiKeyData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/rotate_api_key_data.py b/rootly_sdk/models/rotate_api_key_data.py index 9ba610bb..84a0498a 100644 --- a/rootly_sdk/models/rotate_api_key_data.py +++ b/rootly_sdk/models/rotate_api_key_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.rotate_api_key_data_type import check_rotate_api_key_data_type +from ..models.rotate_api_key_data_type import RotateApiKeyDataType +from typing import cast if TYPE_CHECKING: from ..models.rotate_api_key_data_attributes import RotateApiKeyDataAttributes @@ -28,6 +32,8 @@ class RotateApiKeyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.rotate_api_key_data_attributes import RotateApiKeyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/rotate_api_key_data_attributes.py b/rootly_sdk/models/rotate_api_key_data_attributes.py index a65b88c0..475e5b60 100644 --- a/rootly_sdk/models/rotate_api_key_data_attributes.py +++ b/rootly_sdk/models/rotate_api_key_data_attributes.py @@ -1,13 +1,18 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="RotateApiKeyDataAttributes") diff --git a/rootly_sdk/models/run_command_heroku_task_params.py b/rootly_sdk/models/run_command_heroku_task_params.py index 8535d2cc..b4488535 100644 --- a/rootly_sdk/models/run_command_heroku_task_params.py +++ b/rootly_sdk/models/run_command_heroku_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.run_command_heroku_task_params_size import ( - RunCommandHerokuTaskParamsSize, - check_run_command_heroku_task_params_size, -) -from ..models.run_command_heroku_task_params_task_type import ( - RunCommandHerokuTaskParamsTaskType, - check_run_command_heroku_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.run_command_heroku_task_params_size import check_run_command_heroku_task_params_size +from ..models.run_command_heroku_task_params_size import RunCommandHerokuTaskParamsSize +from ..models.run_command_heroku_task_params_task_type import check_run_command_heroku_task_params_task_type +from ..models.run_command_heroku_task_params_task_type import RunCommandHerokuTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.run_command_heroku_task_params_post_to_slack_channels_item import ( RunCommandHerokuTaskParamsPostToSlackChannelsItem, @@ -46,6 +45,10 @@ class RunCommandHerokuTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.run_command_heroku_task_params_post_to_slack_channels_item import ( + RunCommandHerokuTaskParamsPostToSlackChannelsItem, + ) + command = self.command app_name = self.app_name 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 034627af..08bce14e 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="RunCommandHerokuTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/schedule.py b/rootly_sdk/models/schedule.py index d1398fe7..6f2f1ef4 100644 --- a/rootly_sdk/models/schedule.py +++ b/rootly_sdk/models/schedule.py @@ -1,13 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.schedule_shift_report_day_of_week import check_schedule_shift_report_day_of_week +from ..models.schedule_shift_report_day_of_week import ScheduleShiftReportDayOfWeek +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.schedule_slack_channel_type_0 import ScheduleSlackChannelType0 from ..models.schedule_slack_user_group_type_0 import ScheduleSlackUserGroupType0 @@ -29,6 +34,18 @@ class 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. + sync_linear_enabled (bool | Unset): Whether the schedule is synced with Linear + include_shadows_in_slack_notifications (bool | Unset): Whether shadow users are included in Slack notifications + and user group syncing. Requires `slack_channel` to be set; otherwise this value is forced to false on save. + shift_start_notifications_enabled (bool | Unset): Whether shift-start notifications are enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_update_notifications_enabled (bool | Unset): Whether shift-update notifications are enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_enabled (bool | Unset): Whether the weekly shift summary report is enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_day_of_week (ScheduleShiftReportDayOfWeek | Unset): Day of week the weekly shift summary is sent + shift_report_time_of_day (str | Unset): Time of day the weekly shift summary is sent, in HH:MM 24-hour format + shift_report_time_zone (str | Unset): IANA time zone used for the weekly shift summary """ name: str @@ -40,11 +57,19 @@ class Schedule: slack_user_group: None | ScheduleSlackUserGroupType0 | Unset = UNSET slack_channel: None | ScheduleSlackChannelType0 | Unset = UNSET owner_group_ids: list[str] | Unset = UNSET + sync_linear_enabled: bool | Unset = UNSET + include_shadows_in_slack_notifications: bool | Unset = UNSET + shift_start_notifications_enabled: bool | Unset = UNSET + shift_update_notifications_enabled: bool | Unset = UNSET + shift_report_enabled: bool | Unset = UNSET + shift_report_day_of_week: ScheduleShiftReportDayOfWeek | Unset = UNSET + shift_report_time_of_day: str | Unset = UNSET + shift_report_time_zone: str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_slack_channel_type_0 import ScheduleSlackChannelType0 from ..models.schedule_slack_user_group_type_0 import ScheduleSlackUserGroupType0 + from ..models.schedule_slack_channel_type_0 import ScheduleSlackChannelType0 name = self.name @@ -86,6 +111,24 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.owner_group_ids, Unset): owner_group_ids = self.owner_group_ids + sync_linear_enabled = self.sync_linear_enabled + + include_shadows_in_slack_notifications = self.include_shadows_in_slack_notifications + + shift_start_notifications_enabled = self.shift_start_notifications_enabled + + shift_update_notifications_enabled = self.shift_update_notifications_enabled + + shift_report_enabled = self.shift_report_enabled + + shift_report_day_of_week: str | Unset = UNSET + if not isinstance(self.shift_report_day_of_week, Unset): + shift_report_day_of_week = self.shift_report_day_of_week + + shift_report_time_of_day = self.shift_report_time_of_day + + shift_report_time_zone = self.shift_report_time_zone + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -106,6 +149,22 @@ def to_dict(self) -> dict[str, Any]: field_dict["slack_channel"] = slack_channel if owner_group_ids is not UNSET: field_dict["owner_group_ids"] = owner_group_ids + if sync_linear_enabled is not UNSET: + field_dict["sync_linear_enabled"] = sync_linear_enabled + if include_shadows_in_slack_notifications is not UNSET: + field_dict["include_shadows_in_slack_notifications"] = include_shadows_in_slack_notifications + if shift_start_notifications_enabled is not UNSET: + field_dict["shift_start_notifications_enabled"] = shift_start_notifications_enabled + if shift_update_notifications_enabled is not UNSET: + field_dict["shift_update_notifications_enabled"] = shift_update_notifications_enabled + if shift_report_enabled is not UNSET: + field_dict["shift_report_enabled"] = shift_report_enabled + if shift_report_day_of_week is not UNSET: + field_dict["shift_report_day_of_week"] = shift_report_day_of_week + if shift_report_time_of_day is not UNSET: + field_dict["shift_report_time_of_day"] = shift_report_time_of_day + if shift_report_time_zone is not UNSET: + field_dict["shift_report_time_zone"] = shift_report_time_zone return field_dict @@ -177,6 +236,27 @@ def _parse_slack_channel(data: object) -> None | ScheduleSlackChannelType0 | Uns owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET)) + sync_linear_enabled = d.pop("sync_linear_enabled", UNSET) + + include_shadows_in_slack_notifications = d.pop("include_shadows_in_slack_notifications", UNSET) + + shift_start_notifications_enabled = d.pop("shift_start_notifications_enabled", UNSET) + + shift_update_notifications_enabled = d.pop("shift_update_notifications_enabled", UNSET) + + shift_report_enabled = d.pop("shift_report_enabled", UNSET) + + _shift_report_day_of_week = d.pop("shift_report_day_of_week", UNSET) + shift_report_day_of_week: ScheduleShiftReportDayOfWeek | Unset + if isinstance(_shift_report_day_of_week, Unset): + shift_report_day_of_week = UNSET + else: + shift_report_day_of_week = check_schedule_shift_report_day_of_week(_shift_report_day_of_week) + + shift_report_time_of_day = d.pop("shift_report_time_of_day", UNSET) + + shift_report_time_zone = d.pop("shift_report_time_zone", UNSET) + schedule = cls( name=name, owner_user_id=owner_user_id, @@ -187,6 +267,14 @@ def _parse_slack_channel(data: object) -> None | ScheduleSlackChannelType0 | Uns slack_user_group=slack_user_group, slack_channel=slack_channel, owner_group_ids=owner_group_ids, + sync_linear_enabled=sync_linear_enabled, + include_shadows_in_slack_notifications=include_shadows_in_slack_notifications, + shift_start_notifications_enabled=shift_start_notifications_enabled, + shift_update_notifications_enabled=shift_update_notifications_enabled, + shift_report_enabled=shift_report_enabled, + shift_report_day_of_week=shift_report_day_of_week, + shift_report_time_of_day=shift_report_time_of_day, + shift_report_time_zone=shift_report_time_zone, ) schedule.additional_properties = d diff --git a/rootly_sdk/models/schedule_list.py b/rootly_sdk/models/schedule_list.py index 352c0968..453275ed 100644 --- a/rootly_sdk/models/schedule_list.py +++ b/rootly_sdk/models/schedule_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_list_data_item import ScheduleListDataItem @@ -22,14 +28,21 @@ class ScheduleList: data (list[ScheduleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ScheduleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.schedule_list_data_item import ScheduleListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_list_data_item import ScheduleListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_list = cls( data=data, links=links, meta=meta, + included=included, ) schedule_list.additional_properties = d diff --git a/rootly_sdk/models/schedule_list_data_item.py b/rootly_sdk/models/schedule_list_data_item.py index f3cd6fdb..476596d1 100644 --- a/rootly_sdk/models/schedule_list_data_item.py +++ b/rootly_sdk/models/schedule_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.schedule_list_data_item_type import ScheduleListDataItemType, check_schedule_list_data_item_type +from ..types import UNSET, Unset + +from ..models.schedule_list_data_item_type import check_schedule_list_data_item_type +from ..models.schedule_list_data_item_type import ScheduleListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.schedule import Schedule @@ -30,6 +34,8 @@ class ScheduleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule import Schedule + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_response.py b/rootly_sdk/models/schedule_response.py index 8cde142a..2061d78a 100644 --- a/rootly_sdk/models/schedule_response.py +++ b/rootly_sdk/models/schedule_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_response_data import ScheduleResponseData @@ -18,14 +24,26 @@ class ScheduleResponse: """ Attributes: data (ScheduleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ScheduleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_response_data import ScheduleResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_response_data import ScheduleResponseData d = dict(src_dict) data = ScheduleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_response = cls( data=data, + included=included, ) schedule_response.additional_properties = d diff --git a/rootly_sdk/models/schedule_response_data.py b/rootly_sdk/models/schedule_response_data.py index 1d25406d..a969c1c8 100644 --- a/rootly_sdk/models/schedule_response_data.py +++ b/rootly_sdk/models/schedule_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.schedule_response_data_type import ScheduleResponseDataType, check_schedule_response_data_type +from ..types import UNSET, Unset + +from ..models.schedule_response_data_type import check_schedule_response_data_type +from ..models.schedule_response_data_type import ScheduleResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.schedule import Schedule @@ -30,6 +34,8 @@ class ScheduleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule import Schedule + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_rotation.py b/rootly_sdk/models/schedule_rotation.py index 3b2997a6..40304eec 100644 --- a/rootly_sdk/models/schedule_rotation.py +++ b/rootly_sdk/models/schedule_rotation.py @@ -1,23 +1,22 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from dateutil.parser import isoparse -from ..models.schedule_rotation_active_days_item import ( - ScheduleRotationActiveDaysItem, - check_schedule_rotation_active_days_item, -) -from ..models.schedule_rotation_schedule_rotationable_type import ( - ScheduleRotationScheduleRotationableType, - check_schedule_rotation_schedule_rotationable_type, -) from ..types import UNSET, Unset +from ..models.schedule_rotation_active_days_item import check_schedule_rotation_active_days_item +from ..models.schedule_rotation_active_days_item import ScheduleRotationActiveDaysItem +from ..models.schedule_rotation_schedule_rotationable_type import check_schedule_rotation_schedule_rotationable_type +from ..models.schedule_rotation_schedule_rotationable_type import ScheduleRotationScheduleRotationableType +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + if TYPE_CHECKING: from ..models.schedule_rotation_active_time_attributes_item import ScheduleRotationActiveTimeAttributesItem from ..models.schedule_rotation_schedule_rotationable_attributes_type_0 import ( @@ -54,9 +53,9 @@ class ScheduleRotation: 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 + start_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation starts. Shifts will only be created after this time. - end_time (datetime.date | None | Unset): ISO8601 date and time when rotation ends. Shifts will only be created + end_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation ends. Shifts will only be created before this time. """ @@ -75,20 +74,24 @@ class ScheduleRotation: 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 + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation_schedule_rotationable_attributes_type_0 import ( - ScheduleRotationScheduleRotationableAttributesType0, - ) from ..models.schedule_rotation_schedule_rotationable_attributes_type_1 import ( ScheduleRotationScheduleRotationableAttributesType1, ) + from ..models.schedule_rotation_active_time_attributes_item import ScheduleRotationActiveTimeAttributesItem + from ..models.schedule_rotation_schedule_rotationable_attributes_type_0 import ( + ScheduleRotationScheduleRotationableAttributesType0, + ) from ..models.schedule_rotation_schedule_rotationable_attributes_type_2 import ( ScheduleRotationScheduleRotationableAttributesType2, ) + from ..models.schedule_rotation_schedule_rotationable_attributes_type_3 import ( + ScheduleRotationScheduleRotationableAttributesType3, + ) schedule_id = self.schedule_id @@ -131,7 +134,7 @@ def to_dict(self) -> dict[str, Any]: start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET - elif isinstance(self.start_time, datetime.date): + elif isinstance(self.start_time, datetime.datetime): start_time = self.start_time.isoformat() else: start_time = self.start_time @@ -139,7 +142,7 @@ def to_dict(self) -> dict[str, Any]: end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET - elif isinstance(self.end_time, datetime.date): + elif isinstance(self.end_time, datetime.datetime): end_time = self.end_time.isoformat() else: end_time = self.end_time @@ -276,7 +279,7 @@ def _parse_schedule_rotationable_attributes( time_zone = d.pop("time_zone", UNSET) - def _parse_start_time(data: object) -> datetime.date | None | Unset: + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -284,16 +287,16 @@ def _parse_start_time(data: object) -> datetime.date | None | Unset: try: if not isinstance(data, str): raise TypeError() - start_time_type_0 = isoparse(data).date() + start_time_type_0 = isoparse(data) return start_time_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(datetime.date | None | Unset, data) + return cast(datetime.datetime | None | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> datetime.date | None | Unset: + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): @@ -301,12 +304,12 @@ def _parse_end_time(data: object) -> datetime.date | None | Unset: try: if not isinstance(data, str): raise TypeError() - end_time_type_0 = isoparse(data).date() + end_time_type_0 = isoparse(data) return end_time_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast(datetime.date | None | Unset, data) + return cast(datetime.datetime | 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 d21d18dd..e0a138da 100644 --- a/rootly_sdk/models/schedule_rotation_active_day.py +++ b/rootly_sdk/models/schedule_rotation_active_day.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.schedule_rotation_active_day_day_name import ( - ScheduleRotationActiveDayDayName, - check_schedule_rotation_active_day_day_name, -) +from ..types import UNSET, Unset + +from ..models.schedule_rotation_active_day_day_name import check_schedule_rotation_active_day_day_name +from ..models.schedule_rotation_active_day_day_name import ScheduleRotationActiveDayDayName +from typing import cast if TYPE_CHECKING: from ..models.schedule_rotation_active_day_active_time_attributes_item import ( @@ -40,6 +41,10 @@ class ScheduleRotationActiveDay: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_rotation_active_day_active_time_attributes_item import ( + ScheduleRotationActiveDayActiveTimeAttributesItem, + ) + schedule_rotation_id = self.schedule_rotation_id day_name: str = self.day_name 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 8407725b..e0e456ce 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ScheduleRotationActiveDayActiveTimeAttributesItem") diff --git a/rootly_sdk/models/schedule_rotation_active_day_list.py b/rootly_sdk/models/schedule_rotation_active_day_list.py index c8db539a..8d122821 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_list.py +++ b/rootly_sdk/models/schedule_rotation_active_day_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_active_day_list_data_item import ScheduleRotationActiveDayListDataItem @@ -22,14 +28,21 @@ class ScheduleRotationActiveDayList: data (list[ScheduleRotationActiveDayListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ScheduleRotationActiveDayListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.schedule_rotation_active_day_list_data_item import ScheduleRotationActiveDayListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_active_day_list_data_item import ScheduleRotationActiveDayListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_active_day_list = cls( data=data, links=links, meta=meta, + included=included, ) schedule_rotation_active_day_list.additional_properties = d 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 89218d8f..7be37262 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,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.schedule_rotation_active_day_list_data_item_type import ( - ScheduleRotationActiveDayListDataItemType, check_schedule_rotation_active_day_list_data_item_type, ) +from ..models.schedule_rotation_active_day_list_data_item_type import ScheduleRotationActiveDayListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.schedule_rotation_active_day import ScheduleRotationActiveDay @@ -33,6 +36,8 @@ class ScheduleRotationActiveDayListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_rotation_active_day import ScheduleRotationActiveDay + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_rotation_active_day_response.py b/rootly_sdk/models/schedule_rotation_active_day_response.py index c1367dc9..18656344 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_response.py +++ b/rootly_sdk/models/schedule_rotation_active_day_response.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_active_day_response_data import ScheduleRotationActiveDayResponseData @@ -20,26 +24,41 @@ class ScheduleRotationActiveDayResponse: """ Attributes: data (ScheduleRotationActiveDayResponseData | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: ScheduleRotationActiveDayResponseData | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_rotation_active_day_response_data import ScheduleRotationActiveDayResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if data is not UNSET: field_dict["data"] = data + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_active_day_response_data import ScheduleRotationActiveDayResponseData d = dict(src_dict) @@ -50,8 +69,18 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: data = ScheduleRotationActiveDayResponseData.from_dict(_data) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_active_day_response = cls( data=data, + included=included, ) schedule_rotation_active_day_response.additional_properties = d 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 de8b9b12..f8b5df1f 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_response_data.py +++ b/rootly_sdk/models/schedule_rotation_active_day_response_data.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.schedule_rotation_active_day_response_data_type import ( - ScheduleRotationActiveDayResponseDataType, check_schedule_rotation_active_day_response_data_type, ) +from ..models.schedule_rotation_active_day_response_data_type import ScheduleRotationActiveDayResponseDataType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.schedule_rotation_active_day import ScheduleRotationActiveDay @@ -34,6 +37,8 @@ class ScheduleRotationActiveDayResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_rotation_active_day import ScheduleRotationActiveDay + id = self.id type_: str | Unset = UNSET 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 f61260d2..07b90e94 100644 --- a/rootly_sdk/models/schedule_rotation_active_time_attributes_item.py +++ b/rootly_sdk/models/schedule_rotation_active_time_attributes_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ScheduleRotationActiveTimeAttributesItem") diff --git a/rootly_sdk/models/schedule_rotation_list.py b/rootly_sdk/models/schedule_rotation_list.py index ffb96650..2250c40c 100644 --- a/rootly_sdk/models/schedule_rotation_list.py +++ b/rootly_sdk/models/schedule_rotation_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_list_data_item import ScheduleRotationListDataItem @@ -22,14 +28,21 @@ class ScheduleRotationList: data (list[ScheduleRotationListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ScheduleRotationListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.schedule_rotation_list_data_item import ScheduleRotationListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_list_data_item import ScheduleRotationListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_list = cls( data=data, links=links, meta=meta, + included=included, ) schedule_rotation_list.additional_properties = d diff --git a/rootly_sdk/models/schedule_rotation_list_data_item.py b/rootly_sdk/models/schedule_rotation_list_data_item.py index a05d662e..eb399681 100644 --- a/rootly_sdk/models/schedule_rotation_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.schedule_rotation_list_data_item_type import ( - ScheduleRotationListDataItemType, - check_schedule_rotation_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.schedule_rotation_list_data_item_type import check_schedule_rotation_list_data_item_type +from ..models.schedule_rotation_list_data_item_type import ScheduleRotationListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.schedule_rotation import ScheduleRotation @@ -33,6 +34,8 @@ class ScheduleRotationListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_rotation import ScheduleRotation + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_rotation_response.py b/rootly_sdk/models/schedule_rotation_response.py index f6161b5a..dde0124f 100644 --- a/rootly_sdk/models/schedule_rotation_response.py +++ b/rootly_sdk/models/schedule_rotation_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_response_data import ScheduleRotationResponseData @@ -18,14 +24,26 @@ class ScheduleRotationResponse: """ Attributes: data (ScheduleRotationResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ScheduleRotationResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.schedule_rotation_response_data import ScheduleRotationResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_response_data import ScheduleRotationResponseData d = dict(src_dict) data = ScheduleRotationResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_response = cls( data=data, + included=included, ) schedule_rotation_response.additional_properties = d diff --git a/rootly_sdk/models/schedule_rotation_response_data.py b/rootly_sdk/models/schedule_rotation_response_data.py index 23264402..f5bd8b67 100644 --- a/rootly_sdk/models/schedule_rotation_response_data.py +++ b/rootly_sdk/models/schedule_rotation_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.schedule_rotation_response_data_type import ( - ScheduleRotationResponseDataType, - check_schedule_rotation_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.schedule_rotation_response_data_type import check_schedule_rotation_response_data_type +from ..models.schedule_rotation_response_data_type import ScheduleRotationResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.schedule_rotation import ScheduleRotation @@ -33,6 +34,8 @@ class ScheduleRotationResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_rotation import ScheduleRotation + id = self.id type_: str = self.type_ 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 2cd22b53..1d07e84c 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,9 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + T = TypeVar("T", bound="ScheduleRotationScheduleRotationableAttributesType0") 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 c36e9741..6d6ad123 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,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.schedule_rotation_schedule_rotationable_attributes_type_1_handoff_day import ( - ScheduleRotationScheduleRotationableAttributesType1HandoffDay, check_schedule_rotation_schedule_rotationable_attributes_type_1_handoff_day, ) +from ..models.schedule_rotation_schedule_rotationable_attributes_type_1_handoff_day import ( + ScheduleRotationScheduleRotationableAttributesType1HandoffDay, +) +from typing import cast + T = TypeVar("T", bound="ScheduleRotationScheduleRotationableAttributesType1") 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 01e31b7b..a4524177 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,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.schedule_rotation_schedule_rotationable_attributes_type_2_handoff_day import ( - ScheduleRotationScheduleRotationableAttributesType2HandoffDay, check_schedule_rotation_schedule_rotationable_attributes_type_2_handoff_day, ) +from ..models.schedule_rotation_schedule_rotationable_attributes_type_2_handoff_day import ( + ScheduleRotationScheduleRotationableAttributesType2HandoffDay, +) +from typing import cast + T = TypeVar("T", bound="ScheduleRotationScheduleRotationableAttributesType2") 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 4134c043..a2eed698 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,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.schedule_rotation_schedule_rotationable_attributes_type_3_shift_length_unit import ( - ScheduleRotationScheduleRotationableAttributesType3ShiftLengthUnit, check_schedule_rotation_schedule_rotationable_attributes_type_3_shift_length_unit, ) +from ..models.schedule_rotation_schedule_rotationable_attributes_type_3_shift_length_unit import ( + ScheduleRotationScheduleRotationableAttributesType3ShiftLengthUnit, +) +from typing import cast + T = TypeVar("T", bound="ScheduleRotationScheduleRotationableAttributesType3") diff --git a/rootly_sdk/models/schedule_rotation_user.py b/rootly_sdk/models/schedule_rotation_user.py index 77738f7a..ad67109e 100644 --- a/rootly_sdk/models/schedule_rotation_user.py +++ b/rootly_sdk/models/schedule_rotation_user.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ScheduleRotationUser") diff --git a/rootly_sdk/models/schedule_rotation_user_list.py b/rootly_sdk/models/schedule_rotation_user_list.py index aa284d9c..abf46540 100644 --- a/rootly_sdk/models/schedule_rotation_user_list.py +++ b/rootly_sdk/models/schedule_rotation_user_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_user_list_data_item import ScheduleRotationUserListDataItem @@ -22,14 +28,21 @@ class ScheduleRotationUserList: data (list[ScheduleRotationUserListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ScheduleRotationUserListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_rotation_user_list_data_item import ScheduleRotationUserListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.schedule_rotation_user_list_data_item import ScheduleRotationUserListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_user_list = cls( data=data, links=links, meta=meta, + included=included, ) schedule_rotation_user_list.additional_properties = d 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 0ad5a6bf..2f2a80f9 100644 --- a/rootly_sdk/models/schedule_rotation_user_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_user_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.schedule_rotation_user_list_data_item_type import ( - ScheduleRotationUserListDataItemType, - check_schedule_rotation_user_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.schedule_rotation_user_list_data_item_type import check_schedule_rotation_user_list_data_item_type +from ..models.schedule_rotation_user_list_data_item_type import ScheduleRotationUserListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.schedule_rotation_user import ScheduleRotationUser @@ -33,6 +34,8 @@ class ScheduleRotationUserListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_rotation_user import ScheduleRotationUser + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_rotation_user_response.py b/rootly_sdk/models/schedule_rotation_user_response.py index 35fafdb4..8e7688b1 100644 --- a/rootly_sdk/models/schedule_rotation_user_response.py +++ b/rootly_sdk/models/schedule_rotation_user_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_user_response_data import ScheduleRotationUserResponseData @@ -18,14 +24,26 @@ class ScheduleRotationUserResponse: """ Attributes: data (ScheduleRotationUserResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ScheduleRotationUserResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.schedule_rotation_user_response_data import ScheduleRotationUserResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_user_response_data import ScheduleRotationUserResponseData d = dict(src_dict) data = ScheduleRotationUserResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + schedule_rotation_user_response = cls( data=data, + included=included, ) schedule_rotation_user_response.additional_properties = d diff --git a/rootly_sdk/models/schedule_rotation_user_response_data.py b/rootly_sdk/models/schedule_rotation_user_response_data.py index bfb24d1c..9f0d7f9b 100644 --- a/rootly_sdk/models/schedule_rotation_user_response_data.py +++ b/rootly_sdk/models/schedule_rotation_user_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.schedule_rotation_user_response_data_type import ( - ScheduleRotationUserResponseDataType, - check_schedule_rotation_user_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.schedule_rotation_user_response_data_type import check_schedule_rotation_user_response_data_type +from ..models.schedule_rotation_user_response_data_type import ScheduleRotationUserResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.schedule_rotation_user import ScheduleRotationUser @@ -33,6 +34,8 @@ class ScheduleRotationUserResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.schedule_rotation_user import ScheduleRotationUser + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/schedule_shift_report_day_of_week.py b/rootly_sdk/models/schedule_shift_report_day_of_week.py new file mode 100644 index 00000000..5f403843 --- /dev/null +++ b/rootly_sdk/models/schedule_shift_report_day_of_week.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +ScheduleShiftReportDayOfWeek = Literal["friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday"] + +SCHEDULE_SHIFT_REPORT_DAY_OF_WEEK_VALUES: set[ScheduleShiftReportDayOfWeek] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_schedule_shift_report_day_of_week(value: str | None) -> ScheduleShiftReportDayOfWeek | None: + if value is None: + return None + if value in SCHEDULE_SHIFT_REPORT_DAY_OF_WEEK_VALUES: + return cast(ScheduleShiftReportDayOfWeek, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SCHEDULE_SHIFT_REPORT_DAY_OF_WEEK_VALUES!r}") diff --git a/rootly_sdk/models/schedule_slack_channel_type_0.py b/rootly_sdk/models/schedule_slack_channel_type_0.py index eb26f635..04f5779a 100644 --- a/rootly_sdk/models/schedule_slack_channel_type_0.py +++ b/rootly_sdk/models/schedule_slack_channel_type_0.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ScheduleSlackChannelType0") 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 ac2adf75..1dfa33f4 100644 --- a/rootly_sdk/models/schedule_slack_user_group_type_0.py +++ b/rootly_sdk/models/schedule_slack_user_group_type_0.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ScheduleSlackUserGroupType0") diff --git a/rootly_sdk/models/secret.py b/rootly_sdk/models/secret.py index 19dae479..882d6e98 100644 --- a/rootly_sdk/models/secret.py +++ b/rootly_sdk/models/secret.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="Secret") diff --git a/rootly_sdk/models/secret_list.py b/rootly_sdk/models/secret_list.py index 3dd6f324..36df899c 100644 --- a/rootly_sdk/models/secret_list.py +++ b/rootly_sdk/models/secret_list.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.links import Links from ..models.meta import Meta @@ -32,6 +35,10 @@ class SecretList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.secret_list_data_item import SecretListDataItem + from ..models.meta import Meta + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() diff --git a/rootly_sdk/models/secret_list_data_item.py b/rootly_sdk/models/secret_list_data_item.py index 77572c28..4acca33e 100644 --- a/rootly_sdk/models/secret_list_data_item.py +++ b/rootly_sdk/models/secret_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.secret_list_data_item_type import SecretListDataItemType, check_secret_list_data_item_type +from ..types import UNSET, Unset + +from ..models.secret_list_data_item_type import check_secret_list_data_item_type +from ..models.secret_list_data_item_type import SecretListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.secret import Secret @@ -30,6 +34,8 @@ class SecretListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.secret import Secret + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/secret_response.py b/rootly_sdk/models/secret_response.py index 19eff24a..e0819d03 100644 --- a/rootly_sdk/models/secret_response.py +++ b/rootly_sdk/models/secret_response.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.secret_response_data import SecretResponseData @@ -24,6 +28,8 @@ class SecretResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.secret_response_data import SecretResponseData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/secret_response_data.py b/rootly_sdk/models/secret_response_data.py index a0383993..feb95b4e 100644 --- a/rootly_sdk/models/secret_response_data.py +++ b/rootly_sdk/models/secret_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.secret_response_data_type import SecretResponseDataType, check_secret_response_data_type +from ..types import UNSET, Unset + +from ..models.secret_response_data_type import check_secret_response_data_type +from ..models.secret_response_data_type import SecretResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.secret import Secret @@ -30,6 +34,8 @@ class SecretResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.secret import Secret + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/send_dashboard_report_task_params.py b/rootly_sdk/models/send_dashboard_report_task_params.py index ee77ed07..70ebe6c5 100644 --- a/rootly_sdk/models/send_dashboard_report_task_params.py +++ b/rootly_sdk/models/send_dashboard_report_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.send_dashboard_report_task_params_task_type import ( - SendDashboardReportTaskParamsTaskType, - check_send_dashboard_report_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.send_dashboard_report_task_params_task_type import check_send_dashboard_report_task_params_task_type +from ..models.send_dashboard_report_task_params_task_type import SendDashboardReportTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="SendDashboardReportTaskParams") diff --git a/rootly_sdk/models/send_email_task_params.py b/rootly_sdk/models/send_email_task_params.py index 6e1d8cfc..ac4cb89b 100644 --- a/rootly_sdk/models/send_email_task_params.py +++ b/rootly_sdk/models/send_email_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.send_email_task_params_task_type import ( - SendEmailTaskParamsTaskType, - check_send_email_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.send_email_task_params_task_type import check_send_email_task_params_task_type +from ..models.send_email_task_params_task_type import SendEmailTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="SendEmailTaskParams") diff --git a/rootly_sdk/models/send_google_chat_attachments_task_params.py b/rootly_sdk/models/send_google_chat_attachments_task_params.py new file mode 100644 index 00000000..9b8fa456 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_attachments_task_params.py @@ -0,0 +1,116 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.send_google_chat_attachments_task_params_task_type import ( + check_send_google_chat_attachments_task_params_task_type, +) +from ..models.send_google_chat_attachments_task_params_task_type import SendGoogleChatAttachmentsTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.send_google_chat_attachments_task_params_spaces_item import ( + SendGoogleChatAttachmentsTaskParamsSpacesItem, + ) + + +T = TypeVar("T", bound="SendGoogleChatAttachmentsTaskParams") + + +@_attrs_define +class SendGoogleChatAttachmentsTaskParams: + """ + Attributes: + spaces (list[SendGoogleChatAttachmentsTaskParamsSpacesItem]): + attachments (str): + task_type (SendGoogleChatAttachmentsTaskParamsTaskType | Unset): + """ + + spaces: list[SendGoogleChatAttachmentsTaskParamsSpacesItem] + attachments: str + task_type: SendGoogleChatAttachmentsTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.send_google_chat_attachments_task_params_spaces_item import ( + SendGoogleChatAttachmentsTaskParamsSpacesItem, + ) + + spaces = [] + for spaces_item_data in self.spaces: + spaces_item = spaces_item_data.to_dict() + spaces.append(spaces_item) + + attachments = self.attachments + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "spaces": spaces, + "attachments": attachments, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.send_google_chat_attachments_task_params_spaces_item import ( + SendGoogleChatAttachmentsTaskParamsSpacesItem, + ) + + d = dict(src_dict) + spaces = [] + _spaces = d.pop("spaces") + for spaces_item_data in _spaces: + spaces_item = SendGoogleChatAttachmentsTaskParamsSpacesItem.from_dict(spaces_item_data) + + spaces.append(spaces_item) + + attachments = d.pop("attachments") + + _task_type = d.pop("task_type", UNSET) + task_type: SendGoogleChatAttachmentsTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_send_google_chat_attachments_task_params_task_type(_task_type) + + send_google_chat_attachments_task_params = cls( + spaces=spaces, + attachments=attachments, + task_type=task_type, + ) + + send_google_chat_attachments_task_params.additional_properties = d + return send_google_chat_attachments_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/send_google_chat_attachments_task_params_spaces_item.py b/rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py new file mode 100644 index 00000000..949e0beb --- /dev/null +++ b/rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendGoogleChatAttachmentsTaskParamsSpacesItem") + + +@_attrs_define +class SendGoogleChatAttachmentsTaskParamsSpacesItem: + """ + 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) + + send_google_chat_attachments_task_params_spaces_item = cls( + id=id, + name=name, + ) + + send_google_chat_attachments_task_params_spaces_item.additional_properties = d + return send_google_chat_attachments_task_params_spaces_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/send_google_chat_attachments_task_params_task_type.py b/rootly_sdk/models/send_google_chat_attachments_task_params_task_type.py new file mode 100644 index 00000000..17b37e81 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_attachments_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +SendGoogleChatAttachmentsTaskParamsTaskType = Literal["send_google_chat_attachments"] + +SEND_GOOGLE_CHAT_ATTACHMENTS_TASK_PARAMS_TASK_TYPE_VALUES: set[SendGoogleChatAttachmentsTaskParamsTaskType] = { + "send_google_chat_attachments", +} + + +def check_send_google_chat_attachments_task_params_task_type( + value: str | None, +) -> SendGoogleChatAttachmentsTaskParamsTaskType | None: + if value is None: + return None + if value in SEND_GOOGLE_CHAT_ATTACHMENTS_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(SendGoogleChatAttachmentsTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {SEND_GOOGLE_CHAT_ATTACHMENTS_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/send_google_chat_message_task_params.py b/rootly_sdk/models/send_google_chat_message_task_params.py new file mode 100644 index 00000000..dc521234 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_message_task_params.py @@ -0,0 +1,129 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.send_google_chat_message_task_params_task_type import check_send_google_chat_message_task_params_task_type +from ..models.send_google_chat_message_task_params_task_type import SendGoogleChatMessageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.send_google_chat_message_task_params_spaces_item import SendGoogleChatMessageTaskParamsSpacesItem + + +T = TypeVar("T", bound="SendGoogleChatMessageTaskParams") + + +@_attrs_define +class SendGoogleChatMessageTaskParams: + """ + Attributes: + spaces (list[SendGoogleChatMessageTaskParamsSpacesItem]): + text (str): + task_type (SendGoogleChatMessageTaskParamsTaskType | Unset): + thread_key (None | str | Unset): Thread key to reply within a thread. Messages with the same thread key are + grouped together + """ + + spaces: list[SendGoogleChatMessageTaskParamsSpacesItem] + text: str + task_type: SendGoogleChatMessageTaskParamsTaskType | Unset = UNSET + thread_key: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.send_google_chat_message_task_params_spaces_item import SendGoogleChatMessageTaskParamsSpacesItem + + spaces = [] + for spaces_item_data in self.spaces: + spaces_item = spaces_item_data.to_dict() + spaces.append(spaces_item) + + text = self.text + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + thread_key: None | str | Unset + if isinstance(self.thread_key, Unset): + thread_key = UNSET + else: + thread_key = self.thread_key + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "spaces": spaces, + "text": text, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + if thread_key is not UNSET: + field_dict["thread_key"] = thread_key + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.send_google_chat_message_task_params_spaces_item import SendGoogleChatMessageTaskParamsSpacesItem + + d = dict(src_dict) + spaces = [] + _spaces = d.pop("spaces") + for spaces_item_data in _spaces: + spaces_item = SendGoogleChatMessageTaskParamsSpacesItem.from_dict(spaces_item_data) + + spaces.append(spaces_item) + + text = d.pop("text") + + _task_type = d.pop("task_type", UNSET) + task_type: SendGoogleChatMessageTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_send_google_chat_message_task_params_task_type(_task_type) + + def _parse_thread_key(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + thread_key = _parse_thread_key(d.pop("thread_key", UNSET)) + + send_google_chat_message_task_params = cls( + spaces=spaces, + text=text, + task_type=task_type, + thread_key=thread_key, + ) + + send_google_chat_message_task_params.additional_properties = d + return send_google_chat_message_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/send_google_chat_message_task_params_spaces_item.py b/rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py new file mode 100644 index 00000000..85b1ef97 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendGoogleChatMessageTaskParamsSpacesItem") + + +@_attrs_define +class SendGoogleChatMessageTaskParamsSpacesItem: + """ + 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) + + send_google_chat_message_task_params_spaces_item = cls( + id=id, + name=name, + ) + + send_google_chat_message_task_params_spaces_item.additional_properties = d + return send_google_chat_message_task_params_spaces_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/send_google_chat_message_task_params_task_type.py b/rootly_sdk/models/send_google_chat_message_task_params_task_type.py new file mode 100644 index 00000000..c32fa899 --- /dev/null +++ b/rootly_sdk/models/send_google_chat_message_task_params_task_type.py @@ -0,0 +1,19 @@ +from typing import Literal, cast + +SendGoogleChatMessageTaskParamsTaskType = Literal["send_google_chat_message"] + +SEND_GOOGLE_CHAT_MESSAGE_TASK_PARAMS_TASK_TYPE_VALUES: set[SendGoogleChatMessageTaskParamsTaskType] = { + "send_google_chat_message", +} + + +def check_send_google_chat_message_task_params_task_type( + value: str | None, +) -> SendGoogleChatMessageTaskParamsTaskType | None: + if value is None: + return None + if value in SEND_GOOGLE_CHAT_MESSAGE_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(SendGoogleChatMessageTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {SEND_GOOGLE_CHAT_MESSAGE_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py b/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py new file mode 100644 index 00000000..a16c6542 --- /dev/null +++ b/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendMicrosoftTeamsBlocksTaskParamsType0ChannelsItem") + + +@_attrs_define +class SendMicrosoftTeamsBlocksTaskParamsType0ChannelsItem: + """ + 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) + + send_microsoft_teams_blocks_task_params_type_0_channels_item = cls( + id=id, + name=name, + ) + + send_microsoft_teams_blocks_task_params_type_0_channels_item.additional_properties = d + return send_microsoft_teams_blocks_task_params_type_0_channels_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/send_microsoft_teams_chat_message_task_params.py b/rootly_sdk/models/send_microsoft_teams_chat_message_task_params.py index 4e82900e..bdb80c1e 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.send_microsoft_teams_chat_message_task_params_task_type import ( - SendMicrosoftTeamsChatMessageTaskParamsTaskType, check_send_microsoft_teams_chat_message_task_params_task_type, ) +from ..models.send_microsoft_teams_chat_message_task_params_task_type import ( + SendMicrosoftTeamsChatMessageTaskParamsTaskType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.send_microsoft_teams_chat_message_task_params_chats_item import ( @@ -36,6 +41,10 @@ class SendMicrosoftTeamsChatMessageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.send_microsoft_teams_chat_message_task_params_chats_item import ( + SendMicrosoftTeamsChatMessageTaskParamsChatsItem, + ) + chats = [] for chats_item_data in self.chats: chats_item = chats_item_data.to_dict() 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 b5eb86bf..addd3eab 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SendMicrosoftTeamsChatMessageTaskParamsChatsItem") diff --git a/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py b/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py new file mode 100644 index 00000000..8a699cda --- /dev/null +++ b/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendMicrosoftTeamsMessageTaskParamsType0ChannelsItem") + + +@_attrs_define +class SendMicrosoftTeamsMessageTaskParamsType0ChannelsItem: + """ + 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) + + send_microsoft_teams_message_task_params_type_0_channels_item = cls( + id=id, + name=name, + ) + + send_microsoft_teams_message_task_params_type_0_channels_item.additional_properties = d + return send_microsoft_teams_message_task_params_type_0_channels_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/send_slack_blocks_task_params_type_0_channels_item.py b/rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py new file mode 100644 index 00000000..84125bf6 --- /dev/null +++ b/rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendSlackBlocksTaskParamsType0ChannelsItem") + + +@_attrs_define +class SendSlackBlocksTaskParamsType0ChannelsItem: + """ + 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) + + send_slack_blocks_task_params_type_0_channels_item = cls( + id=id, + name=name, + ) + + send_slack_blocks_task_params_type_0_channels_item.additional_properties = d + return send_slack_blocks_task_params_type_0_channels_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/send_slack_blocks_task_params_type_1_slack_users_item.py b/rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py new file mode 100644 index 00000000..70c9941d --- /dev/null +++ b/rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendSlackBlocksTaskParamsType1SlackUsersItem") + + +@_attrs_define +class SendSlackBlocksTaskParamsType1SlackUsersItem: + """ + 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) + + send_slack_blocks_task_params_type_1_slack_users_item = cls( + id=id, + name=name, + ) + + send_slack_blocks_task_params_type_1_slack_users_item.additional_properties = d + return send_slack_blocks_task_params_type_1_slack_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/send_slack_blocks_task_params_type_2_slack_user_groups_item.py b/rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py new file mode 100644 index 00000000..ea2f6230 --- /dev/null +++ b/rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendSlackBlocksTaskParamsType2SlackUserGroupsItem") + + +@_attrs_define +class SendSlackBlocksTaskParamsType2SlackUserGroupsItem: + """ + 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) + + send_slack_blocks_task_params_type_2_slack_user_groups_item = cls( + id=id, + name=name, + ) + + send_slack_blocks_task_params_type_2_slack_user_groups_item.additional_properties = d + return send_slack_blocks_task_params_type_2_slack_user_groups_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/send_slack_message_task_params_type_0_channels_item.py b/rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py new file mode 100644 index 00000000..e2517837 --- /dev/null +++ b/rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendSlackMessageTaskParamsType0ChannelsItem") + + +@_attrs_define +class SendSlackMessageTaskParamsType0ChannelsItem: + """ + 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) + + send_slack_message_task_params_type_0_channels_item = cls( + id=id, + name=name, + ) + + send_slack_message_task_params_type_0_channels_item.additional_properties = d + return send_slack_message_task_params_type_0_channels_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/send_slack_message_task_params_type_1_slack_users_item.py b/rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py new file mode 100644 index 00000000..e3e39320 --- /dev/null +++ b/rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendSlackMessageTaskParamsType1SlackUsersItem") + + +@_attrs_define +class SendSlackMessageTaskParamsType1SlackUsersItem: + """ + 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) + + send_slack_message_task_params_type_1_slack_users_item = cls( + id=id, + name=name, + ) + + send_slack_message_task_params_type_1_slack_users_item.additional_properties = d + return send_slack_message_task_params_type_1_slack_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/send_slack_message_task_params_type_2_slack_user_groups_item.py b/rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py new file mode 100644 index 00000000..092230d8 --- /dev/null +++ b/rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SendSlackMessageTaskParamsType2SlackUserGroupsItem") + + +@_attrs_define +class SendSlackMessageTaskParamsType2SlackUserGroupsItem: + """ + 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) + + send_slack_message_task_params_type_2_slack_user_groups_item = cls( + id=id, + name=name, + ) + + send_slack_message_task_params_type_2_slack_user_groups_item.additional_properties = d + return send_slack_message_task_params_type_2_slack_user_groups_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/send_sms_task_params.py b/rootly_sdk/models/send_sms_task_params.py index 188935ea..dd3d46b6 100644 --- a/rootly_sdk/models/send_sms_task_params.py +++ b/rootly_sdk/models/send_sms_task_params.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.send_sms_task_params_task_type import SendSmsTaskParamsTaskType, check_send_sms_task_params_task_type from ..types import UNSET, Unset +from ..models.send_sms_task_params_task_type import check_send_sms_task_params_task_type +from ..models.send_sms_task_params_task_type import SendSmsTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="SendSmsTaskParams") diff --git a/rootly_sdk/models/send_whatsapp_message_task_params.py b/rootly_sdk/models/send_whatsapp_message_task_params.py index ba3492e7..c333a236 100644 --- a/rootly_sdk/models/send_whatsapp_message_task_params.py +++ b/rootly_sdk/models/send_whatsapp_message_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.send_whatsapp_message_task_params_task_type import ( - SendWhatsappMessageTaskParamsTaskType, - check_send_whatsapp_message_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.send_whatsapp_message_task_params_task_type import check_send_whatsapp_message_task_params_task_type +from ..models.send_whatsapp_message_task_params_task_type import SendWhatsappMessageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="SendWhatsappMessageTaskParams") diff --git a/rootly_sdk/models/service.py b/rootly_sdk/models/service.py index 78e50976..6dd2a277 100644 --- a/rootly_sdk/models/service.py +++ b/rootly_sdk/models/service.py @@ -1,13 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.service_managed_by import check_service_managed_by +from ..models.service_managed_by import ServiceManagedBy +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.service_alert_broadcast_channel_type_0 import ServiceAlertBroadcastChannelType0 from ..models.service_incident_broadcast_channel_type_0 import ServiceIncidentBroadcastChannelType0 @@ -27,6 +32,8 @@ class Service: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the service + managed_by (ServiceManagedBy | Unset): How this service is managed (provenance): web, api, terraform, etc. Read- + only. 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 @@ -69,6 +76,7 @@ class Service: created_at: str updated_at: str slug: str | Unset = UNSET + managed_by: ServiceManagedBy | Unset = UNSET description: None | str | Unset = UNSET public_description: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET @@ -103,7 +111,10 @@ class Service: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.service_slack_channels_type_0_item import ServiceSlackChannelsType0Item + from ..models.service_slack_aliases_type_0_item import ServiceSlackAliasesType0Item from ..models.service_alert_broadcast_channel_type_0 import ServiceAlertBroadcastChannelType0 + from ..models.service_properties_type_0_item import ServicePropertiesType0Item from ..models.service_incident_broadcast_channel_type_0 import ServiceIncidentBroadcastChannelType0 name = self.name @@ -114,6 +125,10 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET @@ -348,6 +363,8 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by if description is not UNSET: field_dict["description"] = description if public_description is not UNSET: @@ -430,6 +447,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _managed_by = d.pop("managed_by", UNSET) + managed_by: ServiceManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_service_managed_by(_managed_by) + def _parse_description(data: object) -> None | str | Unset: if data is None: return data @@ -811,6 +835,7 @@ def _parse_properties(data: object) -> list[ServicePropertiesType0Item] | None | created_at=created_at, updated_at=updated_at, slug=slug, + managed_by=managed_by, description=description, public_description=public_description, notify_emails=notify_emails, 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 352191db..e5498808 100644 --- a/rootly_sdk/models/service_alert_broadcast_channel_type_0.py +++ b/rootly_sdk/models/service_alert_broadcast_channel_type_0.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ServiceAlertBroadcastChannelType0") 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 d5173bde..865d79dd 100644 --- a/rootly_sdk/models/service_incident_broadcast_channel_type_0.py +++ b/rootly_sdk/models/service_incident_broadcast_channel_type_0.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ServiceIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/service_list.py b/rootly_sdk/models/service_list.py index fb54a8c7..8fac8d1f 100644 --- a/rootly_sdk/models/service_list.py +++ b/rootly_sdk/models/service_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.service_list_data_item import ServiceListDataItem @@ -22,14 +28,21 @@ class ServiceList: data (list[ServiceListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ServiceListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.service_list_data_item import ServiceListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.service_list_data_item import ServiceListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + service_list = cls( data=data, links=links, meta=meta, + included=included, ) service_list.additional_properties = d diff --git a/rootly_sdk/models/service_list_data_item.py b/rootly_sdk/models/service_list_data_item.py index 809cde14..deeeec40 100644 --- a/rootly_sdk/models/service_list_data_item.py +++ b/rootly_sdk/models/service_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.service_list_data_item_type import ServiceListDataItemType, check_service_list_data_item_type +from ..types import UNSET, Unset + +from ..models.service_list_data_item_type import check_service_list_data_item_type +from ..models.service_list_data_item_type import ServiceListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.service import Service @@ -30,6 +34,8 @@ class ServiceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.service import Service + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/service_managed_by.py b/rootly_sdk/models/service_managed_by.py new file mode 100644 index 00000000..b66a3a05 --- /dev/null +++ b/rootly_sdk/models/service_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +ServiceManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +SERVICE_MANAGED_BY_VALUES: set[ServiceManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_service_managed_by(value: str | None) -> ServiceManagedBy | None: + if value is None: + return None + if value in SERVICE_MANAGED_BY_VALUES: + return cast(ServiceManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SERVICE_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/service_properties_type_0_item.py b/rootly_sdk/models/service_properties_type_0_item.py index ca3eadbd..0f758ed7 100644 --- a/rootly_sdk/models/service_properties_type_0_item.py +++ b/rootly_sdk/models/service_properties_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ServicePropertiesType0Item") diff --git a/rootly_sdk/models/service_response.py b/rootly_sdk/models/service_response.py index 2b2849d3..b4d53871 100644 --- a/rootly_sdk/models/service_response.py +++ b/rootly_sdk/models/service_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.service_response_data import ServiceResponseData @@ -18,14 +24,26 @@ class ServiceResponse: """ Attributes: data (ServiceResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ServiceResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.service_response_data import ServiceResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.service_response_data import ServiceResponseData d = dict(src_dict) data = ServiceResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + service_response = cls( data=data, + included=included, ) service_response.additional_properties = d diff --git a/rootly_sdk/models/service_response_data.py b/rootly_sdk/models/service_response_data.py index 3ee17f08..4a879e02 100644 --- a/rootly_sdk/models/service_response_data.py +++ b/rootly_sdk/models/service_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.service_response_data_type import ServiceResponseDataType, check_service_response_data_type +from ..types import UNSET, Unset + +from ..models.service_response_data_type import check_service_response_data_type +from ..models.service_response_data_type import ServiceResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.service import Service @@ -30,6 +34,8 @@ class ServiceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.service import Service + id = self.id type_: str = self.type_ 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 9349bda9..0a3d067d 100644 --- a/rootly_sdk/models/service_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/service_slack_aliases_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ServiceSlackAliasesType0Item") 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 a86a7471..f5aab7ca 100644 --- a/rootly_sdk/models/service_slack_channels_type_0_item.py +++ b/rootly_sdk/models/service_slack_channels_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ServiceSlackChannelsType0Item") diff --git a/rootly_sdk/models/severity.py b/rootly_sdk/models/severity.py index a3bee45c..84b58f2a 100644 --- a/rootly_sdk/models/severity.py +++ b/rootly_sdk/models/severity.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.severity_severity import SeveritySeverity, check_severity_severity from ..types import UNSET, Unset +from ..models.severity_severity import check_severity_severity +from ..models.severity_severity import SeveritySeverity +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.severity_slack_aliases_type_0_item import SeveritySlackAliasesType0Item from ..models.severity_slack_channels_type_0_item import SeveritySlackChannelsType0Item @@ -49,6 +53,9 @@ class Severity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.severity_slack_aliases_type_0_item import SeveritySlackAliasesType0Item + from ..models.severity_slack_channels_type_0_item import SeveritySlackChannelsType0Item + name = self.name created_at = self.created_at diff --git a/rootly_sdk/models/severity_list.py b/rootly_sdk/models/severity_list.py index 7cfa514c..ca244b77 100644 --- a/rootly_sdk/models/severity_list.py +++ b/rootly_sdk/models/severity_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.severity_list_data_item import SeverityListDataItem @@ -22,14 +28,21 @@ class SeverityList: data (list[SeverityListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[SeverityListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.severity_list_data_item import SeverityListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.severity_list_data_item import SeverityListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + severity_list = cls( data=data, links=links, meta=meta, + included=included, ) severity_list.additional_properties = d diff --git a/rootly_sdk/models/severity_list_data_item.py b/rootly_sdk/models/severity_list_data_item.py index 70b771d4..5de75842 100644 --- a/rootly_sdk/models/severity_list_data_item.py +++ b/rootly_sdk/models/severity_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.severity_list_data_item_type import SeverityListDataItemType, check_severity_list_data_item_type +from ..types import UNSET, Unset + +from ..models.severity_list_data_item_type import check_severity_list_data_item_type +from ..models.severity_list_data_item_type import SeverityListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.severity import Severity @@ -30,6 +34,8 @@ class SeverityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.severity import Severity + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/severity_response.py b/rootly_sdk/models/severity_response.py index 9eb6fb82..6238c777 100644 --- a/rootly_sdk/models/severity_response.py +++ b/rootly_sdk/models/severity_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.severity_response_data import SeverityResponseData @@ -18,14 +24,26 @@ class SeverityResponse: """ Attributes: data (SeverityResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: SeverityResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.severity_response_data import SeverityResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.severity_response_data import SeverityResponseData d = dict(src_dict) data = SeverityResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + severity_response = cls( data=data, + included=included, ) severity_response.additional_properties = d diff --git a/rootly_sdk/models/severity_response_data.py b/rootly_sdk/models/severity_response_data.py index 0e33a4b6..722f1ac9 100644 --- a/rootly_sdk/models/severity_response_data.py +++ b/rootly_sdk/models/severity_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.severity_response_data_type import SeverityResponseDataType, check_severity_response_data_type +from ..types import UNSET, Unset + +from ..models.severity_response_data_type import check_severity_response_data_type +from ..models.severity_response_data_type import SeverityResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.severity import Severity @@ -30,6 +34,8 @@ class SeverityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.severity import Severity + id = self.id type_: str = self.type_ 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 d7ac6e2f..1df02d13 100644 --- a/rootly_sdk/models/severity_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/severity_slack_aliases_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SeveritySlackAliasesType0Item") 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 6412d29a..442bdc93 100644 --- a/rootly_sdk/models/severity_slack_channels_type_0_item.py +++ b/rootly_sdk/models/severity_slack_channels_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SeveritySlackChannelsType0Item") diff --git a/rootly_sdk/models/shift.py b/rootly_sdk/models/shift.py index 2243e08f..3c4fa6ec 100644 --- a/rootly_sdk/models/shift.py +++ b/rootly_sdk/models/shift.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="Shift") diff --git a/rootly_sdk/models/shift_coverage_request.py b/rootly_sdk/models/shift_coverage_request.py new file mode 100644 index 00000000..00c4f49c --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request.py @@ -0,0 +1,202 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.schedule_response import ScheduleResponse + from ..models.shift import Shift + from ..models.user_response import UserResponse + + +T = TypeVar("T", bound="ShiftCoverageRequest") + + +@_attrs_define +class ShiftCoverageRequest: + """ + Attributes: + schedule_id (str): ID of schedule + shift_id (str): ID of the shift being covered + original_shift_user_id (int): ID of the user whose shift is being covered + created_by_user_id (int): ID of the user who created the coverage request + starts_at (str): Start datetime of the coverage request + ends_at (str): End datetime of the coverage request + created_at (str | Unset): Date of creation + updated_at (str | Unset): Date of last update + schedule (ScheduleResponse | Unset): + shift (Shift | Unset): + original_shift_user (UserResponse | Unset): + created_by_user (UserResponse | Unset): + """ + + schedule_id: str + shift_id: str + original_shift_user_id: int + created_by_user_id: int + starts_at: str + ends_at: str + created_at: str | Unset = UNSET + updated_at: str | Unset = UNSET + schedule: ScheduleResponse | Unset = UNSET + shift: Shift | Unset = UNSET + original_shift_user: UserResponse | Unset = UNSET + created_by_user: UserResponse | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.user_response import UserResponse + from ..models.shift import Shift + from ..models.schedule_response import ScheduleResponse + + schedule_id = self.schedule_id + + shift_id = self.shift_id + + original_shift_user_id = self.original_shift_user_id + + created_by_user_id = self.created_by_user_id + + starts_at = self.starts_at + + ends_at = self.ends_at + + created_at = self.created_at + + updated_at = self.updated_at + + schedule: dict[str, Any] | Unset = UNSET + if not isinstance(self.schedule, Unset): + schedule = self.schedule.to_dict() + + shift: dict[str, Any] | Unset = UNSET + if not isinstance(self.shift, Unset): + shift = self.shift.to_dict() + + original_shift_user: dict[str, Any] | Unset = UNSET + if not isinstance(self.original_shift_user, Unset): + original_shift_user = self.original_shift_user.to_dict() + + created_by_user: dict[str, Any] | Unset = UNSET + if not isinstance(self.created_by_user, Unset): + created_by_user = self.created_by_user.to_dict() + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "schedule_id": schedule_id, + "shift_id": shift_id, + "original_shift_user_id": original_shift_user_id, + "created_by_user_id": created_by_user_id, + "starts_at": starts_at, + "ends_at": ends_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 + if schedule is not UNSET: + field_dict["schedule"] = schedule + if shift is not UNSET: + field_dict["shift"] = shift + if original_shift_user is not UNSET: + field_dict["original_shift_user"] = original_shift_user + if created_by_user is not UNSET: + field_dict["created_by_user"] = created_by_user + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.schedule_response import ScheduleResponse + from ..models.shift import Shift + from ..models.user_response import UserResponse + + d = dict(src_dict) + schedule_id = d.pop("schedule_id") + + shift_id = d.pop("shift_id") + + original_shift_user_id = d.pop("original_shift_user_id") + + created_by_user_id = d.pop("created_by_user_id") + + starts_at = d.pop("starts_at") + + ends_at = d.pop("ends_at") + + created_at = d.pop("created_at", UNSET) + + updated_at = d.pop("updated_at", UNSET) + + _schedule = d.pop("schedule", UNSET) + schedule: ScheduleResponse | Unset + if isinstance(_schedule, Unset): + schedule = UNSET + else: + schedule = ScheduleResponse.from_dict(_schedule) + + _shift = d.pop("shift", UNSET) + shift: Shift | Unset + if isinstance(_shift, Unset): + shift = UNSET + else: + shift = Shift.from_dict(_shift) + + _original_shift_user = d.pop("original_shift_user", UNSET) + original_shift_user: UserResponse | Unset + if isinstance(_original_shift_user, Unset): + original_shift_user = UNSET + else: + original_shift_user = UserResponse.from_dict(_original_shift_user) + + _created_by_user = d.pop("created_by_user", UNSET) + created_by_user: UserResponse | Unset + if isinstance(_created_by_user, Unset): + created_by_user = UNSET + else: + created_by_user = UserResponse.from_dict(_created_by_user) + + shift_coverage_request = cls( + schedule_id=schedule_id, + shift_id=shift_id, + original_shift_user_id=original_shift_user_id, + created_by_user_id=created_by_user_id, + starts_at=starts_at, + ends_at=ends_at, + created_at=created_at, + updated_at=updated_at, + schedule=schedule, + shift=shift, + original_shift_user=original_shift_user, + created_by_user=created_by_user, + ) + + shift_coverage_request.additional_properties = d + return shift_coverage_request + + @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/shift_coverage_request_list.py b/rootly_sdk/models/shift_coverage_request_list.py new file mode 100644 index 00000000..aacb66bd --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_list.py @@ -0,0 +1,144 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.meta import Meta + from ..models.shift_coverage_request_list_data_item import ShiftCoverageRequestListDataItem + + +T = TypeVar("T", bound="ShiftCoverageRequestList") + + +@_attrs_define +class ShiftCoverageRequestList: + """ + Attributes: + data (list[ShiftCoverageRequestListDataItem]): + links (Links | Unset): + meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: list[ShiftCoverageRequestListDataItem] + links: Links | Unset = UNSET + meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.shift_coverage_request_list_data_item import ShiftCoverageRequestListDataItem + + 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() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + 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 + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.meta import Meta + from ..models.shift_coverage_request_list_data_item import ShiftCoverageRequestListDataItem + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = ShiftCoverageRequestListDataItem.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) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + shift_coverage_request_list = cls( + data=data, + links=links, + meta=meta, + included=included, + ) + + shift_coverage_request_list.additional_properties = d + return shift_coverage_request_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/shift_coverage_request_list_data_item.py b/rootly_sdk/models/shift_coverage_request_list_data_item.py new file mode 100644 index 00000000..e39437e7 --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_list_data_item.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.shift_coverage_request_list_data_item_type import check_shift_coverage_request_list_data_item_type +from ..models.shift_coverage_request_list_data_item_type import ShiftCoverageRequestListDataItemType +from typing import cast + +if TYPE_CHECKING: + from ..models.shift_coverage_request import ShiftCoverageRequest + + +T = TypeVar("T", bound="ShiftCoverageRequestListDataItem") + + +@_attrs_define +class ShiftCoverageRequestListDataItem: + """ + Attributes: + id (str): Unique ID of the coverage request + type_ (ShiftCoverageRequestListDataItemType): + attributes (ShiftCoverageRequest): + """ + + id: str + type_: ShiftCoverageRequestListDataItemType + attributes: ShiftCoverageRequest + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.shift_coverage_request import ShiftCoverageRequest + + 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.shift_coverage_request import ShiftCoverageRequest + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_shift_coverage_request_list_data_item_type(d.pop("type")) + + attributes = ShiftCoverageRequest.from_dict(d.pop("attributes")) + + shift_coverage_request_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + shift_coverage_request_list_data_item.additional_properties = d + return shift_coverage_request_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/shift_coverage_request_list_data_item_type.py b/rootly_sdk/models/shift_coverage_request_list_data_item_type.py new file mode 100644 index 00000000..621284cd --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_list_data_item_type.py @@ -0,0 +1,17 @@ +from typing import Literal, cast + +ShiftCoverageRequestListDataItemType = Literal["shift_coverage_requests"] + +SHIFT_COVERAGE_REQUEST_LIST_DATA_ITEM_TYPE_VALUES: set[ShiftCoverageRequestListDataItemType] = { + "shift_coverage_requests", +} + + +def check_shift_coverage_request_list_data_item_type(value: str | None) -> ShiftCoverageRequestListDataItemType | None: + if value is None: + return None + if value in SHIFT_COVERAGE_REQUEST_LIST_DATA_ITEM_TYPE_VALUES: + return cast(ShiftCoverageRequestListDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {SHIFT_COVERAGE_REQUEST_LIST_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/shift_coverage_request_response.py b/rootly_sdk/models/shift_coverage_request_response.py new file mode 100644 index 00000000..bad0a8a4 --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_response.py @@ -0,0 +1,98 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.shift_coverage_request_response_data import ShiftCoverageRequestResponseData + + +T = TypeVar("T", bound="ShiftCoverageRequestResponse") + + +@_attrs_define +class ShiftCoverageRequestResponse: + """ + Attributes: + data (ShiftCoverageRequestResponseData): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: ShiftCoverageRequestResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.shift_coverage_request_response_data import ShiftCoverageRequestResponseData + + data = self.data.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.shift_coverage_request_response_data import ShiftCoverageRequestResponseData + + d = dict(src_dict) + data = ShiftCoverageRequestResponseData.from_dict(d.pop("data")) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + shift_coverage_request_response = cls( + data=data, + included=included, + ) + + shift_coverage_request_response.additional_properties = d + return shift_coverage_request_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/shift_coverage_request_response_data.py b/rootly_sdk/models/shift_coverage_request_response_data.py new file mode 100644 index 00000000..c0f83a18 --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_response_data.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.shift_coverage_request_response_data_type import check_shift_coverage_request_response_data_type +from ..models.shift_coverage_request_response_data_type import ShiftCoverageRequestResponseDataType +from typing import cast + +if TYPE_CHECKING: + from ..models.shift_coverage_request import ShiftCoverageRequest + + +T = TypeVar("T", bound="ShiftCoverageRequestResponseData") + + +@_attrs_define +class ShiftCoverageRequestResponseData: + """ + Attributes: + id (str): Unique ID of the coverage request + type_ (ShiftCoverageRequestResponseDataType): + attributes (ShiftCoverageRequest): + """ + + id: str + type_: ShiftCoverageRequestResponseDataType + attributes: ShiftCoverageRequest + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.shift_coverage_request import ShiftCoverageRequest + + 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.shift_coverage_request import ShiftCoverageRequest + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_shift_coverage_request_response_data_type(d.pop("type")) + + attributes = ShiftCoverageRequest.from_dict(d.pop("attributes")) + + shift_coverage_request_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + shift_coverage_request_response_data.additional_properties = d + return shift_coverage_request_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/shift_coverage_request_response_data_type.py b/rootly_sdk/models/shift_coverage_request_response_data_type.py new file mode 100644 index 00000000..d371ff31 --- /dev/null +++ b/rootly_sdk/models/shift_coverage_request_response_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +ShiftCoverageRequestResponseDataType = Literal["shift_coverage_requests"] + +SHIFT_COVERAGE_REQUEST_RESPONSE_DATA_TYPE_VALUES: set[ShiftCoverageRequestResponseDataType] = { + "shift_coverage_requests", +} + + +def check_shift_coverage_request_response_data_type(value: str | None) -> ShiftCoverageRequestResponseDataType | None: + if value is None: + return None + if value in SHIFT_COVERAGE_REQUEST_RESPONSE_DATA_TYPE_VALUES: + return cast(ShiftCoverageRequestResponseDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SHIFT_COVERAGE_REQUEST_RESPONSE_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/shift_list.py b/rootly_sdk/models/shift_list.py index 81d9997b..5a34fce3 100644 --- a/rootly_sdk/models/shift_list.py +++ b/rootly_sdk/models/shift_list.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.meta import Meta from ..models.shift_list_data_item import ShiftListDataItem @@ -22,13 +26,19 @@ class ShiftList: Attributes: data (list[ShiftListDataItem]): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[ShiftListDataItem] meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.shift_list_data_item import ShiftListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -38,6 +48,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -47,11 +64,14 @@ def to_dict(self) -> dict[str, Any]: ) if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.meta import Meta from ..models.shift_list_data_item import ShiftListDataItem @@ -70,9 +90,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + shift_list = cls( data=data, meta=meta, + included=included, ) 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 12519c88..970a52d1 100644 --- a/rootly_sdk/models/shift_list_data_item.py +++ b/rootly_sdk/models/shift_list_data_item.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.shift_list_data_item_type import ShiftListDataItemType, check_shift_list_data_item_type from ..types import UNSET, Unset +from ..models.shift_list_data_item_type import check_shift_list_data_item_type +from ..models.shift_list_data_item_type import ShiftListDataItemType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.shift import Shift from ..models.shift_relationships import ShiftRelationships @@ -34,6 +38,9 @@ class ShiftListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.shift import Shift + from ..models.shift_relationships import ShiftRelationships + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/shift_override.py b/rootly_sdk/models/shift_override.py index b96b91fe..49ce184d 100644 --- a/rootly_sdk/models/shift_override.py +++ b/rootly_sdk/models/shift_override.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ShiftOverride") diff --git a/rootly_sdk/models/shift_override_response.py b/rootly_sdk/models/shift_override_response.py index 63b4796b..8c29cb6e 100644 --- a/rootly_sdk/models/shift_override_response.py +++ b/rootly_sdk/models/shift_override_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.shift_override_response_data import ShiftOverrideResponseData @@ -18,14 +24,26 @@ class ShiftOverrideResponse: """ Attributes: data (ShiftOverrideResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: ShiftOverrideResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.shift_override_response_data import ShiftOverrideResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.shift_override_response_data import ShiftOverrideResponseData d = dict(src_dict) data = ShiftOverrideResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + shift_override_response = cls( data=data, + included=included, ) shift_override_response.additional_properties = d diff --git a/rootly_sdk/models/shift_override_response_data.py b/rootly_sdk/models/shift_override_response_data.py index c290bb53..560e1726 100644 --- a/rootly_sdk/models/shift_override_response_data.py +++ b/rootly_sdk/models/shift_override_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.shift_override_response_data_type import ( - ShiftOverrideResponseDataType, - check_shift_override_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.shift_override_response_data_type import check_shift_override_response_data_type +from ..models.shift_override_response_data_type import ShiftOverrideResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.shift_override import ShiftOverride @@ -33,6 +34,8 @@ class ShiftOverrideResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.shift_override import ShiftOverride + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/shift_relationships.py b/rootly_sdk/models/shift_relationships.py index f258b100..f8a1fbec 100644 --- a/rootly_sdk/models/shift_relationships.py +++ b/rootly_sdk/models/shift_relationships.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.shift_relationships_assignee import ShiftRelationshipsAssignee from ..models.shift_relationships_shift_override import ShiftRelationshipsShiftOverride @@ -32,6 +35,10 @@ class ShiftRelationships: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.shift_relationships_user import ShiftRelationshipsUser + from ..models.shift_relationships_assignee import ShiftRelationshipsAssignee + from ..models.shift_relationships_shift_override import ShiftRelationshipsShiftOverride + shift_override: dict[str, Any] | Unset = UNSET if not isinstance(self.shift_override, Unset): shift_override = self.shift_override.to_dict() diff --git a/rootly_sdk/models/shift_relationships_assignee.py b/rootly_sdk/models/shift_relationships_assignee.py index 8c75aa9a..d45d9439 100644 --- a/rootly_sdk/models/shift_relationships_assignee.py +++ b/rootly_sdk/models/shift_relationships_assignee.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.shift_relationships_assignee_data_type_0 import ShiftRelationshipsAssigneeDataType0 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 6d1a4577..4fc7f899 100644 --- a/rootly_sdk/models/shift_relationships_assignee_data_type_0.py +++ b/rootly_sdk/models/shift_relationships_assignee_data_type_0.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="ShiftRelationshipsAssigneeDataType0") diff --git a/rootly_sdk/models/shift_relationships_shift_override.py b/rootly_sdk/models/shift_relationships_shift_override.py index 843e25e3..8ce35621 100644 --- a/rootly_sdk/models/shift_relationships_shift_override.py +++ b/rootly_sdk/models/shift_relationships_shift_override.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.shift_relationships_shift_override_data_type_0 import ShiftRelationshipsShiftOverrideDataType0 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 d5650162..f57872e2 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,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.shift_relationships_shift_override_data_type_0_type import ( - ShiftRelationshipsShiftOverrideDataType0Type, check_shift_relationships_shift_override_data_type_0_type, ) +from ..models.shift_relationships_shift_override_data_type_0_type import ShiftRelationshipsShiftOverrideDataType0Type from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="ShiftRelationshipsShiftOverrideDataType0") diff --git a/rootly_sdk/models/shift_relationships_user.py b/rootly_sdk/models/shift_relationships_user.py index 0e550589..85946f92 100644 --- a/rootly_sdk/models/shift_relationships_user.py +++ b/rootly_sdk/models/shift_relationships_user.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.shift_relationships_user_data_type_0 import ShiftRelationshipsUserDataType0 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 edc4b248..bdbe2049 100644 --- a/rootly_sdk/models/shift_relationships_user_data_type_0.py +++ b/rootly_sdk/models/shift_relationships_user_data_type_0.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.shift_relationships_user_data_type_0_type import ( - ShiftRelationshipsUserDataType0Type, - check_shift_relationships_user_data_type_0_type, -) from ..types import UNSET, Unset +from ..models.shift_relationships_user_data_type_0_type import check_shift_relationships_user_data_type_0_type +from ..models.shift_relationships_user_data_type_0_type import ShiftRelationshipsUserDataType0Type +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="ShiftRelationshipsUserDataType0") diff --git a/rootly_sdk/models/simple_trigger_params.py b/rootly_sdk/models/simple_trigger_params.py index 75b0f282..f56814fa 100644 --- a/rootly_sdk/models/simple_trigger_params.py +++ b/rootly_sdk/models/simple_trigger_params.py @@ -1,21 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.simple_trigger_params_trigger_type import ( - SimpleTriggerParamsTriggerType, - check_simple_trigger_params_trigger_type, -) -from ..models.simple_trigger_params_triggers_item import ( - SimpleTriggerParamsTriggersItem, - check_simple_trigger_params_triggers_item, -) from ..types import UNSET, Unset +from ..models.simple_trigger_params_trigger_type import check_simple_trigger_params_trigger_type +from ..models.simple_trigger_params_trigger_type import SimpleTriggerParamsTriggerType +from ..models.simple_trigger_params_triggers_item import check_simple_trigger_params_triggers_item +from ..models.simple_trigger_params_triggers_item import SimpleTriggerParamsTriggersItem +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="SimpleTriggerParams") diff --git a/rootly_sdk/models/sla.py b/rootly_sdk/models/sla.py index c153570e..62674b3e 100644 --- a/rootly_sdk/models/sla.py +++ b/rootly_sdk/models/sla.py @@ -1,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.sla_condition_match_type import check_sla_condition_match_type +from ..models.sla_condition_match_type import SlaConditionMatchType +from ..models.sla_entity_type import check_sla_entity_type +from ..models.sla_entity_type import SlaEntityType +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + if TYPE_CHECKING: from ..models.sla_conditions_item import SlaConditionsItem from ..models.sla_notification_configurations_item import SlaNotificationConfigurationsItem @@ -73,6 +78,9 @@ class Sla: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.sla_notification_configurations_item import SlaNotificationConfigurationsItem + from ..models.sla_conditions_item import SlaConditionsItem + name = self.name condition_match_type: str = self.condition_match_type diff --git a/rootly_sdk/models/sla_conditions_item.py b/rootly_sdk/models/sla_conditions_item.py index 9a5b164e..56581d0d 100644 --- a/rootly_sdk/models/sla_conditions_item.py +++ b/rootly_sdk/models/sla_conditions_item.py @@ -1,18 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..models.sla_conditions_item_conditionable_type import check_sla_conditions_item_conditionable_type +from ..models.sla_conditions_item_conditionable_type import SlaConditionsItemConditionableType +from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + + T = TypeVar("T", bound="SlaConditionsItem") diff --git a/rootly_sdk/models/sla_list.py b/rootly_sdk/models/sla_list.py index e0f39cea..576a5400 100644 --- a/rootly_sdk/models/sla_list.py +++ b/rootly_sdk/models/sla_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.sla_list_data_item import SlaListDataItem @@ -22,14 +28,21 @@ class SlaList: data (list[SlaListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[SlaListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.sla_list_data_item import SlaListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.sla_list_data_item import SlaListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + sla_list = cls( data=data, links=links, meta=meta, + included=included, ) sla_list.additional_properties = d diff --git a/rootly_sdk/models/sla_list_data_item.py b/rootly_sdk/models/sla_list_data_item.py index 5b7c4779..d5709f67 100644 --- a/rootly_sdk/models/sla_list_data_item.py +++ b/rootly_sdk/models/sla_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.sla_list_data_item_type import check_sla_list_data_item_type +from ..models.sla_list_data_item_type import SlaListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.sla import Sla @@ -30,6 +34,8 @@ class SlaListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.sla import Sla + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/sla_notification_configurations_item.py b/rootly_sdk/models/sla_notification_configurations_item.py index dfb47329..e02832c1 100644 --- a/rootly_sdk/models/sla_notification_configurations_item.py +++ b/rootly_sdk/models/sla_notification_configurations_item.py @@ -1,17 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.sla_notification_configurations_item_offset_type import ( - SlaNotificationConfigurationsItemOffsetType, check_sla_notification_configurations_item_offset_type, ) +from ..models.sla_notification_configurations_item_offset_type import SlaNotificationConfigurationsItemOffsetType from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="SlaNotificationConfigurationsItem") diff --git a/rootly_sdk/models/sla_response.py b/rootly_sdk/models/sla_response.py index 967627f5..e9130072 100644 --- a/rootly_sdk/models/sla_response.py +++ b/rootly_sdk/models/sla_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sla_response_data import SlaResponseData @@ -18,14 +24,26 @@ class SlaResponse: """ Attributes: data (SlaResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: SlaResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.sla_response_data import SlaResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sla_response_data import SlaResponseData d = dict(src_dict) data = SlaResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + sla_response = cls( data=data, + included=included, ) sla_response.additional_properties = d diff --git a/rootly_sdk/models/sla_response_data.py b/rootly_sdk/models/sla_response_data.py index b1b876c7..473726bc 100644 --- a/rootly_sdk/models/sla_response_data.py +++ b/rootly_sdk/models/sla_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.sla_response_data_type import check_sla_response_data_type +from ..models.sla_response_data_type import SlaResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.sla import Sla @@ -30,6 +34,8 @@ class SlaResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.sla import Sla + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/slack_channel.py b/rootly_sdk/models/slack_channel.py new file mode 100644 index 00000000..1b81cb02 --- /dev/null +++ b/rootly_sdk/models/slack_channel.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SlackChannel") + + +@_attrs_define +class SlackChannel: + """ + Attributes: + id (str): + slack_channel_name (str): + slack_channel_id (str): + slack_team_id (str): + created_at (str): + updated_at (str): + """ + + id: str + slack_channel_name: str + slack_channel_id: str + slack_team_id: str + created_at: str + updated_at: str + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + id = self.id + + slack_channel_name = self.slack_channel_name + + slack_channel_id = self.slack_channel_id + + slack_team_id = self.slack_team_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( + { + "id": id, + "slack_channel_name": slack_channel_name, + "slack_channel_id": slack_channel_id, + "slack_team_id": slack_team_id, + "created_at": created_at, + "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") + + slack_channel_name = d.pop("slack_channel_name") + + slack_channel_id = d.pop("slack_channel_id") + + slack_team_id = d.pop("slack_team_id") + + created_at = d.pop("created_at") + + updated_at = d.pop("updated_at") + + slack_channel = cls( + id=id, + slack_channel_name=slack_channel_name, + slack_channel_id=slack_channel_id, + slack_team_id=slack_team_id, + created_at=created_at, + updated_at=updated_at, + ) + + slack_channel.additional_properties = d + return slack_channel + + @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/snapshot_datadog_graph_task_params.py b/rootly_sdk/models/snapshot_datadog_graph_task_params.py index a527230a..fea057d1 100644 --- a/rootly_sdk/models/snapshot_datadog_graph_task_params.py +++ b/rootly_sdk/models/snapshot_datadog_graph_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.snapshot_datadog_graph_task_params_task_type import ( - SnapshotDatadogGraphTaskParamsTaskType, - check_snapshot_datadog_graph_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.snapshot_datadog_graph_task_params_task_type import check_snapshot_datadog_graph_task_params_task_type +from ..models.snapshot_datadog_graph_task_params_task_type import SnapshotDatadogGraphTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.snapshot_datadog_graph_task_params_dashboards_item import SnapshotDatadogGraphTaskParamsDashboardsItem from ..models.snapshot_datadog_graph_task_params_post_to_slack_channels_item import ( @@ -43,6 +44,13 @@ class SnapshotDatadogGraphTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.snapshot_datadog_graph_task_params_dashboards_item import ( + SnapshotDatadogGraphTaskParamsDashboardsItem, + ) + from ..models.snapshot_datadog_graph_task_params_post_to_slack_channels_item import ( + SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem, + ) + past_duration = self.past_duration task_type: str | Unset = UNSET 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 9c746203..5ca21f14 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SnapshotDatadogGraphTaskParamsDashboardsItem") 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 1e3ef6f9..aaee3ca5 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py b/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py index dfda8c8d..5881e9e5 100644 --- a/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py +++ b/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.snapshot_grafana_dashboard_task_params_task_type import ( - SnapshotGrafanaDashboardTaskParamsTaskType, check_snapshot_grafana_dashboard_task_params_task_type, ) +from ..models.snapshot_grafana_dashboard_task_params_task_type import SnapshotGrafanaDashboardTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.snapshot_grafana_dashboard_task_params_dashboards_item import ( @@ -41,6 +44,13 @@ class SnapshotGrafanaDashboardTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.snapshot_grafana_dashboard_task_params_post_to_slack_channels_item import ( + SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem, + ) + from ..models.snapshot_grafana_dashboard_task_params_dashboards_item import ( + SnapshotGrafanaDashboardTaskParamsDashboardsItem, + ) + dashboards = [] for dashboards_item_data in self.dashboards: dashboards_item = dashboards_item_data.to_dict() 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 7b0c3437..d8c6a62b 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SnapshotGrafanaDashboardTaskParamsDashboardsItem") 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 cfa584d1..7966fd68 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/snapshot_looker_look_task_params.py b/rootly_sdk/models/snapshot_looker_look_task_params.py index f30ca13f..70af1204 100644 --- a/rootly_sdk/models/snapshot_looker_look_task_params.py +++ b/rootly_sdk/models/snapshot_looker_look_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.snapshot_looker_look_task_params_task_type import ( - SnapshotLookerLookTaskParamsTaskType, - check_snapshot_looker_look_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.snapshot_looker_look_task_params_task_type import check_snapshot_looker_look_task_params_task_type +from ..models.snapshot_looker_look_task_params_task_type import SnapshotLookerLookTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.snapshot_looker_look_task_params_dashboards_item import SnapshotLookerLookTaskParamsDashboardsItem from ..models.snapshot_looker_look_task_params_post_to_slack_channels_item import ( @@ -39,6 +40,11 @@ class SnapshotLookerLookTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.snapshot_looker_look_task_params_post_to_slack_channels_item import ( + SnapshotLookerLookTaskParamsPostToSlackChannelsItem, + ) + from ..models.snapshot_looker_look_task_params_dashboards_item import SnapshotLookerLookTaskParamsDashboardsItem + dashboards = [] for dashboards_item_data in self.dashboards: dashboards_item = dashboards_item_data.to_dict() 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 8f376d5f..5e5d4a4e 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SnapshotLookerLookTaskParamsDashboardsItem") 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 919bbb01..7e1bde49 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SnapshotLookerLookTaskParamsPostToSlackChannelsItem") 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 364069f3..f400fc95 100644 --- a/rootly_sdk/models/snapshot_new_relic_graph_task_params.py +++ b/rootly_sdk/models/snapshot_new_relic_graph_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.snapshot_new_relic_graph_task_params_metric_type import ( - SnapshotNewRelicGraphTaskParamsMetricType, check_snapshot_new_relic_graph_task_params_metric_type, ) -from ..models.snapshot_new_relic_graph_task_params_task_type import ( - SnapshotNewRelicGraphTaskParamsTaskType, - check_snapshot_new_relic_graph_task_params_task_type, -) +from ..models.snapshot_new_relic_graph_task_params_metric_type import SnapshotNewRelicGraphTaskParamsMetricType +from ..models.snapshot_new_relic_graph_task_params_task_type import check_snapshot_new_relic_graph_task_params_task_type +from ..models.snapshot_new_relic_graph_task_params_task_type import SnapshotNewRelicGraphTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.snapshot_new_relic_graph_task_params_post_to_slack_channels_item import ( @@ -44,6 +45,10 @@ class SnapshotNewRelicGraphTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.snapshot_new_relic_graph_task_params_post_to_slack_channels_item import ( + SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem, + ) + metric_query = self.metric_query metric_type: str = self.metric_type 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 143318a5..eb9e6134 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/snooze_alert.py b/rootly_sdk/models/snooze_alert.py new file mode 100644 index 00000000..7107f94a --- /dev/null +++ b/rootly_sdk/models/snooze_alert.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.snooze_alert_data import SnoozeAlertData + + +T = TypeVar("T", bound="SnoozeAlert") + + +@_attrs_define +class SnoozeAlert: + """ + Attributes: + data (SnoozeAlertData): + """ + + data: SnoozeAlertData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.snooze_alert_data import SnoozeAlertData + + 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.snooze_alert_data import SnoozeAlertData + + d = dict(src_dict) + data = SnoozeAlertData.from_dict(d.pop("data")) + + snooze_alert = cls( + data=data, + ) + + snooze_alert.additional_properties = d + return snooze_alert + + @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/snooze_alert_data.py b/rootly_sdk/models/snooze_alert_data.py new file mode 100644 index 00000000..c94101fe --- /dev/null +++ b/rootly_sdk/models/snooze_alert_data.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.snooze_alert_data_type import check_snooze_alert_data_type +from ..models.snooze_alert_data_type import SnoozeAlertDataType +from typing import cast + +if TYPE_CHECKING: + from ..models.snooze_alert_data_attributes import SnoozeAlertDataAttributes + + +T = TypeVar("T", bound="SnoozeAlertData") + + +@_attrs_define +class SnoozeAlertData: + """ + Attributes: + type_ (SnoozeAlertDataType): + attributes (SnoozeAlertDataAttributes): + """ + + type_: SnoozeAlertDataType + attributes: SnoozeAlertDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.snooze_alert_data_attributes import SnoozeAlertDataAttributes + + 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.snooze_alert_data_attributes import SnoozeAlertDataAttributes + + d = dict(src_dict) + type_ = check_snooze_alert_data_type(d.pop("type")) + + attributes = SnoozeAlertDataAttributes.from_dict(d.pop("attributes")) + + snooze_alert_data = cls( + type_=type_, + attributes=attributes, + ) + + snooze_alert_data.additional_properties = d + return snooze_alert_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/snooze_alert_data_attributes.py b/rootly_sdk/models/snooze_alert_data_attributes.py new file mode 100644 index 00000000..0aca40e1 --- /dev/null +++ b/rootly_sdk/models/snooze_alert_data_attributes.py @@ -0,0 +1,46 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="SnoozeAlertDataAttributes") + + +@_attrs_define +class SnoozeAlertDataAttributes: + """ + Attributes: + delay_minutes (int): Number of minutes to snooze the alert for + """ + + delay_minutes: int + + def to_dict(self) -> dict[str, Any]: + delay_minutes = self.delay_minutes + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "delay_minutes": delay_minutes, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + delay_minutes = d.pop("delay_minutes") + + snooze_alert_data_attributes = cls( + delay_minutes=delay_minutes, + ) + + return snooze_alert_data_attributes diff --git a/rootly_sdk/models/snooze_alert_data_type.py b/rootly_sdk/models/snooze_alert_data_type.py new file mode 100644 index 00000000..c7260a30 --- /dev/null +++ b/rootly_sdk/models/snooze_alert_data_type.py @@ -0,0 +1,15 @@ +from typing import Literal, cast + +SnoozeAlertDataType = Literal["alerts"] + +SNOOZE_ALERT_DATA_TYPE_VALUES: set[SnoozeAlertDataType] = { + "alerts", +} + + +def check_snooze_alert_data_type(value: str | None) -> SnoozeAlertDataType | None: + if value is None: + return None + if value in SNOOZE_ALERT_DATA_TYPE_VALUES: + return cast(SnoozeAlertDataType, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {SNOOZE_ALERT_DATA_TYPE_VALUES!r}") diff --git a/rootly_sdk/models/start_session_request.py b/rootly_sdk/models/start_session_request.py new file mode 100644 index 00000000..32e9ccc1 --- /dev/null +++ b/rootly_sdk/models/start_session_request.py @@ -0,0 +1,94 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.start_session_request_platform import check_start_session_request_platform +from ..models.start_session_request_platform import StartSessionRequestPlatform +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="StartSessionRequest") + + +@_attrs_define +class StartSessionRequest: + """ + Attributes: + platform (StartSessionRequestPlatform | Unset): Meeting platform + title (None | str | Unset): Human-readable label for the recording session + """ + + platform: StartSessionRequestPlatform | Unset = UNSET + title: None | str | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + platform: str | Unset = UNSET + if not isinstance(self.platform, Unset): + platform = self.platform + + title: None | str | Unset + if isinstance(self.title, Unset): + title = UNSET + else: + title = self.title + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update({}) + if platform is not UNSET: + field_dict["platform"] = platform + if title is not UNSET: + field_dict["title"] = title + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _platform = d.pop("platform", UNSET) + platform: StartSessionRequestPlatform | Unset + if isinstance(_platform, Unset): + platform = UNSET + else: + platform = check_start_session_request_platform(_platform) + + 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)) + + start_session_request = cls( + platform=platform, + title=title, + ) + + start_session_request.additional_properties = d + return start_session_request + + @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/start_session_request_platform.py b/rootly_sdk/models/start_session_request_platform.py new file mode 100644 index 00000000..4fc63e8c --- /dev/null +++ b/rootly_sdk/models/start_session_request_platform.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +StartSessionRequestPlatform = Literal["google_meet", "microsoft_teams", "webex", "zoom"] + +START_SESSION_REQUEST_PLATFORM_VALUES: set[StartSessionRequestPlatform] = { + "google_meet", + "microsoft_teams", + "webex", + "zoom", +} + + +def check_start_session_request_platform(value: str | None) -> StartSessionRequestPlatform | None: + if value is None: + return None + if value in START_SESSION_REQUEST_PLATFORM_VALUES: + return cast(StartSessionRequestPlatform, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {START_SESSION_REQUEST_PLATFORM_VALUES!r}") diff --git a/rootly_sdk/models/start_session_response.py b/rootly_sdk/models/start_session_response.py new file mode 100644 index 00000000..7e051316 --- /dev/null +++ b/rootly_sdk/models/start_session_response.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.start_session_response_data import StartSessionResponseData + + +T = TypeVar("T", bound="StartSessionResponse") + + +@_attrs_define +class StartSessionResponse: + """ + Attributes: + data (StartSessionResponseData | Unset): + """ + + data: StartSessionResponseData | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.start_session_response_data import StartSessionResponseData + + 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.start_session_response_data import StartSessionResponseData + + d = dict(src_dict) + _data = d.pop("data", UNSET) + data: StartSessionResponseData | Unset + if isinstance(_data, Unset): + data = UNSET + else: + data = StartSessionResponseData.from_dict(_data) + + start_session_response = cls( + data=data, + ) + + start_session_response.additional_properties = d + return start_session_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/start_session_response_data.py b/rootly_sdk/models/start_session_response_data.py new file mode 100644 index 00000000..ca443e4f --- /dev/null +++ b/rootly_sdk/models/start_session_response_data.py @@ -0,0 +1,82 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from uuid import UUID + + +T = TypeVar("T", bound="StartSessionResponseData") + + +@_attrs_define +class StartSessionResponseData: + """ + Attributes: + session_id (UUID): Meeting recording UUID + stream_token (str): Token for the desktop client to stream audio + meeting_recording_id (UUID): Meeting recording UUID + """ + + session_id: UUID + stream_token: str + meeting_recording_id: UUID + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + session_id = str(self.session_id) + + stream_token = self.stream_token + + meeting_recording_id = str(self.meeting_recording_id) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "session_id": session_id, + "stream_token": stream_token, + "meeting_recording_id": meeting_recording_id, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + session_id = UUID(d.pop("session_id")) + + stream_token = d.pop("stream_token") + + meeting_recording_id = UUID(d.pop("meeting_recording_id")) + + start_session_response_data = cls( + session_id=session_id, + stream_token=stream_token, + meeting_recording_id=meeting_recording_id, + ) + + start_session_response_data.additional_properties = d + return start_session_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/status.py b/rootly_sdk/models/status.py index 629cb1f0..e7436d0b 100644 --- a/rootly_sdk/models/status.py +++ b/rootly_sdk/models/status.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="Status") diff --git a/rootly_sdk/models/status_list.py b/rootly_sdk/models/status_list.py index 56778c66..12dafc72 100644 --- a/rootly_sdk/models/status_list.py +++ b/rootly_sdk/models/status_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_list_data_item import StatusListDataItem @@ -22,14 +28,21 @@ class StatusList: data (list[StatusListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[StatusListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_list_data_item import StatusListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_list_data_item import StatusListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_list = cls( data=data, links=links, meta=meta, + included=included, ) status_list.additional_properties = d diff --git a/rootly_sdk/models/status_list_data_item.py b/rootly_sdk/models/status_list_data_item.py index 14605fe4..5e79d05b 100644 --- a/rootly_sdk/models/status_list_data_item.py +++ b/rootly_sdk/models/status_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.status_list_data_item_type import StatusListDataItemType, check_status_list_data_item_type +from ..types import UNSET, Unset + +from ..models.status_list_data_item_type import check_status_list_data_item_type +from ..models.status_list_data_item_type import StatusListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.status import Status @@ -30,6 +34,8 @@ class StatusListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status import Status + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_page.py b/rootly_sdk/models/status_page.py index 310d9446..81d55e06 100644 --- a/rootly_sdk/models/status_page.py +++ b/rootly_sdk/models/status_page.py @@ -1,29 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.status_page_authentication_method import ( - StatusPageAuthenticationMethod, - check_status_page_authentication_method, -) -from ..models.status_page_saml_name_identifier_format import ( - 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 +from ..models.status_page_authentication_method import check_status_page_authentication_method +from ..models.status_page_authentication_method import StatusPageAuthenticationMethod +from ..models.status_page_saml_name_identifier_format import check_status_page_saml_name_identifier_format +from ..models.status_page_saml_name_identifier_format import StatusPageSamlNameIdentifierFormat +from ..models.status_page_section_order_type_0_item import check_status_page_section_order_type_0_item +from ..models.status_page_section_order_type_0_item import StatusPageSectionOrderType0Item +from ..models.status_page_show_uptime_last_days import check_status_page_show_uptime_last_days +from ..models.status_page_show_uptime_last_days import StatusPageShowUptimeLastDays +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.status_page_cname_records_type_0 import StatusPageCnameRecordsType0 diff --git a/rootly_sdk/models/status_page_cname_records_type_0.py b/rootly_sdk/models/status_page_cname_records_type_0.py index 372a2510..407b4890 100644 --- a/rootly_sdk/models/status_page_cname_records_type_0.py +++ b/rootly_sdk/models/status_page_cname_records_type_0.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="StatusPageCnameRecordsType0") diff --git a/rootly_sdk/models/status_page_list.py b/rootly_sdk/models/status_page_list.py index 7522d23a..de991dac 100644 --- a/rootly_sdk/models/status_page_list.py +++ b/rootly_sdk/models/status_page_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_page_list_data_item import StatusPageListDataItem @@ -22,14 +28,21 @@ class StatusPageList: data (list[StatusPageListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[StatusPageListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_page_list_data_item import StatusPageListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_page_list_data_item import StatusPageListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_page_list = cls( data=data, links=links, meta=meta, + included=included, ) status_page_list.additional_properties = d diff --git a/rootly_sdk/models/status_page_list_data_item.py b/rootly_sdk/models/status_page_list_data_item.py index 997d37f3..8e47f6ff 100644 --- a/rootly_sdk/models/status_page_list_data_item.py +++ b/rootly_sdk/models/status_page_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.status_page_list_data_item_type import StatusPageListDataItemType, check_status_page_list_data_item_type +from ..types import UNSET, Unset + +from ..models.status_page_list_data_item_type import check_status_page_list_data_item_type +from ..models.status_page_list_data_item_type import StatusPageListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.status_page import StatusPage @@ -30,6 +34,8 @@ class StatusPageListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_page import StatusPage + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_page_response.py b/rootly_sdk/models/status_page_response.py index 6e42cf5d..bce6c822 100644 --- a/rootly_sdk/models/status_page_response.py +++ b/rootly_sdk/models/status_page_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_response_data import StatusPageResponseData @@ -18,14 +24,26 @@ class StatusPageResponse: """ Attributes: data (StatusPageResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: StatusPageResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_page_response_data import StatusPageResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_response_data import StatusPageResponseData d = dict(src_dict) data = StatusPageResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_page_response = cls( data=data, + included=included, ) status_page_response.additional_properties = d diff --git a/rootly_sdk/models/status_page_response_data.py b/rootly_sdk/models/status_page_response_data.py index 6c86f9e6..6de768d8 100644 --- a/rootly_sdk/models/status_page_response_data.py +++ b/rootly_sdk/models/status_page_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.status_page_response_data_type import StatusPageResponseDataType, check_status_page_response_data_type +from ..types import UNSET, Unset + +from ..models.status_page_response_data_type import check_status_page_response_data_type +from ..models.status_page_response_data_type import StatusPageResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.status_page import StatusPage @@ -30,6 +34,8 @@ class StatusPageResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_page import StatusPage + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_page_template.py b/rootly_sdk/models/status_page_template.py index 082b8b2b..e39ae77f 100644 --- a/rootly_sdk/models/status_page_template.py +++ b/rootly_sdk/models/status_page_template.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.status_page_template_kind import StatusPageTemplateKind, check_status_page_template_kind from ..types import UNSET, Unset +from ..models.status_page_template_kind import check_status_page_template_kind +from ..models.status_page_template_kind import StatusPageTemplateKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="StatusPageTemplate") diff --git a/rootly_sdk/models/status_page_template_list.py b/rootly_sdk/models/status_page_template_list.py index 798c5c46..0a98b70a 100644 --- a/rootly_sdk/models/status_page_template_list.py +++ b/rootly_sdk/models/status_page_template_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_page_template_list_data_item import StatusPageTemplateListDataItem @@ -22,14 +28,21 @@ class StatusPageTemplateList: data (list[StatusPageTemplateListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[StatusPageTemplateListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.status_page_template_list_data_item import StatusPageTemplateListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.status_page_template_list_data_item import StatusPageTemplateListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_page_template_list = cls( data=data, links=links, meta=meta, + included=included, ) status_page_template_list.additional_properties = d 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 ae1a0142..f8caddd0 100644 --- a/rootly_sdk/models/status_page_template_list_data_item.py +++ b/rootly_sdk/models/status_page_template_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.status_page_template_list_data_item_type import ( - StatusPageTemplateListDataItemType, - check_status_page_template_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.status_page_template_list_data_item_type import check_status_page_template_list_data_item_type +from ..models.status_page_template_list_data_item_type import StatusPageTemplateListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.status_page_template import StatusPageTemplate @@ -33,6 +34,8 @@ class StatusPageTemplateListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_page_template import StatusPageTemplate + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_page_template_response.py b/rootly_sdk/models/status_page_template_response.py index 0152dc65..fc89138c 100644 --- a/rootly_sdk/models/status_page_template_response.py +++ b/rootly_sdk/models/status_page_template_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_template_response_data import StatusPageTemplateResponseData @@ -18,14 +24,26 @@ class StatusPageTemplateResponse: """ Attributes: data (StatusPageTemplateResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: StatusPageTemplateResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_page_template_response_data import StatusPageTemplateResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_template_response_data import StatusPageTemplateResponseData d = dict(src_dict) data = StatusPageTemplateResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_page_template_response = cls( data=data, + included=included, ) status_page_template_response.additional_properties = d diff --git a/rootly_sdk/models/status_page_template_response_data.py b/rootly_sdk/models/status_page_template_response_data.py index aa4d8b7a..e35aef54 100644 --- a/rootly_sdk/models/status_page_template_response_data.py +++ b/rootly_sdk/models/status_page_template_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.status_page_template_response_data_type import ( - StatusPageTemplateResponseDataType, - check_status_page_template_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.status_page_template_response_data_type import check_status_page_template_response_data_type +from ..models.status_page_template_response_data_type import StatusPageTemplateResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.status_page_template import StatusPageTemplate @@ -33,6 +34,8 @@ class StatusPageTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_page_template import StatusPageTemplate + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/status_response.py b/rootly_sdk/models/status_response.py index e7d2809e..874bdd7d 100644 --- a/rootly_sdk/models/status_response.py +++ b/rootly_sdk/models/status_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_response_data import StatusResponseData @@ -18,14 +24,26 @@ class StatusResponse: """ Attributes: data (StatusResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: StatusResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status_response_data import StatusResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_response_data import StatusResponseData d = dict(src_dict) data = StatusResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + status_response = cls( data=data, + included=included, ) status_response.additional_properties = d diff --git a/rootly_sdk/models/status_response_data.py b/rootly_sdk/models/status_response_data.py index d5ff8e77..218d6822 100644 --- a/rootly_sdk/models/status_response_data.py +++ b/rootly_sdk/models/status_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.status_response_data_type import StatusResponseDataType, check_status_response_data_type +from ..types import UNSET, Unset + +from ..models.status_response_data_type import check_status_response_data_type +from ..models.status_response_data_type import StatusResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.status import Status @@ -30,6 +34,8 @@ class StatusResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.status import Status + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/sub_status.py b/rootly_sdk/models/sub_status.py index 6018ef9b..a896b390 100644 --- a/rootly_sdk/models/sub_status.py +++ b/rootly_sdk/models/sub_status.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.sub_status_parent_status import SubStatusParentStatus, check_sub_status_parent_status from ..types import UNSET, Unset +from ..models.sub_status_parent_status import check_sub_status_parent_status +from ..models.sub_status_parent_status import SubStatusParentStatus +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="SubStatus") diff --git a/rootly_sdk/models/sub_status_list.py b/rootly_sdk/models/sub_status_list.py index 850597d9..769e7ae3 100644 --- a/rootly_sdk/models/sub_status_list.py +++ b/rootly_sdk/models/sub_status_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.sub_status_list_data_item import SubStatusListDataItem @@ -22,14 +28,21 @@ class SubStatusList: data (list[SubStatusListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[SubStatusListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.sub_status_list_data_item import SubStatusListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.sub_status_list_data_item import SubStatusListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + sub_status_list = cls( data=data, links=links, meta=meta, + included=included, ) sub_status_list.additional_properties = d diff --git a/rootly_sdk/models/sub_status_list_data_item.py b/rootly_sdk/models/sub_status_list_data_item.py index 2fa6ad7e..3cb7449a 100644 --- a/rootly_sdk/models/sub_status_list_data_item.py +++ b/rootly_sdk/models/sub_status_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.sub_status_list_data_item_type import SubStatusListDataItemType, check_sub_status_list_data_item_type +from ..types import UNSET, Unset + +from ..models.sub_status_list_data_item_type import check_sub_status_list_data_item_type +from ..models.sub_status_list_data_item_type import SubStatusListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.sub_status import SubStatus @@ -30,6 +34,8 @@ class SubStatusListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.sub_status import SubStatus + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/sub_status_response.py b/rootly_sdk/models/sub_status_response.py index d990432b..1f1ed8f7 100644 --- a/rootly_sdk/models/sub_status_response.py +++ b/rootly_sdk/models/sub_status_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sub_status_response_data import SubStatusResponseData @@ -18,14 +24,26 @@ class SubStatusResponse: """ Attributes: data (SubStatusResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: SubStatusResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.sub_status_response_data import SubStatusResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sub_status_response_data import SubStatusResponseData d = dict(src_dict) data = SubStatusResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + sub_status_response = cls( data=data, + included=included, ) sub_status_response.additional_properties = d diff --git a/rootly_sdk/models/sub_status_response_data.py b/rootly_sdk/models/sub_status_response_data.py index 065a8226..1f8a9aef 100644 --- a/rootly_sdk/models/sub_status_response_data.py +++ b/rootly_sdk/models/sub_status_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.sub_status_response_data_type import SubStatusResponseDataType, check_sub_status_response_data_type +from ..types import UNSET, Unset + +from ..models.sub_status_response_data_type import check_sub_status_response_data_type +from ..models.sub_status_response_data_type import SubStatusResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.sub_status import SubStatus @@ -30,6 +34,8 @@ class SubStatusResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.sub_status import SubStatus + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/team.py b/rootly_sdk/models/team.py index a8c10f4f..658a919c 100644 --- a/rootly_sdk/models/team.py +++ b/rootly_sdk/models/team.py @@ -1,13 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.team_auto_add_members_scope import check_team_auto_add_members_scope +from ..models.team_auto_add_members_scope import TeamAutoAddMembersScope +from ..models.team_managed_by import check_team_managed_by +from ..models.team_managed_by import TeamManagedBy +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.team_alert_broadcast_channel_type_0 import TeamAlertBroadcastChannelType0 from ..models.team_incident_broadcast_channel_type_0 import TeamIncidentBroadcastChannelType0 @@ -27,6 +34,7 @@ class Team: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): + managed_by (TeamManagedBy | Unset): How this team is managed (provenance): web, api, terraform, etc. Read-only. 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 @@ -55,6 +63,9 @@ class Team: incident_broadcast_channel (None | TeamIncidentBroadcastChannelType0 | 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 + auto_add_members_scope (TeamAutoAddMembersScope | Unset): Visibility-scoped auto-add behavior. Only present when + the `enable_scoped_incident_channel_auto_add` feature flag is on for the organization. When set, it overrides + `auto_add_members_when_attached`. properties (list[TeamPropertiesType0Item] | None | Unset): Array of property values for this team. """ @@ -62,6 +73,7 @@ class Team: created_at: str updated_at: str slug: str | Unset = UNSET + managed_by: TeamManagedBy | Unset = UNSET description: None | str | Unset = UNSET notify_emails: list[str] | None | Unset = UNSET color: None | str | Unset = UNSET @@ -87,12 +99,16 @@ class Team: incident_broadcast_enabled: bool | None | Unset = UNSET incident_broadcast_channel: None | TeamIncidentBroadcastChannelType0 | Unset = UNSET auto_add_members_when_attached: bool | None | Unset = UNSET + auto_add_members_scope: TeamAutoAddMembersScope | 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]: + from ..models.team_slack_aliases_type_0_item import TeamSlackAliasesType0Item from ..models.team_alert_broadcast_channel_type_0 import TeamAlertBroadcastChannelType0 from ..models.team_incident_broadcast_channel_type_0 import TeamIncidentBroadcastChannelType0 + from ..models.team_slack_channels_type_0_item import TeamSlackChannelsType0Item + from ..models.team_properties_type_0_item import TeamPropertiesType0Item name = self.name @@ -102,6 +118,10 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + managed_by: str | Unset = UNSET + if not isinstance(self.managed_by, Unset): + managed_by = self.managed_by + description: None | str | Unset if isinstance(self.description, Unset): description = UNSET @@ -277,6 +297,10 @@ def to_dict(self) -> dict[str, Any]: else: auto_add_members_when_attached = self.auto_add_members_when_attached + auto_add_members_scope: str | Unset = UNSET + if not isinstance(self.auto_add_members_scope, Unset): + auto_add_members_scope = self.auto_add_members_scope + properties: list[dict[str, Any]] | None | Unset if isinstance(self.properties, Unset): properties = UNSET @@ -300,6 +324,8 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if managed_by is not UNSET: + field_dict["managed_by"] = managed_by if description is not UNSET: field_dict["description"] = description if notify_emails is not UNSET: @@ -350,6 +376,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 auto_add_members_scope is not UNSET: + field_dict["auto_add_members_scope"] = auto_add_members_scope if properties is not UNSET: field_dict["properties"] = properties @@ -372,6 +400,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _managed_by = d.pop("managed_by", UNSET) + managed_by: TeamManagedBy | Unset + if isinstance(_managed_by, Unset): + managed_by = UNSET + else: + managed_by = check_team_managed_by(_managed_by) + def _parse_description(data: object) -> None | str | Unset: if data is None: return data @@ -665,6 +700,13 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: d.pop("auto_add_members_when_attached", UNSET) ) + _auto_add_members_scope = d.pop("auto_add_members_scope", UNSET) + auto_add_members_scope: TeamAutoAddMembersScope | Unset + if isinstance(_auto_add_members_scope, Unset): + auto_add_members_scope = UNSET + else: + auto_add_members_scope = check_team_auto_add_members_scope(_auto_add_members_scope) + def _parse_properties(data: object) -> list[TeamPropertiesType0Item] | None | Unset: if data is None: return data @@ -692,6 +734,7 @@ def _parse_properties(data: object) -> list[TeamPropertiesType0Item] | None | Un created_at=created_at, updated_at=updated_at, slug=slug, + managed_by=managed_by, description=description, notify_emails=notify_emails, color=color, @@ -717,6 +760,7 @@ def _parse_properties(data: object) -> list[TeamPropertiesType0Item] | None | Un incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, auto_add_members_when_attached=auto_add_members_when_attached, + auto_add_members_scope=auto_add_members_scope, properties=properties, ) 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 137ccd8f..1cb7b019 100644 --- a/rootly_sdk/models/team_alert_broadcast_channel_type_0.py +++ b/rootly_sdk/models/team_alert_broadcast_channel_type_0.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="TeamAlertBroadcastChannelType0") diff --git a/rootly_sdk/models/team_auto_add_members_scope.py b/rootly_sdk/models/team_auto_add_members_scope.py new file mode 100644 index 00000000..d81dad07 --- /dev/null +++ b/rootly_sdk/models/team_auto_add_members_scope.py @@ -0,0 +1,18 @@ +from typing import Literal, cast + +TeamAutoAddMembersScope = Literal["all", "off", "public_and_test", "public_only"] + +TEAM_AUTO_ADD_MEMBERS_SCOPE_VALUES: set[TeamAutoAddMembersScope] = { + "all", + "off", + "public_and_test", + "public_only", +} + + +def check_team_auto_add_members_scope(value: str | None) -> TeamAutoAddMembersScope | None: + if value is None: + return None + if value in TEAM_AUTO_ADD_MEMBERS_SCOPE_VALUES: + return cast(TeamAutoAddMembersScope, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {TEAM_AUTO_ADD_MEMBERS_SCOPE_VALUES!r}") 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 787a395f..4f17d9fc 100644 --- a/rootly_sdk/models/team_incident_broadcast_channel_type_0.py +++ b/rootly_sdk/models/team_incident_broadcast_channel_type_0.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="TeamIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/team_list.py b/rootly_sdk/models/team_list.py index 88a51540..842baf36 100644 --- a/rootly_sdk/models/team_list.py +++ b/rootly_sdk/models/team_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.team_list_data_item import TeamListDataItem @@ -22,14 +28,21 @@ class TeamList: data (list[TeamListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[TeamListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.team_list_data_item import TeamListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.team_list_data_item import TeamListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + team_list = cls( data=data, links=links, meta=meta, + included=included, ) team_list.additional_properties = d diff --git a/rootly_sdk/models/team_list_data_item.py b/rootly_sdk/models/team_list_data_item.py index f1419dae..d50369ac 100644 --- a/rootly_sdk/models/team_list_data_item.py +++ b/rootly_sdk/models/team_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.team_list_data_item_type import TeamListDataItemType, check_team_list_data_item_type +from ..types import UNSET, Unset + +from ..models.team_list_data_item_type import check_team_list_data_item_type +from ..models.team_list_data_item_type import TeamListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.team import Team @@ -30,6 +34,8 @@ class TeamListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.team import Team + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/team_managed_by.py b/rootly_sdk/models/team_managed_by.py new file mode 100644 index 00000000..40cf2930 --- /dev/null +++ b/rootly_sdk/models/team_managed_by.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +TeamManagedBy = Literal["admin_web", "api", "backstage", "catalog_sync", "pulumi", "terraform", "web"] + +TEAM_MANAGED_BY_VALUES: set[TeamManagedBy] = { + "admin_web", + "api", + "backstage", + "catalog_sync", + "pulumi", + "terraform", + "web", +} + + +def check_team_managed_by(value: str | None) -> TeamManagedBy | None: + if value is None: + return None + if value in TEAM_MANAGED_BY_VALUES: + return cast(TeamManagedBy, value) + raise TypeError(f"Unexpected value {value!r}. Expected one of {TEAM_MANAGED_BY_VALUES!r}") diff --git a/rootly_sdk/models/team_properties_type_0_item.py b/rootly_sdk/models/team_properties_type_0_item.py index c184a5a0..aa95a58b 100644 --- a/rootly_sdk/models/team_properties_type_0_item.py +++ b/rootly_sdk/models/team_properties_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="TeamPropertiesType0Item") diff --git a/rootly_sdk/models/team_response.py b/rootly_sdk/models/team_response.py index 8a02c104..2c04653e 100644 --- a/rootly_sdk/models/team_response.py +++ b/rootly_sdk/models/team_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.team_response_data import TeamResponseData @@ -18,14 +24,26 @@ class TeamResponse: """ Attributes: data (TeamResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: TeamResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.team_response_data import TeamResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.team_response_data import TeamResponseData d = dict(src_dict) data = TeamResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + team_response = cls( data=data, + included=included, ) team_response.additional_properties = d diff --git a/rootly_sdk/models/team_response_data.py b/rootly_sdk/models/team_response_data.py index a9adb9e2..40e711be 100644 --- a/rootly_sdk/models/team_response_data.py +++ b/rootly_sdk/models/team_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.team_response_data_type import TeamResponseDataType, check_team_response_data_type +from ..types import UNSET, Unset + +from ..models.team_response_data_type import check_team_response_data_type +from ..models.team_response_data_type import TeamResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.team import Team @@ -30,6 +34,8 @@ class TeamResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.team import Team + id = self.id type_: str = self.type_ 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 5dfb959c..6c58d6a5 100644 --- a/rootly_sdk/models/team_slack_aliases_type_0_item.py +++ b/rootly_sdk/models/team_slack_aliases_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="TeamSlackAliasesType0Item") 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 9f85b005..fe2cc24e 100644 --- a/rootly_sdk/models/team_slack_channels_type_0_item.py +++ b/rootly_sdk/models/team_slack_channels_type_0_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="TeamSlackChannelsType0Item") diff --git a/rootly_sdk/models/tiptap_block_schema.py b/rootly_sdk/models/tiptap_block_schema.py index dc2ea2cc..99e97c11 100644 --- a/rootly_sdk/models/tiptap_block_schema.py +++ b/rootly_sdk/models/tiptap_block_schema.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.tiptap_block_schema_followup_component import TiptapBlockSchemaFollowupComponent from ..models.tiptap_block_schema_timeline_component import TiptapBlockSchemaTimelineComponent @@ -30,6 +33,9 @@ class TiptapBlockSchema: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.tiptap_block_schema_followup_component import TiptapBlockSchemaFollowupComponent + from ..models.tiptap_block_schema_timeline_component import TiptapBlockSchemaTimelineComponent + followup_component: dict[str, Any] | Unset = UNSET if not isinstance(self.followup_component, Unset): followup_component = self.followup_component.to_dict() diff --git a/rootly_sdk/models/tiptap_block_schema_followup_component.py b/rootly_sdk/models/tiptap_block_schema_followup_component.py index 8220706b..dc1758f7 100644 --- a/rootly_sdk/models/tiptap_block_schema_followup_component.py +++ b/rootly_sdk/models/tiptap_block_schema_followup_component.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.tiptap_block_schema_followup_component_data_sort import ( - TiptapBlockSchemaFollowupComponentDataSort, check_tiptap_block_schema_followup_component_data_sort, ) +from ..models.tiptap_block_schema_followup_component_data_sort import TiptapBlockSchemaFollowupComponentDataSort from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="TiptapBlockSchemaFollowupComponent") diff --git a/rootly_sdk/models/tiptap_block_schema_timeline_component.py b/rootly_sdk/models/tiptap_block_schema_timeline_component.py index a8ec7f99..38bd3ee2 100644 --- a/rootly_sdk/models/tiptap_block_schema_timeline_component.py +++ b/rootly_sdk/models/tiptap_block_schema_timeline_component.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="TiptapBlockSchemaTimelineComponent") diff --git a/rootly_sdk/models/trigger_workflow_task_params.py b/rootly_sdk/models/trigger_workflow_task_params.py index efd310af..1a6aa755 100644 --- a/rootly_sdk/models/trigger_workflow_task_params.py +++ b/rootly_sdk/models/trigger_workflow_task_params.py @@ -1,24 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.trigger_workflow_task_params_attribute_to_query_by import ( - TriggerWorkflowTaskParamsAttributeToQueryBy, check_trigger_workflow_task_params_attribute_to_query_by, ) -from ..models.trigger_workflow_task_params_kind import ( - TriggerWorkflowTaskParamsKind, - check_trigger_workflow_task_params_kind, -) -from ..models.trigger_workflow_task_params_task_type import ( - TriggerWorkflowTaskParamsTaskType, - check_trigger_workflow_task_params_task_type, -) +from ..models.trigger_workflow_task_params_attribute_to_query_by import TriggerWorkflowTaskParamsAttributeToQueryBy +from ..models.trigger_workflow_task_params_kind import check_trigger_workflow_task_params_kind +from ..models.trigger_workflow_task_params_kind import TriggerWorkflowTaskParamsKind +from ..models.trigger_workflow_task_params_task_type import check_trigger_workflow_task_params_task_type +from ..models.trigger_workflow_task_params_task_type import TriggerWorkflowTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.trigger_workflow_task_params_resource import TriggerWorkflowTaskParamsResource @@ -57,6 +56,9 @@ class TriggerWorkflowTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.trigger_workflow_task_params_workflow import TriggerWorkflowTaskParamsWorkflow + from ..models.trigger_workflow_task_params_resource import TriggerWorkflowTaskParamsResource + kind: str = self.kind attribute_to_query_by: str = self.attribute_to_query_by diff --git a/rootly_sdk/models/trigger_workflow_task_params_resource.py b/rootly_sdk/models/trigger_workflow_task_params_resource.py index 79d16a80..b26b119e 100644 --- a/rootly_sdk/models/trigger_workflow_task_params_resource.py +++ b/rootly_sdk/models/trigger_workflow_task_params_resource.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="TriggerWorkflowTaskParamsResource") diff --git a/rootly_sdk/models/trigger_workflow_task_params_workflow.py b/rootly_sdk/models/trigger_workflow_task_params_workflow.py index c4ad90c9..89c65e7a 100644 --- a/rootly_sdk/models/trigger_workflow_task_params_workflow.py +++ b/rootly_sdk/models/trigger_workflow_task_params_workflow.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="TriggerWorkflowTaskParamsWorkflow") diff --git a/rootly_sdk/models/tweet_twitter_message_task_params.py b/rootly_sdk/models/tweet_twitter_message_task_params.py index 9c9498a3..d55e66f1 100644 --- a/rootly_sdk/models/tweet_twitter_message_task_params.py +++ b/rootly_sdk/models/tweet_twitter_message_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.tweet_twitter_message_task_params_task_type import ( - TweetTwitterMessageTaskParamsTaskType, - check_tweet_twitter_message_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.tweet_twitter_message_task_params_task_type import check_tweet_twitter_message_task_params_task_type +from ..models.tweet_twitter_message_task_params_task_type import TweetTwitterMessageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="TweetTwitterMessageTaskParams") diff --git a/rootly_sdk/models/unassign_role_from_user.py b/rootly_sdk/models/unassign_role_from_user.py index 3a117134..6c2bc003 100644 --- a/rootly_sdk/models/unassign_role_from_user.py +++ b/rootly_sdk/models/unassign_role_from_user.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.unassign_role_from_user_data import UnassignRoleFromUserData @@ -24,6 +28,8 @@ class UnassignRoleFromUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.unassign_role_from_user_data import UnassignRoleFromUserData + data = self.data.to_dict() field_dict: 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 ea929298..9893a48c 100644 --- a/rootly_sdk/models/unassign_role_from_user_data.py +++ b/rootly_sdk/models/unassign_role_from_user_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.unassign_role_from_user_data_type import ( - UnassignRoleFromUserDataType, - check_unassign_role_from_user_data_type, -) +from ..types import UNSET, Unset + +from ..models.unassign_role_from_user_data_type import check_unassign_role_from_user_data_type +from ..models.unassign_role_from_user_data_type import UnassignRoleFromUserDataType +from typing import cast if TYPE_CHECKING: from ..models.unassign_role_from_user_data_attributes import UnassignRoleFromUserDataAttributes @@ -31,6 +32,8 @@ class UnassignRoleFromUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.unassign_role_from_user_data_attributes import UnassignRoleFromUserDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 b936640f..7d358aca 100644 --- a/rootly_sdk/models/unassign_role_from_user_data_attributes.py +++ b/rootly_sdk/models/unassign_role_from_user_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UnassignRoleFromUserDataAttributes") diff --git a/rootly_sdk/models/update_action_item_task_params.py b/rootly_sdk/models/update_action_item_task_params.py index fa6a1f0b..e1af1cd2 100644 --- a/rootly_sdk/models/update_action_item_task_params.py +++ b/rootly_sdk/models/update_action_item_task_params.py @@ -1,28 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_action_item_task_params_attribute_to_query_by import ( - UpdateActionItemTaskParamsAttributeToQueryBy, check_update_action_item_task_params_attribute_to_query_by, ) -from ..models.update_action_item_task_params_priority import ( - UpdateActionItemTaskParamsPriority, - check_update_action_item_task_params_priority, -) -from ..models.update_action_item_task_params_status import ( - UpdateActionItemTaskParamsStatus, - check_update_action_item_task_params_status, -) -from ..models.update_action_item_task_params_task_type import ( - UpdateActionItemTaskParamsTaskType, - check_update_action_item_task_params_task_type, -) +from ..models.update_action_item_task_params_attribute_to_query_by import UpdateActionItemTaskParamsAttributeToQueryBy +from ..models.update_action_item_task_params_priority import check_update_action_item_task_params_priority +from ..models.update_action_item_task_params_priority import UpdateActionItemTaskParamsPriority +from ..models.update_action_item_task_params_status import check_update_action_item_task_params_status +from ..models.update_action_item_task_params_status import UpdateActionItemTaskParamsStatus +from ..models.update_action_item_task_params_task_type import check_update_action_item_task_params_task_type +from ..models.update_action_item_task_params_task_type import UpdateActionItemTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_action_item_task_params_assigned_to_user import UpdateActionItemTaskParamsAssignedToUser @@ -67,6 +64,8 @@ class UpdateActionItemTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_action_item_task_params_assigned_to_user import UpdateActionItemTaskParamsAssignedToUser + query_value = self.query_value attribute_to_query_by: str = self.attribute_to_query_by 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 215e2fc0..b46cd342 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateActionItemTaskParamsAssignedToUser") 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 59509bfc..620af109 100644 --- a/rootly_sdk/models/update_airtable_table_record_task_params.py +++ b/rootly_sdk/models/update_airtable_table_record_task_params.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_airtable_table_record_task_params_task_type import ( - UpdateAirtableTableRecordTaskParamsTaskType, check_update_airtable_table_record_task_params_task_type, ) +from ..models.update_airtable_table_record_task_params_task_type import UpdateAirtableTableRecordTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateAirtableTableRecordTaskParams") diff --git a/rootly_sdk/models/update_alert.py b/rootly_sdk/models/update_alert.py index e7b43c0e..2b3d748a 100644 --- a/rootly_sdk/models/update_alert.py +++ b/rootly_sdk/models/update_alert.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_data import UpdateAlertData @@ -24,6 +28,8 @@ class UpdateAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_data import UpdateAlertData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_data.py b/rootly_sdk/models/update_alert_data.py index ab38085f..96dd137e 100644 --- a/rootly_sdk/models/update_alert_data.py +++ b/rootly_sdk/models/update_alert_data.py @@ -1,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_alert_data_type import UpdateAlertDataType, check_update_alert_data_type from ..types import UNSET, Unset +from ..models.update_alert_data_type import check_update_alert_data_type +from ..models.update_alert_data_type import UpdateAlertDataType +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_data_attributes import UpdateAlertDataAttributes @@ -20,30 +23,29 @@ class UpdateAlertData: """ Attributes: + type_ (UpdateAlertDataType): attributes (UpdateAlertDataAttributes): - type_ (UpdateAlertDataType | Unset): """ + type_: UpdateAlertDataType 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() + from ..models.update_alert_data_attributes import UpdateAlertDataAttributes - type_: str | Unset = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_ + 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, } ) - if type_ is not UNSET: - field_dict["type"] = type_ return field_dict @@ -52,18 +54,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_alert_data_attributes import UpdateAlertDataAttributes d = dict(src_dict) - attributes = UpdateAlertDataAttributes.from_dict(d.pop("attributes")) + type_ = check_update_alert_data_type(d.pop("type")) - _type_ = d.pop("type", UNSET) - type_: UpdateAlertDataType | Unset - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = check_update_alert_data_type(_type_) + attributes = UpdateAlertDataAttributes.from_dict(d.pop("attributes")) update_alert_data = cls( - attributes=attributes, type_=type_, + attributes=attributes, ) update_alert_data.additional_properties = d diff --git a/rootly_sdk/models/update_alert_data_attributes.py b/rootly_sdk/models/update_alert_data_attributes.py index 08578eac..6127e155 100644 --- a/rootly_sdk/models/update_alert_data_attributes.py +++ b/rootly_sdk/models/update_alert_data_attributes.py @@ -1,22 +1,20 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field -from ..models.update_alert_data_attributes_noise import ( - UpdateAlertDataAttributesNoise, - check_update_alert_data_attributes_noise, -) -from ..models.update_alert_data_attributes_source import ( - UpdateAlertDataAttributesSource, - check_update_alert_data_attributes_source, -) from ..types import UNSET, Unset +from ..models.update_alert_data_attributes_noise import check_update_alert_data_attributes_noise +from ..models.update_alert_data_attributes_noise import UpdateAlertDataAttributesNoise +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + if TYPE_CHECKING: from ..models.update_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0, @@ -33,11 +31,13 @@ class UpdateAlertDataAttributes: """ Attributes: noise (UpdateAlertDataAttributesNoise | Unset): Whether the alert is marked as noise - source (UpdateAlertDataAttributesSource | Unset): The source of the alert + source (str | Unset): Deprecated. Accepted for backwards compatibility; new clients should omit. Defaults to + `api`. 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 + functionality_ids (list[str] | None | Unset): The Functionality 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 @@ -52,11 +52,12 @@ class UpdateAlertDataAttributes: """ noise: UpdateAlertDataAttributesNoise | Unset = UNSET - source: UpdateAlertDataAttributesSource | Unset = UNSET + source: str | 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 + functionality_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 @@ -71,19 +72,17 @@ class UpdateAlertDataAttributes: ) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_data_attributes_labels_item_type_0 import UpdateAlertDataAttributesLabelsItemType0 from ..models.update_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0, ) from ..models.update_alert_data_attributes_data_type_0 import UpdateAlertDataAttributesDataType0 - from ..models.update_alert_data_attributes_labels_item_type_0 import UpdateAlertDataAttributesLabelsItemType0 noise: str | Unset = UNSET if not isinstance(self.noise, Unset): noise = self.noise - source: str | Unset = UNSET - if not isinstance(self.source, Unset): - source = self.source + source = self.source summary = self.summary @@ -111,6 +110,15 @@ def to_dict(self) -> dict[str, Any]: else: group_ids = self.group_ids + functionality_ids: list[str] | None | Unset + if isinstance(self.functionality_ids, Unset): + functionality_ids = UNSET + elif isinstance(self.functionality_ids, list): + functionality_ids = self.functionality_ids + + else: + functionality_ids = self.functionality_ids + environment_ids: list[str] | None | Unset if isinstance(self.environment_ids, Unset): environment_ids = UNSET @@ -208,6 +216,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["service_ids"] = service_ids if group_ids is not UNSET: field_dict["group_ids"] = group_ids + if functionality_ids is not UNSET: + field_dict["functionality_ids"] = functionality_ids if environment_ids is not UNSET: field_dict["environment_ids"] = environment_ids if started_at is not UNSET: @@ -247,12 +257,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: noise = check_update_alert_data_attributes_noise(_noise) - _source = d.pop("source", UNSET) - source: UpdateAlertDataAttributesSource | Unset - if isinstance(_source, Unset): - source = UNSET - else: - source = check_update_alert_data_attributes_source(_source) + source = d.pop("source", UNSET) summary = d.pop("summary", UNSET) @@ -299,6 +304,23 @@ def _parse_group_ids(data: object) -> list[str] | None | Unset: group_ids = _parse_group_ids(d.pop("group_ids", UNSET)) + def _parse_functionality_ids(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() + functionality_ids_type_0 = cast(list[str], data) + + return functionality_ids_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | Unset, data) + + functionality_ids = _parse_functionality_ids(d.pop("functionality_ids", UNSET)) + def _parse_environment_ids(data: object) -> list[str] | None | Unset: if data is None: return data @@ -464,6 +486,7 @@ def _parse_alert_field_values_attributes_item( description=description, service_ids=service_ids, group_ids=group_ids, + functionality_ids=functionality_ids, environment_ids=environment_ids, started_at=started_at, ended_at=ended_at, 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 ff427941..17137f2e 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0") 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 29405f27..65e7a665 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateAlertDataAttributesDataType0") 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 52b1e2d8..18b6df24 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,11 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + + T = TypeVar("T", bound="UpdateAlertDataAttributesLabelsItemType0") diff --git a/rootly_sdk/models/update_alert_data_attributes_source.py b/rootly_sdk/models/update_alert_data_attributes_source.py deleted file mode 100644 index 15477ee7..00000000 --- a/rootly_sdk/models/update_alert_data_attributes_source.py +++ /dev/null @@ -1,105 +0,0 @@ -from typing import Literal, cast - -UpdateAlertDataAttributesSource = Literal[ - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -] - -UPDATE_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES: set[UpdateAlertDataAttributesSource] = { - "alertmanager", - "api", - "app_dynamics", - "app_optics", - "asana", - "aws_sns", - "azure", - "bug_snag", - "catchpoint", - "checkly", - "chronosphere", - "clickup", - "cloud_watch", - "datadog", - "dynatrace", - "email", - "generic_webhook", - "gitlab", - "google_cloud", - "grafana", - "heartbeat", - "honeycomb", - "jira", - "linear", - "live_call_routing", - "manual", - "mobile", - "monte_carlo", - "nagios", - "new_relic", - "nobl9", - "opsgenie", - "pagerduty", - "pagertree", - "prtg", - "rollbar", - "rootly", - "sentry", - "service_now", - "slack", - "splunk", - "victorops", - "web", - "workflow", - "zendesk", -} - - -def check_update_alert_data_attributes_source(value: str | None) -> UpdateAlertDataAttributesSource | None: - if value is None: - return None - if value in UPDATE_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES: - return cast(UpdateAlertDataAttributesSource, value) - raise TypeError(f"Unexpected value {value!r}. Expected one of {UPDATE_ALERT_DATA_ATTRIBUTES_SOURCE_VALUES!r}") diff --git a/rootly_sdk/models/update_alert_event.py b/rootly_sdk/models/update_alert_event.py index be423dc3..9bf74c68 100644 --- a/rootly_sdk/models/update_alert_event.py +++ b/rootly_sdk/models/update_alert_event.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_event_data import UpdateAlertEventData @@ -25,6 +29,8 @@ class UpdateAlertEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_event_data import UpdateAlertEventData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_event_data.py b/rootly_sdk/models/update_alert_event_data.py index 24317292..374a3bee 100644 --- a/rootly_sdk/models/update_alert_event_data.py +++ b/rootly_sdk/models/update_alert_event_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_alert_event_data_type import UpdateAlertEventDataType, check_update_alert_event_data_type +from ..types import UNSET, Unset + +from ..models.update_alert_event_data_type import check_update_alert_event_data_type +from ..models.update_alert_event_data_type import UpdateAlertEventDataType +from typing import cast if TYPE_CHECKING: from ..models.update_alert_event_data_attributes import UpdateAlertEventDataAttributes @@ -28,6 +32,8 @@ class UpdateAlertEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_event_data_attributes import UpdateAlertEventDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_event_data_attributes.py b/rootly_sdk/models/update_alert_event_data_attributes.py index 82b7f634..4f225a1f 100644 --- a/rootly_sdk/models/update_alert_event_data_attributes.py +++ b/rootly_sdk/models/update_alert_event_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateAlertEventDataAttributes") diff --git a/rootly_sdk/models/update_alert_field.py b/rootly_sdk/models/update_alert_field.py index 6639f945..c67ffd53 100644 --- a/rootly_sdk/models/update_alert_field.py +++ b/rootly_sdk/models/update_alert_field.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_field_data import UpdateAlertFieldData @@ -24,6 +28,8 @@ class UpdateAlertField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_field_data import UpdateAlertFieldData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_field_data.py b/rootly_sdk/models/update_alert_field_data.py index 49eb5c01..ba0a1adf 100644 --- a/rootly_sdk/models/update_alert_field_data.py +++ b/rootly_sdk/models/update_alert_field_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_alert_field_data_type import UpdateAlertFieldDataType, check_update_alert_field_data_type +from ..types import UNSET, Unset + +from ..models.update_alert_field_data_type import check_update_alert_field_data_type +from ..models.update_alert_field_data_type import UpdateAlertFieldDataType +from typing import cast if TYPE_CHECKING: from ..models.update_alert_field_data_attributes import UpdateAlertFieldDataAttributes @@ -28,6 +32,8 @@ class UpdateAlertFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_field_data_attributes import UpdateAlertFieldDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_field_data_attributes.py b/rootly_sdk/models/update_alert_field_data_attributes.py index 67e5080a..4bcafe22 100644 --- a/rootly_sdk/models/update_alert_field_data_attributes.py +++ b/rootly_sdk/models/update_alert_field_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateAlertFieldDataAttributes") diff --git a/rootly_sdk/models/update_alert_group.py b/rootly_sdk/models/update_alert_group.py index 19968c62..8d3e766c 100644 --- a/rootly_sdk/models/update_alert_group.py +++ b/rootly_sdk/models/update_alert_group.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_group_data import UpdateAlertGroupData @@ -24,6 +28,8 @@ class UpdateAlertGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_group_data import UpdateAlertGroupData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_group_data.py b/rootly_sdk/models/update_alert_group_data.py index 22fb4f53..9e90db35 100644 --- a/rootly_sdk/models/update_alert_group_data.py +++ b/rootly_sdk/models/update_alert_group_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_alert_group_data_type import UpdateAlertGroupDataType, check_update_alert_group_data_type +from ..types import UNSET, Unset + +from ..models.update_alert_group_data_type import check_update_alert_group_data_type +from ..models.update_alert_group_data_type import UpdateAlertGroupDataType +from typing import cast if TYPE_CHECKING: from ..models.update_alert_group_data_attributes import UpdateAlertGroupDataAttributes @@ -28,6 +32,8 @@ class UpdateAlertGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_group_data_attributes import UpdateAlertGroupDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_group_data_attributes.py b/rootly_sdk/models/update_alert_group_data_attributes.py index 6e777d38..9414cac9 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes.py +++ b/rootly_sdk/models/update_alert_group_data_attributes.py @@ -1,23 +1,31 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_alert_group_data_attributes_condition_type import ( - UpdateAlertGroupDataAttributesConditionType, check_update_alert_group_data_attributes_condition_type, ) +from ..models.update_alert_group_data_attributes_condition_type import UpdateAlertGroupDataAttributesConditionType from ..models.update_alert_group_data_attributes_group_by_alert_title import ( - UpdateAlertGroupDataAttributesGroupByAlertTitle, check_update_alert_group_data_attributes_group_by_alert_title, ) +from ..models.update_alert_group_data_attributes_group_by_alert_title import ( + UpdateAlertGroupDataAttributesGroupByAlertTitle, +) from ..models.update_alert_group_data_attributes_group_by_alert_urgency import ( - UpdateAlertGroupDataAttributesGroupByAlertUrgency, check_update_alert_group_data_attributes_group_by_alert_urgency, ) +from ..models.update_alert_group_data_attributes_group_by_alert_urgency import ( + UpdateAlertGroupDataAttributesGroupByAlertUrgency, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_alert_group_data_attributes_attributes_item import UpdateAlertGroupDataAttributesAttributesItem @@ -60,6 +68,14 @@ class UpdateAlertGroupDataAttributes: conditions: list[UpdateAlertGroupDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_group_data_attributes_targets_item import UpdateAlertGroupDataAttributesTargetsItem + from ..models.update_alert_group_data_attributes_conditions_item import ( + UpdateAlertGroupDataAttributesConditionsItem, + ) + from ..models.update_alert_group_data_attributes_attributes_item import ( + UpdateAlertGroupDataAttributesAttributesItem, + ) + name = self.name description: None | str | Unset 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 6ab7e774..e1c49247 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateAlertGroupDataAttributesAttributesItem") 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 75f5bd3a..3bdd0c79 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,24 +1,34 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alert_group_data_attributes_conditions_item_conditionable_type import ( - UpdateAlertGroupDataAttributesConditionsItemConditionableType, check_update_alert_group_data_attributes_conditions_item_conditionable_type, ) +from ..models.update_alert_group_data_attributes_conditions_item_conditionable_type import ( + UpdateAlertGroupDataAttributesConditionsItemConditionableType, +) from ..models.update_alert_group_data_attributes_conditions_item_property_field_condition_type import ( - UpdateAlertGroupDataAttributesConditionsItemPropertyFieldConditionType, check_update_alert_group_data_attributes_conditions_item_property_field_condition_type, ) +from ..models.update_alert_group_data_attributes_conditions_item_property_field_condition_type import ( + UpdateAlertGroupDataAttributesConditionsItemPropertyFieldConditionType, +) from ..models.update_alert_group_data_attributes_conditions_item_property_field_type import ( - UpdateAlertGroupDataAttributesConditionsItemPropertyFieldType, check_update_alert_group_data_attributes_conditions_item_property_field_type, ) +from ..models.update_alert_group_data_attributes_conditions_item_property_field_type import ( + UpdateAlertGroupDataAttributesConditionsItemPropertyFieldType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateAlertGroupDataAttributesConditionsItem") 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 5df79c75..8f7fcfab 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alert_group_data_attributes_targets_item_target_type import ( - UpdateAlertGroupDataAttributesTargetsItemTargetType, check_update_alert_group_data_attributes_targets_item_target_type, ) +from ..models.update_alert_group_data_attributes_targets_item_target_type import ( + UpdateAlertGroupDataAttributesTargetsItemTargetType, +) +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="UpdateAlertGroupDataAttributesTargetsItem") @@ -19,8 +25,9 @@ class UpdateAlertGroupDataAttributesTargetsItem: """ Attributes: - target_type (UpdateAlertGroupDataAttributesTargetsItemTargetType): The type of the target. - target_id (UUID): id for the Group, Service or EscalationPolicy + target_type (UpdateAlertGroupDataAttributesTargetsItemTargetType): The type of the target. Please contact + support if you encounter issues using `Functionality` as a target type. + target_id (UUID): id for the Group, Service, EscalationPolicy or Functionality """ target_type: UpdateAlertGroupDataAttributesTargetsItemTargetType diff --git a/rootly_sdk/models/update_alert_group_data_attributes_targets_item_target_type.py b/rootly_sdk/models/update_alert_group_data_attributes_targets_item_target_type.py index 20ba9f13..0571f833 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes_targets_item_target_type.py +++ b/rootly_sdk/models/update_alert_group_data_attributes_targets_item_target_type.py @@ -1,11 +1,12 @@ from typing import Literal, cast -UpdateAlertGroupDataAttributesTargetsItemTargetType = Literal["EscalationPolicy", "Group", "Service"] +UpdateAlertGroupDataAttributesTargetsItemTargetType = Literal["EscalationPolicy", "Functionality", "Group", "Service"] UPDATE_ALERT_GROUP_DATA_ATTRIBUTES_TARGETS_ITEM_TARGET_TYPE_VALUES: set[ UpdateAlertGroupDataAttributesTargetsItemTargetType ] = { "EscalationPolicy", + "Functionality", "Group", "Service", } diff --git a/rootly_sdk/models/update_alert_route.py b/rootly_sdk/models/update_alert_route.py index 0065ca5e..47c696e6 100644 --- a/rootly_sdk/models/update_alert_route.py +++ b/rootly_sdk/models/update_alert_route.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_route_data import UpdateAlertRouteData @@ -24,6 +28,8 @@ class UpdateAlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_route_data import UpdateAlertRouteData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_route_data.py b/rootly_sdk/models/update_alert_route_data.py index 977eaa55..a011a1df 100644 --- a/rootly_sdk/models/update_alert_route_data.py +++ b/rootly_sdk/models/update_alert_route_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_alert_route_data_type import UpdateAlertRouteDataType, check_update_alert_route_data_type +from ..types import UNSET, Unset + +from ..models.update_alert_route_data_type import check_update_alert_route_data_type +from ..models.update_alert_route_data_type import UpdateAlertRouteDataType +from typing import cast if TYPE_CHECKING: from ..models.update_alert_route_data_attributes import UpdateAlertRouteDataAttributes @@ -28,6 +32,8 @@ class UpdateAlertRouteData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_route_data_attributes import UpdateAlertRouteDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_route_data_attributes.py b/rootly_sdk/models/update_alert_route_data_attributes.py index 4a5c76eb..bdf21333 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes.py +++ b/rootly_sdk/models/update_alert_route_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..types import UNSET, Unset +from typing import cast +from uuid import UUID if TYPE_CHECKING: from ..models.update_alert_route_data_attributes_rules_item import UpdateAlertRouteDataAttributesRulesItem @@ -33,6 +37,8 @@ class UpdateAlertRouteDataAttributes: rules: list[UpdateAlertRouteDataAttributesRulesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_route_data_attributes_rules_item import UpdateAlertRouteDataAttributesRulesItem + name = self.name enabled = self.enabled 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 bdfdc8ee..8e6c50b5 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item import ( UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem, @@ -39,6 +42,13 @@ class UpdateAlertRouteDataAttributesRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item import ( + UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem, + ) + from ..models.update_alert_route_data_attributes_rules_item_destinations_item import ( + UpdateAlertRouteDataAttributesRulesItemDestinationsItem, + ) + name = self.name destinations = [] 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 7b75e980..e6778cc3 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, @@ -30,6 +33,10 @@ class UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( + UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, + ) + conditions = [] for conditions_item_data in self.conditions: conditions_item = conditions_item_data.to_dict() 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 6ede7018..41fd247d 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,25 +1,35 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( - UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType, check_update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type, ) +from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( + UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType, +) from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( - UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, check_update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type, ) +from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( + UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, +) from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( - UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType, check_update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type, ) +from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( + UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType, +) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem") 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 3e112e79..28ae7b7e 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alert_route_data_attributes_rules_item_destinations_item_target_type import ( - UpdateAlertRouteDataAttributesRulesItemDestinationsItemTargetType, check_update_alert_route_data_attributes_rules_item_destinations_item_target_type, ) +from ..models.update_alert_route_data_attributes_rules_item_destinations_item_target_type import ( + UpdateAlertRouteDataAttributesRulesItemDestinationsItemTargetType, +) +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="UpdateAlertRouteDataAttributesRulesItemDestinationsItem") diff --git a/rootly_sdk/models/update_alert_routing_rule.py b/rootly_sdk/models/update_alert_routing_rule.py index 1756885e..7151010c 100644 --- a/rootly_sdk/models/update_alert_routing_rule.py +++ b/rootly_sdk/models/update_alert_routing_rule.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_routing_rule_data import UpdateAlertRoutingRuleData @@ -24,6 +28,8 @@ class UpdateAlertRoutingRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_routing_rule_data import UpdateAlertRoutingRuleData + data = self.data.to_dict() field_dict: 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 adbe7136..422c6c74 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data.py +++ b/rootly_sdk/models/update_alert_routing_rule_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_alert_routing_rule_data_type import ( - UpdateAlertRoutingRuleDataType, - check_update_alert_routing_rule_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_alert_routing_rule_data_type import check_update_alert_routing_rule_data_type +from ..models.update_alert_routing_rule_data_type import UpdateAlertRoutingRuleDataType +from typing import cast if TYPE_CHECKING: from ..models.update_alert_routing_rule_data_attributes import UpdateAlertRoutingRuleDataAttributes @@ -31,6 +32,8 @@ class UpdateAlertRoutingRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_routing_rule_data_attributes import UpdateAlertRoutingRuleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 21b53c98..bbb92a18 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data_attributes.py +++ b/rootly_sdk/models/update_alert_routing_rule_data_attributes.py @@ -1,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_alert_routing_rule_data_attributes_condition_type import ( - UpdateAlertRoutingRuleDataAttributesConditionType, check_update_alert_routing_rule_data_attributes_condition_type, ) +from ..models.update_alert_routing_rule_data_attributes_condition_type import ( + UpdateAlertRoutingRuleDataAttributesConditionType, +) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID if TYPE_CHECKING: from ..models.update_alert_routing_rule_data_attributes_conditions_item import ( @@ -49,6 +55,13 @@ class UpdateAlertRoutingRuleDataAttributes: destination: UpdateAlertRoutingRuleDataAttributesDestination | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_routing_rule_data_attributes_destination import ( + UpdateAlertRoutingRuleDataAttributesDestination, + ) + from ..models.update_alert_routing_rule_data_attributes_conditions_item import ( + UpdateAlertRoutingRuleDataAttributesConditionsItem, + ) + name = self.name enabled = self.enabled 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 307d337f..25e3da13 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,21 +1,29 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type import ( - UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType, check_update_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type, ) +from ..models.update_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type import ( + UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType, +) from ..models.update_alert_routing_rule_data_attributes_conditions_item_property_field_type import ( - UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType, check_update_alert_routing_rule_data_attributes_conditions_item_property_field_type, ) +from ..models.update_alert_routing_rule_data_attributes_conditions_item_property_field_type import ( + UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType, +) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="UpdateAlertRoutingRuleDataAttributesConditionsItem") 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 4354e978..dd93e520 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,17 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alert_routing_rule_data_attributes_destination_target_type import ( - UpdateAlertRoutingRuleDataAttributesDestinationTargetType, check_update_alert_routing_rule_data_attributes_destination_target_type, ) +from ..models.update_alert_routing_rule_data_attributes_destination_target_type import ( + UpdateAlertRoutingRuleDataAttributesDestinationTargetType, +) from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="UpdateAlertRoutingRuleDataAttributesDestination") diff --git a/rootly_sdk/models/update_alert_urgency.py b/rootly_sdk/models/update_alert_urgency.py index 1f915593..5366001a 100644 --- a/rootly_sdk/models/update_alert_urgency.py +++ b/rootly_sdk/models/update_alert_urgency.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_alert_urgency_data import UpdateAlertUrgencyData @@ -24,6 +28,8 @@ class UpdateAlertUrgency: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_urgency_data import UpdateAlertUrgencyData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alert_urgency_data.py b/rootly_sdk/models/update_alert_urgency_data.py index f1222acf..ad05976a 100644 --- a/rootly_sdk/models/update_alert_urgency_data.py +++ b/rootly_sdk/models/update_alert_urgency_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_alert_urgency_data_type import UpdateAlertUrgencyDataType, check_update_alert_urgency_data_type +from ..types import UNSET, Unset + +from ..models.update_alert_urgency_data_type import check_update_alert_urgency_data_type +from ..models.update_alert_urgency_data_type import UpdateAlertUrgencyDataType +from typing import cast if TYPE_CHECKING: from ..models.update_alert_urgency_data_attributes import UpdateAlertUrgencyDataAttributes @@ -28,6 +32,8 @@ class UpdateAlertUrgencyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alert_urgency_data_attributes import UpdateAlertUrgencyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alert_urgency_data_attributes.py b/rootly_sdk/models/update_alert_urgency_data_attributes.py index 0099ccef..4d65f3af 100644 --- a/rootly_sdk/models/update_alert_urgency_data_attributes.py +++ b/rootly_sdk/models/update_alert_urgency_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateAlertUrgencyDataAttributes") diff --git a/rootly_sdk/models/update_alerts_source.py b/rootly_sdk/models/update_alerts_source.py index 21792cff..9363143a 100644 --- a/rootly_sdk/models/update_alerts_source.py +++ b/rootly_sdk/models/update_alerts_source.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_alerts_source_data import UpdateAlertsSourceData @@ -24,6 +28,8 @@ class UpdateAlertsSource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alerts_source_data import UpdateAlertsSourceData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_alerts_source_data.py b/rootly_sdk/models/update_alerts_source_data.py index 3ae5eb33..4bdf9bfd 100644 --- a/rootly_sdk/models/update_alerts_source_data.py +++ b/rootly_sdk/models/update_alerts_source_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_alerts_source_data_type import UpdateAlertsSourceDataType, check_update_alerts_source_data_type +from ..types import UNSET, Unset + +from ..models.update_alerts_source_data_type import check_update_alerts_source_data_type +from ..models.update_alerts_source_data_type import UpdateAlertsSourceDataType +from typing import cast if TYPE_CHECKING: from ..models.update_alerts_source_data_attributes import UpdateAlertsSourceDataAttributes @@ -28,6 +32,8 @@ class UpdateAlertsSourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alerts_source_data_attributes import UpdateAlertsSourceDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_alerts_source_data_attributes.py b/rootly_sdk/models/update_alerts_source_data_attributes.py index 91a3c487..37fb2983 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes.py @@ -1,19 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_alerts_source_data_attributes_deduplication_key_kind import ( - UpdateAlertsSourceDataAttributesDeduplicationKeyKind, check_update_alerts_source_data_attributes_deduplication_key_kind, ) +from ..models.update_alerts_source_data_attributes_deduplication_key_kind import ( + UpdateAlertsSourceDataAttributesDeduplicationKeyKind, +) from ..models.update_alerts_source_data_attributes_source_type import ( - UpdateAlertsSourceDataAttributesSourceType, check_update_alerts_source_data_attributes_source_type, ) +from ..models.update_alerts_source_data_attributes_source_type import UpdateAlertsSourceDataAttributesSourceType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_alerts_source_data_attributes_alert_source_fields_attributes_item import ( @@ -41,6 +47,8 @@ class UpdateAlertsSourceDataAttributes: """ Attributes: name (str | Unset): The name of the alert source + enabled (bool | Unset): Whether the alert source is enabled. Disabled sources do not create alerts from incoming + events. 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, @@ -65,6 +73,7 @@ class UpdateAlertsSourceDataAttributes: """ name: str | Unset = UNSET + enabled: bool | Unset = UNSET source_type: UpdateAlertsSourceDataAttributesSourceType | Unset = UNSET alert_urgency_id: str | Unset = UNSET deduplicate_alerts_by_key: bool | Unset = UNSET @@ -83,18 +92,26 @@ class UpdateAlertsSourceDataAttributes: ) def to_dict(self) -> dict[str, Any]: + from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0 import ( + UpdateAlertsSourceDataAttributesSourceableAttributesType0, + ) + from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item import ( + UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem, + ) from ..models.update_alerts_source_data_attributes_alert_template_attributes_type_0 import ( UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0, ) + from ..models.update_alerts_source_data_attributes_alert_source_fields_attributes_item import ( + UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem, + ) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0 import ( UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0, ) - from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0 import ( - UpdateAlertsSourceDataAttributesSourceableAttributesType0, - ) name = self.name + enabled = self.enabled + source_type: str | Unset = UNSET if not isinstance(self.source_type, Unset): source_type = self.source_type @@ -166,6 +183,8 @@ def to_dict(self) -> dict[str, Any]: field_dict.update({}) if name is not UNSET: field_dict["name"] = name + if enabled is not UNSET: + field_dict["enabled"] = enabled if source_type is not UNSET: field_dict["source_type"] = source_type if alert_urgency_id is not UNSET: @@ -214,6 +233,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: d = dict(src_dict) name = d.pop("name", UNSET) + enabled = d.pop("enabled", UNSET) + _source_type = d.pop("source_type", UNSET) source_type: UpdateAlertsSourceDataAttributesSourceType | Unset if isinstance(_source_type, Unset): @@ -347,6 +368,7 @@ def _parse_resolution_rule_attributes( update_alerts_source_data_attributes = cls( name=name, + enabled=enabled, source_type=source_type, alert_urgency_id=alert_urgency_id, deduplicate_alerts_by_key=deduplicate_alerts_by_key, 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 e08e80c0..1e554c7b 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem") 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 8dbf2010..01eda991 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,24 +1,34 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type import ( - UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType, check_update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type, ) +from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type import ( + UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType, +) from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind import ( - UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind, check_update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind, ) +from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind import ( + UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind, +) from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator import ( - UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator, check_update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator, ) +from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator import ( + UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem") 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 246b5909..89cdd091 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0") 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 0fb21b48..8b8abb21 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,24 +1,33 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type import ( - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType, check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type, ) +from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type import ( + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType, +) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type import ( - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType, check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type, ) +from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type import ( + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType, +) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind import ( - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind, check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind, ) +from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind import ( + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item import ( @@ -69,6 +78,10 @@ class UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item import ( + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem, + ) + enabled = self.enabled condition_type: str | Unset = UNSET 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 0676be4b..8d701ab3 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,24 +1,34 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType, check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type, ) +from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType, +) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind, check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind, ) +from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind, +) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator, check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator, ) +from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( + UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem") 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 547587cb..2c2b3e9c 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 @@ -11,6 +11,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", @@ -37,6 +38,7 @@ "checkly", "chronosphere", "cloud_watch", + "cloudflare", "datadog", "dynatrace", "email", 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 d1bd75ba..644d4c85 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item import ( UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem, @@ -41,6 +44,10 @@ class UpdateAlertsSourceDataAttributesSourceableAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item import ( + UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem, + ) + auto_resolve = self.auto_resolve resolve_state: None | str | Unset 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 b89f8b85..a2454226 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( - UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField, check_update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field, ) +from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( + UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem") @@ -22,7 +28,8 @@ class UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttr field (UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | 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 + evaluation. For `notification_target_id` only: if your account has opted in to Dynamic Notification Targets, + this may also be a Liquid template that resolves to a notification target id at routing time. """ field: UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField | Unset = UNSET diff --git a/rootly_sdk/models/update_api_key.py b/rootly_sdk/models/update_api_key.py index 3bb6e234..1635a7b4 100644 --- a/rootly_sdk/models/update_api_key.py +++ b/rootly_sdk/models/update_api_key.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_api_key_data import UpdateApiKeyData @@ -24,6 +28,8 @@ class UpdateApiKey: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_api_key_data import UpdateApiKeyData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_api_key_data.py b/rootly_sdk/models/update_api_key_data.py index 2577a981..8098db87 100644 --- a/rootly_sdk/models/update_api_key_data.py +++ b/rootly_sdk/models/update_api_key_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.update_api_key_data_type import check_update_api_key_data_type +from ..models.update_api_key_data_type import UpdateApiKeyDataType +from typing import cast if TYPE_CHECKING: from ..models.update_api_key_data_attributes import UpdateApiKeyDataAttributes @@ -28,6 +32,8 @@ class UpdateApiKeyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_api_key_data_attributes import UpdateApiKeyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_api_key_data_attributes.py b/rootly_sdk/models/update_api_key_data_attributes.py index a3739511..7f82051d 100644 --- a/rootly_sdk/models/update_api_key_data_attributes.py +++ b/rootly_sdk/models/update_api_key_data_attributes.py @@ -1,13 +1,18 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="UpdateApiKeyDataAttributes") diff --git a/rootly_sdk/models/update_asana_task_task_params.py b/rootly_sdk/models/update_asana_task_task_params.py index 5bc3f70a..2e980979 100644 --- a/rootly_sdk/models/update_asana_task_task_params.py +++ b/rootly_sdk/models/update_asana_task_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_asana_task_task_params_dependency_direction import ( - UpdateAsanaTaskTaskParamsDependencyDirection, check_update_asana_task_task_params_dependency_direction, ) -from ..models.update_asana_task_task_params_task_type import ( - UpdateAsanaTaskTaskParamsTaskType, - check_update_asana_task_task_params_task_type, -) +from ..models.update_asana_task_task_params_dependency_direction import UpdateAsanaTaskTaskParamsDependencyDirection +from ..models.update_asana_task_task_params_task_type import check_update_asana_task_task_params_task_type +from ..models.update_asana_task_task_params_task_type import UpdateAsanaTaskTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_asana_task_task_params_completion import UpdateAsanaTaskTaskParamsCompletion @@ -53,6 +54,8 @@ class UpdateAsanaTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_asana_task_task_params_completion import UpdateAsanaTaskTaskParamsCompletion + task_id = self.task_id completion = self.completion.to_dict() 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 9ed49ae3..a1eabbc0 100644 --- a/rootly_sdk/models/update_asana_task_task_params_completion.py +++ b/rootly_sdk/models/update_asana_task_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateAsanaTaskTaskParamsCompletion") diff --git a/rootly_sdk/models/update_attached_alerts_task_params.py b/rootly_sdk/models/update_attached_alerts_task_params.py index eb67a79b..9a5f96ea 100644 --- a/rootly_sdk/models/update_attached_alerts_task_params.py +++ b/rootly_sdk/models/update_attached_alerts_task_params.py @@ -1,21 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_attached_alerts_task_params_status import ( - UpdateAttachedAlertsTaskParamsStatus, - check_update_attached_alerts_task_params_status, -) -from ..models.update_attached_alerts_task_params_task_type import ( - UpdateAttachedAlertsTaskParamsTaskType, - check_update_attached_alerts_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_attached_alerts_task_params_status import check_update_attached_alerts_task_params_status +from ..models.update_attached_alerts_task_params_status import UpdateAttachedAlertsTaskParamsStatus +from ..models.update_attached_alerts_task_params_task_type import check_update_attached_alerts_task_params_task_type +from ..models.update_attached_alerts_task_params_task_type import UpdateAttachedAlertsTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateAttachedAlertsTaskParams") diff --git a/rootly_sdk/models/update_authorization.py b/rootly_sdk/models/update_authorization.py index ec2243f6..35aa79fa 100644 --- a/rootly_sdk/models/update_authorization.py +++ b/rootly_sdk/models/update_authorization.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_authorization_data import UpdateAuthorizationData @@ -24,6 +28,8 @@ class UpdateAuthorization: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_authorization_data import UpdateAuthorizationData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_authorization_data.py b/rootly_sdk/models/update_authorization_data.py index 08aaa3c1..45ea5656 100644 --- a/rootly_sdk/models/update_authorization_data.py +++ b/rootly_sdk/models/update_authorization_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_authorization_data_type import UpdateAuthorizationDataType, check_update_authorization_data_type +from ..types import UNSET, Unset + +from ..models.update_authorization_data_type import check_update_authorization_data_type +from ..models.update_authorization_data_type import UpdateAuthorizationDataType +from typing import cast if TYPE_CHECKING: from ..models.update_authorization_data_attributes import UpdateAuthorizationDataAttributes @@ -28,6 +32,8 @@ class UpdateAuthorizationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_authorization_data_attributes import UpdateAuthorizationDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_authorization_data_attributes.py b/rootly_sdk/models/update_authorization_data_attributes.py index a5e587cc..e69c385f 100644 --- a/rootly_sdk/models/update_authorization_data_attributes.py +++ b/rootly_sdk/models/update_authorization_data_attributes.py @@ -1,15 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_authorization_data_attributes_permissions_item import ( - UpdateAuthorizationDataAttributesPermissionsItem, check_update_authorization_data_attributes_permissions_item, ) +from ..models.update_authorization_data_attributes_permissions_item import ( + UpdateAuthorizationDataAttributesPermissionsItem, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateAuthorizationDataAttributes") diff --git a/rootly_sdk/models/update_catalog.py b/rootly_sdk/models/update_catalog.py index d016121c..3eb05627 100644 --- a/rootly_sdk/models/update_catalog.py +++ b/rootly_sdk/models/update_catalog.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_catalog_data import UpdateCatalogData @@ -24,6 +28,8 @@ class UpdateCatalog: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_data import UpdateCatalogData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_checklist_template.py b/rootly_sdk/models/update_catalog_checklist_template.py index d6289434..dd7df055 100644 --- a/rootly_sdk/models/update_catalog_checklist_template.py +++ b/rootly_sdk/models/update_catalog_checklist_template.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_catalog_checklist_template_data import UpdateCatalogChecklistTemplateData @@ -24,6 +28,8 @@ class UpdateCatalogChecklistTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_checklist_template_data import UpdateCatalogChecklistTemplateData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_checklist_template_data.py b/rootly_sdk/models/update_catalog_checklist_template_data.py index 405fd1e1..605a6964 100644 --- a/rootly_sdk/models/update_catalog_checklist_template_data.py +++ b/rootly_sdk/models/update_catalog_checklist_template_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.update_catalog_checklist_template_data_type import check_update_catalog_checklist_template_data_type +from ..models.update_catalog_checklist_template_data_type import UpdateCatalogChecklistTemplateDataType +from typing import cast if TYPE_CHECKING: from ..models.update_catalog_checklist_template_data_attributes import UpdateCatalogChecklistTemplateDataAttributes @@ -31,6 +32,10 @@ class UpdateCatalogChecklistTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_checklist_template_data_attributes import ( + UpdateCatalogChecklistTemplateDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py b/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py index 9e6825b4..177af908 100644 --- a/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py +++ b/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_catalog_checklist_template_data_attributes_builtin_field import ( UpdateCatalogChecklistTemplateDataAttributesBuiltinField, @@ -51,6 +55,12 @@ def to_dict(self) -> dict[str, Any]: 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, + ) name = self.name 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 index 7e061904..11752596 100644 --- 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 @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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, ) +from ..models.update_catalog_checklist_template_data_attributes_builtin_field_field_source import ( + UpdateCatalogChecklistTemplateDataAttributesBuiltinFieldFieldSource, +) +from typing import cast + T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributesBuiltinField") 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 index 7831a8c9..71178d3c 100644 --- 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 @@ -1,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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 ..models.update_catalog_checklist_template_data_attributes_custom_field_field_source import ( + UpdateCatalogChecklistTemplateDataAttributesCustomFieldFieldSource, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributesCustomField") 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 index d49718a9..0e1b0433 100644 --- 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 @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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, ) +from ..models.update_catalog_checklist_template_data_attributes_owners_type_0_item_type import ( + UpdateCatalogChecklistTemplateDataAttributesOwnersType0ItemType, +) +from typing import cast + T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item") diff --git a/rootly_sdk/models/update_catalog_data.py b/rootly_sdk/models/update_catalog_data.py index 38041394..ca75c49f 100644 --- a/rootly_sdk/models/update_catalog_data.py +++ b/rootly_sdk/models/update_catalog_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_catalog_data_type import UpdateCatalogDataType, check_update_catalog_data_type +from ..types import UNSET, Unset + +from ..models.update_catalog_data_type import check_update_catalog_data_type +from ..models.update_catalog_data_type import UpdateCatalogDataType +from typing import cast if TYPE_CHECKING: from ..models.update_catalog_data_attributes import UpdateCatalogDataAttributes @@ -28,6 +32,8 @@ class UpdateCatalogData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_data_attributes import UpdateCatalogDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_data_attributes.py b/rootly_sdk/models/update_catalog_data_attributes.py index 63e8cf2b..d2701736 100644 --- a/rootly_sdk/models/update_catalog_data_attributes.py +++ b/rootly_sdk/models/update_catalog_data_attributes.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.update_catalog_data_attributes_icon import ( - UpdateCatalogDataAttributesIcon, - check_update_catalog_data_attributes_icon, -) from ..types import UNSET, Unset +from ..models.update_catalog_data_attributes_icon import check_update_catalog_data_attributes_icon +from ..models.update_catalog_data_attributes_icon import UpdateCatalogDataAttributesIcon +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateCatalogDataAttributes") @@ -22,12 +25,14 @@ class UpdateCatalogDataAttributes: description (None | str | Unset): icon (UpdateCatalogDataAttributesIcon | Unset): position (int | None | Unset): Default position of the catalog when displayed in a list. + external_id (None | str | Unset): An external identifier for this catalog. Must be unique within the team. """ name: str | Unset = UNSET description: None | str | Unset = UNSET icon: UpdateCatalogDataAttributesIcon | Unset = UNSET position: int | None | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -48,6 +53,12 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -59,6 +70,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["icon"] = icon if position is not UNSET: field_dict["position"] = position + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -92,11 +105,21 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + update_catalog_data_attributes = cls( name=name, description=description, icon=icon, position=position, + external_id=external_id, ) return update_catalog_data_attributes diff --git a/rootly_sdk/models/update_catalog_entity.py b/rootly_sdk/models/update_catalog_entity.py index c4e20cc9..fde49c31 100644 --- a/rootly_sdk/models/update_catalog_entity.py +++ b/rootly_sdk/models/update_catalog_entity.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_catalog_entity_data import UpdateCatalogEntityData @@ -24,6 +28,8 @@ class UpdateCatalogEntity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_entity_data import UpdateCatalogEntityData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_entity_data.py b/rootly_sdk/models/update_catalog_entity_data.py index 380a9efd..f2560ba6 100644 --- a/rootly_sdk/models/update_catalog_entity_data.py +++ b/rootly_sdk/models/update_catalog_entity_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_catalog_entity_data_type import UpdateCatalogEntityDataType, check_update_catalog_entity_data_type +from ..types import UNSET, Unset + +from ..models.update_catalog_entity_data_type import check_update_catalog_entity_data_type +from ..models.update_catalog_entity_data_type import UpdateCatalogEntityDataType +from typing import cast if TYPE_CHECKING: from ..models.update_catalog_entity_data_attributes import UpdateCatalogEntityDataAttributes @@ -28,6 +32,8 @@ class UpdateCatalogEntityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_entity_data_attributes import UpdateCatalogEntityDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_entity_data_attributes.py b/rootly_sdk/models/update_catalog_entity_data_attributes.py index 3b6fc8cf..f169887b 100644 --- a/rootly_sdk/models/update_catalog_entity_data_attributes.py +++ b/rootly_sdk/models/update_catalog_entity_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_catalog_entity_data_attributes_properties_item import ( UpdateCatalogEntityDataAttributesPropertiesItem, @@ -23,6 +27,9 @@ class UpdateCatalogEntityDataAttributes: name (str | Unset): description (None | str | Unset): position (int | None | Unset): Default position of the item when displayed in a list. + backstage_id (None | str | Unset): The Backstage entity ID this catalog entity is linked to. + external_id (None | str | Unset): An external identifier for this catalog entity. Must be unique within the + catalog. properties (list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset): Array of property values for this catalog entity """ @@ -30,9 +37,15 @@ class UpdateCatalogEntityDataAttributes: name: str | Unset = UNSET description: None | str | Unset = UNSET position: int | None | Unset = UNSET + backstage_id: None | str | Unset = UNSET + external_id: None | str | Unset = UNSET properties: list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_entity_data_attributes_properties_item import ( + UpdateCatalogEntityDataAttributesPropertiesItem, + ) + name = self.name description: None | str | Unset @@ -47,6 +60,18 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + backstage_id: None | str | Unset + if isinstance(self.backstage_id, Unset): + backstage_id = UNSET + else: + backstage_id = self.backstage_id + + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -63,6 +88,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["description"] = description if position is not UNSET: field_dict["position"] = position + if backstage_id is not UNSET: + field_dict["backstage_id"] = backstage_id + if external_id is not UNSET: + field_dict["external_id"] = external_id if properties is not UNSET: field_dict["properties"] = properties @@ -95,6 +124,24 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_backstage_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + backstage_id = _parse_backstage_id(d.pop("backstage_id", UNSET)) + + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + _properties = d.pop("properties", UNSET) properties: list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -108,6 +155,8 @@ def _parse_position(data: object) -> int | None | Unset: name=name, description=description, position=position, + backstage_id=backstage_id, + external_id=external_id, properties=properties, ) 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 index 06dcaffd..b660f162 100644 --- a/rootly_sdk/models/update_catalog_entity_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_catalog_entity_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateCatalogEntityDataAttributesPropertiesItem") diff --git a/rootly_sdk/models/update_catalog_entity_property.py b/rootly_sdk/models/update_catalog_entity_property.py index b8210f42..b3a10ec5 100644 --- a/rootly_sdk/models/update_catalog_entity_property.py +++ b/rootly_sdk/models/update_catalog_entity_property.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_catalog_entity_property_data import UpdateCatalogEntityPropertyData @@ -26,6 +30,8 @@ class UpdateCatalogEntityProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_entity_property_data import UpdateCatalogEntityPropertyData + data = self.data.to_dict() field_dict: 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 a6145a4c..8cea01a1 100644 --- a/rootly_sdk/models/update_catalog_entity_property_data.py +++ b/rootly_sdk/models/update_catalog_entity_property_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_catalog_entity_property_data_type import ( - UpdateCatalogEntityPropertyDataType, - check_update_catalog_entity_property_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_catalog_entity_property_data_type import check_update_catalog_entity_property_data_type +from ..models.update_catalog_entity_property_data_type import UpdateCatalogEntityPropertyDataType +from typing import cast if TYPE_CHECKING: from ..models.update_catalog_entity_property_data_attributes import UpdateCatalogEntityPropertyDataAttributes @@ -31,6 +32,8 @@ class UpdateCatalogEntityPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_entity_property_data_attributes import UpdateCatalogEntityPropertyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 eb945add..53e8f038 100644 --- a/rootly_sdk/models/update_catalog_entity_property_data_attributes.py +++ b/rootly_sdk/models/update_catalog_entity_property_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_catalog_entity_property_data_attributes_key import ( - UpdateCatalogEntityPropertyDataAttributesKey, check_update_catalog_entity_property_data_attributes_key, ) +from ..models.update_catalog_entity_property_data_attributes_key import UpdateCatalogEntityPropertyDataAttributesKey from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateCatalogEntityPropertyDataAttributes") diff --git a/rootly_sdk/models/update_catalog_field.py b/rootly_sdk/models/update_catalog_field.py index d44c367a..1cc84b4e 100644 --- a/rootly_sdk/models/update_catalog_field.py +++ b/rootly_sdk/models/update_catalog_field.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_catalog_field_data import UpdateCatalogFieldData @@ -24,6 +28,8 @@ class UpdateCatalogField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_field_data import UpdateCatalogFieldData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_field_data.py b/rootly_sdk/models/update_catalog_field_data.py index a5eed9b6..36ce9586 100644 --- a/rootly_sdk/models/update_catalog_field_data.py +++ b/rootly_sdk/models/update_catalog_field_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_catalog_field_data_type import UpdateCatalogFieldDataType, check_update_catalog_field_data_type +from ..types import UNSET, Unset + +from ..models.update_catalog_field_data_type import check_update_catalog_field_data_type +from ..models.update_catalog_field_data_type import UpdateCatalogFieldDataType +from typing import cast if TYPE_CHECKING: from ..models.update_catalog_field_data_attributes import UpdateCatalogFieldDataAttributes @@ -28,6 +32,8 @@ class UpdateCatalogFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_field_data_attributes import UpdateCatalogFieldDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_field_data_attributes.py b/rootly_sdk/models/update_catalog_field_data_attributes.py index b5cfb3a6..2c02c101 100644 --- a/rootly_sdk/models/update_catalog_field_data_attributes.py +++ b/rootly_sdk/models/update_catalog_field_data_attributes.py @@ -1,19 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_catalog_field_data_attributes_catalog_type import ( - UpdateCatalogFieldDataAttributesCatalogType, check_update_catalog_field_data_attributes_catalog_type, ) -from ..models.update_catalog_field_data_attributes_kind import ( - UpdateCatalogFieldDataAttributesKind, - check_update_catalog_field_data_attributes_kind, -) +from ..models.update_catalog_field_data_attributes_catalog_type import UpdateCatalogFieldDataAttributesCatalogType +from ..models.update_catalog_field_data_attributes_kind import check_update_catalog_field_data_attributes_kind +from ..models.update_catalog_field_data_attributes_kind import UpdateCatalogFieldDataAttributesKind from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateCatalogFieldDataAttributes") @@ -28,6 +31,8 @@ class UpdateCatalogFieldDataAttributes: 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. + external_id (None | str | Unset): An external identifier for this catalog field. Must be unique within the + scope. """ name: str | Unset = UNSET @@ -36,6 +41,7 @@ class UpdateCatalogFieldDataAttributes: position: int | None | Unset = UNSET required: bool | Unset = UNSET catalog_type: UpdateCatalogFieldDataAttributesCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -62,6 +68,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -77,6 +89,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -119,6 +133,15 @@ def _parse_position(data: object) -> int | None | Unset: else: catalog_type = check_update_catalog_field_data_attributes_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + update_catalog_field_data_attributes = cls( name=name, kind=kind, @@ -126,6 +149,7 @@ def _parse_position(data: object) -> int | None | Unset: position=position, required=required, catalog_type=catalog_type, + external_id=external_id, ) return update_catalog_field_data_attributes diff --git a/rootly_sdk/models/update_catalog_property.py b/rootly_sdk/models/update_catalog_property.py index cb0695ed..f3c0a31a 100644 --- a/rootly_sdk/models/update_catalog_property.py +++ b/rootly_sdk/models/update_catalog_property.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_catalog_property_data import UpdateCatalogPropertyData @@ -24,6 +28,8 @@ class UpdateCatalogProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_property_data import UpdateCatalogPropertyData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_catalog_property_data.py b/rootly_sdk/models/update_catalog_property_data.py index 91f2cfcd..4562a0bf 100644 --- a/rootly_sdk/models/update_catalog_property_data.py +++ b/rootly_sdk/models/update_catalog_property_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.update_catalog_property_data_type import check_update_catalog_property_data_type +from ..models.update_catalog_property_data_type import UpdateCatalogPropertyDataType +from typing import cast if TYPE_CHECKING: from ..models.update_catalog_property_data_attributes import UpdateCatalogPropertyDataAttributes @@ -31,6 +32,8 @@ class UpdateCatalogPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_catalog_property_data_attributes import UpdateCatalogPropertyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_catalog_property_data_attributes.py b/rootly_sdk/models/update_catalog_property_data_attributes.py index 40c72abb..b58cb4fa 100644 --- a/rootly_sdk/models/update_catalog_property_data_attributes.py +++ b/rootly_sdk/models/update_catalog_property_data_attributes.py @@ -1,19 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset 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 ..models.update_catalog_property_data_attributes_catalog_type import UpdateCatalogPropertyDataAttributesCatalogType +from ..models.update_catalog_property_data_attributes_kind import check_update_catalog_property_data_attributes_kind +from ..models.update_catalog_property_data_attributes_kind import UpdateCatalogPropertyDataAttributesKind from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateCatalogPropertyDataAttributes") @@ -29,6 +32,8 @@ class UpdateCatalogPropertyDataAttributes: required (bool | Unset): Whether the property is required. catalog_type (UpdateCatalogPropertyDataAttributesCatalogType | Unset): The type of catalog the property belongs to. + external_id (None | str | Unset): An external identifier for this catalog property. Must be unique within the + scope. """ name: str | Unset = UNSET @@ -37,6 +42,7 @@ class UpdateCatalogPropertyDataAttributes: position: int | None | Unset = UNSET required: bool | Unset = UNSET catalog_type: UpdateCatalogPropertyDataAttributesCatalogType | Unset = UNSET + external_id: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -63,6 +69,12 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.catalog_type, Unset): catalog_type = self.catalog_type + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -78,6 +90,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["required"] = required if catalog_type is not UNSET: field_dict["catalog_type"] = catalog_type + if external_id is not UNSET: + field_dict["external_id"] = external_id return field_dict @@ -120,6 +134,15 @@ def _parse_position(data: object) -> int | None | Unset: else: catalog_type = check_update_catalog_property_data_attributes_catalog_type(_catalog_type) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + update_catalog_property_data_attributes = cls( name=name, kind=kind, @@ -127,6 +150,7 @@ def _parse_position(data: object) -> int | None | Unset: position=position, required=required, catalog_type=catalog_type, + external_id=external_id, ) return update_catalog_property_data_attributes diff --git a/rootly_sdk/models/update_cause.py b/rootly_sdk/models/update_cause.py index b507866d..e458bfa3 100644 --- a/rootly_sdk/models/update_cause.py +++ b/rootly_sdk/models/update_cause.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_cause_data import UpdateCauseData @@ -24,6 +28,8 @@ class UpdateCause: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_cause_data import UpdateCauseData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_cause_data.py b/rootly_sdk/models/update_cause_data.py index 4149b62b..91813417 100644 --- a/rootly_sdk/models/update_cause_data.py +++ b/rootly_sdk/models/update_cause_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_cause_data_type import UpdateCauseDataType, check_update_cause_data_type +from ..types import UNSET, Unset + +from ..models.update_cause_data_type import check_update_cause_data_type +from ..models.update_cause_data_type import UpdateCauseDataType +from typing import cast if TYPE_CHECKING: from ..models.update_cause_data_attributes import UpdateCauseDataAttributes @@ -28,6 +32,8 @@ class UpdateCauseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_cause_data_attributes import UpdateCauseDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_cause_data_attributes.py b/rootly_sdk/models/update_cause_data_attributes.py index 98cdb545..2adb7d43 100644 --- a/rootly_sdk/models/update_cause_data_attributes.py +++ b/rootly_sdk/models/update_cause_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_cause_data_attributes_properties_item import UpdateCauseDataAttributesPropertiesItem @@ -30,6 +34,8 @@ class UpdateCauseDataAttributes: properties: list[UpdateCauseDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_cause_data_attributes_properties_item import UpdateCauseDataAttributesPropertiesItem + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/update_cause_data_attributes_properties_item.py b/rootly_sdk/models/update_cause_data_attributes_properties_item.py index f551eb85..6b6770c3 100644 --- a/rootly_sdk/models/update_cause_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_cause_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateCauseDataAttributesPropertiesItem") diff --git a/rootly_sdk/models/update_clickup_task_task_params.py b/rootly_sdk/models/update_clickup_task_task_params.py index d9bdbccb..dfc9aa12 100644 --- a/rootly_sdk/models/update_clickup_task_task_params.py +++ b/rootly_sdk/models/update_clickup_task_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_clickup_task_task_params_task_type import ( - UpdateClickupTaskTaskParamsTaskType, - check_update_clickup_task_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_clickup_task_task_params_task_type import check_update_clickup_task_task_params_task_type +from ..models.update_clickup_task_task_params_task_type import UpdateClickupTaskTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_clickup_task_task_params_priority import UpdateClickupTaskTaskParamsPriority @@ -48,6 +49,8 @@ class UpdateClickupTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_clickup_task_task_params_priority import UpdateClickupTaskTaskParamsPriority + task_id = self.task_id task_type: str | Unset = 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 bfae1358..a54d24d5 100644 --- a/rootly_sdk/models/update_clickup_task_task_params_priority.py +++ b/rootly_sdk/models/update_clickup_task_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateClickupTaskTaskParamsPriority") diff --git a/rootly_sdk/models/update_coda_page_task_params.py b/rootly_sdk/models/update_coda_page_task_params.py index 9791bb83..8f11a877 100644 --- a/rootly_sdk/models/update_coda_page_task_params.py +++ b/rootly_sdk/models/update_coda_page_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_coda_page_task_params_task_type import ( - UpdateCodaPageTaskParamsTaskType, - check_update_coda_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_coda_page_task_params_task_type import check_update_coda_page_task_params_task_type +from ..models.update_coda_page_task_params_task_type import UpdateCodaPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_coda_page_task_params_template import UpdateCodaPageTaskParamsTemplate @@ -42,6 +43,8 @@ class UpdateCodaPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_coda_page_task_params_template import UpdateCodaPageTaskParamsTemplate + page_id = self.page_id task_type: str | Unset = UNSET 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 58a24acc..6e73f081 100644 --- a/rootly_sdk/models/update_coda_page_task_params_template.py +++ b/rootly_sdk/models/update_coda_page_task_params_template.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateCodaPageTaskParamsTemplate") diff --git a/rootly_sdk/models/update_communications_group.py b/rootly_sdk/models/update_communications_group.py index 1bd58dc8..34f56e5f 100644 --- a/rootly_sdk/models/update_communications_group.py +++ b/rootly_sdk/models/update_communications_group.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_communications_group_data import UpdateCommunicationsGroupData @@ -24,6 +28,8 @@ class UpdateCommunicationsGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_group_data import UpdateCommunicationsGroupData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_communications_group_data.py b/rootly_sdk/models/update_communications_group_data.py index 7a07bbfb..ccb93c5e 100644 --- a/rootly_sdk/models/update_communications_group_data.py +++ b/rootly_sdk/models/update_communications_group_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_communications_group_data_type import ( - UpdateCommunicationsGroupDataType, - check_update_communications_group_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_communications_group_data_type import check_update_communications_group_data_type +from ..models.update_communications_group_data_type import UpdateCommunicationsGroupDataType +from typing import cast if TYPE_CHECKING: from ..models.update_communications_group_data_attributes import UpdateCommunicationsGroupDataAttributes @@ -31,6 +32,8 @@ class UpdateCommunicationsGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_group_data_attributes import UpdateCommunicationsGroupDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_communications_group_data_attributes.py b/rootly_sdk/models/update_communications_group_data_attributes.py index 0599fcdb..42f3ed25 100644 --- a/rootly_sdk/models/update_communications_group_data_attributes.py +++ b/rootly_sdk/models/update_communications_group_data_attributes.py @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_communications_group_data_attributes_condition_type import ( - UpdateCommunicationsGroupDataAttributesConditionType, check_update_communications_group_data_attributes_condition_type, ) +from ..models.update_communications_group_data_attributes_condition_type import ( + UpdateCommunicationsGroupDataAttributesConditionType, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_communications_group_data_attributes_communication_external_group_members_type_0_item import ( @@ -61,6 +67,13 @@ class UpdateCommunicationsGroupDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_group_data_attributes_communication_group_conditions_type_0_item import ( + UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item, + ) + from ..models.update_communications_group_data_attributes_communication_external_group_members_type_0_item import ( + UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item, + ) + name = self.name description: None | str | Unset 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 cafe7e7c..96fc13cb 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item") 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 5cc8ccb1..1330661a 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type import ( - UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType, check_update_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type, ) +from ..models.update_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type import ( + UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item") diff --git a/rootly_sdk/models/update_communications_stage.py b/rootly_sdk/models/update_communications_stage.py index 2f890ab9..ac791131 100644 --- a/rootly_sdk/models/update_communications_stage.py +++ b/rootly_sdk/models/update_communications_stage.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_communications_stage_data import UpdateCommunicationsStageData @@ -24,6 +28,8 @@ class UpdateCommunicationsStage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_stage_data import UpdateCommunicationsStageData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_communications_stage_data.py b/rootly_sdk/models/update_communications_stage_data.py index 8e6b1961..9b4760cb 100644 --- a/rootly_sdk/models/update_communications_stage_data.py +++ b/rootly_sdk/models/update_communications_stage_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_communications_stage_data_type import ( - UpdateCommunicationsStageDataType, - check_update_communications_stage_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_communications_stage_data_type import check_update_communications_stage_data_type +from ..models.update_communications_stage_data_type import UpdateCommunicationsStageDataType +from typing import cast if TYPE_CHECKING: from ..models.update_communications_stage_data_attributes import UpdateCommunicationsStageDataAttributes @@ -31,6 +32,8 @@ class UpdateCommunicationsStageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_stage_data_attributes import UpdateCommunicationsStageDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_communications_stage_data_attributes.py b/rootly_sdk/models/update_communications_stage_data_attributes.py index a0a443e5..6d628f7c 100644 --- a/rootly_sdk/models/update_communications_stage_data_attributes.py +++ b/rootly_sdk/models/update_communications_stage_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateCommunicationsStageDataAttributes") diff --git a/rootly_sdk/models/update_communications_template.py b/rootly_sdk/models/update_communications_template.py index 6e7cebd5..aca15ef7 100644 --- a/rootly_sdk/models/update_communications_template.py +++ b/rootly_sdk/models/update_communications_template.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_communications_template_data import UpdateCommunicationsTemplateData @@ -24,6 +28,8 @@ class UpdateCommunicationsTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_template_data import UpdateCommunicationsTemplateData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_communications_template_data.py b/rootly_sdk/models/update_communications_template_data.py index 75e50cb1..7905ff44 100644 --- a/rootly_sdk/models/update_communications_template_data.py +++ b/rootly_sdk/models/update_communications_template_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_communications_template_data_type import ( - UpdateCommunicationsTemplateDataType, - check_update_communications_template_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_communications_template_data_type import check_update_communications_template_data_type +from ..models.update_communications_template_data_type import UpdateCommunicationsTemplateDataType +from typing import cast if TYPE_CHECKING: from ..models.update_communications_template_data_attributes import UpdateCommunicationsTemplateDataAttributes @@ -31,6 +32,8 @@ class UpdateCommunicationsTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_template_data_attributes import UpdateCommunicationsTemplateDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_communications_template_data_attributes.py b/rootly_sdk/models/update_communications_template_data_attributes.py index 66fe1ee0..2c7bcb02 100644 --- a/rootly_sdk/models/update_communications_template_data_attributes.py +++ b/rootly_sdk/models/update_communications_template_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_communications_template_data_attributes_communication_template_stages_attributes_type_0_item import ( UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item, @@ -38,6 +42,10 @@ class UpdateCommunicationsTemplateDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_template_data_attributes_communication_template_stages_attributes_type_0_item import ( + UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item, + ) + name = self.name description: None | str | Unset 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 f8491a27..0edef64a 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item") diff --git a/rootly_sdk/models/update_communications_type.py b/rootly_sdk/models/update_communications_type.py index a788de66..13806d4a 100644 --- a/rootly_sdk/models/update_communications_type.py +++ b/rootly_sdk/models/update_communications_type.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_communications_type_data import UpdateCommunicationsTypeData @@ -24,6 +28,8 @@ class UpdateCommunicationsType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_type_data import UpdateCommunicationsTypeData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_communications_type_data.py b/rootly_sdk/models/update_communications_type_data.py index 470e7f66..4f7d1a66 100644 --- a/rootly_sdk/models/update_communications_type_data.py +++ b/rootly_sdk/models/update_communications_type_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_communications_type_data_type import ( - UpdateCommunicationsTypeDataType, - check_update_communications_type_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_communications_type_data_type import check_update_communications_type_data_type +from ..models.update_communications_type_data_type import UpdateCommunicationsTypeDataType +from typing import cast if TYPE_CHECKING: from ..models.update_communications_type_data_attributes import UpdateCommunicationsTypeDataAttributes @@ -31,6 +32,8 @@ class UpdateCommunicationsTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_communications_type_data_attributes import UpdateCommunicationsTypeDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_communications_type_data_attributes.py b/rootly_sdk/models/update_communications_type_data_attributes.py index 9b78ebed..c6deb1e0 100644 --- a/rootly_sdk/models/update_communications_type_data_attributes.py +++ b/rootly_sdk/models/update_communications_type_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateCommunicationsTypeDataAttributes") diff --git a/rootly_sdk/models/update_confluence_page_task_params.py b/rootly_sdk/models/update_confluence_page_task_params.py index 5cb8c995..b193e912 100644 --- a/rootly_sdk/models/update_confluence_page_task_params.py +++ b/rootly_sdk/models/update_confluence_page_task_params.py @@ -1,18 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_confluence_page_task_params_task_type import ( - UpdateConfluencePageTaskParamsTaskType, - check_update_confluence_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_confluence_page_task_params_task_type import check_update_confluence_page_task_params_task_type +from ..models.update_confluence_page_task_params_task_type import UpdateConfluencePageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.update_confluence_page_task_params_integration import UpdateConfluencePageTaskParamsIntegration from ..models.update_confluence_page_task_params_template import UpdateConfluencePageTaskParamsTemplate @@ -25,27 +27,41 @@ class UpdateConfluencePageTaskParams: Attributes: file_id (str): The Confluence page ID task_type (UpdateConfluencePageTaskParamsTaskType | Unset): + integration (UpdateConfluencePageTaskParamsIntegration | Unset): Specify integration id if you have more than + one Confluence instance 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 + include_overview (bool | Unset): Default: True. + include_timeline (bool | Unset): Default: True. """ file_id: str task_type: UpdateConfluencePageTaskParamsTaskType | Unset = UNSET + integration: UpdateConfluencePageTaskParamsIntegration | Unset = UNSET title: str | Unset = UNSET content: str | Unset = UNSET post_mortem_template_id: str | Unset = UNSET template: UpdateConfluencePageTaskParamsTemplate | Unset = UNSET + include_overview: bool | Unset = True + include_timeline: bool | Unset = True additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_confluence_page_task_params_integration import UpdateConfluencePageTaskParamsIntegration + from ..models.update_confluence_page_task_params_template import UpdateConfluencePageTaskParamsTemplate + file_id = self.file_id task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type + integration: dict[str, Any] | Unset = UNSET + if not isinstance(self.integration, Unset): + integration = self.integration.to_dict() + title = self.title content = self.content @@ -56,6 +72,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.template, Unset): template = self.template.to_dict() + include_overview = self.include_overview + + include_timeline = self.include_timeline + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -65,6 +85,8 @@ def to_dict(self) -> dict[str, Any]: ) if task_type is not UNSET: field_dict["task_type"] = task_type + if integration is not UNSET: + field_dict["integration"] = integration if title is not UNSET: field_dict["title"] = title if content is not UNSET: @@ -73,11 +95,16 @@ def to_dict(self) -> dict[str, Any]: field_dict["post_mortem_template_id"] = post_mortem_template_id if template is not UNSET: field_dict["template"] = template + if include_overview is not UNSET: + field_dict["include_overview"] = include_overview + if include_timeline is not UNSET: + field_dict["include_timeline"] = include_timeline return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_confluence_page_task_params_integration import UpdateConfluencePageTaskParamsIntegration from ..models.update_confluence_page_task_params_template import UpdateConfluencePageTaskParamsTemplate d = dict(src_dict) @@ -90,6 +117,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: task_type = check_update_confluence_page_task_params_task_type(_task_type) + _integration = d.pop("integration", UNSET) + integration: UpdateConfluencePageTaskParamsIntegration | Unset + if isinstance(_integration, Unset): + integration = UNSET + else: + integration = UpdateConfluencePageTaskParamsIntegration.from_dict(_integration) + title = d.pop("title", UNSET) content = d.pop("content", UNSET) @@ -103,13 +137,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: template = UpdateConfluencePageTaskParamsTemplate.from_dict(_template) + include_overview = d.pop("include_overview", UNSET) + + include_timeline = d.pop("include_timeline", UNSET) + update_confluence_page_task_params = cls( file_id=file_id, task_type=task_type, + integration=integration, title=title, content=content, post_mortem_template_id=post_mortem_template_id, template=template, + include_overview=include_overview, + include_timeline=include_timeline, ) update_confluence_page_task_params.additional_properties = d diff --git a/rootly_sdk/models/update_confluence_page_task_params_integration.py b/rootly_sdk/models/update_confluence_page_task_params_integration.py new file mode 100644 index 00000000..010854e1 --- /dev/null +++ b/rootly_sdk/models/update_confluence_page_task_params_integration.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="UpdateConfluencePageTaskParamsIntegration") + + +@_attrs_define +class UpdateConfluencePageTaskParamsIntegration: + """Specify integration id if you have more than one Confluence instance + + 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_confluence_page_task_params_integration = cls( + id=id, + name=name, + ) + + update_confluence_page_task_params_integration.additional_properties = d + return update_confluence_page_task_params_integration + + @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_confluence_page_task_params_template.py b/rootly_sdk/models/update_confluence_page_task_params_template.py index 8ab06a92..c4abde6f 100644 --- a/rootly_sdk/models/update_confluence_page_task_params_template.py +++ b/rootly_sdk/models/update_confluence_page_task_params_template.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateConfluencePageTaskParamsTemplate") diff --git a/rootly_sdk/models/update_custom_field.py b/rootly_sdk/models/update_custom_field.py index 9a9e7898..96e4d3f2 100644 --- a/rootly_sdk/models/update_custom_field.py +++ b/rootly_sdk/models/update_custom_field.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_custom_field_data import UpdateCustomFieldData @@ -24,6 +28,8 @@ class UpdateCustomField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_custom_field_data import UpdateCustomFieldData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_custom_field_data.py b/rootly_sdk/models/update_custom_field_data.py index 0baca8c1..51287219 100644 --- a/rootly_sdk/models/update_custom_field_data.py +++ b/rootly_sdk/models/update_custom_field_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_custom_field_data_type import UpdateCustomFieldDataType, check_update_custom_field_data_type +from ..types import UNSET, Unset + +from ..models.update_custom_field_data_type import check_update_custom_field_data_type +from ..models.update_custom_field_data_type import UpdateCustomFieldDataType +from typing import cast if TYPE_CHECKING: from ..models.update_custom_field_data_attributes import UpdateCustomFieldDataAttributes @@ -28,6 +32,8 @@ class UpdateCustomFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_custom_field_data_attributes import UpdateCustomFieldDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_custom_field_data_attributes.py b/rootly_sdk/models/update_custom_field_data_attributes.py index 2eac8a3a..5a9f8a6c 100644 --- a/rootly_sdk/models/update_custom_field_data_attributes.py +++ b/rootly_sdk/models/update_custom_field_data_attributes.py @@ -1,19 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_custom_field_data_attributes_required_type_0_item import ( - UpdateCustomFieldDataAttributesRequiredType0Item, check_update_custom_field_data_attributes_required_type_0_item, ) -from ..models.update_custom_field_data_attributes_shown_item import ( - UpdateCustomFieldDataAttributesShownItem, - check_update_custom_field_data_attributes_shown_item, +from ..models.update_custom_field_data_attributes_required_type_0_item import ( + UpdateCustomFieldDataAttributesRequiredType0Item, ) +from ..models.update_custom_field_data_attributes_shown_item import check_update_custom_field_data_attributes_shown_item +from ..models.update_custom_field_data_attributes_shown_item import UpdateCustomFieldDataAttributesShownItem from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateCustomFieldDataAttributes") diff --git a/rootly_sdk/models/update_custom_field_option.py b/rootly_sdk/models/update_custom_field_option.py index 0ee9467b..76e6d0ad 100644 --- a/rootly_sdk/models/update_custom_field_option.py +++ b/rootly_sdk/models/update_custom_field_option.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_custom_field_option_data import UpdateCustomFieldOptionData @@ -24,6 +28,8 @@ class UpdateCustomFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_custom_field_option_data import UpdateCustomFieldOptionData + data = self.data.to_dict() field_dict: 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 599ea2d3..0629fd5f 100644 --- a/rootly_sdk/models/update_custom_field_option_data.py +++ b/rootly_sdk/models/update_custom_field_option_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_custom_field_option_data_type import ( - UpdateCustomFieldOptionDataType, - check_update_custom_field_option_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_custom_field_option_data_type import check_update_custom_field_option_data_type +from ..models.update_custom_field_option_data_type import UpdateCustomFieldOptionDataType +from typing import cast if TYPE_CHECKING: from ..models.update_custom_field_option_data_attributes import UpdateCustomFieldOptionDataAttributes @@ -31,6 +32,8 @@ class UpdateCustomFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_custom_field_option_data_attributes import UpdateCustomFieldOptionDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 72264d79..db254815 100644 --- a/rootly_sdk/models/update_custom_field_option_data_attributes.py +++ b/rootly_sdk/models/update_custom_field_option_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateCustomFieldOptionDataAttributes") diff --git a/rootly_sdk/models/update_custom_form.py b/rootly_sdk/models/update_custom_form.py index 74d00fd4..d05ad115 100644 --- a/rootly_sdk/models/update_custom_form.py +++ b/rootly_sdk/models/update_custom_form.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_custom_form_data import UpdateCustomFormData @@ -24,6 +28,8 @@ class UpdateCustomForm: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_custom_form_data import UpdateCustomFormData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_custom_form_data.py b/rootly_sdk/models/update_custom_form_data.py index 7345cab6..7193385c 100644 --- a/rootly_sdk/models/update_custom_form_data.py +++ b/rootly_sdk/models/update_custom_form_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_custom_form_data_type import UpdateCustomFormDataType, check_update_custom_form_data_type +from ..types import UNSET, Unset + +from ..models.update_custom_form_data_type import check_update_custom_form_data_type +from ..models.update_custom_form_data_type import UpdateCustomFormDataType +from typing import cast if TYPE_CHECKING: from ..models.update_custom_form_data_attributes import UpdateCustomFormDataAttributes @@ -28,6 +32,8 @@ class UpdateCustomFormData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_custom_form_data_attributes import UpdateCustomFormDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_custom_form_data_attributes.py b/rootly_sdk/models/update_custom_form_data_attributes.py index 72a3286c..225400bc 100644 --- a/rootly_sdk/models/update_custom_form_data_attributes.py +++ b/rootly_sdk/models/update_custom_form_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateCustomFormDataAttributes") diff --git a/rootly_sdk/models/update_dashboard.py b/rootly_sdk/models/update_dashboard.py index f54113b0..a47a611b 100644 --- a/rootly_sdk/models/update_dashboard.py +++ b/rootly_sdk/models/update_dashboard.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_dashboard_data import UpdateDashboardData @@ -24,6 +28,8 @@ class UpdateDashboard: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_dashboard_data import UpdateDashboardData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_dashboard_data.py b/rootly_sdk/models/update_dashboard_data.py index a01aeaf6..c7ec0433 100644 --- a/rootly_sdk/models/update_dashboard_data.py +++ b/rootly_sdk/models/update_dashboard_data.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_dashboard_data_type import UpdateDashboardDataType, check_update_dashboard_data_type from ..types import UNSET, Unset +from ..models.update_dashboard_data_type import check_update_dashboard_data_type +from ..models.update_dashboard_data_type import UpdateDashboardDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_dashboard_data_attributes import UpdateDashboardDataAttributes @@ -29,6 +33,8 @@ class UpdateDashboardData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_dashboard_data_attributes import UpdateDashboardDataAttributes + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/update_dashboard_data_attributes.py b/rootly_sdk/models/update_dashboard_data_attributes.py index 71ceb44b..794d6f37 100644 --- a/rootly_sdk/models/update_dashboard_data_attributes.py +++ b/rootly_sdk/models/update_dashboard_data_attributes.py @@ -1,24 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.update_dashboard_data_attributes_color import ( - UpdateDashboardDataAttributesColor, - check_update_dashboard_data_attributes_color, -) -from ..models.update_dashboard_data_attributes_owner import ( - UpdateDashboardDataAttributesOwner, - check_update_dashboard_data_attributes_owner, -) -from ..models.update_dashboard_data_attributes_period import ( - UpdateDashboardDataAttributesPeriod, - check_update_dashboard_data_attributes_period, -) from ..types import UNSET, Unset +from ..models.update_dashboard_data_attributes_color import check_update_dashboard_data_attributes_color +from ..models.update_dashboard_data_attributes_color import UpdateDashboardDataAttributesColor +from ..models.update_dashboard_data_attributes_owner import check_update_dashboard_data_attributes_owner +from ..models.update_dashboard_data_attributes_owner import UpdateDashboardDataAttributesOwner +from ..models.update_dashboard_data_attributes_period import check_update_dashboard_data_attributes_period +from ..models.update_dashboard_data_attributes_period import UpdateDashboardDataAttributesPeriod +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateDashboardDataAttributes") diff --git a/rootly_sdk/models/update_dashboard_panel.py b/rootly_sdk/models/update_dashboard_panel.py index ceacfca3..65137385 100644 --- a/rootly_sdk/models/update_dashboard_panel.py +++ b/rootly_sdk/models/update_dashboard_panel.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_dashboard_panel_data import UpdateDashboardPanelData @@ -24,6 +28,8 @@ class UpdateDashboardPanel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_dashboard_panel_data import UpdateDashboardPanelData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_dashboard_panel_data.py b/rootly_sdk/models/update_dashboard_panel_data.py index 22d0e1fa..2f475b6f 100644 --- a/rootly_sdk/models/update_dashboard_panel_data.py +++ b/rootly_sdk/models/update_dashboard_panel_data.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_dashboard_panel_data_type import ( - UpdateDashboardPanelDataType, - check_update_dashboard_panel_data_type, -) from ..types import UNSET, Unset +from ..models.update_dashboard_panel_data_type import check_update_dashboard_panel_data_type +from ..models.update_dashboard_panel_data_type import UpdateDashboardPanelDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes import UpdateDashboardPanelDataAttributes @@ -32,6 +33,8 @@ class UpdateDashboardPanelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_dashboard_panel_data_attributes import UpdateDashboardPanelDataAttributes + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes.py b/rootly_sdk/models/update_dashboard_panel_data_attributes.py index 6025a60e..5d6e60a4 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes_params import UpdateDashboardPanelDataAttributesParams from ..models.update_dashboard_panel_data_attributes_position_type_0 import ( @@ -31,6 +35,7 @@ class UpdateDashboardPanelDataAttributes: position: None | Unset | UpdateDashboardPanelDataAttributesPositionType0 = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_dashboard_panel_data_attributes_params import UpdateDashboardPanelDataAttributesParams from ..models.update_dashboard_panel_data_attributes_position_type_0 import ( UpdateDashboardPanelDataAttributesPositionType0, ) 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 7d2dc52d..11117633 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py @@ -1,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_dashboard_panel_data_attributes_params_display import ( - UpdateDashboardPanelDataAttributesParamsDisplay, check_update_dashboard_panel_data_attributes_params_display, ) +from ..models.update_dashboard_panel_data_attributes_params_display import ( + UpdateDashboardPanelDataAttributesParamsDisplay, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes_params_datalabels import ( @@ -48,6 +53,16 @@ class UpdateDashboardPanelDataAttributesParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_dashboard_panel_data_attributes_params_legend import ( + UpdateDashboardPanelDataAttributesParamsLegend, + ) + from ..models.update_dashboard_panel_data_attributes_params_datalabels import ( + UpdateDashboardPanelDataAttributesParamsDatalabels, + ) + from ..models.update_dashboard_panel_data_attributes_params_datasets_item import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItem, + ) + display: str | Unset = UNSET if not isinstance(self.display, Unset): display = self.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 0c83750e..dcd843a5 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsDatalabels") 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 49dd7014..01068da5 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_dashboard_panel_data_attributes_params_datasets_item_collection import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemCollection, check_update_dashboard_panel_data_attributes_params_datasets_item_collection, ) +from ..models.update_dashboard_panel_data_attributes_params_datasets_item_collection import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemCollection, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0 import ( @@ -46,11 +51,14 @@ class UpdateDashboardPanelDataAttributesParamsDatasetsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0 import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0, + ) from ..models.update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0 import ( UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0, ) - from ..models.update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0 import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0, + from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem, ) name: None | str | 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 4b0c487d..4b696ba8 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation, check_update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation, ) +from ..models.update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0") 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 16b2ed1d..a4244375 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,16 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation, check_update_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation, ) +from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item import ( @@ -34,6 +39,10 @@ class UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem, + ) + operation: str | Unset = UNSET if not isinstance(self.operation, Unset): operation = self.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 982897f3..fc2369f2 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition, check_update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition, ) +from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition, +) from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation, check_update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation, ) +from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem") 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 b1641d09..f4ad284e 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key, check_update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key, ) +from ..models.update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key, +) +from typing import cast + T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0") 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 d9afacec..95bb9449 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_dashboard_panel_data_attributes_params_legend_groups import ( - UpdateDashboardPanelDataAttributesParamsLegendGroups, check_update_dashboard_panel_data_attributes_params_legend_groups, ) +from ..models.update_dashboard_panel_data_attributes_params_legend_groups import ( + UpdateDashboardPanelDataAttributesParamsLegendGroups, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsLegend") 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 8ce15963..597728d6 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesPositionType0") diff --git a/rootly_sdk/models/update_datadog_notebook_task_params.py b/rootly_sdk/models/update_datadog_notebook_task_params.py index afd34de5..3445841f 100644 --- a/rootly_sdk/models/update_datadog_notebook_task_params.py +++ b/rootly_sdk/models/update_datadog_notebook_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_datadog_notebook_task_params_kind import ( - UpdateDatadogNotebookTaskParamsKind, - check_update_datadog_notebook_task_params_kind, -) -from ..models.update_datadog_notebook_task_params_task_type import ( - UpdateDatadogNotebookTaskParamsTaskType, - check_update_datadog_notebook_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_datadog_notebook_task_params_kind import check_update_datadog_notebook_task_params_kind +from ..models.update_datadog_notebook_task_params_kind import UpdateDatadogNotebookTaskParamsKind +from ..models.update_datadog_notebook_task_params_task_type import check_update_datadog_notebook_task_params_task_type +from ..models.update_datadog_notebook_task_params_task_type import UpdateDatadogNotebookTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_datadog_notebook_task_params_template import UpdateDatadogNotebookTaskParamsTemplate @@ -46,6 +45,8 @@ class UpdateDatadogNotebookTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_datadog_notebook_task_params_template import UpdateDatadogNotebookTaskParamsTemplate + file_id = self.file_id task_type: str | Unset = UNSET 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 7946ae4c..cb4692e1 100644 --- a/rootly_sdk/models/update_datadog_notebook_task_params_template.py +++ b/rootly_sdk/models/update_datadog_notebook_task_params_template.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateDatadogNotebookTaskParamsTemplate") 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 9f31d59e..70662aa8 100644 --- a/rootly_sdk/models/update_dropbox_paper_page_task_params.py +++ b/rootly_sdk/models/update_dropbox_paper_page_task_params.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_dropbox_paper_page_task_params_task_type import ( - UpdateDropboxPaperPageTaskParamsTaskType, check_update_dropbox_paper_page_task_params_task_type, ) +from ..models.update_dropbox_paper_page_task_params_task_type import UpdateDropboxPaperPageTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateDropboxPaperPageTaskParams") diff --git a/rootly_sdk/models/update_edge_connector.py b/rootly_sdk/models/update_edge_connector.py index 1a0943b0..2c55e70d 100644 --- a/rootly_sdk/models/update_edge_connector.py +++ b/rootly_sdk/models/update_edge_connector.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_edge_connector_edge_connector import UpdateEdgeConnectorEdgeConnector @@ -24,6 +28,8 @@ class UpdateEdgeConnector: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_edge_connector_edge_connector import UpdateEdgeConnectorEdgeConnector + edge_connector = self.edge_connector.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_edge_connector_action.py b/rootly_sdk/models/update_edge_connector_action.py index 8f66a7e3..e2ecb725 100644 --- a/rootly_sdk/models/update_edge_connector_action.py +++ b/rootly_sdk/models/update_edge_connector_action.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_edge_connector_action_action import UpdateEdgeConnectorActionAction @@ -24,6 +28,8 @@ class UpdateEdgeConnectorAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_edge_connector_action_action import UpdateEdgeConnectorActionAction + action = self.action.to_dict() field_dict: 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 c15966c0..806fba3b 100644 --- a/rootly_sdk/models/update_edge_connector_action_action.py +++ b/rootly_sdk/models/update_edge_connector_action_action.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_edge_connector_action_action_action_type import ( - UpdateEdgeConnectorActionActionActionType, check_update_edge_connector_action_action_action_type, ) +from ..models.update_edge_connector_action_action_action_type import UpdateEdgeConnectorActionActionActionType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_edge_connector_action_action_metadata import UpdateEdgeConnectorActionActionMetadata @@ -34,6 +37,8 @@ class UpdateEdgeConnectorActionAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_edge_connector_action_action_metadata import UpdateEdgeConnectorActionActionMetadata + name = self.name action_type: str | Unset = UNSET 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 b1551783..3b389b13 100644 --- a/rootly_sdk/models/update_edge_connector_action_action_metadata.py +++ b/rootly_sdk/models/update_edge_connector_action_action_metadata.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateEdgeConnectorActionActionMetadata") diff --git a/rootly_sdk/models/update_edge_connector_action_body.py b/rootly_sdk/models/update_edge_connector_action_body.py index 0e199f8e..ef8c819e 100644 --- a/rootly_sdk/models/update_edge_connector_action_body.py +++ b/rootly_sdk/models/update_edge_connector_action_body.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_edge_connector_action_body_action import UpdateEdgeConnectorActionBodyAction @@ -26,6 +29,8 @@ class UpdateEdgeConnectorActionBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_edge_connector_action_body_action import UpdateEdgeConnectorActionBodyAction + action: dict[str, Any] | Unset = UNSET if not isinstance(self.action, Unset): action = self.action.to_dict() 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 d70768dd..c5915c5d 100644 --- a/rootly_sdk/models/update_edge_connector_action_body_action.py +++ b/rootly_sdk/models/update_edge_connector_action_body_action.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_edge_connector_action_body_action_action_type import ( - UpdateEdgeConnectorActionBodyActionActionType, check_update_edge_connector_action_body_action_action_type, ) +from ..models.update_edge_connector_action_body_action_action_type import UpdateEdgeConnectorActionBodyActionActionType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_edge_connector_action_body_action_metadata import UpdateEdgeConnectorActionBodyActionMetadata @@ -34,6 +37,10 @@ class UpdateEdgeConnectorActionBodyAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_edge_connector_action_body_action_metadata import ( + UpdateEdgeConnectorActionBodyActionMetadata, + ) + name = self.name action_type: str | Unset = UNSET 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 091eb2e7..304b97d5 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateEdgeConnectorActionBodyActionMetadata") diff --git a/rootly_sdk/models/update_edge_connector_body.py b/rootly_sdk/models/update_edge_connector_body.py index a10ff487..dd466089 100644 --- a/rootly_sdk/models/update_edge_connector_body.py +++ b/rootly_sdk/models/update_edge_connector_body.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_edge_connector_body_data import UpdateEdgeConnectorBodyData @@ -26,6 +29,8 @@ class UpdateEdgeConnectorBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_edge_connector_body_data import UpdateEdgeConnectorBodyData + data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): data = self.data.to_dict() diff --git a/rootly_sdk/models/update_edge_connector_body_data.py b/rootly_sdk/models/update_edge_connector_body_data.py index 445e7799..46810046 100644 --- a/rootly_sdk/models/update_edge_connector_body_data.py +++ b/rootly_sdk/models/update_edge_connector_body_data.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_edge_connector_body_data_type import ( - UpdateEdgeConnectorBodyDataType, - check_update_edge_connector_body_data_type, -) from ..types import UNSET, Unset +from ..models.update_edge_connector_body_data_type import check_update_edge_connector_body_data_type +from ..models.update_edge_connector_body_data_type import UpdateEdgeConnectorBodyDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_edge_connector_body_data_attributes import UpdateEdgeConnectorBodyDataAttributes @@ -34,6 +35,8 @@ class UpdateEdgeConnectorBodyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_edge_connector_body_data_attributes import UpdateEdgeConnectorBodyDataAttributes + type_: str | Unset = UNSET if not isinstance(self.type_, Unset): type_ = self.type_ 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 c076f696..c512b720 100644 --- a/rootly_sdk/models/update_edge_connector_body_data_attributes.py +++ b/rootly_sdk/models/update_edge_connector_body_data_attributes.py @@ -1,16 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_edge_connector_body_data_attributes_status import ( - UpdateEdgeConnectorBodyDataAttributesStatus, check_update_edge_connector_body_data_attributes_status, ) +from ..models.update_edge_connector_body_data_attributes_status import UpdateEdgeConnectorBodyDataAttributesStatus from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.update_edge_connector_body_data_attributes_filters import UpdateEdgeConnectorBodyDataAttributesFilters + T = TypeVar("T", bound="UpdateEdgeConnectorBodyDataAttributes") @@ -23,15 +30,21 @@ class UpdateEdgeConnectorBodyDataAttributes: description (str | Unset): status (UpdateEdgeConnectorBodyDataAttributesStatus | Unset): subscriptions (list[str] | Unset): + filters (UpdateEdgeConnectorBodyDataAttributesFilters | Unset): Event filters """ name: str | Unset = UNSET description: str | Unset = UNSET status: UpdateEdgeConnectorBodyDataAttributesStatus | Unset = UNSET subscriptions: list[str] | Unset = UNSET + filters: UpdateEdgeConnectorBodyDataAttributesFilters | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_edge_connector_body_data_attributes_filters import ( + UpdateEdgeConnectorBodyDataAttributesFilters, + ) + name = self.name description = self.description @@ -44,6 +57,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.subscriptions, Unset): subscriptions = self.subscriptions + filters: dict[str, Any] | Unset = UNSET + if not isinstance(self.filters, Unset): + filters = self.filters.to_dict() + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) @@ -55,11 +72,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["status"] = status if subscriptions is not UNSET: field_dict["subscriptions"] = subscriptions + if filters is not UNSET: + field_dict["filters"] = filters return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_edge_connector_body_data_attributes_filters import ( + UpdateEdgeConnectorBodyDataAttributesFilters, + ) + d = dict(src_dict) name = d.pop("name", UNSET) @@ -74,11 +97,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: subscriptions = cast(list[str], d.pop("subscriptions", UNSET)) + _filters = d.pop("filters", UNSET) + filters: UpdateEdgeConnectorBodyDataAttributesFilters | Unset + if isinstance(_filters, Unset): + filters = UNSET + else: + filters = UpdateEdgeConnectorBodyDataAttributesFilters.from_dict(_filters) + update_edge_connector_body_data_attributes = cls( name=name, description=description, status=status, subscriptions=subscriptions, + filters=filters, ) update_edge_connector_body_data_attributes.additional_properties = d diff --git a/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py b/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py new file mode 100644 index 00000000..60999d87 --- /dev/null +++ b/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="UpdateEdgeConnectorBodyDataAttributesFilters") + + +@_attrs_define +class UpdateEdgeConnectorBodyDataAttributesFilters: + """Event filters""" + + 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) + update_edge_connector_body_data_attributes_filters = cls() + + update_edge_connector_body_data_attributes_filters.additional_properties = d + return update_edge_connector_body_data_attributes_filters + + @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_edge_connector_edge_connector.py b/rootly_sdk/models/update_edge_connector_edge_connector.py index a2accd57..56dd7606 100644 --- a/rootly_sdk/models/update_edge_connector_edge_connector.py +++ b/rootly_sdk/models/update_edge_connector_edge_connector.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_edge_connector_edge_connector_status import ( - UpdateEdgeConnectorEdgeConnectorStatus, - check_update_edge_connector_edge_connector_status, -) from ..types import UNSET, Unset +from ..models.update_edge_connector_edge_connector_status import check_update_edge_connector_edge_connector_status +from ..models.update_edge_connector_edge_connector_status import UpdateEdgeConnectorEdgeConnectorStatus +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateEdgeConnectorEdgeConnector") diff --git a/rootly_sdk/models/update_environment.py b/rootly_sdk/models/update_environment.py index 3220c2cd..4d21f97d 100644 --- a/rootly_sdk/models/update_environment.py +++ b/rootly_sdk/models/update_environment.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_environment_data import UpdateEnvironmentData @@ -24,6 +28,8 @@ class UpdateEnvironment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_environment_data import UpdateEnvironmentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_environment_data.py b/rootly_sdk/models/update_environment_data.py index 5eeba4d0..c0c49295 100644 --- a/rootly_sdk/models/update_environment_data.py +++ b/rootly_sdk/models/update_environment_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_environment_data_type import UpdateEnvironmentDataType, check_update_environment_data_type +from ..types import UNSET, Unset + +from ..models.update_environment_data_type import check_update_environment_data_type +from ..models.update_environment_data_type import UpdateEnvironmentDataType +from typing import cast if TYPE_CHECKING: from ..models.update_environment_data_attributes import UpdateEnvironmentDataAttributes @@ -28,6 +32,8 @@ class UpdateEnvironmentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_environment_data_attributes import UpdateEnvironmentDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_environment_data_attributes.py b/rootly_sdk/models/update_environment_data_attributes.py index 8145cc3a..6deff54f 100644 --- a/rootly_sdk/models/update_environment_data_attributes.py +++ b/rootly_sdk/models/update_environment_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_environment_data_attributes_properties_item import ( UpdateEnvironmentDataAttributesPropertiesItem, @@ -30,6 +34,7 @@ class UpdateEnvironmentDataAttributes: 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 + external_id (None | str | Unset): The external id associated to this 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 @@ -43,12 +48,23 @@ class UpdateEnvironmentDataAttributes: description: None | str | Unset = UNSET color: None | str | Unset = UNSET position: int | None | Unset = UNSET + external_id: None | str | 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]: + from ..models.update_environment_data_attributes_slack_aliases_type_0_item import ( + UpdateEnvironmentDataAttributesSlackAliasesType0Item, + ) + from ..models.update_environment_data_attributes_properties_item import ( + UpdateEnvironmentDataAttributesPropertiesItem, + ) + from ..models.update_environment_data_attributes_slack_channels_type_0_item import ( + UpdateEnvironmentDataAttributesSlackChannelsType0Item, + ) + name = self.name description: None | str | Unset @@ -69,6 +85,12 @@ def to_dict(self) -> dict[str, Any]: else: position = self.position + external_id: None | str | Unset + if isinstance(self.external_id, Unset): + external_id = UNSET + else: + external_id = self.external_id + notify_emails: list[str] | None | Unset if isinstance(self.notify_emails, Unset): notify_emails = UNSET @@ -120,6 +142,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["color"] = color if position is not UNSET: field_dict["position"] = position + if external_id is not UNSET: + field_dict["external_id"] = external_id if notify_emails is not UNSET: field_dict["notify_emails"] = notify_emails if slack_channels is not UNSET: @@ -173,6 +197,15 @@ def _parse_position(data: object) -> int | None | Unset: position = _parse_position(d.pop("position", UNSET)) + def _parse_external_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + external_id = _parse_external_id(d.pop("external_id", UNSET)) + def _parse_notify_emails(data: object) -> list[str] | None | Unset: if data is None: return data @@ -256,6 +289,7 @@ def _parse_slack_aliases( description=description, color=color, position=position, + external_id=external_id, notify_emails=notify_emails, slack_channels=slack_channels, slack_aliases=slack_aliases, diff --git a/rootly_sdk/models/update_environment_data_attributes_properties_item.py b/rootly_sdk/models/update_environment_data_attributes_properties_item.py index 555c7a02..7a1c1e49 100644 --- a/rootly_sdk/models/update_environment_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_environment_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateEnvironmentDataAttributesPropertiesItem") 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 fdc4f9b2..33abdeef 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateEnvironmentDataAttributesSlackAliasesType0Item") 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 98c9e895..451bfca0 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateEnvironmentDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_escalation_policy.py b/rootly_sdk/models/update_escalation_policy.py index 3290a36d..a5709b16 100644 --- a/rootly_sdk/models/update_escalation_policy.py +++ b/rootly_sdk/models/update_escalation_policy.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_escalation_policy_data import UpdateEscalationPolicyData @@ -24,6 +28,8 @@ class UpdateEscalationPolicy: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_escalation_policy_data import UpdateEscalationPolicyData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_escalation_policy_data.py b/rootly_sdk/models/update_escalation_policy_data.py index 1e9bb59c..31accda4 100644 --- a/rootly_sdk/models/update_escalation_policy_data.py +++ b/rootly_sdk/models/update_escalation_policy_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_escalation_policy_data_type import ( - UpdateEscalationPolicyDataType, - check_update_escalation_policy_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_data_type import check_update_escalation_policy_data_type +from ..models.update_escalation_policy_data_type import UpdateEscalationPolicyDataType +from typing import cast if TYPE_CHECKING: from ..models.update_escalation_policy_data_attributes import UpdateEscalationPolicyDataAttributes @@ -31,6 +32,8 @@ class UpdateEscalationPolicyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_escalation_policy_data_attributes import UpdateEscalationPolicyDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_escalation_policy_data_attributes.py b/rootly_sdk/models/update_escalation_policy_data_attributes.py index 9cf51994..b7853ab4 100644 --- a/rootly_sdk/models/update_escalation_policy_data_attributes.py +++ b/rootly_sdk/models/update_escalation_policy_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_escalation_policy_data_attributes_business_hours_type_0 import ( UpdateEscalationPolicyDataAttributesBusinessHoursType0, 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 08e773d8..754d92bf 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item import ( - UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item, check_update_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item, ) +from ..models.update_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item import ( + UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item, +) from ..models.update_escalation_policy_data_attributes_business_hours_type_0_time_zone import ( - UpdateEscalationPolicyDataAttributesBusinessHoursType0TimeZone, check_update_escalation_policy_data_attributes_business_hours_type_0_time_zone, ) +from ..models.update_escalation_policy_data_attributes_business_hours_type_0_time_zone import ( + UpdateEscalationPolicyDataAttributesBusinessHoursType0TimeZone, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateEscalationPolicyDataAttributesBusinessHoursType0") 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 46bc9d02..0381dd71 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 @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -306,8 +322,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -323,6 +341,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -334,6 +353,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -388,7 +408,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -409,6 +432,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -418,6 +442,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -524,15 +549,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -572,6 +603,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", diff --git a/rootly_sdk/models/update_escalation_policy_level.py b/rootly_sdk/models/update_escalation_policy_level.py index 9cfac065..8111cd86 100644 --- a/rootly_sdk/models/update_escalation_policy_level.py +++ b/rootly_sdk/models/update_escalation_policy_level.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_escalation_policy_level_data import UpdateEscalationPolicyLevelData @@ -24,6 +28,8 @@ class UpdateEscalationPolicyLevel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_escalation_policy_level_data import UpdateEscalationPolicyLevelData + data = self.data.to_dict() field_dict: 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 1e4a47bc..593fefce 100644 --- a/rootly_sdk/models/update_escalation_policy_level_data.py +++ b/rootly_sdk/models/update_escalation_policy_level_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_escalation_policy_level_data_type import ( - UpdateEscalationPolicyLevelDataType, - check_update_escalation_policy_level_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_level_data_type import check_update_escalation_policy_level_data_type +from ..models.update_escalation_policy_level_data_type import UpdateEscalationPolicyLevelDataType +from typing import cast if TYPE_CHECKING: from ..models.update_escalation_policy_level_data_attributes import UpdateEscalationPolicyLevelDataAttributes @@ -31,6 +32,8 @@ class UpdateEscalationPolicyLevelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_escalation_policy_level_data_attributes import UpdateEscalationPolicyLevelDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 b19e19b3..14aeaa5a 100644 --- a/rootly_sdk/models/update_escalation_policy_level_data_attributes.py +++ b/rootly_sdk/models/update_escalation_policy_level_data_attributes.py @@ -1,19 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy import ( - UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy, check_update_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy, ) +from ..models.update_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy import ( + UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy, +) from ..models.update_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy import ( - UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy, check_update_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy, ) +from ..models.update_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy import ( + UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0 import ( 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 79fdffe0..4965f2ab 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,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members import ( - UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers, check_update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members, ) +from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members import ( + UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers, +) from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type import ( - UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type, check_update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type, ) +from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type import ( + UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0") diff --git a/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py b/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py index b9da8839..f99027ed 100644 --- a/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py +++ b/rootly_sdk/models/update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type.py @@ -1,12 +1,13 @@ from typing import Literal, cast UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type = Literal[ - "schedule", "service", "slack_channel", "team", "user" + "microsoft_teams_channel", "schedule", "service", "slack_channel", "team", "user" ] UPDATE_ESCALATION_POLICY_LEVEL_DATA_ATTRIBUTES_NOTIFICATION_TARGET_PARAMS_ITEM_TYPE_0_TYPE_VALUES: set[ UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type ] = { + "microsoft_teams_channel", "schedule", "service", "slack_channel", diff --git a/rootly_sdk/models/update_escalation_policy_path.py b/rootly_sdk/models/update_escalation_policy_path.py index c5332abc..d6d153ed 100644 --- a/rootly_sdk/models/update_escalation_policy_path.py +++ b/rootly_sdk/models/update_escalation_policy_path.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_escalation_policy_path_data import UpdateEscalationPolicyPathData @@ -24,6 +28,8 @@ class UpdateEscalationPolicyPath: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_escalation_policy_path_data import UpdateEscalationPolicyPathData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_escalation_policy_path_data.py b/rootly_sdk/models/update_escalation_policy_path_data.py index 438db618..f769ed5c 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data.py +++ b/rootly_sdk/models/update_escalation_policy_path_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_type import check_update_escalation_policy_path_data_type +from ..models.update_escalation_policy_path_data_type import UpdateEscalationPolicyPathDataType +from typing import cast if TYPE_CHECKING: from ..models.update_escalation_policy_path_data_attributes import UpdateEscalationPolicyPathDataAttributes @@ -31,6 +32,8 @@ class UpdateEscalationPolicyPathData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_escalation_policy_path_data_attributes import UpdateEscalationPolicyPathDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes.py index 41421828..2fb0c0f2 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes.py @@ -1,39 +1,119 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset 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_after_deferral_behavior import ( + UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior, +) 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_match_mode import ( + UpdateEscalationPolicyPathDataAttributesMatchMode, +) 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_notification_type import ( + UpdateEscalationPolicyPathDataAttributesNotificationType, +) 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_path_type import ( + UpdateEscalationPolicyPathDataAttributesPathType, +) 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 ..models.update_escalation_policy_path_data_attributes_time_restriction_time_zone import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone, +) from ..types import UNSET, Unset +from typing import cast 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_rules_item_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7, + ) from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item import ( UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem, ) @@ -63,9 +143,28 @@ class UpdateEscalationPolicyPathDataAttributes: 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 + rules (list[UpdateEscalationPolicyPathDataAttributesRulesItemType0 | + UpdateEscalationPolicyPathDataAttributesRulesItemType1 | UpdateEscalationPolicyPathDataAttributesRulesItemType2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType3 | + UpdateEscalationPolicyPathDataAttributesRulesItemType4 | UpdateEscalationPolicyPathDataAttributesRulesItemType5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType6 | + UpdateEscalationPolicyPathDataAttributesRulesItemType7 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6 | + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6 | + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7] | Unset): Escalation path conditions time_restriction_time_zone (UpdateEscalationPolicyPathDataAttributesTimeRestrictionTimeZone | Unset): Time zone used for time restrictions. time_restrictions (list[UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset): If time @@ -86,13 +185,30 @@ class UpdateEscalationPolicyPathDataAttributes: initial_delay: int | Unset = UNSET rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + UpdateEscalationPolicyPathDataAttributesRulesItemType0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7 ] | Unset ) = UNSET @@ -100,12 +216,81 @@ class UpdateEscalationPolicyPathDataAttributes: 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 + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, + ) name = self.name @@ -153,25 +338,60 @@ def to_dict(self) -> dict[str, Any]: initial_delay = self.initial_delay - rules: list[dict[str, Any] | None] | Unset = UNSET + 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] | None - if isinstance(rules_item_data, EscalationPathRuleAlertUrgency): + rules_item: dict[str, Any] + if isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType2): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType3): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType4): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType6): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType7): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleWorkingHour): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleJsonPath): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleField): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleService): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6): rules_item = rules_item_data.to_dict() - elif isinstance(rules_item_data, EscalationPathRuleDeferralWindow): + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5): + rules_item = rules_item_data.to_dict() + elif isinstance(rules_item_data, UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6): rules_item = rules_item_data.to_dict() else: - rules_item = rules_item_data + rules_item = rules_item_data.to_dict() + rules.append(rules_item) time_restriction_time_zone: str | Unset = UNSET @@ -221,12 +441,78 @@ def to_dict(self) -> dict[str, Any]: @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_rules_item_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7, + ) from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item import ( UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem, ) @@ -309,13 +595,30 @@ def _parse_repeat_count(data: object) -> int | None | Unset: _rules = d.pop("rules", UNSET) rules: ( list[ - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + UpdateEscalationPolicyPathDataAttributesRulesItemType0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7 ] | Unset ) = UNSET @@ -326,20 +629,35 @@ def _parse_repeat_count(data: object) -> int | None | Unset: def _parse_rules_item( data: object, ) -> ( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None + UpdateEscalationPolicyPathDataAttributesRulesItemType0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6 + | UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7 ): - if data is None: - return data try: if not isinstance(data, dict): raise TypeError() - rules_item_type_0 = EscalationPathRuleAlertUrgency.from_dict(data) + rules_item_type_0 = UpdateEscalationPolicyPathDataAttributesRulesItemType0.from_dict(data) return rules_item_type_0 except (TypeError, ValueError, AttributeError, KeyError): @@ -347,7 +665,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_1 = EscalationPathRuleWorkingHour.from_dict(data) + rules_item_type_1 = UpdateEscalationPolicyPathDataAttributesRulesItemType1.from_dict(data) return rules_item_type_1 except (TypeError, ValueError, AttributeError, KeyError): @@ -355,7 +673,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_2 = EscalationPathRuleJsonPath.from_dict(data) + rules_item_type_2 = UpdateEscalationPolicyPathDataAttributesRulesItemType2.from_dict(data) return rules_item_type_2 except (TypeError, ValueError, AttributeError, KeyError): @@ -363,7 +681,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_3 = EscalationPathRuleField.from_dict(data) + rules_item_type_3 = UpdateEscalationPolicyPathDataAttributesRulesItemType3.from_dict(data) return rules_item_type_3 except (TypeError, ValueError, AttributeError, KeyError): @@ -371,7 +689,7 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_4 = EscalationPathRuleService.from_dict(data) + rules_item_type_4 = UpdateEscalationPolicyPathDataAttributesRulesItemType4.from_dict(data) return rules_item_type_4 except (TypeError, ValueError, AttributeError, KeyError): @@ -379,22 +697,185 @@ def _parse_rules_item( try: if not isinstance(data, dict): raise TypeError() - rules_item_type_5 = EscalationPathRuleDeferralWindow.from_dict(data) + rules_item_type_5 = UpdateEscalationPolicyPathDataAttributesRulesItemType5.from_dict(data) return rules_item_type_5 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - EscalationPathRuleAlertUrgency - | EscalationPathRuleDeferralWindow - | EscalationPathRuleField - | EscalationPathRuleJsonPath - | EscalationPathRuleService - | EscalationPathRuleWorkingHour - | None, - data, + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_6 = UpdateEscalationPolicyPathDataAttributesRulesItemType6.from_dict(data) + + return rules_item_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_7 = UpdateEscalationPolicyPathDataAttributesRulesItemType7.from_dict(data) + + return rules_item_type_7 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_0 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0.from_dict(data) + ) + + return rules_item_type_8_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_1 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1.from_dict(data) + ) + + return rules_item_type_8_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_2 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2.from_dict(data) + ) + + return rules_item_type_8_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_3 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3.from_dict(data) + ) + + return rules_item_type_8_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_4 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4.from_dict(data) + ) + + return rules_item_type_8_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_5 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5.from_dict(data) + ) + + return rules_item_type_8_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_6 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6.from_dict(data) + ) + + return rules_item_type_8_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_8_type_7 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7.from_dict(data) + ) + + return rules_item_type_8_type_7 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_0 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0.from_dict(data) + ) + + return rules_item_type_9_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_1 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1.from_dict(data) + ) + + return rules_item_type_9_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_2 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2.from_dict(data) + ) + + return rules_item_type_9_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_3 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3.from_dict(data) + ) + + return rules_item_type_9_type_3 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_4 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4.from_dict(data) + ) + + return rules_item_type_9_type_4 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_5 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5.from_dict(data) + ) + + return rules_item_type_9_type_5 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_6 = ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6.from_dict(data) + ) + + return rules_item_type_9_type_6 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + rules_item_type_9_type_7 = UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7.from_dict( + data ) + return rules_item_type_9_type_7 + rules_item = _parse_rules_item(rules_item_data) rules.append(rules_item) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py new file mode 100644 index 00000000..c1720579 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType0") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType0: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType): The type of the escalation path rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType + 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_update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type(d.pop("rule_type")) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_0.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_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/update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py new file mode 100644 index 00000000..18fa4ac9 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType = Literal["alert_urgency"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType +] = { + "alert_urgency", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py new file mode 100644 index 00000000..c7a2bc53 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType1") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType1: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType): The type of the escalation path rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType + 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_update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type(d.pop("rule_type")) + + within_working_hour = d.pop("within_working_hour") + + update_escalation_policy_path_data_attributes_rules_item_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_1.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_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/update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py new file mode 100644 index 00000000..2a5324d2 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType = Literal["working_hour"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType +] = { + "working_hour", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py new file mode 100644 index 00000000..35c6c75a --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_2_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType2") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType2: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType): The type of the escalation path rule + json_path (str): JSON path to extract value from payload + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator): 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: UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType + json_path: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator + 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_update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type(d.pop("rule_type")) + + json_path = d.pop("json_path") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_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)) + + update_escalation_policy_path_data_attributes_rules_item_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_2.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_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/update_escalation_policy_path_data_attributes_rules_item_type_2_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_operator.py new file mode 100644 index 00000000..10f4f284 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_2_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py new file mode 100644 index 00000000..8e3e688d --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType = Literal["json_path"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType +] = { + "json_path", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py new file mode 100644 index 00000000..72744df7 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_3_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType3") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType3: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType): 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 (UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator): How the alert field value should be + matched + values (list[str] | Unset): Values to match against + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType + fieldable_type: str + fieldable_id: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator + 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_update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type(d.pop("rule_type")) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_3_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_3.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_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/update_escalation_policy_path_data_attributes_rules_item_type_3_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_operator.py new file mode 100644 index 00000000..3d098863 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator = 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", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator +] = { + "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_update_escalation_policy_path_data_attributes_rules_item_type_3_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py new file mode 100644 index 00000000..0b2e52e1 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType = Literal["field"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType +] = { + "field", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py new file mode 100644 index 00000000..d113c289 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType4") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType4: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType): The type of the escalation path rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType + 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_update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type(d.pop("rule_type")) + + service_ids = cast(list[str], d.pop("service_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_4.additional_properties = d + return update_escalation_policy_path_data_attributes_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/update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py new file mode 100644 index 00000000..b893e3d8 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType = Literal["service"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType +] = { + "service", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py new file mode 100644 index 00000000..e8c03d5a --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py @@ -0,0 +1,118 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType5") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType5: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType): The type of the escalation path rule + time_zone (UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone): Time zone for the deferral window + time_blocks (list[UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem]): Time windows during + which alerts are deferred + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType + time_zone: UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone + time_blocks: list[UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + 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.update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type(d.pop("rule_type")) + + time_zone = check_update_escalation_policy_path_data_attributes_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 = UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem.from_dict( + time_blocks_item_data + ) + + time_blocks.append(time_blocks_item) + + update_escalation_policy_path_data_attributes_rules_item_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_5.additional_properties = d + return update_escalation_policy_path_data_attributes_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/update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py new file mode 100644 index 00000000..0415d0cf --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType = Literal["deferral_window"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType +] = { + "deferral_window", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py new file mode 100644 index 00000000..1d5da25f --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py @@ -0,0 +1,166 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + 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) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + 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)) + + update_escalation_policy_path_data_attributes_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, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.additional_properties = d + return update_escalation_policy_path_data_attributes_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/update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py new file mode 100644 index 00000000..b30f976b --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py new file mode 100644 index 00000000..dc5b8aff --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_6_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType6") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType6: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType): The type of the escalation path rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator): How the alert source should be + matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator + values: 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 + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "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_update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type(d.pop("rule_type")) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_6_operator(d.pop("operator")) + + values = cast(list[str], d.pop("values")) + + update_escalation_policy_path_data_attributes_rules_item_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_6.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_6 + + @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_rules_item_type_6_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_operator.py new file mode 100644 index 00000000..10f5c4d1 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_operator.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator = Literal["is", "is_not", "is_not_one_of", "is_one_of"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_6_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py new file mode 100644 index 00000000..23f8cc8f --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType = Literal["source"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType +] = { + "source", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py new file mode 100644 index 00000000..c2fd7d25 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_7_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType7") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType7: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType): The type of the escalation path rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator): Whether the alert must (or must not) + have related incidents + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type(d.pop("rule_type")) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_7_operator(d.pop("operator")) + + update_escalation_policy_path_data_attributes_rules_item_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_7.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_7 + + @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_rules_item_type_7_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_operator.py new file mode 100644 index 00000000..b84a4019 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator = Literal["is_not_set", "is_set"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_7_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py new file mode 100644 index 00000000..c1a6fff4 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType = Literal["related_incidents"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType +] = { + "related_incidents", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py new file mode 100644 index 00000000..a3416756 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType): The type of the escalation path + rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType + 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_update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type( + d.pop("rule_type") + ) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_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/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type.py new file mode 100644 index 00000000..e203a644 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType = Literal["alert_urgency"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType +] = { + "alert_urgency", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py new file mode 100644 index 00000000..d9f86109 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType): The type of the escalation path + rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType + 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_update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type( + d.pop("rule_type") + ) + + within_working_hour = d.pop("within_working_hour") + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_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/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type.py new file mode 100644 index 00000000..b161a7bc --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType = Literal["working_hour"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType +] = { + "working_hour", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py new file mode 100644 index 00000000..d92fba48 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType): The type of the escalation path + rule + json_path (str): JSON path to extract value from payload + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator): 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: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType + json_path: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator + 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_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type( + d.pop("rule_type") + ) + + json_path = d.pop("json_path") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_8_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)) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_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/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator.py new file mode 100644 index 00000000..567782af --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type.py new file mode 100644 index 00000000..9a352a36 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType = Literal["json_path"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType +] = { + "json_path", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py new file mode 100644 index 00000000..42a483a9 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py @@ -0,0 +1,120 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType): 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 (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator): How the alert field value should + be matched + values (list[str] | Unset): Values to match against + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType + fieldable_type: str + fieldable_id: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator + 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_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type( + d.pop("rule_type") + ) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator( + d.pop("operator") + ) + + values = cast(list[str], d.pop("values", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_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/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator.py new file mode 100644 index 00000000..883a9cd9 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator = 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", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator +] = { + "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_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type.py new file mode 100644 index 00000000..78a62ee9 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType = Literal["field"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType +] = { + "field", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py new file mode 100644 index 00000000..32a87b7a --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType): The type of the escalation path + rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType + 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_update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type( + d.pop("rule_type") + ) + + service_ids = cast(list[str], d.pop("service_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_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/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type.py new file mode 100644 index 00000000..395ab7c6 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType = Literal["service"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType +] = { + "service", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py new file mode 100644 index 00000000..a5cf0462 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType): The type of the escalation path + rule + time_zone (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone): Time zone for the deferral + window + time_blocks (list[UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem]): Time windows + during which alerts are deferred + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType + time_zone: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone + time_blocks: list[UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem, + ) + + 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.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type( + d.pop("rule_type") + ) + + time_zone = check_update_escalation_policy_path_data_attributes_rules_item_type_8_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 = UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem.from_dict( + time_blocks_item_data + ) + + time_blocks.append(time_blocks_item) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_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/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type.py new file mode 100644 index 00000000..2ea2d52c --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType = Literal["deferral_window"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType +] = { + "deferral_window", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py new file mode 100644 index 00000000..cf65ba41 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py @@ -0,0 +1,166 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + 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) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + 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)) + + update_escalation_policy_path_data_attributes_rules_item_type_8_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, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_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/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone.py new file mode 100644 index 00000000..c0d3f443 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py new file mode 100644 index 00000000..43d90766 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType): The type of the escalation path + rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator): How the alert source should be + matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator + values: 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 + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "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_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type( + d.pop("rule_type") + ) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator( + d.pop("operator") + ) + + values = cast(list[str], d.pop("values")) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 + + @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_rules_item_type_8_type_6_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator.py new file mode 100644 index 00000000..4e4b0282 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator.py @@ -0,0 +1,26 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator = Literal[ + "is", "is_not", "is_not_one_of", "is_one_of" +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type.py new file mode 100644 index 00000000..404f4bbe --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType = Literal["source"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType +] = { + "source", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py new file mode 100644 index 00000000..c2e37693 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType): The type of the escalation path + rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator): Whether the alert must (or must + not) have related incidents + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type( + d.pop("rule_type") + ) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator( + d.pop("operator") + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 + + @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_rules_item_type_8_type_7_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator.py new file mode 100644 index 00000000..01c28e7c --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator = Literal["is_not_set", "is_set"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type.py new file mode 100644 index 00000000..84e3acde --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType = Literal["related_incidents"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType +] = { + "related_incidents", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_8_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py new file mode 100644 index 00000000..209bfff5 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType): The type of the escalation path + rule + urgency_ids (list[str]): Alert urgency ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType + 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_update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type( + d.pop("rule_type") + ) + + urgency_ids = cast(list[str], d.pop("urgency_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 = cls( + rule_type=rule_type, + urgency_ids=urgency_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_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/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type.py new file mode 100644 index 00000000..08916373 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType = Literal["alert_urgency"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType +] = { + "alert_urgency", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_0_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py new file mode 100644 index 00000000..747fddd8 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType): The type of the escalation path + rule + within_working_hour (bool): Whether the escalation path should be used within working hours + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType + 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_update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type( + d.pop("rule_type") + ) + + within_working_hour = d.pop("within_working_hour") + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 = cls( + rule_type=rule_type, + within_working_hour=within_working_hour, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_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/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type.py new file mode 100644 index 00000000..ce787dbe --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType = Literal["working_hour"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType +] = { + "working_hour", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_1_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py new file mode 100644 index 00000000..baa406ff --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType): The type of the escalation path + rule + json_path (str): JSON path to extract value from payload + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator): 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: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType + json_path: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator + 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_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type( + d.pop("rule_type") + ) + + json_path = d.pop("json_path") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_9_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)) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 = cls( + rule_type=rule_type, + json_path=json_path, + operator=operator, + value=value, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_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/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator.py new file mode 100644 index 00000000..0421cf9b --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator = Literal[ + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator +] = { + "contains", + "contains_key", + "does_not_contain", + "does_not_contain_key", + "does_not_match", + "does_not_start_with", + "is", + "is_not", + "is_not_one_of", + "is_not_set", + "is_one_of", + "is_set", + "matches", + "starts_with", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type.py new file mode 100644 index 00000000..0764370d --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType = Literal["json_path"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType +] = { + "json_path", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_2_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py new file mode 100644 index 00000000..e3d46a03 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py @@ -0,0 +1,120 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType): 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 (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator): How the alert field value should + be matched + values (list[str] | Unset): Values to match against + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType + fieldable_type: str + fieldable_id: str + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator + 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_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type( + d.pop("rule_type") + ) + + fieldable_type = d.pop("fieldable_type") + + fieldable_id = d.pop("fieldable_id") + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator( + d.pop("operator") + ) + + values = cast(list[str], d.pop("values", UNSET)) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 = cls( + rule_type=rule_type, + fieldable_type=fieldable_type, + fieldable_id=fieldable_id, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_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/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator.py new file mode 100644 index 00000000..b5cb0f97 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator.py @@ -0,0 +1,49 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator = 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", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator +] = { + "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_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type.py new file mode 100644 index 00000000..89acf824 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType = Literal["field"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType +] = { + "field", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_3_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py new file mode 100644 index 00000000..09c05f3a --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType): The type of the escalation path + rule + service_ids (list[str]): Service ids for which this escalation path should be used + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType + 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_update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type( + d.pop("rule_type") + ) + + service_ids = cast(list[str], d.pop("service_ids")) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_4 = cls( + rule_type=rule_type, + service_ids=service_ids, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_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/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type.py new file mode 100644 index 00000000..56647954 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType = Literal["service"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType +] = { + "service", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_4_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py new file mode 100644 index 00000000..6e8afc00 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem, + ) + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType): The type of the escalation path + rule + time_zone (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone): Time zone for the deferral + window + time_blocks (list[UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem]): Time windows + during which alerts are deferred + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType + time_zone: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone + time_blocks: list[UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem] + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem, + ) + + 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.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem, + ) + + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type( + d.pop("rule_type") + ) + + time_zone = check_update_escalation_policy_path_data_attributes_rules_item_type_9_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 = UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem.from_dict( + time_blocks_item_data + ) + + time_blocks.append(time_blocks_item) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 = cls( + rule_type=rule_type, + time_zone=time_zone, + time_blocks=time_blocks, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_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/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type.py new file mode 100644 index 00000000..fda6f2e2 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType = Literal["deferral_window"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType +] = { + "deferral_window", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py new file mode 100644 index 00000000..e9eca5ee --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py @@ -0,0 +1,166 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem: + """ + Attributes: + monday (bool | Unset): Default: False. + tuesday (bool | Unset): Default: False. + wednesday (bool | Unset): Default: False. + thursday (bool | Unset): Default: False. + friday (bool | Unset): Default: False. + saturday (bool | Unset): Default: False. + sunday (bool | Unset): Default: False. + start_time (str | Unset): Formatted as HH:MM + end_time (str | Unset): Formatted as HH:MM + all_day (bool | Unset): Default: False. + position (int | None | Unset): + """ + + monday: bool | Unset = False + tuesday: bool | Unset = False + wednesday: bool | Unset = False + thursday: bool | Unset = False + friday: bool | Unset = False + saturday: bool | Unset = False + sunday: bool | Unset = False + start_time: str | Unset = UNSET + end_time: str | Unset = UNSET + all_day: bool | Unset = False + position: int | None | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + monday = self.monday + + tuesday = self.tuesday + + wednesday = self.wednesday + + thursday = self.thursday + + friday = self.friday + + saturday = self.saturday + + sunday = self.sunday + + start_time = self.start_time + + end_time = self.end_time + + 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) + monday = d.pop("monday", UNSET) + + tuesday = d.pop("tuesday", UNSET) + + wednesday = d.pop("wednesday", UNSET) + + thursday = d.pop("thursday", UNSET) + + friday = d.pop("friday", UNSET) + + saturday = d.pop("saturday", UNSET) + + sunday = d.pop("sunday", UNSET) + + start_time = d.pop("start_time", UNSET) + + end_time = d.pop("end_time", UNSET) + + 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)) + + update_escalation_policy_path_data_attributes_rules_item_type_9_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, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_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/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone.py new file mode 100644 index 00000000..df6b5c1c --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone.py @@ -0,0 +1,631 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone = Literal[ + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone +] = { + "Abu Dhabi", + "Adelaide", + "Africa/Algiers", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Monrovia", + "Africa/Nairobi", + "Alaska", + "Almaty", + "America/Adak", + "America/Argentina/Buenos_Aires", + "America/Asuncion", + "America/Atka", + "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/Miquelon", + "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", + "America/Vancouver", + "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/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/Perth", + "Australia/Sydney", + "Azores", + "Baghdad", + "Baku", + "Bangkok", + "Beijing", + "Belgrade", + "Berlin", + "Bern", + "Bogota", + "Brasilia", + "Bratislava", + "Brisbane", + "Brussels", + "Bucharest", + "Budapest", + "Buenos Aires", + "Cairo", + "Canada/Pacific", + "Canberra", + "Cape Verde Is.", + "Caracas", + "Casablanca", + "Central America", + "Central Time (US & Canada)", + "Chatham Is.", + "Chennai", + "Chihuahua", + "Chile/EasterIsland", + "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/Easter", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Kiritimati", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Pitcairn", + "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", + "US/Aleutian", + "UTC", + "Vienna", + "Vilnius", + "Vladivostok", + "Volgograd", + "Warsaw", + "Wellington", + "West Central Africa", + "Yakutsk", + "Yerevan", + "Zagreb", + "Zurich", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_5_TIME_ZONE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py new file mode 100644 index 00000000..7bd8aa55 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py @@ -0,0 +1,100 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType): The type of the escalation path + rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator): How the alert source should be + matched + values (list[str]): Alert source values to match against (e.g., manual, datadog) + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator + values: 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 + + operator: str = self.operator + + values = self.values + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + "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_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type( + d.pop("rule_type") + ) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator( + d.pop("operator") + ) + + values = cast(list[str], d.pop("values")) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 = cls( + rule_type=rule_type, + operator=operator, + values=values, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 + + @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_rules_item_type_9_type_6_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator.py new file mode 100644 index 00000000..ea7e5971 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator.py @@ -0,0 +1,26 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator = Literal[ + "is", "is_not", "is_not_one_of", "is_one_of" +] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator +] = { + "is", + "is_not", + "is_not_one_of", + "is_one_of", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type.py new file mode 100644 index 00000000..fcf6bdc3 --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType = Literal["source"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType +] = { + "source", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_6_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py new file mode 100644 index 00000000..cea0c43e --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py @@ -0,0 +1,92 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type import ( + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type, +) +from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType, +) +from typing import cast + + +T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7") + + +@_attrs_define +class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7: + """ + Attributes: + rule_type (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType): The type of the escalation path + rule + operator (UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator): Whether the alert must (or must + not) have related incidents + """ + + rule_type: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType + operator: UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + rule_type: str = self.rule_type + + operator: str = self.operator + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "rule_type": rule_type, + "operator": operator, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + rule_type = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type( + d.pop("rule_type") + ) + + operator = check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator( + d.pop("operator") + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 = cls( + rule_type=rule_type, + operator=operator, + ) + + update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.additional_properties = d + return update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 + + @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_rules_item_type_9_type_7_operator.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator.py new file mode 100644 index 00000000..285dd52f --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator = Literal["is_not_set", "is_set"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator +] = { + "is_not_set", + "is_set", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_OPERATOR_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type.py new file mode 100644 index 00000000..042dcc4b --- /dev/null +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType = Literal["related_incidents"] + +UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES: set[ + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType +] = { + "related_incidents", +} + + +def check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type( + value: str | None, +) -> UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType | None: + if value is None: + return None + if value in UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES: + return cast(UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ESCALATION_POLICY_PATH_DATA_ATTRIBUTES_RULES_ITEM_TYPE_9_TYPE_7_RULE_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py index 4641bcfe..c33abf02 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_time_restriction_time_zone.py @@ -12,8 +12,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -29,6 +31,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -40,6 +43,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -94,7 +98,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -115,6 +122,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -124,6 +132,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -230,15 +239,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -278,6 +293,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", @@ -306,8 +322,10 @@ "Africa/Nairobi", "Alaska", "Almaty", + "America/Adak", "America/Argentina/Buenos_Aires", "America/Asuncion", + "America/Atka", "America/Bogota", "America/Caracas", "America/Chicago", @@ -323,6 +341,7 @@ "America/Los_Angeles", "America/Mazatlan", "America/Mexico_City", + "America/Miquelon", "America/Monterrey", "America/Montevideo", "America/New_York", @@ -334,6 +353,7 @@ "America/Sao_Paulo", "America/St_Johns", "America/Tijuana", + "America/Vancouver", "American Samoa", "Amsterdam", "Arizona", @@ -388,7 +408,10 @@ "Australia/Brisbane", "Australia/Canberra", "Australia/Darwin", + "Australia/Eucla", "Australia/Hobart", + "Australia/LHI", + "Australia/Lord_Howe", "Australia/Melbourne", "Australia/Perth", "Australia/Sydney", @@ -409,6 +432,7 @@ "Budapest", "Buenos Aires", "Cairo", + "Canada/Pacific", "Canberra", "Cape Verde Is.", "Caracas", @@ -418,6 +442,7 @@ "Chatham Is.", "Chennai", "Chihuahua", + "Chile/EasterIsland", "Chongqing", "Copenhagen", "Darwin", @@ -524,15 +549,21 @@ "Pacific/Apia", "Pacific/Auckland", "Pacific/Chatham", + "Pacific/Easter", "Pacific/Fakaofo", "Pacific/Fiji", + "Pacific/Gambier", "Pacific/Guadalcanal", "Pacific/Guam", "Pacific/Honolulu", + "Pacific/Kiritimati", "Pacific/Majuro", + "Pacific/Marquesas", "Pacific/Midway", + "Pacific/Norfolk", "Pacific/Noumea", "Pacific/Pago_Pago", + "Pacific/Pitcairn", "Pacific/Port_Moresby", "Pacific/Tongatapu", "Paris", @@ -572,6 +603,7 @@ "Tokyo", "Ulaanbaatar", "Urumqi", + "US/Aleutian", "UTC", "Vienna", "Vilnius", 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 index a53f78dd..e6dcbedc 100644 --- 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 @@ -1,20 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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_end_day import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, +) 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 ..models.update_escalation_policy_path_data_attributes_time_restrictions_item_start_day import ( + UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemStartDay, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem") diff --git a/rootly_sdk/models/update_form_field.py b/rootly_sdk/models/update_form_field.py index c25d3344..a71e38b7 100644 --- a/rootly_sdk/models/update_form_field.py +++ b/rootly_sdk/models/update_form_field.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_form_field_data import UpdateFormFieldData @@ -24,6 +28,8 @@ class UpdateFormField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_data import UpdateFormFieldData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_form_field_data.py b/rootly_sdk/models/update_form_field_data.py index f512b069..a72308ca 100644 --- a/rootly_sdk/models/update_form_field_data.py +++ b/rootly_sdk/models/update_form_field_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_form_field_data_type import UpdateFormFieldDataType, check_update_form_field_data_type +from ..types import UNSET, Unset + +from ..models.update_form_field_data_type import check_update_form_field_data_type +from ..models.update_form_field_data_type import UpdateFormFieldDataType +from typing import cast if TYPE_CHECKING: from ..models.update_form_field_data_attributes import UpdateFormFieldDataAttributes @@ -28,6 +32,8 @@ class UpdateFormFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_data_attributes import UpdateFormFieldDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_form_field_data_attributes.py b/rootly_sdk/models/update_form_field_data_attributes.py index b35324bf..76dc38e3 100644 --- a/rootly_sdk/models/update_form_field_data_attributes.py +++ b/rootly_sdk/models/update_form_field_data_attributes.py @@ -1,24 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.update_form_field_data_attributes_input_kind import ( - UpdateFormFieldDataAttributesInputKind, - check_update_form_field_data_attributes_input_kind, -) -from ..models.update_form_field_data_attributes_kind import ( - UpdateFormFieldDataAttributesKind, - check_update_form_field_data_attributes_kind, -) -from ..models.update_form_field_data_attributes_value_kind import ( - UpdateFormFieldDataAttributesValueKind, - check_update_form_field_data_attributes_value_kind, -) from ..types import UNSET, Unset +from ..models.update_form_field_data_attributes_input_kind import check_update_form_field_data_attributes_input_kind +from ..models.update_form_field_data_attributes_input_kind import UpdateFormFieldDataAttributesInputKind +from ..models.update_form_field_data_attributes_kind import check_update_form_field_data_attributes_kind +from ..models.update_form_field_data_attributes_kind import UpdateFormFieldDataAttributesKind +from ..models.update_form_field_data_attributes_value_kind import check_update_form_field_data_attributes_value_kind +from ..models.update_form_field_data_attributes_value_kind import UpdateFormFieldDataAttributesValueKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateFormFieldDataAttributes") diff --git a/rootly_sdk/models/update_form_field_data_attributes_kind.py b/rootly_sdk/models/update_form_field_data_attributes_kind.py index dc922bde..ba40572f 100644 --- a/rootly_sdk/models/update_form_field_data_attributes_kind.py +++ b/rootly_sdk/models/update_form_field_data_attributes_kind.py @@ -25,6 +25,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", @@ -58,6 +59,7 @@ "severity", "show_ongoing_incidents", "started_at", + "status", "summary", "teams", "title", diff --git a/rootly_sdk/models/update_form_field_option.py b/rootly_sdk/models/update_form_field_option.py index 0ad11b4f..5c05bf00 100644 --- a/rootly_sdk/models/update_form_field_option.py +++ b/rootly_sdk/models/update_form_field_option.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_form_field_option_data import UpdateFormFieldOptionData @@ -24,6 +28,8 @@ class UpdateFormFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_option_data import UpdateFormFieldOptionData + data = self.data.to_dict() field_dict: 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 cc5bfce6..776c13b0 100644 --- a/rootly_sdk/models/update_form_field_option_data.py +++ b/rootly_sdk/models/update_form_field_option_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_form_field_option_data_type import ( - UpdateFormFieldOptionDataType, - check_update_form_field_option_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_form_field_option_data_type import check_update_form_field_option_data_type +from ..models.update_form_field_option_data_type import UpdateFormFieldOptionDataType +from typing import cast if TYPE_CHECKING: from ..models.update_form_field_option_data_attributes import UpdateFormFieldOptionDataAttributes @@ -31,6 +32,8 @@ class UpdateFormFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_option_data_attributes import UpdateFormFieldOptionDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 884652f0..ba35ebcd 100644 --- a/rootly_sdk/models/update_form_field_option_data_attributes.py +++ b/rootly_sdk/models/update_form_field_option_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateFormFieldOptionDataAttributes") diff --git a/rootly_sdk/models/update_form_field_placement.py b/rootly_sdk/models/update_form_field_placement.py index 43a5f88e..e9f02cec 100644 --- a/rootly_sdk/models/update_form_field_placement.py +++ b/rootly_sdk/models/update_form_field_placement.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_form_field_placement_data import UpdateFormFieldPlacementData @@ -24,6 +28,8 @@ class UpdateFormFieldPlacement: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_placement_data import UpdateFormFieldPlacementData + data = self.data.to_dict() field_dict: 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 2f9a4da3..60d2e72e 100644 --- a/rootly_sdk/models/update_form_field_placement_condition.py +++ b/rootly_sdk/models/update_form_field_placement_condition.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_form_field_placement_condition_data import UpdateFormFieldPlacementConditionData @@ -24,6 +28,8 @@ class UpdateFormFieldPlacementCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_placement_condition_data import UpdateFormFieldPlacementConditionData + data = self.data.to_dict() field_dict: 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 8ecd9eca..61fb5877 100644 --- a/rootly_sdk/models/update_form_field_placement_condition_data.py +++ b/rootly_sdk/models/update_form_field_placement_condition_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_form_field_placement_condition_data_type import ( - UpdateFormFieldPlacementConditionDataType, check_update_form_field_placement_condition_data_type, ) +from ..models.update_form_field_placement_condition_data_type import UpdateFormFieldPlacementConditionDataType +from typing import cast if TYPE_CHECKING: from ..models.update_form_field_placement_condition_data_attributes import ( @@ -33,6 +36,10 @@ class UpdateFormFieldPlacementConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_placement_condition_data_attributes import ( + UpdateFormFieldPlacementConditionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 abca4c89..4e45beab 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,19 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_form_field_placement_condition_data_attributes_comparison import ( - UpdateFormFieldPlacementConditionDataAttributesComparison, check_update_form_field_placement_condition_data_attributes_comparison, ) +from ..models.update_form_field_placement_condition_data_attributes_comparison import ( + UpdateFormFieldPlacementConditionDataAttributesComparison, +) from ..models.update_form_field_placement_condition_data_attributes_conditioned import ( - UpdateFormFieldPlacementConditionDataAttributesConditioned, check_update_form_field_placement_condition_data_attributes_conditioned, ) +from ..models.update_form_field_placement_condition_data_attributes_conditioned import ( + UpdateFormFieldPlacementConditionDataAttributesConditioned, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateFormFieldPlacementConditionDataAttributes") diff --git a/rootly_sdk/models/update_form_field_placement_data.py b/rootly_sdk/models/update_form_field_placement_data.py index fa6336fc..6d8ae022 100644 --- a/rootly_sdk/models/update_form_field_placement_data.py +++ b/rootly_sdk/models/update_form_field_placement_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_form_field_placement_data_type import ( - UpdateFormFieldPlacementDataType, - check_update_form_field_placement_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_form_field_placement_data_type import check_update_form_field_placement_data_type +from ..models.update_form_field_placement_data_type import UpdateFormFieldPlacementDataType +from typing import cast if TYPE_CHECKING: from ..models.update_form_field_placement_data_attributes import UpdateFormFieldPlacementDataAttributes @@ -31,6 +32,8 @@ class UpdateFormFieldPlacementData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_placement_data_attributes import UpdateFormFieldPlacementDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 aebd8477..f47f8a67 100644 --- a/rootly_sdk/models/update_form_field_placement_data_attributes.py +++ b/rootly_sdk/models/update_form_field_placement_data_attributes.py @@ -1,19 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_form_field_placement_data_attributes_placement_operator import ( - UpdateFormFieldPlacementDataAttributesPlacementOperator, check_update_form_field_placement_data_attributes_placement_operator, ) +from ..models.update_form_field_placement_data_attributes_placement_operator import ( + UpdateFormFieldPlacementDataAttributesPlacementOperator, +) from ..models.update_form_field_placement_data_attributes_required_operator import ( - UpdateFormFieldPlacementDataAttributesRequiredOperator, check_update_form_field_placement_data_attributes_required_operator, ) +from ..models.update_form_field_placement_data_attributes_required_operator import ( + UpdateFormFieldPlacementDataAttributesRequiredOperator, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateFormFieldPlacementDataAttributes") diff --git a/rootly_sdk/models/update_form_field_position.py b/rootly_sdk/models/update_form_field_position.py index 08767e29..bd265731 100644 --- a/rootly_sdk/models/update_form_field_position.py +++ b/rootly_sdk/models/update_form_field_position.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_form_field_position_data import UpdateFormFieldPositionData @@ -24,6 +28,8 @@ class UpdateFormFieldPosition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_position_data import UpdateFormFieldPositionData + data = self.data.to_dict() field_dict: 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 6d2e5dc3..597cf803 100644 --- a/rootly_sdk/models/update_form_field_position_data.py +++ b/rootly_sdk/models/update_form_field_position_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_form_field_position_data_type import ( - UpdateFormFieldPositionDataType, - check_update_form_field_position_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_form_field_position_data_type import check_update_form_field_position_data_type +from ..models.update_form_field_position_data_type import UpdateFormFieldPositionDataType +from typing import cast if TYPE_CHECKING: from ..models.update_form_field_position_data_attributes import UpdateFormFieldPositionDataAttributes @@ -31,6 +32,8 @@ class UpdateFormFieldPositionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_field_position_data_attributes import UpdateFormFieldPositionDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 bc7b1105..4f298997 100644 --- a/rootly_sdk/models/update_form_field_position_data_attributes.py +++ b/rootly_sdk/models/update_form_field_position_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_form_field_position_data_attributes_form import ( - UpdateFormFieldPositionDataAttributesForm, check_update_form_field_position_data_attributes_form, ) +from ..models.update_form_field_position_data_attributes_form import UpdateFormFieldPositionDataAttributesForm from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateFormFieldPositionDataAttributes") diff --git a/rootly_sdk/models/update_form_field_position_data_attributes_form.py b/rootly_sdk/models/update_form_field_position_data_attributes_form.py index 4355ad0e..15a3f66a 100644 --- a/rootly_sdk/models/update_form_field_position_data_attributes_form.py +++ b/rootly_sdk/models/update_form_field_position_data_attributes_form.py @@ -2,6 +2,7 @@ UpdateFormFieldPositionDataAttributesForm = Literal[ "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -10,6 +11,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", @@ -22,6 +24,7 @@ UPDATE_FORM_FIELD_POSITION_DATA_ATTRIBUTES_FORM_VALUES: set[UpdateFormFieldPositionDataAttributesForm] = { "incident_post_mortem", + "slack_action_item_form", "slack_incident_cancellation_form", "slack_incident_mitigation_form", "slack_incident_resolution_form", @@ -30,6 +33,7 @@ "slack_update_incident_form", "slack_update_incident_status_form", "slack_update_scheduled_incident_form", + "web_action_item_form", "web_incident_cancellation_form", "web_incident_mitigation_form", "web_incident_post_mortem_form", diff --git a/rootly_sdk/models/update_form_set.py b/rootly_sdk/models/update_form_set.py index 693fa518..9e5312e9 100644 --- a/rootly_sdk/models/update_form_set.py +++ b/rootly_sdk/models/update_form_set.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_form_set_data import UpdateFormSetData @@ -24,6 +28,8 @@ class UpdateFormSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_set_data import UpdateFormSetData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_form_set_condition.py b/rootly_sdk/models/update_form_set_condition.py index 6dfd73a1..2a8e7f64 100644 --- a/rootly_sdk/models/update_form_set_condition.py +++ b/rootly_sdk/models/update_form_set_condition.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_form_set_condition_data import UpdateFormSetConditionData @@ -24,6 +28,8 @@ class UpdateFormSetCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_set_condition_data import UpdateFormSetConditionData + data = self.data.to_dict() field_dict: 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 b3db3ad4..642ca9cf 100644 --- a/rootly_sdk/models/update_form_set_condition_data.py +++ b/rootly_sdk/models/update_form_set_condition_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_form_set_condition_data_type import ( - UpdateFormSetConditionDataType, - check_update_form_set_condition_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_form_set_condition_data_type import check_update_form_set_condition_data_type +from ..models.update_form_set_condition_data_type import UpdateFormSetConditionDataType +from typing import cast if TYPE_CHECKING: from ..models.update_form_set_condition_data_attributes import UpdateFormSetConditionDataAttributes @@ -31,6 +32,8 @@ class UpdateFormSetConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_set_condition_data_attributes import UpdateFormSetConditionDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 cbaa334a..238649f8 100644 --- a/rootly_sdk/models/update_form_set_condition_data_attributes.py +++ b/rootly_sdk/models/update_form_set_condition_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_form_set_condition_data_attributes_comparison import ( - UpdateFormSetConditionDataAttributesComparison, check_update_form_set_condition_data_attributes_comparison, ) +from ..models.update_form_set_condition_data_attributes_comparison import UpdateFormSetConditionDataAttributesComparison from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateFormSetConditionDataAttributes") diff --git a/rootly_sdk/models/update_form_set_data.py b/rootly_sdk/models/update_form_set_data.py index ae1032ab..386359bd 100644 --- a/rootly_sdk/models/update_form_set_data.py +++ b/rootly_sdk/models/update_form_set_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_form_set_data_type import UpdateFormSetDataType, check_update_form_set_data_type +from ..types import UNSET, Unset + +from ..models.update_form_set_data_type import check_update_form_set_data_type +from ..models.update_form_set_data_type import UpdateFormSetDataType +from typing import cast if TYPE_CHECKING: from ..models.update_form_set_data_attributes import UpdateFormSetDataAttributes @@ -28,6 +32,8 @@ class UpdateFormSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_form_set_data_attributes import UpdateFormSetDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_form_set_data_attributes.py b/rootly_sdk/models/update_form_set_data_attributes.py index 4aa62632..a95b6b0b 100644 --- a/rootly_sdk/models/update_form_set_data_attributes.py +++ b/rootly_sdk/models/update_form_set_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateFormSetDataAttributes") @@ -21,7 +26,8 @@ class UpdateFormSetDataAttributes: `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` + `slack_scheduled_incident_form`, `slack_update_scheduled_incident_form`, `google_chat_new_incident_form`, + `google_chat_update_incident_form` """ name: str | Unset = UNSET diff --git a/rootly_sdk/models/update_functionality.py b/rootly_sdk/models/update_functionality.py index edce75cd..e89e6e64 100644 --- a/rootly_sdk/models/update_functionality.py +++ b/rootly_sdk/models/update_functionality.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_functionality_data import UpdateFunctionalityData @@ -24,6 +28,8 @@ class UpdateFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_functionality_data import UpdateFunctionalityData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_functionality_data.py b/rootly_sdk/models/update_functionality_data.py index fb3d4038..acb8e420 100644 --- a/rootly_sdk/models/update_functionality_data.py +++ b/rootly_sdk/models/update_functionality_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_functionality_data_type import UpdateFunctionalityDataType, check_update_functionality_data_type +from ..types import UNSET, Unset + +from ..models.update_functionality_data_type import check_update_functionality_data_type +from ..models.update_functionality_data_type import UpdateFunctionalityDataType +from typing import cast if TYPE_CHECKING: from ..models.update_functionality_data_attributes import UpdateFunctionalityDataAttributes @@ -28,6 +32,8 @@ class UpdateFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_functionality_data_attributes import UpdateFunctionalityDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_functionality_data_attributes.py b/rootly_sdk/models/update_functionality_data_attributes.py index 1711ef2d..837fefda 100644 --- a/rootly_sdk/models/update_functionality_data_attributes.py +++ b/rootly_sdk/models/update_functionality_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_functionality_data_attributes_properties_item import ( UpdateFunctionalityDataAttributesPropertiesItem, @@ -44,6 +48,7 @@ class UpdateFunctionalityDataAttributes: 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 + escalation_policy_id (None | str | Unset): The escalation policy id of the functionality slack_channels (list[UpdateFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset): Slack Channels associated with this functionality slack_aliases (list[UpdateFunctionalityDataAttributesSlackAliasesType0Item] | None | Unset): Slack Aliases @@ -69,11 +74,22 @@ class UpdateFunctionalityDataAttributes: service_ids: list[str] | None | Unset = UNSET owner_group_ids: list[str] | None | Unset = UNSET owner_user_ids: list[int] | None | Unset = UNSET + escalation_policy_id: None | str | 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]: + from ..models.update_functionality_data_attributes_slack_channels_type_0_item import ( + UpdateFunctionalityDataAttributesSlackChannelsType0Item, + ) + from ..models.update_functionality_data_attributes_properties_item import ( + UpdateFunctionalityDataAttributesPropertiesItem, + ) + from ..models.update_functionality_data_attributes_slack_aliases_type_0_item import ( + UpdateFunctionalityDataAttributesSlackAliasesType0Item, + ) + name = self.name description: None | str | Unset @@ -187,6 +203,12 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_ids = self.owner_user_ids + 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: list[dict[str, Any]] | None | Unset if isinstance(self.slack_channels, Unset): slack_channels = UNSET @@ -255,6 +277,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["owner_group_ids"] = owner_group_ids if owner_user_ids is not UNSET: field_dict["owner_user_ids"] = owner_user_ids + if escalation_policy_id is not UNSET: + field_dict["escalation_policy_id"] = escalation_policy_id if slack_channels is not UNSET: field_dict["slack_channels"] = slack_channels if slack_aliases is not UNSET: @@ -463,6 +487,15 @@ def _parse_owner_user_ids(data: object) -> list[int] | None | Unset: owner_user_ids = _parse_owner_user_ids(d.pop("owner_user_ids", UNSET)) + 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 | str | Unset, data) + + escalation_policy_id = _parse_escalation_policy_id(d.pop("escalation_policy_id", UNSET)) + def _parse_slack_channels( data: object, ) -> list[UpdateFunctionalityDataAttributesSlackChannelsType0Item] | None | Unset: @@ -542,6 +575,7 @@ def _parse_slack_aliases( service_ids=service_ids, owner_group_ids=owner_group_ids, owner_user_ids=owner_user_ids, + escalation_policy_id=escalation_policy_id, slack_channels=slack_channels, slack_aliases=slack_aliases, properties=properties, diff --git a/rootly_sdk/models/update_functionality_data_attributes_properties_item.py b/rootly_sdk/models/update_functionality_data_attributes_properties_item.py index 8d1806bc..abbef9f5 100644 --- a/rootly_sdk/models/update_functionality_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_functionality_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateFunctionalityDataAttributesPropertiesItem") 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 b49afaf8..acdb5715 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateFunctionalityDataAttributesSlackAliasesType0Item") 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 ef5557a9..71b97555 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateFunctionalityDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_github_issue_task_params.py b/rootly_sdk/models/update_github_issue_task_params.py index ba939888..0f40b964 100644 --- a/rootly_sdk/models/update_github_issue_task_params.py +++ b/rootly_sdk/models/update_github_issue_task_params.py @@ -1,17 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_github_issue_task_params_task_type import ( - UpdateGithubIssueTaskParamsTaskType, - check_update_github_issue_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_github_issue_task_params_labels_mode import check_update_github_issue_task_params_labels_mode +from ..models.update_github_issue_task_params_labels_mode import UpdateGithubIssueTaskParamsLabelsMode +from ..models.update_github_issue_task_params_task_type import check_update_github_issue_task_params_task_type +from ..models.update_github_issue_task_params_task_type import UpdateGithubIssueTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_github_issue_task_params_completion import UpdateGithubIssueTaskParamsCompletion from ..models.update_github_issue_task_params_issue_type import UpdateGithubIssueTaskParamsIssueType @@ -34,7 +37,11 @@ class UpdateGithubIssueTaskParams: title (str | Unset): The issue title body (str | Unset): The issue body labels (list[UpdateGithubIssueTaskParamsLabelsItem] | Unset): The issue labels + labels_mode (UpdateGithubIssueTaskParamsLabelsMode | Unset): How to apply labels. 'replace' (default) overwrites + all existing labels. 'append' adds to existing labels without removing them. Default: 'replace'. issue_type (UpdateGithubIssueTaskParamsIssueType | Unset): The issue type + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ issue_id: str @@ -44,10 +51,17 @@ class UpdateGithubIssueTaskParams: title: str | Unset = UNSET body: str | Unset = UNSET labels: list[UpdateGithubIssueTaskParamsLabelsItem] | Unset = UNSET + labels_mode: UpdateGithubIssueTaskParamsLabelsMode | Unset = "replace" issue_type: UpdateGithubIssueTaskParamsIssueType | 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]: + from ..models.update_github_issue_task_params_labels_item import UpdateGithubIssueTaskParamsLabelsItem + from ..models.update_github_issue_task_params_issue_type import UpdateGithubIssueTaskParamsIssueType + from ..models.update_github_issue_task_params_repository import UpdateGithubIssueTaskParamsRepository + from ..models.update_github_issue_task_params_completion import UpdateGithubIssueTaskParamsCompletion + issue_id = self.issue_id completion = self.completion.to_dict() @@ -71,10 +85,20 @@ def to_dict(self) -> dict[str, Any]: labels_item = labels_item_data.to_dict() labels.append(labels_item) + labels_mode: str | Unset = UNSET + if not isinstance(self.labels_mode, Unset): + labels_mode = self.labels_mode + issue_type: dict[str, Any] | Unset = UNSET if not isinstance(self.issue_type, Unset): issue_type = self.issue_type.to_dict() + 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 + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -93,8 +117,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["body"] = body if labels is not UNSET: field_dict["labels"] = labels + if labels_mode is not UNSET: + field_dict["labels_mode"] = labels_mode if issue_type is not UNSET: field_dict["issue_type"] = issue_type + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -137,6 +165,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: labels.append(labels_item) + _labels_mode = d.pop("labels_mode", UNSET) + labels_mode: UpdateGithubIssueTaskParamsLabelsMode | Unset + if isinstance(_labels_mode, Unset): + labels_mode = UNSET + else: + labels_mode = check_update_github_issue_task_params_labels_mode(_labels_mode) + _issue_type = d.pop("issue_type", UNSET) issue_type: UpdateGithubIssueTaskParamsIssueType | Unset if isinstance(_issue_type, Unset): @@ -144,6 +179,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: issue_type = UpdateGithubIssueTaskParamsIssueType.from_dict(_issue_type) + 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 | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + update_github_issue_task_params = cls( issue_id=issue_id, completion=completion, @@ -152,7 +196,9 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: title=title, body=body, labels=labels, + labels_mode=labels_mode, issue_type=issue_type, + custom_fields_mapping=custom_fields_mapping, ) 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 2aaafc3b..3b039bb8 100644 --- a/rootly_sdk/models/update_github_issue_task_params_completion.py +++ b/rootly_sdk/models/update_github_issue_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateGithubIssueTaskParamsCompletion") 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 index 2699f2b5..8dbffa9a 100644 --- a/rootly_sdk/models/update_github_issue_task_params_issue_type.py +++ b/rootly_sdk/models/update_github_issue_task_params_issue_type.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateGithubIssueTaskParamsIssueType") 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 index c905b808..c743d849 100644 --- a/rootly_sdk/models/update_github_issue_task_params_labels_item.py +++ b/rootly_sdk/models/update_github_issue_task_params_labels_item.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateGithubIssueTaskParamsLabelsItem") diff --git a/rootly_sdk/models/update_github_issue_task_params_labels_mode.py b/rootly_sdk/models/update_github_issue_task_params_labels_mode.py new file mode 100644 index 00000000..f304aa5f --- /dev/null +++ b/rootly_sdk/models/update_github_issue_task_params_labels_mode.py @@ -0,0 +1,20 @@ +from typing import Literal, cast + +UpdateGithubIssueTaskParamsLabelsMode = Literal["append", "replace"] + +UPDATE_GITHUB_ISSUE_TASK_PARAMS_LABELS_MODE_VALUES: set[UpdateGithubIssueTaskParamsLabelsMode] = { + "append", + "replace", +} + + +def check_update_github_issue_task_params_labels_mode( + value: str | None, +) -> UpdateGithubIssueTaskParamsLabelsMode | None: + if value is None: + return None + if value in UPDATE_GITHUB_ISSUE_TASK_PARAMS_LABELS_MODE_VALUES: + return cast(UpdateGithubIssueTaskParamsLabelsMode, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_GITHUB_ISSUE_TASK_PARAMS_LABELS_MODE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_github_issue_task_params_repository.py b/rootly_sdk/models/update_github_issue_task_params_repository.py index 541866c5..31cd26f1 100644 --- a/rootly_sdk/models/update_github_issue_task_params_repository.py +++ b/rootly_sdk/models/update_github_issue_task_params_repository.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateGithubIssueTaskParamsRepository") diff --git a/rootly_sdk/models/update_gitlab_issue_task_params.py b/rootly_sdk/models/update_gitlab_issue_task_params.py index 7261e458..7dc923fe 100644 --- a/rootly_sdk/models/update_gitlab_issue_task_params.py +++ b/rootly_sdk/models/update_gitlab_issue_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_gitlab_issue_task_params_issue_type import ( - UpdateGitlabIssueTaskParamsIssueType, - check_update_gitlab_issue_task_params_issue_type, -) -from ..models.update_gitlab_issue_task_params_task_type import ( - UpdateGitlabIssueTaskParamsTaskType, - check_update_gitlab_issue_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_gitlab_issue_task_params_issue_type import check_update_gitlab_issue_task_params_issue_type +from ..models.update_gitlab_issue_task_params_issue_type import UpdateGitlabIssueTaskParamsIssueType +from ..models.update_gitlab_issue_task_params_task_type import check_update_gitlab_issue_task_params_task_type +from ..models.update_gitlab_issue_task_params_task_type import UpdateGitlabIssueTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_gitlab_issue_task_params_completion import UpdateGitlabIssueTaskParamsCompletion @@ -48,6 +47,8 @@ class UpdateGitlabIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_gitlab_issue_task_params_completion import UpdateGitlabIssueTaskParamsCompletion + issue_id = self.issue_id completion = self.completion.to_dict() 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 0fef7627..672466c9 100644 --- a/rootly_sdk/models/update_gitlab_issue_task_params_completion.py +++ b/rootly_sdk/models/update_gitlab_issue_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateGitlabIssueTaskParamsCompletion") 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 d247ea44..dfad3ac2 100644 --- a/rootly_sdk/models/update_google_calendar_event_task_params.py +++ b/rootly_sdk/models/update_google_calendar_event_task_params.py @@ -1,20 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_google_calendar_event_task_params_conference_solution_key import ( - UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey, check_update_google_calendar_event_task_params_conference_solution_key, ) +from ..models.update_google_calendar_event_task_params_conference_solution_key import ( + UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey, +) from ..models.update_google_calendar_event_task_params_task_type import ( - UpdateGoogleCalendarEventTaskParamsTaskType, check_update_google_calendar_event_task_params_task_type, ) +from ..models.update_google_calendar_event_task_params_task_type import UpdateGoogleCalendarEventTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_google_calendar_event_task_params_post_to_slack_channels_item import ( @@ -69,6 +74,10 @@ class UpdateGoogleCalendarEventTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_google_calendar_event_task_params_post_to_slack_channels_item import ( + UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem, + ) + event_id = self.event_id task_type: str | Unset = UNSET 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 81404c8a..a8717249 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/update_google_chat_space_description_task_params.py b/rootly_sdk/models/update_google_chat_space_description_task_params.py new file mode 100644 index 00000000..25a773b5 --- /dev/null +++ b/rootly_sdk/models/update_google_chat_space_description_task_params.py @@ -0,0 +1,110 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_google_chat_space_description_task_params_task_type import ( + check_update_google_chat_space_description_task_params_task_type, +) +from ..models.update_google_chat_space_description_task_params_task_type import ( + UpdateGoogleChatSpaceDescriptionTaskParamsTaskType, +) +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.update_google_chat_space_description_task_params_space import ( + UpdateGoogleChatSpaceDescriptionTaskParamsSpace, + ) + + +T = TypeVar("T", bound="UpdateGoogleChatSpaceDescriptionTaskParams") + + +@_attrs_define +class UpdateGoogleChatSpaceDescriptionTaskParams: + """ + Attributes: + space (UpdateGoogleChatSpaceDescriptionTaskParamsSpace): + description (str): The space description. Supports liquid markup + task_type (UpdateGoogleChatSpaceDescriptionTaskParamsTaskType | Unset): + """ + + space: UpdateGoogleChatSpaceDescriptionTaskParamsSpace + description: str + task_type: UpdateGoogleChatSpaceDescriptionTaskParamsTaskType | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.update_google_chat_space_description_task_params_space import ( + UpdateGoogleChatSpaceDescriptionTaskParamsSpace, + ) + + space = self.space.to_dict() + + description = self.description + + task_type: str | Unset = UNSET + if not isinstance(self.task_type, Unset): + task_type = self.task_type + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "space": space, + "description": description, + } + ) + if task_type is not UNSET: + field_dict["task_type"] = task_type + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_google_chat_space_description_task_params_space import ( + UpdateGoogleChatSpaceDescriptionTaskParamsSpace, + ) + + d = dict(src_dict) + space = UpdateGoogleChatSpaceDescriptionTaskParamsSpace.from_dict(d.pop("space")) + + description = d.pop("description") + + _task_type = d.pop("task_type", UNSET) + task_type: UpdateGoogleChatSpaceDescriptionTaskParamsTaskType | Unset + if isinstance(_task_type, Unset): + task_type = UNSET + else: + task_type = check_update_google_chat_space_description_task_params_task_type(_task_type) + + update_google_chat_space_description_task_params = cls( + space=space, + description=description, + task_type=task_type, + ) + + update_google_chat_space_description_task_params.additional_properties = d + return update_google_chat_space_description_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/update_google_chat_space_description_task_params_space.py b/rootly_sdk/models/update_google_chat_space_description_task_params_space.py new file mode 100644 index 00000000..9cc0c3b4 --- /dev/null +++ b/rootly_sdk/models/update_google_chat_space_description_task_params_space.py @@ -0,0 +1,73 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="UpdateGoogleChatSpaceDescriptionTaskParamsSpace") + + +@_attrs_define +class UpdateGoogleChatSpaceDescriptionTaskParamsSpace: + """ + 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_google_chat_space_description_task_params_space = cls( + id=id, + name=name, + ) + + update_google_chat_space_description_task_params_space.additional_properties = d + return update_google_chat_space_description_task_params_space + + @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_google_chat_space_description_task_params_task_type.py b/rootly_sdk/models/update_google_chat_space_description_task_params_task_type.py new file mode 100644 index 00000000..32b9b84a --- /dev/null +++ b/rootly_sdk/models/update_google_chat_space_description_task_params_task_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateGoogleChatSpaceDescriptionTaskParamsTaskType = Literal["update_google_chat_space_description"] + +UPDATE_GOOGLE_CHAT_SPACE_DESCRIPTION_TASK_PARAMS_TASK_TYPE_VALUES: set[ + UpdateGoogleChatSpaceDescriptionTaskParamsTaskType +] = { + "update_google_chat_space_description", +} + + +def check_update_google_chat_space_description_task_params_task_type( + value: str | None, +) -> UpdateGoogleChatSpaceDescriptionTaskParamsTaskType | None: + if value is None: + return None + if value in UPDATE_GOOGLE_CHAT_SPACE_DESCRIPTION_TASK_PARAMS_TASK_TYPE_VALUES: + return cast(UpdateGoogleChatSpaceDescriptionTaskParamsTaskType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_GOOGLE_CHAT_SPACE_DESCRIPTION_TASK_PARAMS_TASK_TYPE_VALUES!r}" + ) 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 dda8547d..38a46427 100644 --- a/rootly_sdk/models/update_google_docs_page_task_params.py +++ b/rootly_sdk/models/update_google_docs_page_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_google_docs_page_task_params_task_type import ( - UpdateGoogleDocsPageTaskParamsTaskType, - check_update_google_docs_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_google_docs_page_task_params_task_type import check_update_google_docs_page_task_params_task_type +from ..models.update_google_docs_page_task_params_task_type import UpdateGoogleDocsPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateGoogleDocsPageTaskParams") @@ -25,6 +27,8 @@ class UpdateGoogleDocsPageTaskParams: 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. + include_overview (bool | Unset): Default: True. + include_timeline (bool | Unset): Default: True. """ file_id: str @@ -33,6 +37,8 @@ class UpdateGoogleDocsPageTaskParams: content: str | Unset = UNSET post_mortem_template_id: str | Unset = UNSET template_id: str | Unset = UNSET + include_overview: bool | Unset = True + include_timeline: bool | Unset = True additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: @@ -50,6 +56,10 @@ def to_dict(self) -> dict[str, Any]: template_id = self.template_id + include_overview = self.include_overview + + include_timeline = self.include_timeline + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -67,6 +77,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["post_mortem_template_id"] = post_mortem_template_id if template_id is not UNSET: field_dict["template_id"] = template_id + if include_overview is not UNSET: + field_dict["include_overview"] = include_overview + if include_timeline is not UNSET: + field_dict["include_timeline"] = include_timeline return field_dict @@ -90,6 +104,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: template_id = d.pop("template_id", UNSET) + include_overview = d.pop("include_overview", UNSET) + + include_timeline = d.pop("include_timeline", UNSET) + update_google_docs_page_task_params = cls( file_id=file_id, task_type=task_type, @@ -97,6 +115,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: content=content, post_mortem_template_id=post_mortem_template_id, template_id=template_id, + include_overview=include_overview, + include_timeline=include_timeline, ) update_google_docs_page_task_params.additional_properties = d diff --git a/rootly_sdk/models/update_heartbeat.py b/rootly_sdk/models/update_heartbeat.py index 6dd22e4b..42d8e0b9 100644 --- a/rootly_sdk/models/update_heartbeat.py +++ b/rootly_sdk/models/update_heartbeat.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_heartbeat_data import UpdateHeartbeatData @@ -24,6 +28,8 @@ class UpdateHeartbeat: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_heartbeat_data import UpdateHeartbeatData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_heartbeat_data.py b/rootly_sdk/models/update_heartbeat_data.py index 4d53bae8..9b4d3469 100644 --- a/rootly_sdk/models/update_heartbeat_data.py +++ b/rootly_sdk/models/update_heartbeat_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_heartbeat_data_type import UpdateHeartbeatDataType, check_update_heartbeat_data_type +from ..types import UNSET, Unset + +from ..models.update_heartbeat_data_type import check_update_heartbeat_data_type +from ..models.update_heartbeat_data_type import UpdateHeartbeatDataType +from typing import cast if TYPE_CHECKING: from ..models.update_heartbeat_data_attributes import UpdateHeartbeatDataAttributes @@ -28,6 +32,8 @@ class UpdateHeartbeatData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_heartbeat_data_attributes import UpdateHeartbeatDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_heartbeat_data_attributes.py b/rootly_sdk/models/update_heartbeat_data_attributes.py index e9d622cc..fd6f6d8c 100644 --- a/rootly_sdk/models/update_heartbeat_data_attributes.py +++ b/rootly_sdk/models/update_heartbeat_data_attributes.py @@ -1,19 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.update_heartbeat_data_attributes_interval_unit import ( - UpdateHeartbeatDataAttributesIntervalUnit, - check_update_heartbeat_data_attributes_interval_unit, +from ..types import UNSET, Unset + +from ..models.update_heartbeat_data_attributes_interval_unit import check_update_heartbeat_data_attributes_interval_unit +from ..models.update_heartbeat_data_attributes_interval_unit import UpdateHeartbeatDataAttributesIntervalUnit +from ..models.update_heartbeat_data_attributes_notification_target_type import ( + check_update_heartbeat_data_attributes_notification_target_type, ) from ..models.update_heartbeat_data_attributes_notification_target_type import ( UpdateHeartbeatDataAttributesNotificationTargetType, - check_update_heartbeat_data_attributes_notification_target_type, ) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateHeartbeatDataAttributes") @@ -32,6 +37,7 @@ class UpdateHeartbeatDataAttributes: 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. + owner_group_ids (list[str] | Unset): List of team IDs that own this heartbeat enabled (bool | Unset): Whether to trigger alerts when heartbeat is expired. """ @@ -44,6 +50,7 @@ class UpdateHeartbeatDataAttributes: interval_unit: UpdateHeartbeatDataAttributesIntervalUnit | Unset = UNSET notification_target_id: str | Unset = UNSET notification_target_type: UpdateHeartbeatDataAttributesNotificationTargetType | Unset = UNSET + owner_group_ids: list[str] | Unset = UNSET enabled: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: @@ -81,6 +88,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.notification_target_type, Unset): notification_target_type = self.notification_target_type + owner_group_ids: list[str] | Unset = UNSET + if not isinstance(self.owner_group_ids, Unset): + owner_group_ids = self.owner_group_ids + enabled = self.enabled field_dict: dict[str, Any] = {} @@ -104,6 +115,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["notification_target_id"] = notification_target_id if notification_target_type is not UNSET: field_dict["notification_target_type"] = notification_target_type + if owner_group_ids is not UNSET: + field_dict["owner_group_ids"] = owner_group_ids if enabled is not UNSET: field_dict["enabled"] = enabled @@ -163,6 +176,8 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset: _notification_target_type ) + owner_group_ids = cast(list[str], d.pop("owner_group_ids", UNSET)) + enabled = d.pop("enabled", UNSET) update_heartbeat_data_attributes = cls( @@ -175,6 +190,7 @@ def _parse_alert_urgency_id(data: object) -> None | str | Unset: interval_unit=interval_unit, notification_target_id=notification_target_id, notification_target_type=notification_target_type, + owner_group_ids=owner_group_ids, enabled=enabled, ) diff --git a/rootly_sdk/models/update_incident.py b/rootly_sdk/models/update_incident.py index c828a305..b9de7c1c 100644 --- a/rootly_sdk/models/update_incident.py +++ b/rootly_sdk/models/update_incident.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_data import UpdateIncidentData @@ -24,6 +28,8 @@ class UpdateIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_data import UpdateIncidentData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_action_item.py b/rootly_sdk/models/update_incident_action_item.py index 6c08a393..fbde4edf 100644 --- a/rootly_sdk/models/update_incident_action_item.py +++ b/rootly_sdk/models/update_incident_action_item.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_action_item_data import UpdateIncidentActionItemData @@ -24,6 +28,8 @@ class UpdateIncidentActionItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_action_item_data import UpdateIncidentActionItemData + data = self.data.to_dict() field_dict: 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 3ba8f526..478c6360 100644 --- a/rootly_sdk/models/update_incident_action_item_data.py +++ b/rootly_sdk/models/update_incident_action_item_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_action_item_data_type import ( - UpdateIncidentActionItemDataType, - check_update_incident_action_item_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_action_item_data_type import check_update_incident_action_item_data_type +from ..models.update_incident_action_item_data_type import UpdateIncidentActionItemDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_action_item_data_attributes import UpdateIncidentActionItemDataAttributes @@ -31,6 +32,8 @@ class UpdateIncidentActionItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_action_item_data_attributes import UpdateIncidentActionItemDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 e6ae6bd6..8fd5e855 100644 --- a/rootly_sdk/models/update_incident_action_item_data_attributes.py +++ b/rootly_sdk/models/update_incident_action_item_data_attributes.py @@ -1,23 +1,33 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_action_item_data_attributes_kind import ( - UpdateIncidentActionItemDataAttributesKind, check_update_incident_action_item_data_attributes_kind, ) +from ..models.update_incident_action_item_data_attributes_kind import UpdateIncidentActionItemDataAttributesKind from ..models.update_incident_action_item_data_attributes_priority import ( - UpdateIncidentActionItemDataAttributesPriority, check_update_incident_action_item_data_attributes_priority, ) +from ..models.update_incident_action_item_data_attributes_priority import UpdateIncidentActionItemDataAttributesPriority from ..models.update_incident_action_item_data_attributes_status import ( - UpdateIncidentActionItemDataAttributesStatus, check_update_incident_action_item_data_attributes_status, ) +from ..models.update_incident_action_item_data_attributes_status import UpdateIncidentActionItemDataAttributesStatus from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.update_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + T = TypeVar("T", bound="UpdateIncidentActionItemDataAttributes") @@ -37,6 +47,9 @@ class UpdateIncidentActionItemDataAttributes: 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. + form_field_selections (list[UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset): + Custom field values to set on the action item. Ignored unless custom fields for action items are enabled for the + organization. """ summary: str | Unset = UNSET @@ -50,8 +63,15 @@ class UpdateIncidentActionItemDataAttributes: jira_issue_id: None | str | Unset = UNSET jira_issue_key: None | str | Unset = UNSET jira_issue_url: None | str | Unset = UNSET + form_field_selections: list[UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset = ( + UNSET + ) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + summary = self.summary description: None | str | Unset @@ -111,6 +131,18 @@ def to_dict(self) -> dict[str, Any]: else: jira_issue_url = self.jira_issue_url + form_field_selections: list[dict[str, Any]] | None | Unset + if isinstance(self.form_field_selections, Unset): + form_field_selections = UNSET + elif isinstance(self.form_field_selections, list): + form_field_selections = [] + for form_field_selections_type_0_item_data in self.form_field_selections: + form_field_selections_type_0_item = form_field_selections_type_0_item_data.to_dict() + form_field_selections.append(form_field_selections_type_0_item) + + else: + form_field_selections = self.form_field_selections + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -136,11 +168,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["jira_issue_key"] = jira_issue_key if jira_issue_url is not UNSET: field_dict["jira_issue_url"] = jira_issue_url + if form_field_selections is not UNSET: + field_dict["form_field_selections"] = form_field_selections return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_incident_action_item_data_attributes_form_field_selections_type_0_item import ( + UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item, + ) + d = dict(src_dict) summary = d.pop("summary", UNSET) @@ -236,6 +274,34 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_url = _parse_jira_issue_url(d.pop("jira_issue_url", UNSET)) + def _parse_form_field_selections( + data: object, + ) -> list[UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + form_field_selections_type_0 = [] + _form_field_selections_type_0 = data + for form_field_selections_type_0_item_data in _form_field_selections_type_0: + form_field_selections_type_0_item = ( + UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item.from_dict( + form_field_selections_type_0_item_data + ) + ) + + form_field_selections_type_0.append(form_field_selections_type_0_item) + + return form_field_selections_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset, data) + + form_field_selections = _parse_form_field_selections(d.pop("form_field_selections", UNSET)) + update_incident_action_item_data_attributes = cls( summary=summary, description=description, @@ -248,6 +314,7 @@ def _parse_jira_issue_url(data: object) -> None | str | Unset: jira_issue_id=jira_issue_id, jira_issue_key=jira_issue_key, jira_issue_url=jira_issue_url, + form_field_selections=form_field_selections, ) return update_incident_action_item_data_attributes diff --git a/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py b/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py new file mode 100644 index 00000000..0f68505a --- /dev/null +++ b/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py @@ -0,0 +1,209 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item") + + +@_attrs_define +class UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item: + """ + Attributes: + form_field_id (str): ID of the custom field + id (str | Unset): ID of an existing selection. Required when updating or removing a field's existing value. + value (list[str] | None | str | Unset): Value for text, textarea, rich text, date, datetime, number, checkbox, + or tag fields + selected_option_ids (list[str] | Unset): IDs of the selected custom field options + selected_user_ids (list[int] | Unset): IDs of the selected users + selected_group_ids (list[str] | Unset): IDs of the selected teams + selected_service_ids (list[str] | Unset): IDs of the selected services + selected_functionality_ids (list[str] | Unset): IDs of the selected functionalities + selected_catalog_entity_ids (list[str] | Unset): IDs of the selected catalog entities + selected_environment_ids (list[str] | Unset): IDs of the selected environments + selected_cause_ids (list[str] | Unset): IDs of the selected causes + selected_incident_type_ids (list[str] | Unset): IDs of the selected incident types + field_destroy (bool | None | Unset): Set to true to remove the field's value from the action item + """ + + form_field_id: str + id: str | Unset = UNSET + value: list[str] | None | str | Unset = UNSET + selected_option_ids: list[str] | Unset = UNSET + selected_user_ids: list[int] | Unset = UNSET + selected_group_ids: list[str] | Unset = UNSET + selected_service_ids: list[str] | Unset = UNSET + selected_functionality_ids: list[str] | Unset = UNSET + selected_catalog_entity_ids: list[str] | Unset = UNSET + selected_environment_ids: list[str] | Unset = UNSET + selected_cause_ids: list[str] | Unset = UNSET + selected_incident_type_ids: list[str] | Unset = UNSET + field_destroy: bool | None | Unset = UNSET + + def to_dict(self) -> dict[str, Any]: + form_field_id = self.form_field_id + + id = self.id + + value: list[str] | None | str | Unset + if isinstance(self.value, Unset): + value = UNSET + elif isinstance(self.value, list): + value = self.value + + else: + value = self.value + + selected_option_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_option_ids, Unset): + selected_option_ids = self.selected_option_ids + + selected_user_ids: list[int] | Unset = UNSET + if not isinstance(self.selected_user_ids, Unset): + selected_user_ids = self.selected_user_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_service_ids, Unset): + selected_service_ids = self.selected_service_ids + + selected_functionality_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_functionality_ids, Unset): + selected_functionality_ids = self.selected_functionality_ids + + 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_environment_ids: list[str] | Unset = UNSET + if not isinstance(self.selected_environment_ids, Unset): + selected_environment_ids = self.selected_environment_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_incident_type_ids, Unset): + selected_incident_type_ids = self.selected_incident_type_ids + + field_destroy: bool | None | Unset + if isinstance(self.field_destroy, Unset): + field_destroy = UNSET + else: + field_destroy = self.field_destroy + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "form_field_id": form_field_id, + } + ) + if id is not UNSET: + field_dict["id"] = id + if value is not UNSET: + field_dict["value"] = value + if selected_option_ids is not UNSET: + field_dict["selected_option_ids"] = selected_option_ids + if selected_user_ids is not UNSET: + field_dict["selected_user_ids"] = selected_user_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_catalog_entity_ids is not UNSET: + field_dict["selected_catalog_entity_ids"] = selected_catalog_entity_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + if field_destroy is not UNSET: + field_dict["_destroy"] = field_destroy + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + form_field_id = d.pop("form_field_id") + + id = d.pop("id", UNSET) + + def _parse_value(data: object) -> list[str] | None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + try: + if not isinstance(data, list): + raise TypeError() + value_type_1 = cast(list[str], data) + + return value_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(list[str] | None | str | Unset, data) + + value = _parse_value(d.pop("value", UNSET)) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids", UNSET)) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + def _parse_field_destroy(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + field_destroy = _parse_field_destroy(d.pop("_destroy", UNSET)) + + update_incident_action_item_data_attributes_form_field_selections_type_0_item = cls( + form_field_id=form_field_id, + id=id, + value=value, + selected_option_ids=selected_option_ids, + selected_user_ids=selected_user_ids, + selected_group_ids=selected_group_ids, + selected_service_ids=selected_service_ids, + selected_functionality_ids=selected_functionality_ids, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_environment_ids=selected_environment_ids, + selected_cause_ids=selected_cause_ids, + selected_incident_type_ids=selected_incident_type_ids, + field_destroy=field_destroy, + ) + + return update_incident_action_item_data_attributes_form_field_selections_type_0_item diff --git a/rootly_sdk/models/update_incident_custom_field_selection.py b/rootly_sdk/models/update_incident_custom_field_selection.py index ef1e2eb9..7843aaa1 100644 --- a/rootly_sdk/models/update_incident_custom_field_selection.py +++ b/rootly_sdk/models/update_incident_custom_field_selection.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_custom_field_selection_data import UpdateIncidentCustomFieldSelectionData @@ -24,6 +28,8 @@ class UpdateIncidentCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_custom_field_selection_data import UpdateIncidentCustomFieldSelectionData + data = self.data.to_dict() field_dict: 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 80553b9b..45e4a956 100644 --- a/rootly_sdk/models/update_incident_custom_field_selection_data.py +++ b/rootly_sdk/models/update_incident_custom_field_selection_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_incident_custom_field_selection_data_type import ( - UpdateIncidentCustomFieldSelectionDataType, check_update_incident_custom_field_selection_data_type, ) +from ..models.update_incident_custom_field_selection_data_type import UpdateIncidentCustomFieldSelectionDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_custom_field_selection_data_attributes import ( @@ -33,6 +36,10 @@ class UpdateIncidentCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_custom_field_selection_data_attributes import ( + UpdateIncidentCustomFieldSelectionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 04f6d0da..351f054f 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,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateIncidentCustomFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/update_incident_data.py b/rootly_sdk/models/update_incident_data.py index 6281026a..f5c72674 100644 --- a/rootly_sdk/models/update_incident_data.py +++ b/rootly_sdk/models/update_incident_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_data_type import UpdateIncidentDataType, check_update_incident_data_type +from ..types import UNSET, Unset + +from ..models.update_incident_data_type import check_update_incident_data_type +from ..models.update_incident_data_type import UpdateIncidentDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_data_attributes import UpdateIncidentDataAttributes @@ -28,6 +32,8 @@ class UpdateIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_data_attributes import UpdateIncidentDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_data_attributes.py b/rootly_sdk/models/update_incident_data_attributes.py index b92c2028..d97309c1 100644 --- a/rootly_sdk/models/update_incident_data_attributes.py +++ b/rootly_sdk/models/update_incident_data_attributes.py @@ -1,20 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.update_incident_data_attributes_kind import ( - UpdateIncidentDataAttributesKind, - check_update_incident_data_attributes_kind, -) -from ..models.update_incident_data_attributes_status import ( - UpdateIncidentDataAttributesStatus, - check_update_incident_data_attributes_status, -) from ..types import UNSET, Unset +from ..models.update_incident_data_attributes_kind import check_update_incident_data_attributes_kind +from ..models.update_incident_data_attributes_kind import UpdateIncidentDataAttributesKind +from ..models.update_incident_data_attributes_status import check_update_incident_data_attributes_status +from ..models.update_incident_data_attributes_status import UpdateIncidentDataAttributesStatus +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_data_attributes_labels_type_0 import UpdateIncidentDataAttributesLabelsType0 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 3bbf882a..01f3f5d1 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateIncidentDataAttributesLabelsType0") diff --git a/rootly_sdk/models/update_incident_event.py b/rootly_sdk/models/update_incident_event.py index 10c6307f..46757822 100644 --- a/rootly_sdk/models/update_incident_event.py +++ b/rootly_sdk/models/update_incident_event.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_event_data import UpdateIncidentEventData @@ -24,6 +28,8 @@ class UpdateIncidentEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_event_data import UpdateIncidentEventData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_event_data.py b/rootly_sdk/models/update_incident_event_data.py index 0c2e4971..bff767fa 100644 --- a/rootly_sdk/models/update_incident_event_data.py +++ b/rootly_sdk/models/update_incident_event_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_event_data_type import UpdateIncidentEventDataType, check_update_incident_event_data_type +from ..types import UNSET, Unset + +from ..models.update_incident_event_data_type import check_update_incident_event_data_type +from ..models.update_incident_event_data_type import UpdateIncidentEventDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_event_data_attributes import UpdateIncidentEventDataAttributes @@ -28,6 +32,8 @@ class UpdateIncidentEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_event_data_attributes import UpdateIncidentEventDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_event_data_attributes.py b/rootly_sdk/models/update_incident_event_data_attributes.py index 1d966e3c..6434ad59 100644 --- a/rootly_sdk/models/update_incident_event_data_attributes.py +++ b/rootly_sdk/models/update_incident_event_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_event_data_attributes_visibility import ( - UpdateIncidentEventDataAttributesVisibility, check_update_incident_event_data_attributes_visibility, ) +from ..models.update_incident_event_data_attributes_visibility import UpdateIncidentEventDataAttributesVisibility from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateIncidentEventDataAttributes") diff --git a/rootly_sdk/models/update_incident_event_functionality.py b/rootly_sdk/models/update_incident_event_functionality.py index 4deb6dda..aa831e1e 100644 --- a/rootly_sdk/models/update_incident_event_functionality.py +++ b/rootly_sdk/models/update_incident_event_functionality.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_event_functionality_data import UpdateIncidentEventFunctionalityData @@ -24,6 +28,8 @@ class UpdateIncidentEventFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_event_functionality_data import UpdateIncidentEventFunctionalityData + data = self.data.to_dict() field_dict: 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 cf85c901..a3279389 100644 --- a/rootly_sdk/models/update_incident_event_functionality_data.py +++ b/rootly_sdk/models/update_incident_event_functionality_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_event_functionality_data_type import ( - UpdateIncidentEventFunctionalityDataType, - check_update_incident_event_functionality_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_event_functionality_data_type import check_update_incident_event_functionality_data_type +from ..models.update_incident_event_functionality_data_type import UpdateIncidentEventFunctionalityDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_event_functionality_data_attributes import ( @@ -33,6 +34,10 @@ class UpdateIncidentEventFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_event_functionality_data_attributes import ( + UpdateIncidentEventFunctionalityDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 3dd37190..48f6f90f 100644 --- a/rootly_sdk/models/update_incident_event_functionality_data_attributes.py +++ b/rootly_sdk/models/update_incident_event_functionality_data_attributes.py @@ -1,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_event_functionality_data_attributes_status import ( - UpdateIncidentEventFunctionalityDataAttributesStatus, check_update_incident_event_functionality_data_attributes_status, ) +from ..models.update_incident_event_functionality_data_attributes_status import ( + UpdateIncidentEventFunctionalityDataAttributesStatus, +) +from typing import cast + T = TypeVar("T", bound="UpdateIncidentEventFunctionalityDataAttributes") diff --git a/rootly_sdk/models/update_incident_event_service.py b/rootly_sdk/models/update_incident_event_service.py index 23c734b4..8797d4a8 100644 --- a/rootly_sdk/models/update_incident_event_service.py +++ b/rootly_sdk/models/update_incident_event_service.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_event_service_data import UpdateIncidentEventServiceData @@ -24,6 +28,8 @@ class UpdateIncidentEventService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_event_service_data import UpdateIncidentEventServiceData + data = self.data.to_dict() field_dict: 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 1ea0d258..fa830597 100644 --- a/rootly_sdk/models/update_incident_event_service_data.py +++ b/rootly_sdk/models/update_incident_event_service_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_event_service_data_type import ( - UpdateIncidentEventServiceDataType, - check_update_incident_event_service_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_event_service_data_type import check_update_incident_event_service_data_type +from ..models.update_incident_event_service_data_type import UpdateIncidentEventServiceDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_event_service_data_attributes import UpdateIncidentEventServiceDataAttributes @@ -31,6 +32,8 @@ class UpdateIncidentEventServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_event_service_data_attributes import UpdateIncidentEventServiceDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 d5f3207b..db2e3830 100644 --- a/rootly_sdk/models/update_incident_event_service_data_attributes.py +++ b/rootly_sdk/models/update_incident_event_service_data_attributes.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_event_service_data_attributes_status import ( - UpdateIncidentEventServiceDataAttributesStatus, check_update_incident_event_service_data_attributes_status, ) +from ..models.update_incident_event_service_data_attributes_status import UpdateIncidentEventServiceDataAttributesStatus +from typing import cast + T = TypeVar("T", bound="UpdateIncidentEventServiceDataAttributes") diff --git a/rootly_sdk/models/update_incident_feedback.py b/rootly_sdk/models/update_incident_feedback.py index 14ffe711..2505c689 100644 --- a/rootly_sdk/models/update_incident_feedback.py +++ b/rootly_sdk/models/update_incident_feedback.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_feedback_data import UpdateIncidentFeedbackData @@ -24,6 +28,8 @@ class UpdateIncidentFeedback: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_feedback_data import UpdateIncidentFeedbackData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_feedback_data.py b/rootly_sdk/models/update_incident_feedback_data.py index fcb15b1a..52e43e9e 100644 --- a/rootly_sdk/models/update_incident_feedback_data.py +++ b/rootly_sdk/models/update_incident_feedback_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_feedback_data_type import ( - UpdateIncidentFeedbackDataType, - check_update_incident_feedback_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_feedback_data_type import check_update_incident_feedback_data_type +from ..models.update_incident_feedback_data_type import UpdateIncidentFeedbackDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_feedback_data_attributes import UpdateIncidentFeedbackDataAttributes @@ -31,6 +32,8 @@ class UpdateIncidentFeedbackData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_feedback_data_attributes import UpdateIncidentFeedbackDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_feedback_data_attributes.py b/rootly_sdk/models/update_incident_feedback_data_attributes.py index 4d9558c6..594c8ea5 100644 --- a/rootly_sdk/models/update_incident_feedback_data_attributes.py +++ b/rootly_sdk/models/update_incident_feedback_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_feedback_data_attributes_rating import ( - UpdateIncidentFeedbackDataAttributesRating, check_update_incident_feedback_data_attributes_rating, ) +from ..models.update_incident_feedback_data_attributes_rating import UpdateIncidentFeedbackDataAttributesRating from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateIncidentFeedbackDataAttributes") diff --git a/rootly_sdk/models/update_incident_form_field_selection.py b/rootly_sdk/models/update_incident_form_field_selection.py index 618bdb8b..8708f9eb 100644 --- a/rootly_sdk/models/update_incident_form_field_selection.py +++ b/rootly_sdk/models/update_incident_form_field_selection.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_form_field_selection_data import UpdateIncidentFormFieldSelectionData @@ -24,6 +28,8 @@ class UpdateIncidentFormFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_form_field_selection_data import UpdateIncidentFormFieldSelectionData + data = self.data.to_dict() field_dict: 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 45e73e78..35e70a04 100644 --- a/rootly_sdk/models/update_incident_form_field_selection_data.py +++ b/rootly_sdk/models/update_incident_form_field_selection_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_form_field_selection_data_type import ( - UpdateIncidentFormFieldSelectionDataType, - check_update_incident_form_field_selection_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_form_field_selection_data_type import check_update_incident_form_field_selection_data_type +from ..models.update_incident_form_field_selection_data_type import UpdateIncidentFormFieldSelectionDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_form_field_selection_data_attributes import ( @@ -33,6 +34,10 @@ class UpdateIncidentFormFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_form_field_selection_data_attributes import ( + UpdateIncidentFormFieldSelectionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 db5ea2f0..1ed7da7d 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,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateIncidentFormFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/update_incident_permission_set.py b/rootly_sdk/models/update_incident_permission_set.py index 01646aa5..5e516d90 100644 --- a/rootly_sdk/models/update_incident_permission_set.py +++ b/rootly_sdk/models/update_incident_permission_set.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_permission_set_data import UpdateIncidentPermissionSetData @@ -24,6 +28,8 @@ class UpdateIncidentPermissionSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_permission_set_data import UpdateIncidentPermissionSetData + data = self.data.to_dict() field_dict: 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 6ae0bfb3..d3f9b396 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_permission_set_boolean_data import UpdateIncidentPermissionSetBooleanData @@ -24,6 +28,8 @@ class UpdateIncidentPermissionSetBoolean: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_permission_set_boolean_data import UpdateIncidentPermissionSetBooleanData + data = self.data.to_dict() field_dict: 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 653d35ca..d76fed79 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean_data.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_incident_permission_set_boolean_data_type import ( - UpdateIncidentPermissionSetBooleanDataType, check_update_incident_permission_set_boolean_data_type, ) +from ..models.update_incident_permission_set_boolean_data_type import UpdateIncidentPermissionSetBooleanDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_permission_set_boolean_data_attributes import ( @@ -33,6 +36,10 @@ class UpdateIncidentPermissionSetBooleanData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_permission_set_boolean_data_attributes import ( + UpdateIncidentPermissionSetBooleanDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 51bc6a2a..f626ca0a 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_permission_set_boolean_data_attributes_kind import ( - UpdateIncidentPermissionSetBooleanDataAttributesKind, check_update_incident_permission_set_boolean_data_attributes_kind, ) +from ..models.update_incident_permission_set_boolean_data_attributes_kind import ( + UpdateIncidentPermissionSetBooleanDataAttributesKind, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_incident_permission_set_boolean_data_attributes_severity_params import ( @@ -36,6 +42,10 @@ class UpdateIncidentPermissionSetBooleanDataAttributes: severity_params: UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_permission_set_boolean_data_attributes_severity_params import ( + UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams, + ) + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind 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 15818ae2..b77f7687 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams") diff --git a/rootly_sdk/models/update_incident_permission_set_data.py b/rootly_sdk/models/update_incident_permission_set_data.py index 0b59cba4..8e2ff7a1 100644 --- a/rootly_sdk/models/update_incident_permission_set_data.py +++ b/rootly_sdk/models/update_incident_permission_set_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_permission_set_data_type import ( - UpdateIncidentPermissionSetDataType, - check_update_incident_permission_set_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_permission_set_data_type import check_update_incident_permission_set_data_type +from ..models.update_incident_permission_set_data_type import UpdateIncidentPermissionSetDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_permission_set_data_attributes import UpdateIncidentPermissionSetDataAttributes @@ -31,6 +32,8 @@ class UpdateIncidentPermissionSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_permission_set_data_attributes import UpdateIncidentPermissionSetDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 f084f371..7efe2fe2 100644 --- a/rootly_sdk/models/update_incident_permission_set_data_attributes.py +++ b/rootly_sdk/models/update_incident_permission_set_data_attributes.py @@ -1,19 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_permission_set_data_attributes_private_incident_permissions_item import ( - UpdateIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem, check_update_incident_permission_set_data_attributes_private_incident_permissions_item, ) +from ..models.update_incident_permission_set_data_attributes_private_incident_permissions_item import ( + UpdateIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem, +) from ..models.update_incident_permission_set_data_attributes_public_incident_permissions_item import ( - UpdateIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem, check_update_incident_permission_set_data_attributes_public_incident_permissions_item, ) +from ..models.update_incident_permission_set_data_attributes_public_incident_permissions_item import ( + UpdateIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateIncidentPermissionSetDataAttributes") diff --git a/rootly_sdk/models/update_incident_permission_set_resource.py b/rootly_sdk/models/update_incident_permission_set_resource.py index 6d8dbb88..964d5745 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource.py +++ b/rootly_sdk/models/update_incident_permission_set_resource.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_permission_set_resource_data import UpdateIncidentPermissionSetResourceData @@ -24,6 +28,8 @@ class UpdateIncidentPermissionSetResource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_permission_set_resource_data import UpdateIncidentPermissionSetResourceData + data = self.data.to_dict() field_dict: 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 23a5d8fc..78d0aa6b 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource_data.py +++ b/rootly_sdk/models/update_incident_permission_set_resource_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_incident_permission_set_resource_data_type import ( - UpdateIncidentPermissionSetResourceDataType, check_update_incident_permission_set_resource_data_type, ) +from ..models.update_incident_permission_set_resource_data_type import UpdateIncidentPermissionSetResourceDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_permission_set_resource_data_attributes import ( @@ -33,6 +36,10 @@ class UpdateIncidentPermissionSetResourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_permission_set_resource_data_attributes import ( + UpdateIncidentPermissionSetResourceDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 f47741a6..7b9021a3 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_permission_set_resource_data_attributes_kind import ( - UpdateIncidentPermissionSetResourceDataAttributesKind, check_update_incident_permission_set_resource_data_attributes_kind, ) +from ..models.update_incident_permission_set_resource_data_attributes_kind import ( + UpdateIncidentPermissionSetResourceDataAttributesKind, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_incident_permission_set_resource_data_attributes_severity_params import ( @@ -38,6 +44,10 @@ class UpdateIncidentPermissionSetResourceDataAttributes: severity_params: UpdateIncidentPermissionSetResourceDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_permission_set_resource_data_attributes_severity_params import ( + UpdateIncidentPermissionSetResourceDataAttributesSeverityParams, + ) + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind 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 68d171f5..37b9b550 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,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateIncidentPermissionSetResourceDataAttributesSeverityParams") diff --git a/rootly_sdk/models/update_incident_post_mortem.py b/rootly_sdk/models/update_incident_post_mortem.py index 8e6878f2..81fff518 100644 --- a/rootly_sdk/models/update_incident_post_mortem.py +++ b/rootly_sdk/models/update_incident_post_mortem.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_post_mortem_data import UpdateIncidentPostMortemData @@ -24,6 +28,8 @@ class UpdateIncidentPostMortem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_post_mortem_data import UpdateIncidentPostMortemData + data = self.data.to_dict() field_dict: 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 5db885c3..88c9abdb 100644 --- a/rootly_sdk/models/update_incident_post_mortem_data.py +++ b/rootly_sdk/models/update_incident_post_mortem_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_post_mortem_data_type import ( - UpdateIncidentPostMortemDataType, - check_update_incident_post_mortem_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_post_mortem_data_type import check_update_incident_post_mortem_data_type +from ..models.update_incident_post_mortem_data_type import UpdateIncidentPostMortemDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_post_mortem_data_attributes import UpdateIncidentPostMortemDataAttributes @@ -31,6 +32,8 @@ class UpdateIncidentPostMortemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_post_mortem_data_attributes import UpdateIncidentPostMortemDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 d251d7ec..d1a7429d 100644 --- a/rootly_sdk/models/update_incident_post_mortem_data_attributes.py +++ b/rootly_sdk/models/update_incident_post_mortem_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_post_mortem_data_attributes_status import ( - UpdateIncidentPostMortemDataAttributesStatus, check_update_incident_post_mortem_data_attributes_status, ) +from ..models.update_incident_post_mortem_data_attributes_status import UpdateIncidentPostMortemDataAttributesStatus from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateIncidentPostMortemDataAttributes") diff --git a/rootly_sdk/models/update_incident_postmortem_task_params.py b/rootly_sdk/models/update_incident_postmortem_task_params.py index 5a56484c..0d787d0a 100644 --- a/rootly_sdk/models/update_incident_postmortem_task_params.py +++ b/rootly_sdk/models/update_incident_postmortem_task_params.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_incident_postmortem_task_params_task_type import ( - UpdateIncidentPostmortemTaskParamsTaskType, check_update_incident_postmortem_task_params_task_type, ) +from ..models.update_incident_postmortem_task_params_task_type import UpdateIncidentPostmortemTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateIncidentPostmortemTaskParams") diff --git a/rootly_sdk/models/update_incident_retrospective_step.py b/rootly_sdk/models/update_incident_retrospective_step.py index 995c4650..f9e0ca59 100644 --- a/rootly_sdk/models/update_incident_retrospective_step.py +++ b/rootly_sdk/models/update_incident_retrospective_step.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_retrospective_step_data import UpdateIncidentRetrospectiveStepData @@ -24,6 +28,8 @@ class UpdateIncidentRetrospectiveStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_retrospective_step_data import UpdateIncidentRetrospectiveStepData + data = self.data.to_dict() field_dict: 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 86de0c1f..f5913c59 100644 --- a/rootly_sdk/models/update_incident_retrospective_step_data.py +++ b/rootly_sdk/models/update_incident_retrospective_step_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_retrospective_step_data_type import ( - UpdateIncidentRetrospectiveStepDataType, - check_update_incident_retrospective_step_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_retrospective_step_data_type import check_update_incident_retrospective_step_data_type +from ..models.update_incident_retrospective_step_data_type import UpdateIncidentRetrospectiveStepDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_retrospective_step_data_attributes import ( @@ -33,6 +34,10 @@ class UpdateIncidentRetrospectiveStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_retrospective_step_data_attributes import ( + UpdateIncidentRetrospectiveStepDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 f9ada1a8..f8da9c7c 100644 --- a/rootly_sdk/models/update_incident_retrospective_step_data_attributes.py +++ b/rootly_sdk/models/update_incident_retrospective_step_data_attributes.py @@ -1,15 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_retrospective_step_data_attributes_status import ( - UpdateIncidentRetrospectiveStepDataAttributesStatus, check_update_incident_retrospective_step_data_attributes_status, ) +from ..models.update_incident_retrospective_step_data_attributes_status import ( + UpdateIncidentRetrospectiveStepDataAttributesStatus, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateIncidentRetrospectiveStepDataAttributes") diff --git a/rootly_sdk/models/update_incident_role.py b/rootly_sdk/models/update_incident_role.py index def8f62b..6e94fc70 100644 --- a/rootly_sdk/models/update_incident_role.py +++ b/rootly_sdk/models/update_incident_role.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_role_data import UpdateIncidentRoleData @@ -24,6 +28,8 @@ class UpdateIncidentRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_role_data import UpdateIncidentRoleData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_role_data.py b/rootly_sdk/models/update_incident_role_data.py index ceacc331..586a64b8 100644 --- a/rootly_sdk/models/update_incident_role_data.py +++ b/rootly_sdk/models/update_incident_role_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_role_data_type import UpdateIncidentRoleDataType, check_update_incident_role_data_type +from ..types import UNSET, Unset + +from ..models.update_incident_role_data_type import check_update_incident_role_data_type +from ..models.update_incident_role_data_type import UpdateIncidentRoleDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_role_data_attributes import UpdateIncidentRoleDataAttributes @@ -28,6 +32,8 @@ class UpdateIncidentRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_role_data_attributes import UpdateIncidentRoleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_role_data_attributes.py b/rootly_sdk/models/update_incident_role_data_attributes.py index fdac0c55..e9e09b8a 100644 --- a/rootly_sdk/models/update_incident_role_data_attributes.py +++ b/rootly_sdk/models/update_incident_role_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateIncidentRoleDataAttributes") diff --git a/rootly_sdk/models/update_incident_role_task.py b/rootly_sdk/models/update_incident_role_task.py index 74a9c2ef..8726d317 100644 --- a/rootly_sdk/models/update_incident_role_task.py +++ b/rootly_sdk/models/update_incident_role_task.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_role_task_data import UpdateIncidentRoleTaskData @@ -24,6 +28,8 @@ class UpdateIncidentRoleTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_role_task_data import UpdateIncidentRoleTaskData + data = self.data.to_dict() field_dict: 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 3ab56f62..be66c068 100644 --- a/rootly_sdk/models/update_incident_role_task_data.py +++ b/rootly_sdk/models/update_incident_role_task_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_role_task_data_type import ( - UpdateIncidentRoleTaskDataType, - check_update_incident_role_task_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_role_task_data_type import check_update_incident_role_task_data_type +from ..models.update_incident_role_task_data_type import UpdateIncidentRoleTaskDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_role_task_data_attributes import UpdateIncidentRoleTaskDataAttributes @@ -31,6 +32,8 @@ class UpdateIncidentRoleTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_role_task_data_attributes import UpdateIncidentRoleTaskDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 2fda2b91..4d355785 100644 --- a/rootly_sdk/models/update_incident_role_task_data_attributes.py +++ b/rootly_sdk/models/update_incident_role_task_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_role_task_data_attributes_priority import ( - UpdateIncidentRoleTaskDataAttributesPriority, check_update_incident_role_task_data_attributes_priority, ) +from ..models.update_incident_role_task_data_attributes_priority import UpdateIncidentRoleTaskDataAttributesPriority from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateIncidentRoleTaskDataAttributes") diff --git a/rootly_sdk/models/update_incident_status_page_event.py b/rootly_sdk/models/update_incident_status_page_event.py index 8a46a60d..edfc77f2 100644 --- a/rootly_sdk/models/update_incident_status_page_event.py +++ b/rootly_sdk/models/update_incident_status_page_event.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_status_page_event_data import UpdateIncidentStatusPageEventData @@ -24,6 +28,8 @@ class UpdateIncidentStatusPageEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_status_page_event_data import UpdateIncidentStatusPageEventData + data = self.data.to_dict() field_dict: 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 d0aaae07..086df915 100644 --- a/rootly_sdk/models/update_incident_status_page_event_data.py +++ b/rootly_sdk/models/update_incident_status_page_event_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_status_page_event_data_type import ( - UpdateIncidentStatusPageEventDataType, - check_update_incident_status_page_event_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_status_page_event_data_type import check_update_incident_status_page_event_data_type +from ..models.update_incident_status_page_event_data_type import UpdateIncidentStatusPageEventDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_status_page_event_data_attributes import UpdateIncidentStatusPageEventDataAttributes @@ -31,6 +32,10 @@ class UpdateIncidentStatusPageEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_status_page_event_data_attributes import ( + UpdateIncidentStatusPageEventDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 9fd6247f..5af13f9d 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,15 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_incident_status_page_event_data_attributes_status import ( - UpdateIncidentStatusPageEventDataAttributesStatus, check_update_incident_status_page_event_data_attributes_status, ) +from ..models.update_incident_status_page_event_data_attributes_status import ( + UpdateIncidentStatusPageEventDataAttributesStatus, +) from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="UpdateIncidentStatusPageEventDataAttributes") @@ -24,6 +33,7 @@ class UpdateIncidentStatusPageEventDataAttributes: 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. + started_at (datetime.datetime | None | Unset): When the event started. """ event: str | Unset = UNSET @@ -31,6 +41,7 @@ class UpdateIncidentStatusPageEventDataAttributes: status: UpdateIncidentStatusPageEventDataAttributesStatus | Unset = UNSET notify_subscribers: bool | None | Unset = False should_tweet: bool | None | Unset = False + started_at: datetime.datetime | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: event = self.event @@ -53,6 +64,14 @@ def to_dict(self) -> dict[str, Any]: else: should_tweet = self.should_tweet + 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 + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -66,6 +85,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["notify_subscribers"] = notify_subscribers if should_tweet is not UNSET: field_dict["should_tweet"] = should_tweet + if started_at is not UNSET: + field_dict["started_at"] = started_at return field_dict @@ -101,12 +122,30 @@ def _parse_should_tweet(data: object) -> bool | None | Unset: should_tweet = _parse_should_tweet(d.pop("should_tweet", UNSET)) + 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)) + update_incident_status_page_event_data_attributes = cls( event=event, status_page_id=status_page_id, status=status, notify_subscribers=notify_subscribers, should_tweet=should_tweet, + started_at=started_at, ) return update_incident_status_page_event_data_attributes 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 552fe4a7..97056637 100644 --- a/rootly_sdk/models/update_incident_status_timestamp_task_params.py +++ b/rootly_sdk/models/update_incident_status_timestamp_task_params.py @@ -1,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_incident_status_timestamp_task_params_task_type import ( - UpdateIncidentStatusTimestampTaskParamsTaskType, check_update_incident_status_timestamp_task_params_task_type, ) +from ..models.update_incident_status_timestamp_task_params_task_type import ( + UpdateIncidentStatusTimestampTaskParamsTaskType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateIncidentStatusTimestampTaskParams") diff --git a/rootly_sdk/models/update_incident_sub_status.py b/rootly_sdk/models/update_incident_sub_status.py index c78415a3..b84d08a4 100644 --- a/rootly_sdk/models/update_incident_sub_status.py +++ b/rootly_sdk/models/update_incident_sub_status.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_sub_status_data import UpdateIncidentSubStatusData @@ -24,6 +28,8 @@ class UpdateIncidentSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_sub_status_data import UpdateIncidentSubStatusData + data = self.data.to_dict() field_dict: 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 3ec4d4a2..8332b0f9 100644 --- a/rootly_sdk/models/update_incident_sub_status_data.py +++ b/rootly_sdk/models/update_incident_sub_status_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_sub_status_data_type import ( - UpdateIncidentSubStatusDataType, - check_update_incident_sub_status_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_incident_sub_status_data_type import check_update_incident_sub_status_data_type +from ..models.update_incident_sub_status_data_type import UpdateIncidentSubStatusDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_sub_status_data_attributes import UpdateIncidentSubStatusDataAttributes @@ -31,6 +32,8 @@ class UpdateIncidentSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_sub_status_data_attributes import UpdateIncidentSubStatusDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 b3b42330..d7dbe507 100644 --- a/rootly_sdk/models/update_incident_sub_status_data_attributes.py +++ b/rootly_sdk/models/update_incident_sub_status_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateIncidentSubStatusDataAttributes") diff --git a/rootly_sdk/models/update_incident_task_params.py b/rootly_sdk/models/update_incident_task_params.py index e2d5cdc3..01574232 100644 --- a/rootly_sdk/models/update_incident_task_params.py +++ b/rootly_sdk/models/update_incident_task_params.py @@ -1,20 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_incident_task_params_attribute_to_query_by import ( - UpdateIncidentTaskParamsAttributeToQueryBy, check_update_incident_task_params_attribute_to_query_by, ) -from ..models.update_incident_task_params_task_type import ( - UpdateIncidentTaskParamsTaskType, - check_update_incident_task_params_task_type, -) +from ..models.update_incident_task_params_attribute_to_query_by import UpdateIncidentTaskParamsAttributeToQueryBy +from ..models.update_incident_task_params_task_type import check_update_incident_task_params_task_type +from ..models.update_incident_task_params_task_type import UpdateIncidentTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateIncidentTaskParams") diff --git a/rootly_sdk/models/update_incident_type.py b/rootly_sdk/models/update_incident_type.py index 0afb154c..0d191adc 100644 --- a/rootly_sdk/models/update_incident_type.py +++ b/rootly_sdk/models/update_incident_type.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_type_data import UpdateIncidentTypeData @@ -24,6 +28,8 @@ class UpdateIncidentType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_type_data import UpdateIncidentTypeData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_incident_type_data.py b/rootly_sdk/models/update_incident_type_data.py index a5b901e9..0449a838 100644 --- a/rootly_sdk/models/update_incident_type_data.py +++ b/rootly_sdk/models/update_incident_type_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_incident_type_data_type import UpdateIncidentTypeDataType, check_update_incident_type_data_type +from ..types import UNSET, Unset + +from ..models.update_incident_type_data_type import check_update_incident_type_data_type +from ..models.update_incident_type_data_type import UpdateIncidentTypeDataType +from typing import cast if TYPE_CHECKING: from ..models.update_incident_type_data_attributes import UpdateIncidentTypeDataAttributes @@ -28,6 +32,8 @@ class UpdateIncidentTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_type_data_attributes import UpdateIncidentTypeDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_incident_type_data_attributes.py b/rootly_sdk/models/update_incident_type_data_attributes.py index 1330e5e2..125e720b 100644 --- a/rootly_sdk/models/update_incident_type_data_attributes.py +++ b/rootly_sdk/models/update_incident_type_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_incident_type_data_attributes_properties_item import ( UpdateIncidentTypeDataAttributesPropertiesItem, @@ -49,6 +53,16 @@ class UpdateIncidentTypeDataAttributes: properties: list[UpdateIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_incident_type_data_attributes_properties_item import ( + UpdateIncidentTypeDataAttributesPropertiesItem, + ) + from ..models.update_incident_type_data_attributes_slack_channels_type_0_item import ( + UpdateIncidentTypeDataAttributesSlackChannelsType0Item, + ) + from ..models.update_incident_type_data_attributes_slack_aliases_type_0_item import ( + UpdateIncidentTypeDataAttributesSlackAliasesType0Item, + ) + name = self.name description: None | str | Unset 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 index b4e47094..04c7de27 100644 --- a/rootly_sdk/models/update_incident_type_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_incident_type_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateIncidentTypeDataAttributesPropertiesItem") 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 749e159c..c399bd68 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateIncidentTypeDataAttributesSlackAliasesType0Item") 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 549b1658..deb0d3f6 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateIncidentTypeDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_jira_issue_task_params.py b/rootly_sdk/models/update_jira_issue_task_params.py index e31d15c1..c71d7efe 100644 --- a/rootly_sdk/models/update_jira_issue_task_params.py +++ b/rootly_sdk/models/update_jira_issue_task_params.py @@ -1,18 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_jira_issue_task_params_task_type import ( - UpdateJiraIssueTaskParamsTaskType, - check_update_jira_issue_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_jira_issue_task_params_task_type import check_update_jira_issue_task_params_task_type +from ..models.update_jira_issue_task_params_task_type import UpdateJiraIssueTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.update_jira_issue_task_params_integration import UpdateJiraIssueTaskParamsIntegration from ..models.update_jira_issue_task_params_priority import UpdateJiraIssueTaskParamsPriority from ..models.update_jira_issue_task_params_status import UpdateJiraIssueTaskParamsStatus @@ -27,6 +29,8 @@ class UpdateJiraIssueTaskParams: issue_id (str): The issue id project_key (str): The project key task_type (UpdateJiraIssueTaskParamsTaskType | Unset): + integration (UpdateJiraIssueTaskParamsIntegration | Unset): Specify integration id if you have more than one + Jira instance title (str | Unset): The issue title description (str | Unset): The issue description labels (str | Unset): The issue labels @@ -43,6 +47,7 @@ class UpdateJiraIssueTaskParams: issue_id: str project_key: str task_type: UpdateJiraIssueTaskParamsTaskType | Unset = UNSET + integration: UpdateJiraIssueTaskParamsIntegration | Unset = UNSET title: str | Unset = UNSET description: str | Unset = UNSET labels: str | Unset = UNSET @@ -56,6 +61,10 @@ class UpdateJiraIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_jira_issue_task_params_priority import UpdateJiraIssueTaskParamsPriority + from ..models.update_jira_issue_task_params_integration import UpdateJiraIssueTaskParamsIntegration + from ..models.update_jira_issue_task_params_status import UpdateJiraIssueTaskParamsStatus + issue_id = self.issue_id project_key = self.project_key @@ -64,6 +73,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.task_type, Unset): task_type = self.task_type + integration: dict[str, Any] | Unset = UNSET + if not isinstance(self.integration, Unset): + integration = self.integration.to_dict() + title = self.title description = self.description @@ -106,6 +119,8 @@ def to_dict(self) -> dict[str, Any]: ) if task_type is not UNSET: field_dict["task_type"] = task_type + if integration is not UNSET: + field_dict["integration"] = integration if title is not UNSET: field_dict["title"] = title if description is not UNSET: @@ -131,6 +146,7 @@ def to_dict(self) -> dict[str, Any]: @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_jira_issue_task_params_integration import UpdateJiraIssueTaskParamsIntegration from ..models.update_jira_issue_task_params_priority import UpdateJiraIssueTaskParamsPriority from ..models.update_jira_issue_task_params_status import UpdateJiraIssueTaskParamsStatus @@ -146,6 +162,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: task_type = check_update_jira_issue_task_params_task_type(_task_type) + _integration = d.pop("integration", UNSET) + integration: UpdateJiraIssueTaskParamsIntegration | Unset + if isinstance(_integration, Unset): + integration = UNSET + else: + integration = UpdateJiraIssueTaskParamsIntegration.from_dict(_integration) + title = d.pop("title", UNSET) description = d.pop("description", UNSET) @@ -194,6 +217,7 @@ def _parse_update_payload(data: object) -> None | str | Unset: issue_id=issue_id, project_key=project_key, task_type=task_type, + integration=integration, title=title, description=description, labels=labels, diff --git a/rootly_sdk/models/update_jira_issue_task_params_integration.py b/rootly_sdk/models/update_jira_issue_task_params_integration.py new file mode 100644 index 00000000..dcaf9553 --- /dev/null +++ b/rootly_sdk/models/update_jira_issue_task_params_integration.py @@ -0,0 +1,74 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="UpdateJiraIssueTaskParamsIntegration") + + +@_attrs_define +class UpdateJiraIssueTaskParamsIntegration: + """Specify integration id if you have more than one Jira instance + + 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_jira_issue_task_params_integration = cls( + id=id, + name=name, + ) + + update_jira_issue_task_params_integration.additional_properties = d + return update_jira_issue_task_params_integration + + @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_jira_issue_task_params_priority.py b/rootly_sdk/models/update_jira_issue_task_params_priority.py index da36b28e..95fef12b 100644 --- a/rootly_sdk/models/update_jira_issue_task_params_priority.py +++ b/rootly_sdk/models/update_jira_issue_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateJiraIssueTaskParamsPriority") 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 83ca7fdf..83aabcf1 100644 --- a/rootly_sdk/models/update_jira_issue_task_params_status.py +++ b/rootly_sdk/models/update_jira_issue_task_params_status.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateJiraIssueTaskParamsStatus") diff --git a/rootly_sdk/models/update_linear_issue_task_params.py b/rootly_sdk/models/update_linear_issue_task_params.py index 38885133..0e1c592b 100644 --- a/rootly_sdk/models/update_linear_issue_task_params.py +++ b/rootly_sdk/models/update_linear_issue_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_linear_issue_task_params_task_type import ( - UpdateLinearIssueTaskParamsTaskType, - check_update_linear_issue_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_linear_issue_task_params_task_type import check_update_linear_issue_task_params_task_type +from ..models.update_linear_issue_task_params_task_type import UpdateLinearIssueTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_linear_issue_task_params_labels_item import UpdateLinearIssueTaskParamsLabelsItem from ..models.update_linear_issue_task_params_priority import UpdateLinearIssueTaskParamsPriority @@ -35,6 +36,8 @@ class UpdateLinearIssueTaskParams: labels (list[UpdateLinearIssueTaskParamsLabelsItem] | Unset): priority (UpdateLinearIssueTaskParamsPriority | Unset): The priority id and display name assign_user_email (str | Unset): The assigned user's email + custom_fields_mapping (None | str | Unset): Custom field mappings. Can contain liquid markup and need to be + valid JSON """ issue_id: str @@ -46,9 +49,13 @@ class UpdateLinearIssueTaskParams: labels: list[UpdateLinearIssueTaskParamsLabelsItem] | Unset = UNSET priority: UpdateLinearIssueTaskParamsPriority | Unset = UNSET assign_user_email: str | 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]: + from ..models.update_linear_issue_task_params_project import UpdateLinearIssueTaskParamsProject + from ..models.update_linear_issue_task_params_labels_item import UpdateLinearIssueTaskParamsLabelsItem + from ..models.update_linear_issue_task_params_priority import UpdateLinearIssueTaskParamsPriority from ..models.update_linear_issue_task_params_state_type_0 import UpdateLinearIssueTaskParamsStateType0 issue_id = self.issue_id @@ -86,6 +93,12 @@ def to_dict(self) -> dict[str, Any]: assign_user_email = self.assign_user_email + 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 + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -109,6 +122,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["priority"] = priority if assign_user_email is not UNSET: field_dict["assign_user_email"] = assign_user_email + if custom_fields_mapping is not UNSET: + field_dict["custom_fields_mapping"] = custom_fields_mapping return field_dict @@ -175,6 +190,15 @@ def _parse_state(data: object) -> None | Unset | UpdateLinearIssueTaskParamsStat assign_user_email = d.pop("assign_user_email", UNSET) + 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 | str | Unset, data) + + custom_fields_mapping = _parse_custom_fields_mapping(d.pop("custom_fields_mapping", UNSET)) + update_linear_issue_task_params = cls( issue_id=issue_id, task_type=task_type, @@ -185,6 +209,7 @@ def _parse_state(data: object) -> None | Unset | UpdateLinearIssueTaskParamsStat labels=labels, priority=priority, assign_user_email=assign_user_email, + custom_fields_mapping=custom_fields_mapping, ) update_linear_issue_task_params.additional_properties = d 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 79c23c9d..bb0a462f 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateLinearIssueTaskParamsLabelsItem") 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 f4b9cfd4..33af3c6f 100644 --- a/rootly_sdk/models/update_linear_issue_task_params_priority.py +++ b/rootly_sdk/models/update_linear_issue_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateLinearIssueTaskParamsPriority") 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 d10f9177..a01d8663 100644 --- a/rootly_sdk/models/update_linear_issue_task_params_project.py +++ b/rootly_sdk/models/update_linear_issue_task_params_project.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateLinearIssueTaskParamsProject") 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 e5b7c643..a8fab4e0 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateLinearIssueTaskParamsStateType0") diff --git a/rootly_sdk/models/update_live_call_router.py b/rootly_sdk/models/update_live_call_router.py index ec0c1cb7..27e80e32 100644 --- a/rootly_sdk/models/update_live_call_router.py +++ b/rootly_sdk/models/update_live_call_router.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_live_call_router_data import UpdateLiveCallRouterData @@ -24,6 +28,8 @@ class UpdateLiveCallRouter: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_live_call_router_data import UpdateLiveCallRouterData + data = self.data.to_dict() field_dict: 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 f0abf0c8..13ff6714 100644 --- a/rootly_sdk/models/update_live_call_router_data.py +++ b/rootly_sdk/models/update_live_call_router_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_live_call_router_data_type import ( - UpdateLiveCallRouterDataType, - check_update_live_call_router_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_live_call_router_data_type import check_update_live_call_router_data_type +from ..models.update_live_call_router_data_type import UpdateLiveCallRouterDataType +from typing import cast if TYPE_CHECKING: from ..models.update_live_call_router_data_attributes import UpdateLiveCallRouterDataAttributes @@ -31,6 +32,8 @@ class UpdateLiveCallRouterData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_live_call_router_data_attributes import UpdateLiveCallRouterDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 b2ad7f3c..a93a5a63 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes.py @@ -1,27 +1,31 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_live_call_router_data_attributes_country_code import ( - UpdateLiveCallRouterDataAttributesCountryCode, check_update_live_call_router_data_attributes_country_code, ) -from ..models.update_live_call_router_data_attributes_kind import ( - UpdateLiveCallRouterDataAttributesKind, - check_update_live_call_router_data_attributes_kind, -) +from ..models.update_live_call_router_data_attributes_country_code import UpdateLiveCallRouterDataAttributesCountryCode +from ..models.update_live_call_router_data_attributes_kind import check_update_live_call_router_data_attributes_kind +from ..models.update_live_call_router_data_attributes_kind import UpdateLiveCallRouterDataAttributesKind from ..models.update_live_call_router_data_attributes_phone_type import ( - UpdateLiveCallRouterDataAttributesPhoneType, check_update_live_call_router_data_attributes_phone_type, ) +from ..models.update_live_call_router_data_attributes_phone_type import UpdateLiveCallRouterDataAttributesPhoneType from ..models.update_live_call_router_data_attributes_waiting_music_url import ( - UpdateLiveCallRouterDataAttributesWaitingMusicUrl, check_update_live_call_router_data_attributes_waiting_music_url, ) +from ..models.update_live_call_router_data_attributes_waiting_music_url import ( + UpdateLiveCallRouterDataAttributesWaitingMusicUrl, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_live_call_router_data_attributes_escalation_policy_trigger_params import ( @@ -46,6 +50,8 @@ class UpdateLiveCallRouterDataAttributes: 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 + unavailable_responder_message (None | str | Unset): The message played to the caller when a responder doesn't + answer and the call moves on to the next person in the escalation. Leave blank to use the default message. waiting_music_url (UpdateLiveCallRouterDataAttributesWaitingMusicUrl | 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 @@ -53,6 +59,11 @@ class UpdateLiveCallRouterDataAttributes: 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 + notify_via_sms (bool | Unset): Whether responders are also notified via SMS when this router pages them + notify_via_push_notification (bool | Unset): Whether responders are also notified via push notification when + this router pages them + informational_notification_message (None | str | Unset): Optional message included in the SMS/push notification. + Supports variables such as {{ alert.url }}, {{ alert.data.* }}, and {{ alert.alert_urgency.name }}. 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 @@ -70,11 +81,15 @@ class UpdateLiveCallRouterDataAttributes: phone_type: UpdateLiveCallRouterDataAttributesPhoneType | Unset = UNSET voicemail_greeting: str | Unset = UNSET caller_greeting: str | Unset = UNSET + unavailable_responder_message: None | 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 + notify_via_sms: bool | Unset = UNSET + notify_via_push_notification: bool | Unset = UNSET + informational_notification_message: None | str | Unset = UNSET alert_urgency_id: str | Unset = UNSET calling_tree_enabled: bool | Unset = UNSET calling_tree_prompt: str | Unset = UNSET @@ -82,6 +97,13 @@ class UpdateLiveCallRouterDataAttributes: escalation_policy_trigger_params: UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_live_call_router_data_attributes_escalation_policy_trigger_params import ( + UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams, + ) + from ..models.update_live_call_router_data_attributes_paging_targets_item import ( + UpdateLiveCallRouterDataAttributesPagingTargetsItem, + ) + kind: str | Unset = UNSET if not isinstance(self.kind, Unset): kind = self.kind @@ -102,6 +124,12 @@ def to_dict(self) -> dict[str, Any]: caller_greeting = self.caller_greeting + unavailable_responder_message: None | str | Unset + if isinstance(self.unavailable_responder_message, Unset): + unavailable_responder_message = UNSET + else: + unavailable_responder_message = self.unavailable_responder_message + waiting_music_url: str | Unset = UNSET if not isinstance(self.waiting_music_url, Unset): waiting_music_url = self.waiting_music_url @@ -114,6 +142,16 @@ def to_dict(self) -> dict[str, Any]: should_auto_resolve_alert_on_call_end = self.should_auto_resolve_alert_on_call_end + notify_via_sms = self.notify_via_sms + + notify_via_push_notification = self.notify_via_push_notification + + informational_notification_message: None | str | Unset + if isinstance(self.informational_notification_message, Unset): + informational_notification_message = UNSET + else: + informational_notification_message = self.informational_notification_message + alert_urgency_id = self.alert_urgency_id calling_tree_enabled = self.calling_tree_enabled @@ -148,6 +186,8 @@ def to_dict(self) -> dict[str, Any]: field_dict["voicemail_greeting"] = voicemail_greeting if caller_greeting is not UNSET: field_dict["caller_greeting"] = caller_greeting + if unavailable_responder_message is not UNSET: + field_dict["unavailable_responder_message"] = unavailable_responder_message if waiting_music_url is not UNSET: field_dict["waiting_music_url"] = waiting_music_url if sent_to_voicemail_delay is not UNSET: @@ -158,6 +198,12 @@ def to_dict(self) -> dict[str, Any]: field_dict["escalation_level_delay_in_seconds"] = escalation_level_delay_in_seconds if should_auto_resolve_alert_on_call_end is not UNSET: field_dict["should_auto_resolve_alert_on_call_end"] = should_auto_resolve_alert_on_call_end + if notify_via_sms is not UNSET: + field_dict["notify_via_sms"] = notify_via_sms + if notify_via_push_notification is not UNSET: + field_dict["notify_via_push_notification"] = notify_via_push_notification + if informational_notification_message is not UNSET: + field_dict["informational_notification_message"] = informational_notification_message if alert_urgency_id is not UNSET: field_dict["alert_urgency_id"] = alert_urgency_id if calling_tree_enabled is not UNSET: @@ -210,6 +256,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: caller_greeting = d.pop("caller_greeting", UNSET) + def _parse_unavailable_responder_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + unavailable_responder_message = _parse_unavailable_responder_message( + d.pop("unavailable_responder_message", UNSET) + ) + _waiting_music_url = d.pop("waiting_music_url", UNSET) waiting_music_url: UpdateLiveCallRouterDataAttributesWaitingMusicUrl | Unset if isinstance(_waiting_music_url, Unset): @@ -225,6 +282,21 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: should_auto_resolve_alert_on_call_end = d.pop("should_auto_resolve_alert_on_call_end", UNSET) + notify_via_sms = d.pop("notify_via_sms", UNSET) + + notify_via_push_notification = d.pop("notify_via_push_notification", UNSET) + + def _parse_informational_notification_message(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + informational_notification_message = _parse_informational_notification_message( + d.pop("informational_notification_message", UNSET) + ) + alert_urgency_id = d.pop("alert_urgency_id", UNSET) calling_tree_enabled = d.pop("calling_tree_enabled", UNSET) @@ -261,11 +333,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: phone_type=phone_type, voicemail_greeting=voicemail_greeting, caller_greeting=caller_greeting, + unavailable_responder_message=unavailable_responder_message, waiting_music_url=waiting_music_url, sent_to_voicemail_delay=sent_to_voicemail_delay, should_redirect_to_voicemail_on_no_answer=should_redirect_to_voicemail_on_no_answer, escalation_level_delay_in_seconds=escalation_level_delay_in_seconds, should_auto_resolve_alert_on_call_end=should_auto_resolve_alert_on_call_end, + notify_via_sms=notify_via_sms, + notify_via_push_notification=notify_via_push_notification, + informational_notification_message=informational_notification_message, alert_urgency_id=alert_urgency_id, calling_tree_enabled=calling_tree_enabled, calling_tree_prompt=calling_tree_prompt, 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 b8093f2e..fc1faf8b 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,10 +1,11 @@ from typing import Literal, cast -UpdateLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "DE", "GB", "NL", "NZ", "SE", "US"] +UpdateLiveCallRouterDataAttributesCountryCode = Literal["AU", "CA", "CH", "DE", "GB", "NL", "NZ", "SE", "US"] UPDATE_LIVE_CALL_ROUTER_DATA_ATTRIBUTES_COUNTRY_CODE_VALUES: set[UpdateLiveCallRouterDataAttributesCountryCode] = { "AU", "CA", + "CH", "DE", "GB", "NL", 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 319b895f..1abf0d5a 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_live_call_router_data_attributes_escalation_policy_trigger_params_type import ( - UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType, check_update_live_call_router_data_attributes_escalation_policy_trigger_params_type, ) +from ..models.update_live_call_router_data_attributes_escalation_policy_trigger_params_type import ( + UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType, +) +from typing import cast + T = TypeVar("T", bound="UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams") 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 2fc7b043..bec0e409 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_live_call_router_data_attributes_paging_targets_item_type import ( - UpdateLiveCallRouterDataAttributesPagingTargetsItemType, check_update_live_call_router_data_attributes_paging_targets_item_type, ) +from ..models.update_live_call_router_data_attributes_paging_targets_item_type import ( + UpdateLiveCallRouterDataAttributesPagingTargetsItemType, +) +from typing import cast + T = TypeVar("T", bound="UpdateLiveCallRouterDataAttributesPagingTargetsItem") diff --git a/rootly_sdk/models/update_motion_task_task_params.py b/rootly_sdk/models/update_motion_task_task_params.py index 35906759..3aa5d60d 100644 --- a/rootly_sdk/models/update_motion_task_task_params.py +++ b/rootly_sdk/models/update_motion_task_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_motion_task_task_params_task_type import ( - UpdateMotionTaskTaskParamsTaskType, - check_update_motion_task_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_motion_task_task_params_task_type import check_update_motion_task_task_params_task_type +from ..models.update_motion_task_task_params_task_type import UpdateMotionTaskTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_motion_task_task_params_priority import UpdateMotionTaskTaskParamsPriority @@ -44,6 +45,8 @@ class UpdateMotionTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_motion_task_task_params_priority import UpdateMotionTaskTaskParamsPriority + task_id = self.task_id task_type: str | Unset = UNSET 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 20e79aec..875cd54e 100644 --- a/rootly_sdk/models/update_motion_task_task_params_priority.py +++ b/rootly_sdk/models/update_motion_task_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateMotionTaskTaskParamsPriority") diff --git a/rootly_sdk/models/update_notion_page_task_params.py b/rootly_sdk/models/update_notion_page_task_params.py index 89bd9a23..bb3972ce 100644 --- a/rootly_sdk/models/update_notion_page_task_params.py +++ b/rootly_sdk/models/update_notion_page_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_notion_page_task_params_task_type import ( - UpdateNotionPageTaskParamsTaskType, - check_update_notion_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_notion_page_task_params_task_type import check_update_notion_page_task_params_task_type +from ..models.update_notion_page_task_params_task_type import UpdateNotionPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateNotionPageTaskParams") diff --git a/rootly_sdk/models/update_on_call_pay_report.py b/rootly_sdk/models/update_on_call_pay_report.py index 9c488458..07b9c41f 100644 --- a/rootly_sdk/models/update_on_call_pay_report.py +++ b/rootly_sdk/models/update_on_call_pay_report.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_on_call_pay_report_data import UpdateOnCallPayReportData @@ -24,6 +28,8 @@ class UpdateOnCallPayReport: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_on_call_pay_report_data import UpdateOnCallPayReportData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_on_call_pay_report_data.py b/rootly_sdk/models/update_on_call_pay_report_data.py index cb905403..596abd2c 100644 --- a/rootly_sdk/models/update_on_call_pay_report_data.py +++ b/rootly_sdk/models/update_on_call_pay_report_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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, -) +from ..types import UNSET, Unset + +from ..models.update_on_call_pay_report_data_type import check_update_on_call_pay_report_data_type +from ..models.update_on_call_pay_report_data_type import UpdateOnCallPayReportDataType +from typing import cast if TYPE_CHECKING: from ..models.update_on_call_pay_report_data_attributes import UpdateOnCallPayReportDataAttributes @@ -31,6 +32,8 @@ class UpdateOnCallPayReportData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_on_call_pay_report_data_attributes import UpdateOnCallPayReportDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 index 24eb3009..49371185 100644 --- a/rootly_sdk/models/update_on_call_pay_report_data_attributes.py +++ b/rootly_sdk/models/update_on_call_pay_report_data_attributes.py @@ -1,13 +1,18 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="UpdateOnCallPayReportDataAttributes") @@ -19,11 +24,16 @@ class UpdateOnCallPayReportDataAttributes: 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. + time_zone (str | Unset): IANA timezone used to compute day and weekend boundaries. + use_responders_time_zone (bool | Unset): When true, day and weekend boundaries are computed in each responder's + personal timezone instead of the report-wide timezone. """ start_date: datetime.date | Unset = UNSET end_date: datetime.date | Unset = UNSET schedule_ids: list[str] | Unset = UNSET + time_zone: str | Unset = UNSET + use_responders_time_zone: bool | Unset = UNSET def to_dict(self) -> dict[str, Any]: start_date: str | Unset = UNSET @@ -38,6 +48,10 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.schedule_ids, Unset): schedule_ids = self.schedule_ids + time_zone = self.time_zone + + use_responders_time_zone = self.use_responders_time_zone + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -47,6 +61,10 @@ def to_dict(self) -> dict[str, Any]: field_dict["end_date"] = end_date if schedule_ids is not UNSET: field_dict["schedule_ids"] = schedule_ids + if time_zone is not UNSET: + field_dict["time_zone"] = time_zone + if use_responders_time_zone is not UNSET: + field_dict["use_responders_time_zone"] = use_responders_time_zone return field_dict @@ -69,10 +87,16 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_ids = cast(list[str], d.pop("schedule_ids", UNSET)) + time_zone = d.pop("time_zone", UNSET) + + use_responders_time_zone = d.pop("use_responders_time_zone", UNSET) + update_on_call_pay_report_data_attributes = cls( start_date=start_date, end_date=end_date, schedule_ids=schedule_ids, + time_zone=time_zone, + use_responders_time_zone=use_responders_time_zone, ) return update_on_call_pay_report_data_attributes diff --git a/rootly_sdk/models/update_on_call_role.py b/rootly_sdk/models/update_on_call_role.py index 05af9836..b15052dd 100644 --- a/rootly_sdk/models/update_on_call_role.py +++ b/rootly_sdk/models/update_on_call_role.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_on_call_role_data import UpdateOnCallRoleData @@ -24,6 +28,8 @@ class UpdateOnCallRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_on_call_role_data import UpdateOnCallRoleData + data = self.data.to_dict() field_dict: 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 26aa8597..d0ec4ae9 100644 --- a/rootly_sdk/models/update_on_call_role_data.py +++ b/rootly_sdk/models/update_on_call_role_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_on_call_role_data_type import UpdateOnCallRoleDataType, check_update_on_call_role_data_type +from ..types import UNSET, Unset + +from ..models.update_on_call_role_data_type import check_update_on_call_role_data_type +from ..models.update_on_call_role_data_type import UpdateOnCallRoleDataType +from typing import cast if TYPE_CHECKING: from ..models.update_on_call_role_data_attributes import UpdateOnCallRoleDataAttributes @@ -28,6 +32,8 @@ class UpdateOnCallRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_on_call_role_data_attributes import UpdateOnCallRoleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 83503f81..f64d03ca 100644 --- a/rootly_sdk/models/update_on_call_role_data_attributes.py +++ b/rootly_sdk/models/update_on_call_role_data_attributes.py @@ -1,99 +1,160 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_on_call_role_data_attributes_alert_fields_permissions_item import ( - UpdateOnCallRoleDataAttributesAlertFieldsPermissionsItem, check_update_on_call_role_data_attributes_alert_fields_permissions_item, ) +from ..models.update_on_call_role_data_attributes_alert_fields_permissions_item import ( + UpdateOnCallRoleDataAttributesAlertFieldsPermissionsItem, +) from ..models.update_on_call_role_data_attributes_alert_groups_permissions_item import ( - UpdateOnCallRoleDataAttributesAlertGroupsPermissionsItem, check_update_on_call_role_data_attributes_alert_groups_permissions_item, ) +from ..models.update_on_call_role_data_attributes_alert_groups_permissions_item import ( + UpdateOnCallRoleDataAttributesAlertGroupsPermissionsItem, +) from ..models.update_on_call_role_data_attributes_alert_routing_rules_permissions_item import ( - UpdateOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem, check_update_on_call_role_data_attributes_alert_routing_rules_permissions_item, ) +from ..models.update_on_call_role_data_attributes_alert_routing_rules_permissions_item import ( + UpdateOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem, +) from ..models.update_on_call_role_data_attributes_alert_sources_permissions_item import ( - UpdateOnCallRoleDataAttributesAlertSourcesPermissionsItem, check_update_on_call_role_data_attributes_alert_sources_permissions_item, ) +from ..models.update_on_call_role_data_attributes_alert_sources_permissions_item import ( + UpdateOnCallRoleDataAttributesAlertSourcesPermissionsItem, +) from ..models.update_on_call_role_data_attributes_alert_urgency_permissions_item import ( - UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem, check_update_on_call_role_data_attributes_alert_urgency_permissions_item, ) +from ..models.update_on_call_role_data_attributes_alert_urgency_permissions_item import ( + UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem, +) from ..models.update_on_call_role_data_attributes_alerts_permissions_item import ( - UpdateOnCallRoleDataAttributesAlertsPermissionsItem, check_update_on_call_role_data_attributes_alerts_permissions_item, ) +from ..models.update_on_call_role_data_attributes_alerts_permissions_item import ( + UpdateOnCallRoleDataAttributesAlertsPermissionsItem, +) from ..models.update_on_call_role_data_attributes_api_keys_permissions_item import ( - UpdateOnCallRoleDataAttributesApiKeysPermissionsItem, check_update_on_call_role_data_attributes_api_keys_permissions_item, ) +from ..models.update_on_call_role_data_attributes_api_keys_permissions_item import ( + UpdateOnCallRoleDataAttributesApiKeysPermissionsItem, +) from ..models.update_on_call_role_data_attributes_audits_permissions_item import ( - UpdateOnCallRoleDataAttributesAuditsPermissionsItem, check_update_on_call_role_data_attributes_audits_permissions_item, ) +from ..models.update_on_call_role_data_attributes_audits_permissions_item import ( + UpdateOnCallRoleDataAttributesAuditsPermissionsItem, +) +from ..models.update_on_call_role_data_attributes_catalogs_permissions_item import ( + check_update_on_call_role_data_attributes_catalogs_permissions_item, +) +from ..models.update_on_call_role_data_attributes_catalogs_permissions_item import ( + UpdateOnCallRoleDataAttributesCatalogsPermissionsItem, +) from ..models.update_on_call_role_data_attributes_contacts_permissions_item import ( - UpdateOnCallRoleDataAttributesContactsPermissionsItem, check_update_on_call_role_data_attributes_contacts_permissions_item, ) +from ..models.update_on_call_role_data_attributes_contacts_permissions_item import ( + UpdateOnCallRoleDataAttributesContactsPermissionsItem, +) from ..models.update_on_call_role_data_attributes_escalation_policies_permissions_item import ( - UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, check_update_on_call_role_data_attributes_escalation_policies_permissions_item, ) +from ..models.update_on_call_role_data_attributes_escalation_policies_permissions_item import ( + UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, +) +from ..models.update_on_call_role_data_attributes_functionalities_permissions_item import ( + check_update_on_call_role_data_attributes_functionalities_permissions_item, +) +from ..models.update_on_call_role_data_attributes_functionalities_permissions_item import ( + UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem, +) from ..models.update_on_call_role_data_attributes_groups_permissions_item import ( - UpdateOnCallRoleDataAttributesGroupsPermissionsItem, check_update_on_call_role_data_attributes_groups_permissions_item, ) +from ..models.update_on_call_role_data_attributes_groups_permissions_item import ( + UpdateOnCallRoleDataAttributesGroupsPermissionsItem, +) from ..models.update_on_call_role_data_attributes_heartbeats_permissions_item import ( - UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem, check_update_on_call_role_data_attributes_heartbeats_permissions_item, ) +from ..models.update_on_call_role_data_attributes_heartbeats_permissions_item import ( + UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem, +) from ..models.update_on_call_role_data_attributes_integrations_permissions_item import ( - UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem, check_update_on_call_role_data_attributes_integrations_permissions_item, ) +from ..models.update_on_call_role_data_attributes_integrations_permissions_item import ( + UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem, +) from ..models.update_on_call_role_data_attributes_invitations_permissions_item import ( - UpdateOnCallRoleDataAttributesInvitationsPermissionsItem, check_update_on_call_role_data_attributes_invitations_permissions_item, ) +from ..models.update_on_call_role_data_attributes_invitations_permissions_item import ( + UpdateOnCallRoleDataAttributesInvitationsPermissionsItem, +) from ..models.update_on_call_role_data_attributes_live_call_routing_permissions_item import ( - UpdateOnCallRoleDataAttributesLiveCallRoutingPermissionsItem, check_update_on_call_role_data_attributes_live_call_routing_permissions_item, ) +from ..models.update_on_call_role_data_attributes_live_call_routing_permissions_item import ( + UpdateOnCallRoleDataAttributesLiveCallRoutingPermissionsItem, +) from ..models.update_on_call_role_data_attributes_on_call_readiness_report_permissions_item import ( - UpdateOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem, check_update_on_call_role_data_attributes_on_call_readiness_report_permissions_item, ) +from ..models.update_on_call_role_data_attributes_on_call_readiness_report_permissions_item import ( + UpdateOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem, +) from ..models.update_on_call_role_data_attributes_on_call_roles_permissions_item import ( - UpdateOnCallRoleDataAttributesOnCallRolesPermissionsItem, check_update_on_call_role_data_attributes_on_call_roles_permissions_item, ) +from ..models.update_on_call_role_data_attributes_on_call_roles_permissions_item import ( + UpdateOnCallRoleDataAttributesOnCallRolesPermissionsItem, +) from ..models.update_on_call_role_data_attributes_schedule_override_permissions_item import ( - UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem, check_update_on_call_role_data_attributes_schedule_override_permissions_item, ) +from ..models.update_on_call_role_data_attributes_schedule_override_permissions_item import ( + UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem, +) from ..models.update_on_call_role_data_attributes_schedules_permissions_item import ( - UpdateOnCallRoleDataAttributesSchedulesPermissionsItem, check_update_on_call_role_data_attributes_schedules_permissions_item, ) +from ..models.update_on_call_role_data_attributes_schedules_permissions_item import ( + UpdateOnCallRoleDataAttributesSchedulesPermissionsItem, +) from ..models.update_on_call_role_data_attributes_services_permissions_item import ( - UpdateOnCallRoleDataAttributesServicesPermissionsItem, check_update_on_call_role_data_attributes_services_permissions_item, ) +from ..models.update_on_call_role_data_attributes_services_permissions_item import ( + UpdateOnCallRoleDataAttributesServicesPermissionsItem, +) from ..models.update_on_call_role_data_attributes_webhooks_permissions_item import ( - UpdateOnCallRoleDataAttributesWebhooksPermissionsItem, check_update_on_call_role_data_attributes_webhooks_permissions_item, ) +from ..models.update_on_call_role_data_attributes_webhooks_permissions_item import ( + UpdateOnCallRoleDataAttributesWebhooksPermissionsItem, +) from ..models.update_on_call_role_data_attributes_workflows_permissions_item import ( - UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem, check_update_on_call_role_data_attributes_workflows_permissions_item, ) +from ..models.update_on_call_role_data_attributes_workflows_permissions_item import ( + UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateOnCallRoleDataAttributes") @@ -125,8 +186,10 @@ class UpdateOnCallRoleDataAttributes: schedule_override_permissions (list[UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset): schedules_permissions (list[UpdateOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset): services_permissions (list[UpdateOnCallRoleDataAttributesServicesPermissionsItem] | Unset): + functionalities_permissions (list[UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset): webhooks_permissions (list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset): workflows_permissions (list[UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset): + catalogs_permissions (list[UpdateOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset): """ name: str | Unset = UNSET @@ -157,8 +220,10 @@ class UpdateOnCallRoleDataAttributes: schedule_override_permissions: list[UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem] | Unset = UNSET schedules_permissions: list[UpdateOnCallRoleDataAttributesSchedulesPermissionsItem] | Unset = UNSET services_permissions: list[UpdateOnCallRoleDataAttributesServicesPermissionsItem] | Unset = UNSET + functionalities_permissions: list[UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET webhooks_permissions: list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET workflows_permissions: list[UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem] | Unset = UNSET + catalogs_permissions: list[UpdateOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: name = self.name @@ -305,6 +370,13 @@ def to_dict(self) -> dict[str, Any]: services_permissions_item: str = services_permissions_item_data services_permissions.append(services_permissions_item) + 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) + webhooks_permissions: list[str] | Unset = UNSET if not isinstance(self.webhooks_permissions, Unset): webhooks_permissions = [] @@ -319,6 +391,13 @@ def to_dict(self) -> dict[str, Any]: 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) + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -366,10 +445,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["schedules_permissions"] = schedules_permissions if services_permissions is not UNSET: field_dict["services_permissions"] = services_permissions + if functionalities_permissions is not UNSET: + field_dict["functionalities_permissions"] = functionalities_permissions if webhooks_permissions is not UNSET: 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 return field_dict @@ -626,6 +709,19 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: services_permissions.append(services_permissions_item) + _functionalities_permissions = d.pop("functionalities_permissions", UNSET) + functionalities_permissions: list[UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem] | Unset = UNSET + if _functionalities_permissions is not UNSET: + functionalities_permissions = [] + for functionalities_permissions_item_data in _functionalities_permissions: + functionalities_permissions_item = ( + check_update_on_call_role_data_attributes_functionalities_permissions_item( + functionalities_permissions_item_data + ) + ) + + functionalities_permissions.append(functionalities_permissions_item) + _webhooks_permissions = d.pop("webhooks_permissions", UNSET) webhooks_permissions: list[UpdateOnCallRoleDataAttributesWebhooksPermissionsItem] | Unset = UNSET if _webhooks_permissions is not UNSET: @@ -648,6 +744,17 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: workflows_permissions.append(workflows_permissions_item) + _catalogs_permissions = d.pop("catalogs_permissions", UNSET) + catalogs_permissions: list[UpdateOnCallRoleDataAttributesCatalogsPermissionsItem] | Unset = UNSET + if _catalogs_permissions is not UNSET: + catalogs_permissions = [] + for catalogs_permissions_item_data in _catalogs_permissions: + catalogs_permissions_item = check_update_on_call_role_data_attributes_catalogs_permissions_item( + catalogs_permissions_item_data + ) + + catalogs_permissions.append(catalogs_permissions_item) + update_on_call_role_data_attributes = cls( name=name, system_role=system_role, @@ -671,8 +778,10 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: schedule_override_permissions=schedule_override_permissions, schedules_permissions=schedules_permissions, services_permissions=services_permissions, + functionalities_permissions=functionalities_permissions, webhooks_permissions=webhooks_permissions, workflows_permissions=workflows_permissions, + catalogs_permissions=catalogs_permissions, ) return update_on_call_role_data_attributes diff --git a/rootly_sdk/models/update_on_call_role_data_attributes_catalogs_permissions_item.py b/rootly_sdk/models/update_on_call_role_data_attributes_catalogs_permissions_item.py new file mode 100644 index 00000000..f6ee37ee --- /dev/null +++ b/rootly_sdk/models/update_on_call_role_data_attributes_catalogs_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateOnCallRoleDataAttributesCatalogsPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: set[ + UpdateOnCallRoleDataAttributesCatalogsPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_on_call_role_data_attributes_catalogs_permissions_item( + value: str | None, +) -> UpdateOnCallRoleDataAttributesCatalogsPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES: + return cast(UpdateOnCallRoleDataAttributesCatalogsPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_CATALOGS_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_on_call_role_data_attributes_functionalities_permissions_item.py b/rootly_sdk/models/update_on_call_role_data_attributes_functionalities_permissions_item.py new file mode 100644 index 00000000..45ebd261 --- /dev/null +++ b/rootly_sdk/models/update_on_call_role_data_attributes_functionalities_permissions_item.py @@ -0,0 +1,24 @@ +from typing import Literal, cast + +UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem = Literal["create", "delete", "read", "update"] + +UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: set[ + UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem +] = { + "create", + "delete", + "read", + "update", +} + + +def check_update_on_call_role_data_attributes_functionalities_permissions_item( + value: str | None, +) -> UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem | None: + if value is None: + return None + if value in UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES: + return cast(UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_ON_CALL_ROLE_DATA_ATTRIBUTES_FUNCTIONALITIES_PERMISSIONS_ITEM_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_on_call_shadow.py b/rootly_sdk/models/update_on_call_shadow.py index 8a39a81e..5b49b2c9 100644 --- a/rootly_sdk/models/update_on_call_shadow.py +++ b/rootly_sdk/models/update_on_call_shadow.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_on_call_shadow_data import UpdateOnCallShadowData @@ -24,6 +28,8 @@ class UpdateOnCallShadow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_on_call_shadow_data import UpdateOnCallShadowData + data = self.data.to_dict() field_dict: 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 3b15e40d..78d2a837 100644 --- a/rootly_sdk/models/update_on_call_shadow_data.py +++ b/rootly_sdk/models/update_on_call_shadow_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_on_call_shadow_data_type import UpdateOnCallShadowDataType, check_update_on_call_shadow_data_type +from ..types import UNSET, Unset + +from ..models.update_on_call_shadow_data_type import check_update_on_call_shadow_data_type +from ..models.update_on_call_shadow_data_type import UpdateOnCallShadowDataType +from typing import cast if TYPE_CHECKING: from ..models.update_on_call_shadow_data_attributes import UpdateOnCallShadowDataAttributes @@ -28,6 +32,8 @@ class UpdateOnCallShadowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_on_call_shadow_data_attributes import UpdateOnCallShadowDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 82161c38..1db4a99a 100644 --- a/rootly_sdk/models/update_on_call_shadow_data_attributes.py +++ b/rootly_sdk/models/update_on_call_shadow_data_attributes.py @@ -1,17 +1,24 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_on_call_shadow_data_attributes_shadowable_type import ( - UpdateOnCallShadowDataAttributesShadowableType, check_update_on_call_shadow_data_attributes_shadowable_type, ) +from ..models.update_on_call_shadow_data_attributes_shadowable_type import ( + UpdateOnCallShadowDataAttributesShadowableType, +) from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + T = TypeVar("T", bound="UpdateOnCallShadowDataAttributes") diff --git a/rootly_sdk/models/update_opsgenie_alert_task_params.py b/rootly_sdk/models/update_opsgenie_alert_task_params.py index 3c7dd2b8..db543c55 100644 --- a/rootly_sdk/models/update_opsgenie_alert_task_params.py +++ b/rootly_sdk/models/update_opsgenie_alert_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_opsgenie_alert_task_params_priority import ( - UpdateOpsgenieAlertTaskParamsPriority, - check_update_opsgenie_alert_task_params_priority, -) -from ..models.update_opsgenie_alert_task_params_task_type import ( - UpdateOpsgenieAlertTaskParamsTaskType, - check_update_opsgenie_alert_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_opsgenie_alert_task_params_priority import check_update_opsgenie_alert_task_params_priority +from ..models.update_opsgenie_alert_task_params_priority import UpdateOpsgenieAlertTaskParamsPriority +from ..models.update_opsgenie_alert_task_params_task_type import check_update_opsgenie_alert_task_params_task_type +from ..models.update_opsgenie_alert_task_params_task_type import UpdateOpsgenieAlertTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_opsgenie_alert_task_params_completion import UpdateOpsgenieAlertTaskParamsCompletion @@ -45,6 +44,8 @@ class UpdateOpsgenieAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_opsgenie_alert_task_params_completion import UpdateOpsgenieAlertTaskParamsCompletion + alert_id = self.alert_id priority: str = self.priority 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 f1933281..34368945 100644 --- a/rootly_sdk/models/update_opsgenie_alert_task_params_completion.py +++ b/rootly_sdk/models/update_opsgenie_alert_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateOpsgenieAlertTaskParamsCompletion") diff --git a/rootly_sdk/models/update_opsgenie_incident_task_params.py b/rootly_sdk/models/update_opsgenie_incident_task_params.py index 46b0c6ef..3ebc2f7e 100644 --- a/rootly_sdk/models/update_opsgenie_incident_task_params.py +++ b/rootly_sdk/models/update_opsgenie_incident_task_params.py @@ -1,25 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_opsgenie_incident_task_params_priority import ( - UpdateOpsgenieIncidentTaskParamsPriority, - check_update_opsgenie_incident_task_params_priority, -) -from ..models.update_opsgenie_incident_task_params_status import ( - UpdateOpsgenieIncidentTaskParamsStatus, - check_update_opsgenie_incident_task_params_status, -) -from ..models.update_opsgenie_incident_task_params_task_type import ( - UpdateOpsgenieIncidentTaskParamsTaskType, - check_update_opsgenie_incident_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_opsgenie_incident_task_params_priority import check_update_opsgenie_incident_task_params_priority +from ..models.update_opsgenie_incident_task_params_priority import UpdateOpsgenieIncidentTaskParamsPriority +from ..models.update_opsgenie_incident_task_params_status import check_update_opsgenie_incident_task_params_status +from ..models.update_opsgenie_incident_task_params_status import UpdateOpsgenieIncidentTaskParamsStatus +from ..models.update_opsgenie_incident_task_params_task_type import check_update_opsgenie_incident_task_params_task_type +from ..models.update_opsgenie_incident_task_params_task_type import UpdateOpsgenieIncidentTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateOpsgenieIncidentTaskParams") diff --git a/rootly_sdk/models/update_override_shift.py b/rootly_sdk/models/update_override_shift.py index 766b15a4..db7114f8 100644 --- a/rootly_sdk/models/update_override_shift.py +++ b/rootly_sdk/models/update_override_shift.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_override_shift_data import UpdateOverrideShiftData @@ -24,6 +28,8 @@ class UpdateOverrideShift: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_override_shift_data import UpdateOverrideShiftData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_override_shift_data.py b/rootly_sdk/models/update_override_shift_data.py index 295ece6a..bb05b9cc 100644 --- a/rootly_sdk/models/update_override_shift_data.py +++ b/rootly_sdk/models/update_override_shift_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_override_shift_data_type import UpdateOverrideShiftDataType, check_update_override_shift_data_type +from ..types import UNSET, Unset + +from ..models.update_override_shift_data_type import check_update_override_shift_data_type +from ..models.update_override_shift_data_type import UpdateOverrideShiftDataType +from typing import cast if TYPE_CHECKING: from ..models.update_override_shift_data_attributes import UpdateOverrideShiftDataAttributes @@ -28,6 +32,8 @@ class UpdateOverrideShiftData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_override_shift_data_attributes import UpdateOverrideShiftDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_override_shift_data_attributes.py b/rootly_sdk/models/update_override_shift_data_attributes.py index 2a34c48e..9e44a80d 100644 --- a/rootly_sdk/models/update_override_shift_data_attributes.py +++ b/rootly_sdk/models/update_override_shift_data_attributes.py @@ -1,9 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + T = TypeVar("T", bound="UpdateOverrideShiftDataAttributes") diff --git a/rootly_sdk/models/update_pagerduty_incident_task_params.py b/rootly_sdk/models/update_pagerduty_incident_task_params.py index 3020e135..d5390326 100644 --- a/rootly_sdk/models/update_pagerduty_incident_task_params.py +++ b/rootly_sdk/models/update_pagerduty_incident_task_params.py @@ -1,24 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_pagerduty_incident_task_params_status import ( - UpdatePagerdutyIncidentTaskParamsStatus, - check_update_pagerduty_incident_task_params_status, -) +from ..types import UNSET, Unset + +from ..models.update_pagerduty_incident_task_params_status import check_update_pagerduty_incident_task_params_status +from ..models.update_pagerduty_incident_task_params_status import UpdatePagerdutyIncidentTaskParamsStatus from ..models.update_pagerduty_incident_task_params_task_type import ( - UpdatePagerdutyIncidentTaskParamsTaskType, check_update_pagerduty_incident_task_params_task_type, ) -from ..models.update_pagerduty_incident_task_params_urgency import ( - UpdatePagerdutyIncidentTaskParamsUrgency, - check_update_pagerduty_incident_task_params_urgency, -) +from ..models.update_pagerduty_incident_task_params_task_type import UpdatePagerdutyIncidentTaskParamsTaskType +from ..models.update_pagerduty_incident_task_params_urgency import check_update_pagerduty_incident_task_params_urgency +from ..models.update_pagerduty_incident_task_params_urgency import UpdatePagerdutyIncidentTaskParamsUrgency from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdatePagerdutyIncidentTaskParams") diff --git a/rootly_sdk/models/update_pagertree_alert_task_params.py b/rootly_sdk/models/update_pagertree_alert_task_params.py index 75b8f2ae..305ee046 100644 --- a/rootly_sdk/models/update_pagertree_alert_task_params.py +++ b/rootly_sdk/models/update_pagertree_alert_task_params.py @@ -1,25 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_pagertree_alert_task_params_severity import ( - UpdatePagertreeAlertTaskParamsSeverity, - check_update_pagertree_alert_task_params_severity, -) -from ..models.update_pagertree_alert_task_params_task_type import ( - UpdatePagertreeAlertTaskParamsTaskType, - check_update_pagertree_alert_task_params_task_type, -) -from ..models.update_pagertree_alert_task_params_urgency import ( - UpdatePagertreeAlertTaskParamsUrgency, - check_update_pagertree_alert_task_params_urgency, -) from ..types import UNSET, Unset +from ..models.update_pagertree_alert_task_params_severity import check_update_pagertree_alert_task_params_severity +from ..models.update_pagertree_alert_task_params_severity import UpdatePagertreeAlertTaskParamsSeverity +from ..models.update_pagertree_alert_task_params_task_type import check_update_pagertree_alert_task_params_task_type +from ..models.update_pagertree_alert_task_params_task_type import UpdatePagertreeAlertTaskParamsTaskType +from ..models.update_pagertree_alert_task_params_urgency import check_update_pagertree_alert_task_params_urgency +from ..models.update_pagertree_alert_task_params_urgency import UpdatePagertreeAlertTaskParamsUrgency +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_pagertree_alert_task_params_teams_item import UpdatePagertreeAlertTaskParamsTeamsItem from ..models.update_pagertree_alert_task_params_users_item import UpdatePagertreeAlertTaskParamsUsersItem @@ -55,6 +52,9 @@ class UpdatePagertreeAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_pagertree_alert_task_params_users_item import UpdatePagertreeAlertTaskParamsUsersItem + from ..models.update_pagertree_alert_task_params_teams_item import UpdatePagertreeAlertTaskParamsTeamsItem + task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): task_type = self.task_type 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 6bd86d6a..27684165 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdatePagertreeAlertTaskParamsTeamsItem") 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 8f9a0105..1d5a6f47 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdatePagertreeAlertTaskParamsUsersItem") diff --git a/rootly_sdk/models/update_playbook.py b/rootly_sdk/models/update_playbook.py index dacdebe3..8f6f08ff 100644 --- a/rootly_sdk/models/update_playbook.py +++ b/rootly_sdk/models/update_playbook.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_playbook_data import UpdatePlaybookData @@ -24,6 +28,8 @@ class UpdatePlaybook: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_playbook_data import UpdatePlaybookData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_playbook_data.py b/rootly_sdk/models/update_playbook_data.py index dcd2a4b9..fb67855e 100644 --- a/rootly_sdk/models/update_playbook_data.py +++ b/rootly_sdk/models/update_playbook_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_playbook_data_type import UpdatePlaybookDataType, check_update_playbook_data_type +from ..types import UNSET, Unset + +from ..models.update_playbook_data_type import check_update_playbook_data_type +from ..models.update_playbook_data_type import UpdatePlaybookDataType +from typing import cast if TYPE_CHECKING: from ..models.update_playbook_data_attributes import UpdatePlaybookDataAttributes @@ -28,6 +32,8 @@ class UpdatePlaybookData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_playbook_data_attributes import UpdatePlaybookDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_playbook_data_attributes.py b/rootly_sdk/models/update_playbook_data_attributes.py index c98736b1..da878ec4 100644 --- a/rootly_sdk/models/update_playbook_data_attributes.py +++ b/rootly_sdk/models/update_playbook_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdatePlaybookDataAttributes") diff --git a/rootly_sdk/models/update_playbook_task.py b/rootly_sdk/models/update_playbook_task.py index 33210449..065793c1 100644 --- a/rootly_sdk/models/update_playbook_task.py +++ b/rootly_sdk/models/update_playbook_task.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_playbook_task_data import UpdatePlaybookTaskData @@ -24,6 +28,8 @@ class UpdatePlaybookTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_playbook_task_data import UpdatePlaybookTaskData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_playbook_task_data.py b/rootly_sdk/models/update_playbook_task_data.py index 5fabc110..9095ce48 100644 --- a/rootly_sdk/models/update_playbook_task_data.py +++ b/rootly_sdk/models/update_playbook_task_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_playbook_task_data_type import UpdatePlaybookTaskDataType, check_update_playbook_task_data_type +from ..types import UNSET, Unset + +from ..models.update_playbook_task_data_type import check_update_playbook_task_data_type +from ..models.update_playbook_task_data_type import UpdatePlaybookTaskDataType +from typing import cast if TYPE_CHECKING: from ..models.update_playbook_task_data_attributes import UpdatePlaybookTaskDataAttributes @@ -28,6 +32,8 @@ class UpdatePlaybookTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_playbook_task_data_attributes import UpdatePlaybookTaskDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_playbook_task_data_attributes.py b/rootly_sdk/models/update_playbook_task_data_attributes.py index a8ef0615..1746d621 100644 --- a/rootly_sdk/models/update_playbook_task_data_attributes.py +++ b/rootly_sdk/models/update_playbook_task_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdatePlaybookTaskDataAttributes") diff --git a/rootly_sdk/models/update_post_mortem_template.py b/rootly_sdk/models/update_post_mortem_template.py index f54f9f01..a5f7e33e 100644 --- a/rootly_sdk/models/update_post_mortem_template.py +++ b/rootly_sdk/models/update_post_mortem_template.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_post_mortem_template_data import UpdatePostMortemTemplateData @@ -24,6 +28,8 @@ class UpdatePostMortemTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_post_mortem_template_data import UpdatePostMortemTemplateData + data = self.data.to_dict() field_dict: 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 21b139e3..d0b1c593 100644 --- a/rootly_sdk/models/update_post_mortem_template_data.py +++ b/rootly_sdk/models/update_post_mortem_template_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_post_mortem_template_data_type import ( - UpdatePostMortemTemplateDataType, - check_update_post_mortem_template_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_post_mortem_template_data_type import check_update_post_mortem_template_data_type +from ..models.update_post_mortem_template_data_type import UpdatePostMortemTemplateDataType +from typing import cast if TYPE_CHECKING: from ..models.update_post_mortem_template_data_attributes import UpdatePostMortemTemplateDataAttributes @@ -31,6 +32,8 @@ class UpdatePostMortemTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_post_mortem_template_data_attributes import UpdatePostMortemTemplateDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 25c498be..6826135d 100644 --- a/rootly_sdk/models/update_post_mortem_template_data_attributes.py +++ b/rootly_sdk/models/update_post_mortem_template_data_attributes.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_post_mortem_template_data_attributes_format import ( - UpdatePostMortemTemplateDataAttributesFormat, check_update_post_mortem_template_data_attributes_format, ) +from ..models.update_post_mortem_template_data_attributes_format import UpdatePostMortemTemplateDataAttributesFormat from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdatePostMortemTemplateDataAttributes") diff --git a/rootly_sdk/models/update_pulse.py b/rootly_sdk/models/update_pulse.py index 611a581c..0be44fdd 100644 --- a/rootly_sdk/models/update_pulse.py +++ b/rootly_sdk/models/update_pulse.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_pulse_data import UpdatePulseData @@ -24,6 +28,8 @@ class UpdatePulse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_pulse_data import UpdatePulseData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_pulse_data.py b/rootly_sdk/models/update_pulse_data.py index 3fd6a551..3c2856c8 100644 --- a/rootly_sdk/models/update_pulse_data.py +++ b/rootly_sdk/models/update_pulse_data.py @@ -1,14 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_pulse_data_type import UpdatePulseDataType, check_update_pulse_data_type from ..types import UNSET, Unset +from ..models.update_pulse_data_type import check_update_pulse_data_type +from ..models.update_pulse_data_type import UpdatePulseDataType +from typing import cast + if TYPE_CHECKING: from ..models.update_pulse_data_attributes import UpdatePulseDataAttributes @@ -20,30 +23,29 @@ class UpdatePulseData: """ Attributes: + type_ (UpdatePulseDataType): attributes (UpdatePulseDataAttributes): - type_ (UpdatePulseDataType | Unset): """ + type_: UpdatePulseDataType 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() + from ..models.update_pulse_data_attributes import UpdatePulseDataAttributes - type_: str | Unset = UNSET - if not isinstance(self.type_, Unset): - type_ = self.type_ + 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, } ) - if type_ is not UNSET: - field_dict["type"] = type_ return field_dict @@ -52,18 +54,13 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_pulse_data_attributes import UpdatePulseDataAttributes d = dict(src_dict) - attributes = UpdatePulseDataAttributes.from_dict(d.pop("attributes")) + type_ = check_update_pulse_data_type(d.pop("type")) - _type_ = d.pop("type", UNSET) - type_: UpdatePulseDataType | Unset - if isinstance(_type_, Unset): - type_ = UNSET - else: - type_ = check_update_pulse_data_type(_type_) + attributes = UpdatePulseDataAttributes.from_dict(d.pop("attributes")) update_pulse_data = cls( - attributes=attributes, type_=type_, + attributes=attributes, ) update_pulse_data.additional_properties = d diff --git a/rootly_sdk/models/update_pulse_data_attributes.py b/rootly_sdk/models/update_pulse_data_attributes.py index 0defb512..14bbc007 100644 --- a/rootly_sdk/models/update_pulse_data_attributes.py +++ b/rootly_sdk/models/update_pulse_data_attributes.py @@ -1,14 +1,18 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define -from dateutil.parser import isoparse +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + if TYPE_CHECKING: from ..models.update_pulse_data_attributes_data_type_0 import UpdatePulseDataAttributesDataType0 from ..models.update_pulse_data_attributes_labels_item_type_0 import UpdatePulseDataAttributesLabelsItemType0 @@ -46,9 +50,9 @@ class UpdatePulseDataAttributes: 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 + from ..models.update_pulse_data_attributes_labels_item_type_0 import UpdatePulseDataAttributesLabelsItemType0 + from ..models.update_pulse_data_attributes_data_type_0 import UpdatePulseDataAttributesDataType0 source: None | str | Unset if isinstance(self.source, 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 30981982..3191a013 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdatePulseDataAttributesDataType0") 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 f677ef10..c83732d6 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdatePulseDataAttributesLabelsItemType0") 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 8d76f43b..4db34750 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdatePulseDataAttributesRefsItemType0") diff --git a/rootly_sdk/models/update_quip_page_task_params.py b/rootly_sdk/models/update_quip_page_task_params.py index 3de18173..715c95cb 100644 --- a/rootly_sdk/models/update_quip_page_task_params.py +++ b/rootly_sdk/models/update_quip_page_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_quip_page_task_params_task_type import ( - UpdateQuipPageTaskParamsTaskType, - check_update_quip_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_quip_page_task_params_task_type import check_update_quip_page_task_params_task_type +from ..models.update_quip_page_task_params_task_type import UpdateQuipPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateQuipPageTaskParams") diff --git a/rootly_sdk/models/update_retrospective_configuration.py b/rootly_sdk/models/update_retrospective_configuration.py index f38dfde6..f17420b8 100644 --- a/rootly_sdk/models/update_retrospective_configuration.py +++ b/rootly_sdk/models/update_retrospective_configuration.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_retrospective_configuration_data import UpdateRetrospectiveConfigurationData @@ -24,6 +28,8 @@ class UpdateRetrospectiveConfiguration: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_configuration_data import UpdateRetrospectiveConfigurationData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_retrospective_configuration_data.py b/rootly_sdk/models/update_retrospective_configuration_data.py index 78848b1a..77a06776 100644 --- a/rootly_sdk/models/update_retrospective_configuration_data.py +++ b/rootly_sdk/models/update_retrospective_configuration_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_retrospective_configuration_data_type import ( - UpdateRetrospectiveConfigurationDataType, - check_update_retrospective_configuration_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_retrospective_configuration_data_type import check_update_retrospective_configuration_data_type +from ..models.update_retrospective_configuration_data_type import UpdateRetrospectiveConfigurationDataType +from typing import cast if TYPE_CHECKING: from ..models.update_retrospective_configuration_data_attributes import ( @@ -33,6 +34,10 @@ class UpdateRetrospectiveConfigurationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_configuration_data_attributes import ( + UpdateRetrospectiveConfigurationDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_retrospective_configuration_data_attributes.py b/rootly_sdk/models/update_retrospective_configuration_data_attributes.py index 969dbf0b..c85cee40 100644 --- a/rootly_sdk/models/update_retrospective_configuration_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_configuration_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateRetrospectiveConfigurationDataAttributes") diff --git a/rootly_sdk/models/update_retrospective_process.py b/rootly_sdk/models/update_retrospective_process.py index 20d10cf0..94794a93 100644 --- a/rootly_sdk/models/update_retrospective_process.py +++ b/rootly_sdk/models/update_retrospective_process.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_retrospective_process_data import UpdateRetrospectiveProcessData @@ -24,6 +28,8 @@ class UpdateRetrospectiveProcess: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_process_data import UpdateRetrospectiveProcessData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_retrospective_process_data.py b/rootly_sdk/models/update_retrospective_process_data.py index a221364c..b5319fdb 100644 --- a/rootly_sdk/models/update_retrospective_process_data.py +++ b/rootly_sdk/models/update_retrospective_process_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_retrospective_process_data_type import ( - UpdateRetrospectiveProcessDataType, - check_update_retrospective_process_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_retrospective_process_data_type import check_update_retrospective_process_data_type +from ..models.update_retrospective_process_data_type import UpdateRetrospectiveProcessDataType +from typing import cast if TYPE_CHECKING: from ..models.update_retrospective_process_data_attributes import UpdateRetrospectiveProcessDataAttributes @@ -31,6 +32,8 @@ class UpdateRetrospectiveProcessData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_process_data_attributes import UpdateRetrospectiveProcessDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_retrospective_process_data_attributes.py b/rootly_sdk/models/update_retrospective_process_data_attributes.py index 2627b37f..46cef4b9 100644 --- a/rootly_sdk/models/update_retrospective_process_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_process_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0 import ( UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0, @@ -50,6 +54,9 @@ def to_dict(self) -> dict[str, Any]: from ..models.update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1 import ( UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1, ) + from ..models.update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2 import ( + UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2, + ) name = self.name 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 5fe8b8ec..925c011a 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,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0") 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 51a20fd7..0273ee4c 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,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1") 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 f8c3eab1..e81a1203 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,9 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + T = TypeVar("T", bound="UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2") diff --git a/rootly_sdk/models/update_retrospective_process_group.py b/rootly_sdk/models/update_retrospective_process_group.py index 5f6e1847..a3597f90 100644 --- a/rootly_sdk/models/update_retrospective_process_group.py +++ b/rootly_sdk/models/update_retrospective_process_group.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_retrospective_process_group_data import UpdateRetrospectiveProcessGroupData @@ -24,6 +28,8 @@ class UpdateRetrospectiveProcessGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_process_group_data import UpdateRetrospectiveProcessGroupData + data = self.data.to_dict() field_dict: 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 f3f057ca..a2e38113 100644 --- a/rootly_sdk/models/update_retrospective_process_group_data.py +++ b/rootly_sdk/models/update_retrospective_process_group_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_retrospective_process_group_data_type import ( - UpdateRetrospectiveProcessGroupDataType, - check_update_retrospective_process_group_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_retrospective_process_group_data_type import check_update_retrospective_process_group_data_type +from ..models.update_retrospective_process_group_data_type import UpdateRetrospectiveProcessGroupDataType +from typing import cast if TYPE_CHECKING: from ..models.update_retrospective_process_group_data_attributes import ( @@ -33,6 +34,10 @@ class UpdateRetrospectiveProcessGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_process_group_data_attributes import ( + UpdateRetrospectiveProcessGroupDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 b34d1eac..d795f342 100644 --- a/rootly_sdk/models/update_retrospective_process_group_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_process_group_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateRetrospectiveProcessGroupDataAttributes") diff --git a/rootly_sdk/models/update_retrospective_process_group_step.py b/rootly_sdk/models/update_retrospective_process_group_step.py index 196c2b45..5330933d 100644 --- a/rootly_sdk/models/update_retrospective_process_group_step.py +++ b/rootly_sdk/models/update_retrospective_process_group_step.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_retrospective_process_group_step_data import UpdateRetrospectiveProcessGroupStepData @@ -24,6 +28,8 @@ class UpdateRetrospectiveProcessGroupStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_process_group_step_data import UpdateRetrospectiveProcessGroupStepData + data = self.data.to_dict() field_dict: 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 82f7502b..260f3a63 100644 --- a/rootly_sdk/models/update_retrospective_process_group_step_data.py +++ b/rootly_sdk/models/update_retrospective_process_group_step_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_retrospective_process_group_step_data_type import ( - UpdateRetrospectiveProcessGroupStepDataType, check_update_retrospective_process_group_step_data_type, ) +from ..models.update_retrospective_process_group_step_data_type import UpdateRetrospectiveProcessGroupStepDataType +from typing import cast if TYPE_CHECKING: from ..models.update_retrospective_process_group_step_data_attributes import ( @@ -33,6 +36,10 @@ class UpdateRetrospectiveProcessGroupStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_process_group_step_data_attributes import ( + UpdateRetrospectiveProcessGroupStepDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 76b6e3c0..f2fdd58c 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,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateRetrospectiveProcessGroupStepDataAttributes") diff --git a/rootly_sdk/models/update_retrospective_step.py b/rootly_sdk/models/update_retrospective_step.py index 611bb37a..cf0d6e5e 100644 --- a/rootly_sdk/models/update_retrospective_step.py +++ b/rootly_sdk/models/update_retrospective_step.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_retrospective_step_data import UpdateRetrospectiveStepData @@ -24,6 +28,8 @@ class UpdateRetrospectiveStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_step_data import UpdateRetrospectiveStepData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_retrospective_step_data.py b/rootly_sdk/models/update_retrospective_step_data.py index 6d5b1471..81146e50 100644 --- a/rootly_sdk/models/update_retrospective_step_data.py +++ b/rootly_sdk/models/update_retrospective_step_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_retrospective_step_data_type import ( - UpdateRetrospectiveStepDataType, - check_update_retrospective_step_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_retrospective_step_data_type import check_update_retrospective_step_data_type +from ..models.update_retrospective_step_data_type import UpdateRetrospectiveStepDataType +from typing import cast if TYPE_CHECKING: from ..models.update_retrospective_step_data_attributes import UpdateRetrospectiveStepDataAttributes @@ -31,6 +32,8 @@ class UpdateRetrospectiveStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_retrospective_step_data_attributes import UpdateRetrospectiveStepDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_retrospective_step_data_attributes.py b/rootly_sdk/models/update_retrospective_step_data_attributes.py index 421a8240..8995f426 100644 --- a/rootly_sdk/models/update_retrospective_step_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_step_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateRetrospectiveStepDataAttributes") diff --git a/rootly_sdk/models/update_role.py b/rootly_sdk/models/update_role.py index 4e0f5815..50d6825e 100644 --- a/rootly_sdk/models/update_role.py +++ b/rootly_sdk/models/update_role.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_role_data import UpdateRoleData @@ -24,6 +28,8 @@ class UpdateRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_role_data import UpdateRoleData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_role_data.py b/rootly_sdk/models/update_role_data.py index 3252ed3f..d22dfc7d 100644 --- a/rootly_sdk/models/update_role_data.py +++ b/rootly_sdk/models/update_role_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_role_data_type import UpdateRoleDataType, check_update_role_data_type +from ..types import UNSET, Unset + +from ..models.update_role_data_type import check_update_role_data_type +from ..models.update_role_data_type import UpdateRoleDataType +from typing import cast if TYPE_CHECKING: from ..models.update_role_data_attributes import UpdateRoleDataAttributes @@ -28,6 +32,8 @@ class UpdateRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_role_data_attributes import UpdateRoleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_role_data_attributes.py b/rootly_sdk/models/update_role_data_attributes.py index 07ecec3c..ee499bb3 100644 --- a/rootly_sdk/models/update_role_data_attributes.py +++ b/rootly_sdk/models/update_role_data_attributes.py @@ -1,135 +1,188 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_role_data_attributes_api_keys_permissions_item import ( - UpdateRoleDataAttributesApiKeysPermissionsItem, check_update_role_data_attributes_api_keys_permissions_item, ) +from ..models.update_role_data_attributes_api_keys_permissions_item import ( + UpdateRoleDataAttributesApiKeysPermissionsItem, +) from ..models.update_role_data_attributes_audits_permissions_item import ( - UpdateRoleDataAttributesAuditsPermissionsItem, check_update_role_data_attributes_audits_permissions_item, ) +from ..models.update_role_data_attributes_audits_permissions_item import UpdateRoleDataAttributesAuditsPermissionsItem from ..models.update_role_data_attributes_billing_permissions_item import ( - UpdateRoleDataAttributesBillingPermissionsItem, check_update_role_data_attributes_billing_permissions_item, ) +from ..models.update_role_data_attributes_billing_permissions_item import UpdateRoleDataAttributesBillingPermissionsItem 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_catalogs_permissions_item import ( + UpdateRoleDataAttributesCatalogsPermissionsItem, +) 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_communication_permissions_item import ( + UpdateRoleDataAttributesCommunicationPermissionsItem, +) 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_edge_connector_permissions_item import ( + UpdateRoleDataAttributesEdgeConnectorPermissionsItem, +) from ..models.update_role_data_attributes_environments_permissions_item import ( - UpdateRoleDataAttributesEnvironmentsPermissionsItem, check_update_role_data_attributes_environments_permissions_item, ) +from ..models.update_role_data_attributes_environments_permissions_item import ( + UpdateRoleDataAttributesEnvironmentsPermissionsItem, +) from ..models.update_role_data_attributes_form_fields_permissions_item import ( - UpdateRoleDataAttributesFormFieldsPermissionsItem, check_update_role_data_attributes_form_fields_permissions_item, ) +from ..models.update_role_data_attributes_form_fields_permissions_item import ( + UpdateRoleDataAttributesFormFieldsPermissionsItem, +) from ..models.update_role_data_attributes_functionalities_permissions_item import ( - UpdateRoleDataAttributesFunctionalitiesPermissionsItem, check_update_role_data_attributes_functionalities_permissions_item, ) +from ..models.update_role_data_attributes_functionalities_permissions_item import ( + UpdateRoleDataAttributesFunctionalitiesPermissionsItem, +) from ..models.update_role_data_attributes_groups_permissions_item import ( - UpdateRoleDataAttributesGroupsPermissionsItem, check_update_role_data_attributes_groups_permissions_item, ) +from ..models.update_role_data_attributes_groups_permissions_item import UpdateRoleDataAttributesGroupsPermissionsItem from ..models.update_role_data_attributes_incident_causes_permissions_item import ( - UpdateRoleDataAttributesIncidentCausesPermissionsItem, check_update_role_data_attributes_incident_causes_permissions_item, ) +from ..models.update_role_data_attributes_incident_causes_permissions_item import ( + UpdateRoleDataAttributesIncidentCausesPermissionsItem, +) 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_communication_permissions_item import ( + UpdateRoleDataAttributesIncidentCommunicationPermissionsItem, +) from ..models.update_role_data_attributes_incident_feedbacks_permissions_item import ( - UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem, check_update_role_data_attributes_incident_feedbacks_permissions_item, ) +from ..models.update_role_data_attributes_incident_feedbacks_permissions_item import ( + UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem, +) from ..models.update_role_data_attributes_incident_roles_permissions_item import ( - UpdateRoleDataAttributesIncidentRolesPermissionsItem, check_update_role_data_attributes_incident_roles_permissions_item, ) +from ..models.update_role_data_attributes_incident_roles_permissions_item import ( + UpdateRoleDataAttributesIncidentRolesPermissionsItem, +) from ..models.update_role_data_attributes_incident_types_permissions_item import ( - UpdateRoleDataAttributesIncidentTypesPermissionsItem, check_update_role_data_attributes_incident_types_permissions_item, ) +from ..models.update_role_data_attributes_incident_types_permissions_item import ( + UpdateRoleDataAttributesIncidentTypesPermissionsItem, +) from ..models.update_role_data_attributes_incidents_permissions_item import ( - UpdateRoleDataAttributesIncidentsPermissionsItem, check_update_role_data_attributes_incidents_permissions_item, ) +from ..models.update_role_data_attributes_incidents_permissions_item import ( + UpdateRoleDataAttributesIncidentsPermissionsItem, +) from ..models.update_role_data_attributes_integrations_permissions_item import ( - UpdateRoleDataAttributesIntegrationsPermissionsItem, check_update_role_data_attributes_integrations_permissions_item, ) +from ..models.update_role_data_attributes_integrations_permissions_item import ( + UpdateRoleDataAttributesIntegrationsPermissionsItem, +) from ..models.update_role_data_attributes_invitations_permissions_item import ( - UpdateRoleDataAttributesInvitationsPermissionsItem, check_update_role_data_attributes_invitations_permissions_item, ) +from ..models.update_role_data_attributes_invitations_permissions_item import ( + UpdateRoleDataAttributesInvitationsPermissionsItem, +) 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_paging_permissions_item import UpdateRoleDataAttributesPagingPermissionsItem from ..models.update_role_data_attributes_playbooks_permissions_item import ( - UpdateRoleDataAttributesPlaybooksPermissionsItem, check_update_role_data_attributes_playbooks_permissions_item, ) +from ..models.update_role_data_attributes_playbooks_permissions_item import ( + UpdateRoleDataAttributesPlaybooksPermissionsItem, +) from ..models.update_role_data_attributes_private_incidents_permissions_item import ( - UpdateRoleDataAttributesPrivateIncidentsPermissionsItem, check_update_role_data_attributes_private_incidents_permissions_item, ) +from ..models.update_role_data_attributes_private_incidents_permissions_item import ( + UpdateRoleDataAttributesPrivateIncidentsPermissionsItem, +) from ..models.update_role_data_attributes_retrospective_permissions_item import ( - UpdateRoleDataAttributesRetrospectivePermissionsItem, check_update_role_data_attributes_retrospective_permissions_item, ) +from ..models.update_role_data_attributes_retrospective_permissions_item import ( + UpdateRoleDataAttributesRetrospectivePermissionsItem, +) from ..models.update_role_data_attributes_roles_permissions_item import ( - UpdateRoleDataAttributesRolesPermissionsItem, check_update_role_data_attributes_roles_permissions_item, ) +from ..models.update_role_data_attributes_roles_permissions_item import UpdateRoleDataAttributesRolesPermissionsItem from ..models.update_role_data_attributes_secrets_permissions_item import ( - UpdateRoleDataAttributesSecretsPermissionsItem, check_update_role_data_attributes_secrets_permissions_item, ) +from ..models.update_role_data_attributes_secrets_permissions_item import UpdateRoleDataAttributesSecretsPermissionsItem from ..models.update_role_data_attributes_services_permissions_item import ( - UpdateRoleDataAttributesServicesPermissionsItem, check_update_role_data_attributes_services_permissions_item, ) +from ..models.update_role_data_attributes_services_permissions_item import ( + UpdateRoleDataAttributesServicesPermissionsItem, +) from ..models.update_role_data_attributes_severities_permissions_item import ( - UpdateRoleDataAttributesSeveritiesPermissionsItem, check_update_role_data_attributes_severities_permissions_item, ) +from ..models.update_role_data_attributes_severities_permissions_item import ( + UpdateRoleDataAttributesSeveritiesPermissionsItem, +) 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_slas_permissions_item import UpdateRoleDataAttributesSlasPermissionsItem 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_status_pages_permissions_item import ( + UpdateRoleDataAttributesStatusPagesPermissionsItem, +) 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_sub_statuses_permissions_item import ( + UpdateRoleDataAttributesSubStatusesPermissionsItem, +) from ..models.update_role_data_attributes_webhooks_permissions_item import ( - UpdateRoleDataAttributesWebhooksPermissionsItem, check_update_role_data_attributes_webhooks_permissions_item, ) +from ..models.update_role_data_attributes_webhooks_permissions_item import ( + UpdateRoleDataAttributesWebhooksPermissionsItem, +) from ..models.update_role_data_attributes_workflows_permissions_item import ( - UpdateRoleDataAttributesWorkflowsPermissionsItem, check_update_role_data_attributes_workflows_permissions_item, ) +from ..models.update_role_data_attributes_workflows_permissions_item import ( + UpdateRoleDataAttributesWorkflowsPermissionsItem, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateRoleDataAttributes") diff --git a/rootly_sdk/models/update_schedule.py b/rootly_sdk/models/update_schedule.py index 514b68b3..5ff9ab85 100644 --- a/rootly_sdk/models/update_schedule.py +++ b/rootly_sdk/models/update_schedule.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_schedule_data import UpdateScheduleData @@ -24,6 +28,8 @@ class UpdateSchedule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_schedule_data import UpdateScheduleData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_schedule_data.py b/rootly_sdk/models/update_schedule_data.py index 6c5069e5..2294fb16 100644 --- a/rootly_sdk/models/update_schedule_data.py +++ b/rootly_sdk/models/update_schedule_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_schedule_data_type import UpdateScheduleDataType, check_update_schedule_data_type +from ..types import UNSET, Unset + +from ..models.update_schedule_data_type import check_update_schedule_data_type +from ..models.update_schedule_data_type import UpdateScheduleDataType +from typing import cast if TYPE_CHECKING: from ..models.update_schedule_data_attributes import UpdateScheduleDataAttributes @@ -28,6 +32,8 @@ class UpdateScheduleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_schedule_data_attributes import UpdateScheduleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_schedule_data_attributes.py b/rootly_sdk/models/update_schedule_data_attributes.py index 6880b0a2..62a8b8c9 100644 --- a/rootly_sdk/models/update_schedule_data_attributes.py +++ b/rootly_sdk/models/update_schedule_data_attributes.py @@ -1,12 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.update_schedule_data_attributes_shift_report_day_of_week import ( + check_update_schedule_data_attributes_shift_report_day_of_week, +) +from ..models.update_schedule_data_attributes_shift_report_day_of_week import ( + UpdateScheduleDataAttributesShiftReportDayOfWeek, +) +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_schedule_data_attributes_slack_channel_type_0 import ( UpdateScheduleDataAttributesSlackChannelType0, @@ -28,6 +38,21 @@ class UpdateScheduleDataAttributes: 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 + sync_linear_enabled (bool | None | Unset): Whether the schedule is synced with Linear + include_shadows_in_slack_notifications (bool | None | Unset): Whether shadow users are included in Slack + notifications and user group syncing. Requires `slack_channel` to be set; otherwise this value is forced to + false on save. + shift_start_notifications_enabled (bool | None | Unset): Whether shift-start notifications are enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_update_notifications_enabled (bool | None | Unset): Whether shift-update notifications are enabled. + Requires `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_enabled (bool | None | Unset): Whether the weekly shift summary report is enabled. Requires + `slack_channel` to be set; otherwise this value is forced to false on save. + shift_report_day_of_week (UpdateScheduleDataAttributesShiftReportDayOfWeek | Unset): Day of week the weekly + shift summary is sent + shift_report_time_of_day (None | str | Unset): Time of day the weekly shift summary is sent, in HH:MM 24-hour + format + shift_report_time_zone (None | str | Unset): IANA time zone used for the weekly shift summary """ name: str | Unset = UNSET @@ -37,11 +62,20 @@ class UpdateScheduleDataAttributes: slack_channel: None | Unset | UpdateScheduleDataAttributesSlackChannelType0 = UNSET owner_group_ids: list[str] | Unset = UNSET owner_user_id: int | None | Unset = UNSET + sync_linear_enabled: bool | None | Unset = UNSET + include_shadows_in_slack_notifications: bool | None | Unset = UNSET + shift_start_notifications_enabled: bool | None | Unset = UNSET + shift_update_notifications_enabled: bool | None | Unset = UNSET + shift_report_enabled: bool | None | Unset = UNSET + shift_report_day_of_week: UpdateScheduleDataAttributesShiftReportDayOfWeek | Unset = UNSET + shift_report_time_of_day: None | str | Unset = UNSET + shift_report_time_zone: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: from ..models.update_schedule_data_attributes_slack_channel_type_0 import ( UpdateScheduleDataAttributesSlackChannelType0, ) + from ..models.update_schedule_data_attributes_slack_user_group import UpdateScheduleDataAttributesSlackUserGroup name = self.name @@ -79,6 +113,52 @@ def to_dict(self) -> dict[str, Any]: else: owner_user_id = self.owner_user_id + sync_linear_enabled: bool | None | Unset + if isinstance(self.sync_linear_enabled, Unset): + sync_linear_enabled = UNSET + else: + sync_linear_enabled = self.sync_linear_enabled + + include_shadows_in_slack_notifications: bool | None | Unset + if isinstance(self.include_shadows_in_slack_notifications, Unset): + include_shadows_in_slack_notifications = UNSET + else: + include_shadows_in_slack_notifications = self.include_shadows_in_slack_notifications + + shift_start_notifications_enabled: bool | None | Unset + if isinstance(self.shift_start_notifications_enabled, Unset): + shift_start_notifications_enabled = UNSET + else: + shift_start_notifications_enabled = self.shift_start_notifications_enabled + + shift_update_notifications_enabled: bool | None | Unset + if isinstance(self.shift_update_notifications_enabled, Unset): + shift_update_notifications_enabled = UNSET + else: + shift_update_notifications_enabled = self.shift_update_notifications_enabled + + shift_report_enabled: bool | None | Unset + if isinstance(self.shift_report_enabled, Unset): + shift_report_enabled = UNSET + else: + shift_report_enabled = self.shift_report_enabled + + shift_report_day_of_week: str | Unset = UNSET + if not isinstance(self.shift_report_day_of_week, Unset): + shift_report_day_of_week = self.shift_report_day_of_week + + shift_report_time_of_day: None | str | Unset + if isinstance(self.shift_report_time_of_day, Unset): + shift_report_time_of_day = UNSET + else: + shift_report_time_of_day = self.shift_report_time_of_day + + shift_report_time_zone: None | str | Unset + if isinstance(self.shift_report_time_zone, Unset): + shift_report_time_zone = UNSET + else: + shift_report_time_zone = self.shift_report_time_zone + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -96,6 +176,22 @@ def to_dict(self) -> dict[str, Any]: field_dict["owner_group_ids"] = owner_group_ids if owner_user_id is not UNSET: field_dict["owner_user_id"] = owner_user_id + if sync_linear_enabled is not UNSET: + field_dict["sync_linear_enabled"] = sync_linear_enabled + if include_shadows_in_slack_notifications is not UNSET: + field_dict["include_shadows_in_slack_notifications"] = include_shadows_in_slack_notifications + if shift_start_notifications_enabled is not UNSET: + field_dict["shift_start_notifications_enabled"] = shift_start_notifications_enabled + if shift_update_notifications_enabled is not UNSET: + field_dict["shift_update_notifications_enabled"] = shift_update_notifications_enabled + if shift_report_enabled is not UNSET: + field_dict["shift_report_enabled"] = shift_report_enabled + if shift_report_day_of_week is not UNSET: + field_dict["shift_report_day_of_week"] = shift_report_day_of_week + if shift_report_time_of_day is not UNSET: + field_dict["shift_report_time_of_day"] = shift_report_time_of_day + if shift_report_time_zone is not UNSET: + field_dict["shift_report_time_zone"] = shift_report_time_zone return field_dict @@ -162,6 +258,84 @@ def _parse_owner_user_id(data: object) -> int | None | Unset: owner_user_id = _parse_owner_user_id(d.pop("owner_user_id", UNSET)) + def _parse_sync_linear_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + sync_linear_enabled = _parse_sync_linear_enabled(d.pop("sync_linear_enabled", UNSET)) + + def _parse_include_shadows_in_slack_notifications(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + include_shadows_in_slack_notifications = _parse_include_shadows_in_slack_notifications( + d.pop("include_shadows_in_slack_notifications", UNSET) + ) + + def _parse_shift_start_notifications_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_start_notifications_enabled = _parse_shift_start_notifications_enabled( + d.pop("shift_start_notifications_enabled", UNSET) + ) + + def _parse_shift_update_notifications_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_update_notifications_enabled = _parse_shift_update_notifications_enabled( + d.pop("shift_update_notifications_enabled", UNSET) + ) + + def _parse_shift_report_enabled(data: object) -> bool | None | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(bool | None | Unset, data) + + shift_report_enabled = _parse_shift_report_enabled(d.pop("shift_report_enabled", UNSET)) + + _shift_report_day_of_week = d.pop("shift_report_day_of_week", UNSET) + shift_report_day_of_week: UpdateScheduleDataAttributesShiftReportDayOfWeek | Unset + if isinstance(_shift_report_day_of_week, Unset): + shift_report_day_of_week = UNSET + else: + shift_report_day_of_week = check_update_schedule_data_attributes_shift_report_day_of_week( + _shift_report_day_of_week + ) + + def _parse_shift_report_time_of_day(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + shift_report_time_of_day = _parse_shift_report_time_of_day(d.pop("shift_report_time_of_day", UNSET)) + + def _parse_shift_report_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) + + shift_report_time_zone = _parse_shift_report_time_zone(d.pop("shift_report_time_zone", UNSET)) + update_schedule_data_attributes = cls( name=name, description=description, @@ -170,6 +344,14 @@ def _parse_owner_user_id(data: object) -> int | None | Unset: slack_channel=slack_channel, owner_group_ids=owner_group_ids, owner_user_id=owner_user_id, + sync_linear_enabled=sync_linear_enabled, + include_shadows_in_slack_notifications=include_shadows_in_slack_notifications, + shift_start_notifications_enabled=shift_start_notifications_enabled, + shift_update_notifications_enabled=shift_update_notifications_enabled, + shift_report_enabled=shift_report_enabled, + shift_report_day_of_week=shift_report_day_of_week, + shift_report_time_of_day=shift_report_time_of_day, + shift_report_time_zone=shift_report_time_zone, ) return update_schedule_data_attributes diff --git a/rootly_sdk/models/update_schedule_data_attributes_shift_report_day_of_week.py b/rootly_sdk/models/update_schedule_data_attributes_shift_report_day_of_week.py new file mode 100644 index 00000000..1444d350 --- /dev/null +++ b/rootly_sdk/models/update_schedule_data_attributes_shift_report_day_of_week.py @@ -0,0 +1,29 @@ +from typing import Literal, cast + +UpdateScheduleDataAttributesShiftReportDayOfWeek = Literal[ + "friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday" +] + +UPDATE_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES: set[ + UpdateScheduleDataAttributesShiftReportDayOfWeek +] = { + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", +} + + +def check_update_schedule_data_attributes_shift_report_day_of_week( + value: str | None, +) -> UpdateScheduleDataAttributesShiftReportDayOfWeek | None: + if value is None: + return None + if value in UPDATE_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES: + return cast(UpdateScheduleDataAttributesShiftReportDayOfWeek, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_SCHEDULE_DATA_ATTRIBUTES_SHIFT_REPORT_DAY_OF_WEEK_VALUES!r}" + ) 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 3c23e5e9..7e1034c1 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateScheduleDataAttributesSlackChannelType0") 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 c8444389..ac5a8033 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateScheduleDataAttributesSlackUserGroup") diff --git a/rootly_sdk/models/update_schedule_rotation.py b/rootly_sdk/models/update_schedule_rotation.py index e74ab544..a19277bf 100644 --- a/rootly_sdk/models/update_schedule_rotation.py +++ b/rootly_sdk/models/update_schedule_rotation.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_schedule_rotation_data import UpdateScheduleRotationData @@ -24,6 +28,8 @@ class UpdateScheduleRotation: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_schedule_rotation_data import UpdateScheduleRotationData + data = self.data.to_dict() field_dict: 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 c7878b81..ca4d6788 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_schedule_rotation_active_day_data import UpdateScheduleRotationActiveDayData @@ -24,6 +28,8 @@ class UpdateScheduleRotationActiveDay: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_schedule_rotation_active_day_data import UpdateScheduleRotationActiveDayData + data = self.data.to_dict() field_dict: 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 16f0083c..bc21c6d3 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day_data.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_schedule_rotation_active_day_data_type import ( - UpdateScheduleRotationActiveDayDataType, - check_update_schedule_rotation_active_day_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_schedule_rotation_active_day_data_type import check_update_schedule_rotation_active_day_data_type +from ..models.update_schedule_rotation_active_day_data_type import UpdateScheduleRotationActiveDayDataType +from typing import cast if TYPE_CHECKING: from ..models.update_schedule_rotation_active_day_data_attributes import ( @@ -33,6 +34,10 @@ class UpdateScheduleRotationActiveDayData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_schedule_rotation_active_day_data_attributes import ( + UpdateScheduleRotationActiveDayDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 668118fe..d45585e9 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,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_schedule_rotation_active_day_data_attributes_day_name import ( - UpdateScheduleRotationActiveDayDataAttributesDayName, check_update_schedule_rotation_active_day_data_attributes_day_name, ) +from ..models.update_schedule_rotation_active_day_data_attributes_day_name import ( + UpdateScheduleRotationActiveDayDataAttributesDayName, +) from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_schedule_rotation_active_day_data_attributes_active_time_attributes_item import ( @@ -34,6 +40,10 @@ class UpdateScheduleRotationActiveDayDataAttributes: active_time_attributes: list[UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_schedule_rotation_active_day_data_attributes_active_time_attributes_item import ( + UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem, + ) + day_name: str | Unset = UNSET if not isinstance(self.day_name, Unset): day_name = self.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 2b671883..3ff473f7 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem") diff --git a/rootly_sdk/models/update_schedule_rotation_data.py b/rootly_sdk/models/update_schedule_rotation_data.py index ac3edd76..629a61db 100644 --- a/rootly_sdk/models/update_schedule_rotation_data.py +++ b/rootly_sdk/models/update_schedule_rotation_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_schedule_rotation_data_type import ( - UpdateScheduleRotationDataType, - check_update_schedule_rotation_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_schedule_rotation_data_type import check_update_schedule_rotation_data_type +from ..models.update_schedule_rotation_data_type import UpdateScheduleRotationDataType +from typing import cast if TYPE_CHECKING: from ..models.update_schedule_rotation_data_attributes import UpdateScheduleRotationDataAttributes @@ -31,6 +32,8 @@ class UpdateScheduleRotationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_schedule_rotation_data_attributes import UpdateScheduleRotationDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes.py b/rootly_sdk/models/update_schedule_rotation_data_attributes.py index c1076835..fde3111e 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes.py @@ -1,19 +1,29 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_schedule_rotation_data_attributes_active_days_item import ( - UpdateScheduleRotationDataAttributesActiveDaysItem, check_update_schedule_rotation_data_attributes_active_days_item, ) +from ..models.update_schedule_rotation_data_attributes_active_days_item import ( + UpdateScheduleRotationDataAttributesActiveDaysItem, +) from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_type import ( - UpdateScheduleRotationDataAttributesScheduleRotationableType, check_update_schedule_rotation_data_attributes_schedule_rotationable_type, ) +from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_type import ( + UpdateScheduleRotationDataAttributesScheduleRotationableType, +) from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime if TYPE_CHECKING: from ..models.update_schedule_rotation_data_attributes_active_time_attributes_item import ( @@ -58,10 +68,10 @@ class UpdateScheduleRotationDataAttributes: UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1 | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2 | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3): - start_time (None | str | Unset): ISO8601 date and time when rotation starts. Shifts will only be created after - this time. - end_time (None | str | Unset): ISO8601 date and time when rotation ends. Shifts will only be created before this - time. + start_time (datetime.datetime | None | Unset): RFC3339 date-time when rotation starts. Shifts will only be + created after this time. + end_time (datetime.datetime | None | Unset): RFC3339 date-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 """ @@ -81,19 +91,28 @@ class UpdateScheduleRotationDataAttributes: | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2 | UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3 ) = UNSET - start_time: None | str | Unset = UNSET - end_time: None | str | Unset = UNSET + start_time: datetime.datetime | None | Unset = UNSET + end_time: datetime.datetime | None | Unset = UNSET schedule_rotation_members: ( list[UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item] | None | Unset ) = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0 import ( - UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0, + from ..models.update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item import ( + UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item, + ) + from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3 import ( + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3, ) from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1 import ( UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1, ) + from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0 import ( + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0, + ) + from ..models.update_schedule_rotation_data_attributes_active_time_attributes_item import ( + UpdateScheduleRotationDataAttributesActiveTimeAttributesItem, + ) from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2 import ( UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2, ) @@ -148,12 +167,16 @@ def to_dict(self) -> dict[str, Any]: start_time: None | str | Unset if isinstance(self.start_time, Unset): start_time = UNSET + elif isinstance(self.start_time, datetime.datetime): + start_time = self.start_time.isoformat() else: start_time = self.start_time end_time: None | str | Unset if isinstance(self.end_time, Unset): end_time = UNSET + elif isinstance(self.end_time, datetime.datetime): + end_time = self.end_time.isoformat() else: end_time = self.end_time @@ -312,21 +335,37 @@ def _parse_schedule_rotationable_attributes( d.pop("schedule_rotationable_attributes", UNSET) ) - def _parse_start_time(data: object) -> None | str | Unset: + def _parse_start_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | str | Unset, data) + try: + if not isinstance(data, str): + raise TypeError() + start_time_type_0 = isoparse(data) + + return start_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) start_time = _parse_start_time(d.pop("start_time", UNSET)) - def _parse_end_time(data: object) -> None | str | Unset: + def _parse_end_time(data: object) -> datetime.datetime | None | Unset: if data is None: return data if isinstance(data, Unset): return data - return cast(None | str | Unset, data) + try: + if not isinstance(data, str): + raise TypeError() + end_time_type_0 = isoparse(data) + + return end_time_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + return cast(datetime.datetime | None | Unset, data) end_time = _parse_end_time(d.pop("end_time", 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 16999eca..cc8a3b51 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesActiveTimeAttributesItem") 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 fd3c09dc..0c1c9d21 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,16 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type import ( - UpdateScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType, check_update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type, ) +from ..models.update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type import ( + UpdateScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item") 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 252cbab7..fd0b0662 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,9 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0") 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 dd465bea..354c6b92 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,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day import ( - UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1HandoffDay, check_update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day, ) +from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day import ( + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1HandoffDay, +) +from typing import cast + T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1") 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 b9b2c88f..4ca2bcec 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,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day import ( - UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2HandoffDay, check_update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day, ) +from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day import ( + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2HandoffDay, +) +from typing import cast + T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2") 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 53f98ff3..b3f31cac 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,14 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit import ( - UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3ShiftLengthUnit, check_update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit, ) +from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit import ( + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3ShiftLengthUnit, +) +from typing import cast + T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3") diff --git a/rootly_sdk/models/update_schedule_rotation_user.py b/rootly_sdk/models/update_schedule_rotation_user.py index 57accee1..0f50730b 100644 --- a/rootly_sdk/models/update_schedule_rotation_user.py +++ b/rootly_sdk/models/update_schedule_rotation_user.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_schedule_rotation_user_data import UpdateScheduleRotationUserData @@ -24,6 +28,8 @@ class UpdateScheduleRotationUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_schedule_rotation_user_data import UpdateScheduleRotationUserData + data = self.data.to_dict() field_dict: 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 36fc2342..85b2a464 100644 --- a/rootly_sdk/models/update_schedule_rotation_user_data.py +++ b/rootly_sdk/models/update_schedule_rotation_user_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_schedule_rotation_user_data_type import ( - UpdateScheduleRotationUserDataType, - check_update_schedule_rotation_user_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_schedule_rotation_user_data_type import check_update_schedule_rotation_user_data_type +from ..models.update_schedule_rotation_user_data_type import UpdateScheduleRotationUserDataType +from typing import cast if TYPE_CHECKING: from ..models.update_schedule_rotation_user_data_attributes import UpdateScheduleRotationUserDataAttributes @@ -31,6 +32,8 @@ class UpdateScheduleRotationUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_schedule_rotation_user_data_attributes import UpdateScheduleRotationUserDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 7b8c2006..d7625184 100644 --- a/rootly_sdk/models/update_schedule_rotation_user_data_attributes.py +++ b/rootly_sdk/models/update_schedule_rotation_user_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateScheduleRotationUserDataAttributes") diff --git a/rootly_sdk/models/update_secret.py b/rootly_sdk/models/update_secret.py index 457fff7a..668f30c5 100644 --- a/rootly_sdk/models/update_secret.py +++ b/rootly_sdk/models/update_secret.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_secret_data import UpdateSecretData @@ -24,6 +28,8 @@ class UpdateSecret: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_secret_data import UpdateSecretData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_secret_data.py b/rootly_sdk/models/update_secret_data.py index 4ecbf3dd..fe78c80a 100644 --- a/rootly_sdk/models/update_secret_data.py +++ b/rootly_sdk/models/update_secret_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_secret_data_type import UpdateSecretDataType, check_update_secret_data_type +from ..types import UNSET, Unset + +from ..models.update_secret_data_type import check_update_secret_data_type +from ..models.update_secret_data_type import UpdateSecretDataType +from typing import cast if TYPE_CHECKING: from ..models.update_secret_data_attributes import UpdateSecretDataAttributes @@ -28,6 +32,8 @@ class UpdateSecretData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_secret_data_attributes import UpdateSecretDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_secret_data_attributes.py b/rootly_sdk/models/update_secret_data_attributes.py index 9aaed46f..b4098cba 100644 --- a/rootly_sdk/models/update_secret_data_attributes.py +++ b/rootly_sdk/models/update_secret_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateSecretDataAttributes") diff --git a/rootly_sdk/models/update_service.py b/rootly_sdk/models/update_service.py index 9aac9b12..9bd2dcdc 100644 --- a/rootly_sdk/models/update_service.py +++ b/rootly_sdk/models/update_service.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_service_data import UpdateServiceData @@ -24,6 +28,8 @@ class UpdateService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_service_data import UpdateServiceData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_service_data.py b/rootly_sdk/models/update_service_data.py index f879f9fa..bdb47056 100644 --- a/rootly_sdk/models/update_service_data.py +++ b/rootly_sdk/models/update_service_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_service_data_type import UpdateServiceDataType, check_update_service_data_type +from ..types import UNSET, Unset + +from ..models.update_service_data_type import check_update_service_data_type +from ..models.update_service_data_type import UpdateServiceDataType +from typing import cast if TYPE_CHECKING: from ..models.update_service_data_attributes import UpdateServiceDataAttributes @@ -28,6 +32,8 @@ class UpdateServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_service_data_attributes import UpdateServiceDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_service_data_attributes.py b/rootly_sdk/models/update_service_data_attributes.py index 2f07c2ad..6455ab8a 100644 --- a/rootly_sdk/models/update_service_data_attributes.py +++ b/rootly_sdk/models/update_service_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_service_data_attributes_alert_broadcast_channel_type_0 import ( UpdateServiceDataAttributesAlertBroadcastChannelType0, @@ -104,11 +108,18 @@ class UpdateServiceDataAttributes: properties: list[UpdateServiceDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_service_data_attributes_properties_item import UpdateServiceDataAttributesPropertiesItem + from ..models.update_service_data_attributes_incident_broadcast_channel_type_0 import ( + UpdateServiceDataAttributesIncidentBroadcastChannelType0, + ) + from ..models.update_service_data_attributes_slack_channels_type_0_item import ( + UpdateServiceDataAttributesSlackChannelsType0Item, + ) from ..models.update_service_data_attributes_alert_broadcast_channel_type_0 import ( UpdateServiceDataAttributesAlertBroadcastChannelType0, ) - from ..models.update_service_data_attributes_incident_broadcast_channel_type_0 import ( - UpdateServiceDataAttributesIncidentBroadcastChannelType0, + from ..models.update_service_data_attributes_slack_aliases_type_0_item import ( + UpdateServiceDataAttributesSlackAliasesType0Item, ) name = self.name 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 ec637d7b..26ec34d3 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateServiceDataAttributesAlertBroadcastChannelType0") 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 aff0a0b6..b378a36f 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateServiceDataAttributesIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/update_service_data_attributes_properties_item.py b/rootly_sdk/models/update_service_data_attributes_properties_item.py index ed866804..0a0646e0 100644 --- a/rootly_sdk/models/update_service_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_service_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateServiceDataAttributesPropertiesItem") 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 1f0653e1..7791294a 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateServiceDataAttributesSlackAliasesType0Item") 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 42f2f67c..d880c772 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateServiceDataAttributesSlackChannelsType0Item") 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 dfb6002f..2949adbf 100644 --- a/rootly_sdk/models/update_service_now_incident_task_params.py +++ b/rootly_sdk/models/update_service_now_incident_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_service_now_incident_task_params_task_type import ( - UpdateServiceNowIncidentTaskParamsTaskType, check_update_service_now_incident_task_params_task_type, ) +from ..models.update_service_now_incident_task_params_task_type import UpdateServiceNowIncidentTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_service_now_incident_task_params_completion import UpdateServiceNowIncidentTaskParamsCompletion @@ -44,6 +47,11 @@ class UpdateServiceNowIncidentTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_service_now_incident_task_params_priority import UpdateServiceNowIncidentTaskParamsPriority + from ..models.update_service_now_incident_task_params_completion import ( + UpdateServiceNowIncidentTaskParamsCompletion, + ) + incident_id = self.incident_id task_type: str | Unset = 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 f88a1164..c5897ac4 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateServiceNowIncidentTaskParamsCompletion") 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 a48fa9a6..4c96ddb0 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateServiceNowIncidentTaskParamsPriority") diff --git a/rootly_sdk/models/update_severity.py b/rootly_sdk/models/update_severity.py index 3916bc02..8b59a68d 100644 --- a/rootly_sdk/models/update_severity.py +++ b/rootly_sdk/models/update_severity.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_severity_data import UpdateSeverityData @@ -24,6 +28,8 @@ class UpdateSeverity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_severity_data import UpdateSeverityData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_severity_data.py b/rootly_sdk/models/update_severity_data.py index f52d5a14..38e70f4d 100644 --- a/rootly_sdk/models/update_severity_data.py +++ b/rootly_sdk/models/update_severity_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_severity_data_type import UpdateSeverityDataType, check_update_severity_data_type +from ..types import UNSET, Unset + +from ..models.update_severity_data_type import check_update_severity_data_type +from ..models.update_severity_data_type import UpdateSeverityDataType +from typing import cast if TYPE_CHECKING: from ..models.update_severity_data_attributes import UpdateSeverityDataAttributes @@ -28,6 +32,8 @@ class UpdateSeverityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_severity_data_attributes import UpdateSeverityDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_severity_data_attributes.py b/rootly_sdk/models/update_severity_data_attributes.py index 52735b8e..c42da7da 100644 --- a/rootly_sdk/models/update_severity_data_attributes.py +++ b/rootly_sdk/models/update_severity_data_attributes.py @@ -1,16 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field -from ..models.update_severity_data_attributes_severity import ( - UpdateSeverityDataAttributesSeverity, - check_update_severity_data_attributes_severity, -) from ..types import UNSET, Unset +from ..models.update_severity_data_attributes_severity import check_update_severity_data_attributes_severity +from ..models.update_severity_data_attributes_severity import UpdateSeverityDataAttributesSeverity +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_severity_data_attributes_slack_aliases_type_0_item import ( UpdateSeverityDataAttributesSlackAliasesType0Item, @@ -49,6 +51,13 @@ class UpdateSeverityDataAttributes: slack_aliases: list[UpdateSeverityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_severity_data_attributes_slack_channels_type_0_item import ( + UpdateSeverityDataAttributesSlackChannelsType0Item, + ) + from ..models.update_severity_data_attributes_slack_aliases_type_0_item import ( + UpdateSeverityDataAttributesSlackAliasesType0Item, + ) + name = self.name description: None | str | 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 ac383ddc..9218e845 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateSeverityDataAttributesSlackAliasesType0Item") 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 e4b47c5e..3e9f702c 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateSeverityDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_sharepoint_page_task_params.py b/rootly_sdk/models/update_sharepoint_page_task_params.py index c8af9115..98a9bc69 100644 --- a/rootly_sdk/models/update_sharepoint_page_task_params.py +++ b/rootly_sdk/models/update_sharepoint_page_task_params.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_sharepoint_page_task_params_task_type import ( - UpdateSharepointPageTaskParamsTaskType, - check_update_sharepoint_page_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_sharepoint_page_task_params_task_type import check_update_sharepoint_page_task_params_task_type +from ..models.update_sharepoint_page_task_params_task_type import UpdateSharepointPageTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateSharepointPageTaskParams") diff --git a/rootly_sdk/models/update_shortcut_story_task_params.py b/rootly_sdk/models/update_shortcut_story_task_params.py index e313e0ac..7d7b2dfa 100644 --- a/rootly_sdk/models/update_shortcut_story_task_params.py +++ b/rootly_sdk/models/update_shortcut_story_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_shortcut_story_task_params_task_type import ( - UpdateShortcutStoryTaskParamsTaskType, - check_update_shortcut_story_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_shortcut_story_task_params_task_type import check_update_shortcut_story_task_params_task_type +from ..models.update_shortcut_story_task_params_task_type import UpdateShortcutStoryTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_shortcut_story_task_params_archivation import UpdateShortcutStoryTaskParamsArchivation @@ -42,6 +43,8 @@ class UpdateShortcutStoryTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_shortcut_story_task_params_archivation import UpdateShortcutStoryTaskParamsArchivation + story_id = self.story_id archivation = self.archivation.to_dict() 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 faabfdc3..b1f27426 100644 --- a/rootly_sdk/models/update_shortcut_story_task_params_archivation.py +++ b/rootly_sdk/models/update_shortcut_story_task_params_archivation.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateShortcutStoryTaskParamsArchivation") diff --git a/rootly_sdk/models/update_shortcut_task_task_params.py b/rootly_sdk/models/update_shortcut_task_task_params.py index d0085575..9be0217b 100644 --- a/rootly_sdk/models/update_shortcut_task_task_params.py +++ b/rootly_sdk/models/update_shortcut_task_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_shortcut_task_task_params_task_type import ( - UpdateShortcutTaskTaskParamsTaskType, - check_update_shortcut_task_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_shortcut_task_task_params_task_type import check_update_shortcut_task_task_params_task_type +from ..models.update_shortcut_task_task_params_task_type import UpdateShortcutTaskTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_shortcut_task_task_params_completion import UpdateShortcutTaskTaskParamsCompletion @@ -38,6 +39,8 @@ class UpdateShortcutTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_shortcut_task_task_params_completion import UpdateShortcutTaskTaskParamsCompletion + task_id = self.task_id parent_story_id = self.parent_story_id 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 1d7d80bf..5e0efecd 100644 --- a/rootly_sdk/models/update_shortcut_task_task_params_completion.py +++ b/rootly_sdk/models/update_shortcut_task_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateShortcutTaskTaskParamsCompletion") diff --git a/rootly_sdk/models/update_sla.py b/rootly_sdk/models/update_sla.py index 6eb58431..43b647d2 100644 --- a/rootly_sdk/models/update_sla.py +++ b/rootly_sdk/models/update_sla.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_sla_data import UpdateSlaData @@ -24,6 +28,8 @@ class UpdateSla: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_sla_data import UpdateSlaData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_sla_data.py b/rootly_sdk/models/update_sla_data.py index b09170b1..cfff0390 100644 --- a/rootly_sdk/models/update_sla_data.py +++ b/rootly_sdk/models/update_sla_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator 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 +from ..types import UNSET, Unset + +from ..models.update_sla_data_type import check_update_sla_data_type +from ..models.update_sla_data_type import UpdateSlaDataType +from typing import cast if TYPE_CHECKING: from ..models.update_sla_data_attributes import UpdateSlaDataAttributes @@ -28,6 +32,8 @@ class UpdateSlaData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_sla_data_attributes import UpdateSlaDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_sla_data_attributes.py b/rootly_sdk/models/update_sla_data_attributes.py index 7ea47c55..ed2952a8 100644 --- a/rootly_sdk/models/update_sla_data_attributes.py +++ b/rootly_sdk/models/update_sla_data_attributes.py @@ -1,32 +1,40 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset 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_days import UpdateSlaDataAttributesAssignmentDeadlineDays 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_assignment_deadline_parent_status import ( + UpdateSlaDataAttributesAssignmentDeadlineParentStatus, +) 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_days import UpdateSlaDataAttributesCompletionDeadlineDays 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_completion_deadline_parent_status import ( + UpdateSlaDataAttributesCompletionDeadlineParentStatus, +) from ..models.update_sla_data_attributes_condition_match_type import ( - UpdateSlaDataAttributesConditionMatchType, check_update_sla_data_attributes_condition_match_type, ) +from ..models.update_sla_data_attributes_condition_match_type import UpdateSlaDataAttributesConditionMatchType from ..types import UNSET, Unset +from typing import cast +from uuid import UUID if TYPE_CHECKING: from ..models.update_sla_data_attributes_conditions_item import UpdateSlaDataAttributesConditionsItem @@ -89,6 +97,11 @@ class UpdateSlaDataAttributes: notification_configurations: list[UpdateSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_sla_data_attributes_notification_configurations_item import ( + UpdateSlaDataAttributesNotificationConfigurationsItem, + ) + from ..models.update_sla_data_attributes_conditions_item import UpdateSlaDataAttributesConditionsItem + name = self.name description: None | str | Unset diff --git a/rootly_sdk/models/update_sla_data_attributes_conditions_item.py b/rootly_sdk/models/update_sla_data_attributes_conditions_item.py index be124497..f9d2f9c0 100644 --- a/rootly_sdk/models/update_sla_data_attributes_conditions_item.py +++ b/rootly_sdk/models/update_sla_data_attributes_conditions_item.py @@ -1,21 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast -from uuid import UUID +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + 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_conditionable_type import ( + UpdateSlaDataAttributesConditionsItemConditionableType, +) from ..models.update_sla_data_attributes_conditions_item_property import ( - UpdateSlaDataAttributesConditionsItemProperty, check_update_sla_data_attributes_conditions_item_property, ) +from ..models.update_sla_data_attributes_conditions_item_property import UpdateSlaDataAttributesConditionsItemProperty from ..types import UNSET, Unset +from typing import cast +from uuid import UUID + T = TypeVar("T", bound="UpdateSlaDataAttributesConditionsItem") @@ -27,7 +33,9 @@ class UpdateSlaDataAttributesConditionsItem: conditionable_type (UpdateSlaDataAttributesConditionsItemConditionableType): The type of condition operator (str): The comparison operator property_ (UpdateSlaDataAttributesConditionsItemProperty | Unset): The property to evaluate (for built-in field - conditions) + conditions). When the team has custom lifecycle statuses enabled, use 'sub_status' (with sub-status IDs as + values); otherwise use 'status' (with parent status names). Sending the wrong one will return a validation + error. 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 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 index d4296bf0..379eda25 100644 --- a/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item.py +++ b/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item.py @@ -1,15 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_sla_data_attributes_notification_configurations_item_offset_type import ( - UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType, check_update_sla_data_attributes_notification_configurations_item_offset_type, ) +from ..models.update_sla_data_attributes_notification_configurations_item_offset_type import ( + UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType, +) +from typing import cast + T = TypeVar("T", bound="UpdateSlaDataAttributesNotificationConfigurationsItem") 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 612712b5..7da5ee62 100644 --- a/rootly_sdk/models/update_slack_channel_topic_task_params.py +++ b/rootly_sdk/models/update_slack_channel_topic_task_params.py @@ -1,16 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_slack_channel_topic_task_params_task_type import ( - UpdateSlackChannelTopicTaskParamsTaskType, check_update_slack_channel_topic_task_params_task_type, ) +from ..models.update_slack_channel_topic_task_params_task_type import UpdateSlackChannelTopicTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast if TYPE_CHECKING: from ..models.update_slack_channel_topic_task_params_channel import UpdateSlackChannelTopicTaskParamsChannel @@ -34,6 +37,8 @@ class UpdateSlackChannelTopicTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_slack_channel_topic_task_params_channel import UpdateSlackChannelTopicTaskParamsChannel + channel = self.channel.to_dict() topic = self.topic 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 134f02c9..ae519e5f 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateSlackChannelTopicTaskParamsChannel") diff --git a/rootly_sdk/models/update_status_page.py b/rootly_sdk/models/update_status_page.py index ef000551..cc7b2003 100644 --- a/rootly_sdk/models/update_status_page.py +++ b/rootly_sdk/models/update_status_page.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_status_page_data import UpdateStatusPageData @@ -24,6 +28,8 @@ class UpdateStatusPage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_status_page_data import UpdateStatusPageData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_status_page_data.py b/rootly_sdk/models/update_status_page_data.py index d20a5a83..ba5dc7ac 100644 --- a/rootly_sdk/models/update_status_page_data.py +++ b/rootly_sdk/models/update_status_page_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_status_page_data_type import UpdateStatusPageDataType, check_update_status_page_data_type +from ..types import UNSET, Unset + +from ..models.update_status_page_data_type import check_update_status_page_data_type +from ..models.update_status_page_data_type import UpdateStatusPageDataType +from typing import cast if TYPE_CHECKING: from ..models.update_status_page_data_attributes import UpdateStatusPageDataAttributes @@ -28,6 +32,8 @@ class UpdateStatusPageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_status_page_data_attributes import UpdateStatusPageDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_status_page_data_attributes.py b/rootly_sdk/models/update_status_page_data_attributes.py index ee451103..267d3b7a 100644 --- a/rootly_sdk/models/update_status_page_data_attributes.py +++ b/rootly_sdk/models/update_status_page_data_attributes.py @@ -1,27 +1,40 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_status_page_data_attributes_authentication_method import ( - UpdateStatusPageDataAttributesAuthenticationMethod, check_update_status_page_data_attributes_authentication_method, ) +from ..models.update_status_page_data_attributes_authentication_method import ( + UpdateStatusPageDataAttributesAuthenticationMethod, +) from ..models.update_status_page_data_attributes_saml_name_identifier_format import ( - UpdateStatusPageDataAttributesSamlNameIdentifierFormat, check_update_status_page_data_attributes_saml_name_identifier_format, ) +from ..models.update_status_page_data_attributes_saml_name_identifier_format import ( + UpdateStatusPageDataAttributesSamlNameIdentifierFormat, +) 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_section_order_type_0_item import ( + UpdateStatusPageDataAttributesSectionOrderType0Item, +) from ..models.update_status_page_data_attributes_show_uptime_last_days import ( - UpdateStatusPageDataAttributesShowUptimeLastDays, check_update_status_page_data_attributes_show_uptime_last_days, ) +from ..models.update_status_page_data_attributes_show_uptime_last_days import ( + UpdateStatusPageDataAttributesShowUptimeLastDays, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateStatusPageDataAttributes") diff --git a/rootly_sdk/models/update_status_page_template.py b/rootly_sdk/models/update_status_page_template.py index 6c781dbf..7e1552da 100644 --- a/rootly_sdk/models/update_status_page_template.py +++ b/rootly_sdk/models/update_status_page_template.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_status_page_template_data import UpdateStatusPageTemplateData @@ -24,6 +28,8 @@ class UpdateStatusPageTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_status_page_template_data import UpdateStatusPageTemplateData + data = self.data.to_dict() field_dict: 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 e75b138f..781e717a 100644 --- a/rootly_sdk/models/update_status_page_template_data.py +++ b/rootly_sdk/models/update_status_page_template_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_status_page_template_data_type import ( - UpdateStatusPageTemplateDataType, - check_update_status_page_template_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_status_page_template_data_type import check_update_status_page_template_data_type +from ..models.update_status_page_template_data_type import UpdateStatusPageTemplateDataType +from typing import cast if TYPE_CHECKING: from ..models.update_status_page_template_data_attributes import UpdateStatusPageTemplateDataAttributes @@ -31,6 +32,8 @@ class UpdateStatusPageTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_status_page_template_data_attributes import UpdateStatusPageTemplateDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 9efc9b6b..8dddc507 100644 --- a/rootly_sdk/models/update_status_page_template_data_attributes.py +++ b/rootly_sdk/models/update_status_page_template_data_attributes.py @@ -1,19 +1,26 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_status_page_template_data_attributes_kind import ( - UpdateStatusPageTemplateDataAttributesKind, check_update_status_page_template_data_attributes_kind, ) +from ..models.update_status_page_template_data_attributes_kind import UpdateStatusPageTemplateDataAttributesKind from ..models.update_status_page_template_data_attributes_update_status import ( - UpdateStatusPageTemplateDataAttributesUpdateStatus, check_update_status_page_template_data_attributes_update_status, ) +from ..models.update_status_page_template_data_attributes_update_status import ( + UpdateStatusPageTemplateDataAttributesUpdateStatus, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateStatusPageTemplateDataAttributes") diff --git a/rootly_sdk/models/update_status_task_params.py b/rootly_sdk/models/update_status_task_params.py index d623cf43..2ae7471a 100644 --- a/rootly_sdk/models/update_status_task_params.py +++ b/rootly_sdk/models/update_status_task_params.py @@ -1,21 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_status_task_params_status import ( - UpdateStatusTaskParamsStatus, - check_update_status_task_params_status, -) -from ..models.update_status_task_params_task_type import ( - UpdateStatusTaskParamsTaskType, - check_update_status_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_status_task_params_status import check_update_status_task_params_status +from ..models.update_status_task_params_status import UpdateStatusTaskParamsStatus +from ..models.update_status_task_params_task_type import check_update_status_task_params_task_type +from ..models.update_status_task_params_task_type import UpdateStatusTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateStatusTaskParams") diff --git a/rootly_sdk/models/update_sub_status.py b/rootly_sdk/models/update_sub_status.py index 5cd3a6ad..a44832e3 100644 --- a/rootly_sdk/models/update_sub_status.py +++ b/rootly_sdk/models/update_sub_status.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_sub_status_data import UpdateSubStatusData @@ -24,6 +28,8 @@ class UpdateSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_sub_status_data import UpdateSubStatusData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_sub_status_data.py b/rootly_sdk/models/update_sub_status_data.py index bb16ef47..85eb1403 100644 --- a/rootly_sdk/models/update_sub_status_data.py +++ b/rootly_sdk/models/update_sub_status_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_sub_status_data_type import UpdateSubStatusDataType, check_update_sub_status_data_type +from ..types import UNSET, Unset + +from ..models.update_sub_status_data_type import check_update_sub_status_data_type +from ..models.update_sub_status_data_type import UpdateSubStatusDataType +from typing import cast if TYPE_CHECKING: from ..models.update_sub_status_data_attributes import UpdateSubStatusDataAttributes @@ -28,6 +32,8 @@ class UpdateSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_sub_status_data_attributes import UpdateSubStatusDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_sub_status_data_attributes.py b/rootly_sdk/models/update_sub_status_data_attributes.py index 06db078d..3eb37d81 100644 --- a/rootly_sdk/models/update_sub_status_data_attributes.py +++ b/rootly_sdk/models/update_sub_status_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateSubStatusDataAttributes") diff --git a/rootly_sdk/models/update_team.py b/rootly_sdk/models/update_team.py index 3168adfb..6d640cfe 100644 --- a/rootly_sdk/models/update_team.py +++ b/rootly_sdk/models/update_team.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_team_data import UpdateTeamData @@ -24,6 +28,8 @@ class UpdateTeam: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_team_data import UpdateTeamData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_team_data.py b/rootly_sdk/models/update_team_data.py index e632bc31..0335a73b 100644 --- a/rootly_sdk/models/update_team_data.py +++ b/rootly_sdk/models/update_team_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_team_data_type import UpdateTeamDataType, check_update_team_data_type +from ..types import UNSET, Unset + +from ..models.update_team_data_type import check_update_team_data_type +from ..models.update_team_data_type import UpdateTeamDataType +from typing import cast if TYPE_CHECKING: from ..models.update_team_data_attributes import UpdateTeamDataAttributes @@ -28,6 +32,8 @@ class UpdateTeamData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_team_data_attributes import UpdateTeamDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_team_data_attributes.py b/rootly_sdk/models/update_team_data_attributes.py index f8393a51..ca5a21f5 100644 --- a/rootly_sdk/models/update_team_data_attributes.py +++ b/rootly_sdk/models/update_team_data_attributes.py @@ -1,12 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..models.update_team_data_attributes_auto_add_members_scope import ( + check_update_team_data_attributes_auto_add_members_scope, +) +from ..models.update_team_data_attributes_auto_add_members_scope import UpdateTeamDataAttributesAutoAddMembersScope +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_team_data_attributes_alert_broadcast_channel_type_0 import ( UpdateTeamDataAttributesAlertBroadcastChannelType0, @@ -61,6 +69,9 @@ class UpdateTeamDataAttributes: 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 + auto_add_members_scope (UpdateTeamDataAttributesAutoAddMembersScope | Unset): Visibility-scoped auto-add + behavior. Only present when the `enable_scoped_incident_channel_auto_add` feature flag is on for the + organization. When set, it overrides `auto_add_members_when_attached`. properties (list[UpdateTeamDataAttributesPropertiesItem] | Unset): Array of property values for this team. """ @@ -89,15 +100,23 @@ class UpdateTeamDataAttributes: incident_broadcast_enabled: bool | None | Unset = UNSET incident_broadcast_channel: None | Unset | UpdateTeamDataAttributesIncidentBroadcastChannelType0 = UNSET auto_add_members_when_attached: bool | None | Unset = UNSET + auto_add_members_scope: UpdateTeamDataAttributesAutoAddMembersScope | Unset = UNSET properties: list[UpdateTeamDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_team_data_attributes_slack_aliases_type_0_item import ( + UpdateTeamDataAttributesSlackAliasesType0Item, + ) + from ..models.update_team_data_attributes_properties_item import UpdateTeamDataAttributesPropertiesItem from ..models.update_team_data_attributes_alert_broadcast_channel_type_0 import ( UpdateTeamDataAttributesAlertBroadcastChannelType0, ) from ..models.update_team_data_attributes_incident_broadcast_channel_type_0 import ( UpdateTeamDataAttributesIncidentBroadcastChannelType0, ) + from ..models.update_team_data_attributes_slack_channels_type_0_item import ( + UpdateTeamDataAttributesSlackChannelsType0Item, + ) name = self.name @@ -270,6 +289,10 @@ def to_dict(self) -> dict[str, Any]: else: auto_add_members_when_attached = self.auto_add_members_when_attached + auto_add_members_scope: str | Unset = UNSET + if not isinstance(self.auto_add_members_scope, Unset): + auto_add_members_scope = self.auto_add_members_scope + properties: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.properties, Unset): properties = [] @@ -330,6 +353,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 auto_add_members_scope is not UNSET: + field_dict["auto_add_members_scope"] = auto_add_members_scope if properties is not UNSET: field_dict["properties"] = properties @@ -648,6 +673,13 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: d.pop("auto_add_members_when_attached", UNSET) ) + _auto_add_members_scope = d.pop("auto_add_members_scope", UNSET) + auto_add_members_scope: UpdateTeamDataAttributesAutoAddMembersScope | Unset + if isinstance(_auto_add_members_scope, Unset): + auto_add_members_scope = UNSET + else: + auto_add_members_scope = check_update_team_data_attributes_auto_add_members_scope(_auto_add_members_scope) + _properties = d.pop("properties", UNSET) properties: list[UpdateTeamDataAttributesPropertiesItem] | Unset = UNSET if _properties is not UNSET: @@ -683,6 +715,7 @@ def _parse_auto_add_members_when_attached(data: object) -> bool | None | Unset: incident_broadcast_enabled=incident_broadcast_enabled, incident_broadcast_channel=incident_broadcast_channel, auto_add_members_when_attached=auto_add_members_when_attached, + auto_add_members_scope=auto_add_members_scope, properties=properties, ) 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 d609ce1e..000b0985 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateTeamDataAttributesAlertBroadcastChannelType0") diff --git a/rootly_sdk/models/update_team_data_attributes_auto_add_members_scope.py b/rootly_sdk/models/update_team_data_attributes_auto_add_members_scope.py new file mode 100644 index 00000000..3e0a926f --- /dev/null +++ b/rootly_sdk/models/update_team_data_attributes_auto_add_members_scope.py @@ -0,0 +1,22 @@ +from typing import Literal, cast + +UpdateTeamDataAttributesAutoAddMembersScope = Literal["all", "off", "public_and_test", "public_only"] + +UPDATE_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES: set[UpdateTeamDataAttributesAutoAddMembersScope] = { + "all", + "off", + "public_and_test", + "public_only", +} + + +def check_update_team_data_attributes_auto_add_members_scope( + value: str | None, +) -> UpdateTeamDataAttributesAutoAddMembersScope | None: + if value is None: + return None + if value in UPDATE_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES: + return cast(UpdateTeamDataAttributesAutoAddMembersScope, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_TEAM_DATA_ATTRIBUTES_AUTO_ADD_MEMBERS_SCOPE_VALUES!r}" + ) 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 66230036..fda329f2 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateTeamDataAttributesIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/update_team_data_attributes_properties_item.py b/rootly_sdk/models/update_team_data_attributes_properties_item.py index 4a14f3eb..41d7d9a2 100644 --- a/rootly_sdk/models/update_team_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_team_data_attributes_properties_item.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateTeamDataAttributesPropertiesItem") 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 9ed2220b..fc5f1d03 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateTeamDataAttributesSlackAliasesType0Item") 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 0d642c32..1deea951 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,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateTeamDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_trello_card_task_params.py b/rootly_sdk/models/update_trello_card_task_params.py index b71d98a0..645f89a2 100644 --- a/rootly_sdk/models/update_trello_card_task_params.py +++ b/rootly_sdk/models/update_trello_card_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_trello_card_task_params_task_type import ( - UpdateTrelloCardTaskParamsTaskType, - check_update_trello_card_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_trello_card_task_params_task_type import check_update_trello_card_task_params_task_type +from ..models.update_trello_card_task_params_task_type import UpdateTrelloCardTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_trello_card_task_params_archivation import UpdateTrelloCardTaskParamsArchivation from ..models.update_trello_card_task_params_board import UpdateTrelloCardTaskParamsBoard @@ -49,6 +50,11 @@ class UpdateTrelloCardTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_trello_card_task_params_board import UpdateTrelloCardTaskParamsBoard + from ..models.update_trello_card_task_params_archivation import UpdateTrelloCardTaskParamsArchivation + from ..models.update_trello_card_task_params_labels_item import UpdateTrelloCardTaskParamsLabelsItem + from ..models.update_trello_card_task_params_list import UpdateTrelloCardTaskParamsList + card_id = self.card_id archivation = self.archivation.to_dict() 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 14b2a7be..9cf8ac22 100644 --- a/rootly_sdk/models/update_trello_card_task_params_archivation.py +++ b/rootly_sdk/models/update_trello_card_task_params_archivation.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateTrelloCardTaskParamsArchivation") 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 586b06c8..668b57b6 100644 --- a/rootly_sdk/models/update_trello_card_task_params_board.py +++ b/rootly_sdk/models/update_trello_card_task_params_board.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateTrelloCardTaskParamsBoard") 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 061422b6..3973345d 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,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateTrelloCardTaskParamsLabelsItem") 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 bd084e60..d7a3fb70 100644 --- a/rootly_sdk/models/update_trello_card_task_params_list.py +++ b/rootly_sdk/models/update_trello_card_task_params_list.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateTrelloCardTaskParamsList") diff --git a/rootly_sdk/models/update_user.py b/rootly_sdk/models/update_user.py index d935db30..a8b8a7a3 100644 --- a/rootly_sdk/models/update_user.py +++ b/rootly_sdk/models/update_user.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_user_data import UpdateUserData @@ -24,6 +28,8 @@ class UpdateUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_user_data import UpdateUserData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_user_data.py b/rootly_sdk/models/update_user_data.py index 95e780bb..5f60ef2e 100644 --- a/rootly_sdk/models/update_user_data.py +++ b/rootly_sdk/models/update_user_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_user_data_type import UpdateUserDataType, check_update_user_data_type +from ..types import UNSET, Unset + +from ..models.update_user_data_type import check_update_user_data_type +from ..models.update_user_data_type import UpdateUserDataType +from typing import cast if TYPE_CHECKING: from ..models.update_user_data_attributes import UpdateUserDataAttributes @@ -28,6 +32,8 @@ class UpdateUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_user_data_attributes import UpdateUserDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_user_data_attributes.py b/rootly_sdk/models/update_user_data_attributes.py index 1ef584d0..dcd9171c 100644 --- a/rootly_sdk/models/update_user_data_attributes.py +++ b/rootly_sdk/models/update_user_data_attributes.py @@ -1,12 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateUserDataAttributes") diff --git a/rootly_sdk/models/update_user_email_address.py b/rootly_sdk/models/update_user_email_address.py index b744ccab..d3abba4c 100644 --- a/rootly_sdk/models/update_user_email_address.py +++ b/rootly_sdk/models/update_user_email_address.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_user_email_address_data import UpdateUserEmailAddressData @@ -24,6 +28,8 @@ class UpdateUserEmailAddress: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_user_email_address_data import UpdateUserEmailAddressData + data = self.data.to_dict() field_dict: 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 999aebf1..177c5a47 100644 --- a/rootly_sdk/models/update_user_email_address_data.py +++ b/rootly_sdk/models/update_user_email_address_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_user_email_address_data_type import ( - UpdateUserEmailAddressDataType, - check_update_user_email_address_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_user_email_address_data_type import check_update_user_email_address_data_type +from ..models.update_user_email_address_data_type import UpdateUserEmailAddressDataType +from typing import cast if TYPE_CHECKING: from ..models.update_user_email_address_data_attributes import UpdateUserEmailAddressDataAttributes @@ -31,6 +32,8 @@ class UpdateUserEmailAddressData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_user_email_address_data_attributes import UpdateUserEmailAddressDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 977a87b2..f3af0aa3 100644 --- a/rootly_sdk/models/update_user_email_address_data_attributes.py +++ b/rootly_sdk/models/update_user_email_address_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateUserEmailAddressDataAttributes") diff --git a/rootly_sdk/models/update_user_notification_rule.py b/rootly_sdk/models/update_user_notification_rule.py index 0c612570..b1a5fd82 100644 --- a/rootly_sdk/models/update_user_notification_rule.py +++ b/rootly_sdk/models/update_user_notification_rule.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_user_notification_rule_data import UpdateUserNotificationRuleData @@ -24,6 +28,8 @@ class UpdateUserNotificationRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_user_notification_rule_data import UpdateUserNotificationRuleData + data = self.data.to_dict() field_dict: 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 f9651ad1..eae9cf8e 100644 --- a/rootly_sdk/models/update_user_notification_rule_data.py +++ b/rootly_sdk/models/update_user_notification_rule_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_user_notification_rule_data_type import ( - UpdateUserNotificationRuleDataType, - check_update_user_notification_rule_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_user_notification_rule_data_type import check_update_user_notification_rule_data_type +from ..models.update_user_notification_rule_data_type import UpdateUserNotificationRuleDataType +from typing import cast if TYPE_CHECKING: from ..models.update_user_notification_rule_data_attributes import UpdateUserNotificationRuleDataAttributes @@ -31,6 +32,8 @@ class UpdateUserNotificationRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_user_notification_rule_data_attributes import UpdateUserNotificationRuleDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 8c2a5196..e6e2a91b 100644 --- a/rootly_sdk/models/update_user_notification_rule_data_attributes.py +++ b/rootly_sdk/models/update_user_notification_rule_data_attributes.py @@ -1,15 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_user_notification_rule_data_attributes_enabled_contact_types_item import ( - UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem, check_update_user_notification_rule_data_attributes_enabled_contact_types_item, ) +from ..models.update_user_notification_rule_data_attributes_enabled_contact_types_item import ( + UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateUserNotificationRuleDataAttributes") diff --git a/rootly_sdk/models/update_user_notification_rule_data_attributes_enabled_contact_types_item.py b/rootly_sdk/models/update_user_notification_rule_data_attributes_enabled_contact_types_item.py index 60dc41a6..481a0d9a 100644 --- a/rootly_sdk/models/update_user_notification_rule_data_attributes_enabled_contact_types_item.py +++ b/rootly_sdk/models/update_user_notification_rule_data_attributes_enabled_contact_types_item.py @@ -1,7 +1,7 @@ from typing import Literal, cast UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem = Literal[ - "call", "device", "email", "non_critical_device", "slack", "sms" + "call", "device", "email", "google_chat", "non_critical_device", "slack", "sms" ] UPDATE_USER_NOTIFICATION_RULE_DATA_ATTRIBUTES_ENABLED_CONTACT_TYPES_ITEM_VALUES: set[ @@ -10,6 +10,7 @@ "call", "device", "email", + "google_chat", "non_critical_device", "slack", "sms", diff --git a/rootly_sdk/models/update_user_phone_number.py b/rootly_sdk/models/update_user_phone_number.py index 32de0ee5..ea8ba078 100644 --- a/rootly_sdk/models/update_user_phone_number.py +++ b/rootly_sdk/models/update_user_phone_number.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_user_phone_number_data import UpdateUserPhoneNumberData @@ -24,6 +28,8 @@ class UpdateUserPhoneNumber: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_user_phone_number_data import UpdateUserPhoneNumberData + data = self.data.to_dict() field_dict: 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 3e0d69d9..8d03b313 100644 --- a/rootly_sdk/models/update_user_phone_number_data.py +++ b/rootly_sdk/models/update_user_phone_number_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_user_phone_number_data_type import ( - UpdateUserPhoneNumberDataType, - check_update_user_phone_number_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_user_phone_number_data_type import check_update_user_phone_number_data_type +from ..models.update_user_phone_number_data_type import UpdateUserPhoneNumberDataType +from typing import cast if TYPE_CHECKING: from ..models.update_user_phone_number_data_attributes import UpdateUserPhoneNumberDataAttributes @@ -31,6 +32,8 @@ class UpdateUserPhoneNumberData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_user_phone_number_data_attributes import UpdateUserPhoneNumberDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() 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 28772c0b..2d909bc6 100644 --- a/rootly_sdk/models/update_user_phone_number_data_attributes.py +++ b/rootly_sdk/models/update_user_phone_number_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateUserPhoneNumberDataAttributes") 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 861fb6d5..e0ee1944 100644 --- a/rootly_sdk/models/update_victor_ops_incident_task_params.py +++ b/rootly_sdk/models/update_victor_ops_incident_task_params.py @@ -1,20 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_victor_ops_incident_task_params_status import ( - UpdateVictorOpsIncidentTaskParamsStatus, - check_update_victor_ops_incident_task_params_status, -) +from ..types import UNSET, Unset + +from ..models.update_victor_ops_incident_task_params_status import check_update_victor_ops_incident_task_params_status +from ..models.update_victor_ops_incident_task_params_status import UpdateVictorOpsIncidentTaskParamsStatus from ..models.update_victor_ops_incident_task_params_task_type import ( - UpdateVictorOpsIncidentTaskParamsTaskType, check_update_victor_ops_incident_task_params_task_type, ) +from ..models.update_victor_ops_incident_task_params_task_type import UpdateVictorOpsIncidentTaskParamsTaskType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateVictorOpsIncidentTaskParams") diff --git a/rootly_sdk/models/update_webhooks_endpoint.py b/rootly_sdk/models/update_webhooks_endpoint.py index 8fae8e34..61f7c804 100644 --- a/rootly_sdk/models/update_webhooks_endpoint.py +++ b/rootly_sdk/models/update_webhooks_endpoint.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_webhooks_endpoint_data import UpdateWebhooksEndpointData @@ -24,6 +28,8 @@ class UpdateWebhooksEndpoint: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_webhooks_endpoint_data import UpdateWebhooksEndpointData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_webhooks_endpoint_data.py b/rootly_sdk/models/update_webhooks_endpoint_data.py index 1988848c..4d149ee7 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_webhooks_endpoint_data_type import ( - UpdateWebhooksEndpointDataType, - check_update_webhooks_endpoint_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_webhooks_endpoint_data_type import check_update_webhooks_endpoint_data_type +from ..models.update_webhooks_endpoint_data_type import UpdateWebhooksEndpointDataType +from typing import cast if TYPE_CHECKING: from ..models.update_webhooks_endpoint_data_attributes import UpdateWebhooksEndpointDataAttributes @@ -31,6 +32,8 @@ class UpdateWebhooksEndpointData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_webhooks_endpoint_data_attributes import UpdateWebhooksEndpointDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py b/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py index a0dd08ea..af8a1f5b 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py @@ -1,15 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_webhooks_endpoint_data_attributes_event_types_item import ( - UpdateWebhooksEndpointDataAttributesEventTypesItem, check_update_webhooks_endpoint_data_attributes_event_types_item, ) +from ..models.update_webhooks_endpoint_data_attributes_event_types_item import ( + UpdateWebhooksEndpointDataAttributesEventTypesItem, +) from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.update_webhooks_endpoint_data_attributes_custom_headers_item import ( + UpdateWebhooksEndpointDataAttributesCustomHeadersItem, + ) + T = TypeVar("T", bound="UpdateWebhooksEndpointDataAttributes") @@ -21,13 +33,20 @@ class UpdateWebhooksEndpointDataAttributes: name (str | Unset): The name of the endpoint event_types (list[UpdateWebhooksEndpointDataAttributesEventTypesItem] | Unset): enabled (bool | Unset): + custom_headers (list[UpdateWebhooksEndpointDataAttributesCustomHeadersItem] | Unset): Custom HTTP headers sent + with each delivery. Max 10. Reserved names (Content-Type, X-Rootly-Signature, Host, etc.) are rejected. """ name: str | Unset = UNSET event_types: list[UpdateWebhooksEndpointDataAttributesEventTypesItem] | Unset = UNSET enabled: bool | Unset = UNSET + custom_headers: list[UpdateWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: + from ..models.update_webhooks_endpoint_data_attributes_custom_headers_item import ( + UpdateWebhooksEndpointDataAttributesCustomHeadersItem, + ) + name = self.name event_types: list[str] | Unset = UNSET @@ -39,6 +58,13 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled + custom_headers: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.custom_headers, Unset): + custom_headers = [] + for custom_headers_item_data in self.custom_headers: + custom_headers_item = custom_headers_item_data.to_dict() + custom_headers.append(custom_headers_item) + field_dict: dict[str, Any] = {} field_dict.update({}) @@ -48,11 +74,17 @@ def to_dict(self) -> dict[str, Any]: field_dict["event_types"] = event_types if enabled is not UNSET: field_dict["enabled"] = enabled + if custom_headers is not UNSET: + field_dict["custom_headers"] = custom_headers return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.update_webhooks_endpoint_data_attributes_custom_headers_item import ( + UpdateWebhooksEndpointDataAttributesCustomHeadersItem, + ) + d = dict(src_dict) name = d.pop("name", UNSET) @@ -69,10 +101,22 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: enabled = d.pop("enabled", UNSET) + _custom_headers = d.pop("custom_headers", UNSET) + custom_headers: list[UpdateWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET + if _custom_headers is not UNSET: + custom_headers = [] + for custom_headers_item_data in _custom_headers: + custom_headers_item = UpdateWebhooksEndpointDataAttributesCustomHeadersItem.from_dict( + custom_headers_item_data + ) + + custom_headers.append(custom_headers_item) + update_webhooks_endpoint_data_attributes = cls( name=name, event_types=event_types, enabled=enabled, + custom_headers=custom_headers, ) return update_webhooks_endpoint_data_attributes diff --git a/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py new file mode 100644 index 00000000..f1304a84 --- /dev/null +++ b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="UpdateWebhooksEndpointDataAttributesCustomHeadersItem") + + +@_attrs_define +class UpdateWebhooksEndpointDataAttributesCustomHeadersItem: + """ + Attributes: + name (str): + value (str): + """ + + name: str + value: str + + def to_dict(self) -> dict[str, Any]: + name = self.name + + value = self.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + value = d.pop("value") + + update_webhooks_endpoint_data_attributes_custom_headers_item = cls( + name=name, + value=value, + ) + + return update_webhooks_endpoint_data_attributes_custom_headers_item diff --git a/rootly_sdk/models/update_webhooks_endpoint_data_attributes_event_types_item.py b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_event_types_item.py index 83a29d11..9cdc03f1 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data_attributes_event_types_item.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_event_types_item.py @@ -2,6 +2,7 @@ UpdateWebhooksEndpointDataAttributesEventTypesItem = Literal[ "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -30,12 +31,14 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", ] UPDATE_WEBHOOKS_ENDPOINT_DATA_ATTRIBUTES_EVENT_TYPES_ITEM_VALUES: set[ UpdateWebhooksEndpointDataAttributesEventTypesItem ] = { "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -64,6 +67,7 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", } diff --git a/rootly_sdk/models/update_workflow.py b/rootly_sdk/models/update_workflow.py index 56054fff..711e32fe 100644 --- a/rootly_sdk/models/update_workflow.py +++ b/rootly_sdk/models/update_workflow.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_workflow_data import UpdateWorkflowData @@ -24,6 +28,8 @@ class UpdateWorkflow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_data import UpdateWorkflowData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..698d34c8 --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition.py @@ -0,0 +1,79 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.update_workflow_action_item_form_field_condition_data import ( + UpdateWorkflowActionItemFormFieldConditionData, + ) + + +T = TypeVar("T", bound="UpdateWorkflowActionItemFormFieldCondition") + + +@_attrs_define +class UpdateWorkflowActionItemFormFieldCondition: + """ + Attributes: + data (UpdateWorkflowActionItemFormFieldConditionData): + """ + + data: UpdateWorkflowActionItemFormFieldConditionData + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_action_item_form_field_condition_data import ( + UpdateWorkflowActionItemFormFieldConditionData, + ) + + 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_workflow_action_item_form_field_condition_data import ( + UpdateWorkflowActionItemFormFieldConditionData, + ) + + d = dict(src_dict) + data = UpdateWorkflowActionItemFormFieldConditionData.from_dict(d.pop("data")) + + update_workflow_action_item_form_field_condition = cls( + data=data, + ) + + update_workflow_action_item_form_field_condition.additional_properties = d + return update_workflow_action_item_form_field_condition + + @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_workflow_action_item_form_field_condition_data.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py new file mode 100644 index 00000000..2f9a609d --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py @@ -0,0 +1,93 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_workflow_action_item_form_field_condition_data_type import ( + check_update_workflow_action_item_form_field_condition_data_type, +) +from ..models.update_workflow_action_item_form_field_condition_data_type import ( + UpdateWorkflowActionItemFormFieldConditionDataType, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.update_workflow_action_item_form_field_condition_data_attributes import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributes, + ) + + +T = TypeVar("T", bound="UpdateWorkflowActionItemFormFieldConditionData") + + +@_attrs_define +class UpdateWorkflowActionItemFormFieldConditionData: + """ + Attributes: + type_ (UpdateWorkflowActionItemFormFieldConditionDataType): + attributes (UpdateWorkflowActionItemFormFieldConditionDataAttributes): + """ + + type_: UpdateWorkflowActionItemFormFieldConditionDataType + attributes: UpdateWorkflowActionItemFormFieldConditionDataAttributes + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_action_item_form_field_condition_data_attributes import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributes, + ) + + 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_workflow_action_item_form_field_condition_data_attributes import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributes, + ) + + d = dict(src_dict) + type_ = check_update_workflow_action_item_form_field_condition_data_type(d.pop("type")) + + attributes = UpdateWorkflowActionItemFormFieldConditionDataAttributes.from_dict(d.pop("attributes")) + + update_workflow_action_item_form_field_condition_data = cls( + type_=type_, + attributes=attributes, + ) + + update_workflow_action_item_form_field_condition_data.additional_properties = d + return update_workflow_action_item_form_field_condition_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_workflow_action_item_form_field_condition_data_attributes.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py new file mode 100644 index 00000000..bfcd1d8d --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py @@ -0,0 +1,175 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.update_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + check_update_workflow_action_item_form_field_condition_data_attributes_action_item_condition, +) +from ..models.update_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( + UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="UpdateWorkflowActionItemFormFieldConditionDataAttributes") + + +@_attrs_define +class UpdateWorkflowActionItemFormFieldConditionDataAttributes: + """ + Attributes: + action_item_condition (UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | Unset): The + trigger condition Default: 'ANY'. + 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): + """ + + action_item_condition: UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | 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]: + action_item_condition: str | Unset = UNSET + if not isinstance(self.action_item_condition, Unset): + action_item_condition = self.action_item_condition + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_functionality_ids, Unset): + selected_functionality_ids = self.selected_functionality_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_option_ids, Unset): + selected_option_ids = self.selected_option_ids + + 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: list[int] | Unset = UNSET + if not isinstance(self.selected_user_ids, Unset): + selected_user_ids = self.selected_user_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_environment_ids, Unset): + selected_environment_ids = self.selected_environment_ids + + 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 + + field_dict: dict[str, Any] = {} + + field_dict.update({}) + if action_item_condition is not UNSET: + field_dict["action_item_condition"] = action_item_condition + if values is not UNSET: + field_dict["values"] = values + if selected_catalog_entity_ids is not UNSET: + field_dict["selected_catalog_entity_ids"] = selected_catalog_entity_ids + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_option_ids is not UNSET: + field_dict["selected_option_ids"] = selected_option_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_user_ids is not UNSET: + field_dict["selected_user_ids"] = selected_user_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + _action_item_condition = d.pop("action_item_condition", UNSET) + action_item_condition: UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | Unset + if isinstance(_action_item_condition, Unset): + action_item_condition = UNSET + else: + action_item_condition = ( + check_update_workflow_action_item_form_field_condition_data_attributes_action_item_condition( + _action_item_condition + ) + ) + + values = cast(list[str], d.pop("values", UNSET)) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + update_workflow_action_item_form_field_condition_data_attributes = cls( + action_item_condition=action_item_condition, + values=values, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_functionality_ids=selected_functionality_ids, + selected_group_ids=selected_group_ids, + selected_option_ids=selected_option_ids, + selected_service_ids=selected_service_ids, + selected_user_ids=selected_user_ids, + selected_cause_ids=selected_cause_ids, + selected_environment_ids=selected_environment_ids, + selected_incident_type_ids=selected_incident_type_ids, + ) + + return update_workflow_action_item_form_field_condition_data_attributes diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py new file mode 100644 index 00000000..3066c1d2 --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes_action_item_condition.py @@ -0,0 +1,31 @@ +from typing import Literal, cast + +UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES: set[ + UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition +] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_update_workflow_action_item_form_field_condition_data_attributes_action_item_condition( + value: str | None, +) -> UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition | None: + if value is None: + return None + if value in UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES: + return cast(UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_ATTRIBUTES_ACTION_ITEM_CONDITION_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_type.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_type.py new file mode 100644 index 00000000..9583ae17 --- /dev/null +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +UpdateWorkflowActionItemFormFieldConditionDataType = Literal["workflow_action_item_form_field_conditions"] + +UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES: set[ + UpdateWorkflowActionItemFormFieldConditionDataType +] = { + "workflow_action_item_form_field_conditions", +} + + +def check_update_workflow_action_item_form_field_condition_data_type( + value: str | None, +) -> UpdateWorkflowActionItemFormFieldConditionDataType | None: + if value is None: + return None + if value in UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES: + return cast(UpdateWorkflowActionItemFormFieldConditionDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {UPDATE_WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/update_workflow_custom_field_selection.py b/rootly_sdk/models/update_workflow_custom_field_selection.py index 965431c3..93001b45 100644 --- a/rootly_sdk/models/update_workflow_custom_field_selection.py +++ b/rootly_sdk/models/update_workflow_custom_field_selection.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_workflow_custom_field_selection_data import UpdateWorkflowCustomFieldSelectionData @@ -24,6 +28,8 @@ class UpdateWorkflowCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_custom_field_selection_data import UpdateWorkflowCustomFieldSelectionData + data = self.data.to_dict() field_dict: 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 d11e0ae3..e69a4222 100644 --- a/rootly_sdk/models/update_workflow_custom_field_selection_data.py +++ b/rootly_sdk/models/update_workflow_custom_field_selection_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.update_workflow_custom_field_selection_data_type import ( - UpdateWorkflowCustomFieldSelectionDataType, check_update_workflow_custom_field_selection_data_type, ) +from ..models.update_workflow_custom_field_selection_data_type import UpdateWorkflowCustomFieldSelectionDataType +from typing import cast if TYPE_CHECKING: from ..models.update_workflow_custom_field_selection_data_attributes import ( @@ -33,6 +36,10 @@ class UpdateWorkflowCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_custom_field_selection_data_attributes import ( + UpdateWorkflowCustomFieldSelectionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 6aa9476a..caa873f4 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,15 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_workflow_custom_field_selection_data_attributes_incident_condition import ( - UpdateWorkflowCustomFieldSelectionDataAttributesIncidentCondition, check_update_workflow_custom_field_selection_data_attributes_incident_condition, ) +from ..models.update_workflow_custom_field_selection_data_attributes_incident_condition import ( + UpdateWorkflowCustomFieldSelectionDataAttributesIncidentCondition, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateWorkflowCustomFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/update_workflow_data.py b/rootly_sdk/models/update_workflow_data.py index 91f4f38e..3a549b27 100644 --- a/rootly_sdk/models/update_workflow_data.py +++ b/rootly_sdk/models/update_workflow_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_workflow_data_type import UpdateWorkflowDataType, check_update_workflow_data_type +from ..types import UNSET, Unset + +from ..models.update_workflow_data_type import check_update_workflow_data_type +from ..models.update_workflow_data_type import UpdateWorkflowDataType +from typing import cast if TYPE_CHECKING: from ..models.update_workflow_data_attributes import UpdateWorkflowDataAttributes @@ -28,6 +32,8 @@ class UpdateWorkflowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_data_attributes import UpdateWorkflowDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_workflow_data_attributes.py b/rootly_sdk/models/update_workflow_data_attributes.py index be178cbf..b21fdad1 100644 --- a/rootly_sdk/models/update_workflow_data_attributes.py +++ b/rootly_sdk/models/update_workflow_data_attributes.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.action_item_trigger_params import ActionItemTriggerParams from ..models.alert_trigger_params import AlertTriggerParams @@ -84,9 +88,10 @@ class UpdateWorkflowDataAttributes: sub_status_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.action_item_trigger_params import ActionItemTriggerParams - from ..models.alert_trigger_params import AlertTriggerParams + from ..models.simple_trigger_params import SimpleTriggerParams from ..models.incident_trigger_params import IncidentTriggerParams + from ..models.alert_trigger_params import AlertTriggerParams + from ..models.action_item_trigger_params import ActionItemTriggerParams from ..models.pulse_trigger_params import PulseTriggerParams name = self.name diff --git a/rootly_sdk/models/update_workflow_form_field_condition.py b/rootly_sdk/models/update_workflow_form_field_condition.py index 4495825c..0e397e03 100644 --- a/rootly_sdk/models/update_workflow_form_field_condition.py +++ b/rootly_sdk/models/update_workflow_form_field_condition.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_workflow_form_field_condition_data import UpdateWorkflowFormFieldConditionData @@ -24,6 +28,8 @@ class UpdateWorkflowFormFieldCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_form_field_condition_data import UpdateWorkflowFormFieldConditionData + data = self.data.to_dict() field_dict: 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 a4139688..031618a9 100644 --- a/rootly_sdk/models/update_workflow_form_field_condition_data.py +++ b/rootly_sdk/models/update_workflow_form_field_condition_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_workflow_form_field_condition_data_type import ( - UpdateWorkflowFormFieldConditionDataType, - check_update_workflow_form_field_condition_data_type, -) +from ..types import UNSET, Unset + +from ..models.update_workflow_form_field_condition_data_type import check_update_workflow_form_field_condition_data_type +from ..models.update_workflow_form_field_condition_data_type import UpdateWorkflowFormFieldConditionDataType +from typing import cast if TYPE_CHECKING: from ..models.update_workflow_form_field_condition_data_attributes import ( @@ -33,6 +34,10 @@ class UpdateWorkflowFormFieldConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_form_field_condition_data_attributes import ( + UpdateWorkflowFormFieldConditionDataAttributes, + ) + type_: str = self.type_ attributes = self.attributes.to_dict() 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 212d2286..97d4be88 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,15 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset from ..models.update_workflow_form_field_condition_data_attributes_incident_condition import ( - UpdateWorkflowFormFieldConditionDataAttributesIncidentCondition, check_update_workflow_form_field_condition_data_attributes_incident_condition, ) +from ..models.update_workflow_form_field_condition_data_attributes_incident_condition import ( + UpdateWorkflowFormFieldConditionDataAttributesIncidentCondition, +) from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UpdateWorkflowFormFieldConditionDataAttributes") diff --git a/rootly_sdk/models/update_workflow_group.py b/rootly_sdk/models/update_workflow_group.py index 0944145e..d586e78e 100644 --- a/rootly_sdk/models/update_workflow_group.py +++ b/rootly_sdk/models/update_workflow_group.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_workflow_group_data import UpdateWorkflowGroupData @@ -24,6 +28,8 @@ class UpdateWorkflowGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_group_data import UpdateWorkflowGroupData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_workflow_group_data.py b/rootly_sdk/models/update_workflow_group_data.py index be072563..1f975baa 100644 --- a/rootly_sdk/models/update_workflow_group_data.py +++ b/rootly_sdk/models/update_workflow_group_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_workflow_group_data_type import UpdateWorkflowGroupDataType, check_update_workflow_group_data_type +from ..types import UNSET, Unset + +from ..models.update_workflow_group_data_type import check_update_workflow_group_data_type +from ..models.update_workflow_group_data_type import UpdateWorkflowGroupDataType +from typing import cast if TYPE_CHECKING: from ..models.update_workflow_group_data_attributes import UpdateWorkflowGroupDataAttributes @@ -28,6 +32,8 @@ class UpdateWorkflowGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_group_data_attributes import UpdateWorkflowGroupDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_workflow_group_data_attributes.py b/rootly_sdk/models/update_workflow_group_data_attributes.py index b61fd078..9b9de082 100644 --- a/rootly_sdk/models/update_workflow_group_data_attributes.py +++ b/rootly_sdk/models/update_workflow_group_data_attributes.py @@ -1,17 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_workflow_group_data_attributes_kind import ( - UpdateWorkflowGroupDataAttributesKind, - check_update_workflow_group_data_attributes_kind, -) from ..types import UNSET, Unset +from ..models.update_workflow_group_data_attributes_kind import check_update_workflow_group_data_attributes_kind +from ..models.update_workflow_group_data_attributes_kind import UpdateWorkflowGroupDataAttributesKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UpdateWorkflowGroupDataAttributes") diff --git a/rootly_sdk/models/update_workflow_task.py b/rootly_sdk/models/update_workflow_task.py index 3fb3bb7b..9cebb024 100644 --- a/rootly_sdk/models/update_workflow_task.py +++ b/rootly_sdk/models/update_workflow_task.py @@ -1,11 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + if TYPE_CHECKING: from ..models.update_workflow_task_data import UpdateWorkflowTaskData @@ -24,6 +28,8 @@ class UpdateWorkflowTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_task_data import UpdateWorkflowTaskData + data = self.data.to_dict() field_dict: dict[str, Any] = {} diff --git a/rootly_sdk/models/update_workflow_task_data.py b/rootly_sdk/models/update_workflow_task_data.py index 4f992383..a0fb52fc 100644 --- a/rootly_sdk/models/update_workflow_task_data.py +++ b/rootly_sdk/models/update_workflow_task_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_workflow_task_data_type import UpdateWorkflowTaskDataType, check_update_workflow_task_data_type +from ..types import UNSET, Unset + +from ..models.update_workflow_task_data_type import check_update_workflow_task_data_type +from ..models.update_workflow_task_data_type import UpdateWorkflowTaskDataType +from typing import cast if TYPE_CHECKING: from ..models.update_workflow_task_data_attributes import UpdateWorkflowTaskDataAttributes @@ -28,6 +32,8 @@ class UpdateWorkflowTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_workflow_task_data_attributes import UpdateWorkflowTaskDataAttributes + type_: str = self.type_ attributes = self.attributes.to_dict() diff --git a/rootly_sdk/models/update_workflow_task_data_attributes.py b/rootly_sdk/models/update_workflow_task_data_attributes.py index c6dcf4ea..d3aafdcb 100644 --- a/rootly_sdk/models/update_workflow_task_data_attributes.py +++ b/rootly_sdk/models/update_workflow_task_data_attributes.py @@ -1,25 +1,38 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define +from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import AttachRetrospectivePdfToJiraIssueTaskParams from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -34,6 +47,7 @@ from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -60,6 +74,8 @@ from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -70,26 +86,60 @@ from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 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 + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -110,6 +160,7 @@ from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -145,41 +196,56 @@ class UpdateWorkflowTaskDataAttributes: 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 | + task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams | AddSlackBookmarkTaskParamsType0 | + AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams | + ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | + AttachDatadogDashboardsTaskParams | AttachRetrospectivePdfToJiraIssueTaskParams | + AutoAssignRoleOpsgenieTaskParams | AutoAssignRolePagerdutyTaskParamsType0 | + AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | + CallPeopleTaskParams | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | + CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | + CreateAsanaTaskTaskParams | CreateClickupTaskTaskParams | CreateCodaPageTaskParams | + CreateConfluencePageTaskParams | CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | + CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | + CreateGoogleChatSpaceTaskParams | 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 | CreateShortcutStoryTaskParamsType0 | + CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | + CreateSubIncidentTaskParams | CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | + CreateWebexMeetingTaskParams | CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | + CreateZoomMeetingTaskParams | GetAlertsTaskParams | GetGithubCommitsTaskParamsType0 | + GetGithubCommitsTaskParamsType1 | GetGitlabCommitsTaskParamsType0 | GetGitlabCommitsTaskParamsType1 | + GetPulsesTaskParams | HttpClientTaskParams | InviteToGoogleChatSpaceTaskParams | + InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | + InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelPagerdutyTaskParamsType0 | + InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams | + InviteToSlackChannelTaskParamsType0 | InviteToSlackChannelTaskParamsType1 | InviteToSlackChannelTaskParamsType2 + | 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 | + PageRootlyOnCallRespondersTaskParams | PageVictorOpsOnCallRespondersTaskParamsType0 | + PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | + RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams | RenameGoogleChatSpaceTaskParams | + RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | + SendDashboardReportTaskParams | SendEmailTaskParams | SendGoogleChatAttachmentsTaskParams | + SendGoogleChatMessageTaskParams | SendMicrosoftTeamsBlocksTaskParamsType0 | + SendMicrosoftTeamsChatMessageTaskParams | SendMicrosoftTeamsMessageTaskParamsType0 | + SendSlackBlocksTaskParamsType0 | SendSlackBlocksTaskParamsType1 | SendSlackBlocksTaskParamsType2 | + SendSlackMessageTaskParamsType0 | SendSlackMessageTaskParamsType1 | SendSlackMessageTaskParamsType2 | + SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams | + SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | SnapshotNewRelicGraphTaskParams | + TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | Unset | UpdateActionItemTaskParams | + UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | UpdateAttachedAlertsTaskParams | + UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | UpdateConfluencePageTaskParams | + UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | UpdateGithubIssueTaskParams | + UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams | UpdateIncidentTaskParams | UpdateJiraIssueTaskParams | UpdateLinearIssueTaskParams | UpdateMotionTaskTaskParams | UpdateNotionPageTaskParams | UpdateOpsgenieAlertTaskParams | UpdateOpsgenieIncidentTaskParams | @@ -196,17 +262,25 @@ class UpdateWorkflowTaskDataAttributes: task_params: ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -220,6 +294,7 @@ class UpdateWorkflowTaskDataAttributes: | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -247,6 +322,8 @@ class UpdateWorkflowTaskDataAttributes: | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -257,26 +334,50 @@ class UpdateWorkflowTaskDataAttributes: | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -298,6 +399,7 @@ class UpdateWorkflowTaskDataAttributes: | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -323,130 +425,179 @@ class UpdateWorkflowTaskDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.add_action_item_task_params import AddActionItemTaskParams - from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams - from ..models.add_role_task_params import AddRoleTaskParams - from ..models.add_team_task_params import AddTeamTaskParams - from ..models.add_to_timeline_task_params import AddToTimelineTaskParams - from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams - from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 + from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams + from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams - from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams - from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams - from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams - from ..models.call_people_task_params import CallPeopleTaskParams - from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams - from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams - from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams - from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams - from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams - from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams - from ..models.create_coda_page_task_params import CreateCodaPageTaskParams + from ..models.create_notion_page_task_params import CreateNotionPageTaskParams + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.create_confluence_page_task_params import CreateConfluencePageTaskParams - from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams - from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams - from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams - from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams + from ..models.send_sms_task_params import SendSmsTaskParams + from ..models.call_people_task_params import CallPeopleTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams + from ..models.create_incident_task_params import CreateIncidentTaskParams + from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 + from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams + from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams + from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams + from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams + from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams + from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams + from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams + from ..models.get_pulses_task_params import GetPulsesTaskParams + from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams + from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams + from ..models.publish_incident_task_params import PublishIncidentTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams + from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams + from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams + from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams + from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams - from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams - from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams + from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams + from ..models.update_incident_task_params import UpdateIncidentTaskParams + from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.add_team_task_params import AddTeamTaskParams + from ..models.update_status_task_params import UpdateStatusTaskParams + from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 + from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams + from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) + from ..models.redis_client_task_params import RedisClientTaskParams + from ..models.add_action_item_task_params import AddActionItemTaskParams + from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams + from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.http_client_task_params import HttpClientTaskParams + from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams from ..models.create_google_meeting_task_params import CreateGoogleMeetingTaskParams - from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams - 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.update_asana_task_task_params import UpdateAsanaTaskTaskParams + from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 + from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams + from ..models.create_coda_page_task_params import CreateCodaPageTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) 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 - from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams - from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams - from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams - from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams + from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams + from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams + from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams + from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams + from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams + from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams + from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams + from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_motion_task_task_params import CreateMotionTaskTaskParams - from ..models.create_notion_page_task_params import CreateNotionPageTaskParams - from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams - from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams - from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams - from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams - from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams + from ..models.update_action_item_task_params import UpdateActionItemTaskParams + from ..models.print_task_params import PrintTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.create_quip_page_task_params import CreateQuipPageTaskParams + from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams + from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams + from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams - from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams - from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams - from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams - from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams - from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams - from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams + from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams + from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams + from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams + from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams + from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.create_webex_meeting_task_params import CreateWebexMeetingTaskParams - from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams - from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams - from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams - from ..models.get_alerts_task_params import GetAlertsTaskParams - from ..models.get_pulses_task_params import GetPulsesTaskParams - from ..models.http_client_task_params import HttpClientTaskParams - from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams - 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 - from ..models.print_task_params import PrintTaskParams - from ..models.publish_incident_task_params import PublishIncidentTaskParams - from ..models.redis_client_task_params import RedisClientTaskParams + from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams + from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams + from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams + from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams + from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams + from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams + from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams + from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams + from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams + from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams + from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.add_role_task_params import AddRoleTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams - from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams - from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams - from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams + from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams + from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams + from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.send_email_task_params import SendEmailTaskParams - from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams - from ..models.send_sms_task_params import SendSmsTaskParams - from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams - from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams - from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams + from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.snapshot_looker_look_task_params import SnapshotLookerLookTaskParams - from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams - from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams - from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams - from ..models.update_action_item_task_params import UpdateActionItemTaskParams - from ..models.update_airtable_table_record_task_params import UpdateAirtableTableRecordTaskParams - from ..models.update_asana_task_task_params import UpdateAsanaTaskTaskParams - from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams + from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams + from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams + from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams + from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams from ..models.update_clickup_task_task_params import UpdateClickupTaskTaskParams - from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams - from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams - from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams - from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams - from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams + from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.update_airtable_table_record_task_params import UpdateAirtableTableRecordTaskParams + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams + from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 + from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams - from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams - from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams - from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams - from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams - from ..models.update_incident_task_params import UpdateIncidentTaskParams - from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams - from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams - from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams - from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams - from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams + from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams from ..models.update_opsgenie_incident_task_params import UpdateOpsgenieIncidentTaskParams - from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams - from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams - from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams - from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams - from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams - from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams - from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams - from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams - from ..models.update_status_task_params import UpdateStatusTaskParams - from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams - from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams - from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams + from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams + from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams + from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams name = self.name @@ -456,7 +607,7 @@ def to_dict(self) -> dict[str, Any]: enabled = self.enabled - task_params: Any | dict[str, Any] | Unset + task_params: dict[str, Any] | Unset if isinstance(self.task_params, Unset): task_params = UNSET elif isinstance(self.task_params, AddActionItemTaskParams): @@ -465,6 +616,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddRoleTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddTeamTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddToTimelineTaskParams): @@ -477,6 +632,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, AutoAssignRoleRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdatePagerdutyIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreatePagerdutyStatusUpdateTaskParams): @@ -541,6 +700,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateJiraSubtaskTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AttachRetrospectivePdfToJiraIssueTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearIssueTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearSubtaskIssueTaskParams): @@ -553,8 +714,28 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMicrosoftTeamsChatTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddMicrosoftTeamsChatTabTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatMessageTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatAttachmentsTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ArchiveGoogleChatSpacesTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, RenameGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, UpdateGoogleChatSpaceDescriptionTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ChangeGoogleChatSpacePrivacyTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, ArchiveMicrosoftTeamsChannelsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, RenameMicrosoftTeamsChannelTaskParams): @@ -563,8 +744,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateNotionPageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsMessageTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendMicrosoftTeamsChatMessageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsBlocksTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateNotionPageTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateQuipPageTaskParams): @@ -579,6 +764,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateServiceNowIncidentTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateShortcutTaskTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateTrelloCardTaskParams): @@ -595,6 +784,14 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateZoomMeetingTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetPulsesTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetAlertsTaskParams): @@ -605,6 +802,18 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToMicrosoftTeamsChannelRootlyTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelVictorOpsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PageOpsgenieOnCallRespondersTaskParams): @@ -623,6 +832,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, PagePagerdutyOnCallRespondersTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateVictorOpsIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PrintTaskParams): @@ -643,6 +856,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateSlackChannelTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendSmsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendWhatsappMessageTaskParams): @@ -697,6 +916,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, TriggerWorkflowTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateOpenaiChatCompletionTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateWatsonxChatCompletionTaskParams): @@ -705,10 +930,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMistralChatCompletionTaskParams): task_params = self.task_params.to_dict() - elif isinstance(self.task_params, CreateAnthropicChatCompletionTaskParams): - task_params = self.task_params.to_dict() else: - task_params = self.task_params + task_params = self.task_params.to_dict() field_dict: dict[str, Any] = {} @@ -730,16 +953,27 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -754,6 +988,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -780,6 +1015,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -790,26 +1027,60 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 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 + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -830,6 +1101,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -867,17 +1139,25 @@ def _parse_task_params( ) -> ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -891,6 +1171,7 @@ def _parse_task_params( | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -918,6 +1199,8 @@ def _parse_task_params( | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -928,26 +1211,50 @@ def _parse_task_params( | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -969,6 +1276,7 @@ def _parse_task_params( | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -1018,6 +1326,22 @@ def _parse_task_params( return task_params_type_2 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_0 = AddSlackBookmarkTaskParamsType0.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_1 = AddSlackBookmarkTaskParamsType1.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1066,6 +1390,26 @@ def _parse_task_params( return task_params_type_9 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_0 = ( + AutoAssignRolePagerdutyTaskParamsType0.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_1 = ( + AutoAssignRolePagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1325,7 +1669,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_43 = CreateLinearIssueTaskParams.from_dict(data) + task_params_type_43 = AttachRetrospectivePdfToJiraIssueTaskParams.from_dict(data) return task_params_type_43 except (TypeError, ValueError, AttributeError, KeyError): @@ -1333,7 +1677,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_44 = CreateLinearSubtaskIssueTaskParams.from_dict(data) + task_params_type_44 = CreateLinearIssueTaskParams.from_dict(data) return task_params_type_44 except (TypeError, ValueError, AttributeError, KeyError): @@ -1341,7 +1685,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_45 = CreateLinearIssueCommentTaskParams.from_dict(data) + task_params_type_45 = CreateLinearSubtaskIssueTaskParams.from_dict(data) return task_params_type_45 except (TypeError, ValueError, AttributeError, KeyError): @@ -1349,7 +1693,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_46 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) + task_params_type_46 = CreateLinearIssueCommentTaskParams.from_dict(data) return task_params_type_46 except (TypeError, ValueError, AttributeError, KeyError): @@ -1357,7 +1701,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_47 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_47 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) return task_params_type_47 except (TypeError, ValueError, AttributeError, KeyError): @@ -1365,7 +1709,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_48 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + task_params_type_48 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_48 except (TypeError, ValueError, AttributeError, KeyError): @@ -1373,15 +1717,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_50 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) + task_params_type_49 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + + return task_params_type_49 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_microsoft_teams_tab_task_params_type_0 = ( + AddMicrosoftTeamsTabTaskParamsType0.from_dict(data) + ) - return task_params_type_50 + return componentsschemasadd_microsoft_teams_tab_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_51 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) + componentsschemasadd_microsoft_teams_tab_task_params_type_1 = ( + AddMicrosoftTeamsTabTaskParamsType1.from_dict(data) + ) + + return componentsschemasadd_microsoft_teams_tab_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_51 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) return task_params_type_51 except (TypeError, ValueError, AttributeError, KeyError): @@ -1389,7 +1753,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_52 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_52 = CreateGoogleChatSpaceTaskParams.from_dict(data) return task_params_type_52 except (TypeError, ValueError, AttributeError, KeyError): @@ -1397,7 +1761,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_53 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_53 = SendGoogleChatMessageTaskParams.from_dict(data) return task_params_type_53 except (TypeError, ValueError, AttributeError, KeyError): @@ -1405,7 +1769,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_54 = CreateNotionPageTaskParams.from_dict(data) + task_params_type_54 = SendGoogleChatAttachmentsTaskParams.from_dict(data) return task_params_type_54 except (TypeError, ValueError, AttributeError, KeyError): @@ -1413,7 +1777,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_56 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) + task_params_type_55 = InviteToGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_55 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_56 = ArchiveGoogleChatSpacesTaskParams.from_dict(data) return task_params_type_56 except (TypeError, ValueError, AttributeError, KeyError): @@ -1421,7 +1793,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_58 = UpdateNotionPageTaskParams.from_dict(data) + task_params_type_57 = RenameGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_57 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_58 = UpdateGoogleChatSpaceDescriptionTaskParams.from_dict(data) return task_params_type_58 except (TypeError, ValueError, AttributeError, KeyError): @@ -1429,7 +1809,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_59 = UpdateQuipPageTaskParams.from_dict(data) + task_params_type_59 = ChangeGoogleChatSpacePrivacyTaskParams.from_dict(data) return task_params_type_59 except (TypeError, ValueError, AttributeError, KeyError): @@ -1437,7 +1817,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_60 = UpdateConfluencePageTaskParams.from_dict(data) + task_params_type_60 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) return task_params_type_60 except (TypeError, ValueError, AttributeError, KeyError): @@ -1445,7 +1825,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_61 = UpdateSharepointPageTaskParams.from_dict(data) + task_params_type_61 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_61 except (TypeError, ValueError, AttributeError, KeyError): @@ -1453,7 +1833,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_62 = UpdateDropboxPaperPageTaskParams.from_dict(data) + task_params_type_62 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_62 except (TypeError, ValueError, AttributeError, KeyError): @@ -1461,7 +1841,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_63 = UpdateDatadogNotebookTaskParams.from_dict(data) + task_params_type_63 = CreateNotionPageTaskParams.from_dict(data) return task_params_type_63 except (TypeError, ValueError, AttributeError, KeyError): @@ -1469,23 +1849,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_64 = CreateServiceNowIncidentTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_message_task_params_type_0 = ( + SendMicrosoftTeamsMessageTaskParamsType0.from_dict(data) + ) + + return componentsschemassend_microsoft_teams_message_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_65 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) - return task_params_type_64 + return task_params_type_65 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_66 = CreateShortcutTaskTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_blocks_task_params_type_0 = ( + SendMicrosoftTeamsBlocksTaskParamsType0.from_dict(data) + ) - return task_params_type_66 + return componentsschemassend_microsoft_teams_blocks_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_67 = CreateTrelloCardTaskParams.from_dict(data) + task_params_type_67 = UpdateNotionPageTaskParams.from_dict(data) return task_params_type_67 except (TypeError, ValueError, AttributeError, KeyError): @@ -1493,7 +1885,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_68 = CreateWebexMeetingTaskParams.from_dict(data) + task_params_type_68 = UpdateQuipPageTaskParams.from_dict(data) return task_params_type_68 except (TypeError, ValueError, AttributeError, KeyError): @@ -1501,7 +1893,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_69 = CreateZendeskTicketTaskParams.from_dict(data) + task_params_type_69 = UpdateConfluencePageTaskParams.from_dict(data) return task_params_type_69 except (TypeError, ValueError, AttributeError, KeyError): @@ -1509,7 +1901,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_70 = CreateZendeskJiraLinkTaskParams.from_dict(data) + task_params_type_70 = UpdateSharepointPageTaskParams.from_dict(data) return task_params_type_70 except (TypeError, ValueError, AttributeError, KeyError): @@ -1517,7 +1909,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_71 = CreateClickupTaskTaskParams.from_dict(data) + task_params_type_71 = UpdateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_71 except (TypeError, ValueError, AttributeError, KeyError): @@ -1525,7 +1917,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_72 = CreateMotionTaskTaskParams.from_dict(data) + task_params_type_72 = UpdateDatadogNotebookTaskParams.from_dict(data) return task_params_type_72 except (TypeError, ValueError, AttributeError, KeyError): @@ -1533,7 +1925,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_73 = CreateZoomMeetingTaskParams.from_dict(data) + task_params_type_73 = CreateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_73 except (TypeError, ValueError, AttributeError, KeyError): @@ -1541,7 +1933,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_76 = GetPulsesTaskParams.from_dict(data) + componentsschemascreate_shortcut_story_task_params_type_0 = ( + CreateShortcutStoryTaskParamsType0.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemascreate_shortcut_story_task_params_type_1 = ( + CreateShortcutStoryTaskParamsType1.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_75 = CreateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_75 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_76 = CreateTrelloCardTaskParams.from_dict(data) return task_params_type_76 except (TypeError, ValueError, AttributeError, KeyError): @@ -1549,7 +1969,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_77 = GetAlertsTaskParams.from_dict(data) + task_params_type_77 = CreateWebexMeetingTaskParams.from_dict(data) return task_params_type_77 except (TypeError, ValueError, AttributeError, KeyError): @@ -1557,7 +1977,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_78 = HttpClientTaskParams.from_dict(data) + task_params_type_78 = CreateZendeskTicketTaskParams.from_dict(data) return task_params_type_78 except (TypeError, ValueError, AttributeError, KeyError): @@ -1565,7 +1985,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_79 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) + task_params_type_79 = CreateZendeskJiraLinkTaskParams.from_dict(data) return task_params_type_79 except (TypeError, ValueError, AttributeError, KeyError): @@ -1573,7 +1993,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_80 = InviteToSlackChannelRootlyTaskParams.from_dict(data) + task_params_type_80 = CreateClickupTaskTaskParams.from_dict(data) return task_params_type_80 except (TypeError, ValueError, AttributeError, KeyError): @@ -1581,23 +2001,55 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_83 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) + task_params_type_81 = CreateMotionTaskTaskParams.from_dict(data) + + return task_params_type_81 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_82 = CreateZoomMeetingTaskParams.from_dict(data) + + return task_params_type_82 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_0 = GetGithubCommitsTaskParamsType0.from_dict(data) + + return componentsschemasget_github_commits_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_1 = GetGithubCommitsTaskParamsType1.from_dict(data) - return task_params_type_83 + return componentsschemasget_github_commits_task_params_type_1 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_84 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_0 = GetGitlabCommitsTaskParamsType0.from_dict(data) - return task_params_type_84 + return componentsschemasget_gitlab_commits_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_85 = CreateOpsgenieAlertTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_1 = GetGitlabCommitsTaskParamsType1.from_dict(data) + + return componentsschemasget_gitlab_commits_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_85 = GetPulsesTaskParams.from_dict(data) return task_params_type_85 except (TypeError, ValueError, AttributeError, KeyError): @@ -1605,7 +2057,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_86 = CreateJsmopsAlertTaskParams.from_dict(data) + task_params_type_86 = GetAlertsTaskParams.from_dict(data) return task_params_type_86 except (TypeError, ValueError, AttributeError, KeyError): @@ -1613,7 +2065,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_87 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) + task_params_type_87 = HttpClientTaskParams.from_dict(data) return task_params_type_87 except (TypeError, ValueError, AttributeError, KeyError): @@ -1621,7 +2073,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_88 = UpdateOpsgenieAlertTaskParams.from_dict(data) + task_params_type_88 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) return task_params_type_88 except (TypeError, ValueError, AttributeError, KeyError): @@ -1629,7 +2081,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_89 = UpdateOpsgenieIncidentTaskParams.from_dict(data) + task_params_type_89 = InviteToSlackChannelRootlyTaskParams.from_dict(data) return task_params_type_89 except (TypeError, ValueError, AttributeError, KeyError): @@ -1637,7 +2089,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_90 = PageRootlyOnCallRespondersTaskParams.from_dict(data) + task_params_type_90 = InviteToMicrosoftTeamsChannelRootlyTaskParams.from_dict(data) return task_params_type_90 except (TypeError, ValueError, AttributeError, KeyError): @@ -1645,15 +2097,57 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_91 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 = ( + InviteToSlackChannelPagerdutyTaskParamsType0.from_dict(data) + ) - return task_params_type_91 + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_93 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 = ( + InviteToSlackChannelPagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_0 = ( + InviteToSlackChannelTaskParamsType0.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_1 = ( + InviteToSlackChannelTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_2 = ( + InviteToSlackChannelTaskParamsType2.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_93 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) return task_params_type_93 except (TypeError, ValueError, AttributeError, KeyError): @@ -1661,7 +2155,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_94 = PrintTaskParams.from_dict(data) + task_params_type_94 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) return task_params_type_94 except (TypeError, ValueError, AttributeError, KeyError): @@ -1669,7 +2163,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_95 = PublishIncidentTaskParams.from_dict(data) + task_params_type_95 = CreateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_95 except (TypeError, ValueError, AttributeError, KeyError): @@ -1677,7 +2171,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_96 = RedisClientTaskParams.from_dict(data) + task_params_type_96 = CreateJsmopsAlertTaskParams.from_dict(data) return task_params_type_96 except (TypeError, ValueError, AttributeError, KeyError): @@ -1685,7 +2179,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_97 = RenameSlackChannelTaskParams.from_dict(data) + task_params_type_97 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) return task_params_type_97 except (TypeError, ValueError, AttributeError, KeyError): @@ -1693,7 +2187,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_98 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) + task_params_type_98 = UpdateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_98 except (TypeError, ValueError, AttributeError, KeyError): @@ -1701,7 +2195,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_99 = RunCommandHerokuTaskParams.from_dict(data) + task_params_type_99 = UpdateOpsgenieIncidentTaskParams.from_dict(data) return task_params_type_99 except (TypeError, ValueError, AttributeError, KeyError): @@ -1709,7 +2203,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_100 = SendEmailTaskParams.from_dict(data) + task_params_type_100 = PageRootlyOnCallRespondersTaskParams.from_dict(data) return task_params_type_100 except (TypeError, ValueError, AttributeError, KeyError): @@ -1717,7 +2211,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_101 = SendDashboardReportTaskParams.from_dict(data) + task_params_type_101 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) return task_params_type_101 except (TypeError, ValueError, AttributeError, KeyError): @@ -1725,15 +2219,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_102 = CreateSlackChannelTaskParams.from_dict(data) + componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 = ( + PageVictorOpsOnCallRespondersTaskParamsType0.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 = ( + PageVictorOpsOnCallRespondersTaskParamsType1.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_103 = UpdateVictorOpsIncidentTaskParams.from_dict(data) - return task_params_type_102 + return task_params_type_103 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_104 = SendSmsTaskParams.from_dict(data) + task_params_type_104 = PrintTaskParams.from_dict(data) return task_params_type_104 except (TypeError, ValueError, AttributeError, KeyError): @@ -1741,7 +2255,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_105 = SendWhatsappMessageTaskParams.from_dict(data) + task_params_type_105 = PublishIncidentTaskParams.from_dict(data) return task_params_type_105 except (TypeError, ValueError, AttributeError, KeyError): @@ -1749,7 +2263,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_106 = SnapshotDatadogGraphTaskParams.from_dict(data) + task_params_type_106 = RedisClientTaskParams.from_dict(data) return task_params_type_106 except (TypeError, ValueError, AttributeError, KeyError): @@ -1757,7 +2271,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_107 = SnapshotGrafanaDashboardTaskParams.from_dict(data) + task_params_type_107 = RenameSlackChannelTaskParams.from_dict(data) return task_params_type_107 except (TypeError, ValueError, AttributeError, KeyError): @@ -1765,7 +2279,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_108 = SnapshotLookerLookTaskParams.from_dict(data) + task_params_type_108 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) return task_params_type_108 except (TypeError, ValueError, AttributeError, KeyError): @@ -1773,7 +2287,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_109 = SnapshotNewRelicGraphTaskParams.from_dict(data) + task_params_type_109 = RunCommandHerokuTaskParams.from_dict(data) return task_params_type_109 except (TypeError, ValueError, AttributeError, KeyError): @@ -1781,7 +2295,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_110 = TweetTwitterMessageTaskParams.from_dict(data) + task_params_type_110 = SendEmailTaskParams.from_dict(data) return task_params_type_110 except (TypeError, ValueError, AttributeError, KeyError): @@ -1789,7 +2303,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_111 = UpdateAirtableTableRecordTaskParams.from_dict(data) + task_params_type_111 = SendDashboardReportTaskParams.from_dict(data) return task_params_type_111 except (TypeError, ValueError, AttributeError, KeyError): @@ -1797,7 +2311,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_112 = UpdateAsanaTaskTaskParams.from_dict(data) + task_params_type_112 = CreateSlackChannelTaskParams.from_dict(data) return task_params_type_112 except (TypeError, ValueError, AttributeError, KeyError): @@ -1805,15 +2319,31 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_113 = UpdateGithubIssueTaskParams.from_dict(data) + componentsschemassend_slack_message_task_params_type_0 = SendSlackMessageTaskParamsType0.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_message_task_params_type_1 = SendSlackMessageTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_message_task_params_type_2 = SendSlackMessageTaskParamsType2.from_dict(data) - return task_params_type_113 + return componentsschemassend_slack_message_task_params_type_2 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_114 = UpdateGitlabIssueTaskParams.from_dict(data) + task_params_type_114 = SendSmsTaskParams.from_dict(data) return task_params_type_114 except (TypeError, ValueError, AttributeError, KeyError): @@ -1821,7 +2351,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_115 = UpdateIncidentTaskParams.from_dict(data) + task_params_type_115 = SendWhatsappMessageTaskParams.from_dict(data) return task_params_type_115 except (TypeError, ValueError, AttributeError, KeyError): @@ -1829,7 +2359,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_116 = UpdateIncidentPostmortemTaskParams.from_dict(data) + task_params_type_116 = SnapshotDatadogGraphTaskParams.from_dict(data) return task_params_type_116 except (TypeError, ValueError, AttributeError, KeyError): @@ -1837,7 +2367,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_117 = UpdateJiraIssueTaskParams.from_dict(data) + task_params_type_117 = SnapshotGrafanaDashboardTaskParams.from_dict(data) return task_params_type_117 except (TypeError, ValueError, AttributeError, KeyError): @@ -1845,7 +2375,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_118 = UpdateLinearIssueTaskParams.from_dict(data) + task_params_type_118 = SnapshotLookerLookTaskParams.from_dict(data) return task_params_type_118 except (TypeError, ValueError, AttributeError, KeyError): @@ -1853,7 +2383,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_119 = UpdateServiceNowIncidentTaskParams.from_dict(data) + task_params_type_119 = SnapshotNewRelicGraphTaskParams.from_dict(data) return task_params_type_119 except (TypeError, ValueError, AttributeError, KeyError): @@ -1861,7 +2391,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_120 = UpdateShortcutStoryTaskParams.from_dict(data) + task_params_type_120 = TweetTwitterMessageTaskParams.from_dict(data) return task_params_type_120 except (TypeError, ValueError, AttributeError, KeyError): @@ -1869,7 +2399,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_121 = UpdateShortcutTaskTaskParams.from_dict(data) + task_params_type_121 = UpdateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_121 except (TypeError, ValueError, AttributeError, KeyError): @@ -1877,7 +2407,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_122 = UpdateSlackChannelTopicTaskParams.from_dict(data) + task_params_type_122 = UpdateAsanaTaskTaskParams.from_dict(data) return task_params_type_122 except (TypeError, ValueError, AttributeError, KeyError): @@ -1885,7 +2415,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_123 = UpdateStatusTaskParams.from_dict(data) + task_params_type_123 = UpdateGithubIssueTaskParams.from_dict(data) return task_params_type_123 except (TypeError, ValueError, AttributeError, KeyError): @@ -1893,7 +2423,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_124 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) + task_params_type_124 = UpdateGitlabIssueTaskParams.from_dict(data) return task_params_type_124 except (TypeError, ValueError, AttributeError, KeyError): @@ -1901,7 +2431,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_125 = UpdateTrelloCardTaskParams.from_dict(data) + task_params_type_125 = UpdateIncidentTaskParams.from_dict(data) return task_params_type_125 except (TypeError, ValueError, AttributeError, KeyError): @@ -1909,7 +2439,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_126 = UpdateClickupTaskTaskParams.from_dict(data) + task_params_type_126 = UpdateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_126 except (TypeError, ValueError, AttributeError, KeyError): @@ -1917,7 +2447,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_127 = UpdateMotionTaskTaskParams.from_dict(data) + task_params_type_127 = UpdateJiraIssueTaskParams.from_dict(data) return task_params_type_127 except (TypeError, ValueError, AttributeError, KeyError): @@ -1925,7 +2455,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_128 = UpdateZendeskTicketTaskParams.from_dict(data) + task_params_type_128 = UpdateLinearIssueTaskParams.from_dict(data) return task_params_type_128 except (TypeError, ValueError, AttributeError, KeyError): @@ -1933,7 +2463,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_129 = UpdateAttachedAlertsTaskParams.from_dict(data) + task_params_type_129 = UpdateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_129 except (TypeError, ValueError, AttributeError, KeyError): @@ -1941,7 +2471,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_130 = TriggerWorkflowTaskParams.from_dict(data) + task_params_type_130 = UpdateShortcutStoryTaskParams.from_dict(data) return task_params_type_130 except (TypeError, ValueError, AttributeError, KeyError): @@ -1949,7 +2479,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_132 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + task_params_type_131 = UpdateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_131 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_132 = UpdateSlackChannelTopicTaskParams.from_dict(data) return task_params_type_132 except (TypeError, ValueError, AttributeError, KeyError): @@ -1957,7 +2495,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_133 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + task_params_type_133 = UpdateStatusTaskParams.from_dict(data) return task_params_type_133 except (TypeError, ValueError, AttributeError, KeyError): @@ -1965,7 +2503,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_134 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + task_params_type_134 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) return task_params_type_134 except (TypeError, ValueError, AttributeError, KeyError): @@ -1973,7 +2511,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_135 = CreateMistralChatCompletionTaskParams.from_dict(data) + task_params_type_135 = UpdateTrelloCardTaskParams.from_dict(data) return task_params_type_135 except (TypeError, ValueError, AttributeError, KeyError): @@ -1981,140 +2519,104 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_136 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + task_params_type_136 = UpdateClickupTaskTaskParams.from_dict(data) return task_params_type_136 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - 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, - ) + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_137 = UpdateMotionTaskTaskParams.from_dict(data) + + return task_params_type_137 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_138 = UpdateZendeskTicketTaskParams.from_dict(data) + + return task_params_type_138 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_139 = UpdateAttachedAlertsTaskParams.from_dict(data) + + return task_params_type_139 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_140 = TriggerWorkflowTaskParams.from_dict(data) + + return task_params_type_140 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_0 = SendSlackBlocksTaskParamsType0.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_1 = SendSlackBlocksTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_2 = SendSlackBlocksTaskParamsType2.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_142 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + + return task_params_type_142 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_143 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + + return task_params_type_143 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_144 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + + return task_params_type_144 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_145 = CreateMistralChatCompletionTaskParams.from_dict(data) + + return task_params_type_145 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + task_params_type_146 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + + return task_params_type_146 task_params = _parse_task_params(d.pop("task_params", UNSET)) diff --git a/rootly_sdk/models/update_zendesk_ticket_task_params.py b/rootly_sdk/models/update_zendesk_ticket_task_params.py index fbc11737..afc27b6e 100644 --- a/rootly_sdk/models/update_zendesk_ticket_task_params.py +++ b/rootly_sdk/models/update_zendesk_ticket_task_params.py @@ -1,17 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.update_zendesk_ticket_task_params_task_type import ( - UpdateZendeskTicketTaskParamsTaskType, - check_update_zendesk_ticket_task_params_task_type, -) from ..types import UNSET, Unset +from ..models.update_zendesk_ticket_task_params_task_type import check_update_zendesk_ticket_task_params_task_type +from ..models.update_zendesk_ticket_task_params_task_type import UpdateZendeskTicketTaskParamsTaskType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.update_zendesk_ticket_task_params_completion import UpdateZendeskTicketTaskParamsCompletion from ..models.update_zendesk_ticket_task_params_priority import UpdateZendeskTicketTaskParamsPriority @@ -47,6 +48,9 @@ class UpdateZendeskTicketTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.update_zendesk_ticket_task_params_priority import UpdateZendeskTicketTaskParamsPriority + from ..models.update_zendesk_ticket_task_params_completion import UpdateZendeskTicketTaskParamsCompletion + ticket_id = self.ticket_id task_type: str | Unset = 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 5e531f48..8ae1a50d 100644 --- a/rootly_sdk/models/update_zendesk_ticket_task_params_completion.py +++ b/rootly_sdk/models/update_zendesk_ticket_task_params_completion.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateZendeskTicketTaskParamsCompletion") 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 e87ec4f3..769735f2 100644 --- a/rootly_sdk/models/update_zendesk_ticket_task_params_priority.py +++ b/rootly_sdk/models/update_zendesk_ticket_task_params_priority.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UpdateZendeskTicketTaskParamsPriority") diff --git a/rootly_sdk/models/uptime_chart_response.py b/rootly_sdk/models/uptime_chart_response.py index 66c79963..74d844be 100644 --- a/rootly_sdk/models/uptime_chart_response.py +++ b/rootly_sdk/models/uptime_chart_response.py @@ -1,31 +1,57 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + +if TYPE_CHECKING: + from ..models.uptime_chart_response_data import UptimeChartResponseData + + T = TypeVar("T", bound="UptimeChartResponse") @_attrs_define class UptimeChartResponse: - """ """ + """ + Attributes: + data (UptimeChartResponseData): + """ + data: UptimeChartResponseData additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.uptime_chart_response_data import UptimeChartResponseData + + 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.uptime_chart_response_data import UptimeChartResponseData + d = dict(src_dict) - uptime_chart_response = cls() + data = UptimeChartResponseData.from_dict(d.pop("data")) + + uptime_chart_response = cls( + data=data, + ) uptime_chart_response.additional_properties = d return uptime_chart_response diff --git a/rootly_sdk/models/uptime_chart_response_data.py b/rootly_sdk/models/uptime_chart_response_data.py new file mode 100644 index 00000000..c11272b3 --- /dev/null +++ b/rootly_sdk/models/uptime_chart_response_data.py @@ -0,0 +1,50 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="UptimeChartResponseData") + + +@_attrs_define +class UptimeChartResponseData: + """ """ + + 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) + uptime_chart_response_data = cls() + + uptime_chart_response_data.additional_properties = d + return uptime_chart_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/user.py b/rootly_sdk/models/user.py index 3604e323..06793cb0 100644 --- a/rootly_sdk/models/user.py +++ b/rootly_sdk/models/user.py @@ -1,13 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="User") diff --git a/rootly_sdk/models/user_email_address.py b/rootly_sdk/models/user_email_address.py index 2f901d3e..9224f225 100644 --- a/rootly_sdk/models/user_email_address.py +++ b/rootly_sdk/models/user_email_address.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset + + T = TypeVar("T", bound="UserEmailAddress") diff --git a/rootly_sdk/models/user_email_address_list.py b/rootly_sdk/models/user_email_address_list.py index 5ac02e51..aa69f694 100644 --- a/rootly_sdk/models/user_email_address_list.py +++ b/rootly_sdk/models/user_email_address_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_email_address_list_data_item import UserEmailAddressListDataItem @@ -22,14 +28,21 @@ class UserEmailAddressList: data (list[UserEmailAddressListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[UserEmailAddressListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.user_email_address_list_data_item import UserEmailAddressListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_email_address_list_data_item import UserEmailAddressListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_email_address_list = cls( data=data, links=links, meta=meta, + included=included, ) user_email_address_list.additional_properties = d 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 b5979d41..bcd72515 100644 --- a/rootly_sdk/models/user_email_address_list_data_item.py +++ b/rootly_sdk/models/user_email_address_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.user_email_address_list_data_item_type import ( - UserEmailAddressListDataItemType, - check_user_email_address_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.user_email_address_list_data_item_type import check_user_email_address_list_data_item_type +from ..models.user_email_address_list_data_item_type import UserEmailAddressListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.user_email_address import UserEmailAddress @@ -33,6 +34,8 @@ class UserEmailAddressListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_email_address import UserEmailAddress + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_email_address_response.py b/rootly_sdk/models/user_email_address_response.py index 271c4b0b..152600d9 100644 --- a/rootly_sdk/models/user_email_address_response.py +++ b/rootly_sdk/models/user_email_address_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_email_address_response_data import UserEmailAddressResponseData @@ -18,14 +24,26 @@ class UserEmailAddressResponse: """ Attributes: data (UserEmailAddressResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: UserEmailAddressResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_email_address_response_data import UserEmailAddressResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_email_address_response_data import UserEmailAddressResponseData d = dict(src_dict) data = UserEmailAddressResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_email_address_response = cls( data=data, + included=included, ) user_email_address_response.additional_properties = d diff --git a/rootly_sdk/models/user_email_address_response_data.py b/rootly_sdk/models/user_email_address_response_data.py index e6e23d8c..3a1ccc6a 100644 --- a/rootly_sdk/models/user_email_address_response_data.py +++ b/rootly_sdk/models/user_email_address_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.user_email_address_response_data_type import ( - UserEmailAddressResponseDataType, - check_user_email_address_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.user_email_address_response_data_type import check_user_email_address_response_data_type +from ..models.user_email_address_response_data_type import UserEmailAddressResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.user_email_address import UserEmailAddress @@ -33,6 +34,8 @@ class UserEmailAddressResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_email_address import UserEmailAddress + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_flat_response.py b/rootly_sdk/models/user_flat_response.py index 72654e6b..60527b84 100644 --- a/rootly_sdk/models/user_flat_response.py +++ b/rootly_sdk/models/user_flat_response.py @@ -1,40 +1,54 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="UserFlatResponse") @_attrs_define class UserFlatResponse: - """Flat user object as returned by serializer + """Flat user attributes as returned by UserFlatSerializer (no nested associations) Attributes: id (int): User ID - email (str): User email - created_at (str): User creation timestamp - updated_at (str): User last update timestamp - 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 + email (str): Email address + created_at (str): Date of creation + updated_at (str): Date of last update + name (str | Unset): Display name + phone (None | str | Unset): Primary phone number + phone_2 (None | str | Unset): Secondary phone number + first_name (None | str | Unset): First name + last_name (None | str | Unset): Last name + preferred_name (None | str | Unset): Preferred name + full_name (None | str | Unset): Full name + full_name_with_team (None | str | Unset): Full name with team context + slack_id (None | str | Unset): Slack user ID + time_zone (None | str | Unset): IANA time zone """ id: int email: str created_at: str updated_at: str + name: str | Unset = UNSET + phone: None | str | Unset = UNSET + phone_2: None | str | Unset = UNSET first_name: None | str | Unset = UNSET last_name: None | str | Unset = UNSET + preferred_name: None | str | Unset = UNSET full_name: None | str | Unset = UNSET full_name_with_team: None | str | Unset = UNSET + slack_id: None | str | Unset = UNSET time_zone: None | str | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) @@ -47,6 +61,20 @@ def to_dict(self) -> dict[str, Any]: updated_at = self.updated_at + name = self.name + + phone: None | str | Unset + if isinstance(self.phone, Unset): + phone = UNSET + else: + phone = self.phone + + phone_2: None | str | Unset + if isinstance(self.phone_2, Unset): + phone_2 = UNSET + else: + phone_2 = self.phone_2 + first_name: None | str | Unset if isinstance(self.first_name, Unset): first_name = UNSET @@ -59,6 +87,12 @@ def to_dict(self) -> dict[str, Any]: else: last_name = self.last_name + preferred_name: None | str | Unset + if isinstance(self.preferred_name, Unset): + preferred_name = UNSET + else: + preferred_name = self.preferred_name + full_name: None | str | Unset if isinstance(self.full_name, Unset): full_name = UNSET @@ -71,6 +105,12 @@ def to_dict(self) -> dict[str, Any]: else: full_name_with_team = self.full_name_with_team + slack_id: None | str | Unset + if isinstance(self.slack_id, Unset): + slack_id = UNSET + else: + slack_id = self.slack_id + time_zone: None | str | Unset if isinstance(self.time_zone, Unset): time_zone = UNSET @@ -87,14 +127,24 @@ def to_dict(self) -> dict[str, Any]: "updated_at": updated_at, } ) + if name is not UNSET: + field_dict["name"] = name + if phone is not UNSET: + field_dict["phone"] = phone + if phone_2 is not UNSET: + field_dict["phone_2"] = phone_2 if first_name is not UNSET: field_dict["first_name"] = first_name if last_name is not UNSET: field_dict["last_name"] = last_name + if preferred_name is not UNSET: + field_dict["preferred_name"] = preferred_name if full_name is not UNSET: field_dict["full_name"] = full_name if full_name_with_team is not UNSET: field_dict["full_name_with_team"] = full_name_with_team + if slack_id is not UNSET: + field_dict["slack_id"] = slack_id if time_zone is not UNSET: field_dict["time_zone"] = time_zone @@ -111,6 +161,26 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: updated_at = d.pop("updated_at") + name = d.pop("name", UNSET) + + def _parse_phone(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone = _parse_phone(d.pop("phone", UNSET)) + + def _parse_phone_2(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + phone_2 = _parse_phone_2(d.pop("phone_2", UNSET)) + def _parse_first_name(data: object) -> None | str | Unset: if data is None: return data @@ -129,6 +199,15 @@ def _parse_last_name(data: object) -> None | str | Unset: last_name = _parse_last_name(d.pop("last_name", UNSET)) + def _parse_preferred_name(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + preferred_name = _parse_preferred_name(d.pop("preferred_name", UNSET)) + def _parse_full_name(data: object) -> None | str | Unset: if data is None: return data @@ -147,6 +226,15 @@ def _parse_full_name_with_team(data: object) -> None | str | Unset: full_name_with_team = _parse_full_name_with_team(d.pop("full_name_with_team", UNSET)) + def _parse_slack_id(data: object) -> None | str | Unset: + if data is None: + return data + if isinstance(data, Unset): + return data + return cast(None | str | Unset, data) + + slack_id = _parse_slack_id(d.pop("slack_id", UNSET)) + def _parse_time_zone(data: object) -> None | str | Unset: if data is None: return data @@ -161,10 +249,15 @@ def _parse_time_zone(data: object) -> None | str | Unset: email=email, created_at=created_at, updated_at=updated_at, + name=name, + phone=phone, + phone_2=phone_2, first_name=first_name, last_name=last_name, + preferred_name=preferred_name, full_name=full_name, full_name_with_team=full_name_with_team, + slack_id=slack_id, time_zone=time_zone, ) diff --git a/rootly_sdk/models/user_list.py b/rootly_sdk/models/user_list.py index b03a1139..37a8d303 100644 --- a/rootly_sdk/models/user_list.py +++ b/rootly_sdk/models/user_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_list_data_item import UserListDataItem @@ -22,14 +28,21 @@ class UserList: data (list[UserListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[UserListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_list_data_item import UserListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_list_data_item import UserListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_list = cls( data=data, links=links, meta=meta, + included=included, ) user_list.additional_properties = d diff --git a/rootly_sdk/models/user_list_data_item.py b/rootly_sdk/models/user_list_data_item.py index c9692dbd..ec5e9c12 100644 --- a/rootly_sdk/models/user_list_data_item.py +++ b/rootly_sdk/models/user_list_data_item.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.user_list_data_item_type import UserListDataItemType, check_user_list_data_item_type from ..types import UNSET, Unset +from ..models.user_list_data_item_type import check_user_list_data_item_type +from ..models.user_list_data_item_type import UserListDataItemType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.user import User from ..models.user_relationships import UserRelationships @@ -34,6 +38,9 @@ class UserListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user import User + from ..models.user_relationships import UserRelationships + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_notification_rule.py b/rootly_sdk/models/user_notification_rule.py index a1ece08a..d01c29ca 100644 --- a/rootly_sdk/models/user_notification_rule.py +++ b/rootly_sdk/models/user_notification_rule.py @@ -1,20 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.user_notification_rule_enabled_contact_types_item import ( - UserNotificationRuleEnabledContactTypesItem, check_user_notification_rule_enabled_contact_types_item, ) -from ..models.user_notification_rule_notification_type import ( - UserNotificationRuleNotificationType, - check_user_notification_rule_notification_type, -) +from ..models.user_notification_rule_enabled_contact_types_item import UserNotificationRuleEnabledContactTypesItem +from ..models.user_notification_rule_notification_type import check_user_notification_rule_notification_type +from ..models.user_notification_rule_notification_type import UserNotificationRuleNotificationType from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="UserNotificationRule") diff --git a/rootly_sdk/models/user_notification_rule_enabled_contact_types_item.py b/rootly_sdk/models/user_notification_rule_enabled_contact_types_item.py index b2e67651..4858502c 100644 --- a/rootly_sdk/models/user_notification_rule_enabled_contact_types_item.py +++ b/rootly_sdk/models/user_notification_rule_enabled_contact_types_item.py @@ -1,11 +1,14 @@ from typing import Literal, cast -UserNotificationRuleEnabledContactTypesItem = Literal["call", "device", "email", "non_critical_device", "slack", "sms"] +UserNotificationRuleEnabledContactTypesItem = Literal[ + "call", "device", "email", "google_chat", "non_critical_device", "slack", "sms" +] USER_NOTIFICATION_RULE_ENABLED_CONTACT_TYPES_ITEM_VALUES: set[UserNotificationRuleEnabledContactTypesItem] = { "call", "device", "email", + "google_chat", "non_critical_device", "slack", "sms", diff --git a/rootly_sdk/models/user_notification_rule_list.py b/rootly_sdk/models/user_notification_rule_list.py index 348f64aa..38de810e 100644 --- a/rootly_sdk/models/user_notification_rule_list.py +++ b/rootly_sdk/models/user_notification_rule_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_notification_rule_list_data_item import UserNotificationRuleListDataItem @@ -22,14 +28,21 @@ class UserNotificationRuleList: data (list[UserNotificationRuleListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[UserNotificationRuleListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.user_notification_rule_list_data_item import UserNotificationRuleListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_notification_rule_list_data_item import UserNotificationRuleListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_notification_rule_list = cls( data=data, links=links, meta=meta, + included=included, ) user_notification_rule_list.additional_properties = d 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 52215b0c..de311eda 100644 --- a/rootly_sdk/models/user_notification_rule_list_data_item.py +++ b/rootly_sdk/models/user_notification_rule_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.user_notification_rule_list_data_item_type import ( - UserNotificationRuleListDataItemType, - check_user_notification_rule_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.user_notification_rule_list_data_item_type import check_user_notification_rule_list_data_item_type +from ..models.user_notification_rule_list_data_item_type import UserNotificationRuleListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.user_notification_rule import UserNotificationRule @@ -33,6 +34,8 @@ class UserNotificationRuleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_notification_rule import UserNotificationRule + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_notification_rule_response.py b/rootly_sdk/models/user_notification_rule_response.py index 94079f59..71b555a7 100644 --- a/rootly_sdk/models/user_notification_rule_response.py +++ b/rootly_sdk/models/user_notification_rule_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_notification_rule_response_data import UserNotificationRuleResponseData @@ -18,14 +24,26 @@ class UserNotificationRuleResponse: """ Attributes: data (UserNotificationRuleResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: UserNotificationRuleResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.user_notification_rule_response_data import UserNotificationRuleResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_notification_rule_response_data import UserNotificationRuleResponseData d = dict(src_dict) data = UserNotificationRuleResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_notification_rule_response = cls( data=data, + included=included, ) user_notification_rule_response.additional_properties = d diff --git a/rootly_sdk/models/user_notification_rule_response_data.py b/rootly_sdk/models/user_notification_rule_response_data.py index ed717983..66ca8f5d 100644 --- a/rootly_sdk/models/user_notification_rule_response_data.py +++ b/rootly_sdk/models/user_notification_rule_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.user_notification_rule_response_data_type import ( - UserNotificationRuleResponseDataType, - check_user_notification_rule_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.user_notification_rule_response_data_type import check_user_notification_rule_response_data_type +from ..models.user_notification_rule_response_data_type import UserNotificationRuleResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.user_notification_rule import UserNotificationRule @@ -33,6 +34,8 @@ class UserNotificationRuleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_notification_rule import UserNotificationRule + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_phone_number.py b/rootly_sdk/models/user_phone_number.py index 56225020..8399edcd 100644 --- a/rootly_sdk/models/user_phone_number.py +++ b/rootly_sdk/models/user_phone_number.py @@ -1,15 +1,19 @@ from __future__ import annotations -import datetime from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from dateutil.parser import isoparse from ..types import UNSET, Unset +from ..types import UNSET, Unset +from dateutil.parser import isoparse +from typing import cast +import datetime + + T = TypeVar("T", bound="UserPhoneNumber") diff --git a/rootly_sdk/models/user_phone_number_list.py b/rootly_sdk/models/user_phone_number_list.py index e9a7b3a8..eca2c698 100644 --- a/rootly_sdk/models/user_phone_number_list.py +++ b/rootly_sdk/models/user_phone_number_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_phone_number_list_data_item import UserPhoneNumberListDataItem @@ -22,14 +28,21 @@ class UserPhoneNumberList: data (list[UserPhoneNumberListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[UserPhoneNumberListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.user_phone_number_list_data_item import UserPhoneNumberListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.user_phone_number_list_data_item import UserPhoneNumberListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_phone_number_list = cls( data=data, links=links, meta=meta, + included=included, ) user_phone_number_list.additional_properties = d 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 afe5c8cb..d7268540 100644 --- a/rootly_sdk/models/user_phone_number_list_data_item.py +++ b/rootly_sdk/models/user_phone_number_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.user_phone_number_list_data_item_type import ( - UserPhoneNumberListDataItemType, - check_user_phone_number_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.user_phone_number_list_data_item_type import check_user_phone_number_list_data_item_type +from ..models.user_phone_number_list_data_item_type import UserPhoneNumberListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.user_phone_number import UserPhoneNumber @@ -33,6 +34,8 @@ class UserPhoneNumberListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_phone_number import UserPhoneNumber + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_phone_number_response.py b/rootly_sdk/models/user_phone_number_response.py index f800a3e8..3d8a6005 100644 --- a/rootly_sdk/models/user_phone_number_response.py +++ b/rootly_sdk/models/user_phone_number_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_phone_number_response_data import UserPhoneNumberResponseData @@ -18,14 +24,26 @@ class UserPhoneNumberResponse: """ Attributes: data (UserPhoneNumberResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: UserPhoneNumberResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.user_phone_number_response_data import UserPhoneNumberResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_phone_number_response_data import UserPhoneNumberResponseData d = dict(src_dict) data = UserPhoneNumberResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_phone_number_response = cls( data=data, + included=included, ) user_phone_number_response.additional_properties = d diff --git a/rootly_sdk/models/user_phone_number_response_data.py b/rootly_sdk/models/user_phone_number_response_data.py index faa7c9ef..9fce3e7c 100644 --- a/rootly_sdk/models/user_phone_number_response_data.py +++ b/rootly_sdk/models/user_phone_number_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.user_phone_number_response_data_type import ( - UserPhoneNumberResponseDataType, - check_user_phone_number_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.user_phone_number_response_data_type import check_user_phone_number_response_data_type +from ..models.user_phone_number_response_data_type import UserPhoneNumberResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.user_phone_number import UserPhoneNumber @@ -33,6 +34,8 @@ class UserPhoneNumberResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_phone_number import UserPhoneNumber + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/user_relationships.py b/rootly_sdk/models/user_relationships.py index ccf31d0d..9f06f02e 100644 --- a/rootly_sdk/models/user_relationships.py +++ b/rootly_sdk/models/user_relationships.py @@ -1,13 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.on_call_role_relationship import OnCallRoleRelationship from ..models.role_relationship import RoleRelationship @@ -29,6 +32,9 @@ class UserRelationships: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.role_relationship import RoleRelationship + from ..models.on_call_role_relationship import OnCallRoleRelationship + role: dict[str, Any] | Unset = UNSET if not isinstance(self.role, Unset): role = self.role.to_dict() diff --git a/rootly_sdk/models/user_response.py b/rootly_sdk/models/user_response.py index 4f3139ab..a82ccf83 100644 --- a/rootly_sdk/models/user_response.py +++ b/rootly_sdk/models/user_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_response_data import UserResponseData @@ -18,14 +24,26 @@ class UserResponse: """ Attributes: data (UserResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: UserResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user_response_data import UserResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_response_data import UserResponseData d = dict(src_dict) data = UserResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + user_response = cls( data=data, + included=included, ) user_response.additional_properties = d diff --git a/rootly_sdk/models/user_response_data.py b/rootly_sdk/models/user_response_data.py index adf3b1f1..954fd971 100644 --- a/rootly_sdk/models/user_response_data.py +++ b/rootly_sdk/models/user_response_data.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.user_response_data_type import UserResponseDataType, check_user_response_data_type from ..types import UNSET, Unset +from ..models.user_response_data_type import check_user_response_data_type +from ..models.user_response_data_type import UserResponseDataType +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.user import User from ..models.user_relationships import UserRelationships @@ -34,6 +38,9 @@ class UserResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.user import User + from ..models.user_relationships import UserRelationships + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/verify_phone_number_request.py b/rootly_sdk/models/verify_phone_number_request.py index 0a2aa912..a7741c4a 100644 --- a/rootly_sdk/models/verify_phone_number_request.py +++ b/rootly_sdk/models/verify_phone_number_request.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="VerifyPhoneNumberRequest") diff --git a/rootly_sdk/models/webhooks_delivery.py b/rootly_sdk/models/webhooks_delivery.py index 82c25bb5..c50affa8 100644 --- a/rootly_sdk/models/webhooks_delivery.py +++ b/rootly_sdk/models/webhooks_delivery.py @@ -1,11 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from typing import cast + + T = TypeVar("T", bound="WebhooksDelivery") diff --git a/rootly_sdk/models/webhooks_delivery_list.py b/rootly_sdk/models/webhooks_delivery_list.py index d717e142..668663bb 100644 --- a/rootly_sdk/models/webhooks_delivery_list.py +++ b/rootly_sdk/models/webhooks_delivery_list.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.webhooks_delivery_list_data_item import WebhooksDeliveryListDataItem @@ -24,14 +28,21 @@ class WebhooksDeliveryList: data (list[WebhooksDeliveryListDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WebhooksDeliveryListDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.webhooks_delivery_list_data_item import WebhooksDeliveryListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +56,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,11 +74,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.webhooks_delivery_list_data_item import WebhooksDeliveryListDataItem @@ -87,10 +108,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + webhooks_delivery_list = cls( data=data, links=links, meta=meta, + included=included, ) webhooks_delivery_list.additional_properties = d diff --git a/rootly_sdk/models/webhooks_delivery_list_data_item.py b/rootly_sdk/models/webhooks_delivery_list_data_item.py index 5fa5e915..08adcc91 100644 --- a/rootly_sdk/models/webhooks_delivery_list_data_item.py +++ b/rootly_sdk/models/webhooks_delivery_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.webhooks_delivery_list_data_item_type import ( - WebhooksDeliveryListDataItemType, - check_webhooks_delivery_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.webhooks_delivery_list_data_item_type import check_webhooks_delivery_list_data_item_type +from ..models.webhooks_delivery_list_data_item_type import WebhooksDeliveryListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.webhooks_delivery import WebhooksDelivery @@ -33,6 +34,8 @@ class WebhooksDeliveryListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.webhooks_delivery import WebhooksDelivery + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/webhooks_delivery_response.py b/rootly_sdk/models/webhooks_delivery_response.py index 65f5c806..e68eb958 100644 --- a/rootly_sdk/models/webhooks_delivery_response.py +++ b/rootly_sdk/models/webhooks_delivery_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_delivery_response_data import WebhooksDeliveryResponseData @@ -18,14 +24,26 @@ class WebhooksDeliveryResponse: """ Attributes: data (WebhooksDeliveryResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WebhooksDeliveryResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.webhooks_delivery_response_data import WebhooksDeliveryResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_delivery_response_data import WebhooksDeliveryResponseData d = dict(src_dict) data = WebhooksDeliveryResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + webhooks_delivery_response = cls( data=data, + included=included, ) webhooks_delivery_response.additional_properties = d diff --git a/rootly_sdk/models/webhooks_delivery_response_data.py b/rootly_sdk/models/webhooks_delivery_response_data.py index 034eb5c6..83dc1413 100644 --- a/rootly_sdk/models/webhooks_delivery_response_data.py +++ b/rootly_sdk/models/webhooks_delivery_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.webhooks_delivery_response_data_type import ( - WebhooksDeliveryResponseDataType, - check_webhooks_delivery_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.webhooks_delivery_response_data_type import check_webhooks_delivery_response_data_type +from ..models.webhooks_delivery_response_data_type import WebhooksDeliveryResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.webhooks_delivery import WebhooksDelivery @@ -33,6 +34,8 @@ class WebhooksDeliveryResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.webhooks_delivery import WebhooksDelivery + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/webhooks_endpoint.py b/rootly_sdk/models/webhooks_endpoint.py index a8e405b2..1d6765a1 100644 --- a/rootly_sdk/models/webhooks_endpoint.py +++ b/rootly_sdk/models/webhooks_endpoint.py @@ -1,17 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.webhooks_endpoint_event_types_item import ( - WebhooksEndpointEventTypesItem, - check_webhooks_endpoint_event_types_item, -) from ..types import UNSET, Unset +from ..models.webhooks_endpoint_event_types_item import check_webhooks_endpoint_event_types_item +from ..models.webhooks_endpoint_event_types_item import WebhooksEndpointEventTypesItem +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.webhooks_endpoint_custom_headers_item import WebhooksEndpointCustomHeadersItem + + T = TypeVar("T", bound="WebhooksEndpoint") @@ -27,6 +32,8 @@ class WebhooksEndpoint: created_at (str): Date of creation updated_at (str): Date of last update slug (str | Unset): The slug of the endpoint + custom_headers (list[WebhooksEndpointCustomHeadersItem] | Unset): Custom HTTP headers sent with each delivery. + Max 10. Reserved names (Content-Type, X-Rootly-Signature, Host, etc.) are rejected. """ name: str @@ -37,9 +44,12 @@ class WebhooksEndpoint: created_at: str updated_at: str slug: str | Unset = UNSET + custom_headers: list[WebhooksEndpointCustomHeadersItem] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.webhooks_endpoint_custom_headers_item import WebhooksEndpointCustomHeadersItem + name = self.name url = self.url @@ -59,6 +69,13 @@ def to_dict(self) -> dict[str, Any]: slug = self.slug + custom_headers: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.custom_headers, Unset): + custom_headers = [] + for custom_headers_item_data in self.custom_headers: + custom_headers_item = custom_headers_item_data.to_dict() + custom_headers.append(custom_headers_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -74,11 +91,15 @@ def to_dict(self) -> dict[str, Any]: ) if slug is not UNSET: field_dict["slug"] = slug + if custom_headers is not UNSET: + field_dict["custom_headers"] = custom_headers return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.webhooks_endpoint_custom_headers_item import WebhooksEndpointCustomHeadersItem + d = dict(src_dict) name = d.pop("name") @@ -101,6 +122,15 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: slug = d.pop("slug", UNSET) + _custom_headers = d.pop("custom_headers", UNSET) + custom_headers: list[WebhooksEndpointCustomHeadersItem] | Unset = UNSET + if _custom_headers is not UNSET: + custom_headers = [] + for custom_headers_item_data in _custom_headers: + custom_headers_item = WebhooksEndpointCustomHeadersItem.from_dict(custom_headers_item_data) + + custom_headers.append(custom_headers_item) + webhooks_endpoint = cls( name=name, url=url, @@ -110,6 +140,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: created_at=created_at, updated_at=updated_at, slug=slug, + custom_headers=custom_headers, ) webhooks_endpoint.additional_properties = d diff --git a/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py b/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py new file mode 100644 index 00000000..77a650ae --- /dev/null +++ b/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py @@ -0,0 +1,54 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + + +T = TypeVar("T", bound="WebhooksEndpointCustomHeadersItem") + + +@_attrs_define +class WebhooksEndpointCustomHeadersItem: + """ + Attributes: + name (str): + value (str): + """ + + name: str + value: str + + def to_dict(self) -> dict[str, Any]: + name = self.name + + value = self.value + + field_dict: dict[str, Any] = {} + + field_dict.update( + { + "name": name, + "value": value, + } + ) + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + name = d.pop("name") + + value = d.pop("value") + + webhooks_endpoint_custom_headers_item = cls( + name=name, + value=value, + ) + + return webhooks_endpoint_custom_headers_item diff --git a/rootly_sdk/models/webhooks_endpoint_event_types_item.py b/rootly_sdk/models/webhooks_endpoint_event_types_item.py index d592d2cf..8c8f32c8 100644 --- a/rootly_sdk/models/webhooks_endpoint_event_types_item.py +++ b/rootly_sdk/models/webhooks_endpoint_event_types_item.py @@ -2,6 +2,7 @@ WebhooksEndpointEventTypesItem = Literal[ "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -30,10 +31,12 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", ] WEBHOOKS_ENDPOINT_EVENT_TYPES_ITEM_VALUES: set[WebhooksEndpointEventTypesItem] = { "alert.created", + "audit_log.created", "genius_workflow_run.canceled", "genius_workflow_run.completed", "genius_workflow_run.failed", @@ -62,6 +65,7 @@ "incident_status_page_event.deleted", "incident_status_page_event.updated", "pulse.created", + "shift.started", } diff --git a/rootly_sdk/models/webhooks_endpoint_list.py b/rootly_sdk/models/webhooks_endpoint_list.py index 8555d0b7..09d13852 100644 --- a/rootly_sdk/models/webhooks_endpoint_list.py +++ b/rootly_sdk/models/webhooks_endpoint_list.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.webhooks_endpoint_list_data_item import WebhooksEndpointListDataItem @@ -24,14 +28,21 @@ class WebhooksEndpointList: data (list[WebhooksEndpointListDataItem]): links (Links | Unset): meta (Meta | Unset): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WebhooksEndpointListDataItem] links: Links | Unset = UNSET meta: Meta | Unset = UNSET + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.webhooks_endpoint_list_data_item import WebhooksEndpointListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -45,6 +56,13 @@ def to_dict(self) -> dict[str, Any]: if not isinstance(self.meta, Unset): meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -56,11 +74,14 @@ def to_dict(self) -> dict[str, Any]: field_dict["links"] = links if meta is not UNSET: field_dict["meta"] = meta + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.webhooks_endpoint_list_data_item import WebhooksEndpointListDataItem @@ -87,10 +108,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: else: meta = Meta.from_dict(_meta) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + webhooks_endpoint_list = cls( data=data, links=links, meta=meta, + included=included, ) webhooks_endpoint_list.additional_properties = d diff --git a/rootly_sdk/models/webhooks_endpoint_list_data_item.py b/rootly_sdk/models/webhooks_endpoint_list_data_item.py index a19f4014..bef7fe31 100644 --- a/rootly_sdk/models/webhooks_endpoint_list_data_item.py +++ b/rootly_sdk/models/webhooks_endpoint_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.webhooks_endpoint_list_data_item_type import ( - WebhooksEndpointListDataItemType, - check_webhooks_endpoint_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.webhooks_endpoint_list_data_item_type import check_webhooks_endpoint_list_data_item_type +from ..models.webhooks_endpoint_list_data_item_type import WebhooksEndpointListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.webhooks_endpoint import WebhooksEndpoint @@ -33,6 +34,8 @@ class WebhooksEndpointListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.webhooks_endpoint import WebhooksEndpoint + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/webhooks_endpoint_response.py b/rootly_sdk/models/webhooks_endpoint_response.py index 62aa441b..969da164 100644 --- a/rootly_sdk/models/webhooks_endpoint_response.py +++ b/rootly_sdk/models/webhooks_endpoint_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_endpoint_response_data import WebhooksEndpointResponseData @@ -18,14 +24,26 @@ class WebhooksEndpointResponse: """ Attributes: data (WebhooksEndpointResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WebhooksEndpointResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.webhooks_endpoint_response_data import WebhooksEndpointResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_endpoint_response_data import WebhooksEndpointResponseData d = dict(src_dict) data = WebhooksEndpointResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + webhooks_endpoint_response = cls( data=data, + included=included, ) webhooks_endpoint_response.additional_properties = d diff --git a/rootly_sdk/models/webhooks_endpoint_response_data.py b/rootly_sdk/models/webhooks_endpoint_response_data.py index b4a2d8ed..c2190882 100644 --- a/rootly_sdk/models/webhooks_endpoint_response_data.py +++ b/rootly_sdk/models/webhooks_endpoint_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.webhooks_endpoint_response_data_type import ( - WebhooksEndpointResponseDataType, - check_webhooks_endpoint_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.webhooks_endpoint_response_data_type import check_webhooks_endpoint_response_data_type +from ..models.webhooks_endpoint_response_data_type import WebhooksEndpointResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.webhooks_endpoint import WebhooksEndpoint @@ -33,6 +34,8 @@ class WebhooksEndpointResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.webhooks_endpoint import WebhooksEndpoint + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow.py b/rootly_sdk/models/workflow.py index ee3acbe6..df6c0b7b 100644 --- a/rootly_sdk/models/workflow.py +++ b/rootly_sdk/models/workflow.py @@ -1,14 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_repeat_on_type_0_item import WorkflowRepeatOnType0Item, check_workflow_repeat_on_type_0_item from ..types import UNSET, Unset +from ..models.workflow_repeat_on_type_0_item import check_workflow_repeat_on_type_0_item +from ..models.workflow_repeat_on_type_0_item import WorkflowRepeatOnType0Item +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.action_item_trigger_params import ActionItemTriggerParams from ..models.alert_trigger_params import AlertTriggerParams @@ -95,10 +99,11 @@ class Workflow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.action_item_trigger_params import ActionItemTriggerParams - from ..models.alert_trigger_params import AlertTriggerParams - from ..models.incident_trigger_params import IncidentTriggerParams from ..models.pulse_trigger_params import PulseTriggerParams + from ..models.simple_trigger_params import SimpleTriggerParams + from ..models.incident_trigger_params import IncidentTriggerParams + from ..models.alert_trigger_params import AlertTriggerParams + from ..models.action_item_trigger_params import ActionItemTriggerParams name = self.name diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition.py b/rootly_sdk/models/workflow_action_item_form_field_condition.py new file mode 100644 index 00000000..646b4432 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition.py @@ -0,0 +1,193 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.workflow_action_item_form_field_condition_action_item_condition import ( + check_workflow_action_item_form_field_condition_action_item_condition, +) +from ..models.workflow_action_item_form_field_condition_action_item_condition import ( + WorkflowActionItemFormFieldConditionActionItemCondition, +) +from ..types import UNSET, Unset +from typing import cast + + +T = TypeVar("T", bound="WorkflowActionItemFormFieldCondition") + + +@_attrs_define +class WorkflowActionItemFormFieldCondition: + """ + Attributes: + workflow_id (str): The workflow for this condition + form_field_id (str): The custom field for this condition + action_item_condition (WorkflowActionItemFormFieldConditionActionItemCondition): The trigger condition Default: + 'ANY'. + selected_catalog_entity_ids (list[str]): + selected_option_ids (list[str]): + selected_user_ids (list[int]): + 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 + form_field_id: str + selected_catalog_entity_ids: list[str] + selected_option_ids: list[str] + selected_user_ids: list[int] + action_item_condition: WorkflowActionItemFormFieldConditionActionItemCondition = "ANY" + 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]: + workflow_id = self.workflow_id + + form_field_id = self.form_field_id + + action_item_condition: str = self.action_item_condition + + selected_catalog_entity_ids = self.selected_catalog_entity_ids + + selected_option_ids = self.selected_option_ids + + selected_user_ids = self.selected_user_ids + + values: list[str] | Unset = UNSET + if not isinstance(self.values, Unset): + values = self.values + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_group_ids, Unset): + selected_group_ids = self.selected_group_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_cause_ids, Unset): + selected_cause_ids = self.selected_cause_ids + + 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: list[str] | Unset = UNSET + if not isinstance(self.selected_incident_type_ids, Unset): + selected_incident_type_ids = self.selected_incident_type_ids + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "workflow_id": workflow_id, + "form_field_id": form_field_id, + "action_item_condition": action_item_condition, + "selected_catalog_entity_ids": selected_catalog_entity_ids, + "selected_option_ids": selected_option_ids, + "selected_user_ids": selected_user_ids, + } + ) + if values is not UNSET: + field_dict["values"] = values + if selected_functionality_ids is not UNSET: + field_dict["selected_functionality_ids"] = selected_functionality_ids + if selected_group_ids is not UNSET: + field_dict["selected_group_ids"] = selected_group_ids + if selected_service_ids is not UNSET: + field_dict["selected_service_ids"] = selected_service_ids + if selected_cause_ids is not UNSET: + field_dict["selected_cause_ids"] = selected_cause_ids + if selected_environment_ids is not UNSET: + field_dict["selected_environment_ids"] = selected_environment_ids + if selected_incident_type_ids is not UNSET: + field_dict["selected_incident_type_ids"] = selected_incident_type_ids + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + d = dict(src_dict) + workflow_id = d.pop("workflow_id") + + form_field_id = d.pop("form_field_id") + + action_item_condition = check_workflow_action_item_form_field_condition_action_item_condition( + d.pop("action_item_condition") + ) + + selected_catalog_entity_ids = cast(list[str], d.pop("selected_catalog_entity_ids")) + + selected_option_ids = cast(list[str], d.pop("selected_option_ids")) + + selected_user_ids = cast(list[int], d.pop("selected_user_ids")) + + values = cast(list[str], d.pop("values", UNSET)) + + selected_functionality_ids = cast(list[str], d.pop("selected_functionality_ids", UNSET)) + + selected_group_ids = cast(list[str], d.pop("selected_group_ids", UNSET)) + + selected_service_ids = cast(list[str], d.pop("selected_service_ids", UNSET)) + + selected_cause_ids = cast(list[str], d.pop("selected_cause_ids", UNSET)) + + selected_environment_ids = cast(list[str], d.pop("selected_environment_ids", UNSET)) + + selected_incident_type_ids = cast(list[str], d.pop("selected_incident_type_ids", UNSET)) + + workflow_action_item_form_field_condition = cls( + workflow_id=workflow_id, + form_field_id=form_field_id, + action_item_condition=action_item_condition, + selected_catalog_entity_ids=selected_catalog_entity_ids, + selected_option_ids=selected_option_ids, + selected_user_ids=selected_user_ids, + values=values, + selected_functionality_ids=selected_functionality_ids, + selected_group_ids=selected_group_ids, + selected_service_ids=selected_service_ids, + selected_cause_ids=selected_cause_ids, + selected_environment_ids=selected_environment_ids, + selected_incident_type_ids=selected_incident_type_ids, + ) + + workflow_action_item_form_field_condition.additional_properties = d + return workflow_action_item_form_field_condition + + @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/workflow_action_item_form_field_condition_action_item_condition.py b/rootly_sdk/models/workflow_action_item_form_field_condition_action_item_condition.py new file mode 100644 index 00000000..a42f286b --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_action_item_condition.py @@ -0,0 +1,31 @@ +from typing import Literal, cast + +WorkflowActionItemFormFieldConditionActionItemCondition = Literal[ + "ANY", "CONTAINS", "CONTAINS_ALL", "CONTAINS_NONE", "IS", "IS NOT", "NONE", "SET", "UNSET" +] + +WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_ACTION_ITEM_CONDITION_VALUES: set[ + WorkflowActionItemFormFieldConditionActionItemCondition +] = { + "ANY", + "CONTAINS", + "CONTAINS_ALL", + "CONTAINS_NONE", + "IS", + "IS NOT", + "NONE", + "SET", + "UNSET", +} + + +def check_workflow_action_item_form_field_condition_action_item_condition( + value: str | None, +) -> WorkflowActionItemFormFieldConditionActionItemCondition | None: + if value is None: + return None + if value in WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_ACTION_ITEM_CONDITION_VALUES: + return cast(WorkflowActionItemFormFieldConditionActionItemCondition, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_ACTION_ITEM_CONDITION_VALUES!r}" + ) diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_list.py b/rootly_sdk/models/workflow_action_item_form_field_condition_list.py new file mode 100644 index 00000000..8e28f729 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_list.py @@ -0,0 +1,134 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.meta import Meta + from ..models.workflow_action_item_form_field_condition_list_data_item import ( + WorkflowActionItemFormFieldConditionListDataItem, + ) + + +T = TypeVar("T", bound="WorkflowActionItemFormFieldConditionList") + + +@_attrs_define +class WorkflowActionItemFormFieldConditionList: + """ + Attributes: + data (list[WorkflowActionItemFormFieldConditionListDataItem]): + links (Links): + meta (Meta): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: list[WorkflowActionItemFormFieldConditionListDataItem] + links: Links + meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.workflow_action_item_form_field_condition_list_data_item import ( + WorkflowActionItemFormFieldConditionListDataItem, + ) + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + + 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() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + "links": links, + "meta": meta, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.meta import Meta + from ..models.workflow_action_item_form_field_condition_list_data_item import ( + WorkflowActionItemFormFieldConditionListDataItem, + ) + + d = dict(src_dict) + data = [] + _data = d.pop("data") + for data_item_data in _data: + data_item = WorkflowActionItemFormFieldConditionListDataItem.from_dict(data_item_data) + + data.append(data_item) + + links = Links.from_dict(d.pop("links")) + + meta = Meta.from_dict(d.pop("meta")) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + workflow_action_item_form_field_condition_list = cls( + data=data, + links=links, + meta=meta, + included=included, + ) + + workflow_action_item_form_field_condition_list.additional_properties = d + return workflow_action_item_form_field_condition_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/workflow_action_item_form_field_condition_list_data_item.py b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py new file mode 100644 index 00000000..5e243144 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.workflow_action_item_form_field_condition_list_data_item_type import ( + check_workflow_action_item_form_field_condition_list_data_item_type, +) +from ..models.workflow_action_item_form_field_condition_list_data_item_type import ( + WorkflowActionItemFormFieldConditionListDataItemType, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + +T = TypeVar("T", bound="WorkflowActionItemFormFieldConditionListDataItem") + + +@_attrs_define +class WorkflowActionItemFormFieldConditionListDataItem: + """ + Attributes: + id (str): Unique ID of the workflow_action_item_form_field_condition + type_ (WorkflowActionItemFormFieldConditionListDataItemType): + attributes (WorkflowActionItemFormFieldCondition): + """ + + id: str + type_: WorkflowActionItemFormFieldConditionListDataItemType + attributes: WorkflowActionItemFormFieldCondition + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + 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.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_workflow_action_item_form_field_condition_list_data_item_type(d.pop("type")) + + attributes = WorkflowActionItemFormFieldCondition.from_dict(d.pop("attributes")) + + workflow_action_item_form_field_condition_list_data_item = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + workflow_action_item_form_field_condition_list_data_item.additional_properties = d + return workflow_action_item_form_field_condition_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/workflow_action_item_form_field_condition_list_data_item_type.py b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item_type.py new file mode 100644 index 00000000..e154aa36 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +WorkflowActionItemFormFieldConditionListDataItemType = Literal["workflow_action_item_form_field_conditions"] + +WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_LIST_DATA_ITEM_TYPE_VALUES: set[ + WorkflowActionItemFormFieldConditionListDataItemType +] = { + "workflow_action_item_form_field_conditions", +} + + +def check_workflow_action_item_form_field_condition_list_data_item_type( + value: str | None, +) -> WorkflowActionItemFormFieldConditionListDataItemType | None: + if value is None: + return None + if value in WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_LIST_DATA_ITEM_TYPE_VALUES: + return cast(WorkflowActionItemFormFieldConditionListDataItemType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_LIST_DATA_ITEM_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_response.py b/rootly_sdk/models/workflow_action_item_form_field_condition_response.py new file mode 100644 index 00000000..ebb6f3cb --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_response.py @@ -0,0 +1,104 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + +if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.workflow_action_item_form_field_condition_response_data import ( + WorkflowActionItemFormFieldConditionResponseData, + ) + + +T = TypeVar("T", bound="WorkflowActionItemFormFieldConditionResponse") + + +@_attrs_define +class WorkflowActionItemFormFieldConditionResponse: + """ + Attributes: + data (WorkflowActionItemFormFieldConditionResponseData): + included (list[JsonapiIncludedResource] | Unset): + """ + + data: WorkflowActionItemFormFieldConditionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.workflow_action_item_form_field_condition_response_data import ( + WorkflowActionItemFormFieldConditionResponseData, + ) + from ..models.jsonapi_included_resource import JsonapiIncludedResource + + data = self.data.to_dict() + + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + + field_dict: dict[str, Any] = {} + field_dict.update(self.additional_properties) + field_dict.update( + { + "data": data, + } + ) + if included is not UNSET: + field_dict["included"] = included + + return field_dict + + @classmethod + def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.workflow_action_item_form_field_condition_response_data import ( + WorkflowActionItemFormFieldConditionResponseData, + ) + + d = dict(src_dict) + data = WorkflowActionItemFormFieldConditionResponseData.from_dict(d.pop("data")) + + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + + workflow_action_item_form_field_condition_response = cls( + data=data, + included=included, + ) + + workflow_action_item_form_field_condition_response.additional_properties = d + return workflow_action_item_form_field_condition_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/workflow_action_item_form_field_condition_response_data.py b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py new file mode 100644 index 00000000..f39cb608 --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py @@ -0,0 +1,95 @@ +from __future__ import annotations + +from collections.abc import Mapping +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator + +from attrs import define as _attrs_define +from attrs import field as _attrs_field + +from ..types import UNSET, Unset + +from ..models.workflow_action_item_form_field_condition_response_data_type import ( + check_workflow_action_item_form_field_condition_response_data_type, +) +from ..models.workflow_action_item_form_field_condition_response_data_type import ( + WorkflowActionItemFormFieldConditionResponseDataType, +) +from typing import cast + +if TYPE_CHECKING: + from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + +T = TypeVar("T", bound="WorkflowActionItemFormFieldConditionResponseData") + + +@_attrs_define +class WorkflowActionItemFormFieldConditionResponseData: + """ + Attributes: + id (str): Unique ID of the workflow_action_item_form_field_condition + type_ (WorkflowActionItemFormFieldConditionResponseDataType): + attributes (WorkflowActionItemFormFieldCondition): + """ + + id: str + type_: WorkflowActionItemFormFieldConditionResponseDataType + attributes: WorkflowActionItemFormFieldCondition + additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) + + def to_dict(self) -> dict[str, Any]: + from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + 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.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition + + d = dict(src_dict) + id = d.pop("id") + + type_ = check_workflow_action_item_form_field_condition_response_data_type(d.pop("type")) + + attributes = WorkflowActionItemFormFieldCondition.from_dict(d.pop("attributes")) + + workflow_action_item_form_field_condition_response_data = cls( + id=id, + type_=type_, + attributes=attributes, + ) + + workflow_action_item_form_field_condition_response_data.additional_properties = d + return workflow_action_item_form_field_condition_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/workflow_action_item_form_field_condition_response_data_type.py b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data_type.py new file mode 100644 index 00000000..c91f2c5e --- /dev/null +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data_type.py @@ -0,0 +1,21 @@ +from typing import Literal, cast + +WorkflowActionItemFormFieldConditionResponseDataType = Literal["workflow_action_item_form_field_conditions"] + +WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_RESPONSE_DATA_TYPE_VALUES: set[ + WorkflowActionItemFormFieldConditionResponseDataType +] = { + "workflow_action_item_form_field_conditions", +} + + +def check_workflow_action_item_form_field_condition_response_data_type( + value: str | None, +) -> WorkflowActionItemFormFieldConditionResponseDataType | None: + if value is None: + return None + if value in WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_RESPONSE_DATA_TYPE_VALUES: + return cast(WorkflowActionItemFormFieldConditionResponseDataType, value) + raise TypeError( + f"Unexpected value {value!r}. Expected one of {WORKFLOW_ACTION_ITEM_FORM_FIELD_CONDITION_RESPONSE_DATA_TYPE_VALUES!r}" + ) diff --git a/rootly_sdk/models/workflow_custom_field_selection.py b/rootly_sdk/models/workflow_custom_field_selection.py index aa0bec5c..e9231887 100644 --- a/rootly_sdk/models/workflow_custom_field_selection.py +++ b/rootly_sdk/models/workflow_custom_field_selection.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.workflow_custom_field_selection_incident_condition import ( - WorkflowCustomFieldSelectionIncidentCondition, check_workflow_custom_field_selection_incident_condition, ) +from ..models.workflow_custom_field_selection_incident_condition import WorkflowCustomFieldSelectionIncidentCondition from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="WorkflowCustomFieldSelection") diff --git a/rootly_sdk/models/workflow_custom_field_selection_list.py b/rootly_sdk/models/workflow_custom_field_selection_list.py index 22d392a7..2bca17d2 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_list.py +++ b/rootly_sdk/models/workflow_custom_field_selection_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_custom_field_selection_list_data_item import WorkflowCustomFieldSelectionListDataItem @@ -22,14 +28,21 @@ class WorkflowCustomFieldSelectionList: data (list[WorkflowCustomFieldSelectionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowCustomFieldSelectionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.workflow_custom_field_selection_list_data_item import WorkflowCustomFieldSelectionListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_custom_field_selection_list_data_item import WorkflowCustomFieldSelectionListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_custom_field_selection_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_custom_field_selection_list.additional_properties = d 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 efbc03c1..d4a6032d 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,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.workflow_custom_field_selection_list_data_item_type import ( - WorkflowCustomFieldSelectionListDataItemType, check_workflow_custom_field_selection_list_data_item_type, ) +from ..models.workflow_custom_field_selection_list_data_item_type import WorkflowCustomFieldSelectionListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.workflow_custom_field_selection import WorkflowCustomFieldSelection @@ -33,6 +36,8 @@ class WorkflowCustomFieldSelectionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_custom_field_selection import WorkflowCustomFieldSelection + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_custom_field_selection_response.py b/rootly_sdk/models/workflow_custom_field_selection_response.py index 04fffc61..b2ebe06b 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_response.py +++ b/rootly_sdk/models/workflow_custom_field_selection_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_custom_field_selection_response_data import WorkflowCustomFieldSelectionResponseData @@ -18,14 +24,26 @@ class WorkflowCustomFieldSelectionResponse: """ Attributes: data (WorkflowCustomFieldSelectionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowCustomFieldSelectionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_custom_field_selection_response_data import WorkflowCustomFieldSelectionResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_custom_field_selection_response_data import WorkflowCustomFieldSelectionResponseData d = dict(src_dict) data = WorkflowCustomFieldSelectionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_custom_field_selection_response = cls( data=data, + included=included, ) workflow_custom_field_selection_response.additional_properties = d 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 48636735..347e9877 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_response_data.py +++ b/rootly_sdk/models/workflow_custom_field_selection_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.workflow_custom_field_selection_response_data_type import ( - WorkflowCustomFieldSelectionResponseDataType, check_workflow_custom_field_selection_response_data_type, ) +from ..models.workflow_custom_field_selection_response_data_type import WorkflowCustomFieldSelectionResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.workflow_custom_field_selection import WorkflowCustomFieldSelection @@ -33,6 +36,8 @@ class WorkflowCustomFieldSelectionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_custom_field_selection import WorkflowCustomFieldSelection + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_form_field_condition.py b/rootly_sdk/models/workflow_form_field_condition.py index f3d3ed95..d6e8ce6f 100644 --- a/rootly_sdk/models/workflow_form_field_condition.py +++ b/rootly_sdk/models/workflow_form_field_condition.py @@ -1,16 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.workflow_form_field_condition_incident_condition import ( - WorkflowFormFieldConditionIncidentCondition, check_workflow_form_field_condition_incident_condition, ) +from ..models.workflow_form_field_condition_incident_condition import WorkflowFormFieldConditionIncidentCondition from ..types import UNSET, Unset +from typing import cast + T = TypeVar("T", bound="WorkflowFormFieldCondition") diff --git a/rootly_sdk/models/workflow_form_field_condition_list.py b/rootly_sdk/models/workflow_form_field_condition_list.py index 8292e787..ab079922 100644 --- a/rootly_sdk/models/workflow_form_field_condition_list.py +++ b/rootly_sdk/models/workflow_form_field_condition_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_form_field_condition_list_data_item import WorkflowFormFieldConditionListDataItem @@ -22,14 +28,21 @@ class WorkflowFormFieldConditionList: data (list[WorkflowFormFieldConditionListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowFormFieldConditionListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_form_field_condition_list_data_item import WorkflowFormFieldConditionListDataItem + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_form_field_condition_list_data_item import WorkflowFormFieldConditionListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_form_field_condition_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_form_field_condition_list.additional_properties = d 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 9c98bfa0..43e4bc70 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,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.workflow_form_field_condition_list_data_item_type import ( - WorkflowFormFieldConditionListDataItemType, check_workflow_form_field_condition_list_data_item_type, ) +from ..models.workflow_form_field_condition_list_data_item_type import WorkflowFormFieldConditionListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.workflow_form_field_condition import WorkflowFormFieldCondition @@ -33,6 +36,8 @@ class WorkflowFormFieldConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_form_field_condition import WorkflowFormFieldCondition + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_form_field_condition_response.py b/rootly_sdk/models/workflow_form_field_condition_response.py index 51a5c101..55cc9265 100644 --- a/rootly_sdk/models/workflow_form_field_condition_response.py +++ b/rootly_sdk/models/workflow_form_field_condition_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_form_field_condition_response_data import WorkflowFormFieldConditionResponseData @@ -18,14 +24,26 @@ class WorkflowFormFieldConditionResponse: """ Attributes: data (WorkflowFormFieldConditionResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowFormFieldConditionResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.workflow_form_field_condition_response_data import WorkflowFormFieldConditionResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_form_field_condition_response_data import WorkflowFormFieldConditionResponseData d = dict(src_dict) data = WorkflowFormFieldConditionResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_form_field_condition_response = cls( data=data, + included=included, ) workflow_form_field_condition_response.additional_properties = d 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 a4b46959..126255e8 100644 --- a/rootly_sdk/models/workflow_form_field_condition_response_data.py +++ b/rootly_sdk/models/workflow_form_field_condition_response_data.py @@ -1,15 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + from ..models.workflow_form_field_condition_response_data_type import ( - WorkflowFormFieldConditionResponseDataType, check_workflow_form_field_condition_response_data_type, ) +from ..models.workflow_form_field_condition_response_data_type import WorkflowFormFieldConditionResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.workflow_form_field_condition import WorkflowFormFieldCondition @@ -33,6 +36,8 @@ class WorkflowFormFieldConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_form_field_condition import WorkflowFormFieldCondition + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_group.py b/rootly_sdk/models/workflow_group.py index 1563246a..3edb2276 100644 --- a/rootly_sdk/models/workflow_group.py +++ b/rootly_sdk/models/workflow_group.py @@ -1,14 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_group_kind import WorkflowGroupKind, check_workflow_group_kind from ..types import UNSET, Unset +from ..models.workflow_group_kind import check_workflow_group_kind +from ..models.workflow_group_kind import WorkflowGroupKind +from ..types import UNSET, Unset +from typing import cast + + T = TypeVar("T", bound="WorkflowGroup") diff --git a/rootly_sdk/models/workflow_group_list.py b/rootly_sdk/models/workflow_group_list.py index 88fd2044..b51273a8 100644 --- a/rootly_sdk/models/workflow_group_list.py +++ b/rootly_sdk/models/workflow_group_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_group_list_data_item import WorkflowGroupListDataItem @@ -22,14 +28,21 @@ class WorkflowGroupList: data (list[WorkflowGroupListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowGroupListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.workflow_group_list_data_item import WorkflowGroupListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_group_list_data_item import WorkflowGroupListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_group_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_group_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_group_list_data_item.py b/rootly_sdk/models/workflow_group_list_data_item.py index f6ba32cb..15802e54 100644 --- a/rootly_sdk/models/workflow_group_list_data_item.py +++ b/rootly_sdk/models/workflow_group_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_group_list_data_item_type import ( - WorkflowGroupListDataItemType, - check_workflow_group_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.workflow_group_list_data_item_type import check_workflow_group_list_data_item_type +from ..models.workflow_group_list_data_item_type import WorkflowGroupListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.workflow_group import WorkflowGroup @@ -33,6 +34,8 @@ class WorkflowGroupListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_group import WorkflowGroup + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_group_response.py b/rootly_sdk/models/workflow_group_response.py index 686ea693..bcabe4ff 100644 --- a/rootly_sdk/models/workflow_group_response.py +++ b/rootly_sdk/models/workflow_group_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_group_response_data import WorkflowGroupResponseData @@ -18,14 +24,26 @@ class WorkflowGroupResponse: """ Attributes: data (WorkflowGroupResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowGroupResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_group_response_data import WorkflowGroupResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_group_response_data import WorkflowGroupResponseData d = dict(src_dict) data = WorkflowGroupResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_group_response = cls( data=data, + included=included, ) workflow_group_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_group_response_data.py b/rootly_sdk/models/workflow_group_response_data.py index dfe198b8..0bcc17a5 100644 --- a/rootly_sdk/models/workflow_group_response_data.py +++ b/rootly_sdk/models/workflow_group_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_group_response_data_type import ( - WorkflowGroupResponseDataType, - check_workflow_group_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.workflow_group_response_data_type import check_workflow_group_response_data_type +from ..models.workflow_group_response_data_type import WorkflowGroupResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.workflow_group import WorkflowGroup @@ -33,6 +34,8 @@ class WorkflowGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_group import WorkflowGroup + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_list.py b/rootly_sdk/models/workflow_list.py index abf5662d..8aacd40e 100644 --- a/rootly_sdk/models/workflow_list.py +++ b/rootly_sdk/models/workflow_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_list_data_item import WorkflowListDataItem @@ -22,14 +28,21 @@ class WorkflowList: data (list[WorkflowListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.workflow_list_data_item import WorkflowListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_list_data_item import WorkflowListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_list_data_item.py b/rootly_sdk/models/workflow_list_data_item.py index 1dc431c1..8f73f302 100644 --- a/rootly_sdk/models/workflow_list_data_item.py +++ b/rootly_sdk/models/workflow_list_data_item.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_list_data_item_type import WorkflowListDataItemType, check_workflow_list_data_item_type +from ..types import UNSET, Unset + +from ..models.workflow_list_data_item_type import check_workflow_list_data_item_type +from ..models.workflow_list_data_item_type import WorkflowListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.workflow import Workflow @@ -30,6 +34,8 @@ class WorkflowListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow import Workflow + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_response.py b/rootly_sdk/models/workflow_response.py index 0dafd7f8..81db1e52 100644 --- a/rootly_sdk/models/workflow_response.py +++ b/rootly_sdk/models/workflow_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_response_data import WorkflowResponseData @@ -18,14 +24,26 @@ class WorkflowResponse: """ Attributes: data (WorkflowResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_response_data import WorkflowResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_response_data import WorkflowResponseData d = dict(src_dict) data = WorkflowResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_response = cls( data=data, + included=included, ) workflow_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_response_data.py b/rootly_sdk/models/workflow_response_data.py index 0a58c477..c100c697 100644 --- a/rootly_sdk/models/workflow_response_data.py +++ b/rootly_sdk/models/workflow_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_response_data_type import WorkflowResponseDataType, check_workflow_response_data_type +from ..types import UNSET, Unset + +from ..models.workflow_response_data_type import check_workflow_response_data_type +from ..models.workflow_response_data_type import WorkflowResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.workflow import Workflow @@ -30,6 +34,8 @@ class WorkflowResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow import Workflow + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_run.py b/rootly_sdk/models/workflow_run.py index c94f5585..ad0f2ed1 100644 --- a/rootly_sdk/models/workflow_run.py +++ b/rootly_sdk/models/workflow_run.py @@ -1,15 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_run_status import WorkflowRunStatus, check_workflow_run_status -from ..models.workflow_run_triggered_by import WorkflowRunTriggeredBy, check_workflow_run_triggered_by from ..types import UNSET, Unset +from ..models.workflow_run_status import check_workflow_run_status +from ..models.workflow_run_status import WorkflowRunStatus +from ..models.workflow_run_triggered_by import check_workflow_run_triggered_by +from ..models.workflow_run_triggered_by import WorkflowRunTriggeredBy +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.workflow_run_context import WorkflowRunContext @@ -54,6 +59,8 @@ class WorkflowRun: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_run_context import WorkflowRunContext + workflow_id = self.workflow_id status: str = self.status diff --git a/rootly_sdk/models/workflow_run_context.py b/rootly_sdk/models/workflow_run_context.py index ecd3107f..af0d9d77 100644 --- a/rootly_sdk/models/workflow_run_context.py +++ b/rootly_sdk/models/workflow_run_context.py @@ -1,11 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + + T = TypeVar("T", bound="WorkflowRunContext") diff --git a/rootly_sdk/models/workflow_run_response.py b/rootly_sdk/models/workflow_run_response.py index ab93fbee..fc9d8199 100644 --- a/rootly_sdk/models/workflow_run_response.py +++ b/rootly_sdk/models/workflow_run_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_run_response_data import WorkflowRunResponseData @@ -18,14 +24,26 @@ class WorkflowRunResponse: """ Attributes: data (WorkflowRunResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowRunResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.workflow_run_response_data import WorkflowRunResponseData + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_run_response_data import WorkflowRunResponseData d = dict(src_dict) data = WorkflowRunResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_run_response = cls( data=data, + included=included, ) workflow_run_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_run_response_data.py b/rootly_sdk/models/workflow_run_response_data.py index a2b091e9..e553b5a8 100644 --- a/rootly_sdk/models/workflow_run_response_data.py +++ b/rootly_sdk/models/workflow_run_response_data.py @@ -1,12 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_run_response_data_type import WorkflowRunResponseDataType, check_workflow_run_response_data_type +from ..types import UNSET, Unset + +from ..models.workflow_run_response_data_type import check_workflow_run_response_data_type +from ..models.workflow_run_response_data_type import WorkflowRunResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.workflow_run import WorkflowRun @@ -30,6 +34,8 @@ class WorkflowRunResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_run import WorkflowRun + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_runs_list.py b/rootly_sdk/models/workflow_runs_list.py index f0b180d0..72f0e8f4 100644 --- a/rootly_sdk/models/workflow_runs_list.py +++ b/rootly_sdk/models/workflow_runs_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_runs_list_data_item import WorkflowRunsListDataItem @@ -22,14 +28,21 @@ class WorkflowRunsList: data (list[WorkflowRunsListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowRunsListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.workflow_runs_list_data_item import WorkflowRunsListDataItem + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_runs_list_data_item import WorkflowRunsListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_runs_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_runs_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_runs_list_data_item.py b/rootly_sdk/models/workflow_runs_list_data_item.py index a501592c..7f907712 100644 --- a/rootly_sdk/models/workflow_runs_list_data_item.py +++ b/rootly_sdk/models/workflow_runs_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_runs_list_data_item_type import ( - WorkflowRunsListDataItemType, - check_workflow_runs_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.workflow_runs_list_data_item_type import check_workflow_runs_list_data_item_type +from ..models.workflow_runs_list_data_item_type import WorkflowRunsListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.workflow_run import WorkflowRun @@ -33,6 +34,8 @@ class WorkflowRunsListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_run import WorkflowRun + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_task.py b/rootly_sdk/models/workflow_task.py index 3c71e8a1..e0ffb31a 100644 --- a/rootly_sdk/models/workflow_task.py +++ b/rootly_sdk/models/workflow_task.py @@ -1,26 +1,38 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar, cast +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import AttachRetrospectivePdfToJiraIssueTaskParams from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -35,6 +47,7 @@ from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -61,6 +74,8 @@ from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -71,26 +86,60 @@ from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 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 + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -111,6 +160,7 @@ from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -143,41 +193,56 @@ class WorkflowTask: """ Attributes: workflow_id (str): The ID of the parent workflow - 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 | + task_params (AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams | AddSlackBookmarkTaskParamsType0 | + AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams | + ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | + AttachDatadogDashboardsTaskParams | AttachRetrospectivePdfToJiraIssueTaskParams | + AutoAssignRoleOpsgenieTaskParams | AutoAssignRolePagerdutyTaskParamsType0 | + AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | + CallPeopleTaskParams | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | + CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams | CreateAsanaSubtaskTaskParams | + CreateAsanaTaskTaskParams | CreateClickupTaskTaskParams | CreateCodaPageTaskParams | + CreateConfluencePageTaskParams | CreateDatadogNotebookTaskParams | CreateDropboxPaperPageTaskParams | + CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams | + CreateGoogleChatSpaceTaskParams | 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 | CreateShortcutStoryTaskParamsType0 | + CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | + CreateSubIncidentTaskParams | CreateTrelloCardTaskParams | CreateWatsonxChatCompletionTaskParams | + CreateWebexMeetingTaskParams | CreateZendeskJiraLinkTaskParams | CreateZendeskTicketTaskParams | + CreateZoomMeetingTaskParams | GetAlertsTaskParams | GetGithubCommitsTaskParamsType0 | + GetGithubCommitsTaskParamsType1 | GetGitlabCommitsTaskParamsType0 | GetGitlabCommitsTaskParamsType1 | + GetPulsesTaskParams | HttpClientTaskParams | InviteToGoogleChatSpaceTaskParams | + InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | + InviteToSlackChannelOpsgenieTaskParams | InviteToSlackChannelPagerdutyTaskParamsType0 | + InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams | + InviteToSlackChannelTaskParamsType0 | InviteToSlackChannelTaskParamsType1 | InviteToSlackChannelTaskParamsType2 + | 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 | + PageRootlyOnCallRespondersTaskParams | PageVictorOpsOnCallRespondersTaskParamsType0 | + PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | + RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams | RenameGoogleChatSpaceTaskParams | + RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | + SendDashboardReportTaskParams | SendEmailTaskParams | SendGoogleChatAttachmentsTaskParams | + SendGoogleChatMessageTaskParams | SendMicrosoftTeamsBlocksTaskParamsType0 | + SendMicrosoftTeamsChatMessageTaskParams | SendMicrosoftTeamsMessageTaskParamsType0 | + SendSlackBlocksTaskParamsType0 | SendSlackBlocksTaskParamsType1 | SendSlackBlocksTaskParamsType2 | + SendSlackMessageTaskParamsType0 | SendSlackMessageTaskParamsType1 | SendSlackMessageTaskParamsType2 | + SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams | + SnapshotGrafanaDashboardTaskParams | SnapshotLookerLookTaskParams | SnapshotNewRelicGraphTaskParams | + TriggerWorkflowTaskParams | TweetTwitterMessageTaskParams | UpdateActionItemTaskParams | + UpdateAirtableTableRecordTaskParams | UpdateAsanaTaskTaskParams | UpdateAttachedAlertsTaskParams | + UpdateClickupTaskTaskParams | UpdateCodaPageTaskParams | UpdateConfluencePageTaskParams | + UpdateDatadogNotebookTaskParams | UpdateDropboxPaperPageTaskParams | UpdateGithubIssueTaskParams | + UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams | UpdateIncidentTaskParams | UpdateJiraIssueTaskParams | UpdateLinearIssueTaskParams | UpdateMotionTaskTaskParams | UpdateNotionPageTaskParams | UpdateOpsgenieAlertTaskParams | UpdateOpsgenieIncidentTaskParams | @@ -197,17 +262,25 @@ class WorkflowTask: task_params: ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -221,6 +294,7 @@ class WorkflowTask: | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -248,6 +322,8 @@ class WorkflowTask: | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -258,26 +334,50 @@ class WorkflowTask: | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -298,6 +398,7 @@ class WorkflowTask: | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -330,140 +431,193 @@ class WorkflowTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.add_action_item_task_params import AddActionItemTaskParams - from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams - from ..models.add_role_task_params import AddRoleTaskParams - from ..models.add_team_task_params import AddTeamTaskParams - from ..models.add_to_timeline_task_params import AddToTimelineTaskParams - from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams - from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 + from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams + from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams - from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams - from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams - from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams - from ..models.call_people_task_params import CallPeopleTaskParams - from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams - from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams - from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams - from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams - from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams - from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams - from ..models.create_coda_page_task_params import CreateCodaPageTaskParams + from ..models.create_notion_page_task_params import CreateNotionPageTaskParams + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.create_confluence_page_task_params import CreateConfluencePageTaskParams - from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams - from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams - from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams - from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams + from ..models.send_sms_task_params import SendSmsTaskParams + from ..models.call_people_task_params import CallPeopleTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams + from ..models.create_incident_task_params import CreateIncidentTaskParams + from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 + from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams + from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams + from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams + from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams + from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams + from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams + from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams + from ..models.get_pulses_task_params import GetPulsesTaskParams + from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams + from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams + from ..models.publish_incident_task_params import PublishIncidentTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams + from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams + from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams + from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams + from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams - from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams - from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams + from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams + from ..models.update_incident_task_params import UpdateIncidentTaskParams + from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.add_team_task_params import AddTeamTaskParams + from ..models.update_status_task_params import UpdateStatusTaskParams + from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 + from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams + from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) + from ..models.redis_client_task_params import RedisClientTaskParams + from ..models.add_action_item_task_params import AddActionItemTaskParams + from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams + from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.http_client_task_params import HttpClientTaskParams + from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams from ..models.create_google_meeting_task_params import CreateGoogleMeetingTaskParams - from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams - 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.update_asana_task_task_params import UpdateAsanaTaskTaskParams + from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 + from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams + from ..models.create_coda_page_task_params import CreateCodaPageTaskParams + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) 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 - from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams - from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams - from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams - from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams + from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams + from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams + from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams + from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams + from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams + from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams + from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams + from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_motion_task_task_params import CreateMotionTaskTaskParams - from ..models.create_notion_page_task_params import CreateNotionPageTaskParams - from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams - from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams - from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams - from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams - from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams + from ..models.update_action_item_task_params import UpdateActionItemTaskParams + from ..models.print_task_params import PrintTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams + from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams from ..models.create_quip_page_task_params import CreateQuipPageTaskParams + from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams + from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams + from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams - from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams - from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams - from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams - from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams - from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams - from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams + from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams + from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams + from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams + from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams + from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.create_webex_meeting_task_params import CreateWebexMeetingTaskParams - from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams - from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams - from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams - from ..models.get_alerts_task_params import GetAlertsTaskParams - from ..models.get_pulses_task_params import GetPulsesTaskParams - from ..models.http_client_task_params import HttpClientTaskParams - from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams - 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 - from ..models.print_task_params import PrintTaskParams - from ..models.publish_incident_task_params import PublishIncidentTaskParams - from ..models.redis_client_task_params import RedisClientTaskParams + from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams + from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams + from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams + from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams + from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams + from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams + from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams + from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams + from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams + from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams + from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.add_role_task_params import AddRoleTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams - from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams - from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams - from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams + from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams + from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams + from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams from ..models.send_email_task_params import SendEmailTaskParams - from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams - from ..models.send_sms_task_params import SendSmsTaskParams - from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams - from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams - from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams + from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.snapshot_looker_look_task_params import SnapshotLookerLookTaskParams - from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams - from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams - from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams - from ..models.update_action_item_task_params import UpdateActionItemTaskParams - from ..models.update_airtable_table_record_task_params import UpdateAirtableTableRecordTaskParams - from ..models.update_asana_task_task_params import UpdateAsanaTaskTaskParams - from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams + from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams + from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams + from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams + from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams from ..models.update_clickup_task_task_params import UpdateClickupTaskTaskParams - from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams - from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams - from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams - from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams - from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams + from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.update_airtable_table_record_task_params import UpdateAirtableTableRecordTaskParams + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams + from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 + from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams - from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams - from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams - from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams - from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams - from ..models.update_incident_task_params import UpdateIncidentTaskParams - from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams - from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams - from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams - from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams - from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams + from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams from ..models.update_opsgenie_incident_task_params import UpdateOpsgenieIncidentTaskParams - from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams - from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams - from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams - from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams - from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams - from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams - from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams - from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams - from ..models.update_status_task_params import UpdateStatusTaskParams - from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams - from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams - from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams + from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams + from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams + from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams + from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams workflow_id = self.workflow_id - task_params: Any | dict[str, Any] + task_params: dict[str, Any] if isinstance(self.task_params, AddActionItemTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateActionItemTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddRoleTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddSlackBookmarkTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddTeamTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddToTimelineTaskParams): @@ -476,6 +630,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, AutoAssignRoleRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AutoAssignRolePagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdatePagerdutyIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreatePagerdutyStatusUpdateTaskParams): @@ -540,6 +698,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateJiraSubtaskTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AttachRetrospectivePdfToJiraIssueTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearIssueTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateLinearSubtaskIssueTaskParams): @@ -552,8 +712,28 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMicrosoftTeamsChatTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, AddMicrosoftTeamsTabTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, AddMicrosoftTeamsChatTabTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatMessageTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendGoogleChatAttachmentsTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ArchiveGoogleChatSpacesTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, RenameGoogleChatSpaceTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, UpdateGoogleChatSpaceDescriptionTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, ChangeGoogleChatSpacePrivacyTaskParams): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, ArchiveMicrosoftTeamsChannelsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, RenameMicrosoftTeamsChannelTaskParams): @@ -562,8 +742,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateNotionPageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsMessageTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendMicrosoftTeamsChatMessageTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendMicrosoftTeamsBlocksTaskParamsType0): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateNotionPageTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateQuipPageTaskParams): @@ -578,6 +762,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateServiceNowIncidentTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, CreateShortcutStoryTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateShortcutTaskTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateTrelloCardTaskParams): @@ -594,6 +782,14 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateZoomMeetingTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGithubCommitsTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, GetGitlabCommitsTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetPulsesTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, GetAlertsTaskParams): @@ -604,6 +800,18 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelRootlyTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToMicrosoftTeamsChannelRootlyTaskParams): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelPagerdutyTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, InviteToSlackChannelTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, InviteToSlackChannelVictorOpsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PageOpsgenieOnCallRespondersTaskParams): @@ -622,6 +830,10 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, PagePagerdutyOnCallRespondersTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, PageVictorOpsOnCallRespondersTaskParamsType1): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, UpdateVictorOpsIncidentTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, PrintTaskParams): @@ -642,6 +854,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateSlackChannelTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackMessageTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendSmsTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, SendWhatsappMessageTaskParams): @@ -696,6 +914,12 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, TriggerWorkflowTaskParams): task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType0): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType1): + task_params = self.task_params.to_dict() + elif isinstance(self.task_params, SendSlackBlocksTaskParamsType2): + task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateOpenaiChatCompletionTaskParams): task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateWatsonxChatCompletionTaskParams): @@ -704,10 +928,8 @@ def to_dict(self) -> dict[str, Any]: task_params = self.task_params.to_dict() elif isinstance(self.task_params, CreateMistralChatCompletionTaskParams): task_params = self.task_params.to_dict() - elif isinstance(self.task_params, CreateAnthropicChatCompletionTaskParams): - task_params = self.task_params.to_dict() else: - task_params = self.task_params + task_params = self.task_params.to_dict() position = self.position @@ -743,16 +965,27 @@ def to_dict(self) -> dict[str, Any]: def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 + from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 from ..models.add_role_task_params import AddRoleTaskParams + from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams + from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( + AttachRetrospectivePdfToJiraIssueTaskParams, + ) from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams @@ -767,6 +1000,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams @@ -793,6 +1027,8 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_quip_page_task_params import CreateQuipPageTaskParams from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams @@ -803,26 +1039,60 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 from ..models.get_pulses_task_params import GetPulsesTaskParams from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( + InviteToSlackChannelPagerdutyTaskParamsType0, + ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 + from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 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 + from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( + PageVictorOpsOnCallRespondersTaskParamsType0, + ) + from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( + PageVictorOpsOnCallRespondersTaskParamsType1, + ) from ..models.print_task_params import PrintTaskParams from ..models.publish_incident_task_params import PublishIncidentTaskParams from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 from ..models.send_sms_task_params import SendSmsTaskParams from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams @@ -843,6 +1113,7 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams @@ -874,17 +1145,25 @@ def _parse_task_params( ) -> ( AddActionItemTaskParams | AddMicrosoftTeamsChatTabTaskParams + | AddMicrosoftTeamsTabTaskParamsType0 + | AddMicrosoftTeamsTabTaskParamsType1 | AddRoleTaskParams + | AddSlackBookmarkTaskParamsType0 + | AddSlackBookmarkTaskParamsType1 | AddTeamTaskParams | AddToTimelineTaskParams - | Any + | ArchiveGoogleChatSpacesTaskParams | ArchiveMicrosoftTeamsChannelsTaskParams | ArchiveSlackChannelsTaskParams | AttachDatadogDashboardsTaskParams + | AttachRetrospectivePdfToJiraIssueTaskParams | AutoAssignRoleOpsgenieTaskParams + | AutoAssignRolePagerdutyTaskParamsType0 + | AutoAssignRolePagerdutyTaskParamsType1 | AutoAssignRoleRootlyTaskParams | AutoAssignRoleVictorOpsTaskParams | CallPeopleTaskParams + | ChangeGoogleChatSpacePrivacyTaskParams | ChangeSlackChannelPrivacyTaskParams | CreateAirtableTableRecordTaskParams | CreateAnthropicChatCompletionTaskParams @@ -898,6 +1177,7 @@ def _parse_task_params( | CreateGithubIssueTaskParams | CreateGitlabIssueTaskParams | CreateGoogleCalendarEventTaskParams + | CreateGoogleChatSpaceTaskParams | CreateGoogleDocsPageTaskParams | CreateGoogleDocsPermissionsTaskParams | CreateGoogleGeminiChatCompletionTaskParams @@ -925,6 +1205,8 @@ def _parse_task_params( | CreateQuipPageTaskParams | CreateServiceNowIncidentTaskParams | CreateSharepointPageTaskParams + | CreateShortcutStoryTaskParamsType0 + | CreateShortcutStoryTaskParamsType1 | CreateShortcutTaskTaskParams | CreateSlackChannelTaskParams | CreateSubIncidentTaskParams @@ -935,26 +1217,50 @@ def _parse_task_params( | CreateZendeskTicketTaskParams | CreateZoomMeetingTaskParams | GetAlertsTaskParams + | GetGithubCommitsTaskParamsType0 + | GetGithubCommitsTaskParamsType1 + | GetGitlabCommitsTaskParamsType0 + | GetGitlabCommitsTaskParamsType1 | GetPulsesTaskParams | HttpClientTaskParams + | InviteToGoogleChatSpaceTaskParams + | InviteToMicrosoftTeamsChannelRootlyTaskParams | InviteToMicrosoftTeamsChannelTaskParams | InviteToSlackChannelOpsgenieTaskParams + | InviteToSlackChannelPagerdutyTaskParamsType0 + | InviteToSlackChannelPagerdutyTaskParamsType1 | InviteToSlackChannelRootlyTaskParams + | InviteToSlackChannelTaskParamsType0 + | InviteToSlackChannelTaskParamsType1 + | InviteToSlackChannelTaskParamsType2 | InviteToSlackChannelVictorOpsTaskParams | PageJsmopsOnCallRespondersTaskParams | PageOpsgenieOnCallRespondersTaskParams | PagePagerdutyOnCallRespondersTaskParams | PageRootlyOnCallRespondersTaskParams + | PageVictorOpsOnCallRespondersTaskParamsType0 + | PageVictorOpsOnCallRespondersTaskParamsType1 | PrintTaskParams | PublishIncidentTaskParams | RedisClientTaskParams | RemoveGoogleDocsPermissionsTaskParams + | RenameGoogleChatSpaceTaskParams | RenameMicrosoftTeamsChannelTaskParams | RenameSlackChannelTaskParams | RunCommandHerokuTaskParams | SendDashboardReportTaskParams | SendEmailTaskParams + | SendGoogleChatAttachmentsTaskParams + | SendGoogleChatMessageTaskParams + | SendMicrosoftTeamsBlocksTaskParamsType0 | SendMicrosoftTeamsChatMessageTaskParams + | SendMicrosoftTeamsMessageTaskParamsType0 + | SendSlackBlocksTaskParamsType0 + | SendSlackBlocksTaskParamsType1 + | SendSlackBlocksTaskParamsType2 + | SendSlackMessageTaskParamsType0 + | SendSlackMessageTaskParamsType1 + | SendSlackMessageTaskParamsType2 | SendSmsTaskParams | SendWhatsappMessageTaskParams | SnapshotDatadogGraphTaskParams @@ -975,6 +1281,7 @@ def _parse_task_params( | UpdateGithubIssueTaskParams | UpdateGitlabIssueTaskParams | UpdateGoogleCalendarEventTaskParams + | UpdateGoogleChatSpaceDescriptionTaskParams | UpdateGoogleDocsPageTaskParams | UpdateIncidentPostmortemTaskParams | UpdateIncidentStatusTimestampTaskParams @@ -1022,6 +1329,22 @@ def _parse_task_params( return task_params_type_2 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_0 = AddSlackBookmarkTaskParamsType0.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_slack_bookmark_task_params_type_1 = AddSlackBookmarkTaskParamsType1.from_dict(data) + + return componentsschemasadd_slack_bookmark_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1070,6 +1393,26 @@ def _parse_task_params( return task_params_type_9 except (TypeError, ValueError, AttributeError, KeyError): pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_0 = ( + AutoAssignRolePagerdutyTaskParamsType0.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasauto_assign_role_pagerduty_task_params_type_1 = ( + AutoAssignRolePagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasauto_assign_role_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass try: if not isinstance(data, dict): raise TypeError() @@ -1329,7 +1672,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_43 = CreateLinearIssueTaskParams.from_dict(data) + task_params_type_43 = AttachRetrospectivePdfToJiraIssueTaskParams.from_dict(data) return task_params_type_43 except (TypeError, ValueError, AttributeError, KeyError): @@ -1337,7 +1680,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_44 = CreateLinearSubtaskIssueTaskParams.from_dict(data) + task_params_type_44 = CreateLinearIssueTaskParams.from_dict(data) return task_params_type_44 except (TypeError, ValueError, AttributeError, KeyError): @@ -1345,7 +1688,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_45 = CreateLinearIssueCommentTaskParams.from_dict(data) + task_params_type_45 = CreateLinearSubtaskIssueTaskParams.from_dict(data) return task_params_type_45 except (TypeError, ValueError, AttributeError, KeyError): @@ -1353,7 +1696,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_46 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) + task_params_type_46 = CreateLinearIssueCommentTaskParams.from_dict(data) return task_params_type_46 except (TypeError, ValueError, AttributeError, KeyError): @@ -1361,7 +1704,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_47 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_47 = CreateMicrosoftTeamsMeetingTaskParams.from_dict(data) return task_params_type_47 except (TypeError, ValueError, AttributeError, KeyError): @@ -1369,7 +1712,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_48 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + task_params_type_48 = CreateMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_48 except (TypeError, ValueError, AttributeError, KeyError): @@ -1377,15 +1720,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_50 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) + task_params_type_49 = CreateMicrosoftTeamsChatTaskParams.from_dict(data) + + return task_params_type_49 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasadd_microsoft_teams_tab_task_params_type_0 = ( + AddMicrosoftTeamsTabTaskParamsType0.from_dict(data) + ) - return task_params_type_50 + return componentsschemasadd_microsoft_teams_tab_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_51 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) + componentsschemasadd_microsoft_teams_tab_task_params_type_1 = ( + AddMicrosoftTeamsTabTaskParamsType1.from_dict(data) + ) + + return componentsschemasadd_microsoft_teams_tab_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_51 = AddMicrosoftTeamsChatTabTaskParams.from_dict(data) return task_params_type_51 except (TypeError, ValueError, AttributeError, KeyError): @@ -1393,7 +1756,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_52 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_52 = CreateGoogleChatSpaceTaskParams.from_dict(data) return task_params_type_52 except (TypeError, ValueError, AttributeError, KeyError): @@ -1401,7 +1764,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_53 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) + task_params_type_53 = SendGoogleChatMessageTaskParams.from_dict(data) return task_params_type_53 except (TypeError, ValueError, AttributeError, KeyError): @@ -1409,7 +1772,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_54 = CreateNotionPageTaskParams.from_dict(data) + task_params_type_54 = SendGoogleChatAttachmentsTaskParams.from_dict(data) return task_params_type_54 except (TypeError, ValueError, AttributeError, KeyError): @@ -1417,7 +1780,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_56 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) + task_params_type_55 = InviteToGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_55 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_56 = ArchiveGoogleChatSpacesTaskParams.from_dict(data) return task_params_type_56 except (TypeError, ValueError, AttributeError, KeyError): @@ -1425,7 +1796,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_58 = UpdateNotionPageTaskParams.from_dict(data) + task_params_type_57 = RenameGoogleChatSpaceTaskParams.from_dict(data) + + return task_params_type_57 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_58 = UpdateGoogleChatSpaceDescriptionTaskParams.from_dict(data) return task_params_type_58 except (TypeError, ValueError, AttributeError, KeyError): @@ -1433,7 +1812,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_59 = UpdateQuipPageTaskParams.from_dict(data) + task_params_type_59 = ChangeGoogleChatSpacePrivacyTaskParams.from_dict(data) return task_params_type_59 except (TypeError, ValueError, AttributeError, KeyError): @@ -1441,7 +1820,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_60 = UpdateConfluencePageTaskParams.from_dict(data) + task_params_type_60 = ArchiveMicrosoftTeamsChannelsTaskParams.from_dict(data) return task_params_type_60 except (TypeError, ValueError, AttributeError, KeyError): @@ -1449,7 +1828,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_61 = UpdateSharepointPageTaskParams.from_dict(data) + task_params_type_61 = RenameMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_61 except (TypeError, ValueError, AttributeError, KeyError): @@ -1457,7 +1836,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_62 = UpdateDropboxPaperPageTaskParams.from_dict(data) + task_params_type_62 = InviteToMicrosoftTeamsChannelTaskParams.from_dict(data) return task_params_type_62 except (TypeError, ValueError, AttributeError, KeyError): @@ -1465,7 +1844,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_63 = UpdateDatadogNotebookTaskParams.from_dict(data) + task_params_type_63 = CreateNotionPageTaskParams.from_dict(data) return task_params_type_63 except (TypeError, ValueError, AttributeError, KeyError): @@ -1473,23 +1852,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_64 = CreateServiceNowIncidentTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_message_task_params_type_0 = ( + SendMicrosoftTeamsMessageTaskParamsType0.from_dict(data) + ) + + return componentsschemassend_microsoft_teams_message_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_65 = SendMicrosoftTeamsChatMessageTaskParams.from_dict(data) - return task_params_type_64 + return task_params_type_65 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_66 = CreateShortcutTaskTaskParams.from_dict(data) + componentsschemassend_microsoft_teams_blocks_task_params_type_0 = ( + SendMicrosoftTeamsBlocksTaskParamsType0.from_dict(data) + ) - return task_params_type_66 + return componentsschemassend_microsoft_teams_blocks_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_67 = CreateTrelloCardTaskParams.from_dict(data) + task_params_type_67 = UpdateNotionPageTaskParams.from_dict(data) return task_params_type_67 except (TypeError, ValueError, AttributeError, KeyError): @@ -1497,7 +1888,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_68 = CreateWebexMeetingTaskParams.from_dict(data) + task_params_type_68 = UpdateQuipPageTaskParams.from_dict(data) return task_params_type_68 except (TypeError, ValueError, AttributeError, KeyError): @@ -1505,7 +1896,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_69 = CreateZendeskTicketTaskParams.from_dict(data) + task_params_type_69 = UpdateConfluencePageTaskParams.from_dict(data) return task_params_type_69 except (TypeError, ValueError, AttributeError, KeyError): @@ -1513,7 +1904,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_70 = CreateZendeskJiraLinkTaskParams.from_dict(data) + task_params_type_70 = UpdateSharepointPageTaskParams.from_dict(data) return task_params_type_70 except (TypeError, ValueError, AttributeError, KeyError): @@ -1521,7 +1912,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_71 = CreateClickupTaskTaskParams.from_dict(data) + task_params_type_71 = UpdateDropboxPaperPageTaskParams.from_dict(data) return task_params_type_71 except (TypeError, ValueError, AttributeError, KeyError): @@ -1529,7 +1920,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_72 = CreateMotionTaskTaskParams.from_dict(data) + task_params_type_72 = UpdateDatadogNotebookTaskParams.from_dict(data) return task_params_type_72 except (TypeError, ValueError, AttributeError, KeyError): @@ -1537,7 +1928,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_73 = CreateZoomMeetingTaskParams.from_dict(data) + task_params_type_73 = CreateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_73 except (TypeError, ValueError, AttributeError, KeyError): @@ -1545,7 +1936,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_76 = GetPulsesTaskParams.from_dict(data) + componentsschemascreate_shortcut_story_task_params_type_0 = ( + CreateShortcutStoryTaskParamsType0.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemascreate_shortcut_story_task_params_type_1 = ( + CreateShortcutStoryTaskParamsType1.from_dict(data) + ) + + return componentsschemascreate_shortcut_story_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_75 = CreateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_75 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_76 = CreateTrelloCardTaskParams.from_dict(data) return task_params_type_76 except (TypeError, ValueError, AttributeError, KeyError): @@ -1553,7 +1972,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_77 = GetAlertsTaskParams.from_dict(data) + task_params_type_77 = CreateWebexMeetingTaskParams.from_dict(data) return task_params_type_77 except (TypeError, ValueError, AttributeError, KeyError): @@ -1561,7 +1980,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_78 = HttpClientTaskParams.from_dict(data) + task_params_type_78 = CreateZendeskTicketTaskParams.from_dict(data) return task_params_type_78 except (TypeError, ValueError, AttributeError, KeyError): @@ -1569,7 +1988,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_79 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) + task_params_type_79 = CreateZendeskJiraLinkTaskParams.from_dict(data) return task_params_type_79 except (TypeError, ValueError, AttributeError, KeyError): @@ -1577,7 +1996,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_80 = InviteToSlackChannelRootlyTaskParams.from_dict(data) + task_params_type_80 = CreateClickupTaskTaskParams.from_dict(data) return task_params_type_80 except (TypeError, ValueError, AttributeError, KeyError): @@ -1585,23 +2004,55 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_83 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) + task_params_type_81 = CreateMotionTaskTaskParams.from_dict(data) + + return task_params_type_81 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_82 = CreateZoomMeetingTaskParams.from_dict(data) + + return task_params_type_82 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_0 = GetGithubCommitsTaskParamsType0.from_dict(data) + + return componentsschemasget_github_commits_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasget_github_commits_task_params_type_1 = GetGithubCommitsTaskParamsType1.from_dict(data) - return task_params_type_83 + return componentsschemasget_github_commits_task_params_type_1 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_84 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_0 = GetGitlabCommitsTaskParamsType0.from_dict(data) - return task_params_type_84 + return componentsschemasget_gitlab_commits_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_85 = CreateOpsgenieAlertTaskParams.from_dict(data) + componentsschemasget_gitlab_commits_task_params_type_1 = GetGitlabCommitsTaskParamsType1.from_dict(data) + + return componentsschemasget_gitlab_commits_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_85 = GetPulsesTaskParams.from_dict(data) return task_params_type_85 except (TypeError, ValueError, AttributeError, KeyError): @@ -1609,7 +2060,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_86 = CreateJsmopsAlertTaskParams.from_dict(data) + task_params_type_86 = GetAlertsTaskParams.from_dict(data) return task_params_type_86 except (TypeError, ValueError, AttributeError, KeyError): @@ -1617,7 +2068,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_87 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) + task_params_type_87 = HttpClientTaskParams.from_dict(data) return task_params_type_87 except (TypeError, ValueError, AttributeError, KeyError): @@ -1625,7 +2076,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_88 = UpdateOpsgenieAlertTaskParams.from_dict(data) + task_params_type_88 = InviteToSlackChannelOpsgenieTaskParams.from_dict(data) return task_params_type_88 except (TypeError, ValueError, AttributeError, KeyError): @@ -1633,7 +2084,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_89 = UpdateOpsgenieIncidentTaskParams.from_dict(data) + task_params_type_89 = InviteToSlackChannelRootlyTaskParams.from_dict(data) return task_params_type_89 except (TypeError, ValueError, AttributeError, KeyError): @@ -1641,7 +2092,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_90 = PageRootlyOnCallRespondersTaskParams.from_dict(data) + task_params_type_90 = InviteToMicrosoftTeamsChannelRootlyTaskParams.from_dict(data) return task_params_type_90 except (TypeError, ValueError, AttributeError, KeyError): @@ -1649,15 +2100,57 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_91 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 = ( + InviteToSlackChannelPagerdutyTaskParamsType0.from_dict(data) + ) - return task_params_type_91 + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_93 = UpdateVictorOpsIncidentTaskParams.from_dict(data) + componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 = ( + InviteToSlackChannelPagerdutyTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_pagerduty_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_0 = ( + InviteToSlackChannelTaskParamsType0.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_1 = ( + InviteToSlackChannelTaskParamsType1.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemasinvite_to_slack_channel_task_params_type_2 = ( + InviteToSlackChannelTaskParamsType2.from_dict(data) + ) + + return componentsschemasinvite_to_slack_channel_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_93 = InviteToSlackChannelVictorOpsTaskParams.from_dict(data) return task_params_type_93 except (TypeError, ValueError, AttributeError, KeyError): @@ -1665,7 +2158,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_94 = PrintTaskParams.from_dict(data) + task_params_type_94 = PageOpsgenieOnCallRespondersTaskParams.from_dict(data) return task_params_type_94 except (TypeError, ValueError, AttributeError, KeyError): @@ -1673,7 +2166,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_95 = PublishIncidentTaskParams.from_dict(data) + task_params_type_95 = CreateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_95 except (TypeError, ValueError, AttributeError, KeyError): @@ -1681,7 +2174,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_96 = RedisClientTaskParams.from_dict(data) + task_params_type_96 = CreateJsmopsAlertTaskParams.from_dict(data) return task_params_type_96 except (TypeError, ValueError, AttributeError, KeyError): @@ -1689,7 +2182,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_97 = RenameSlackChannelTaskParams.from_dict(data) + task_params_type_97 = PageJsmopsOnCallRespondersTaskParams.from_dict(data) return task_params_type_97 except (TypeError, ValueError, AttributeError, KeyError): @@ -1697,7 +2190,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_98 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) + task_params_type_98 = UpdateOpsgenieAlertTaskParams.from_dict(data) return task_params_type_98 except (TypeError, ValueError, AttributeError, KeyError): @@ -1705,7 +2198,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_99 = RunCommandHerokuTaskParams.from_dict(data) + task_params_type_99 = UpdateOpsgenieIncidentTaskParams.from_dict(data) return task_params_type_99 except (TypeError, ValueError, AttributeError, KeyError): @@ -1713,7 +2206,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_100 = SendEmailTaskParams.from_dict(data) + task_params_type_100 = PageRootlyOnCallRespondersTaskParams.from_dict(data) return task_params_type_100 except (TypeError, ValueError, AttributeError, KeyError): @@ -1721,7 +2214,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_101 = SendDashboardReportTaskParams.from_dict(data) + task_params_type_101 = PagePagerdutyOnCallRespondersTaskParams.from_dict(data) return task_params_type_101 except (TypeError, ValueError, AttributeError, KeyError): @@ -1729,15 +2222,35 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_102 = CreateSlackChannelTaskParams.from_dict(data) + componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 = ( + PageVictorOpsOnCallRespondersTaskParamsType0.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 = ( + PageVictorOpsOnCallRespondersTaskParamsType1.from_dict(data) + ) + + return componentsschemaspage_victor_ops_on_call_responders_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_103 = UpdateVictorOpsIncidentTaskParams.from_dict(data) - return task_params_type_102 + return task_params_type_103 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_104 = SendSmsTaskParams.from_dict(data) + task_params_type_104 = PrintTaskParams.from_dict(data) return task_params_type_104 except (TypeError, ValueError, AttributeError, KeyError): @@ -1745,7 +2258,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_105 = SendWhatsappMessageTaskParams.from_dict(data) + task_params_type_105 = PublishIncidentTaskParams.from_dict(data) return task_params_type_105 except (TypeError, ValueError, AttributeError, KeyError): @@ -1753,7 +2266,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_106 = SnapshotDatadogGraphTaskParams.from_dict(data) + task_params_type_106 = RedisClientTaskParams.from_dict(data) return task_params_type_106 except (TypeError, ValueError, AttributeError, KeyError): @@ -1761,7 +2274,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_107 = SnapshotGrafanaDashboardTaskParams.from_dict(data) + task_params_type_107 = RenameSlackChannelTaskParams.from_dict(data) return task_params_type_107 except (TypeError, ValueError, AttributeError, KeyError): @@ -1769,7 +2282,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_108 = SnapshotLookerLookTaskParams.from_dict(data) + task_params_type_108 = ChangeSlackChannelPrivacyTaskParams.from_dict(data) return task_params_type_108 except (TypeError, ValueError, AttributeError, KeyError): @@ -1777,7 +2290,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_109 = SnapshotNewRelicGraphTaskParams.from_dict(data) + task_params_type_109 = RunCommandHerokuTaskParams.from_dict(data) return task_params_type_109 except (TypeError, ValueError, AttributeError, KeyError): @@ -1785,7 +2298,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_110 = TweetTwitterMessageTaskParams.from_dict(data) + task_params_type_110 = SendEmailTaskParams.from_dict(data) return task_params_type_110 except (TypeError, ValueError, AttributeError, KeyError): @@ -1793,7 +2306,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_111 = UpdateAirtableTableRecordTaskParams.from_dict(data) + task_params_type_111 = SendDashboardReportTaskParams.from_dict(data) return task_params_type_111 except (TypeError, ValueError, AttributeError, KeyError): @@ -1801,7 +2314,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_112 = UpdateAsanaTaskTaskParams.from_dict(data) + task_params_type_112 = CreateSlackChannelTaskParams.from_dict(data) return task_params_type_112 except (TypeError, ValueError, AttributeError, KeyError): @@ -1809,15 +2322,31 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_113 = UpdateGithubIssueTaskParams.from_dict(data) + componentsschemassend_slack_message_task_params_type_0 = SendSlackMessageTaskParamsType0.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_message_task_params_type_1 = SendSlackMessageTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_message_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_message_task_params_type_2 = SendSlackMessageTaskParamsType2.from_dict(data) - return task_params_type_113 + return componentsschemassend_slack_message_task_params_type_2 except (TypeError, ValueError, AttributeError, KeyError): pass try: if not isinstance(data, dict): raise TypeError() - task_params_type_114 = UpdateGitlabIssueTaskParams.from_dict(data) + task_params_type_114 = SendSmsTaskParams.from_dict(data) return task_params_type_114 except (TypeError, ValueError, AttributeError, KeyError): @@ -1825,7 +2354,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_115 = UpdateIncidentTaskParams.from_dict(data) + task_params_type_115 = SendWhatsappMessageTaskParams.from_dict(data) return task_params_type_115 except (TypeError, ValueError, AttributeError, KeyError): @@ -1833,7 +2362,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_116 = UpdateIncidentPostmortemTaskParams.from_dict(data) + task_params_type_116 = SnapshotDatadogGraphTaskParams.from_dict(data) return task_params_type_116 except (TypeError, ValueError, AttributeError, KeyError): @@ -1841,7 +2370,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_117 = UpdateJiraIssueTaskParams.from_dict(data) + task_params_type_117 = SnapshotGrafanaDashboardTaskParams.from_dict(data) return task_params_type_117 except (TypeError, ValueError, AttributeError, KeyError): @@ -1849,7 +2378,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_118 = UpdateLinearIssueTaskParams.from_dict(data) + task_params_type_118 = SnapshotLookerLookTaskParams.from_dict(data) return task_params_type_118 except (TypeError, ValueError, AttributeError, KeyError): @@ -1857,7 +2386,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_119 = UpdateServiceNowIncidentTaskParams.from_dict(data) + task_params_type_119 = SnapshotNewRelicGraphTaskParams.from_dict(data) return task_params_type_119 except (TypeError, ValueError, AttributeError, KeyError): @@ -1865,7 +2394,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_120 = UpdateShortcutStoryTaskParams.from_dict(data) + task_params_type_120 = TweetTwitterMessageTaskParams.from_dict(data) return task_params_type_120 except (TypeError, ValueError, AttributeError, KeyError): @@ -1873,7 +2402,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_121 = UpdateShortcutTaskTaskParams.from_dict(data) + task_params_type_121 = UpdateAirtableTableRecordTaskParams.from_dict(data) return task_params_type_121 except (TypeError, ValueError, AttributeError, KeyError): @@ -1881,7 +2410,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_122 = UpdateSlackChannelTopicTaskParams.from_dict(data) + task_params_type_122 = UpdateAsanaTaskTaskParams.from_dict(data) return task_params_type_122 except (TypeError, ValueError, AttributeError, KeyError): @@ -1889,7 +2418,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_123 = UpdateStatusTaskParams.from_dict(data) + task_params_type_123 = UpdateGithubIssueTaskParams.from_dict(data) return task_params_type_123 except (TypeError, ValueError, AttributeError, KeyError): @@ -1897,7 +2426,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_124 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) + task_params_type_124 = UpdateGitlabIssueTaskParams.from_dict(data) return task_params_type_124 except (TypeError, ValueError, AttributeError, KeyError): @@ -1905,7 +2434,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_125 = UpdateTrelloCardTaskParams.from_dict(data) + task_params_type_125 = UpdateIncidentTaskParams.from_dict(data) return task_params_type_125 except (TypeError, ValueError, AttributeError, KeyError): @@ -1913,7 +2442,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_126 = UpdateClickupTaskTaskParams.from_dict(data) + task_params_type_126 = UpdateIncidentPostmortemTaskParams.from_dict(data) return task_params_type_126 except (TypeError, ValueError, AttributeError, KeyError): @@ -1921,7 +2450,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_127 = UpdateMotionTaskTaskParams.from_dict(data) + task_params_type_127 = UpdateJiraIssueTaskParams.from_dict(data) return task_params_type_127 except (TypeError, ValueError, AttributeError, KeyError): @@ -1929,7 +2458,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_128 = UpdateZendeskTicketTaskParams.from_dict(data) + task_params_type_128 = UpdateLinearIssueTaskParams.from_dict(data) return task_params_type_128 except (TypeError, ValueError, AttributeError, KeyError): @@ -1937,7 +2466,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_129 = UpdateAttachedAlertsTaskParams.from_dict(data) + task_params_type_129 = UpdateServiceNowIncidentTaskParams.from_dict(data) return task_params_type_129 except (TypeError, ValueError, AttributeError, KeyError): @@ -1945,7 +2474,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_130 = TriggerWorkflowTaskParams.from_dict(data) + task_params_type_130 = UpdateShortcutStoryTaskParams.from_dict(data) return task_params_type_130 except (TypeError, ValueError, AttributeError, KeyError): @@ -1953,7 +2482,15 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_132 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + task_params_type_131 = UpdateShortcutTaskTaskParams.from_dict(data) + + return task_params_type_131 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_132 = UpdateSlackChannelTopicTaskParams.from_dict(data) return task_params_type_132 except (TypeError, ValueError, AttributeError, KeyError): @@ -1961,7 +2498,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_133 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + task_params_type_133 = UpdateStatusTaskParams.from_dict(data) return task_params_type_133 except (TypeError, ValueError, AttributeError, KeyError): @@ -1969,7 +2506,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_134 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + task_params_type_134 = UpdateIncidentStatusTimestampTaskParams.from_dict(data) return task_params_type_134 except (TypeError, ValueError, AttributeError, KeyError): @@ -1977,7 +2514,7 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_135 = CreateMistralChatCompletionTaskParams.from_dict(data) + task_params_type_135 = UpdateTrelloCardTaskParams.from_dict(data) return task_params_type_135 except (TypeError, ValueError, AttributeError, KeyError): @@ -1985,139 +2522,104 @@ def _parse_task_params( try: if not isinstance(data, dict): raise TypeError() - task_params_type_136 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + task_params_type_136 = UpdateClickupTaskTaskParams.from_dict(data) return task_params_type_136 except (TypeError, ValueError, AttributeError, KeyError): pass - return cast( - 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, - ) + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_137 = UpdateMotionTaskTaskParams.from_dict(data) + + return task_params_type_137 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_138 = UpdateZendeskTicketTaskParams.from_dict(data) + + return task_params_type_138 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_139 = UpdateAttachedAlertsTaskParams.from_dict(data) + + return task_params_type_139 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_140 = TriggerWorkflowTaskParams.from_dict(data) + + return task_params_type_140 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_0 = SendSlackBlocksTaskParamsType0.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_0 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_1 = SendSlackBlocksTaskParamsType1.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_1 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + componentsschemassend_slack_blocks_task_params_type_2 = SendSlackBlocksTaskParamsType2.from_dict(data) + + return componentsschemassend_slack_blocks_task_params_type_2 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_142 = CreateOpenaiChatCompletionTaskParams.from_dict(data) + + return task_params_type_142 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_143 = CreateWatsonxChatCompletionTaskParams.from_dict(data) + + return task_params_type_143 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_144 = CreateGoogleGeminiChatCompletionTaskParams.from_dict(data) + + return task_params_type_144 + except (TypeError, ValueError, AttributeError, KeyError): + pass + try: + if not isinstance(data, dict): + raise TypeError() + task_params_type_145 = CreateMistralChatCompletionTaskParams.from_dict(data) + + return task_params_type_145 + except (TypeError, ValueError, AttributeError, KeyError): + pass + if not isinstance(data, dict): + raise TypeError() + task_params_type_146 = CreateAnthropicChatCompletionTaskParams.from_dict(data) + + return task_params_type_146 task_params = _parse_task_params(d.pop("task_params")) diff --git a/rootly_sdk/models/workflow_task_list.py b/rootly_sdk/models/workflow_task_list.py index a42b27fd..7d5d591d 100644 --- a/rootly_sdk/models/workflow_task_list.py +++ b/rootly_sdk/models/workflow_task_list.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_task_list_data_item import WorkflowTaskListDataItem @@ -22,14 +28,21 @@ class WorkflowTaskList: data (list[WorkflowTaskListDataItem]): links (Links): meta (Meta): + included (list[JsonapiIncludedResource] | Unset): """ data: list[WorkflowTaskListDataItem] links: Links meta: Meta + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.meta import Meta + from ..models.jsonapi_included_resource import JsonapiIncludedResource + from ..models.links import Links + from ..models.workflow_task_list_data_item import WorkflowTaskListDataItem + data = [] for data_item_data in self.data: data_item = data_item_data.to_dict() @@ -39,6 +52,13 @@ def to_dict(self) -> dict[str, Any]: meta = self.meta.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -48,11 +68,14 @@ def to_dict(self) -> dict[str, Any]: "meta": meta, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links from ..models.meta import Meta from ..models.workflow_task_list_data_item import WorkflowTaskListDataItem @@ -69,10 +92,20 @@ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: meta = Meta.from_dict(d.pop("meta")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_task_list = cls( data=data, links=links, meta=meta, + included=included, ) workflow_task_list.additional_properties = d diff --git a/rootly_sdk/models/workflow_task_list_data_item.py b/rootly_sdk/models/workflow_task_list_data_item.py index eb0f4179..dc207323 100644 --- a/rootly_sdk/models/workflow_task_list_data_item.py +++ b/rootly_sdk/models/workflow_task_list_data_item.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_task_list_data_item_type import ( - WorkflowTaskListDataItemType, - check_workflow_task_list_data_item_type, -) +from ..types import UNSET, Unset + +from ..models.workflow_task_list_data_item_type import check_workflow_task_list_data_item_type +from ..models.workflow_task_list_data_item_type import WorkflowTaskListDataItemType +from typing import cast if TYPE_CHECKING: from ..models.workflow_task import WorkflowTask @@ -33,6 +34,8 @@ class WorkflowTaskListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_task import WorkflowTask + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/models/workflow_task_response.py b/rootly_sdk/models/workflow_task_response.py index d23213d3..fba2feaa 100644 --- a/rootly_sdk/models/workflow_task_response.py +++ b/rootly_sdk/models/workflow_task_response.py @@ -1,12 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..types import UNSET, Unset + +from ..types import UNSET, Unset +from typing import cast + if TYPE_CHECKING: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_task_response_data import WorkflowTaskResponseData @@ -18,14 +24,26 @@ class WorkflowTaskResponse: """ Attributes: data (WorkflowTaskResponseData): + included (list[JsonapiIncludedResource] | Unset): """ data: WorkflowTaskResponseData + included: list[JsonapiIncludedResource] | Unset = UNSET additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_task_response_data import WorkflowTaskResponseData + from ..models.jsonapi_included_resource import JsonapiIncludedResource + data = self.data.to_dict() + included: list[dict[str, Any]] | Unset = UNSET + if not isinstance(self.included, Unset): + included = [] + for included_item_data in self.included: + included_item = included_item_data.to_dict() + included.append(included_item) + field_dict: dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( @@ -33,18 +51,31 @@ def to_dict(self) -> dict[str, Any]: "data": data, } ) + if included is not UNSET: + field_dict["included"] = included return field_dict @classmethod def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: + from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_task_response_data import WorkflowTaskResponseData d = dict(src_dict) data = WorkflowTaskResponseData.from_dict(d.pop("data")) + _included = d.pop("included", UNSET) + included: list[JsonapiIncludedResource] | Unset = UNSET + if _included is not UNSET: + included = [] + for included_item_data in _included: + included_item = JsonapiIncludedResource.from_dict(included_item_data) + + included.append(included_item) + workflow_task_response = cls( data=data, + included=included, ) workflow_task_response.additional_properties = d diff --git a/rootly_sdk/models/workflow_task_response_data.py b/rootly_sdk/models/workflow_task_response_data.py index a042e828..dad8b8ae 100644 --- a/rootly_sdk/models/workflow_task_response_data.py +++ b/rootly_sdk/models/workflow_task_response_data.py @@ -1,15 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import TYPE_CHECKING, Any, TypeVar +from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..models.workflow_task_response_data_type import ( - WorkflowTaskResponseDataType, - check_workflow_task_response_data_type, -) +from ..types import UNSET, Unset + +from ..models.workflow_task_response_data_type import check_workflow_task_response_data_type +from ..models.workflow_task_response_data_type import WorkflowTaskResponseDataType +from typing import cast if TYPE_CHECKING: from ..models.workflow_task import WorkflowTask @@ -33,6 +34,8 @@ class WorkflowTaskResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.workflow_task import WorkflowTask + id = self.id type_: str = self.type_ diff --git a/rootly_sdk/types.py b/rootly_sdk/types.py index b64af095..f74db0ad 100644 --- a/rootly_sdk/types.py +++ b/rootly_sdk/types.py @@ -1,8 +1,8 @@ -"""Contains some shared types for properties""" +""" Contains some shared types for properties """ from collections.abc import Mapping, MutableMapping from http import HTTPStatus -from typing import IO, BinaryIO, Generic, Literal, TypeVar +from typing import BinaryIO, Generic, TypeVar, Literal, IO from attrs import define @@ -24,17 +24,16 @@ def __bool__(self) -> Literal[False]: ) RequestFiles = list[tuple[str, FileTypes]] - @define class File: - """Contains information for file uploads""" + """ Contains information for file uploads """ payload: BinaryIO file_name: str | None = None mime_type: str | None = None def to_tuple(self) -> FileTypes: - """Return a tuple representation that httpx will accept for multipart/form-data""" + """ Return a tuple representation that httpx will accept for multipart/form-data """ return self.file_name, self.payload, self.mime_type @@ -43,7 +42,7 @@ def to_tuple(self) -> FileTypes: @define class Response(Generic[T]): - """A response from an endpoint""" + """ A response from an endpoint """ status_code: HTTPStatus content: bytes From d6bead494d15cc4968b956407044717dfbbab9cf Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Mon, 20 Jul 2026 20:07:09 -0700 Subject: [PATCH 2/6] Add v1.4.0 changelog and fix pyproject.toml version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generator overwrote version to "v1" — restored to 1.4.0. Also restored CHANGELOG.md in package includes. --- CHANGELOG.md | 26 ++++++++++++++++++++++++++ pyproject.toml | 4 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 645e8fd4..cc25935d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.4.0] - 2026-07-20 + +### Added +- New AI Chat endpoints (create, stream, list session messages, delete session) +- New Shift Coverage Requests endpoints (create, read, delete, list) +- New Workflow Action Item Form Field Conditions endpoints (create, read, update, delete, list) +- Bulk operations for catalog entities, environments, functionalities, services, and teams (bulk upsert and bulk delete) +- New Meeting Recordings actions: import, delete standalone, start recording session, list all +- Alert escalation and snooze actions (`escalate_alert`, `snooze_alert`) +- Alert receipt endpoint (`get_receipt`) +- Alert events feed endpoint (`list_alert_events_feed`) +- New Google Chat workflow task types: create/rename/archive spaces, change space privacy, update space description, invite to space, send messages and attachments +- New workflow task type: `InviteToMicrosoftTeamsChannelRootlyTaskParams` — invite users to Microsoft Teams channels via Rootly +- New workflow task type: `AttachRetrospectivePdfToJiraIssueTaskParams` — attach retrospective PDFs to Jira issues +- Edge connector filters support (`CreateEdgeConnectorBodyDataAttributesFilters`) +- `owner_group_ids` field on heartbeat, alerts source, functionality, and schedule models for team-scoped API key support +- GitHub issue task params: labels mode support (`update_github_issue_task_params_labels_mode`) + +### Changed +- Regenerated client from latest OpenAPI specification +- httpx minimum version bumped from `>=0.20.0` to `>=0.23.0` +- 428 new model files, 28 removed models (consolidated upstream) + +### Fixed +- Applied nullable enum fix to all model files via `tools/fix_nullable_enums.py` + ## [1.3.0] - 2026-04-21 ### Added diff --git a/pyproject.toml b/pyproject.toml index 4e0a618f..0c87f93c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [tool.poetry] name = "rootly" -version = "v1" +version = "1.4.0" description = "A client library for accessing Rootly API v1" authors = [] readme = "README.md" packages = [ { include = "rootly_sdk" }, ] -include = ["rootly_sdk/py.typed"] +include = ["CHANGELOG.md", "rootly_sdk/py.typed"] [tool.poetry.dependencies] python = "^3.10" From 26b0e3b62d85f90262f93515fc42cf75c6cb2ca4 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Mon, 20 Jul 2026 20:08:03 -0700 Subject: [PATCH 3/6] Add .serena/ to .gitignore and remove from tracking --- .gitignore | 3 + .serena/.gitignore | 2 - .serena/project.yml | 167 -------------------------------------------- 3 files changed, 3 insertions(+), 169 deletions(-) delete mode 100644 .serena/.gitignore delete mode 100644 .serena/project.yml diff --git a/.gitignore b/.gitignore index 79a2c3d7..73dc337f 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,6 @@ dmypy.json /coverage.xml /.coverage + +# Serena +.serena/ diff --git a/.serena/.gitignore b/.serena/.gitignore deleted file mode 100644 index 2e510aff..00000000 --- a/.serena/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/cache -/project.local.yml diff --git a/.serena/project.yml b/.serena/project.yml deleted file mode 100644 index 486989b6..00000000 --- a/.serena/project.yml +++ /dev/null @@ -1,167 +0,0 @@ -# the name by which the project can be referenced within Serena/when chatting with the LLM. -project_name: "yamoussoukro" - -# list of languages for which language servers are started (LSP backend only); choose from: -# ada al angular ansible bash -# bsl clojure cpp cpp_ccls crystal -# csharp csharp_omnisharp cue dart elixir -# elm erlang fortran fsharp gdscript -# go groovy haskell haxe hlsl -# html java json julia kotlin -# latex lean4 lua luau markdown -# matlab msl nix ocaml pascal -# perl php php_phpactor php_phpantom powershell -# python python_jedi python_pyrefly python_ty r -# rego ruby ruby_solargraph rust scala -# scss solidity svelte swift systemverilog -# terraform toml typescript typescript_vts vue -# yaml zig -# (This list may be outdated; generated with scripts/print_language_list.py; -# For the current list, see values of Language enum here: -# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py) -# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.) -# Note: -# - For C, use cpp -# - For JavaScript, use typescript -# - For Angular projects, use angular (subsumes typescript+html; requires `npm install` in the project root) -# - For Svelte projects, use svelte (subsumes typescript/javascript for .svelte projects; requires npm) -# - For SCSS / Sass / plain CSS, use scss (some-sass-language-server handles all three) -# - For Free Pascal/Lazarus, use pascal -# Special requirements: -# Some languages require additional setup/installations. -# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers -# When using multiple languages, the first language server that supports a given file will be used for that file. -# The first language is the default language and the respective language server will be used as a fallback. -# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored. -languages: -- python - -# the encoding used by text files in the project -# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings -encoding: "utf-8" - -# optional shell command to run before the language backend (LSP or JetBrains) is initialised. -# the command runs in the project root directory and is only executed if the project is trusted -# (see trusted_project_path_patterns in the global configuration). -# serena waits for the command to exit: a non-zero exit code is logged as an error but does not -# abort activation. a per-project timeout (activation_command_timeout, default 180s) is the safety -# backstop for non-terminating commands; on expiry the process is killed and activation continues. -# example: activation_command: "npx nx run-many -t build" -activation_command: - -# maximum time in seconds to wait for activation_command to complete before killing it (default 180s). -# must be a positive number. -activation_command_timeout: 180.0 - -# line ending convention to use when writing source files. -# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default) -# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings. -line_ending: - -# The language backend to use for this project. -# If not set, the global setting from serena_config.yml is used. -# Valid values: LSP, JetBrains -# Note: the backend is fixed at startup. If a project with a different backend -# is activated post-init, an error will be returned. -language_backend: - -# whether to use project's .gitignore files to ignore files -ignore_all_files_in_gitignore: true - -# advanced configuration option allowing to configure language server-specific options. -# Maps the language key to the options. -# The settings are considered only if the project is trusted (see global configuration to define trusted projects). -# See https://oraios.github.io/serena/02-usage/050_configuration.html#language-server-specific-settings -ls_specific_settings: {} - -# list of workspace folder paths (LSP backend only). -# These folders will be used to build up Serena's symbol index. -# Paths must be within the project root and should thus be relative to the project root. -# Furthermore, the paths should not be filtered by ignore settings. -# Default setting: The entire project root folder (".") is considered. -# In (large) monorepos, this can be used to index only subfolders of the project root, e.g. -# ls_workspace_folders: -# - "./subproject1" -# - "./subproject2" -ls_workspace_folders: -- "." - -# list of additional workspace folder paths for cross-package reference support. -# Paths can be absolute or relative to the project root. -# Each folder is registered as an LSP workspace folder, enabling language servers to discover -# symbols and references across package boundaries, but these folders are not indexed by Serena, -# i.e. the respective symbols will not be found using Serena's symbol search tools. -# Example: -# additional_workspace_folders: -# - ../sibling-package -# - ../shared-lib -ls_additional_workspace_folders: [] - -# list of additional paths to ignore in this project. -# Same syntax as gitignore, so you can use * and **. -# Important: quote patterns that start with `*`, otherwise YAML treats them as aliases. -# Example: -# ignored_paths: -# - "examples/**" -# - ".worktrees/**" -# - "**/bin/**" -# - "**/obj/**" -# Note: global ignored_paths from serena_config.yml are also applied additively. -ignored_paths: [] - -# whether the project is in read-only mode -# If set to true, all editing tools will be disabled and attempts to use them will result in an error -# Added on 2025-04-18 -read_only: false - -# list of tool names to exclude. -# This extends the existing exclusions (e.g. from the global configuration) -# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html -excluded_tools: [] - -# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default). -# This extends the existing inclusions (e.g. from the global configuration). -# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html -included_optional_tools: [] - -# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools. -# This cannot be combined with non-empty excluded_tools or included_optional_tools. -# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html -fixed_tools: [] - -# list of mode names that are to be activated by default, overriding the setting in the global configuration. -# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes. -# If the setting is undefined/empty, the default_modes from the global configuration (serena_config.yml) apply. -# Otherwise, this overrides the setting from the global configuration (serena_config.yml). -# Therefore, you can set this to [] if you do not want the default modes defined in the global config to apply -# for this project. -# This setting can, in turn, be overridden by CLI parameters (--mode). -# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes -default_modes: - -# list of mode names to be activated additionally for this project, e.g. ["query-projects"] -# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes. -# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes -added_modes: - -# initial prompt for the project. It will always be given to the LLM upon activating the project -# (contrary to the memories, which are loaded on demand). -initial_prompt: "" - -# time budget (seconds) per tool call for the retrieval of additional symbol information -# such as docstrings or parameter information. -# This overrides the corresponding setting in the global configuration; see the documentation there. -# If null or missing, use the setting from the global configuration. -symbol_info_budget: - -# list of regex patterns which, when matched, mark a memory entry as read‑only. -# Extends the list from the global configuration, merging the two lists. -read_only_memory_patterns: [] - -# list of regex patterns for memories to completely ignore. -# Matching memories will not appear in list_memories or activate_project output -# and cannot be accessed via read_memory or write_memory. -# To access ignored memory files, use the read_file tool on the raw file path. -# Extends the list from the global configuration, merging the two lists. -# Example: ["_archive/.*", "_episodes/.*"] -ignored_memory_patterns: [] From 5ba62b1373084e92303750b54552d8a4c9d0cce1 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Mon, 20 Jul 2026 20:10:15 -0700 Subject: [PATCH 4/6] Fix ruff lint errors in generated SDK code Auto-fix 23051 errors: unused imports (F401), import sorting (I001), and deprecated type annotations (UP). --- rootly_sdk/api/ai_chat/create_ai_chat.py | 11 +- .../api/ai_chat/delete_ai_chat_session.py | 10 +- .../ai_chat/list_ai_chat_session_messages.py | 10 +- rootly_sdk/api/ai_chat/stream_ai_chat.py | 12 +- .../api/alert_events/create_alert_event.py | 10 +- .../api/alert_events/delete_alert_event.py | 7 +- .../api/alert_events/get_alert_event.py | 9 +- .../api/alert_events/list_alert_events.py | 10 +- .../alert_events/list_alert_events_feed.py | 22 +- .../api/alert_events/update_alert_event.py | 10 +- .../api/alert_fields/create_alert_field.py | 10 +- .../api/alert_fields/delete_alert_field.py | 11 +- .../api/alert_fields/get_alert_field.py | 11 +- .../api/alert_fields/list_alert_fields.py | 11 +- .../api/alert_fields/update_alert_field.py | 11 +- .../api/alert_groups/create_alert_group.py | 10 +- .../api/alert_groups/delete_alert_group.py | 11 +- .../api/alert_groups/get_alert_group.py | 11 +- .../api/alert_groups/list_alert_groups.py | 11 +- .../api/alert_groups/update_alert_group.py | 11 +- .../api/alert_routes/create_alert_route.py | 10 +- .../api/alert_routes/delete_alert_route.py | 9 +- .../api/alert_routes/get_alert_route.py | 9 +- .../api/alert_routes/list_alert_routes.py | 11 +- .../api/alert_routes/patch_alert_route.py | 9 +- .../api/alert_routes/update_alert_route.py | 9 +- .../create_alert_routing_rule.py | 10 +- .../delete_alert_routing_rule.py | 11 +- .../get_alert_routing_rule.py | 11 +- .../list_alert_routing_rules.py | 11 +- .../update_alert_routing_rule.py | 11 +- .../api/alert_sources/create_alerts_source.py | 10 +- .../api/alert_sources/delete_alerts_source.py | 9 +- .../api/alert_sources/get_alerts_source.py | 9 +- .../api/alert_sources/list_alerts_sources.py | 11 +- .../api/alert_sources/update_alerts_source.py | 9 +- .../alert_urgencies/create_alert_urgency.py | 10 +- .../alert_urgencies/delete_alert_urgency.py | 9 +- .../api/alert_urgencies/get_alert_urgency.py | 9 +- .../alert_urgencies/list_alert_urgencies.py | 11 +- .../alert_urgencies/update_alert_urgency.py | 9 +- rootly_sdk/api/alerts/acknowledge_alert.py | 9 +- rootly_sdk/api/alerts/attach_alert.py | 9 +- rootly_sdk/api/alerts/create_alert.py | 10 +- rootly_sdk/api/alerts/escalate_alert.py | 10 +- rootly_sdk/api/alerts/get_alert.py | 11 +- rootly_sdk/api/alerts/get_receipt.py | 7 +- rootly_sdk/api/alerts/list_alerts.py | 12 +- rootly_sdk/api/alerts/list_incident_alerts.py | 11 +- rootly_sdk/api/alerts/resolve_alert.py | 10 +- rootly_sdk/api/alerts/snooze_alert.py | 9 +- rootly_sdk/api/alerts/update_alert.py | 10 +- rootly_sdk/api/api_keys/create_api_key.py | 10 +- rootly_sdk/api/api_keys/delete_api_key.py | 11 +- rootly_sdk/api/api_keys/get_api_key.py | 12 +- rootly_sdk/api/api_keys/list_api_keys.py | 11 +- rootly_sdk/api/api_keys/rotate_api_key.py | 10 +- rootly_sdk/api/api_keys/update_api_key.py | 11 +- rootly_sdk/api/audits/list_audits.py | 11 +- .../authorizations/create_authorization.py | 10 +- .../authorizations/delete_authorization.py | 9 +- .../api/authorizations/get_authorization.py | 9 +- .../api/authorizations/list_authorizations.py | 11 +- .../authorizations/update_authorization.py | 9 +- .../create_catalog_checklist_template.py | 10 +- .../delete_catalog_checklist_template.py | 11 +- .../get_catalog_checklist_template.py | 11 +- .../list_catalog_checklist_templates.py | 21 +- .../trigger_catalog_checklist_template.py | 9 +- .../update_catalog_checklist_template.py | 11 +- .../bulk_delete_catalog_entities.py | 9 +- .../bulk_upsert_catalog_entities.py | 9 +- .../catalog_entities/create_catalog_entity.py | 9 +- .../catalog_entities/delete_catalog_entity.py | 11 +- .../catalog_entities/get_catalog_entity.py | 13 +- .../catalog_entities/list_catalog_entities.py | 12 +- .../catalog_entities/update_catalog_entity.py | 11 +- .../get_catalog_entity_checklist.py | 11 +- .../list_catalog_entity_checklists.py | 11 +- .../create_catalog_entity_property.py | 9 +- .../delete_catalog_entity_property.py | 9 +- .../get_catalog_entity_property.py | 15 +- .../list_catalog_entity_properties.py | 20 +- .../update_catalog_entity_property.py | 9 +- .../create_catalog_property.py | 9 +- .../delete_catalog_property.py | 8 +- .../get_catalog_property.py | 8 +- .../list_catalog_properties.py | 8 +- .../update_catalog_property.py | 9 +- rootly_sdk/api/catalogs/create_catalog.py | 10 +- rootly_sdk/api/catalogs/delete_catalog.py | 11 +- rootly_sdk/api/catalogs/get_catalog.py | 11 +- rootly_sdk/api/catalogs/list_catalogs.py | 13 +- rootly_sdk/api/catalogs/update_catalog.py | 11 +- rootly_sdk/api/causes/create_cause.py | 10 +- .../causes/create_cause_catalog_property.py | 10 +- rootly_sdk/api/causes/delete_cause.py | 11 +- rootly_sdk/api/causes/get_cause.py | 11 +- .../causes/list_cause_catalog_properties.py | 21 +- rootly_sdk/api/causes/list_causes.py | 11 +- rootly_sdk/api/causes/update_cause.py | 11 +- .../create_communications_group.py | 10 +- .../delete_communications_group.py | 7 +- .../get_communications_group.py | 9 +- .../list_communications_groups.py | 11 +- .../update_communications_group.py | 9 +- .../create_communications_stage.py | 10 +- .../delete_communications_stage.py | 7 +- .../get_communications_stage.py | 9 +- .../list_communications_stages.py | 11 +- .../update_communications_stage.py | 9 +- .../create_communications_template.py | 10 +- .../delete_communications_template.py | 7 +- .../get_communications_template.py | 9 +- .../list_communications_templates.py | 11 +- .../update_communications_template.py | 9 +- .../create_communications_type.py | 10 +- .../delete_communications_type.py | 7 +- .../get_communications_type.py | 9 +- .../list_communications_types.py | 11 +- .../update_communications_type.py | 9 +- .../api/custom_forms/create_custom_form.py | 10 +- .../api/custom_forms/delete_custom_form.py | 11 +- .../api/custom_forms/get_custom_form.py | 11 +- .../api/custom_forms/list_custom_forms.py | 11 +- .../api/custom_forms/update_custom_form.py | 11 +- .../create_dashboard_panel.py | 9 +- .../delete_dashboard_panel.py | 9 +- .../duplicate_dashboard_panel.py | 9 +- .../dashboard_panels/get_dashboard_panel.py | 10 +- .../dashboard_panels/list_dashboard_panels.py | 10 +- .../update_dashboard_panel.py | 9 +- rootly_sdk/api/dashboards/create_dashboard.py | 10 +- rootly_sdk/api/dashboards/delete_dashboard.py | 11 +- .../api/dashboards/duplicate_dashboard.py | 11 +- rootly_sdk/api/dashboards/get_dashboard.py | 13 +- rootly_sdk/api/dashboards/list_dashboards.py | 12 +- .../api/dashboards/set_default_dashboard.py | 11 +- rootly_sdk/api/dashboards/update_dashboard.py | 11 +- .../create_custom_field_option.py | 9 +- .../delete_custom_field_option.py | 9 +- .../get_custom_field_option.py | 9 +- .../list_custom_field_options.py | 10 +- .../update_custom_field_option.py | 9 +- .../create_custom_field.py | 10 +- .../delete_custom_field.py | 9 +- .../get_custom_field.py | 11 +- .../list_custom_fields.py | 13 +- .../update_custom_field.py | 9 +- .../create_incident_custom_field_selection.py | 9 +- .../delete_incident_custom_field_selection.py | 9 +- .../get_incident_custom_field_selection.py | 9 +- .../list_incident_custom_field_selections.py | 10 +- .../update_incident_custom_field_selection.py | 9 +- .../create_workflow_custom_field_selection.py | 9 +- .../delete_workflow_custom_field_selection.py | 9 +- .../get_workflow_custom_field_selection.py | 9 +- .../list_workflow_custom_field_selections.py | 10 +- .../update_workflow_custom_field_selection.py | 9 +- .../create_edge_connector_action.py | 10 +- .../delete_edge_connector_action.py | 11 +- .../get_edge_connector_action.py | 11 +- .../list_edge_connector_actions.py | 8 +- .../update_edge_connector_action.py | 12 +- .../edge_connectors/create_edge_connector.py | 11 +- .../edge_connectors/delete_edge_connector.py | 8 +- .../api/edge_connectors/get_edge_connector.py | 8 +- .../edge_connectors/list_edge_connectors.py | 10 +- .../edge_connectors/update_edge_connector.py | 10 +- .../environments/bulk_delete_environments.py | 10 +- .../environments/bulk_upsert_environments.py | 10 +- .../api/environments/create_environment.py | 10 +- .../create_environment_catalog_property.py | 10 +- .../api/environments/delete_environment.py | 11 +- .../api/environments/get_environment.py | 11 +- .../list_environment_catalog_properties.py | 21 +- .../api/environments/list_environments.py | 11 +- .../api/environments/update_environment.py | 11 +- .../delete_escalation_level.py | 9 +- .../escalation_levels/get_escalation_level.py | 9 +- .../update_escalation_level.py | 9 +- .../create_escalation_level_paths.py | 9 +- .../list_escalation_levels_paths.py | 10 +- .../create_escalation_level.py | 9 +- .../list_escalation_levels.py | 10 +- .../create_escalation_path.py | 9 +- .../delete_escalation_path.py | 9 +- .../escalation_paths/get_escalation_path.py | 11 +- .../escalation_paths/list_escalation_paths.py | 16 +- .../update_escalation_path.py | 9 +- .../create_escalation_policy.py | 10 +- .../delete_escalation_policy.py | 9 +- .../get_escalation_policy.py | 11 +- .../list_escalation_policies.py | 16 +- .../update_escalation_policy.py | 9 +- .../create_form_field_option.py | 9 +- .../delete_form_field_option.py | 9 +- .../get_form_field_option.py | 9 +- .../list_form_field_options.py | 10 +- .../update_form_field_option.py | 9 +- .../create_form_field_placement_condition.py | 9 +- .../delete_form_field_placement_condition.py | 9 +- .../get_form_field_placement_condition.py | 9 +- .../list_form_field_placement_conditions.py | 10 +- .../update_form_field_placement_condition.py | 9 +- .../create_form_field_placement.py | 9 +- .../delete_form_field_placement.py | 9 +- .../get_form_field_placement.py | 9 +- .../list_form_field_placements.py | 10 +- .../update_form_field_placement.py | 9 +- .../create_form_field_position.py | 9 +- .../delete_form_field_position.py | 9 +- .../get_form_field_position.py | 9 +- .../list_form_field_positions.py | 10 +- .../update_form_field_position.py | 9 +- .../api/form_fields/create_form_field.py | 10 +- .../api/form_fields/delete_form_field.py | 11 +- rootly_sdk/api/form_fields/get_form_field.py | 13 +- .../api/form_fields/list_form_fields.py | 12 +- .../api/form_fields/update_form_field.py | 11 +- .../create_form_set_condition.py | 9 +- .../delete_form_set_condition.py | 9 +- .../get_form_set_condition.py | 9 +- .../list_form_set_conditions.py | 10 +- .../update_form_set_condition.py | 9 +- rootly_sdk/api/form_sets/create_form_set.py | 10 +- rootly_sdk/api/form_sets/delete_form_set.py | 11 +- rootly_sdk/api/form_sets/get_form_set.py | 11 +- rootly_sdk/api/form_sets/list_form_sets.py | 11 +- rootly_sdk/api/form_sets/update_form_set.py | 11 +- .../bulk_delete_functionalities.py | 10 +- .../bulk_upsert_functionalities.py | 10 +- .../functionalities/create_functionality.py | 10 +- .../create_functionality_catalog_property.py | 10 +- .../functionalities/delete_functionality.py | 11 +- .../api/functionalities/get_functionality.py | 11 +- .../get_functionality_incidents_chart.py | 11 +- .../get_functionality_uptime_chart.py | 12 +- .../functionalities/list_functionalities.py | 11 +- .../list_functionality_catalog_properties.py | 21 +- .../functionalities/update_functionality.py | 11 +- rootly_sdk/api/heartbeats/create_heartbeat.py | 10 +- rootly_sdk/api/heartbeats/delete_heartbeat.py | 11 +- rootly_sdk/api/heartbeats/get_heartbeat.py | 11 +- rootly_sdk/api/heartbeats/list_heartbeats.py | 11 +- rootly_sdk/api/heartbeats/ping_heartbeat.py | 7 +- rootly_sdk/api/heartbeats/update_heartbeat.py | 11 +- .../create_incident_action_item.py | 9 +- .../delete_incident_action_item.py | 9 +- .../get_incident_action_items.py | 9 +- .../list_all_incident_action_items.py | 11 +- .../list_incident_action_items.py | 10 +- .../update_incident_action_item.py | 9 +- .../create_incident_event_functionality.py | 9 +- .../delete_incident_event_functionality.py | 9 +- .../get_incident_event_functionalities.py | 9 +- .../list_incident_event_functionalities.py | 10 +- .../update_incident_event_functionality.py | 9 +- .../create_incident_event_service.py | 9 +- .../delete_incident_event_service.py | 9 +- .../get_incident_event_services.py | 9 +- .../list_incident_event_services.py | 10 +- .../update_incident_event_service.py | 9 +- .../incident_events/create_incident_event.py | 9 +- .../incident_events/delete_incident_event.py | 9 +- .../incident_events/get_incident_events.py | 9 +- .../incident_events/list_incident_events.py | 10 +- .../incident_events/update_incident_event.py | 9 +- .../create_incident_feedback.py | 9 +- .../get_incident_feedbacks.py | 9 +- .../list_incident_feedbacks.py | 10 +- .../update_incident_feedback.py | 9 +- .../create_incident_form_field_selection.py | 9 +- .../delete_incident_form_field_selection.py | 9 +- .../get_incident_form_field_selection.py | 9 +- .../list_incident_form_field_selections.py | 10 +- .../update_incident_form_field_selection.py | 9 +- .../create_incident_permission_set_boolean.py | 9 +- .../delete_incident_permission_set_boolean.py | 9 +- .../get_incident_permission_set_boolean.py | 9 +- .../list_incident_permission_set_booleans.py | 10 +- .../update_incident_permission_set_boolean.py | 9 +- ...create_incident_permission_set_resource.py | 9 +- ...delete_incident_permission_set_resource.py | 9 +- .../get_incident_permission_set_resource.py | 9 +- .../list_incident_permission_set_resources.py | 10 +- ...update_incident_permission_set_resource.py | 9 +- .../create_incident_permission_set.py | 10 +- .../delete_incident_permission_set.py | 11 +- .../get_incident_permission_set.py | 11 +- .../list_incident_permission_sets.py | 11 +- .../update_incident_permission_set.py | 11 +- .../get_incident_retrospective_step.py | 9 +- .../update_incident_retrospective_step.py | 9 +- .../list_incident_post_mortems.py | 11 +- .../list_incident_postmortem.py | 11 +- .../update_incident_postmortem.py | 11 +- .../create_incident_role_task.py | 9 +- .../delete_incident_role_task.py | 9 +- .../get_incident_role_task.py | 9 +- .../list_incident_role_tasks.py | 10 +- .../update_incident_role_task.py | 9 +- .../incident_roles/create_incident_role.py | 10 +- .../incident_roles/delete_incident_role.py | 11 +- .../api/incident_roles/get_incident_role.py | 11 +- .../api/incident_roles/list_incident_roles.py | 11 +- .../incident_roles/update_incident_role.py | 11 +- .../create_incident_status_page.py | 9 +- .../delete_incident_status_page.py | 9 +- .../get_incident_status_pages.py | 9 +- .../list_incident_status_pages.py | 10 +- .../update_incident_status_page.py | 9 +- .../create_incident_sub_status.py | 9 +- .../delete_incident_sub_status.py | 9 +- .../get_incident_sub_status.py | 11 +- .../list_incident_sub_statuses.py | 16 +- .../update_incident_sub_status.py | 9 +- .../incident_types/create_incident_type.py | 10 +- .../create_incident_type_catalog_property.py | 10 +- .../incident_types/delete_incident_type.py | 11 +- .../api/incident_types/get_incident_type.py | 11 +- .../list_incident_type_catalog_properties.py | 21 +- .../api/incident_types/list_incident_types.py | 11 +- .../incident_types/update_incident_type.py | 11 +- .../incidents/add_subscribers_to_incident.py | 11 +- .../api/incidents/assign_user_to_incident.py | 11 +- rootly_sdk/api/incidents/cancel_incident.py | 11 +- rootly_sdk/api/incidents/create_incident.py | 10 +- rootly_sdk/api/incidents/delete_incident.py | 11 +- .../incidents/detach_from_parent_incident.py | 9 +- rootly_sdk/api/incidents/get_incident.py | 13 +- rootly_sdk/api/incidents/list_incidents.py | 13 +- .../incidents/mark_as_duplicate_incident.py | 11 +- rootly_sdk/api/incidents/mitigate_incident.py | 11 +- .../remove_assigned_user_from_incident.py | 11 +- .../remove_subscribers_to_incident.py | 11 +- rootly_sdk/api/incidents/resolve_incident.py | 11 +- rootly_sdk/api/incidents/restart_incident.py | 11 +- rootly_sdk/api/incidents/triage_incident.py | 11 +- .../incidents/unmark_as_duplicate_incident.py | 9 +- rootly_sdk/api/incidents/update_incident.py | 11 +- rootly_sdk/api/ip_ranges/get_ip_ranges.py | 10 +- .../create_live_call_router.py | 10 +- .../delete_live_call_router.py | 9 +- .../generate_phone_number_live_call_router.py | 18 +- .../live_call_routers/get_live_call_router.py | 9 +- .../list_live_call_routers.py | 11 +- .../update_live_call_router.py | 9 +- .../create_meeting_recording.py | 13 +- .../delete_meeting_recording.py | 7 +- .../delete_meeting_recording_video.py | 7 +- .../delete_standalone_meeting_recording.py | 8 +- .../get_meeting_recording.py | 9 +- .../import_meeting_recording.py | 8 +- .../leave_meeting_recording.py | 7 +- .../list_all_meeting_recordings.py | 11 +- .../list_meeting_recordings.py | 8 +- .../pause_meeting_recording.py | 7 +- .../resume_meeting_recording.py | 7 +- .../start_recording_session.py | 9 +- .../stop_meeting_recording.py | 7 +- .../create_on_call_pay_report.py | 10 +- .../get_on_call_pay_report.py | 10 +- .../list_on_call_pay_reports.py | 11 +- .../regenerate_on_call_pay_report.py | 9 +- .../update_on_call_pay_report.py | 9 +- .../api/on_call_roles/create_on_call_role.py | 10 +- .../api/on_call_roles/delete_on_call_role.py | 9 +- .../api/on_call_roles/get_on_call_role.py | 9 +- .../api/on_call_roles/list_on_call_roles.py | 11 +- .../api/on_call_roles/update_on_call_role.py | 9 +- .../on_call_shadows/create_on_call_shadow.py | 9 +- .../api/on_call_shadows/get_on_call_shadow.py | 9 +- .../on_call_shadows/list_on_call_shadows.py | 10 +- .../on_call_shadows/update_on_call_shadow.py | 9 +- rootly_sdk/api/on_calls/list_oncalls.py | 12 +- .../override_shifts/create_override_shift.py | 9 +- .../override_shifts/delete_on_call_shadow.py | 9 +- .../override_shifts/delete_override_shift.py | 9 +- .../api/override_shifts/get_override_shift.py | 9 +- .../override_shifts/list_override_shifts.py | 10 +- .../override_shifts/update_override_shift.py | 9 +- .../playbook_tasks/create_playbook_task.py | 9 +- .../playbook_tasks/delete_playbook_task.py | 9 +- .../api/playbook_tasks/get_playbook_task.py | 9 +- .../api/playbook_tasks/list_playbook_tasks.py | 10 +- .../playbook_tasks/update_playbook_task.py | 9 +- rootly_sdk/api/playbooks/create_playbook.py | 10 +- rootly_sdk/api/playbooks/delete_playbook.py | 9 +- rootly_sdk/api/playbooks/get_playbook.py | 11 +- rootly_sdk/api/playbooks/list_playbooks.py | 12 +- rootly_sdk/api/playbooks/update_playbook.py | 9 +- rootly_sdk/api/pulses/create_pulse.py | 10 +- rootly_sdk/api/pulses/get_pulse.py | 9 +- rootly_sdk/api/pulses/list_pulses.py | 11 +- rootly_sdk/api/pulses/update_pulse.py | 9 +- .../get_retrospective_configuration.py | 15 +- .../list_retrospective_configurations.py | 16 +- .../update_retrospective_configuration.py | 9 +- ...create_retrospective_process_group_step.py | 9 +- ...delete_retrospective_process_group_step.py | 9 +- .../get_retrospective_process_group_step.py | 9 +- .../list_retrospective_process_group_steps.py | 10 +- ...update_retrospective_process_group_step.py | 9 +- .../create_retrospective_process_group.py | 9 +- .../delete_retrospective_process_group.py | 9 +- .../get_retrospective_process_group.py | 15 +- .../list_retrospective_process_groups.py | 20 +- .../update_retrospective_process_group.py | 9 +- .../create_retrospective_process.py | 10 +- .../delete_retrospective_process.py | 9 +- .../get_retrospective_process.py | 15 +- .../list_retrospective_processes.py | 16 +- .../update_retrospective_process.py | 9 +- .../create_retrospective_step.py | 9 +- .../delete_retrospective_step.py | 9 +- .../get_retrospective_step.py | 9 +- .../list_retrospective_steps.py | 10 +- .../update_retrospective_step.py | 9 +- .../create_postmortem_template.py | 10 +- .../delete_postmortem_template.py | 11 +- .../get_postmortem_template.py | 11 +- .../list_postmortem_templates.py | 11 +- .../update_postmortem_template.py | 11 +- rootly_sdk/api/roles/create_role.py | 10 +- rootly_sdk/api/roles/delete_role.py | 11 +- rootly_sdk/api/roles/get_role.py | 11 +- rootly_sdk/api/roles/list_roles.py | 11 +- rootly_sdk/api/roles/update_role.py | 11 +- .../create_schedule_rotation_active_day.py | 9 +- .../delete_schedule_rotation_active_day.py | 9 +- .../get_schedule_rotation_active_day.py | 9 +- .../list_schedule_rotation_active_days.py | 10 +- .../update_schedule_rotation_active_day.py | 9 +- .../create_schedule_rotation_user.py | 9 +- .../delete_schedule_rotation_user.py | 9 +- .../get_schedule_rotation_user.py | 9 +- .../list_schedule_rotation_users.py | 10 +- .../update_schedule_rotation_user.py | 9 +- .../create_schedule_rotation.py | 9 +- .../delete_schedule_rotation.py | 9 +- .../get_schedule_rotation.py | 9 +- .../list_schedule_rotations.py | 10 +- .../update_schedule_rotation.py | 9 +- rootly_sdk/api/schedules/create_schedule.py | 10 +- rootly_sdk/api/schedules/delete_schedule.py | 9 +- rootly_sdk/api/schedules/get_schedule.py | 9 +- rootly_sdk/api/schedules/list_schedules.py | 11 +- rootly_sdk/api/schedules/update_schedule.py | 9 +- rootly_sdk/api/secrets/create_secret.py | 10 +- rootly_sdk/api/secrets/delete_secret.py | 9 +- rootly_sdk/api/secrets/get_secret.py | 9 +- rootly_sdk/api/secrets/list_secrets.py | 11 +- rootly_sdk/api/secrets/update_secret.py | 9 +- .../api/services/bulk_delete_services.py | 10 +- .../api/services/bulk_upsert_services.py | 10 +- rootly_sdk/api/services/create_service.py | 10 +- .../create_service_catalog_property.py | 10 +- rootly_sdk/api/services/delete_service.py | 11 +- rootly_sdk/api/services/get_service.py | 11 +- .../services/get_service_incidents_chart.py | 11 +- .../api/services/get_service_uptime_chart.py | 12 +- .../list_service_catalog_properties.py | 21 +- rootly_sdk/api/services/list_services.py | 11 +- rootly_sdk/api/services/update_service.py | 11 +- rootly_sdk/api/severities/create_severity.py | 10 +- rootly_sdk/api/severities/delete_severity.py | 11 +- rootly_sdk/api/severities/get_severity.py | 11 +- rootly_sdk/api/severities/list_severities.py | 11 +- rootly_sdk/api/severities/update_severity.py | 11 +- .../create_shift_coverage_request.py | 9 +- .../delete_shift_coverage_request.py | 9 +- .../get_shift_coverage_request.py | 9 +- .../list_shift_coverage_requests.py | 9 +- rootly_sdk/api/shifts/get_schedule_shifts.py | 10 +- rootly_sdk/api/shifts/list_shifts.py | 12 +- rootly_sdk/api/sl_as/create_sla.py | 10 +- rootly_sdk/api/sl_as/delete_sla.py | 9 +- rootly_sdk/api/sl_as/get_sla.py | 9 +- rootly_sdk/api/sl_as/list_sl_as.py | 11 +- rootly_sdk/api/sl_as/update_sla.py | 9 +- .../create_status_page_template.py | 9 +- .../delete_status_page_template.py | 9 +- .../get_status_page_template.py | 9 +- .../list_status_page_templates.py | 10 +- .../update_status_page_template.py | 9 +- .../api/status_pages/create_status_page.py | 10 +- .../api/status_pages/delete_status_page.py | 11 +- .../api/status_pages/get_status_page.py | 11 +- .../api/status_pages/list_status_pages.py | 11 +- .../api/status_pages/update_status_page.py | 11 +- rootly_sdk/api/statuses/get_status.py | 11 +- rootly_sdk/api/statuses/list_statuses.py | 11 +- .../api/sub_statuses/create_sub_status.py | 10 +- .../api/sub_statuses/delete_sub_status.py | 11 +- rootly_sdk/api/sub_statuses/get_sub_status.py | 11 +- .../api/sub_statuses/list_sub_statuses.py | 11 +- .../api/sub_statuses/update_sub_status.py | 11 +- rootly_sdk/api/teams/bulk_delete_groups.py | 10 +- rootly_sdk/api/teams/bulk_upsert_groups.py | 10 +- .../teams/create_group_catalog_property.py | 10 +- rootly_sdk/api/teams/create_team.py | 10 +- rootly_sdk/api/teams/delete_team.py | 11 +- rootly_sdk/api/teams/get_team.py | 13 +- .../api/teams/get_team_incidents_chart.py | 9 +- .../teams/list_group_catalog_properties.py | 21 +- rootly_sdk/api/teams/list_teams.py | 12 +- rootly_sdk/api/teams/update_team.py | 11 +- .../create_user_email_address.py | 9 +- .../delete_user_email_address.py | 9 +- .../get_user_email_addresses.py | 9 +- .../resend_user_email_address_verification.py | 9 +- .../show_user_email_address.py | 9 +- .../update_user_email_address.py | 9 +- .../verify_user_email_address.py | 9 +- .../create_user_notification_rule.py | 9 +- .../delete_user_notification_rule.py | 9 +- .../get_user_notification_rule.py | 9 +- .../list_user_notification_rules.py | 10 +- .../update_user_notification_rule.py | 9 +- .../create_user_phone_number.py | 9 +- .../delete_user_phone_number.py | 9 +- .../get_user_phone_numbers.py | 9 +- .../show_user_phone_number.py | 9 +- .../update_user_phone_number.py | 9 +- rootly_sdk/api/users/delete_user.py | 9 +- rootly_sdk/api/users/get_current_user.py | 10 +- rootly_sdk/api/users/get_user.py | 11 +- rootly_sdk/api/users/list_users.py | 13 +- rootly_sdk/api/users/update_user.py | 10 +- .../deliver_webhooks_delivery.py | 9 +- .../get_webhooks_delivery.py | 9 +- .../list_webhooks_deliveries.py | 10 +- .../create_webhooks_endpoint.py | 10 +- .../delete_webhooks_endpoint.py | 9 +- .../get_webhooks_endpoint.py | 9 +- .../list_webhooks_endpoints.py | 11 +- .../update_webhooks_endpoint.py | 9 +- ...rkflow_action_item_form_field_condition.py | 7 +- ...rkflow_action_item_form_field_condition.py | 9 +- ...rkflow_action_item_form_field_condition.py | 9 +- ...kflow_action_item_form_field_conditions.py | 10 +- ...rkflow_action_item_form_field_condition.py | 9 +- .../create_workflow_form_field_condition.py | 9 +- .../delete_workflow_form_field_condition.py | 9 +- .../get_workflow_form_field_condition.py | 9 +- .../list_workflow_form_field_conditions.py | 10 +- .../update_workflow_form_field_condition.py | 9 +- .../workflow_groups/create_workflow_group.py | 10 +- .../workflow_groups/delete_workflow_group.py | 9 +- .../api/workflow_groups/get_workflow_group.py | 9 +- .../workflow_groups/list_workflow_groups.py | 11 +- .../workflow_groups/update_workflow_group.py | 9 +- .../api/workflow_runs/create_workflow_run.py | 9 +- .../api/workflow_runs/list_workflow_runs.py | 11 +- .../workflow_tasks/create_workflow_task.py | 9 +- .../workflow_tasks/delete_workflow_task.py | 9 +- .../api/workflow_tasks/get_workflow_task.py | 9 +- .../api/workflow_tasks/list_workflow_tasks.py | 10 +- .../workflow_tasks/update_workflow_task.py | 9 +- rootly_sdk/api/workflows/create_workflow.py | 10 +- rootly_sdk/api/workflows/delete_workflow.py | 11 +- rootly_sdk/api/workflows/get_workflow.py | 13 +- rootly_sdk/api/workflows/list_workflows.py | 13 +- rootly_sdk/api/workflows/update_workflow.py | 11 +- rootly_sdk/client.py | 5 +- .../models/action_item_trigger_params.py | 80 ++--- .../models/add_action_item_task_params.py | 29 +- ...ction_item_task_params_assigned_to_user.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...dd_microsoft_teams_chat_tab_task_params.py | 8 +- ...crosoft_teams_chat_tab_task_params_chat.py | 5 +- ..._microsoft_teams_tab_task_params_type_0.py | 5 +- ..._microsoft_teams_tab_task_params_type_1.py | 5 +- rootly_sdk/models/add_role_task_params.py | 9 +- .../add_role_task_params_assigned_to_user.py | 5 +- .../add_slack_bookmark_task_params_type_0.py | 5 +- .../add_slack_bookmark_task_params_type_1.py | 5 +- rootly_sdk/models/add_subscribers.py | 7 +- rootly_sdk/models/add_subscribers_data.py | 9 +- .../models/add_subscribers_data_attributes.py | 7 +- rootly_sdk/models/add_team_task_params.py | 9 +- .../models/add_to_timeline_task_params.py | 14 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/ai_chat_response.py | 7 +- rootly_sdk/models/ai_chat_response_data.py | 11 +- .../ai_chat_response_data_attributes.py | 14 +- rootly_sdk/models/ai_chat_session_message.py | 13 +- .../models/ai_chat_session_message_list.py | 7 +- .../ai_chat_session_message_list_meta.py | 5 +- rootly_sdk/models/alert.py | 27 +- .../alert_alert_field_values_type_0_item.py | 5 +- .../alert_alerting_targets_type_0_item.py | 5 +- rootly_sdk/models/alert_data_type_0.py | 5 +- rootly_sdk/models/alert_event.py | 13 +- .../alert_event_escalation_target_type_0.py | 6 +- ...ert_event_escalation_target_type_0_data.py | 8 +- ...scalation_target_type_0_data_attributes.py | 5 +- rootly_sdk/models/alert_event_feed_list.py | 9 +- .../models/alert_event_feed_list_data_item.py | 12 +- rootly_sdk/models/alert_event_feed_meta.py | 6 +- .../models/alert_event_incident_type_0.py | 6 +- rootly_sdk/models/alert_event_list.py | 9 +- .../models/alert_event_list_data_item.py | 9 +- rootly_sdk/models/alert_event_response.py | 7 +- .../models/alert_event_response_data.py | 9 +- .../models/alert_event_schedule_type_0.py | 8 +- ...chedule_type_0_escalation_policies_item.py | 5 +- rootly_sdk/models/alert_event_user.py | 6 +- rootly_sdk/models/alert_field.py | 5 +- rootly_sdk/models/alert_field_list.py | 9 +- .../models/alert_field_list_data_item.py | 9 +- rootly_sdk/models/alert_field_response.py | 7 +- .../models/alert_field_response_data.py | 9 +- rootly_sdk/models/alert_group.py | 8 +- .../models/alert_group_attributes_item.py | 5 +- .../models/alert_group_conditions_item.py | 15 +- ...roup_conditions_item_values_item_type_0.py | 5 +- rootly_sdk/models/alert_group_list.py | 7 +- .../models/alert_group_list_data_item.py | 9 +- rootly_sdk/models/alert_group_response.py | 7 +- .../models/alert_group_response_data.py | 9 +- rootly_sdk/models/alert_group_targets_item.py | 14 +- rootly_sdk/models/alert_labels_item_type_0.py | 7 +- rootly_sdk/models/alert_list.py | 9 +- rootly_sdk/models/alert_list_data_item.py | 9 +- rootly_sdk/models/alert_response.py | 7 +- rootly_sdk/models/alert_response_data.py | 9 +- rootly_sdk/models/alert_route.py | 8 +- rootly_sdk/models/alert_route_list.py | 9 +- .../models/alert_route_list_data_item.py | 9 +- rootly_sdk/models/alert_route_response.py | 7 +- .../models/alert_route_response_data.py | 9 +- rootly_sdk/models/alert_route_rules_item.py | 7 +- ..._route_rules_item_condition_groups_item.py | 8 +- ...m_condition_groups_item_conditions_item.py | 14 +- ...lert_route_rules_item_destinations_item.py | 10 +- rootly_sdk/models/alert_routing_rule.py | 15 +- .../models/alert_routing_rule_condition.py | 12 +- .../alert_routing_rule_condition_group.py | 8 +- ...lert_routing_rule_condition_groups_item.py | 10 +- ...e_condition_groups_item_conditions_item.py | 12 +- .../alert_routing_rule_conditions_item.py | 10 +- .../alert_routing_rule_destination_type_0.py | 10 +- rootly_sdk/models/alert_routing_rule_list.py | 9 +- .../alert_routing_rule_list_data_item.py | 12 +- .../models/alert_routing_rule_response.py | 7 +- .../alert_routing_rule_response_data.py | 12 +- .../alert_routing_rule_target_type_0.py | 14 +- rootly_sdk/models/alert_trigger_params.py | 57 ++-- ...gger_params_alert_field_conditions_item.py | 8 +- ...trigger_params_alert_payload_conditions.py | 10 +- ...lert_payload_conditions_conditions_item.py | 8 +- rootly_sdk/models/alert_urgency.py | 6 +- rootly_sdk/models/alert_urgency_list.py | 9 +- .../models/alert_urgency_list_data_item.py | 12 +- rootly_sdk/models/alert_urgency_response.py | 7 +- .../models/alert_urgency_response_data.py | 12 +- rootly_sdk/models/alerts_source.py | 27 +- ...rce_alert_source_fields_attributes_item.py | 6 +- ...rt_source_urgency_rules_attributes_item.py | 12 +- ...source_alert_template_attributes_type_0.py | 6 +- rootly_sdk/models/alerts_source_list.py | 9 +- .../models/alerts_source_list_data_item.py | 12 +- ...ource_resolution_rule_attributes_type_0.py | 14 +- ...butes_type_0_conditions_attributes_item.py | 12 +- rootly_sdk/models/alerts_source_response.py | 7 +- .../models/alerts_source_response_data.py | 12 +- ...rts_source_sourceable_attributes_type_0.py | 8 +- ...s_type_0_field_mappings_attributes_item.py | 8 +- rootly_sdk/models/api_key.py | 9 +- rootly_sdk/models/api_key_list.py | 9 +- rootly_sdk/models/api_key_list_data_item.py | 9 +- rootly_sdk/models/api_key_response.py | 7 +- rootly_sdk/models/api_key_response_data.py | 9 +- .../models/api_key_with_token_response.py | 7 +- .../api_key_with_token_response_data.py | 12 +- ...key_with_token_response_data_attributes.py | 9 +- .../archive_google_chat_spaces_task_params.py | 10 +- ...gle_chat_spaces_task_params_spaces_item.py | 5 +- ...ve_microsoft_teams_channels_task_params.py | 13 +- ...eams_channels_task_params_channels_item.py | 5 +- ...crosoft_teams_channels_task_params_team.py | 5 +- .../archive_slack_channels_task_params.py | 12 +- ...lack_channels_task_params_channels_item.py | 5 +- rootly_sdk/models/assign_role_to_user.py | 7 +- rootly_sdk/models/assign_role_to_user_data.py | 9 +- .../assign_role_to_user_data_attributes.py | 6 +- rootly_sdk/models/attach_alert.py | 7 +- rootly_sdk/models/attach_alert_data.py | 9 +- .../models/attach_alert_data_attributes.py | 8 +- .../attach_datadog_dashboards_task_params.py | 13 +- ..._dashboards_task_params_dashboards_item.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ospective_pdf_to_jira_issue_task_params.py | 10 +- ...f_to_jira_issue_task_params_integration.py | 5 +- rootly_sdk/models/audit.py | 10 +- .../models/audit_object_changes_type_0.py | 5 +- rootly_sdk/models/audit_object_type_0.py | 5 +- rootly_sdk/models/audits_list.py | 9 +- rootly_sdk/models/audits_list_data_item.py | 9 +- rootly_sdk/models/authorization.py | 18 +- rootly_sdk/models/authorization_list.py | 9 +- .../models/authorization_list_data_item.py | 12 +- rootly_sdk/models/authorization_response.py | 7 +- .../models/authorization_response_data.py | 12 +- .../auto_assign_role_opsgenie_task_params.py | 8 +- ...sign_role_opsgenie_task_params_schedule.py | 5 +- ...e_pagerduty_task_params_type_0_schedule.py | 5 +- ...ty_task_params_type_1_escalation_policy.py | 5 +- .../auto_assign_role_rootly_task_params.py | 22 +- ...ly_task_params_escalation_policy_target.py | 5 +- ...gn_role_rootly_task_params_group_target.py | 5 +- ...role_rootly_task_params_schedule_target.py | 5 +- ..._role_rootly_task_params_service_target.py | 5 +- ...ign_role_rootly_task_params_user_target.py | 5 +- ...auto_assign_role_victor_ops_task_params.py | 8 +- ...assign_role_victor_ops_task_params_team.py | 5 +- .../bulk_destroy_catalog_entities_response.py | 6 +- ..._destroy_catalog_entities_response_data.py | 6 +- .../bulk_destroy_catalog_entities_type_0.py | 8 +- .../bulk_destroy_catalog_entities_type_1.py | 9 +- .../bulk_destroy_environments_response.py | 6 +- ...bulk_destroy_environments_response_data.py | 6 +- .../bulk_destroy_environments_type_0.py | 8 +- .../bulk_destroy_environments_type_1.py | 13 +- .../bulk_destroy_functionalities_response.py | 6 +- ...k_destroy_functionalities_response_data.py | 6 +- .../bulk_destroy_functionalities_type_0.py | 8 +- .../bulk_destroy_functionalities_type_1.py | 13 +- .../models/bulk_destroy_services_response.py | 6 +- .../bulk_destroy_services_response_data.py | 6 +- .../models/bulk_destroy_services_type_0.py | 8 +- .../models/bulk_destroy_services_type_1.py | 13 +- .../models/bulk_destroy_teams_response.py | 6 +- .../bulk_destroy_teams_response_data.py | 6 +- .../models/bulk_destroy_teams_type_0.py | 8 +- .../models/bulk_destroy_teams_type_1.py | 13 +- .../models/bulk_upsert_catalog_entities.py | 7 +- ...k_upsert_catalog_entities_entities_item.py | 8 +- ...alog_entities_entities_item_fields_item.py | 5 +- .../bulk_upsert_catalog_entities_error.py | 7 +- ...sert_catalog_entities_error_errors_item.py | 7 +- .../bulk_upsert_catalog_entities_response.py | 6 +- ...ert_catalog_entities_response_data_item.py | 8 +- rootly_sdk/models/bulk_upsert_environments.py | 7 +- .../bulk_upsert_environments_entities_item.py | 8 +- ..._environments_entities_item_fields_item.py | 5 +- .../models/bulk_upsert_environments_error.py | 7 +- ...k_upsert_environments_error_errors_item.py | 7 +- .../bulk_upsert_environments_response.py | 6 +- ..._upsert_environments_response_data_item.py | 8 +- .../models/bulk_upsert_functionalities.py | 7 +- ...lk_upsert_functionalities_entities_item.py | 8 +- ...nctionalities_entities_item_fields_item.py | 5 +- .../bulk_upsert_functionalities_error.py | 7 +- ...psert_functionalities_error_errors_item.py | 7 +- .../bulk_upsert_functionalities_response.py | 6 +- ...sert_functionalities_response_data_item.py | 8 +- rootly_sdk/models/bulk_upsert_services.py | 7 +- .../bulk_upsert_services_entities_item.py | 6 +- ...sert_services_entities_item_fields_item.py | 5 +- .../models/bulk_upsert_services_error.py | 7 +- .../bulk_upsert_services_error_errors_item.py | 7 +- .../models/bulk_upsert_services_response.py | 6 +- ...bulk_upsert_services_response_data_item.py | 12 +- rootly_sdk/models/bulk_upsert_teams.py | 7 +- .../models/bulk_upsert_teams_entities_item.py | 6 +- ..._upsert_teams_entities_item_fields_item.py | 5 +- rootly_sdk/models/bulk_upsert_teams_error.py | 7 +- .../bulk_upsert_teams_error_errors_item.py | 7 +- .../models/bulk_upsert_teams_response.py | 6 +- .../bulk_upsert_teams_response_data_item.py | 12 +- rootly_sdk/models/call_people_task_params.py | 12 +- rootly_sdk/models/cancel_incident.py | 7 +- rootly_sdk/models/cancel_incident_data.py | 9 +- .../models/cancel_incident_data_attributes.py | 7 +- rootly_sdk/models/catalog.py | 12 +- .../models/catalog_checklist_template.py | 19 +- ...g_checklist_template_fields_type_0_item.py | 8 +- .../models/catalog_checklist_template_list.py | 9 +- ...talog_checklist_template_list_data_item.py | 12 +- ...g_checklist_template_owners_type_0_item.py | 8 +- .../catalog_checklist_template_response.py | 7 +- ...atalog_checklist_template_response_data.py | 12 +- rootly_sdk/models/catalog_entity.py | 9 +- rootly_sdk/models/catalog_entity_checklist.py | 20 +- ..._checklist_checklist_fields_type_0_item.py | 8 +- ...klist_checklist_fields_type_0_item_data.py | 10 +- ...list_fields_type_0_item_data_attributes.py | 5 +- ...m_data_attributes_value_snapshot_type_0.py | 5 +- ..._checklist_checklist_owners_type_0_item.py | 8 +- ...klist_checklist_owners_type_0_item_data.py | 10 +- ...list_owners_type_0_item_data_attributes.py | 5 +- .../models/catalog_entity_checklist_list.py | 9 +- ...catalog_entity_checklist_list_data_item.py | 12 +- .../catalog_entity_checklist_response.py | 7 +- .../catalog_entity_checklist_response_data.py | 12 +- rootly_sdk/models/catalog_entity_list.py | 9 +- .../models/catalog_entity_list_data_item.py | 12 +- .../models/catalog_entity_properties_item.py | 5 +- rootly_sdk/models/catalog_entity_property.py | 9 +- .../models/catalog_entity_property_list.py | 9 +- .../catalog_entity_property_list_data_item.py | 12 +- .../catalog_entity_property_response.py | 7 +- .../catalog_entity_property_response_data.py | 12 +- rootly_sdk/models/catalog_entity_response.py | 7 +- .../models/catalog_entity_response_data.py | 12 +- rootly_sdk/models/catalog_field.py | 15 +- rootly_sdk/models/catalog_field_list.py | 9 +- .../models/catalog_field_list_data_item.py | 12 +- rootly_sdk/models/catalog_field_response.py | 7 +- .../models/catalog_field_response_data.py | 12 +- rootly_sdk/models/catalog_list.py | 9 +- rootly_sdk/models/catalog_list_data_item.py | 9 +- rootly_sdk/models/catalog_property.py | 15 +- rootly_sdk/models/catalog_property_list.py | 9 +- .../models/catalog_property_list_data_item.py | 12 +- .../models/catalog_property_response.py | 7 +- .../models/catalog_property_response_data.py | 12 +- rootly_sdk/models/catalog_response.py | 7 +- rootly_sdk/models/catalog_response_data.py | 9 +- rootly_sdk/models/cause.py | 6 +- rootly_sdk/models/cause_list.py | 9 +- rootly_sdk/models/cause_list_data_item.py | 9 +- rootly_sdk/models/cause_properties_item.py | 5 +- rootly_sdk/models/cause_response.py | 7 +- rootly_sdk/models/cause_response_data.py | 9 +- ...e_google_chat_space_privacy_task_params.py | 10 +- ...le_chat_space_privacy_task_params_space.py | 5 +- ...hange_slack_channel_privacy_task_params.py | 10 +- ...ack_channel_privacy_task_params_channel.py | 5 +- rootly_sdk/models/communications_group.py | 17 +- ...tion_external_group_members_type_0_item.py | 5 +- ...munication_group_conditions_type_0_item.py | 10 +- .../models/communications_group_response.py | 7 +- .../communications_group_response_data.py | 12 +- .../models/communications_groups_response.py | 9 +- ...ommunications_groups_response_data_item.py | 12 +- rootly_sdk/models/communications_stage.py | 6 +- .../models/communications_stage_response.py | 7 +- .../communications_stage_response_data.py | 12 +- .../models/communications_stages_response.py | 9 +- ...ommunications_stages_response_data_item.py | 12 +- rootly_sdk/models/communications_template.py | 9 +- ...mmunication_template_stages_type_0_item.py | 8 +- ...cation_template_stages_type_0_item_data.py | 12 +- ...late_stages_type_0_item_data_attributes.py | 11 +- ...tem_data_attributes_communication_stage.py | 5 +- ..._data_attributes_communication_template.py | 5 +- ...munications_template_communication_type.py | 5 +- .../communications_template_response.py | 7 +- .../communications_template_response_data.py | 12 +- .../communications_templates_response.py | 9 +- ...unications_templates_response_data_item.py | 8 +- rootly_sdk/models/communications_type.py | 6 +- .../models/communications_type_response.py | 7 +- .../communications_type_response_data.py | 12 +- .../models/communications_types_response.py | 9 +- ...communications_types_response_data_item.py | 12 +- ...reate_airtable_table_record_task_params.py | 9 +- ..._airtable_table_record_task_params_base.py | 5 +- ...airtable_table_record_task_params_table.py | 5 +- ...e_anthropic_chat_completion_task_params.py | 12 +- ...ropic_chat_completion_task_params_model.py | 5 +- .../create_asana_subtask_task_params.py | 14 +- ...te_asana_subtask_task_params_completion.py | 5 +- .../models/create_asana_task_task_params.py | 16 +- ...reate_asana_task_task_params_completion.py | 5 +- ...te_asana_task_task_params_projects_item.py | 5 +- ...create_asana_task_task_params_workspace.py | 5 +- .../models/create_clickup_task_task_params.py | 12 +- ...reate_clickup_task_task_params_priority.py | 5 +- .../models/create_coda_page_task_params.py | 13 +- .../create_coda_page_task_params_doc.py | 5 +- .../create_coda_page_task_params_template.py | 5 +- .../create_confluence_page_task_params.py | 15 +- ...te_confluence_page_task_params_ancestor.py | 5 +- ...confluence_page_task_params_integration.py | 5 +- ...reate_confluence_page_task_params_space.py | 5 +- ...te_confluence_page_task_params_template.py | 5 +- .../create_datadog_notebook_task_params.py | 18 +- ...e_datadog_notebook_task_params_template.py | 5 +- .../create_dropbox_paper_page_task_params.py | 11 +- ...ropbox_paper_page_task_params_namespace.py | 5 +- ...ox_paper_page_task_params_parent_folder.py | 5 +- .../create_edge_connector_action_body.py | 6 +- ...reate_edge_connector_action_body_action.py | 10 +- ...e_connector_action_body_action_metadata.py | 8 +- ...on_body_action_metadata_parameters_item.py | 10 +- .../models/create_edge_connector_body.py | 7 +- .../models/create_edge_connector_body_data.py | 12 +- ...ate_edge_connector_body_data_attributes.py | 10 +- ..._connector_body_data_attributes_filters.py | 7 +- .../models/create_github_issue_task_params.py | 14 +- ...ate_github_issue_task_params_issue_type.py | 5 +- ...te_github_issue_task_params_labels_item.py | 5 +- ...ate_github_issue_task_params_repository.py | 5 +- .../models/create_gitlab_issue_task_params.py | 18 +- ...ate_gitlab_issue_task_params_repository.py | 5 +- .../create_go_to_meeting_task_params.py | 16 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...reate_google_calendar_event_task_params.py | 14 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../create_google_chat_space_task_params.py | 12 +- .../create_google_docs_page_task_params.py | 15 +- ...eate_google_docs_page_task_params_drive.py | 5 +- ...gle_docs_page_task_params_parent_folder.py | 5 +- ...ate_google_docs_permissions_task_params.py | 8 +- ...ogle_gemini_chat_completion_task_params.py | 12 +- ...emini_chat_completion_task_params_model.py | 5 +- .../create_google_meeting_task_params.py | 20 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../create_incident_postmortem_task_params.py | 7 +- ..._postmortem_task_params_template_type_0.py | 5 +- .../models/create_incident_task_params.py | 12 +- .../models/create_jira_issue_task_params.py | 15 +- ...eate_jira_issue_task_params_integration.py | 5 +- ...reate_jira_issue_task_params_issue_type.py | 5 +- .../create_jira_issue_task_params_priority.py | 5 +- .../create_jira_issue_task_params_status.py | 5 +- .../models/create_jira_subtask_task_params.py | 17 +- ...te_jira_subtask_task_params_integration.py | 5 +- ...reate_jira_subtask_task_params_priority.py | 5 +- .../create_jira_subtask_task_params_status.py | 5 +- ..._subtask_task_params_subtask_issue_type.py | 5 +- .../models/create_jsmops_alert_task_params.py | 21 +- ...mops_alert_task_params_escalations_item.py | 5 +- ...jsmops_alert_task_params_schedules_item.py | 5 +- ...ate_jsmops_alert_task_params_teams_item.py | 5 +- ...ate_jsmops_alert_task_params_users_item.py | 5 +- ...create_linear_issue_comment_task_params.py | 8 +- .../models/create_linear_issue_task_params.py | 16 +- ...te_linear_issue_task_params_labels_item.py | 5 +- ...reate_linear_issue_task_params_priority.py | 5 +- ...create_linear_issue_task_params_project.py | 5 +- .../create_linear_issue_task_params_state.py | 5 +- .../create_linear_issue_task_params_team.py | 5 +- ...create_linear_subtask_issue_task_params.py | 12 +- ...r_subtask_issue_task_params_labels_item.py | 5 +- ...near_subtask_issue_task_params_priority.py | 5 +- ..._linear_subtask_issue_task_params_state.py | 5 +- ...ate_microsoft_teams_channel_task_params.py | 10 +- ...icrosoft_teams_channel_task_params_team.py | 5 +- ...create_microsoft_teams_chat_task_params.py | 12 +- ...oft_teams_chat_task_params_members_item.py | 5 +- ...ate_microsoft_teams_meeting_task_params.py | 14 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ate_mistral_chat_completion_task_params.py | 8 +- ...stral_chat_completion_task_params_model.py | 5 +- .../models/create_motion_task_task_params.py | 15 +- ...create_motion_task_task_params_priority.py | 5 +- .../create_motion_task_task_params_project.py | 5 +- .../create_motion_task_task_params_status.py | 5 +- ...reate_motion_task_task_params_workspace.py | 5 +- .../models/create_notion_page_task_params.py | 12 +- ...ate_notion_page_task_params_parent_page.py | 5 +- ...eate_openai_chat_completion_task_params.py | 16 +- ...penai_chat_completion_task_params_model.py | 5 +- .../create_opsgenie_alert_task_params.py | 23 +- ...enie_alert_task_params_escalations_item.py | 5 +- ...sgenie_alert_task_params_schedules_item.py | 5 +- ...e_opsgenie_alert_task_params_teams_item.py | 5 +- ...e_opsgenie_alert_task_params_users_item.py | 5 +- .../create_outlook_event_task_params.py | 15 +- ...eate_outlook_event_task_params_calendar.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ate_pagerduty_status_update_task_params.py | 8 +- .../create_pagertree_alert_task_params.py | 25 +- ..._pagertree_alert_task_params_teams_item.py | 5 +- ..._pagertree_alert_task_params_users_item.py | 5 +- .../models/create_quip_page_task_params.py | 12 +- ...create_service_now_incident_task_params.py | 11 +- ...ice_now_incident_task_params_completion.py | 5 +- ...rvice_now_incident_task_params_priority.py | 5 +- .../create_sharepoint_page_task_params.py | 14 +- ...reate_sharepoint_page_task_params_drive.py | 5 +- ...arepoint_page_task_params_parent_folder.py | 5 +- ...create_sharepoint_page_task_params_site.py | 5 +- ...ortcut_story_task_params_type_0_project.py | 5 +- ...story_task_params_type_1_workflow_state.py | 5 +- .../create_shortcut_task_task_params.py | 12 +- ...te_shortcut_task_task_params_completion.py | 5 +- .../create_slack_channel_task_params.py | 18 +- ...ate_slack_channel_task_params_workspace.py | 5 +- .../models/create_sub_incident_task_params.py | 12 +- .../models/create_trello_card_task_params.py | 15 +- ...ate_trello_card_task_params_archivation.py | 5 +- .../create_trello_card_task_params_board.py | 5 +- ...ate_trello_card_task_params_labels_item.py | 5 +- .../create_trello_card_task_params_list.py | 5 +- ...ate_watsonx_chat_completion_task_params.py | 8 +- ...tsonx_chat_completion_task_params_model.py | 5 +- .../create_webex_meeting_task_params.py | 16 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../create_zendesk_jira_link_task_params.py | 12 +- .../create_zendesk_ticket_task_params.py | 19 +- ...e_zendesk_ticket_task_params_completion.py | 5 +- ...ate_zendesk_ticket_task_params_priority.py | 5 +- .../models/create_zoom_meeting_task_params.py | 26 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/custom_field.py | 15 +- rootly_sdk/models/custom_field_list.py | 9 +- .../models/custom_field_list_data_item.py | 12 +- rootly_sdk/models/custom_field_option.py | 5 +- rootly_sdk/models/custom_field_option_list.py | 9 +- .../custom_field_option_list_data_item.py | 12 +- .../models/custom_field_option_response.py | 7 +- .../custom_field_option_response_data.py | 12 +- rootly_sdk/models/custom_field_response.py | 7 +- .../models/custom_field_response_data.py | 9 +- rootly_sdk/models/custom_form.py | 6 +- rootly_sdk/models/custom_form_list.py | 9 +- .../models/custom_form_list_data_item.py | 9 +- rootly_sdk/models/custom_form_response.py | 7 +- .../models/custom_form_response_data.py | 9 +- rootly_sdk/models/dashboard.py | 12 +- rootly_sdk/models/dashboard_list.py | 9 +- rootly_sdk/models/dashboard_list_data_item.py | 9 +- rootly_sdk/models/dashboard_panel.py | 7 +- .../models/dashboard_panel_data_item.py | 5 +- rootly_sdk/models/dashboard_panel_list.py | 9 +- .../models/dashboard_panel_list_data_item.py | 12 +- rootly_sdk/models/dashboard_panel_params.py | 11 +- .../dashboard_panel_params_datalabels.py | 5 +- .../dashboard_panel_params_datasets_item.py | 8 +- ...l_params_datasets_item_aggregate_type_0.py | 10 +- ..._panel_params_datasets_item_filter_item.py | 12 +- ...ms_datasets_item_filter_item_rules_item.py | 14 +- ...ms_datasets_item_group_by_type_1_type_0.py | 10 +- .../models/dashboard_panel_params_legend.py | 12 +- .../models/dashboard_panel_position_type_0.py | 5 +- rootly_sdk/models/dashboard_panel_response.py | 7 +- .../models/dashboard_panel_response_data.py | 12 +- rootly_sdk/models/dashboard_response.py | 7 +- rootly_sdk/models/dashboard_response_data.py | 9 +- .../models/delete_alert_route_response_200.py | 6 +- .../delete_alert_route_response_200_data.py | 6 +- ...lert_route_response_200_data_attributes.py | 5 +- rootly_sdk/models/duplicate_incident.py | 7 +- rootly_sdk/models/duplicate_incident_data.py | 9 +- .../duplicate_incident_data_attributes.py | 7 +- rootly_sdk/models/edge_connector.py | 7 +- rootly_sdk/models/edge_connector_action.py | 7 +- .../models/edge_connector_action_data.py | 11 +- .../edge_connector_action_data_attributes.py | 20 +- ..._data_attributes_parameters_type_0_item.py | 10 +- rootly_sdk/models/edge_connector_data.py | 11 +- .../models/edge_connector_data_attributes.py | 16 +- rootly_sdk/models/environment.py | 11 +- rootly_sdk/models/environment_list.py | 9 +- .../models/environment_list_data_item.py | 9 +- .../environment_properties_type_0_item.py | 5 +- rootly_sdk/models/environment_response.py | 7 +- .../models/environment_response_data.py | 9 +- .../environment_slack_aliases_type_0_item.py | 5 +- .../environment_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/errors_list.py | 6 +- rootly_sdk/models/errors_list_errors_item.py | 6 +- rootly_sdk/models/escalate_alert.py | 6 +- rootly_sdk/models/escalate_alert_data.py | 9 +- .../models/escalate_alert_data_attributes.py | 6 +- rootly_sdk/models/escalation_policy.py | 5 +- ...escalation_policy_business_hours_type_0.py | 12 +- rootly_sdk/models/escalation_policy_level.py | 13 +- .../models/escalation_policy_level_list.py | 9 +- .../escalation_policy_level_list_data_item.py | 7 +- ..._notification_target_params_item_type_0.py | 14 +- .../escalation_policy_level_response.py | 7 +- .../escalation_policy_level_response_data.py | 12 +- rootly_sdk/models/escalation_policy_list.py | 9 +- .../escalation_policy_list_data_item.py | 12 +- rootly_sdk/models/escalation_policy_path.py | 61 ++-- .../models/escalation_policy_path_list.py | 9 +- .../escalation_policy_path_list_data_item.py | 7 +- .../models/escalation_policy_path_response.py | 7 +- .../escalation_policy_path_response_data.py | 12 +- ...scalation_policy_path_rules_item_type_0.py | 8 +- ...scalation_policy_path_rules_item_type_1.py | 8 +- ...scalation_policy_path_rules_item_type_2.py | 10 +- ...scalation_policy_path_rules_item_type_3.py | 10 +- ...scalation_policy_path_rules_item_type_4.py | 8 +- ...scalation_policy_path_rules_item_type_5.py | 12 +- ...path_rules_item_type_5_time_blocks_item.py | 6 +- ...scalation_policy_path_rules_item_type_6.py | 10 +- ...scalation_policy_path_rules_item_type_7.py | 10 +- ...on_policy_path_rules_item_type_8_type_0.py | 10 +- ...on_policy_path_rules_item_type_8_type_1.py | 10 +- ...on_policy_path_rules_item_type_8_type_2.py | 14 +- ...on_policy_path_rules_item_type_8_type_3.py | 14 +- ...on_policy_path_rules_item_type_8_type_4.py | 10 +- ...on_policy_path_rules_item_type_8_type_5.py | 16 +- ...les_item_type_8_type_5_time_blocks_item.py | 6 +- ...on_policy_path_rules_item_type_8_type_6.py | 14 +- ...on_policy_path_rules_item_type_8_type_7.py | 14 +- ...on_policy_path_rules_item_type_9_type_0.py | 10 +- ...on_policy_path_rules_item_type_9_type_1.py | 10 +- ...on_policy_path_rules_item_type_9_type_2.py | 14 +- ...on_policy_path_rules_item_type_9_type_3.py | 14 +- ...on_policy_path_rules_item_type_9_type_4.py | 10 +- ...on_policy_path_rules_item_type_9_type_5.py | 16 +- ...les_item_type_9_type_5_time_blocks_item.py | 6 +- ...on_policy_path_rules_item_type_9_type_6.py | 14 +- ...on_policy_path_rules_item_type_9_type_7.py | 14 +- ...tion_policy_path_time_restrictions_item.py | 14 +- .../models/escalation_policy_response.py | 7 +- .../models/escalation_policy_response_data.py | 12 +- rootly_sdk/models/form_field.py | 15 +- rootly_sdk/models/form_field_list.py | 9 +- .../models/form_field_list_data_item.py | 9 +- rootly_sdk/models/form_field_option.py | 5 +- rootly_sdk/models/form_field_option_list.py | 9 +- .../form_field_option_list_data_item.py | 12 +- .../models/form_field_option_response.py | 7 +- .../models/form_field_option_response_data.py | 12 +- rootly_sdk/models/form_field_placement.py | 18 +- .../models/form_field_placement_condition.py | 18 +- .../form_field_placement_condition_list.py | 9 +- ...ield_placement_condition_list_data_item.py | 8 +- ...form_field_placement_condition_response.py | 7 +- ...field_placement_condition_response_data.py | 8 +- .../models/form_field_placement_list.py | 9 +- .../form_field_placement_list_data_item.py | 12 +- .../models/form_field_placement_response.py | 7 +- .../form_field_placement_response_data.py | 12 +- rootly_sdk/models/form_field_position.py | 9 +- rootly_sdk/models/form_field_position_list.py | 9 +- .../form_field_position_list_data_item.py | 12 +- .../models/form_field_position_response.py | 7 +- .../form_field_position_response_data.py | 12 +- rootly_sdk/models/form_field_response.py | 7 +- rootly_sdk/models/form_field_response_data.py | 9 +- rootly_sdk/models/form_set.py | 6 +- rootly_sdk/models/form_set_condition.py | 9 +- rootly_sdk/models/form_set_condition_list.py | 9 +- .../form_set_condition_list_data_item.py | 12 +- .../models/form_set_condition_response.py | 7 +- .../form_set_condition_response_data.py | 12 +- rootly_sdk/models/form_set_list.py | 9 +- rootly_sdk/models/form_set_list_data_item.py | 9 +- rootly_sdk/models/form_set_response.py | 7 +- rootly_sdk/models/form_set_response_data.py | 9 +- rootly_sdk/models/functionality.py | 11 +- rootly_sdk/models/functionality_list.py | 9 +- .../models/functionality_list_data_item.py | 12 +- .../functionality_properties_type_0_item.py | 5 +- rootly_sdk/models/functionality_response.py | 7 +- .../models/functionality_response_data.py | 12 +- ...functionality_slack_aliases_type_0_item.py | 5 +- ...unctionality_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/get_alerts_task_params.py | 17 +- ..._task_params_parent_message_thread_task.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../get_github_commits_task_params_type_0.py | 7 +- .../get_github_commits_task_params_type_1.py | 7 +- .../get_gitlab_commits_task_params_type_0.py | 7 +- .../get_gitlab_commits_task_params_type_1.py | 7 +- rootly_sdk/models/get_pulses_task_params.py | 17 +- ..._task_params_parent_message_thread_task.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/heartbeat.py | 18 +- rootly_sdk/models/heartbeat_list.py | 9 +- rootly_sdk/models/heartbeat_list_data_item.py | 9 +- rootly_sdk/models/heartbeat_response.py | 7 +- rootly_sdk/models/heartbeat_response_data.py | 9 +- rootly_sdk/models/http_client_task_params.py | 17 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/import_meeting_recording.py | 21 +- rootly_sdk/models/in_triage_incident.py | 7 +- rootly_sdk/models/in_triage_incident_data.py | 9 +- rootly_sdk/models/incident.py | 28 +- rootly_sdk/models/incident_action_item.py | 15 +- .../models/incident_action_item_list.py | 9 +- .../incident_action_item_list_data_item.py | 12 +- .../models/incident_action_item_response.py | 7 +- .../incident_action_item_response_data.py | 12 +- .../models/incident_cancelled_by_type_0.py | 5 +- .../models/incident_closed_by_type_0.py | 5 +- .../models/incident_custom_field_selection.py | 6 +- .../incident_custom_field_selection_list.py | 9 +- ...t_custom_field_selection_list_data_item.py | 8 +- ...ncident_custom_field_selection_response.py | 7 +- ...nt_custom_field_selection_response_data.py | 8 +- rootly_sdk/models/incident_event.py | 9 +- .../models/incident_event_functionality.py | 13 +- .../incident_event_functionality_list.py | 9 +- ...dent_event_functionality_list_data_item.py | 8 +- .../incident_event_functionality_response.py | 7 +- ...ident_event_functionality_response_data.py | 8 +- rootly_sdk/models/incident_event_list.py | 9 +- .../models/incident_event_list_data_item.py | 12 +- rootly_sdk/models/incident_event_response.py | 7 +- .../models/incident_event_response_data.py | 12 +- rootly_sdk/models/incident_event_service.py | 10 +- .../models/incident_event_service_list.py | 9 +- .../incident_event_service_list_data_item.py | 12 +- .../models/incident_event_service_response.py | 7 +- .../incident_event_service_response_data.py | 12 +- rootly_sdk/models/incident_feedback.py | 9 +- rootly_sdk/models/incident_feedback_list.py | 9 +- .../incident_feedback_list_data_item.py | 12 +- .../models/incident_feedback_response.py | 7 +- .../models/incident_feedback_response_data.py | 12 +- .../models/incident_form_field_selection.py | 6 +- .../incident_form_field_selection_list.py | 9 +- ...ent_form_field_selection_list_data_item.py | 8 +- .../incident_form_field_selection_response.py | 7 +- ...dent_form_field_selection_response_data.py | 8 +- .../models/incident_in_triage_by_type_0.py | 5 +- rootly_sdk/models/incident_labels_type_0.py | 5 +- rootly_sdk/models/incident_list.py | 9 +- rootly_sdk/models/incident_list_data_item.py | 9 +- .../models/incident_mitigated_by_type_0.py | 5 +- rootly_sdk/models/incident_permission_set.py | 14 +- .../models/incident_permission_set_boolean.py | 12 +- .../incident_permission_set_boolean_list.py | 9 +- ...t_permission_set_boolean_list_data_item.py | 8 +- ...ncident_permission_set_boolean_response.py | 7 +- ...nt_permission_set_boolean_response_data.py | 8 +- .../models/incident_permission_set_list.py | 9 +- .../incident_permission_set_list_data_item.py | 12 +- .../incident_permission_set_resource.py | 12 +- .../incident_permission_set_resource_list.py | 9 +- ..._permission_set_resource_list_data_item.py | 8 +- ...cident_permission_set_resource_response.py | 7 +- ...t_permission_set_resource_response_data.py | 8 +- .../incident_permission_set_response.py | 7 +- .../incident_permission_set_response_data.py | 12 +- rootly_sdk/models/incident_post_mortem.py | 15 +- .../models/incident_post_mortem_list.py | 9 +- .../incident_post_mortem_list_data_item.py | 12 +- .../models/incident_post_mortem_response.py | 7 +- .../incident_post_mortem_response_data.py | 12 +- .../models/incident_resolved_by_type_0.py | 5 +- rootly_sdk/models/incident_response.py | 7 +- rootly_sdk/models/incident_response_data.py | 9 +- .../models/incident_retrospective_step.py | 12 +- .../incident_retrospective_step_response.py | 7 +- ...cident_retrospective_step_response_data.py | 12 +- rootly_sdk/models/incident_role.py | 6 +- rootly_sdk/models/incident_role_list.py | 9 +- .../models/incident_role_list_data_item.py | 12 +- rootly_sdk/models/incident_role_response.py | 7 +- .../models/incident_role_response_data.py | 12 +- rootly_sdk/models/incident_role_task.py | 9 +- rootly_sdk/models/incident_role_task_list.py | 9 +- .../incident_role_task_list_data_item.py | 12 +- .../models/incident_role_task_response.py | 7 +- .../incident_role_task_response_data.py | 12 +- .../models/incident_started_by_type_0.py | 5 +- .../models/incident_status_page_event.py | 12 +- .../models/incident_status_page_event_list.py | 9 +- ...cident_status_page_event_list_data_item.py | 12 +- .../incident_status_page_event_response.py | 7 +- ...ncident_status_page_event_response_data.py | 12 +- rootly_sdk/models/incident_sub_status.py | 6 +- rootly_sdk/models/incident_sub_status_list.py | 9 +- .../incident_sub_status_list_data_item.py | 12 +- .../models/incident_sub_status_response.py | 7 +- .../incident_sub_status_response_data.py | 12 +- rootly_sdk/models/incident_trigger_params.py | 92 +++--- rootly_sdk/models/incident_type.py | 8 +- rootly_sdk/models/incident_type_list.py | 9 +- .../models/incident_type_list_data_item.py | 12 +- .../models/incident_type_properties_item.py | 5 +- rootly_sdk/models/incident_type_response.py | 7 +- .../models/incident_type_response_data.py | 12 +- ...incident_type_slack_aliases_type_0_item.py | 5 +- ...ncident_type_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/incident_user_type_0.py | 5 +- ...ting_global_dial_in_numbers_type_0_item.py | 5 +- rootly_sdk/models/incidents_chart_response.py | 7 +- .../models/incidents_chart_response_data.py | 5 +- ...invite_to_google_chat_space_task_params.py | 8 +- ..._to_google_chat_space_task_params_space.py | 5 +- ...rosoft_teams_channel_rootly_task_params.py | 30 +- ...eams_channel_rootly_task_params_channel.py | 5 +- ...ly_task_params_escalation_policy_target.py | 5 +- ...channel_rootly_task_params_group_target.py | 5 +- ...nnel_rootly_task_params_schedule_target.py | 5 +- ...annel_rootly_task_params_service_target.py | 5 +- ...t_teams_channel_rootly_task_params_team.py | 5 +- ..._channel_rootly_task_params_user_target.py | 5 +- ..._to_microsoft_teams_channel_task_params.py | 15 +- ...osoft_teams_channel_task_params_channel.py | 5 +- ...icrosoft_teams_channel_task_params_team.py | 5 +- ...e_to_slack_channel_opsgenie_task_params.py | 15 +- ...nnel_opsgenie_task_params_channels_item.py | 5 +- ...k_channel_opsgenie_task_params_schedule.py | 5 +- ...ty_task_params_type_0_escalation_policy.py | 5 +- ...l_pagerduty_task_params_type_1_schedule.py | 5 +- ...ite_to_slack_channel_rootly_task_params.py | 25 +- ...hannel_rootly_task_params_channels_item.py | 5 +- ...ly_task_params_escalation_policy_target.py | 5 +- ...channel_rootly_task_params_group_target.py | 5 +- ...nnel_rootly_task_params_schedule_target.py | 5 +- ...annel_rootly_task_params_service_target.py | 5 +- ..._channel_rootly_task_params_user_target.py | 5 +- ...nel_task_params_type_0_slack_users_item.py | 5 +- ...sk_params_type_1_slack_user_groups_item.py | 5 +- ...ite_to_slack_channel_task_params_type_2.py | 5 +- ...to_slack_channel_victor_ops_task_params.py | 15 +- ...el_victor_ops_task_params_channels_item.py | 5 +- ...ack_channel_victor_ops_task_params_team.py | 5 +- rootly_sdk/models/ip_ranges.py | 7 +- rootly_sdk/models/ip_ranges_response.py | 7 +- rootly_sdk/models/ip_ranges_response_data.py | 9 +- .../models/jsonapi_included_resource.py | 7 +- .../jsonapi_included_resource_attributes.py | 5 +- ...jsonapi_included_resource_relationships.py | 5 +- rootly_sdk/models/links.py | 7 +- rootly_sdk/models/live_call_router.py | 24 +- ...router_escalation_policy_trigger_params.py | 10 +- rootly_sdk/models/live_call_router_list.py | 9 +- .../models/live_call_router_list_data_item.py | 12 +- .../live_call_router_paging_targets_item.py | 12 +- .../models/live_call_router_response.py | 7 +- .../models/live_call_router_response_data.py | 12 +- rootly_sdk/models/meeting_recording.py | 16 +- rootly_sdk/models/meeting_recording_detail.py | 17 +- .../meeting_recording_detail_response.py | 7 +- .../meeting_recording_detail_response_data.py | 12 +- ...ting_recording_detail_transcript_type_1.py | 5 +- rootly_sdk/models/meeting_recording_list.py | 7 +- .../meeting_recording_list_data_item.py | 12 +- .../models/meeting_recording_response.py | 7 +- .../models/meeting_recording_response_data.py | 12 +- .../meeting_recording_transcript_segment.py | 7 +- .../meeting_recording_transcript_word.py | 5 +- rootly_sdk/models/meta.py | 6 +- rootly_sdk/models/mitigate_incident.py | 7 +- rootly_sdk/models/mitigate_incident_data.py | 9 +- .../mitigate_incident_data_attributes.py | 7 +- rootly_sdk/models/new_alert.py | 7 +- rootly_sdk/models/new_alert_data.py | 9 +- .../models/new_alert_data_attributes.py | 26 +- ...ert_field_values_attributes_item_type_0.py | 5 +- .../new_alert_data_attributes_data_type_0.py | 5 +- ...lert_data_attributes_labels_item_type_0.py | 7 +- ...ibutes_notification_targets_type_0_item.py | 11 +- rootly_sdk/models/new_alert_event.py | 7 +- rootly_sdk/models/new_alert_event_data.py | 9 +- .../models/new_alert_event_data_attributes.py | 13 +- rootly_sdk/models/new_alert_field.py | 7 +- rootly_sdk/models/new_alert_field_data.py | 9 +- .../models/new_alert_field_data_attributes.py | 6 +- rootly_sdk/models/new_alert_group.py | 7 +- rootly_sdk/models/new_alert_group_data.py | 9 +- .../models/new_alert_group_data_attributes.py | 21 +- ...t_group_data_attributes_attributes_item.py | 5 +- ...t_group_data_attributes_conditions_item.py | 18 +- ...lert_group_data_attributes_targets_item.py | 12 +- rootly_sdk/models/new_alert_route.py | 6 +- rootly_sdk/models/new_alert_route_data.py | 9 +- .../models/new_alert_route_data_attributes.py | 8 +- ..._alert_route_data_attributes_rules_item.py | 11 +- ...ibutes_rules_item_condition_groups_item.py | 8 +- ...m_condition_groups_item_conditions_item.py | 20 +- ...attributes_rules_item_destinations_item.py | 12 +- rootly_sdk/models/new_alert_routing_rule.py | 7 +- .../models/new_alert_routing_rule_data.py | 12 +- .../new_alert_routing_rule_data_attributes.py | 18 +- ...ng_rule_data_attributes_conditions_item.py | 14 +- ...outing_rule_data_attributes_destination.py | 12 +- rootly_sdk/models/new_alert_urgency.py | 7 +- rootly_sdk/models/new_alert_urgency_data.py | 9 +- .../new_alert_urgency_data_attributes.py | 7 +- rootly_sdk/models/new_alerts_source.py | 7 +- rootly_sdk/models/new_alerts_source_data.py | 9 +- .../new_alerts_source_data_attributes.py | 20 +- ...tes_alert_source_fields_attributes_item.py | 6 +- ...rt_source_urgency_rules_attributes_item.py | 18 +- ...ibutes_alert_template_attributes_type_0.py | 6 +- ...butes_resolution_rule_attributes_type_0.py | 20 +- ...butes_type_0_conditions_attributes_item.py | 18 +- ...attributes_sourceable_attributes_type_0.py | 8 +- ...s_type_0_field_mappings_attributes_item.py | 10 +- rootly_sdk/models/new_api_key.py | 7 +- rootly_sdk/models/new_api_key_data.py | 9 +- .../models/new_api_key_data_attributes.py | 17 +- rootly_sdk/models/new_authorization.py | 7 +- rootly_sdk/models/new_authorization_data.py | 9 +- .../new_authorization_data_attributes.py | 17 +- rootly_sdk/models/new_catalog.py | 7 +- .../models/new_catalog_checklist_template.py | 7 +- .../new_catalog_checklist_template_data.py | 12 +- ...alog_checklist_template_data_attributes.py | 20 +- ..._template_data_attributes_builtin_field.py | 10 +- ...t_template_data_attributes_custom_field.py | 10 +- ...late_data_attributes_owners_type_0_item.py | 10 +- rootly_sdk/models/new_catalog_data.py | 9 +- .../models/new_catalog_data_attributes.py | 13 +- rootly_sdk/models/new_catalog_entity.py | 7 +- rootly_sdk/models/new_catalog_entity_data.py | 9 +- .../new_catalog_entity_data_attributes.py | 9 +- ..._entity_data_attributes_properties_item.py | 5 +- .../models/new_catalog_entity_property.py | 7 +- .../new_catalog_entity_property_data.py | 12 +- ...catalog_entity_property_data_attributes.py | 9 +- rootly_sdk/models/new_catalog_field.py | 7 +- rootly_sdk/models/new_catalog_field_data.py | 9 +- .../new_catalog_field_data_attributes.py | 19 +- rootly_sdk/models/new_catalog_property.py | 7 +- .../models/new_catalog_property_data.py | 9 +- .../new_catalog_property_data_attributes.py | 15 +- rootly_sdk/models/new_cause.py | 7 +- rootly_sdk/models/new_cause_data.py | 9 +- .../models/new_cause_data_attributes.py | 7 +- ...w_cause_data_attributes_properties_item.py | 5 +- rootly_sdk/models/new_communications_group.py | 7 +- .../models/new_communications_group_data.py | 12 +- ...ew_communications_group_data_attributes.py | 16 +- ...tion_external_group_members_type_0_item.py | 5 +- ...munication_group_conditions_type_0_item.py | 10 +- rootly_sdk/models/new_communications_stage.py | 7 +- .../models/new_communications_stage_data.py | 12 +- ...ew_communications_stage_data_attributes.py | 7 +- .../models/new_communications_template.py | 7 +- .../new_communications_template_data.py | 12 +- ...communications_template_data_attributes.py | 9 +- ..._template_stages_attributes_type_0_item.py | 6 +- rootly_sdk/models/new_communications_type.py | 7 +- .../models/new_communications_type_data.py | 12 +- ...new_communications_type_data_attributes.py | 7 +- rootly_sdk/models/new_custom_field.py | 7 +- rootly_sdk/models/new_custom_field_data.py | 9 +- .../new_custom_field_data_attributes.py | 15 +- rootly_sdk/models/new_custom_field_option.py | 7 +- .../models/new_custom_field_option_data.py | 12 +- ...new_custom_field_option_data_attributes.py | 6 +- rootly_sdk/models/new_custom_form.py | 7 +- rootly_sdk/models/new_custom_form_data.py | 9 +- .../models/new_custom_form_data_attributes.py | 7 +- rootly_sdk/models/new_dashboard.py | 7 +- rootly_sdk/models/new_dashboard_data.py | 9 +- .../models/new_dashboard_data_attributes.py | 25 +- rootly_sdk/models/new_dashboard_panel.py | 7 +- rootly_sdk/models/new_dashboard_panel_data.py | 9 +- .../new_dashboard_panel_data_attributes.py | 7 +- ..._dashboard_panel_data_attributes_params.py | 16 +- ...panel_data_attributes_params_datalabels.py | 5 +- ...el_data_attributes_params_datasets_item.py | 12 +- ...s_params_datasets_item_aggregate_type_0.py | 10 +- ...ibutes_params_datasets_item_filter_item.py | 12 +- ...ms_datasets_item_filter_item_rules_item.py | 14 +- ...ms_datasets_item_group_by_type_1_type_0.py | 10 +- ...ard_panel_data_attributes_params_legend.py | 10 +- ...d_panel_data_attributes_position_type_0.py | 5 +- rootly_sdk/models/new_edge_connector.py | 7 +- .../models/new_edge_connector_action.py | 7 +- .../new_edge_connector_action_action.py | 12 +- ...w_edge_connector_action_action_metadata.py | 14 +- ..._action_metadata_parameters_type_0_item.py | 10 +- .../new_edge_connector_edge_connector.py | 12 +- rootly_sdk/models/new_environment.py | 7 +- rootly_sdk/models/new_environment_data.py | 9 +- .../models/new_environment_data_attributes.py | 13 +- ...ronment_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_escalation_policy.py | 7 +- .../models/new_escalation_policy_data.py | 9 +- .../new_escalation_policy_data_attributes.py | 6 +- ...y_data_attributes_business_hours_type_0.py | 14 +- .../models/new_escalation_policy_level.py | 7 +- .../new_escalation_policy_level_data.py | 12 +- ...escalation_policy_level_data_attributes.py | 14 +- ..._notification_target_params_item_type_0.py | 14 +- .../models/new_escalation_policy_path.py | 7 +- .../models/new_escalation_policy_path_data.py | 12 +- ..._escalation_policy_path_data_attributes.py | 46 +-- ..._path_data_attributes_rules_item_type_0.py | 10 +- ..._path_data_attributes_rules_item_type_1.py | 10 +- ..._path_data_attributes_rules_item_type_2.py | 14 +- ..._path_data_attributes_rules_item_type_3.py | 14 +- ..._path_data_attributes_rules_item_type_4.py | 10 +- ..._path_data_attributes_rules_item_type_5.py | 16 +- ...utes_rules_item_type_5_time_blocks_item.py | 6 +- ..._path_data_attributes_rules_item_type_6.py | 14 +- ..._path_data_attributes_rules_item_type_7.py | 14 +- ..._data_attributes_time_restrictions_item.py | 14 +- rootly_sdk/models/new_form_field.py | 7 +- rootly_sdk/models/new_form_field_data.py | 9 +- .../models/new_form_field_data_attributes.py | 25 +- rootly_sdk/models/new_form_field_option.py | 7 +- .../models/new_form_field_option_data.py | 9 +- .../new_form_field_option_data_attributes.py | 6 +- rootly_sdk/models/new_form_field_placement.py | 7 +- .../new_form_field_placement_condition.py | 7 +- ...new_form_field_placement_condition_data.py | 14 +- ...eld_placement_condition_data_attributes.py | 14 +- .../models/new_form_field_placement_data.py | 12 +- ...ew_form_field_placement_data_attributes.py | 14 +- rootly_sdk/models/new_form_field_position.py | 7 +- .../models/new_form_field_position_data.py | 12 +- ...new_form_field_position_data_attributes.py | 13 +- rootly_sdk/models/new_form_set.py | 7 +- rootly_sdk/models/new_form_set_condition.py | 7 +- .../models/new_form_set_condition_data.py | 12 +- .../new_form_set_condition_data_attributes.py | 8 +- rootly_sdk/models/new_form_set_data.py | 9 +- .../models/new_form_set_data_attributes.py | 8 +- rootly_sdk/models/new_functionality.py | 7 +- rootly_sdk/models/new_functionality_data.py | 9 +- .../new_functionality_data_attributes.py | 19 +- ...onality_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_heartbeat.py | 7 +- rootly_sdk/models/new_heartbeat_data.py | 9 +- .../models/new_heartbeat_data_attributes.py | 15 +- rootly_sdk/models/new_incident.py | 7 +- rootly_sdk/models/new_incident_action_item.py | 7 +- .../models/new_incident_action_item_data.py | 12 +- ...ew_incident_action_item_data_attributes.py | 19 +- ...butes_form_field_selections_type_0_item.py | 7 +- .../new_incident_custom_field_selection.py | 7 +- ...ew_incident_custom_field_selection_data.py | 14 +- ..._custom_field_selection_data_attributes.py | 7 +- rootly_sdk/models/new_incident_data.py | 9 +- .../models/new_incident_data_attributes.py | 18 +- ..._incident_data_attributes_labels_type_0.py | 5 +- rootly_sdk/models/new_incident_event.py | 7 +- rootly_sdk/models/new_incident_event_data.py | 9 +- .../new_incident_event_data_attributes.py | 13 +- .../new_incident_event_functionality.py | 7 +- .../new_incident_event_functionality_data.py | 14 +- ...ent_event_functionality_data_attributes.py | 11 +- .../models/new_incident_event_service.py | 7 +- .../models/new_incident_event_service_data.py | 12 +- ..._incident_event_service_data_attributes.py | 9 +- rootly_sdk/models/new_incident_feedback.py | 7 +- .../models/new_incident_feedback_data.py | 9 +- .../new_incident_feedback_data_attributes.py | 13 +- .../new_incident_form_field_selection.py | 7 +- .../new_incident_form_field_selection_data.py | 14 +- ...nt_form_field_selection_data_attributes.py | 7 +- .../models/new_incident_permission_set.py | 7 +- .../new_incident_permission_set_boolean.py | 7 +- ...ew_incident_permission_set_boolean_data.py | 14 +- ..._permission_set_boolean_data_attributes.py | 13 +- ...boolean_data_attributes_severity_params.py | 6 +- .../new_incident_permission_set_data.py | 12 +- ...incident_permission_set_data_attributes.py | 15 +- .../new_incident_permission_set_resource.py | 7 +- ...w_incident_permission_set_resource_data.py | 14 +- ...permission_set_resource_data_attributes.py | 13 +- ...esource_data_attributes_severity_params.py | 6 +- rootly_sdk/models/new_incident_role.py | 7 +- rootly_sdk/models/new_incident_role_data.py | 9 +- .../new_incident_role_data_attributes.py | 7 +- rootly_sdk/models/new_incident_role_task.py | 7 +- .../models/new_incident_role_task_data.py | 12 +- .../new_incident_role_task_data_attributes.py | 9 +- .../models/new_incident_status_page_event.py | 7 +- .../new_incident_status_page_event_data.py | 12 +- ...ident_status_page_event_data_attributes.py | 15 +- rootly_sdk/models/new_incident_sub_status.py | 7 +- .../models/new_incident_sub_status_data.py | 12 +- ...new_incident_sub_status_data_attributes.py | 7 +- rootly_sdk/models/new_incident_type.py | 7 +- rootly_sdk/models/new_incident_type_data.py | 9 +- .../new_incident_type_data_attributes.py | 15 +- ...nt_type_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_live_call_router.py | 7 +- .../models/new_live_call_router_data.py | 9 +- .../new_live_call_router_data_attributes.py | 26 +- ...ibutes_escalation_policy_trigger_params.py | 10 +- ...ter_data_attributes_paging_targets_item.py | 10 +- rootly_sdk/models/new_on_call_pay_report.py | 7 +- .../models/new_on_call_pay_report_data.py | 9 +- .../new_on_call_pay_report_data_attributes.py | 11 +- rootly_sdk/models/new_on_call_role.py | 7 +- rootly_sdk/models/new_on_call_role_data.py | 9 +- .../new_on_call_role_data_attributes.py | 103 ++---- rootly_sdk/models/new_on_call_shadow.py | 7 +- rootly_sdk/models/new_on_call_shadow_data.py | 9 +- .../new_on_call_shadow_data_attributes.py | 13 +- rootly_sdk/models/new_override_shift.py | 7 +- rootly_sdk/models/new_override_shift_data.py | 9 +- .../new_override_shift_data_attributes.py | 10 +- rootly_sdk/models/new_playbook.py | 7 +- rootly_sdk/models/new_playbook_data.py | 9 +- .../models/new_playbook_data_attributes.py | 7 +- rootly_sdk/models/new_playbook_task.py | 7 +- rootly_sdk/models/new_playbook_task_data.py | 9 +- .../new_playbook_task_data_attributes.py | 7 +- rootly_sdk/models/new_post_mortem_template.py | 7 +- .../models/new_post_mortem_template_data.py | 12 +- ...ew_post_mortem_template_data_attributes.py | 9 +- rootly_sdk/models/new_pulse.py | 7 +- rootly_sdk/models/new_pulse_data.py | 9 +- .../models/new_pulse_data_attributes.py | 12 +- .../new_pulse_data_attributes_data_type_0.py | 5 +- ...ulse_data_attributes_labels_item_type_0.py | 5 +- ..._pulse_data_attributes_refs_item_type_0.py | 5 +- .../models/new_retrospective_process.py | 7 +- .../models/new_retrospective_process_data.py | 12 +- ...w_retrospective_process_data_attributes.py | 9 +- ...ective_process_matching_criteria_type_0.py | 8 +- ...ective_process_matching_criteria_type_1.py | 8 +- ...ective_process_matching_criteria_type_2.py | 8 +- .../models/new_retrospective_process_group.py | 7 +- .../new_retrospective_process_group_data.py | 12 +- ...ospective_process_group_data_attributes.py | 6 +- .../new_retrospective_process_group_step.py | 7 +- ...w_retrospective_process_group_step_data.py | 14 +- ...tive_process_group_step_data_attributes.py | 6 +- rootly_sdk/models/new_retrospective_step.py | 7 +- .../models/new_retrospective_step_data.py | 12 +- .../new_retrospective_step_data_attributes.py | 7 +- rootly_sdk/models/new_role.py | 7 +- rootly_sdk/models/new_role_data.py | 9 +- rootly_sdk/models/new_role_data_attributes.py | 107 +++---- rootly_sdk/models/new_schedule.py | 7 +- rootly_sdk/models/new_schedule_data.py | 9 +- .../models/new_schedule_data_attributes.py | 9 +- ...le_data_attributes_slack_channel_type_0.py | 5 +- ...hedule_data_attributes_slack_user_group.py | 5 +- rootly_sdk/models/new_schedule_rotation.py | 7 +- .../new_schedule_rotation_active_day.py | 7 +- .../new_schedule_rotation_active_day_data.py | 12 +- ...ule_rotation_active_day_data_attributes.py | 13 +- ..._attributes_active_time_attributes_item.py | 5 +- .../models/new_schedule_rotation_data.py | 9 +- .../new_schedule_rotation_data_attributes.py | 27 +- ..._attributes_active_time_attributes_item.py | 5 +- ...s_schedule_rotation_members_type_0_item.py | 10 +- ...schedule_rotationable_attributes_type_0.py | 6 +- ...schedule_rotationable_attributes_type_1.py | 11 +- ...schedule_rotationable_attributes_type_2.py | 11 +- ...schedule_rotationable_attributes_type_3.py | 11 +- .../models/new_schedule_rotation_user.py | 6 +- .../models/new_schedule_rotation_user_data.py | 12 +- ..._schedule_rotation_user_data_attributes.py | 6 +- rootly_sdk/models/new_secret.py | 7 +- rootly_sdk/models/new_secret_data.py | 9 +- .../models/new_secret_data_attributes.py | 10 +- rootly_sdk/models/new_service.py | 7 +- rootly_sdk/models/new_service_data.py | 9 +- .../models/new_service_data_attributes.py | 19 +- ...tributes_alert_broadcast_channel_type_0.py | 5 +- ...butes_incident_broadcast_channel_type_0.py | 5 +- ...service_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_severity.py | 7 +- rootly_sdk/models/new_severity_data.py | 9 +- .../models/new_severity_data_attributes.py | 18 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../models/new_shift_coverage_request.py | 7 +- .../models/new_shift_coverage_request_data.py | 12 +- ..._shift_coverage_request_data_attributes.py | 11 +- rootly_sdk/models/new_sla.py | 7 +- rootly_sdk/models/new_sla_data.py | 9 +- rootly_sdk/models/new_sla_data_attributes.py | 28 +- ...new_sla_data_attributes_conditions_item.py | 14 +- ...ibutes_notification_configurations_item.py | 10 +- rootly_sdk/models/new_status_page.py | 7 +- rootly_sdk/models/new_status_page_data.py | 9 +- .../models/new_status_page_data_attributes.py | 21 +- rootly_sdk/models/new_status_page_template.py | 7 +- .../models/new_status_page_template_data.py | 12 +- ...ew_status_page_template_data_attributes.py | 15 +- rootly_sdk/models/new_sub_status.py | 7 +- rootly_sdk/models/new_sub_status_data.py | 9 +- .../models/new_sub_status_data_attributes.py | 13 +- rootly_sdk/models/new_team.py | 7 +- rootly_sdk/models/new_team_data.py | 9 +- rootly_sdk/models/new_team_data_attributes.py | 15 +- ...tributes_alert_broadcast_channel_type_0.py | 5 +- ...butes_incident_broadcast_channel_type_0.py | 5 +- ...ew_team_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/new_user_email_address.py | 7 +- .../models/new_user_email_address_data.py | 12 +- .../new_user_email_address_data_attributes.py | 6 +- .../models/new_user_notification_rule.py | 7 +- .../models/new_user_notification_rule_data.py | 12 +- ..._user_notification_rule_data_attributes.py | 11 +- rootly_sdk/models/new_user_phone_number.py | 7 +- .../models/new_user_phone_number_data.py | 9 +- .../new_user_phone_number_data_attributes.py | 6 +- rootly_sdk/models/new_webhooks_endpoint.py | 7 +- .../models/new_webhooks_endpoint_data.py | 9 +- .../new_webhooks_endpoint_data_attributes.py | 13 +- ...int_data_attributes_custom_headers_item.py | 6 +- rootly_sdk/models/new_workflow.py | 7 +- ...rkflow_action_item_form_field_condition.py | 9 +- ...w_action_item_form_field_condition_data.py | 12 +- ...em_form_field_condition_data_attributes.py | 11 +- .../new_workflow_custom_field_selection.py | 7 +- ...ew_workflow_custom_field_selection_data.py | 14 +- ..._custom_field_selection_data_attributes.py | 11 +- rootly_sdk/models/new_workflow_data.py | 9 +- .../models/new_workflow_data_attributes.py | 23 +- .../new_workflow_form_field_condition.py | 7 +- .../new_workflow_form_field_condition_data.py | 14 +- ...ow_form_field_condition_data_attributes.py | 11 +- rootly_sdk/models/new_workflow_group.py | 7 +- rootly_sdk/models/new_workflow_group_data.py | 9 +- .../new_workflow_group_data_attributes.py | 12 +- rootly_sdk/models/new_workflow_run.py | 7 +- rootly_sdk/models/new_workflow_run_data.py | 15 +- ...new_workflow_run_data_attributes_type_0.py | 6 +- ...flow_run_data_attributes_type_0_context.py | 5 +- ...new_workflow_run_data_attributes_type_1.py | 6 +- ...flow_run_data_attributes_type_1_context.py | 5 +- ...new_workflow_run_data_attributes_type_2.py | 6 +- ...flow_run_data_attributes_type_2_context.py | 5 +- ...new_workflow_run_data_attributes_type_3.py | 6 +- ...flow_run_data_attributes_type_3_context.py | 5 +- ...new_workflow_run_data_attributes_type_4.py | 6 +- ...flow_run_data_attributes_type_4_context.py | 5 +- ...new_workflow_run_data_attributes_type_5.py | 6 +- ...flow_run_data_attributes_type_5_context.py | 5 +- rootly_sdk/models/new_workflow_task.py | 7 +- rootly_sdk/models/new_workflow_task_data.py | 9 +- .../new_workflow_task_data_attributes.py | 293 +++++++++--------- rootly_sdk/models/on_call_pay_report.py | 16 +- rootly_sdk/models/on_call_pay_report_list.py | 9 +- .../on_call_pay_report_list_data_item.py | 12 +- .../models/on_call_pay_report_response.py | 7 +- .../on_call_pay_report_response_data.py | 12 +- rootly_sdk/models/on_call_role.py | 130 +++++--- rootly_sdk/models/on_call_role_list.py | 9 +- .../models/on_call_role_list_data_item.py | 9 +- .../models/on_call_role_relationship.py | 5 +- .../on_call_role_relationship_data_type_0.py | 12 +- rootly_sdk/models/on_call_role_response.py | 7 +- .../models/on_call_role_response_data.py | 9 +- rootly_sdk/models/on_call_shadow.py | 13 +- rootly_sdk/models/on_call_shadow_response.py | 7 +- .../models/on_call_shadow_response_data.py | 12 +- rootly_sdk/models/on_call_shadows_list.py | 9 +- .../models/on_call_shadows_list_data_item.py | 12 +- rootly_sdk/models/oncall.py | 13 +- rootly_sdk/models/oncall_list.py | 7 +- rootly_sdk/models/oncall_list_data_item.py | 10 +- rootly_sdk/models/oncall_relationships.py | 8 +- .../oncall_relationships_escalation_policy.py | 5 +- ...tionships_escalation_policy_data_type_0.py | 10 +- .../models/oncall_relationships_schedule.py | 5 +- ...call_relationships_schedule_data_type_0.py | 12 +- .../models/oncall_relationships_user.py | 5 +- .../oncall_relationships_user_data_type_0.py | 12 +- rootly_sdk/models/override_shift.py | 7 +- rootly_sdk/models/override_shift_list.py | 9 +- .../models/override_shift_list_data_item.py | 12 +- rootly_sdk/models/override_shift_response.py | 7 +- .../models/override_shift_response_data.py | 12 +- ...e_jsmops_on_call_responders_task_params.py | 15 +- ..._call_responders_task_params_teams_item.py | 5 +- ..._call_responders_task_params_users_item.py | 5 +- ...opsgenie_on_call_responders_task_params.py | 19 +- ..._call_responders_task_params_teams_item.py | 5 +- ..._call_responders_task_params_users_item.py | 5 +- ...agerduty_on_call_responders_task_params.py | 22 +- ...rs_task_params_escalation_policies_item.py | 5 +- ..._on_call_responders_task_params_service.py | 5 +- ..._call_responders_task_params_users_item.py | 5 +- ...e_rootly_on_call_responders_task_params.py | 22 +- ...rs_task_params_escalation_policy_target.py | 5 +- ...onders_task_params_functionality_target.py | 5 +- ...all_responders_task_params_group_target.py | 5 +- ...l_responders_task_params_service_target.py | 5 +- ...call_responders_task_params_user_target.py | 5 +- ...esponders_task_params_type_0_users_item.py | 5 +- ..._params_type_1_escalation_policies_item.py | 5 +- rootly_sdk/models/patch_alert_route.py | 7 +- rootly_sdk/models/patch_alert_route_data.py | 9 +- .../patch_alert_route_data_attributes.py | 9 +- ..._alert_route_data_attributes_rules_item.py | 13 +- ...ibutes_rules_item_condition_groups_item.py | 10 +- ...m_condition_groups_item_conditions_item.py | 20 +- ...attributes_rules_item_destinations_item.py | 12 +- .../models/phone_verification_response.py | 5 +- rootly_sdk/models/playbook.py | 6 +- rootly_sdk/models/playbook_list.py | 9 +- rootly_sdk/models/playbook_list_data_item.py | 9 +- rootly_sdk/models/playbook_response.py | 7 +- rootly_sdk/models/playbook_response_data.py | 9 +- rootly_sdk/models/playbook_task.py | 6 +- rootly_sdk/models/playbook_task_list.py | 9 +- .../models/playbook_task_list_data_item.py | 12 +- rootly_sdk/models/playbook_task_response.py | 7 +- .../models/playbook_task_response_data.py | 12 +- rootly_sdk/models/post_mortem_template.py | 8 +- ...ost_mortem_template_content_json_type_0.py | 5 +- .../models/post_mortem_template_list.py | 9 +- .../post_mortem_template_list_data_item.py | 12 +- .../models/post_mortem_template_response.py | 7 +- .../post_mortem_template_response_data.py | 12 +- .../models/post_mortem_trigger_params.py | 108 +++---- rootly_sdk/models/print_task_params.py | 9 +- .../models/publish_incident_task_params.py | 21 +- .../publish_incident_task_params_incident.py | 5 +- ...cident_task_params_status_page_template.py | 5 +- rootly_sdk/models/pulse.py | 9 +- rootly_sdk/models/pulse_data_type_0.py | 5 +- rootly_sdk/models/pulse_labels_item_type_0.py | 5 +- rootly_sdk/models/pulse_list.py | 9 +- rootly_sdk/models/pulse_list_data_item.py | 9 +- rootly_sdk/models/pulse_refs_item_type_0.py | 5 +- rootly_sdk/models/pulse_response.py | 7 +- rootly_sdk/models/pulse_response_data.py | 9 +- rootly_sdk/models/pulse_trigger_params.py | 42 ++- rootly_sdk/models/receipt.py | 12 +- rootly_sdk/models/redis_client_task_params.py | 14 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ove_google_docs_permissions_task_params.py | 12 +- rootly_sdk/models/remove_subscribers.py | 7 +- rootly_sdk/models/remove_subscribers_data.py | 9 +- .../remove_subscribers_data_attributes.py | 7 +- .../rename_google_chat_space_task_params.py | 12 +- ...ame_google_chat_space_task_params_space.py | 5 +- ...ame_microsoft_teams_channel_task_params.py | 11 +- ...osoft_teams_channel_task_params_channel.py | 5 +- ...icrosoft_teams_channel_task_params_team.py | 5 +- .../rename_slack_channel_task_params.py | 12 +- ...ename_slack_channel_task_params_channel.py | 5 +- rootly_sdk/models/resolve_alert.py | 6 +- rootly_sdk/models/resolve_alert_data.py | 9 +- .../models/resolve_alert_data_attributes.py | 7 +- rootly_sdk/models/resolve_incident.py | 7 +- rootly_sdk/models/resolve_incident_data.py | 9 +- .../resolve_incident_data_attributes.py | 7 +- rootly_sdk/models/restart_incident.py | 7 +- rootly_sdk/models/restart_incident_data.py | 9 +- .../restart_incident_data_attributes.py | 6 +- .../models/retrospective_configuration.py | 12 +- .../retrospective_configuration_list.py | 7 +- ...rospective_configuration_list_data_item.py | 8 +- .../retrospective_configuration_response.py | 7 +- ...trospective_configuration_response_data.py | 12 +- rootly_sdk/models/retrospective_process.py | 12 +- .../models/retrospective_process_group.py | 5 +- .../retrospective_process_group_list.py | 9 +- ...rospective_process_group_list_data_item.py | 8 +- .../retrospective_process_group_response.py | 7 +- ...trospective_process_group_response_data.py | 12 +- .../retrospective_process_group_step.py | 5 +- .../retrospective_process_group_step_list.py | 9 +- ...ctive_process_group_step_list_data_item.py | 8 +- ...trospective_process_group_step_response.py | 7 +- ...ective_process_group_step_response_data.py | 8 +- .../models/retrospective_process_list.py | 9 +- .../retrospective_process_list_data_item.py | 12 +- .../models/retrospective_process_response.py | 7 +- .../retrospective_process_response_data.py | 12 +- ...ective_process_matching_criteria_type_0.py | 8 +- ...ective_process_matching_criteria_type_1.py | 8 +- ...ective_process_matching_criteria_type_2.py | 8 +- rootly_sdk/models/retrospective_step.py | 6 +- rootly_sdk/models/retrospective_step_list.py | 9 +- .../retrospective_step_list_data_item.py | 12 +- .../models/retrospective_step_response.py | 7 +- .../retrospective_step_response_data.py | 12 +- rootly_sdk/models/role.py | 156 +++++----- rootly_sdk/models/role_list.py | 9 +- rootly_sdk/models/role_list_data_item.py | 9 +- rootly_sdk/models/role_relationship.py | 5 +- .../models/role_relationship_data_type_0.py | 12 +- rootly_sdk/models/role_response.py | 7 +- rootly_sdk/models/role_response_data.py | 9 +- rootly_sdk/models/rotate_api_key.py | 7 +- rootly_sdk/models/rotate_api_key_data.py | 9 +- .../models/rotate_api_key_data_attributes.py | 11 +- .../models/run_command_heroku_task_params.py | 20 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/schedule.py | 13 +- rootly_sdk/models/schedule_list.py | 9 +- rootly_sdk/models/schedule_list_data_item.py | 9 +- rootly_sdk/models/schedule_response.py | 7 +- rootly_sdk/models/schedule_response_data.py | 9 +- rootly_sdk/models/schedule_rotation.py | 31 +- .../models/schedule_rotation_active_day.py | 14 +- ..._active_day_active_time_attributes_item.py | 5 +- .../schedule_rotation_active_day_list.py | 9 +- ...dule_rotation_active_day_list_data_item.py | 8 +- .../schedule_rotation_active_day_response.py | 7 +- ...edule_rotation_active_day_response_data.py | 8 +- ...le_rotation_active_time_attributes_item.py | 5 +- rootly_sdk/models/schedule_rotation_list.py | 9 +- .../schedule_rotation_list_data_item.py | 12 +- .../models/schedule_rotation_response.py | 7 +- .../models/schedule_rotation_response_data.py | 12 +- ...schedule_rotationable_attributes_type_0.py | 6 +- ...schedule_rotationable_attributes_type_1.py | 11 +- ...schedule_rotationable_attributes_type_2.py | 11 +- ...schedule_rotationable_attributes_type_3.py | 11 +- rootly_sdk/models/schedule_rotation_user.py | 5 +- .../models/schedule_rotation_user_list.py | 9 +- .../schedule_rotation_user_list_data_item.py | 12 +- .../models/schedule_rotation_user_response.py | 7 +- .../schedule_rotation_user_response_data.py | 12 +- .../models/schedule_slack_channel_type_0.py | 5 +- .../schedule_slack_user_group_type_0.py | 5 +- rootly_sdk/models/secret.py | 6 +- rootly_sdk/models/secret_list.py | 8 +- rootly_sdk/models/secret_list_data_item.py | 9 +- rootly_sdk/models/secret_response.py | 7 +- rootly_sdk/models/secret_response_data.py | 9 +- .../send_dashboard_report_task_params.py | 12 +- rootly_sdk/models/send_email_task_params.py | 12 +- ...end_google_chat_attachments_task_params.py | 10 +- ...hat_attachments_task_params_spaces_item.py | 5 +- .../send_google_chat_message_task_params.py | 12 +- ...le_chat_message_task_params_spaces_item.py | 5 +- ...blocks_task_params_type_0_channels_item.py | 5 +- ...icrosoft_teams_chat_message_task_params.py | 12 +- ...ams_chat_message_task_params_chats_item.py | 5 +- ...essage_task_params_type_0_channels_item.py | 5 +- ...blocks_task_params_type_0_channels_item.py | 5 +- ...cks_task_params_type_1_slack_users_item.py | 5 +- ...sk_params_type_2_slack_user_groups_item.py | 5 +- ...essage_task_params_type_0_channels_item.py | 5 +- ...age_task_params_type_1_slack_users_item.py | 5 +- ...sk_params_type_2_slack_user_groups_item.py | 5 +- rootly_sdk/models/send_sms_task_params.py | 9 +- .../send_whatsapp_message_task_params.py | 12 +- rootly_sdk/models/service.py | 11 +- .../service_alert_broadcast_channel_type_0.py | 5 +- ...rvice_incident_broadcast_channel_type_0.py | 5 +- rootly_sdk/models/service_list.py | 9 +- rootly_sdk/models/service_list_data_item.py | 9 +- .../models/service_properties_type_0_item.py | 5 +- rootly_sdk/models/service_response.py | 7 +- rootly_sdk/models/service_response_data.py | 9 +- .../service_slack_aliases_type_0_item.py | 5 +- .../service_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/severity.py | 10 +- rootly_sdk/models/severity_list.py | 9 +- rootly_sdk/models/severity_list_data_item.py | 9 +- rootly_sdk/models/severity_response.py | 7 +- rootly_sdk/models/severity_response_data.py | 9 +- .../severity_slack_aliases_type_0_item.py | 5 +- .../severity_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/shift.py | 6 +- rootly_sdk/models/shift_coverage_request.py | 8 +- .../models/shift_coverage_request_list.py | 9 +- .../shift_coverage_request_list_data_item.py | 12 +- .../models/shift_coverage_request_response.py | 7 +- .../shift_coverage_request_response_data.py | 12 +- rootly_sdk/models/shift_list.py | 8 +- rootly_sdk/models/shift_list_data_item.py | 10 +- rootly_sdk/models/shift_override.py | 5 +- rootly_sdk/models/shift_override_response.py | 7 +- .../models/shift_override_response_data.py | 12 +- rootly_sdk/models/shift_relationships.py | 8 +- .../models/shift_relationships_assignee.py | 5 +- ...hift_relationships_assignee_data_type_0.py | 5 +- .../shift_relationships_shift_override.py | 5 +- ...elationships_shift_override_data_type_0.py | 8 +- rootly_sdk/models/shift_relationships_user.py | 5 +- .../shift_relationships_user_data_type_0.py | 12 +- rootly_sdk/models/simple_trigger_params.py | 18 +- rootly_sdk/models/sla.py | 15 +- rootly_sdk/models/sla_conditions_item.py | 14 +- rootly_sdk/models/sla_list.py | 9 +- rootly_sdk/models/sla_list_data_item.py | 9 +- .../sla_notification_configurations_item.py | 10 +- rootly_sdk/models/sla_response.py | 7 +- rootly_sdk/models/sla_response_data.py | 9 +- rootly_sdk/models/slack_channel.py | 5 +- .../snapshot_datadog_graph_task_params.py | 17 +- ...tadog_graph_task_params_dashboards_item.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../snapshot_grafana_dashboard_task_params.py | 13 +- ...a_dashboard_task_params_dashboards_item.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../snapshot_looker_look_task_params.py | 15 +- ...looker_look_task_params_dashboards_item.py | 5 +- ...task_params_post_to_slack_channels_item.py | 5 +- .../snapshot_new_relic_graph_task_params.py | 16 +- ...task_params_post_to_slack_channels_item.py | 5 +- rootly_sdk/models/snooze_alert.py | 7 +- rootly_sdk/models/snooze_alert_data.py | 9 +- .../models/snooze_alert_data_attributes.py | 6 +- rootly_sdk/models/start_session_request.py | 9 +- rootly_sdk/models/start_session_response.py | 6 +- .../models/start_session_response_data.py | 8 +- rootly_sdk/models/status.py | 6 +- rootly_sdk/models/status_list.py | 9 +- rootly_sdk/models/status_list_data_item.py | 9 +- rootly_sdk/models/status_page.py | 29 +- .../status_page_cname_records_type_0.py | 5 +- rootly_sdk/models/status_page_list.py | 9 +- .../models/status_page_list_data_item.py | 9 +- rootly_sdk/models/status_page_response.py | 7 +- .../models/status_page_response_data.py | 9 +- rootly_sdk/models/status_page_template.py | 9 +- .../models/status_page_template_list.py | 9 +- .../status_page_template_list_data_item.py | 12 +- .../models/status_page_template_response.py | 7 +- .../status_page_template_response_data.py | 12 +- rootly_sdk/models/status_response.py | 7 +- rootly_sdk/models/status_response_data.py | 9 +- rootly_sdk/models/sub_status.py | 9 +- rootly_sdk/models/sub_status_list.py | 9 +- .../models/sub_status_list_data_item.py | 9 +- rootly_sdk/models/sub_status_response.py | 7 +- rootly_sdk/models/sub_status_response_data.py | 9 +- rootly_sdk/models/team.py | 14 +- .../team_alert_broadcast_channel_type_0.py | 5 +- .../team_incident_broadcast_channel_type_0.py | 5 +- rootly_sdk/models/team_list.py | 9 +- rootly_sdk/models/team_list_data_item.py | 9 +- .../models/team_properties_type_0_item.py | 5 +- rootly_sdk/models/team_response.py | 7 +- rootly_sdk/models/team_response_data.py | 9 +- .../models/team_slack_aliases_type_0_item.py | 5 +- .../models/team_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/tiptap_block_schema.py | 7 +- .../tiptap_block_schema_followup_component.py | 8 +- .../tiptap_block_schema_timeline_component.py | 5 +- .../models/trigger_workflow_task_params.py | 21 +- .../trigger_workflow_task_params_resource.py | 5 +- .../trigger_workflow_task_params_workflow.py | 5 +- .../tweet_twitter_message_task_params.py | 12 +- rootly_sdk/models/unassign_role_from_user.py | 7 +- .../models/unassign_role_from_user_data.py | 12 +- ...unassign_role_from_user_data_attributes.py | 6 +- .../models/update_action_item_task_params.py | 26 +- ...ction_item_task_params_assigned_to_user.py | 5 +- ...pdate_airtable_table_record_task_params.py | 8 +- rootly_sdk/models/update_alert.py | 7 +- rootly_sdk/models/update_alert_data.py | 9 +- .../models/update_alert_data_attributes.py | 18 +- ...ert_field_values_attributes_item_type_0.py | 5 +- ...pdate_alert_data_attributes_data_type_0.py | 5 +- ...lert_data_attributes_labels_item_type_0.py | 7 +- rootly_sdk/models/update_alert_event.py | 7 +- rootly_sdk/models/update_alert_event_data.py | 9 +- .../update_alert_event_data_attributes.py | 6 +- rootly_sdk/models/update_alert_field.py | 7 +- rootly_sdk/models/update_alert_field_data.py | 9 +- .../update_alert_field_data_attributes.py | 6 +- rootly_sdk/models/update_alert_group.py | 7 +- rootly_sdk/models/update_alert_group_data.py | 9 +- .../update_alert_group_data_attributes.py | 23 +- ...t_group_data_attributes_attributes_item.py | 5 +- ...t_group_data_attributes_conditions_item.py | 18 +- ...lert_group_data_attributes_targets_item.py | 12 +- rootly_sdk/models/update_alert_route.py | 7 +- rootly_sdk/models/update_alert_route_data.py | 9 +- .../update_alert_route_data_attributes.py | 9 +- ..._alert_route_data_attributes_rules_item.py | 11 +- ...ibutes_rules_item_condition_groups_item.py | 8 +- ...m_condition_groups_item_conditions_item.py | 20 +- ...attributes_rules_item_destinations_item.py | 12 +- .../models/update_alert_routing_rule.py | 7 +- .../models/update_alert_routing_rule_data.py | 12 +- ...date_alert_routing_rule_data_attributes.py | 18 +- ...ng_rule_data_attributes_conditions_item.py | 16 +- ...outing_rule_data_attributes_destination.py | 12 +- rootly_sdk/models/update_alert_urgency.py | 7 +- .../models/update_alert_urgency_data.py | 9 +- .../update_alert_urgency_data_attributes.py | 7 +- rootly_sdk/models/update_alerts_source.py | 7 +- .../models/update_alerts_source_data.py | 9 +- .../update_alerts_source_data_attributes.py | 24 +- ...tes_alert_source_fields_attributes_item.py | 6 +- ...rt_source_urgency_rules_attributes_item.py | 18 +- ...ibutes_alert_template_attributes_type_0.py | 6 +- ...butes_resolution_rule_attributes_type_0.py | 20 +- ...butes_type_0_conditions_attributes_item.py | 18 +- ...attributes_sourceable_attributes_type_0.py | 8 +- ...s_type_0_field_mappings_attributes_item.py | 10 +- rootly_sdk/models/update_api_key.py | 7 +- rootly_sdk/models/update_api_key_data.py | 9 +- .../models/update_api_key_data_attributes.py | 11 +- .../models/update_asana_task_task_params.py | 14 +- ...pdate_asana_task_task_params_completion.py | 5 +- .../update_attached_alerts_task_params.py | 18 +- rootly_sdk/models/update_authorization.py | 7 +- .../models/update_authorization_data.py | 9 +- .../update_authorization_data_attributes.py | 11 +- rootly_sdk/models/update_catalog.py | 7 +- .../update_catalog_checklist_template.py | 7 +- .../update_catalog_checklist_template_data.py | 14 +- ...alog_checklist_template_data_attributes.py | 12 +- ..._template_data_attributes_builtin_field.py | 10 +- ...t_template_data_attributes_custom_field.py | 10 +- ...late_data_attributes_owners_type_0_item.py | 10 +- rootly_sdk/models/update_catalog_data.py | 9 +- .../models/update_catalog_data_attributes.py | 13 +- rootly_sdk/models/update_catalog_entity.py | 7 +- .../models/update_catalog_entity_data.py | 9 +- .../update_catalog_entity_data_attributes.py | 9 +- ..._entity_data_attributes_properties_item.py | 5 +- .../models/update_catalog_entity_property.py | 7 +- .../update_catalog_entity_property_data.py | 12 +- ...catalog_entity_property_data_attributes.py | 9 +- rootly_sdk/models/update_catalog_field.py | 7 +- .../models/update_catalog_field_data.py | 9 +- .../update_catalog_field_data_attributes.py | 15 +- rootly_sdk/models/update_catalog_property.py | 7 +- .../models/update_catalog_property_data.py | 12 +- ...update_catalog_property_data_attributes.py | 15 +- rootly_sdk/models/update_cause.py | 7 +- rootly_sdk/models/update_cause_data.py | 9 +- .../models/update_cause_data_attributes.py | 7 +- ...e_cause_data_attributes_properties_item.py | 5 +- .../models/update_clickup_task_task_params.py | 12 +- ...pdate_clickup_task_task_params_priority.py | 5 +- .../models/update_coda_page_task_params.py | 12 +- .../update_coda_page_task_params_template.py | 5 +- .../models/update_communications_group.py | 7 +- .../update_communications_group_data.py | 12 +- ...te_communications_group_data_attributes.py | 16 +- ...tion_external_group_members_type_0_item.py | 6 +- ...munication_group_conditions_type_0_item.py | 10 +- .../models/update_communications_stage.py | 7 +- .../update_communications_stage_data.py | 12 +- ...te_communications_stage_data_attributes.py | 7 +- .../models/update_communications_template.py | 7 +- .../update_communications_template_data.py | 12 +- ...communications_template_data_attributes.py | 9 +- ..._template_stages_attributes_type_0_item.py | 6 +- .../models/update_communications_type.py | 7 +- .../models/update_communications_type_data.py | 12 +- ...ate_communications_type_data_attributes.py | 7 +- .../update_confluence_page_task_params.py | 13 +- ...confluence_page_task_params_integration.py | 5 +- ...te_confluence_page_task_params_template.py | 5 +- rootly_sdk/models/update_custom_field.py | 7 +- rootly_sdk/models/update_custom_field_data.py | 9 +- .../update_custom_field_data_attributes.py | 15 +- .../models/update_custom_field_option.py | 7 +- .../models/update_custom_field_option_data.py | 12 +- ...ate_custom_field_option_data_attributes.py | 6 +- rootly_sdk/models/update_custom_form.py | 7 +- rootly_sdk/models/update_custom_form_data.py | 9 +- .../update_custom_form_data_attributes.py | 7 +- rootly_sdk/models/update_dashboard.py | 7 +- rootly_sdk/models/update_dashboard_data.py | 9 +- .../update_dashboard_data_attributes.py | 25 +- rootly_sdk/models/update_dashboard_panel.py | 7 +- .../models/update_dashboard_panel_data.py | 12 +- .../update_dashboard_panel_data_attributes.py | 7 +- ..._dashboard_panel_data_attributes_params.py | 18 +- ...panel_data_attributes_params_datalabels.py | 5 +- ...el_data_attributes_params_datasets_item.py | 16 +- ...s_params_datasets_item_aggregate_type_0.py | 10 +- ...ibutes_params_datasets_item_filter_item.py | 12 +- ...ms_datasets_item_filter_item_rules_item.py | 14 +- ...ms_datasets_item_group_by_type_1_type_0.py | 10 +- ...ard_panel_data_attributes_params_legend.py | 10 +- ...d_panel_data_attributes_position_type_0.py | 5 +- .../update_datadog_notebook_task_params.py | 18 +- ...e_datadog_notebook_task_params_template.py | 5 +- .../update_dropbox_paper_page_task_params.py | 8 +- rootly_sdk/models/update_edge_connector.py | 7 +- .../models/update_edge_connector_action.py | 7 +- .../update_edge_connector_action_action.py | 8 +- ...e_edge_connector_action_action_metadata.py | 5 +- .../update_edge_connector_action_body.py | 6 +- ...pdate_edge_connector_action_body_action.py | 10 +- ...e_connector_action_body_action_metadata.py | 5 +- .../models/update_edge_connector_body.py | 6 +- .../models/update_edge_connector_body_data.py | 12 +- ...ate_edge_connector_body_data_attributes.py | 10 +- ..._connector_body_data_attributes_filters.py | 5 +- .../update_edge_connector_edge_connector.py | 12 +- rootly_sdk/models/update_environment.py | 7 +- rootly_sdk/models/update_environment_data.py | 9 +- .../update_environment_data_attributes.py | 15 +- ...ronment_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- rootly_sdk/models/update_escalation_policy.py | 7 +- .../models/update_escalation_policy_data.py | 12 +- ...pdate_escalation_policy_data_attributes.py | 6 +- ...y_data_attributes_business_hours_type_0.py | 14 +- .../models/update_escalation_policy_level.py | 7 +- .../update_escalation_policy_level_data.py | 12 +- ...escalation_policy_level_data_attributes.py | 14 +- ..._notification_target_params_item_type_0.py | 14 +- .../models/update_escalation_policy_path.py | 7 +- .../update_escalation_policy_path_data.py | 12 +- ..._escalation_policy_path_data_attributes.py | 104 +++---- ..._path_data_attributes_rules_item_type_0.py | 10 +- ..._path_data_attributes_rules_item_type_1.py | 10 +- ..._path_data_attributes_rules_item_type_2.py | 14 +- ..._path_data_attributes_rules_item_type_3.py | 14 +- ..._path_data_attributes_rules_item_type_4.py | 10 +- ..._path_data_attributes_rules_item_type_5.py | 16 +- ...utes_rules_item_type_5_time_blocks_item.py | 6 +- ..._path_data_attributes_rules_item_type_6.py | 14 +- ..._path_data_attributes_rules_item_type_7.py | 14 +- ...ata_attributes_rules_item_type_8_type_0.py | 10 +- ...ata_attributes_rules_item_type_8_type_1.py | 10 +- ...ata_attributes_rules_item_type_8_type_2.py | 14 +- ...ata_attributes_rules_item_type_8_type_3.py | 14 +- ...ata_attributes_rules_item_type_8_type_4.py | 10 +- ...ata_attributes_rules_item_type_8_type_5.py | 16 +- ...les_item_type_8_type_5_time_blocks_item.py | 6 +- ...ata_attributes_rules_item_type_8_type_6.py | 14 +- ...ata_attributes_rules_item_type_8_type_7.py | 14 +- ...ata_attributes_rules_item_type_9_type_0.py | 10 +- ...ata_attributes_rules_item_type_9_type_1.py | 10 +- ...ata_attributes_rules_item_type_9_type_2.py | 14 +- ...ata_attributes_rules_item_type_9_type_3.py | 14 +- ...ata_attributes_rules_item_type_9_type_4.py | 10 +- ...ata_attributes_rules_item_type_9_type_5.py | 16 +- ...les_item_type_9_type_5_time_blocks_item.py | 6 +- ...ata_attributes_rules_item_type_9_type_6.py | 14 +- ...ata_attributes_rules_item_type_9_type_7.py | 14 +- ..._data_attributes_time_restrictions_item.py | 14 +- rootly_sdk/models/update_form_field.py | 7 +- rootly_sdk/models/update_form_field_data.py | 9 +- .../update_form_field_data_attributes.py | 25 +- rootly_sdk/models/update_form_field_option.py | 7 +- .../models/update_form_field_option_data.py | 12 +- ...pdate_form_field_option_data_attributes.py | 6 +- .../models/update_form_field_placement.py | 7 +- .../update_form_field_placement_condition.py | 7 +- ...ate_form_field_placement_condition_data.py | 10 +- ...eld_placement_condition_data_attributes.py | 15 +- .../update_form_field_placement_data.py | 12 +- ...te_form_field_placement_data_attributes.py | 15 +- .../models/update_form_field_position.py | 7 +- .../models/update_form_field_position_data.py | 12 +- ...ate_form_field_position_data_attributes.py | 9 +- rootly_sdk/models/update_form_set.py | 7 +- .../models/update_form_set_condition.py | 7 +- .../models/update_form_set_condition_data.py | 12 +- ...date_form_set_condition_data_attributes.py | 9 +- rootly_sdk/models/update_form_set_data.py | 9 +- .../models/update_form_set_data_attributes.py | 7 +- rootly_sdk/models/update_functionality.py | 7 +- .../models/update_functionality_data.py | 9 +- .../update_functionality_data_attributes.py | 15 +- ...onality_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../models/update_github_issue_task_params.py | 21 +- ...ate_github_issue_task_params_completion.py | 5 +- ...ate_github_issue_task_params_issue_type.py | 5 +- ...te_github_issue_task_params_labels_item.py | 5 +- ...ate_github_issue_task_params_repository.py | 5 +- .../models/update_gitlab_issue_task_params.py | 18 +- ...ate_gitlab_issue_task_params_completion.py | 5 +- ...pdate_google_calendar_event_task_params.py | 14 +- ...task_params_post_to_slack_channels_item.py | 5 +- ...ogle_chat_space_description_task_params.py | 12 +- ...hat_space_description_task_params_space.py | 5 +- .../update_google_docs_page_task_params.py | 12 +- rootly_sdk/models/update_heartbeat.py | 7 +- rootly_sdk/models/update_heartbeat_data.py | 9 +- .../update_heartbeat_data_attributes.py | 15 +- rootly_sdk/models/update_incident.py | 7 +- .../models/update_incident_action_item.py | 7 +- .../update_incident_action_item_data.py | 12 +- ...te_incident_action_item_data_attributes.py | 15 +- ...butes_form_field_selections_type_0_item.py | 7 +- .../update_incident_custom_field_selection.py | 7 +- ...te_incident_custom_field_selection_data.py | 10 +- ..._custom_field_selection_data_attributes.py | 7 +- rootly_sdk/models/update_incident_data.py | 9 +- .../models/update_incident_data_attributes.py | 18 +- ..._incident_data_attributes_labels_type_0.py | 5 +- rootly_sdk/models/update_incident_event.py | 7 +- .../models/update_incident_event_data.py | 9 +- .../update_incident_event_data_attributes.py | 9 +- .../update_incident_event_functionality.py | 7 +- ...pdate_incident_event_functionality_data.py | 14 +- ...ent_event_functionality_data_attributes.py | 11 +- .../models/update_incident_event_service.py | 7 +- .../update_incident_event_service_data.py | 12 +- ..._incident_event_service_data_attributes.py | 9 +- rootly_sdk/models/update_incident_feedback.py | 7 +- .../models/update_incident_feedback_data.py | 12 +- ...pdate_incident_feedback_data_attributes.py | 9 +- .../update_incident_form_field_selection.py | 7 +- ...date_incident_form_field_selection_data.py | 14 +- ...nt_form_field_selection_data_attributes.py | 7 +- .../models/update_incident_permission_set.py | 7 +- .../update_incident_permission_set_boolean.py | 7 +- ...te_incident_permission_set_boolean_data.py | 10 +- ..._permission_set_boolean_data_attributes.py | 13 +- ...boolean_data_attributes_severity_params.py | 6 +- .../update_incident_permission_set_data.py | 12 +- ...incident_permission_set_data_attributes.py | 15 +- ...update_incident_permission_set_resource.py | 7 +- ...e_incident_permission_set_resource_data.py | 10 +- ...permission_set_resource_data_attributes.py | 13 +- ...esource_data_attributes_severity_params.py | 6 +- .../models/update_incident_post_mortem.py | 7 +- .../update_incident_post_mortem_data.py | 12 +- ...te_incident_post_mortem_data_attributes.py | 9 +- .../update_incident_postmortem_task_params.py | 8 +- .../update_incident_retrospective_step.py | 7 +- ...update_incident_retrospective_step_data.py | 14 +- ...dent_retrospective_step_data_attributes.py | 11 +- rootly_sdk/models/update_incident_role.py | 7 +- .../models/update_incident_role_data.py | 9 +- .../update_incident_role_data_attributes.py | 7 +- .../models/update_incident_role_task.py | 7 +- .../models/update_incident_role_task_data.py | 12 +- ...date_incident_role_task_data_attributes.py | 9 +- .../update_incident_status_page_event.py | 7 +- .../update_incident_status_page_event_data.py | 14 +- ...ident_status_page_event_data_attributes.py | 15 +- ...e_incident_status_timestamp_task_params.py | 10 +- .../models/update_incident_sub_status.py | 7 +- .../models/update_incident_sub_status_data.py | 12 +- ...ate_incident_sub_status_data_attributes.py | 7 +- .../models/update_incident_task_params.py | 14 +- rootly_sdk/models/update_incident_type.py | 7 +- .../models/update_incident_type_data.py | 9 +- .../update_incident_type_data_attributes.py | 15 +- ...nt_type_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../models/update_jira_issue_task_params.py | 14 +- ...date_jira_issue_task_params_integration.py | 5 +- .../update_jira_issue_task_params_priority.py | 5 +- .../update_jira_issue_task_params_status.py | 5 +- .../models/update_linear_issue_task_params.py | 14 +- ...te_linear_issue_task_params_labels_item.py | 5 +- ...pdate_linear_issue_task_params_priority.py | 5 +- ...update_linear_issue_task_params_project.py | 5 +- ...e_linear_issue_task_params_state_type_0.py | 5 +- rootly_sdk/models/update_live_call_router.py | 7 +- .../models/update_live_call_router_data.py | 12 +- ...update_live_call_router_data_attributes.py | 26 +- ...ibutes_escalation_policy_trigger_params.py | 10 +- ...ter_data_attributes_paging_targets_item.py | 10 +- .../models/update_motion_task_task_params.py | 12 +- ...update_motion_task_task_params_priority.py | 5 +- .../models/update_notion_page_task_params.py | 12 +- .../models/update_on_call_pay_report.py | 7 +- .../models/update_on_call_pay_report_data.py | 12 +- ...date_on_call_pay_report_data_attributes.py | 11 +- rootly_sdk/models/update_on_call_role.py | 7 +- rootly_sdk/models/update_on_call_role_data.py | 9 +- .../update_on_call_role_data_attributes.py | 103 ++---- rootly_sdk/models/update_on_call_shadow.py | 7 +- .../models/update_on_call_shadow_data.py | 9 +- .../update_on_call_shadow_data_attributes.py | 15 +- .../update_opsgenie_alert_task_params.py | 18 +- ...e_opsgenie_alert_task_params_completion.py | 5 +- .../update_opsgenie_incident_task_params.py | 24 +- rootly_sdk/models/update_override_shift.py | 7 +- .../models/update_override_shift_data.py | 9 +- .../update_override_shift_data_attributes.py | 6 +- .../update_pagerduty_incident_task_params.py | 20 +- .../update_pagertree_alert_task_params.py | 25 +- ..._pagertree_alert_task_params_teams_item.py | 5 +- ..._pagertree_alert_task_params_users_item.py | 5 +- rootly_sdk/models/update_playbook.py | 7 +- rootly_sdk/models/update_playbook_data.py | 9 +- .../models/update_playbook_data_attributes.py | 7 +- rootly_sdk/models/update_playbook_task.py | 7 +- .../models/update_playbook_task_data.py | 9 +- .../update_playbook_task_data_attributes.py | 7 +- .../models/update_post_mortem_template.py | 7 +- .../update_post_mortem_template_data.py | 12 +- ...te_post_mortem_template_data_attributes.py | 9 +- rootly_sdk/models/update_pulse.py | 7 +- rootly_sdk/models/update_pulse_data.py | 9 +- .../models/update_pulse_data_attributes.py | 14 +- ...pdate_pulse_data_attributes_data_type_0.py | 5 +- ...ulse_data_attributes_labels_item_type_0.py | 5 +- ..._pulse_data_attributes_refs_item_type_0.py | 5 +- .../models/update_quip_page_task_params.py | 12 +- .../update_retrospective_configuration.py | 7 +- ...update_retrospective_configuration_data.py | 14 +- ...ospective_configuration_data_attributes.py | 7 +- .../models/update_retrospective_process.py | 7 +- .../update_retrospective_process_data.py | 12 +- ...e_retrospective_process_data_attributes.py | 9 +- ...ective_process_matching_criteria_type_0.py | 8 +- ...ective_process_matching_criteria_type_1.py | 8 +- ...ective_process_matching_criteria_type_2.py | 8 +- .../update_retrospective_process_group.py | 7 +- ...update_retrospective_process_group_data.py | 14 +- ...ospective_process_group_data_attributes.py | 6 +- ...update_retrospective_process_group_step.py | 7 +- ...e_retrospective_process_group_step_data.py | 10 +- ...tive_process_group_step_data_attributes.py | 6 +- .../models/update_retrospective_step.py | 7 +- .../models/update_retrospective_step_data.py | 12 +- ...date_retrospective_step_data_attributes.py | 7 +- rootly_sdk/models/update_role.py | 7 +- rootly_sdk/models/update_role_data.py | 9 +- .../models/update_role_data_attributes.py | 117 ++----- rootly_sdk/models/update_schedule.py | 7 +- rootly_sdk/models/update_schedule_data.py | 9 +- .../models/update_schedule_data_attributes.py | 11 +- ...le_data_attributes_slack_channel_type_0.py | 5 +- ...hedule_data_attributes_slack_user_group.py | 5 +- rootly_sdk/models/update_schedule_rotation.py | 7 +- .../update_schedule_rotation_active_day.py | 7 +- ...pdate_schedule_rotation_active_day_data.py | 14 +- ...ule_rotation_active_day_data_attributes.py | 13 +- ..._attributes_active_time_attributes_item.py | 5 +- .../models/update_schedule_rotation_data.py | 12 +- ...pdate_schedule_rotation_data_attributes.py | 31 +- ..._attributes_active_time_attributes_item.py | 5 +- ...s_schedule_rotation_members_type_0_item.py | 10 +- ...schedule_rotationable_attributes_type_0.py | 6 +- ...schedule_rotationable_attributes_type_1.py | 11 +- ...schedule_rotationable_attributes_type_2.py | 11 +- ...schedule_rotationable_attributes_type_3.py | 11 +- .../models/update_schedule_rotation_user.py | 7 +- .../update_schedule_rotation_user_data.py | 12 +- ..._schedule_rotation_user_data_attributes.py | 6 +- rootly_sdk/models/update_secret.py | 7 +- rootly_sdk/models/update_secret_data.py | 9 +- .../models/update_secret_data_attributes.py | 7 +- rootly_sdk/models/update_service.py | 7 +- rootly_sdk/models/update_service_data.py | 9 +- .../models/update_service_data_attributes.py | 17 +- ...tributes_alert_broadcast_channel_type_0.py | 5 +- ...butes_incident_broadcast_channel_type_0.py | 5 +- ...service_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- ...update_service_now_incident_task_params.py | 11 +- ...ice_now_incident_task_params_completion.py | 5 +- ...rvice_now_incident_task_params_priority.py | 5 +- rootly_sdk/models/update_severity.py | 7 +- rootly_sdk/models/update_severity_data.py | 9 +- .../models/update_severity_data_attributes.py | 18 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../update_sharepoint_page_task_params.py | 12 +- .../update_shortcut_story_task_params.py | 12 +- ..._shortcut_story_task_params_archivation.py | 5 +- .../update_shortcut_task_task_params.py | 12 +- ...te_shortcut_task_task_params_completion.py | 5 +- rootly_sdk/models/update_sla.py | 7 +- rootly_sdk/models/update_sla_data.py | 9 +- .../models/update_sla_data_attributes.py | 26 +- ...ate_sla_data_attributes_conditions_item.py | 14 +- ...ibutes_notification_configurations_item.py | 10 +- .../update_slack_channel_topic_task_params.py | 8 +- ...slack_channel_topic_task_params_channel.py | 5 +- rootly_sdk/models/update_status_page.py | 7 +- rootly_sdk/models/update_status_page_data.py | 9 +- .../update_status_page_data_attributes.py | 23 +- .../models/update_status_page_template.py | 7 +- .../update_status_page_template_data.py | 12 +- ...te_status_page_template_data_attributes.py | 13 +- .../models/update_status_task_params.py | 18 +- rootly_sdk/models/update_sub_status.py | 7 +- rootly_sdk/models/update_sub_status_data.py | 9 +- .../update_sub_status_data_attributes.py | 7 +- rootly_sdk/models/update_team.py | 7 +- rootly_sdk/models/update_team_data.py | 9 +- .../models/update_team_data_attributes.py | 15 +- ...tributes_alert_broadcast_channel_type_0.py | 5 +- ...butes_incident_broadcast_channel_type_0.py | 5 +- ...te_team_data_attributes_properties_item.py | 5 +- ...ta_attributes_slack_aliases_type_0_item.py | 5 +- ...a_attributes_slack_channels_type_0_item.py | 5 +- .../models/update_trello_card_task_params.py | 15 +- ...ate_trello_card_task_params_archivation.py | 5 +- .../update_trello_card_task_params_board.py | 5 +- ...ate_trello_card_task_params_labels_item.py | 5 +- .../update_trello_card_task_params_list.py | 5 +- rootly_sdk/models/update_user.py | 7 +- rootly_sdk/models/update_user_data.py | 9 +- .../models/update_user_data_attributes.py | 7 +- .../models/update_user_email_address.py | 7 +- .../models/update_user_email_address_data.py | 12 +- ...date_user_email_address_data_attributes.py | 6 +- .../models/update_user_notification_rule.py | 7 +- .../update_user_notification_rule_data.py | 12 +- ..._user_notification_rule_data_attributes.py | 11 +- rootly_sdk/models/update_user_phone_number.py | 7 +- .../models/update_user_phone_number_data.py | 12 +- ...pdate_user_phone_number_data_attributes.py | 6 +- .../update_victor_ops_incident_task_params.py | 14 +- rootly_sdk/models/update_webhooks_endpoint.py | 7 +- .../models/update_webhooks_endpoint_data.py | 12 +- ...pdate_webhooks_endpoint_data_attributes.py | 13 +- ...int_data_attributes_custom_headers_item.py | 6 +- rootly_sdk/models/update_workflow.py | 7 +- ...rkflow_action_item_form_field_condition.py | 9 +- ...w_action_item_form_field_condition_data.py | 12 +- ...em_form_field_condition_data_attributes.py | 11 +- .../update_workflow_custom_field_selection.py | 7 +- ...te_workflow_custom_field_selection_data.py | 10 +- ..._custom_field_selection_data_attributes.py | 11 +- rootly_sdk/models/update_workflow_data.py | 9 +- .../models/update_workflow_data_attributes.py | 11 +- .../update_workflow_form_field_condition.py | 7 +- ...date_workflow_form_field_condition_data.py | 14 +- ...ow_form_field_condition_data_attributes.py | 11 +- rootly_sdk/models/update_workflow_group.py | 7 +- .../models/update_workflow_group_data.py | 9 +- .../update_workflow_group_data_attributes.py | 12 +- rootly_sdk/models/update_workflow_task.py | 7 +- .../models/update_workflow_task_data.py | 9 +- .../update_workflow_task_data_attributes.py | 293 +++++++++--------- .../update_zendesk_ticket_task_params.py | 13 +- ...e_zendesk_ticket_task_params_completion.py | 5 +- ...ate_zendesk_ticket_task_params_priority.py | 5 +- rootly_sdk/models/uptime_chart_response.py | 7 +- .../models/uptime_chart_response_data.py | 5 +- rootly_sdk/models/user.py | 6 +- rootly_sdk/models/user_email_address.py | 5 +- rootly_sdk/models/user_email_address_list.py | 9 +- .../user_email_address_list_data_item.py | 12 +- .../models/user_email_address_response.py | 7 +- .../user_email_address_response_data.py | 12 +- rootly_sdk/models/user_flat_response.py | 6 +- rootly_sdk/models/user_list.py | 9 +- rootly_sdk/models/user_list_data_item.py | 10 +- rootly_sdk/models/user_notification_rule.py | 14 +- .../models/user_notification_rule_list.py | 9 +- .../user_notification_rule_list_data_item.py | 12 +- .../models/user_notification_rule_response.py | 7 +- .../user_notification_rule_response_data.py | 12 +- rootly_sdk/models/user_phone_number.py | 10 +- rootly_sdk/models/user_phone_number_list.py | 9 +- .../user_phone_number_list_data_item.py | 12 +- .../models/user_phone_number_response.py | 7 +- .../models/user_phone_number_response_data.py | 12 +- rootly_sdk/models/user_relationships.py | 7 +- rootly_sdk/models/user_response.py | 7 +- rootly_sdk/models/user_response_data.py | 10 +- .../models/verify_phone_number_request.py | 5 +- rootly_sdk/models/webhooks_delivery.py | 7 +- rootly_sdk/models/webhooks_delivery_list.py | 9 +- .../webhooks_delivery_list_data_item.py | 12 +- .../models/webhooks_delivery_response.py | 7 +- .../models/webhooks_delivery_response_data.py | 12 +- rootly_sdk/models/webhooks_endpoint.py | 12 +- .../webhooks_endpoint_custom_headers_item.py | 6 +- rootly_sdk/models/webhooks_endpoint_list.py | 9 +- .../webhooks_endpoint_list_data_item.py | 12 +- .../models/webhooks_endpoint_response.py | 7 +- .../models/webhooks_endpoint_response_data.py | 12 +- rootly_sdk/models/workflow.py | 15 +- ...rkflow_action_item_form_field_condition.py | 10 +- ...w_action_item_form_field_condition_list.py | 11 +- ...tem_form_field_condition_list_data_item.py | 10 +- ...tion_item_form_field_condition_response.py | 9 +- ...item_form_field_condition_response_data.py | 10 +- .../models/workflow_custom_field_selection.py | 8 +- .../workflow_custom_field_selection_list.py | 9 +- ...w_custom_field_selection_list_data_item.py | 8 +- ...orkflow_custom_field_selection_response.py | 7 +- ...ow_custom_field_selection_response_data.py | 8 +- .../models/workflow_form_field_condition.py | 8 +- .../workflow_form_field_condition_list.py | 9 +- ...low_form_field_condition_list_data_item.py | 8 +- .../workflow_form_field_condition_response.py | 7 +- ...flow_form_field_condition_response_data.py | 8 +- rootly_sdk/models/workflow_group.py | 9 +- rootly_sdk/models/workflow_group_list.py | 9 +- .../models/workflow_group_list_data_item.py | 12 +- rootly_sdk/models/workflow_group_response.py | 7 +- .../models/workflow_group_response_data.py | 12 +- rootly_sdk/models/workflow_list.py | 9 +- rootly_sdk/models/workflow_list_data_item.py | 9 +- rootly_sdk/models/workflow_response.py | 7 +- rootly_sdk/models/workflow_response_data.py | 9 +- rootly_sdk/models/workflow_run.py | 12 +- rootly_sdk/models/workflow_run_context.py | 5 +- rootly_sdk/models/workflow_run_response.py | 7 +- .../models/workflow_run_response_data.py | 9 +- rootly_sdk/models/workflow_runs_list.py | 9 +- .../models/workflow_runs_list_data_item.py | 12 +- rootly_sdk/models/workflow_task.py | 292 +++++++++-------- rootly_sdk/models/workflow_task_list.py | 9 +- .../models/workflow_task_list_data_item.py | 12 +- rootly_sdk/models/workflow_task_response.py | 7 +- .../models/workflow_task_response_data.py | 12 +- rootly_sdk/types.py | 2 +- 2579 files changed, 7356 insertions(+), 18832 deletions(-) diff --git a/rootly_sdk/api/ai_chat/create_ai_chat.py b/rootly_sdk/api/ai_chat/create_ai_chat.py index 118ac0e8..c31dd130 100644 --- a/rootly_sdk/api/ai_chat/create_ai_chat.py +++ b/rootly_sdk/api/ai_chat/create_ai_chat.py @@ -1,18 +1,13 @@ from http import HTTPStatus from typing import Any, cast -from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.ai_chat_response import AiChatResponse -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/ai_chat/delete_ai_chat_session.py b/rootly_sdk/api/ai_chat/delete_ai_chat_session.py index 9efdeb2a..d2019326 100644 --- a/rootly_sdk/api/ai_chat/delete_ai_chat_session.py +++ b/rootly_sdk/api/ai_chat/delete_ai_chat_session.py @@ -1,15 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from uuid import UUID - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py b/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py index 6e6c1bbd..fd939f80 100644 --- a/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py +++ b/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py @@ -1,18 +1,14 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.ai_chat_session_message_list import AiChatSessionMessageList -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/ai_chat/stream_ai_chat.py b/rootly_sdk/api/ai_chat/stream_ai_chat.py index 6691ad99..d49aab5b 100644 --- a/rootly_sdk/api/ai_chat/stream_ai_chat.py +++ b/rootly_sdk/api/ai_chat/stream_ai_chat.py @@ -1,16 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...types import UNSET, Unset -from uuid import UUID - +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_events/create_alert_event.py b/rootly_sdk/api/alert_events/create_alert_event.py index 51b7eae6..d2d67105 100644 --- a/rootly_sdk/api/alert_events/create_alert_event.py +++ b/rootly_sdk/api/alert_events/create_alert_event.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_event_response import AlertEventResponse from ...models.errors_list import ErrorsList from ...models.new_alert_event import NewAlertEvent -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_events/delete_alert_event.py b/rootly_sdk/api/alert_events/delete_alert_event.py index fc90bb96..96b38b6f 100644 --- a/rootly_sdk/api/alert_events/delete_alert_event.py +++ b/rootly_sdk/api/alert_events/delete_alert_event.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_events/get_alert_event.py b/rootly_sdk/api/alert_events/get_alert_event.py index da732dc6..2a2f79a8 100644 --- a/rootly_sdk/api/alert_events/get_alert_event.py +++ b/rootly_sdk/api/alert_events/get_alert_event.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_event_response import AlertEventResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_events/list_alert_events.py b/rootly_sdk/api/alert_events/list_alert_events.py index 2f1803a9..08440ae8 100644 --- a/rootly_sdk/api/alert_events/list_alert_events.py +++ b/rootly_sdk/api/alert_events/list_alert_events.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_event_list import AlertEventList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_events/list_alert_events_feed.py b/rootly_sdk/api/alert_events/list_alert_events_feed.py index eda9a8ab..9127eac0 100644 --- a/rootly_sdk/api/alert_events/list_alert_events_feed.py +++ b/rootly_sdk/api/alert_events/list_alert_events_feed.py @@ -1,23 +1,19 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_event_feed_list import AlertEventFeedList -from ...models.list_alert_events_feed_filteraction import check_list_alert_events_feed_filteraction -from ...models.list_alert_events_feed_filteraction import ListAlertEventsFeedFilteraction -from ...models.list_alert_events_feed_filterkind import check_list_alert_events_feed_filterkind -from ...models.list_alert_events_feed_filterkind import ListAlertEventsFeedFilterkind -from ...models.list_alert_events_feed_sort import check_list_alert_events_feed_sort +from ...models.list_alert_events_feed_filteraction import ( + ListAlertEventsFeedFilteraction, +) +from ...models.list_alert_events_feed_filterkind import ( + ListAlertEventsFeedFilterkind, +) from ...models.list_alert_events_feed_sort import ListAlertEventsFeedSort -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_events/update_alert_event.py b/rootly_sdk/api/alert_events/update_alert_event.py index 6367aee0..13f20b50 100644 --- a/rootly_sdk/api/alert_events/update_alert_event.py +++ b/rootly_sdk/api/alert_events/update_alert_event.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_event_response import AlertEventResponse from ...models.errors_list import ErrorsList from ...models.update_alert_event import UpdateAlertEvent -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_fields/create_alert_field.py b/rootly_sdk/api/alert_fields/create_alert_field.py index 1b3f5ac9..0afb68c7 100644 --- a/rootly_sdk/api/alert_fields/create_alert_field.py +++ b/rootly_sdk/api/alert_fields/create_alert_field.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_field_response import AlertFieldResponse from ...models.errors_list import ErrorsList from ...models.new_alert_field import NewAlertField -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_fields/delete_alert_field.py b/rootly_sdk/api/alert_fields/delete_alert_field.py index d6852b7e..9a5d8078 100644 --- a/rootly_sdk/api/alert_fields/delete_alert_field.py +++ b/rootly_sdk/api/alert_fields/delete_alert_field.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_field_response import AlertFieldResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_fields/get_alert_field.py b/rootly_sdk/api/alert_fields/get_alert_field.py index c165fa24..5ead69b3 100644 --- a/rootly_sdk/api/alert_fields/get_alert_field.py +++ b/rootly_sdk/api/alert_fields/get_alert_field.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_field_response import AlertFieldResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_fields/list_alert_fields.py b/rootly_sdk/api/alert_fields/list_alert_fields.py index d6151f5c..f8afb411 100644 --- a/rootly_sdk/api/alert_fields/list_alert_fields.py +++ b/rootly_sdk/api/alert_fields/list_alert_fields.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_field_list import AlertFieldList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_fields/update_alert_field.py b/rootly_sdk/api/alert_fields/update_alert_field.py index 8a8854a9..203b50a6 100644 --- a/rootly_sdk/api/alert_fields/update_alert_field.py +++ b/rootly_sdk/api/alert_fields/update_alert_field.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_field_response import AlertFieldResponse from ...models.errors_list import ErrorsList from ...models.update_alert_field import UpdateAlertField -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_groups/create_alert_group.py b/rootly_sdk/api/alert_groups/create_alert_group.py index 0c2229cf..6a285f02 100644 --- a/rootly_sdk/api/alert_groups/create_alert_group.py +++ b/rootly_sdk/api/alert_groups/create_alert_group.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_group_response import AlertGroupResponse from ...models.errors_list import ErrorsList from ...models.new_alert_group import NewAlertGroup -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_groups/delete_alert_group.py b/rootly_sdk/api/alert_groups/delete_alert_group.py index 93559631..2ac858f4 100644 --- a/rootly_sdk/api/alert_groups/delete_alert_group.py +++ b/rootly_sdk/api/alert_groups/delete_alert_group.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_group_response import AlertGroupResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_groups/get_alert_group.py b/rootly_sdk/api/alert_groups/get_alert_group.py index c72fe872..7b7b5b88 100644 --- a/rootly_sdk/api/alert_groups/get_alert_group.py +++ b/rootly_sdk/api/alert_groups/get_alert_group.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_group_response import AlertGroupResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_groups/list_alert_groups.py b/rootly_sdk/api/alert_groups/list_alert_groups.py index 0f4dfbde..c7b54dec 100644 --- a/rootly_sdk/api/alert_groups/list_alert_groups.py +++ b/rootly_sdk/api/alert_groups/list_alert_groups.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_group_list import AlertGroupList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_groups/update_alert_group.py b/rootly_sdk/api/alert_groups/update_alert_group.py index c914c775..371f311c 100644 --- a/rootly_sdk/api/alert_groups/update_alert_group.py +++ b/rootly_sdk/api/alert_groups/update_alert_group.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_group_response import AlertGroupResponse from ...models.errors_list import ErrorsList from ...models.update_alert_group import UpdateAlertGroup -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_routes/create_alert_route.py b/rootly_sdk/api/alert_routes/create_alert_route.py index 00786819..cbfeb2a8 100644 --- a/rootly_sdk/api/alert_routes/create_alert_route.py +++ b/rootly_sdk/api/alert_routes/create_alert_route.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_route_response import AlertRouteResponse from ...models.errors_list import ErrorsList from ...models.new_alert_route import NewAlertRoute -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_routes/delete_alert_route.py b/rootly_sdk/api/alert_routes/delete_alert_route.py index 80f207b4..67e6e8ee 100644 --- a/rootly_sdk/api/alert_routes/delete_alert_route.py +++ b/rootly_sdk/api/alert_routes/delete_alert_route.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.delete_alert_route_response_200 import DeleteAlertRouteResponse200 from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_routes/get_alert_route.py b/rootly_sdk/api/alert_routes/get_alert_route.py index 520c5c11..157a2e36 100644 --- a/rootly_sdk/api/alert_routes/get_alert_route.py +++ b/rootly_sdk/api/alert_routes/get_alert_route.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_route_response import AlertRouteResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_routes/list_alert_routes.py b/rootly_sdk/api/alert_routes/list_alert_routes.py index eeafefbb..bab73ec6 100644 --- a/rootly_sdk/api/alert_routes/list_alert_routes.py +++ b/rootly_sdk/api/alert_routes/list_alert_routes.py @@ -1,18 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_route_list import AlertRouteList from ...models.errors_list import ErrorsList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_routes/patch_alert_route.py b/rootly_sdk/api/alert_routes/patch_alert_route.py index 247e75a1..6746940f 100644 --- a/rootly_sdk/api/alert_routes/patch_alert_route.py +++ b/rootly_sdk/api/alert_routes/patch_alert_route.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_route_response import AlertRouteResponse from ...models.errors_list import ErrorsList from ...models.patch_alert_route import PatchAlertRoute -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_routes/update_alert_route.py b/rootly_sdk/api/alert_routes/update_alert_route.py index dcf2501d..2f5c2d03 100644 --- a/rootly_sdk/api/alert_routes/update_alert_route.py +++ b/rootly_sdk/api/alert_routes/update_alert_route.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_route_response import AlertRouteResponse from ...models.errors_list import ErrorsList from ...models.update_alert_route import UpdateAlertRoute -from typing import cast - +from ...types import Response def _get_kwargs( 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 951127f1..7ab8e49e 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 @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_routing_rule_response import AlertRoutingRuleResponse from ...models.errors_list import ErrorsList from ...models.new_alert_routing_rule import NewAlertRoutingRule -from typing import cast - +from ...types import Response def _get_kwargs( 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 d2fbf40f..7edbd0b3 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_routing_rule_response import AlertRoutingRuleResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 149039e1..afea89e6 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_routing_rule_response import AlertRoutingRuleResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 e6717b1f..2273903c 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 @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_routing_rule_list import AlertRoutingRuleList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 bcfe96b7..b891fb8f 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,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_routing_rule_response import AlertRoutingRuleResponse from ...models.errors_list import ErrorsList from ...models.update_alert_routing_rule import UpdateAlertRoutingRule -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_sources/create_alerts_source.py b/rootly_sdk/api/alert_sources/create_alerts_source.py index d7c3a053..76064272 100644 --- a/rootly_sdk/api/alert_sources/create_alerts_source.py +++ b/rootly_sdk/api/alert_sources/create_alerts_source.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alerts_source_response import AlertsSourceResponse from ...models.errors_list import ErrorsList from ...models.new_alerts_source import NewAlertsSource -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_sources/delete_alerts_source.py b/rootly_sdk/api/alert_sources/delete_alerts_source.py index e899cabc..3be391aa 100644 --- a/rootly_sdk/api/alert_sources/delete_alerts_source.py +++ b/rootly_sdk/api/alert_sources/delete_alerts_source.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alerts_source_response import AlertsSourceResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_sources/get_alerts_source.py b/rootly_sdk/api/alert_sources/get_alerts_source.py index 92b5fd0e..d1576942 100644 --- a/rootly_sdk/api/alert_sources/get_alerts_source.py +++ b/rootly_sdk/api/alert_sources/get_alerts_source.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alerts_source_response import AlertsSourceResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_sources/list_alerts_sources.py b/rootly_sdk/api/alert_sources/list_alerts_sources.py index 0e7e7dd4..b5df41c2 100644 --- a/rootly_sdk/api/alert_sources/list_alerts_sources.py +++ b/rootly_sdk/api/alert_sources/list_alerts_sources.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alerts_source_list import AlertsSourceList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_sources/update_alerts_source.py b/rootly_sdk/api/alert_sources/update_alerts_source.py index ca9bfc4d..4c791f51 100644 --- a/rootly_sdk/api/alert_sources/update_alerts_source.py +++ b/rootly_sdk/api/alert_sources/update_alerts_source.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alerts_source_response import AlertsSourceResponse from ...models.errors_list import ErrorsList from ...models.update_alerts_source import UpdateAlertsSource -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_urgencies/create_alert_urgency.py b/rootly_sdk/api/alert_urgencies/create_alert_urgency.py index 2b2c2c49..e9913a33 100644 --- a/rootly_sdk/api/alert_urgencies/create_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/create_alert_urgency.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_urgency_response import AlertUrgencyResponse from ...models.errors_list import ErrorsList from ...models.new_alert_urgency import NewAlertUrgency -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py b/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py index b1e5abc7..98ebce8f 100644 --- a/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_urgency_response import AlertUrgencyResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_urgencies/get_alert_urgency.py b/rootly_sdk/api/alert_urgencies/get_alert_urgency.py index 8d5fc04f..6e401e67 100644 --- a/rootly_sdk/api/alert_urgencies/get_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/get_alert_urgency.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_urgency_response import AlertUrgencyResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py index 784a3881..cfb0dd28 100644 --- a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py +++ b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_urgency_list import AlertUrgencyList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alert_urgencies/update_alert_urgency.py b/rootly_sdk/api/alert_urgencies/update_alert_urgency.py index 985f301b..0be9e405 100644 --- a/rootly_sdk/api/alert_urgencies/update_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/update_alert_urgency.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_urgency_response import AlertUrgencyResponse from ...models.errors_list import ErrorsList from ...models.update_alert_urgency import UpdateAlertUrgency -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alerts/acknowledge_alert.py b/rootly_sdk/api/alerts/acknowledge_alert.py index 2856d58f..b6f75d32 100644 --- a/rootly_sdk/api/alerts/acknowledge_alert.py +++ b/rootly_sdk/api/alerts/acknowledge_alert.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alerts/attach_alert.py b/rootly_sdk/api/alerts/attach_alert.py index bc5408f3..23e93486 100644 --- a/rootly_sdk/api/alerts/attach_alert.py +++ b/rootly_sdk/api/alerts/attach_alert.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_list import AlertList from ...models.attach_alert import AttachAlert from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alerts/create_alert.py b/rootly_sdk/api/alerts/create_alert.py index 1ccb281c..75adf61e 100644 --- a/rootly_sdk/api/alerts/create_alert.py +++ b/rootly_sdk/api/alerts/create_alert.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.new_alert import NewAlert -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alerts/escalate_alert.py b/rootly_sdk/api/alerts/escalate_alert.py index 5e6486a4..1bdf4924 100644 --- a/rootly_sdk/api/alerts/escalate_alert.py +++ b/rootly_sdk/api/alerts/escalate_alert.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.escalate_alert import EscalateAlert -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alerts/get_alert.py b/rootly_sdk/api/alerts/get_alert.py index 11db3cd3..d83391c9 100644 --- a/rootly_sdk/api/alerts/get_alert.py +++ b/rootly_sdk/api/alerts/get_alert.py @@ -1,20 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList -from ...models.get_alert_include import check_get_alert_include from ...models.get_alert_include import GetAlertInclude -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alerts/get_receipt.py b/rootly_sdk/api/alerts/get_receipt.py index 8f2b0be2..6eaddc87 100644 --- a/rootly_sdk/api/alerts/get_receipt.py +++ b/rootly_sdk/api/alerts/get_receipt.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.receipt import Receipt -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alerts/list_alerts.py b/rootly_sdk/api/alerts/list_alerts.py index 5f253564..98228ad8 100644 --- a/rootly_sdk/api/alerts/list_alerts.py +++ b/rootly_sdk/api/alerts/list_alerts.py @@ -1,19 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_list import AlertList -from ...models.list_alerts_include import check_list_alerts_include from ...models.list_alerts_include import ListAlertsInclude -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alerts/list_incident_alerts.py b/rootly_sdk/api/alerts/list_incident_alerts.py index 964e7b7f..ef39a459 100644 --- a/rootly_sdk/api/alerts/list_incident_alerts.py +++ b/rootly_sdk/api/alerts/list_incident_alerts.py @@ -1,19 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_list import AlertList -from ...models.list_incident_alerts_include import check_list_incident_alerts_include from ...models.list_incident_alerts_include import ListIncidentAlertsInclude -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alerts/resolve_alert.py b/rootly_sdk/api/alerts/resolve_alert.py index 3d6d7255..8c3b142e 100644 --- a/rootly_sdk/api/alerts/resolve_alert.py +++ b/rootly_sdk/api/alerts/resolve_alert.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.resolve_alert import ResolveAlert -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/alerts/snooze_alert.py b/rootly_sdk/api/alerts/snooze_alert.py index 0ce44220..8b4308be 100644 --- a/rootly_sdk/api/alerts/snooze_alert.py +++ b/rootly_sdk/api/alerts/snooze_alert.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.snooze_alert import SnoozeAlert -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/alerts/update_alert.py b/rootly_sdk/api/alerts/update_alert.py index b4ade548..e5533ed5 100644 --- a/rootly_sdk/api/alerts/update_alert.py +++ b/rootly_sdk/api/alerts/update_alert.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.alert_response import AlertResponse from ...models.errors_list import ErrorsList from ...models.update_alert import UpdateAlert -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/api_keys/create_api_key.py b/rootly_sdk/api/api_keys/create_api_key.py index 4556ab3e..070ac9c1 100644 --- a/rootly_sdk/api/api_keys/create_api_key.py +++ b/rootly_sdk/api/api_keys/create_api_key.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/api_keys/delete_api_key.py b/rootly_sdk/api/api_keys/delete_api_key.py index 4e9ff9fc..3dfa371c 100644 --- a/rootly_sdk/api/api_keys/delete_api_key.py +++ b/rootly_sdk/api/api_keys/delete_api_key.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.api_key_response import ApiKeyResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/api_keys/get_api_key.py b/rootly_sdk/api/api_keys/get_api_key.py index 56e8e996..32d73750 100644 --- a/rootly_sdk/api/api_keys/get_api_key.py +++ b/rootly_sdk/api/api_keys/get_api_key.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/api_keys/list_api_keys.py b/rootly_sdk/api/api_keys/list_api_keys.py index 23b27274..8400a46a 100644 --- a/rootly_sdk/api/api_keys/list_api_keys.py +++ b/rootly_sdk/api/api_keys/list_api_keys.py @@ -1,18 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/api_keys/rotate_api_key.py b/rootly_sdk/api/api_keys/rotate_api_key.py index cdf03e64..d9b92406 100644 --- a/rootly_sdk/api/api_keys/rotate_api_key.py +++ b/rootly_sdk/api/api_keys/rotate_api_key.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/api_keys/update_api_key.py b/rootly_sdk/api/api_keys/update_api_key.py index e9cdd493..245fed2f 100644 --- a/rootly_sdk/api/api_keys/update_api_key.py +++ b/rootly_sdk/api/api_keys/update_api_key.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/audits/list_audits.py b/rootly_sdk/api/audits/list_audits.py index 99c0eb60..37bbb958 100644 --- a/rootly_sdk/api/audits/list_audits.py +++ b/rootly_sdk/api/audits/list_audits.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.audits_list import AuditsList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/authorizations/create_authorization.py b/rootly_sdk/api/authorizations/create_authorization.py index 4e88a6ac..2124f479 100644 --- a/rootly_sdk/api/authorizations/create_authorization.py +++ b/rootly_sdk/api/authorizations/create_authorization.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.authorization_response import AuthorizationResponse from ...models.errors_list import ErrorsList from ...models.new_authorization import NewAuthorization -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/authorizations/delete_authorization.py b/rootly_sdk/api/authorizations/delete_authorization.py index 84f4e538..6e474920 100644 --- a/rootly_sdk/api/authorizations/delete_authorization.py +++ b/rootly_sdk/api/authorizations/delete_authorization.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.authorization_response import AuthorizationResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/authorizations/get_authorization.py b/rootly_sdk/api/authorizations/get_authorization.py index 9e148f83..a4540024 100644 --- a/rootly_sdk/api/authorizations/get_authorization.py +++ b/rootly_sdk/api/authorizations/get_authorization.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.authorization_response import AuthorizationResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/authorizations/list_authorizations.py b/rootly_sdk/api/authorizations/list_authorizations.py index 74b7c03e..c35da175 100644 --- a/rootly_sdk/api/authorizations/list_authorizations.py +++ b/rootly_sdk/api/authorizations/list_authorizations.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.authorization_list import AuthorizationList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/authorizations/update_authorization.py b/rootly_sdk/api/authorizations/update_authorization.py index 1fa2af64..721e1791 100644 --- a/rootly_sdk/api/authorizations/update_authorization.py +++ b/rootly_sdk/api/authorizations/update_authorization.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.authorization_response import AuthorizationResponse from ...models.errors_list import ErrorsList from ...models.update_authorization import UpdateAuthorization -from typing import cast - +from ...types import Response def _get_kwargs( 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 index 8fe6dcbd..09182771 100644 --- a/rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( 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 index 9451bd5a..c56b2e31 100644 --- a/rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 index f828e28b..abf533da 100644 --- a/rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 index c98a1a77..d3ef10b2 100644 --- a/rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py +++ b/rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py @@ -1,21 +1,18 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_checklist_template_list import CatalogChecklistTemplateList -from ...models.list_catalog_checklist_templates_include import check_list_catalog_checklist_templates_include -from ...models.list_catalog_checklist_templates_include import ListCatalogChecklistTemplatesInclude -from ...models.list_catalog_checklist_templates_sort import check_list_catalog_checklist_templates_sort -from ...models.list_catalog_checklist_templates_sort import ListCatalogChecklistTemplatesSort -from ...types import UNSET, Unset -from typing import cast - +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( 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 index 731ccd60..12e6da00 100644 --- a/rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py @@ -1,17 +1,14 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py b/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py index f153a6c6..4acfb724 100644 --- a/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_checklist_template_response import CatalogChecklistTemplateResponse from ...models.errors_list import ErrorsList from ...models.update_catalog_checklist_template import UpdateCatalogChecklistTemplate -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py b/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py index efeef068..cba292fd 100644 --- a/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py +++ b/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_destroy_catalog_entities_response import BulkDestroyCatalogEntitiesResponse from ...models.bulk_destroy_catalog_entities_type_0 import BulkDestroyCatalogEntitiesType0 from ...models.bulk_destroy_catalog_entities_type_1 import BulkDestroyCatalogEntitiesType1 from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py b/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py index 127601a4..1f6d39da 100644 --- a/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py +++ b/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_upsert_catalog_entities import BulkUpsertCatalogEntities from ...models.bulk_upsert_catalog_entities_error import BulkUpsertCatalogEntitiesError from ...models.bulk_upsert_catalog_entities_response import BulkUpsertCatalogEntitiesResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_entities/create_catalog_entity.py b/rootly_sdk/api/catalog_entities/create_catalog_entity.py index fad5f2ca..39972f31 100644 --- a/rootly_sdk/api/catalog_entities/create_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/create_catalog_entity.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_response import CatalogEntityResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_entity import NewCatalogEntity -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_entities/delete_catalog_entity.py b/rootly_sdk/api/catalog_entities/delete_catalog_entity.py index 09e30559..1dd320b6 100644 --- a/rootly_sdk/api/catalog_entities/delete_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/delete_catalog_entity.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_response import CatalogEntityResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_entities/get_catalog_entity.py b/rootly_sdk/api/catalog_entities/get_catalog_entity.py index 6e969416..a2dac23e 100644 --- a/rootly_sdk/api/catalog_entities/get_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/get_catalog_entity.py @@ -1,21 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_response import CatalogEntityResponse from ...models.errors_list import ErrorsList -from ...models.get_catalog_entity_include import check_get_catalog_entity_include from ...models.get_catalog_entity_include import GetCatalogEntityInclude -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/catalog_entities/list_catalog_entities.py b/rootly_sdk/api/catalog_entities/list_catalog_entities.py index ec050ded..2a1921ad 100644 --- a/rootly_sdk/api/catalog_entities/list_catalog_entities.py +++ b/rootly_sdk/api/catalog_entities/list_catalog_entities.py @@ -1,21 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_list import CatalogEntityList -from ...models.list_catalog_entities_include import check_list_catalog_entities_include from ...models.list_catalog_entities_include import ListCatalogEntitiesInclude -from ...models.list_catalog_entities_sort import check_list_catalog_entities_sort from ...models.list_catalog_entities_sort import ListCatalogEntitiesSort -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/catalog_entities/update_catalog_entity.py b/rootly_sdk/api/catalog_entities/update_catalog_entity.py index 6775e51e..9655ee84 100644 --- a/rootly_sdk/api/catalog_entities/update_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/update_catalog_entity.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_response import CatalogEntityResponse from ...models.errors_list import ErrorsList from ...models.update_catalog_entity import UpdateCatalogEntity -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 index 31de002c..a1752bb5 100644 --- a/rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py +++ b/rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_checklist_response import CatalogEntityChecklistResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 index 4478cbec..28612b3a 100644 --- a/rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py +++ b/rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_checklist_list import CatalogEntityChecklistList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 6b4c4323..90ea7e96 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_property_response import CatalogEntityPropertyResponse from ...models.errors_list import ErrorsList from ...models.new_catalog_entity_property import NewCatalogEntityProperty -from typing import cast - +from ...types import Response def _get_kwargs( 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 705f72fb..f79e2f05 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_property_response import CatalogEntityPropertyResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( 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 dafecc9a..25ab0fbf 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,20 +1,17 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_property_response import CatalogEntityPropertyResponse from ...models.errors_list import ErrorsList -from ...models.get_catalog_entity_property_include import check_get_catalog_entity_property_include -from ...models.get_catalog_entity_property_include import GetCatalogEntityPropertyInclude -from ...types import UNSET, Unset -from typing import cast - +from ...models.get_catalog_entity_property_include import ( + GetCatalogEntityPropertyInclude, +) +from ...types import UNSET, Response, Unset def _get_kwargs( 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 2a588ab0..d12f5faa 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,21 +1,19 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_property_list import CatalogEntityPropertyList -from ...models.list_catalog_entity_properties_include import check_list_catalog_entity_properties_include -from ...models.list_catalog_entity_properties_include import ListCatalogEntityPropertiesInclude -from ...models.list_catalog_entity_properties_sort import check_list_catalog_entity_properties_sort -from ...models.list_catalog_entity_properties_sort import ListCatalogEntityPropertiesSort -from ...types import UNSET, Unset -from typing import cast - +from ...models.list_catalog_entity_properties_include import ( + ListCatalogEntityPropertiesInclude, +) +from ...models.list_catalog_entity_properties_sort import ( + ListCatalogEntityPropertiesSort, +) +from ...types import UNSET, Response, Unset def _get_kwargs( 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 749c5694..bdc5e05f 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_entity_property_response import CatalogEntityPropertyResponse from ...models.errors_list import ErrorsList from ...models.update_catalog_entity_property import UpdateCatalogEntityProperty -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_properties/create_catalog_property.py b/rootly_sdk/api/catalog_properties/create_catalog_property.py index 771f58cc..e90cdab5 100644 --- a/rootly_sdk/api/catalog_properties/create_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/create_catalog_property.py @@ -1,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.new_catalog_field import NewCatalogField -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_properties/delete_catalog_property.py b/rootly_sdk/api/catalog_properties/delete_catalog_property.py index 97f25493..3f7ebf30 100644 --- a/rootly_sdk/api/catalog_properties/delete_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/delete_catalog_property.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_properties/get_catalog_property.py b/rootly_sdk/api/catalog_properties/get_catalog_property.py index d98ebc18..b7af15a3 100644 --- a/rootly_sdk/api/catalog_properties/get_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/get_catalog_property.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_properties/list_catalog_properties.py b/rootly_sdk/api/catalog_properties/list_catalog_properties.py index 43b51bdd..c09d0358 100644 --- a/rootly_sdk/api/catalog_properties/list_catalog_properties.py +++ b/rootly_sdk/api/catalog_properties/list_catalog_properties.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalog_properties/update_catalog_property.py b/rootly_sdk/api/catalog_properties/update_catalog_property.py index 1b0b75e4..deed713b 100644 --- a/rootly_sdk/api/catalog_properties/update_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/update_catalog_property.py @@ -1,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.update_catalog_field import UpdateCatalogField -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalogs/create_catalog.py b/rootly_sdk/api/catalogs/create_catalog.py index f9e660f3..26a5a1b5 100644 --- a/rootly_sdk/api/catalogs/create_catalog.py +++ b/rootly_sdk/api/catalogs/create_catalog.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_response import CatalogResponse from ...models.errors_list import ErrorsList from ...models.new_catalog import NewCatalog -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalogs/delete_catalog.py b/rootly_sdk/api/catalogs/delete_catalog.py index 8e858477..42d16208 100644 --- a/rootly_sdk/api/catalogs/delete_catalog.py +++ b/rootly_sdk/api/catalogs/delete_catalog.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_response import CatalogResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalogs/get_catalog.py b/rootly_sdk/api/catalogs/get_catalog.py index 331b1a0e..feb8cb96 100644 --- a/rootly_sdk/api/catalogs/get_catalog.py +++ b/rootly_sdk/api/catalogs/get_catalog.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_response import CatalogResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/catalogs/list_catalogs.py b/rootly_sdk/api/catalogs/list_catalogs.py index 8ad79c0b..cec3d713 100644 --- a/rootly_sdk/api/catalogs/list_catalogs.py +++ b/rootly_sdk/api/catalogs/list_catalogs.py @@ -1,21 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_list import CatalogList -from ...models.list_catalogs_include import check_list_catalogs_include from ...models.list_catalogs_include import ListCatalogsInclude -from ...models.list_catalogs_sort import check_list_catalogs_sort from ...models.list_catalogs_sort import ListCatalogsSort -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/catalogs/update_catalog.py b/rootly_sdk/api/catalogs/update_catalog.py index db5a215e..dce674bf 100644 --- a/rootly_sdk/api/catalogs/update_catalog.py +++ b/rootly_sdk/api/catalogs/update_catalog.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_response import CatalogResponse from ...models.errors_list import ErrorsList from ...models.update_catalog import UpdateCatalog -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/causes/create_cause.py b/rootly_sdk/api/causes/create_cause.py index fa14841d..8bd51ac3 100644 --- a/rootly_sdk/api/causes/create_cause.py +++ b/rootly_sdk/api/causes/create_cause.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.cause_response import CauseResponse from ...models.errors_list import ErrorsList from ...models.new_cause import NewCause -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/causes/create_cause_catalog_property.py b/rootly_sdk/api/causes/create_cause_catalog_property.py index e6c83011..7cd1946d 100644 --- a/rootly_sdk/api/causes/create_cause_catalog_property.py +++ b/rootly_sdk/api/causes/create_cause_catalog_property.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/causes/delete_cause.py b/rootly_sdk/api/causes/delete_cause.py index 1f1e84a4..88f1748e 100644 --- a/rootly_sdk/api/causes/delete_cause.py +++ b/rootly_sdk/api/causes/delete_cause.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.cause_response import CauseResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/causes/get_cause.py b/rootly_sdk/api/causes/get_cause.py index ea732c54..15e506a5 100644 --- a/rootly_sdk/api/causes/get_cause.py +++ b/rootly_sdk/api/causes/get_cause.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.cause_response import CauseResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/causes/list_cause_catalog_properties.py b/rootly_sdk/api/causes/list_cause_catalog_properties.py index 42d3f937..8dc26366 100644 --- a/rootly_sdk/api/causes/list_cause_catalog_properties.py +++ b/rootly_sdk/api/causes/list_cause_catalog_properties.py @@ -1,21 +1,18 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_property_list import CatalogPropertyList -from ...models.list_cause_catalog_properties_include import check_list_cause_catalog_properties_include -from ...models.list_cause_catalog_properties_include import ListCauseCatalogPropertiesInclude -from ...models.list_cause_catalog_properties_sort import check_list_cause_catalog_properties_sort -from ...models.list_cause_catalog_properties_sort import ListCauseCatalogPropertiesSort -from ...types import UNSET, Unset -from typing import cast - +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( diff --git a/rootly_sdk/api/causes/list_causes.py b/rootly_sdk/api/causes/list_causes.py index 968992b6..4cc79768 100644 --- a/rootly_sdk/api/causes/list_causes.py +++ b/rootly_sdk/api/causes/list_causes.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.cause_list import CauseList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/causes/update_cause.py b/rootly_sdk/api/causes/update_cause.py index 86ad6763..f94fbb81 100644 --- a/rootly_sdk/api/causes/update_cause.py +++ b/rootly_sdk/api/causes/update_cause.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.cause_response import CauseResponse from ...models.errors_list import ErrorsList from ...models.update_cause import UpdateCause -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_groups/create_communications_group.py b/rootly_sdk/api/communications_groups/create_communications_group.py index 9506bca9..9629965a 100644 --- a/rootly_sdk/api/communications_groups/create_communications_group.py +++ b/rootly_sdk/api/communications_groups/create_communications_group.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_group_response import CommunicationsGroupResponse from ...models.errors_list import ErrorsList from ...models.new_communications_group import NewCommunicationsGroup -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_groups/delete_communications_group.py b/rootly_sdk/api/communications_groups/delete_communications_group.py index 516530d4..e92f8e0b 100644 --- a/rootly_sdk/api/communications_groups/delete_communications_group.py +++ b/rootly_sdk/api/communications_groups/delete_communications_group.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_groups/get_communications_group.py b/rootly_sdk/api/communications_groups/get_communications_group.py index b71dad26..b9d0ffe3 100644 --- a/rootly_sdk/api/communications_groups/get_communications_group.py +++ b/rootly_sdk/api/communications_groups/get_communications_group.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_group_response import CommunicationsGroupResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_groups/list_communications_groups.py b/rootly_sdk/api/communications_groups/list_communications_groups.py index c97f8d22..297d0da7 100644 --- a/rootly_sdk/api/communications_groups/list_communications_groups.py +++ b/rootly_sdk/api/communications_groups/list_communications_groups.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_groups_response import CommunicationsGroupsResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/communications_groups/update_communications_group.py b/rootly_sdk/api/communications_groups/update_communications_group.py index 8d6af593..623953cc 100644 --- a/rootly_sdk/api/communications_groups/update_communications_group.py +++ b/rootly_sdk/api/communications_groups/update_communications_group.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_group_response import CommunicationsGroupResponse from ...models.errors_list import ErrorsList from ...models.update_communications_group import UpdateCommunicationsGroup -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_stages/create_communications_stage.py b/rootly_sdk/api/communications_stages/create_communications_stage.py index fca2dfe8..463eb0f6 100644 --- a/rootly_sdk/api/communications_stages/create_communications_stage.py +++ b/rootly_sdk/api/communications_stages/create_communications_stage.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_stage_response import CommunicationsStageResponse from ...models.errors_list import ErrorsList from ...models.new_communications_stage import NewCommunicationsStage -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_stages/delete_communications_stage.py b/rootly_sdk/api/communications_stages/delete_communications_stage.py index bef4696d..f59bcae0 100644 --- a/rootly_sdk/api/communications_stages/delete_communications_stage.py +++ b/rootly_sdk/api/communications_stages/delete_communications_stage.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_stages/get_communications_stage.py b/rootly_sdk/api/communications_stages/get_communications_stage.py index f863a724..d8688d4d 100644 --- a/rootly_sdk/api/communications_stages/get_communications_stage.py +++ b/rootly_sdk/api/communications_stages/get_communications_stage.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_stage_response import CommunicationsStageResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_stages/list_communications_stages.py b/rootly_sdk/api/communications_stages/list_communications_stages.py index 9b0bda8f..7f718a58 100644 --- a/rootly_sdk/api/communications_stages/list_communications_stages.py +++ b/rootly_sdk/api/communications_stages/list_communications_stages.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_stages_response import CommunicationsStagesResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/communications_stages/update_communications_stage.py b/rootly_sdk/api/communications_stages/update_communications_stage.py index 0f6cca44..0c3a4dc2 100644 --- a/rootly_sdk/api/communications_stages/update_communications_stage.py +++ b/rootly_sdk/api/communications_stages/update_communications_stage.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_stage_response import CommunicationsStageResponse from ...models.errors_list import ErrorsList from ...models.update_communications_stage import UpdateCommunicationsStage -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_templates/create_communications_template.py b/rootly_sdk/api/communications_templates/create_communications_template.py index 75de326c..2759048a 100644 --- a/rootly_sdk/api/communications_templates/create_communications_template.py +++ b/rootly_sdk/api/communications_templates/create_communications_template.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_template_response import CommunicationsTemplateResponse from ...models.errors_list import ErrorsList from ...models.new_communications_template import NewCommunicationsTemplate -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_templates/delete_communications_template.py b/rootly_sdk/api/communications_templates/delete_communications_template.py index 3f846853..5ee1cf24 100644 --- a/rootly_sdk/api/communications_templates/delete_communications_template.py +++ b/rootly_sdk/api/communications_templates/delete_communications_template.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_templates/get_communications_template.py b/rootly_sdk/api/communications_templates/get_communications_template.py index 72af6c33..829d51bb 100644 --- a/rootly_sdk/api/communications_templates/get_communications_template.py +++ b/rootly_sdk/api/communications_templates/get_communications_template.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_template_response import CommunicationsTemplateResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_templates/list_communications_templates.py b/rootly_sdk/api/communications_templates/list_communications_templates.py index f830e2e1..568a1f25 100644 --- a/rootly_sdk/api/communications_templates/list_communications_templates.py +++ b/rootly_sdk/api/communications_templates/list_communications_templates.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_templates_response import CommunicationsTemplatesResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/communications_templates/update_communications_template.py b/rootly_sdk/api/communications_templates/update_communications_template.py index 6f985263..850b4735 100644 --- a/rootly_sdk/api/communications_templates/update_communications_template.py +++ b/rootly_sdk/api/communications_templates/update_communications_template.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_template_response import CommunicationsTemplateResponse from ...models.errors_list import ErrorsList from ...models.update_communications_template import UpdateCommunicationsTemplate -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_types/create_communications_type.py b/rootly_sdk/api/communications_types/create_communications_type.py index 7d2806f4..112b6b79 100644 --- a/rootly_sdk/api/communications_types/create_communications_type.py +++ b/rootly_sdk/api/communications_types/create_communications_type.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_type_response import CommunicationsTypeResponse from ...models.errors_list import ErrorsList from ...models.new_communications_type import NewCommunicationsType -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_types/delete_communications_type.py b/rootly_sdk/api/communications_types/delete_communications_type.py index 2460bf07..cffb4cd5 100644 --- a/rootly_sdk/api/communications_types/delete_communications_type.py +++ b/rootly_sdk/api/communications_types/delete_communications_type.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_types/get_communications_type.py b/rootly_sdk/api/communications_types/get_communications_type.py index 4f558e6a..ec64c460 100644 --- a/rootly_sdk/api/communications_types/get_communications_type.py +++ b/rootly_sdk/api/communications_types/get_communications_type.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_type_response import CommunicationsTypeResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/communications_types/list_communications_types.py b/rootly_sdk/api/communications_types/list_communications_types.py index 4522a426..af9a4f39 100644 --- a/rootly_sdk/api/communications_types/list_communications_types.py +++ b/rootly_sdk/api/communications_types/list_communications_types.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_types_response import CommunicationsTypesResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/communications_types/update_communications_type.py b/rootly_sdk/api/communications_types/update_communications_type.py index e5475fdc..06eb7292 100644 --- a/rootly_sdk/api/communications_types/update_communications_type.py +++ b/rootly_sdk/api/communications_types/update_communications_type.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.communications_type_response import CommunicationsTypeResponse from ...models.errors_list import ErrorsList from ...models.update_communications_type import UpdateCommunicationsType -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/custom_forms/create_custom_form.py b/rootly_sdk/api/custom_forms/create_custom_form.py index f3f56427..9f1c4f37 100644 --- a/rootly_sdk/api/custom_forms/create_custom_form.py +++ b/rootly_sdk/api/custom_forms/create_custom_form.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_form_response import CustomFormResponse from ...models.errors_list import ErrorsList from ...models.new_custom_form import NewCustomForm -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/custom_forms/delete_custom_form.py b/rootly_sdk/api/custom_forms/delete_custom_form.py index b649af70..63a8365e 100644 --- a/rootly_sdk/api/custom_forms/delete_custom_form.py +++ b/rootly_sdk/api/custom_forms/delete_custom_form.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_form_response import CustomFormResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/custom_forms/get_custom_form.py b/rootly_sdk/api/custom_forms/get_custom_form.py index bea2c487..54ea3a00 100644 --- a/rootly_sdk/api/custom_forms/get_custom_form.py +++ b/rootly_sdk/api/custom_forms/get_custom_form.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_form_response import CustomFormResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/custom_forms/list_custom_forms.py b/rootly_sdk/api/custom_forms/list_custom_forms.py index eb7f6a98..6b89d4e5 100644 --- a/rootly_sdk/api/custom_forms/list_custom_forms.py +++ b/rootly_sdk/api/custom_forms/list_custom_forms.py @@ -1,18 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_form_list import CustomFormList from ...models.errors_list import ErrorsList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/custom_forms/update_custom_form.py b/rootly_sdk/api/custom_forms/update_custom_form.py index b9a95a04..f185e7b9 100644 --- a/rootly_sdk/api/custom_forms/update_custom_form.py +++ b/rootly_sdk/api/custom_forms/update_custom_form.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_form_response import CustomFormResponse from ...models.errors_list import ErrorsList from ...models.update_custom_form import UpdateCustomForm -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py index 89493adb..6ddbc4fc 100644 --- a/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_panel_response import DashboardPanelResponse from ...models.errors_list import ErrorsList from ...models.new_dashboard_panel import NewDashboardPanel -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py index 1edd0a41..afb70631 100644 --- a/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py @@ -1,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_panel_response import DashboardPanelResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py index c90c415e..8d28108d 100644 --- a/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_panel_response import DashboardPanelResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py index dfe43d2f..c39fd56e 100644 --- a/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_panel_response import DashboardPanelResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py b/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py index 98c004c6..a6551476 100644 --- a/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py +++ b/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_panel_list import DashboardPanelList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py index de7e9262..dc059c1a 100644 --- a/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_panel_response import DashboardPanelResponse from ...models.update_dashboard_panel import UpdateDashboardPanel -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/dashboards/create_dashboard.py b/rootly_sdk/api/dashboards/create_dashboard.py index 8a2db4b3..256b02ba 100644 --- a/rootly_sdk/api/dashboards/create_dashboard.py +++ b/rootly_sdk/api/dashboards/create_dashboard.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList from ...models.new_dashboard import NewDashboard -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/dashboards/delete_dashboard.py b/rootly_sdk/api/dashboards/delete_dashboard.py index dcbb7fd2..f8ae2854 100644 --- a/rootly_sdk/api/dashboards/delete_dashboard.py +++ b/rootly_sdk/api/dashboards/delete_dashboard.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/dashboards/duplicate_dashboard.py b/rootly_sdk/api/dashboards/duplicate_dashboard.py index 666275ab..105e99a1 100644 --- a/rootly_sdk/api/dashboards/duplicate_dashboard.py +++ b/rootly_sdk/api/dashboards/duplicate_dashboard.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/dashboards/get_dashboard.py b/rootly_sdk/api/dashboards/get_dashboard.py index 2a38c62a..4e8c87fb 100644 --- a/rootly_sdk/api/dashboards/get_dashboard.py +++ b/rootly_sdk/api/dashboards/get_dashboard.py @@ -1,21 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList -from ...models.get_dashboard_include import check_get_dashboard_include from ...models.get_dashboard_include import GetDashboardInclude -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/dashboards/list_dashboards.py b/rootly_sdk/api/dashboards/list_dashboards.py index f94d1f4e..fbcd4f49 100644 --- a/rootly_sdk/api/dashboards/list_dashboards.py +++ b/rootly_sdk/api/dashboards/list_dashboards.py @@ -1,19 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_list import DashboardList -from ...models.list_dashboards_include import check_list_dashboards_include from ...models.list_dashboards_include import ListDashboardsInclude -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/dashboards/set_default_dashboard.py b/rootly_sdk/api/dashboards/set_default_dashboard.py index 72113a45..dc305a04 100644 --- a/rootly_sdk/api/dashboards/set_default_dashboard.py +++ b/rootly_sdk/api/dashboards/set_default_dashboard.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/dashboards/update_dashboard.py b/rootly_sdk/api/dashboards/update_dashboard.py index 59a90137..f82bc9a7 100644 --- a/rootly_sdk/api/dashboards/update_dashboard.py +++ b/rootly_sdk/api/dashboards/update_dashboard.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.dashboard_response import DashboardResponse from ...models.errors_list import ErrorsList from ...models.update_dashboard import UpdateDashboard -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 df9fb399..a0392f32 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_option_response import CustomFieldOptionResponse from ...models.errors_list import ErrorsList from ...models.new_custom_field_option import NewCustomFieldOption -from typing import cast - +from ...types import Response def _get_kwargs( 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 5878bd33..9c656bd4 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_option_response import CustomFieldOptionResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( 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 9146f885..71501ee7 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_option_response import CustomFieldOptionResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( 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 f0971722..6b28217c 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_option_list import CustomFieldOptionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 feb8b807..acb2c0a0 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_option_response import CustomFieldOptionResponse from ...models.errors_list import ErrorsList from ...models.update_custom_field_option import UpdateCustomFieldOption -from typing import cast - +from ...types import Response def _get_kwargs( 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 68023e0b..482ca452 100644 --- a/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_response import CustomFieldResponse from ...models.errors_list import ErrorsList from ...models.new_custom_field import NewCustomField -from typing import cast - +from ...types import Response def _get_kwargs( 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 6eafe34b..50ad8c96 100644 --- a/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_response import CustomFieldResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( 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 97fcf0e6..e8ad6044 100644 --- a/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py @@ -1,20 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_response import CustomFieldResponse from ...models.errors_list import ErrorsList -from ...models.get_custom_field_include import check_get_custom_field_include from ...models.get_custom_field_include import GetCustomFieldInclude -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 11281eb7..d68db25c 100644 --- a/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py +++ b/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py @@ -1,21 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_list import CustomFieldList -from ...models.list_custom_fields_include import check_list_custom_fields_include from ...models.list_custom_fields_include import ListCustomFieldsInclude -from ...models.list_custom_fields_sort import check_list_custom_fields_sort from ...models.list_custom_fields_sort import ListCustomFieldsSort -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 a58c79c2..0ba56758 100644 --- a/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.custom_field_response import CustomFieldResponse from ...models.errors_list import ErrorsList from ...models.update_custom_field import UpdateCustomField -from typing import cast - +from ...types import Response def _get_kwargs( 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 ae593549..06ebac6a 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_custom_field_selection_response import IncidentCustomFieldSelectionResponse from ...models.new_incident_custom_field_selection import NewIncidentCustomFieldSelection -from typing import cast - +from ...types import Response def _get_kwargs( 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 e85c6d46..0cd1f383 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_custom_field_selection_response import IncidentCustomFieldSelectionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 3cc4aac1..dd0ec92c 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_custom_field_selection_response import IncidentCustomFieldSelectionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 5e90c061..da27f5c7 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_custom_field_selection_list import IncidentCustomFieldSelectionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 9d295756..4e4b366f 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_custom_field_selection_response import IncidentCustomFieldSelectionResponse from ...models.update_incident_custom_field_selection import UpdateIncidentCustomFieldSelection -from typing import cast - +from ...types import Response def _get_kwargs( 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 2feb751e..9075f7fa 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_workflow_custom_field_selection import NewWorkflowCustomFieldSelection from ...models.workflow_custom_field_selection_response import WorkflowCustomFieldSelectionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 dc9d28c2..e52d22d9 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_custom_field_selection_response import WorkflowCustomFieldSelectionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 1ec23f7e..3d0c44d3 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_custom_field_selection_response import WorkflowCustomFieldSelectionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 02bd027c..c176ca23 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.workflow_custom_field_selection_list import WorkflowCustomFieldSelectionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 8fa2f5d9..9121d12e 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_workflow_custom_field_selection import UpdateWorkflowCustomFieldSelection from ...models.workflow_custom_field_selection_response import WorkflowCustomFieldSelectionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 868af55b..0857f020 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.create_edge_connector_action_body import CreateEdgeConnectorActionBody -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 9e7ea56d..5ee851ad 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,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from typing import cast -from uuid import UUID - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_kwargs( 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 54986417..7a6bb8de 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,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from typing import cast -from uuid import UUID - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_kwargs( 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 8d433357..ad1634f3 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,14 +1,12 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_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 73c3b584..ea9f2b21 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,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.update_edge_connector_action_body import UpdateEdgeConnectorActionBody -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/edge_connectors/create_edge_connector.py b/rootly_sdk/api/edge_connectors/create_edge_connector.py index a1df019c..5b966f4f 100644 --- a/rootly_sdk/api/edge_connectors/create_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/create_edge_connector.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.create_edge_connector_body import CreateEdgeConnectorBody -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/edge_connectors/delete_edge_connector.py b/rootly_sdk/api/edge_connectors/delete_edge_connector.py index f8bba5fd..9e530be1 100644 --- a/rootly_sdk/api/edge_connectors/delete_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/delete_edge_connector.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/edge_connectors/get_edge_connector.py b/rootly_sdk/api/edge_connectors/get_edge_connector.py index 38fbc866..25c22904 100644 --- a/rootly_sdk/api/edge_connectors/get_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/get_edge_connector.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/edge_connectors/list_edge_connectors.py b/rootly_sdk/api/edge_connectors/list_edge_connectors.py index e089abd0..058206c6 100644 --- a/rootly_sdk/api/edge_connectors/list_edge_connectors.py +++ b/rootly_sdk/api/edge_connectors/list_edge_connectors.py @@ -1,15 +1,11 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...types import UNSET, Unset - +from ...client import AuthenticatedClient, Client +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/edge_connectors/update_edge_connector.py b/rootly_sdk/api/edge_connectors/update_edge_connector.py index 4e85655f..6860a289 100644 --- a/rootly_sdk/api/edge_connectors/update_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/update_edge_connector.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.update_edge_connector_body import UpdateEdgeConnectorBody -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/environments/bulk_delete_environments.py b/rootly_sdk/api/environments/bulk_delete_environments.py index 929fb48c..8ad388d8 100644 --- a/rootly_sdk/api/environments/bulk_delete_environments.py +++ b/rootly_sdk/api/environments/bulk_delete_environments.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_destroy_environments_response import BulkDestroyEnvironmentsResponse from ...models.bulk_destroy_environments_type_0 import BulkDestroyEnvironmentsType0 from ...models.bulk_destroy_environments_type_1 import BulkDestroyEnvironmentsType1 from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/environments/bulk_upsert_environments.py b/rootly_sdk/api/environments/bulk_upsert_environments.py index c2ab1fdf..7453ece4 100644 --- a/rootly_sdk/api/environments/bulk_upsert_environments.py +++ b/rootly_sdk/api/environments/bulk_upsert_environments.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_upsert_environments import BulkUpsertEnvironments from ...models.bulk_upsert_environments_error import BulkUpsertEnvironmentsError from ...models.bulk_upsert_environments_response import BulkUpsertEnvironmentsResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/environments/create_environment.py b/rootly_sdk/api/environments/create_environment.py index 8555b183..a055ac76 100644 --- a/rootly_sdk/api/environments/create_environment.py +++ b/rootly_sdk/api/environments/create_environment.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.environment_response import EnvironmentResponse from ...models.errors_list import ErrorsList from ...models.new_environment import NewEnvironment -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/environments/create_environment_catalog_property.py b/rootly_sdk/api/environments/create_environment_catalog_property.py index e996cb06..6b420a6d 100644 --- a/rootly_sdk/api/environments/create_environment_catalog_property.py +++ b/rootly_sdk/api/environments/create_environment_catalog_property.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/environments/delete_environment.py b/rootly_sdk/api/environments/delete_environment.py index 99da46aa..81b32be0 100644 --- a/rootly_sdk/api/environments/delete_environment.py +++ b/rootly_sdk/api/environments/delete_environment.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.environment_response import EnvironmentResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/environments/get_environment.py b/rootly_sdk/api/environments/get_environment.py index 843161c0..f2380678 100644 --- a/rootly_sdk/api/environments/get_environment.py +++ b/rootly_sdk/api/environments/get_environment.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.environment_response import EnvironmentResponse from ...models.errors_list import ErrorsList -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/environments/list_environment_catalog_properties.py b/rootly_sdk/api/environments/list_environment_catalog_properties.py index 88e8fd4a..ea219c9c 100644 --- a/rootly_sdk/api/environments/list_environment_catalog_properties.py +++ b/rootly_sdk/api/environments/list_environment_catalog_properties.py @@ -1,21 +1,18 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_property_list import CatalogPropertyList -from ...models.list_environment_catalog_properties_include import check_list_environment_catalog_properties_include -from ...models.list_environment_catalog_properties_include import ListEnvironmentCatalogPropertiesInclude -from ...models.list_environment_catalog_properties_sort import check_list_environment_catalog_properties_sort -from ...models.list_environment_catalog_properties_sort import ListEnvironmentCatalogPropertiesSort -from ...types import UNSET, Unset -from typing import cast - +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( diff --git a/rootly_sdk/api/environments/list_environments.py b/rootly_sdk/api/environments/list_environments.py index 439e91bc..3aa67e79 100644 --- a/rootly_sdk/api/environments/list_environments.py +++ b/rootly_sdk/api/environments/list_environments.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.environment_list import EnvironmentList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/environments/update_environment.py b/rootly_sdk/api/environments/update_environment.py index 1299e5a2..c34ccb7c 100644 --- a/rootly_sdk/api/environments/update_environment.py +++ b/rootly_sdk/api/environments/update_environment.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.environment_response import EnvironmentResponse from ...models.errors_list import ErrorsList from ...models.update_environment import UpdateEnvironment -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/escalation_levels/delete_escalation_level.py b/rootly_sdk/api/escalation_levels/delete_escalation_level.py index fa1fef59..9d6b518d 100644 --- a/rootly_sdk/api/escalation_levels/delete_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/delete_escalation_level.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/escalation_levels/get_escalation_level.py b/rootly_sdk/api/escalation_levels/get_escalation_level.py index aa1ce98e..ff0c8732 100644 --- a/rootly_sdk/api/escalation_levels/get_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/get_escalation_level.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/escalation_levels/update_escalation_level.py b/rootly_sdk/api/escalation_levels/update_escalation_level.py index 61cea6f7..a6b541fa 100644 --- a/rootly_sdk/api/escalation_levels/update_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/update_escalation_level.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse from ...models.update_escalation_policy_level import UpdateEscalationPolicyLevel -from typing import cast - +from ...types import Response def _get_kwargs( 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 de796cb9..2a5e8c97 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse from ...models.new_escalation_policy_level import NewEscalationPolicyLevel -from typing import cast - +from ...types import Response def _get_kwargs( 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 b91a1307..3795fa16 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.escalation_policy_level_list import EscalationPolicyLevelList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 6b3f382b..51335743 100644 --- a/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py +++ b/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_level_response import EscalationPolicyLevelResponse from ...models.new_escalation_policy_level import NewEscalationPolicyLevel -from typing import cast - +from ...types import Response def _get_kwargs( 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 486e6e69..7704c3a1 100644 --- a/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py +++ b/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.escalation_policy_level_list import EscalationPolicyLevelList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/escalation_paths/create_escalation_path.py b/rootly_sdk/api/escalation_paths/create_escalation_path.py index b97453aa..ad603591 100644 --- a/rootly_sdk/api/escalation_paths/create_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/create_escalation_path.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/escalation_paths/delete_escalation_path.py b/rootly_sdk/api/escalation_paths/delete_escalation_path.py index bb74bc35..d184347e 100644 --- a/rootly_sdk/api/escalation_paths/delete_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/delete_escalation_path.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_path_response import EscalationPolicyPathResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/escalation_paths/get_escalation_path.py b/rootly_sdk/api/escalation_paths/get_escalation_path.py index d4152307..6868f03a 100644 --- a/rootly_sdk/api/escalation_paths/get_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/get_escalation_path.py @@ -1,20 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_path_response import EscalationPolicyPathResponse -from ...models.get_escalation_path_include import check_get_escalation_path_include from ...models.get_escalation_path_include import GetEscalationPathInclude -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/escalation_paths/list_escalation_paths.py b/rootly_sdk/api/escalation_paths/list_escalation_paths.py index 211b1939..653a486e 100644 --- a/rootly_sdk/api/escalation_paths/list_escalation_paths.py +++ b/rootly_sdk/api/escalation_paths/list_escalation_paths.py @@ -1,21 +1,17 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.escalation_policy_path_list import EscalationPolicyPathList -from ...models.list_escalation_paths_filterpath_type import check_list_escalation_paths_filterpath_type -from ...models.list_escalation_paths_filterpath_type import ListEscalationPathsFilterpathType -from ...models.list_escalation_paths_include import check_list_escalation_paths_include +from ...models.list_escalation_paths_filterpath_type import ( + ListEscalationPathsFilterpathType, +) from ...models.list_escalation_paths_include import ListEscalationPathsInclude -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/escalation_paths/update_escalation_path.py b/rootly_sdk/api/escalation_paths/update_escalation_path.py index 7c607b5a..fa218ee5 100644 --- a/rootly_sdk/api/escalation_paths/update_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/update_escalation_path.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/escalation_policies/create_escalation_policy.py b/rootly_sdk/api/escalation_policies/create_escalation_policy.py index 519d5058..b2648b67 100644 --- a/rootly_sdk/api/escalation_policies/create_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/create_escalation_policy.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_response import EscalationPolicyResponse from ...models.new_escalation_policy import NewEscalationPolicy -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/escalation_policies/delete_escalation_policy.py b/rootly_sdk/api/escalation_policies/delete_escalation_policy.py index b246f56c..cb378563 100644 --- a/rootly_sdk/api/escalation_policies/delete_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/delete_escalation_policy.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_response import EscalationPolicyResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/escalation_policies/get_escalation_policy.py b/rootly_sdk/api/escalation_policies/get_escalation_policy.py index 95f20aa2..96cd17f6 100644 --- a/rootly_sdk/api/escalation_policies/get_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/get_escalation_policy.py @@ -1,20 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_response import EscalationPolicyResponse -from ...models.get_escalation_policy_include import check_get_escalation_policy_include from ...models.get_escalation_policy_include import GetEscalationPolicyInclude -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/escalation_policies/list_escalation_policies.py b/rootly_sdk/api/escalation_policies/list_escalation_policies.py index 37f84d7a..4cd13ec4 100644 --- a/rootly_sdk/api/escalation_policies/list_escalation_policies.py +++ b/rootly_sdk/api/escalation_policies/list_escalation_policies.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.escalation_policy_list import EscalationPolicyList -from ...models.list_escalation_policies_include import check_list_escalation_policies_include -from ...models.list_escalation_policies_include import ListEscalationPoliciesInclude -from ...types import UNSET, Unset -from typing import cast - +from ...models.list_escalation_policies_include import ( + ListEscalationPoliciesInclude, +) +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/escalation_policies/update_escalation_policy.py b/rootly_sdk/api/escalation_policies/update_escalation_policy.py index b29467cf..3396f93f 100644 --- a/rootly_sdk/api/escalation_policies/update_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/update_escalation_policy.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.escalation_policy_response import EscalationPolicyResponse from ...models.update_escalation_policy import UpdateEscalationPolicy -from typing import cast - +from ...types import Response def _get_kwargs( 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 e1147cb0..3ec080b6 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_option_response import FormFieldOptionResponse from ...models.new_form_field_option import NewFormFieldOption -from typing import cast - +from ...types import Response def _get_kwargs( 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 5488a705..44d1ea06 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_option_response import FormFieldOptionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 7f068d7b..067eef00 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_option_response import FormFieldOptionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 6b6e13b6..b47d4564 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.form_field_option_list import FormFieldOptionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 da8ac582..98c87a45 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_option_response import FormFieldOptionResponse from ...models.update_form_field_option import UpdateFormFieldOption -from typing import cast - +from ...types import Response def _get_kwargs( 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 746f10f4..99083139 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_placement_condition_response import FormFieldPlacementConditionResponse from ...models.new_form_field_placement_condition import NewFormFieldPlacementCondition -from typing import cast - +from ...types import Response def _get_kwargs( 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 a7501f2e..45357b5f 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_placement_condition_response import FormFieldPlacementConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 7d480c02..c3c810a1 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_placement_condition_response import FormFieldPlacementConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 7683e5c4..a0b1ba35 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.form_field_placement_condition_list import FormFieldPlacementConditionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 92d19b55..247a37f6 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_placement_condition_response import FormFieldPlacementConditionResponse from ...models.update_form_field_placement_condition import UpdateFormFieldPlacementCondition -from typing import cast - +from ...types import Response def _get_kwargs( 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 59556c64..08a7cb58 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_placement_response import FormFieldPlacementResponse from ...models.new_form_field_placement import NewFormFieldPlacement -from typing import cast - +from ...types import Response def _get_kwargs( 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 73e7fc9b..a2452047 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_placement_response import FormFieldPlacementResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 f5d8e959..c7059936 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_placement_response import FormFieldPlacementResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 34a8fbba..89415a1e 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.form_field_placement_list import FormFieldPlacementList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 a680a91e..800c761c 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_placement_response import FormFieldPlacementResponse from ...models.update_form_field_placement import UpdateFormFieldPlacement -from typing import cast - +from ...types import Response def _get_kwargs( 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 faf711b5..25b50d6f 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_position_response import FormFieldPositionResponse from ...models.new_form_field_position import NewFormFieldPosition -from typing import cast - +from ...types import Response def _get_kwargs( 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 7a93195d..44d97159 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_position_response import FormFieldPositionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 6dbcafc7..9b7084ba 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_position_response import FormFieldPositionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 4d0a0b61..01c985f4 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.form_field_position_list import FormFieldPositionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 c47c23d2..f78b8675 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_position_response import FormFieldPositionResponse from ...models.update_form_field_position import UpdateFormFieldPosition -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/form_fields/create_form_field.py b/rootly_sdk/api/form_fields/create_form_field.py index 84d8f949..69e99997 100644 --- a/rootly_sdk/api/form_fields/create_form_field.py +++ b/rootly_sdk/api/form_fields/create_form_field.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_response import FormFieldResponse from ...models.new_form_field import NewFormField -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/form_fields/delete_form_field.py b/rootly_sdk/api/form_fields/delete_form_field.py index 810c36dc..315b6642 100644 --- a/rootly_sdk/api/form_fields/delete_form_field.py +++ b/rootly_sdk/api/form_fields/delete_form_field.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_response import FormFieldResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/form_fields/get_form_field.py b/rootly_sdk/api/form_fields/get_form_field.py index 126f212b..745bd269 100644 --- a/rootly_sdk/api/form_fields/get_form_field.py +++ b/rootly_sdk/api/form_fields/get_form_field.py @@ -1,21 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_response import FormFieldResponse -from ...models.get_form_field_include import check_get_form_field_include from ...models.get_form_field_include import GetFormFieldInclude -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/form_fields/list_form_fields.py b/rootly_sdk/api/form_fields/list_form_fields.py index e9ac7abb..ea75ba3b 100644 --- a/rootly_sdk/api/form_fields/list_form_fields.py +++ b/rootly_sdk/api/form_fields/list_form_fields.py @@ -1,19 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.form_field_list import FormFieldList -from ...models.list_form_fields_include import check_list_form_fields_include from ...models.list_form_fields_include import ListFormFieldsInclude -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/form_fields/update_form_field.py b/rootly_sdk/api/form_fields/update_form_field.py index 2f32140b..124f68dc 100644 --- a/rootly_sdk/api/form_fields/update_form_field.py +++ b/rootly_sdk/api/form_fields/update_form_field.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_field_response import FormFieldResponse from ...models.update_form_field import UpdateFormField -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 e2db3a03..adacbacf 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_set_condition_response import FormSetConditionResponse from ...models.new_form_set_condition import NewFormSetCondition -from typing import cast - +from ...types import Response def _get_kwargs( 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 931a168b..b91f0b81 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_set_condition_response import FormSetConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 c7305f18..ad6e2cf1 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_set_condition_response import FormSetConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 8df325a5..e0314f3b 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.form_set_condition_list import FormSetConditionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 7a98e915..69b13d56 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_set_condition_response import FormSetConditionResponse from ...models.update_form_set_condition import UpdateFormSetCondition -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/form_sets/create_form_set.py b/rootly_sdk/api/form_sets/create_form_set.py index 4b496371..39a33616 100644 --- a/rootly_sdk/api/form_sets/create_form_set.py +++ b/rootly_sdk/api/form_sets/create_form_set.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_set_response import FormSetResponse from ...models.new_form_set import NewFormSet -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/form_sets/delete_form_set.py b/rootly_sdk/api/form_sets/delete_form_set.py index 7a004e52..6340ae9e 100644 --- a/rootly_sdk/api/form_sets/delete_form_set.py +++ b/rootly_sdk/api/form_sets/delete_form_set.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_set_response import FormSetResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/form_sets/get_form_set.py b/rootly_sdk/api/form_sets/get_form_set.py index da2ea311..0fc9f094 100644 --- a/rootly_sdk/api/form_sets/get_form_set.py +++ b/rootly_sdk/api/form_sets/get_form_set.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_set_response import FormSetResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/form_sets/list_form_sets.py b/rootly_sdk/api/form_sets/list_form_sets.py index c6623b77..caa91fc0 100644 --- a/rootly_sdk/api/form_sets/list_form_sets.py +++ b/rootly_sdk/api/form_sets/list_form_sets.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.form_set_list import FormSetList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/form_sets/update_form_set.py b/rootly_sdk/api/form_sets/update_form_set.py index b8ca09e8..e5c379c1 100644 --- a/rootly_sdk/api/form_sets/update_form_set.py +++ b/rootly_sdk/api/form_sets/update_form_set.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.form_set_response import FormSetResponse from ...models.update_form_set import UpdateFormSet -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/bulk_delete_functionalities.py b/rootly_sdk/api/functionalities/bulk_delete_functionalities.py index 86dd250a..a2a728e3 100644 --- a/rootly_sdk/api/functionalities/bulk_delete_functionalities.py +++ b/rootly_sdk/api/functionalities/bulk_delete_functionalities.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_destroy_functionalities_response import BulkDestroyFunctionalitiesResponse from ...models.bulk_destroy_functionalities_type_0 import BulkDestroyFunctionalitiesType0 from ...models.bulk_destroy_functionalities_type_1 import BulkDestroyFunctionalitiesType1 from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py b/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py index 0dfc0dfd..4235138c 100644 --- a/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py +++ b/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_upsert_functionalities import BulkUpsertFunctionalities from ...models.bulk_upsert_functionalities_error import BulkUpsertFunctionalitiesError from ...models.bulk_upsert_functionalities_response import BulkUpsertFunctionalitiesResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/create_functionality.py b/rootly_sdk/api/functionalities/create_functionality.py index 6aa5c741..b79e4306 100644 --- a/rootly_sdk/api/functionalities/create_functionality.py +++ b/rootly_sdk/api/functionalities/create_functionality.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.functionality_response import FunctionalityResponse from ...models.new_functionality import NewFunctionality -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/create_functionality_catalog_property.py b/rootly_sdk/api/functionalities/create_functionality_catalog_property.py index 2506f8e9..a9ad8a31 100644 --- a/rootly_sdk/api/functionalities/create_functionality_catalog_property.py +++ b/rootly_sdk/api/functionalities/create_functionality_catalog_property.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/delete_functionality.py b/rootly_sdk/api/functionalities/delete_functionality.py index 8adb5070..9058b807 100644 --- a/rootly_sdk/api/functionalities/delete_functionality.py +++ b/rootly_sdk/api/functionalities/delete_functionality.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.functionality_response import FunctionalityResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/get_functionality.py b/rootly_sdk/api/functionalities/get_functionality.py index c092b072..8a1ff0ad 100644 --- a/rootly_sdk/api/functionalities/get_functionality.py +++ b/rootly_sdk/api/functionalities/get_functionality.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.functionality_response import FunctionalityResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py b/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py index e02310c7..cacf84e4 100644 --- a/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py +++ b/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incidents_chart_response import IncidentsChartResponse -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py b/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py index 6e353a05..a4f724f0 100644 --- a/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py +++ b/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.uptime_chart_response import UptimeChartResponse -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/list_functionalities.py b/rootly_sdk/api/functionalities/list_functionalities.py index 4802aa3e..26824d9d 100644 --- a/rootly_sdk/api/functionalities/list_functionalities.py +++ b/rootly_sdk/api/functionalities/list_functionalities.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.functionality_list import FunctionalityList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py b/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py index 0a1c7691..d777a756 100644 --- a/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py +++ b/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py @@ -1,21 +1,18 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_property_list import CatalogPropertyList -from ...models.list_functionality_catalog_properties_include import check_list_functionality_catalog_properties_include -from ...models.list_functionality_catalog_properties_include import ListFunctionalityCatalogPropertiesInclude -from ...models.list_functionality_catalog_properties_sort import check_list_functionality_catalog_properties_sort -from ...models.list_functionality_catalog_properties_sort import ListFunctionalityCatalogPropertiesSort -from ...types import UNSET, Unset -from typing import cast - +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( diff --git a/rootly_sdk/api/functionalities/update_functionality.py b/rootly_sdk/api/functionalities/update_functionality.py index 9b41a925..10a0e0fb 100644 --- a/rootly_sdk/api/functionalities/update_functionality.py +++ b/rootly_sdk/api/functionalities/update_functionality.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.functionality_response import FunctionalityResponse from ...models.update_functionality import UpdateFunctionality -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/heartbeats/create_heartbeat.py b/rootly_sdk/api/heartbeats/create_heartbeat.py index 659ae78a..131c0c47 100644 --- a/rootly_sdk/api/heartbeats/create_heartbeat.py +++ b/rootly_sdk/api/heartbeats/create_heartbeat.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.heartbeat_response import HeartbeatResponse from ...models.new_heartbeat import NewHeartbeat -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/heartbeats/delete_heartbeat.py b/rootly_sdk/api/heartbeats/delete_heartbeat.py index 373b567c..d0e074a6 100644 --- a/rootly_sdk/api/heartbeats/delete_heartbeat.py +++ b/rootly_sdk/api/heartbeats/delete_heartbeat.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.heartbeat_response import HeartbeatResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/heartbeats/get_heartbeat.py b/rootly_sdk/api/heartbeats/get_heartbeat.py index 48cb4013..71815aa4 100644 --- a/rootly_sdk/api/heartbeats/get_heartbeat.py +++ b/rootly_sdk/api/heartbeats/get_heartbeat.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.heartbeat_response import HeartbeatResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/heartbeats/list_heartbeats.py b/rootly_sdk/api/heartbeats/list_heartbeats.py index bcd3892d..7541ab51 100644 --- a/rootly_sdk/api/heartbeats/list_heartbeats.py +++ b/rootly_sdk/api/heartbeats/list_heartbeats.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.heartbeat_list import HeartbeatList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/heartbeats/ping_heartbeat.py b/rootly_sdk/api/heartbeats/ping_heartbeat.py index 20531477..73ecf716 100644 --- a/rootly_sdk/api/heartbeats/ping_heartbeat.py +++ b/rootly_sdk/api/heartbeats/ping_heartbeat.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/heartbeats/update_heartbeat.py b/rootly_sdk/api/heartbeats/update_heartbeat.py index 35f1c463..4678ad52 100644 --- a/rootly_sdk/api/heartbeats/update_heartbeat.py +++ b/rootly_sdk/api/heartbeats/update_heartbeat.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.heartbeat_response import HeartbeatResponse from ...models.update_heartbeat import UpdateHeartbeat -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 fc1362c8..7c803ea2 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_action_item_response import IncidentActionItemResponse from ...models.new_incident_action_item import NewIncidentActionItem -from typing import cast - +from ...types import Response def _get_kwargs( 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 871be069..a0531432 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_action_item_response import IncidentActionItemResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 1b53fa85..89e216d2 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_action_item_response import IncidentActionItemResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 4b44e418..b49a37a6 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 @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_action_item_list import IncidentActionItemList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 3fab3a06..2225114c 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_action_item_list import IncidentActionItemList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 c2afc72b..fa9e5b6c 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_action_item_response import IncidentActionItemResponse from ...models.update_incident_action_item import UpdateIncidentActionItem -from typing import cast - +from ...types import Response def _get_kwargs( 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 b59aac0e..0ee3636d 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_functionality_response import IncidentEventFunctionalityResponse from ...models.new_incident_event_functionality import NewIncidentEventFunctionality -from typing import cast - +from ...types import Response def _get_kwargs( 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 bd603432..cd943b9a 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_functionality_response import IncidentEventFunctionalityResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 e8e826dc..df4477cd 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_functionality_response import IncidentEventFunctionalityResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 d7a9779c..27262b17 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_event_functionality_list import IncidentEventFunctionalityList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 602dd8bf..a9aa0308 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_functionality_response import IncidentEventFunctionalityResponse from ...models.update_incident_event_functionality import UpdateIncidentEventFunctionality -from typing import cast - +from ...types import Response def _get_kwargs( 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 0a5608e5..30d48d80 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_service_response import IncidentEventServiceResponse from ...models.new_incident_event_service import NewIncidentEventService -from typing import cast - +from ...types import Response def _get_kwargs( 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 98572707..dc764c79 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_service_response import IncidentEventServiceResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 30c7dc65..a2e1c94c 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_service_response import IncidentEventServiceResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 c8bf6953..897be651 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_event_service_list import IncidentEventServiceList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 6090ca8c..9fcc8ac2 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_service_response import IncidentEventServiceResponse from ...models.update_incident_event_service import UpdateIncidentEventService -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_events/create_incident_event.py b/rootly_sdk/api/incident_events/create_incident_event.py index 16414f40..975fdd15 100644 --- a/rootly_sdk/api/incident_events/create_incident_event.py +++ b/rootly_sdk/api/incident_events/create_incident_event.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_response import IncidentEventResponse from ...models.new_incident_event import NewIncidentEvent -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_events/delete_incident_event.py b/rootly_sdk/api/incident_events/delete_incident_event.py index 0ab2f973..dde09ce7 100644 --- a/rootly_sdk/api/incident_events/delete_incident_event.py +++ b/rootly_sdk/api/incident_events/delete_incident_event.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_response import IncidentEventResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_events/get_incident_events.py b/rootly_sdk/api/incident_events/get_incident_events.py index fe29704a..74935cfe 100644 --- a/rootly_sdk/api/incident_events/get_incident_events.py +++ b/rootly_sdk/api/incident_events/get_incident_events.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_response import IncidentEventResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_events/list_incident_events.py b/rootly_sdk/api/incident_events/list_incident_events.py index cbcdf984..e4a68f31 100644 --- a/rootly_sdk/api/incident_events/list_incident_events.py +++ b/rootly_sdk/api/incident_events/list_incident_events.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_event_list import IncidentEventList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/incident_events/update_incident_event.py b/rootly_sdk/api/incident_events/update_incident_event.py index ed2c364b..1469142f 100644 --- a/rootly_sdk/api/incident_events/update_incident_event.py +++ b/rootly_sdk/api/incident_events/update_incident_event.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_event_response import IncidentEventResponse from ...models.update_incident_event import UpdateIncidentEvent -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py b/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py index 78b9fcf5..6e9c12a1 100644 --- a/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py +++ b/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_feedback_response import IncidentFeedbackResponse from ...models.new_incident_feedback import NewIncidentFeedback -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py b/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py index cbb6f361..17d06d9f 100644 --- a/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py +++ b/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_feedback_response import IncidentFeedbackResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py b/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py index 74fdfc8a..8a51aa0e 100644 --- a/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py +++ b/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_feedback_list import IncidentFeedbackList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py b/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py index 46c9539d..9d4f16fc 100644 --- a/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py +++ b/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_feedback_response import IncidentFeedbackResponse from ...models.update_incident_feedback import UpdateIncidentFeedback -from typing import cast - +from ...types import Response def _get_kwargs( 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 54f60a94..5c3a915c 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_form_field_selection_response import IncidentFormFieldSelectionResponse from ...models.new_incident_form_field_selection import NewIncidentFormFieldSelection -from typing import cast - +from ...types import Response def _get_kwargs( 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 4433c29b..fe1cb4e3 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_form_field_selection_response import IncidentFormFieldSelectionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 9acae791..ca1a4a9f 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_form_field_selection_response import IncidentFormFieldSelectionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 c557606c..17c20f24 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_form_field_selection_list import IncidentFormFieldSelectionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 7583768b..aba618af 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_form_field_selection_response import IncidentFormFieldSelectionResponse from ...models.update_incident_form_field_selection import UpdateIncidentFormFieldSelection -from typing import cast - +from ...types import Response def _get_kwargs( 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 30622787..607f7298 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_boolean_response import IncidentPermissionSetBooleanResponse from ...models.new_incident_permission_set_boolean import NewIncidentPermissionSetBoolean -from typing import cast - +from ...types import Response def _get_kwargs( 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 7090a597..e598c884 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_boolean_response import IncidentPermissionSetBooleanResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 d2e47554..aa80c007 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_boolean_response import IncidentPermissionSetBooleanResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 e19139b6..6eff6afd 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_permission_set_boolean_list import IncidentPermissionSetBooleanList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 c915f66c..17dbb2cb 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_boolean_response import IncidentPermissionSetBooleanResponse from ...models.update_incident_permission_set_boolean import UpdateIncidentPermissionSetBoolean -from typing import cast - +from ...types import Response def _get_kwargs( 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 49c9d87e..e45f7c5a 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_resource_response import IncidentPermissionSetResourceResponse from ...models.new_incident_permission_set_resource import NewIncidentPermissionSetResource -from typing import cast - +from ...types import Response def _get_kwargs( 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 1c193c48..aca0ab84 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_resource_response import IncidentPermissionSetResourceResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 c7416ba0..fe7af8bf 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_resource_response import IncidentPermissionSetResourceResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 b181e857..0168fe14 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_permission_set_resource_list import IncidentPermissionSetResourceList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 463642de..eecff994 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_resource_response import IncidentPermissionSetResourceResponse from ...models.update_incident_permission_set_resource import UpdateIncidentPermissionSetResource -from typing import cast - +from ...types import Response def _get_kwargs( 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 aea0f9d1..89ebb0de 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 @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_response import IncidentPermissionSetResponse from ...models.new_incident_permission_set import NewIncidentPermissionSet -from typing import cast - +from ...types import Response def _get_kwargs( 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 95f527e9..296efca0 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_response import IncidentPermissionSetResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 96f9c524..39700ce7 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_response import IncidentPermissionSetResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 06a0f872..a1683617 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 @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_permission_set_list import IncidentPermissionSetList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 59929f9e..339db3e5 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,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_permission_set_response import IncidentPermissionSetResponse from ...models.update_incident_permission_set import UpdateIncidentPermissionSet -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 56038245..603a5c40 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_retrospective_step_response import IncidentRetrospectiveStepResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 4ba7ebaf..1d483eba 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_retrospective_step_response import IncidentRetrospectiveStepResponse from ...models.update_incident_retrospective_step import UpdateIncidentRetrospectiveStep -from typing import cast - +from ...types import Response def _get_kwargs( 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 a820473e..034a4883 100644 --- a/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py +++ b/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_post_mortem_list import IncidentPostMortemList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py b/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py index 600ca77b..79242118 100644 --- a/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py +++ b/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_post_mortem_response import IncidentPostMortemResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py b/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py index bf338595..46ae4974 100644 --- a/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py +++ b/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_post_mortem_response import IncidentPostMortemResponse from ...models.update_incident_post_mortem import UpdateIncidentPostMortem -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 f9b6ea0c..56362106 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_role_task_response import IncidentRoleTaskResponse from ...models.new_incident_role_task import NewIncidentRoleTask -from typing import cast - +from ...types import Response def _get_kwargs( 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 f4bbf584..160b9bb0 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_role_task_response import IncidentRoleTaskResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 7fc1a514..4b763173 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_role_task_response import IncidentRoleTaskResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 794326ce..4f911371 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_role_task_list import IncidentRoleTaskList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 1347d12a..7b7f591b 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_role_task_response import IncidentRoleTaskResponse from ...models.update_incident_role_task import UpdateIncidentRoleTask -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_roles/create_incident_role.py b/rootly_sdk/api/incident_roles/create_incident_role.py index 8854e377..1c153986 100644 --- a/rootly_sdk/api/incident_roles/create_incident_role.py +++ b/rootly_sdk/api/incident_roles/create_incident_role.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_role_response import IncidentRoleResponse from ...models.new_incident_role import NewIncidentRole -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_roles/delete_incident_role.py b/rootly_sdk/api/incident_roles/delete_incident_role.py index 0f514452..dd9d1304 100644 --- a/rootly_sdk/api/incident_roles/delete_incident_role.py +++ b/rootly_sdk/api/incident_roles/delete_incident_role.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_role_response import IncidentRoleResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_roles/get_incident_role.py b/rootly_sdk/api/incident_roles/get_incident_role.py index f4ca4ba8..7f7d2000 100644 --- a/rootly_sdk/api/incident_roles/get_incident_role.py +++ b/rootly_sdk/api/incident_roles/get_incident_role.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_role_response import IncidentRoleResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_roles/list_incident_roles.py b/rootly_sdk/api/incident_roles/list_incident_roles.py index 7e056274..b2203ed5 100644 --- a/rootly_sdk/api/incident_roles/list_incident_roles.py +++ b/rootly_sdk/api/incident_roles/list_incident_roles.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_role_list import IncidentRoleList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/incident_roles/update_incident_role.py b/rootly_sdk/api/incident_roles/update_incident_role.py index 06eefbef..552ee1be 100644 --- a/rootly_sdk/api/incident_roles/update_incident_role.py +++ b/rootly_sdk/api/incident_roles/update_incident_role.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_role_response import IncidentRoleResponse from ...models.update_incident_role import UpdateIncidentRole -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 fd5a8de2..05586429 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_status_page_event_response import IncidentStatusPageEventResponse from ...models.new_incident_status_page_event import NewIncidentStatusPageEvent -from typing import cast - +from ...types import Response def _get_kwargs( 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 268db79f..1f6a16c5 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_status_page_event_response import IncidentStatusPageEventResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 f54398af..9c9f3d57 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_status_page_event_response import IncidentStatusPageEventResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 edc058ad..d5a39b10 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_status_page_event_list import IncidentStatusPageEventList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 445606d0..6415222e 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_status_page_event_response import IncidentStatusPageEventResponse from ...models.update_incident_status_page_event import UpdateIncidentStatusPageEvent -from typing import cast - +from ...types import Response def _get_kwargs( 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 9458a130..48f87f92 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_sub_status_response import IncidentSubStatusResponse from ...models.new_incident_sub_status import NewIncidentSubStatus -from typing import cast - +from ...types import Response def _get_kwargs( 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 2aa71526..6c50b875 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_sub_status_response import IncidentSubStatusResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 a807317d..c26ecbb7 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,19 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.get_incident_sub_status_include import check_get_incident_sub_status_include +from ...client import AuthenticatedClient, Client from ...models.get_incident_sub_status_include import GetIncidentSubStatusInclude from ...models.incident_sub_status_response import IncidentSubStatusResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 69b413ec..2ba54f65 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,21 +1,17 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_sub_status_list import IncidentSubStatusList -from ...models.list_incident_sub_statuses_include import check_list_incident_sub_statuses_include -from ...models.list_incident_sub_statuses_include import ListIncidentSubStatusesInclude -from ...models.list_incident_sub_statuses_sort import check_list_incident_sub_statuses_sort +from ...models.list_incident_sub_statuses_include import ( + ListIncidentSubStatusesInclude, +) from ...models.list_incident_sub_statuses_sort import ListIncidentSubStatusesSort -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 07482ab5..26e18642 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_sub_status_response import IncidentSubStatusResponse from ...models.update_incident_sub_status import UpdateIncidentSubStatus -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_types/create_incident_type.py b/rootly_sdk/api/incident_types/create_incident_type.py index 067acff1..77d54d91 100644 --- a/rootly_sdk/api/incident_types/create_incident_type.py +++ b/rootly_sdk/api/incident_types/create_incident_type.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_type_response import IncidentTypeResponse from ...models.new_incident_type import NewIncidentType -from typing import cast - +from ...types import Response def _get_kwargs( 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 index ee3f30e9..c0240412 100644 --- a/rootly_sdk/api/incident_types/create_incident_type_catalog_property.py +++ b/rootly_sdk/api/incident_types/create_incident_type_catalog_property.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_types/delete_incident_type.py b/rootly_sdk/api/incident_types/delete_incident_type.py index 72660f46..16edd65f 100644 --- a/rootly_sdk/api/incident_types/delete_incident_type.py +++ b/rootly_sdk/api/incident_types/delete_incident_type.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_type_response import IncidentTypeResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incident_types/get_incident_type.py b/rootly_sdk/api/incident_types/get_incident_type.py index 0e6fe06c..4832ffa4 100644 --- a/rootly_sdk/api/incident_types/get_incident_type.py +++ b/rootly_sdk/api/incident_types/get_incident_type.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_type_response import IncidentTypeResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 index aa728cab..40fb0dd6 100644 --- a/rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py +++ b/rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py @@ -1,21 +1,18 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_property_list import CatalogPropertyList -from ...models.list_incident_type_catalog_properties_include import check_list_incident_type_catalog_properties_include -from ...models.list_incident_type_catalog_properties_include import ListIncidentTypeCatalogPropertiesInclude -from ...models.list_incident_type_catalog_properties_sort import check_list_incident_type_catalog_properties_sort -from ...models.list_incident_type_catalog_properties_sort import ListIncidentTypeCatalogPropertiesSort -from ...types import UNSET, Unset -from typing import cast - +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( diff --git a/rootly_sdk/api/incident_types/list_incident_types.py b/rootly_sdk/api/incident_types/list_incident_types.py index 60a59ff6..4d745cda 100644 --- a/rootly_sdk/api/incident_types/list_incident_types.py +++ b/rootly_sdk/api/incident_types/list_incident_types.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.incident_type_list import IncidentTypeList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/incident_types/update_incident_type.py b/rootly_sdk/api/incident_types/update_incident_type.py index 97338974..4645d120 100644 --- a/rootly_sdk/api/incident_types/update_incident_type.py +++ b/rootly_sdk/api/incident_types/update_incident_type.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_type_response import IncidentTypeResponse from ...models.update_incident_type import UpdateIncidentType -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/add_subscribers_to_incident.py b/rootly_sdk/api/incidents/add_subscribers_to_incident.py index 881f5ce1..5f71394f 100644 --- a/rootly_sdk/api/incidents/add_subscribers_to_incident.py +++ b/rootly_sdk/api/incidents/add_subscribers_to_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.add_subscribers import AddSubscribers from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/assign_user_to_incident.py b/rootly_sdk/api/incidents/assign_user_to_incident.py index 3eef1012..0e26c8cb 100644 --- a/rootly_sdk/api/incidents/assign_user_to_incident.py +++ b/rootly_sdk/api/incidents/assign_user_to_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.assign_role_to_user import AssignRoleToUser from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/cancel_incident.py b/rootly_sdk/api/incidents/cancel_incident.py index b8aa2318..13854e99 100644 --- a/rootly_sdk/api/incidents/cancel_incident.py +++ b/rootly_sdk/api/incidents/cancel_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.cancel_incident import CancelIncident from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/create_incident.py b/rootly_sdk/api/incidents/create_incident.py index 65152542..aeda7d90 100644 --- a/rootly_sdk/api/incidents/create_incident.py +++ b/rootly_sdk/api/incidents/create_incident.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.new_incident import NewIncident -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/delete_incident.py b/rootly_sdk/api/incidents/delete_incident.py index 1597002e..c9e45746 100644 --- a/rootly_sdk/api/incidents/delete_incident.py +++ b/rootly_sdk/api/incidents/delete_incident.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/detach_from_parent_incident.py b/rootly_sdk/api/incidents/detach_from_parent_incident.py index 581aa70d..5b156d39 100644 --- a/rootly_sdk/api/incidents/detach_from_parent_incident.py +++ b/rootly_sdk/api/incidents/detach_from_parent_incident.py @@ -1,18 +1,15 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/get_incident.py b/rootly_sdk/api/incidents/get_incident.py index 0eb70124..fdf77f96 100644 --- a/rootly_sdk/api/incidents/get_incident.py +++ b/rootly_sdk/api/incidents/get_incident.py @@ -1,21 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.get_incident_include import check_get_incident_include from ...models.get_incident_include import GetIncidentInclude from ...models.incident_response import IncidentResponse -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/incidents/list_incidents.py b/rootly_sdk/api/incidents/list_incidents.py index d6d7e5dd..c0cd820c 100644 --- a/rootly_sdk/api/incidents/list_incidents.py +++ b/rootly_sdk/api/incidents/list_incidents.py @@ -1,22 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_list import IncidentList -from ...models.list_incidents_include import check_list_incidents_include from ...models.list_incidents_include import ListIncidentsInclude -from ...models.list_incidents_sort import check_list_incidents_sort from ...models.list_incidents_sort import ListIncidentsSort -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/incidents/mark_as_duplicate_incident.py b/rootly_sdk/api/incidents/mark_as_duplicate_incident.py index 0c888a8d..57d7fed6 100644 --- a/rootly_sdk/api/incidents/mark_as_duplicate_incident.py +++ b/rootly_sdk/api/incidents/mark_as_duplicate_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.resolve_incident import ResolveIncident -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/mitigate_incident.py b/rootly_sdk/api/incidents/mitigate_incident.py index b61d6d2f..b823b2ef 100644 --- a/rootly_sdk/api/incidents/mitigate_incident.py +++ b/rootly_sdk/api/incidents/mitigate_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.mitigate_incident import MitigateIncident -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 366824bb..4f89fc0e 100644 --- a/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py +++ b/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.unassign_role_from_user import UnassignRoleFromUser -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/remove_subscribers_to_incident.py b/rootly_sdk/api/incidents/remove_subscribers_to_incident.py index 6d01a221..06bad4cf 100644 --- a/rootly_sdk/api/incidents/remove_subscribers_to_incident.py +++ b/rootly_sdk/api/incidents/remove_subscribers_to_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.remove_subscribers import RemoveSubscribers -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/resolve_incident.py b/rootly_sdk/api/incidents/resolve_incident.py index 55c86759..f3dec995 100644 --- a/rootly_sdk/api/incidents/resolve_incident.py +++ b/rootly_sdk/api/incidents/resolve_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.resolve_incident import ResolveIncident -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/restart_incident.py b/rootly_sdk/api/incidents/restart_incident.py index bf17b280..b56dabe3 100644 --- a/rootly_sdk/api/incidents/restart_incident.py +++ b/rootly_sdk/api/incidents/restart_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.restart_incident import RestartIncident -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/triage_incident.py b/rootly_sdk/api/incidents/triage_incident.py index 3c34a6ca..94ef58a2 100644 --- a/rootly_sdk/api/incidents/triage_incident.py +++ b/rootly_sdk/api/incidents/triage_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.in_triage_incident import InTriageIncident from ...models.incident_response import IncidentResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py b/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py index d206ada9..e76739ee 100644 --- a/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py +++ b/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py @@ -1,18 +1,15 @@ from http import HTTPStatus from typing import Any, cast from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/incidents/update_incident.py b/rootly_sdk/api/incidents/update_incident.py index dbc519ae..d3be1437 100644 --- a/rootly_sdk/api/incidents/update_incident.py +++ b/rootly_sdk/api/incidents/update_incident.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incident_response import IncidentResponse from ...models.update_incident import UpdateIncident -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/ip_ranges/get_ip_ranges.py b/rootly_sdk/api/ip_ranges/get_ip_ranges.py index 58ba7f20..0f395270 100644 --- a/rootly_sdk/api/ip_ranges/get_ip_ranges.py +++ b/rootly_sdk/api/ip_ranges/get_ip_ranges.py @@ -1,16 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.ip_ranges_response import IpRangesResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 6c520c4f..752ba290 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 @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.live_call_router_response import LiveCallRouterResponse from ...models.new_live_call_router import NewLiveCallRouter -from typing import cast - +from ...types import Response def _get_kwargs( 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 38b2da00..4175eae1 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.live_call_router_response import LiveCallRouterResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 8e531cd4..3cfa7d93 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 @@ -1,20 +1,18 @@ from http import HTTPStatus from typing import Any, cast -from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.generate_phone_number_live_call_router_country_code import check_generate_phone_number_live_call_router_country_code -from ...models.generate_phone_number_live_call_router_country_code import GeneratePhoneNumberLiveCallRouterCountryCode -from ...models.generate_phone_number_live_call_router_phone_type import check_generate_phone_number_live_call_router_phone_type -from ...models.generate_phone_number_live_call_router_phone_type import GeneratePhoneNumberLiveCallRouterPhoneType -from typing import cast - +from ...models.generate_phone_number_live_call_router_country_code import ( + GeneratePhoneNumberLiveCallRouterCountryCode, +) +from ...models.generate_phone_number_live_call_router_phone_type import ( + GeneratePhoneNumberLiveCallRouterPhoneType, +) +from ...types import UNSET, Response def _get_kwargs( 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 419bc333..72283b56 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.live_call_router_response import LiveCallRouterResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 d66879c5..dee5a6a2 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 @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.live_call_router_list import LiveCallRouterList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 6b41b392..d6d140b6 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.live_call_router_response import LiveCallRouterResponse from ...models.update_live_call_router import UpdateLiveCallRouter -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/create_meeting_recording.py b/rootly_sdk/api/meeting_recordings/create_meeting_recording.py index de4ab1b2..cbcd08e0 100644 --- a/rootly_sdk/api/meeting_recordings/create_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/create_meeting_recording.py @@ -4,16 +4,13 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.create_meeting_recording_platform import check_create_meeting_recording_platform -from ...models.create_meeting_recording_platform import CreateMeetingRecordingPlatform +from ...client import AuthenticatedClient, Client +from ...models.create_meeting_recording_platform import ( + CreateMeetingRecordingPlatform, +) from ...models.meeting_recording_response import MeetingRecordingResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py index dd8b7960..5b859dc9 100644 --- a/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.meeting_recording_response import MeetingRecordingResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py index 2bb7ae2d..501afaf2 100644 --- a/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.meeting_recording_response import MeetingRecordingResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py b/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py index 8c48949c..a42d222c 100644 --- a/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py @@ -1,14 +1,12 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - - +from ...client import AuthenticatedClient, Client +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/get_meeting_recording.py b/rootly_sdk/api/meeting_recordings/get_meeting_recording.py index 211f793e..d31021f0 100644 --- a/rootly_sdk/api/meeting_recordings/get_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/get_meeting_recording.py @@ -4,16 +4,11 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.get_meeting_recording_include import check_get_meeting_recording_include +from ...client import AuthenticatedClient, Client from ...models.get_meeting_recording_include import GetMeetingRecordingInclude from ...models.meeting_recording_response import MeetingRecordingResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/import_meeting_recording.py b/rootly_sdk/api/meeting_recordings/import_meeting_recording.py index 9780509b..75f6ce30 100644 --- a/rootly_sdk/api/meeting_recordings/import_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/import_meeting_recording.py @@ -4,15 +4,11 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.import_meeting_recording import ImportMeetingRecording from ...models.meeting_recording_response import MeetingRecordingResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py index 3c28bf3d..3967cb3c 100644 --- a/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.meeting_recording_response import MeetingRecordingResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py b/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py index 9b940071..77dec4a0 100644 --- a/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py +++ b/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.meeting_recording_list import MeetingRecordingList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py b/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py index 42379e74..e70da740 100644 --- a/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py +++ b/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py @@ -4,14 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.meeting_recording_list import MeetingRecordingList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py b/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py index 8451a9e8..52937296 100644 --- a/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.meeting_recording_response import MeetingRecordingResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py index 83489e61..ce409c56 100644 --- a/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.meeting_recording_response import MeetingRecordingResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/start_recording_session.py b/rootly_sdk/api/meeting_recordings/start_recording_session.py index e9cc8a9d..349b46fa 100644 --- a/rootly_sdk/api/meeting_recordings/start_recording_session.py +++ b/rootly_sdk/api/meeting_recordings/start_recording_session.py @@ -1,18 +1,13 @@ from http import HTTPStatus from typing import Any, cast -from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.start_session_request import StartSessionRequest from ...models.start_session_response import StartSessionResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py index c8b5129c..019ebf0f 100644 --- a/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py @@ -4,13 +4,10 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.meeting_recording_response import MeetingRecordingResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 index cbd1e7a7..b6deff88 100644 --- 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 @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py b/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py index 063465a6..d41ebe03 100644 --- a/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py +++ b/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 index f4663fa4..d977f47e 100644 --- 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 @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.on_call_pay_report_list import OnCallPayReportList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 index e5bbbefc..5bdc698d 100644 --- 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 @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.on_call_pay_report_response import OnCallPayReportResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 index 08a75e6f..11fcaf02 100644 --- 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 @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( 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 7ba8ee25..6c9210bd 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 @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_on_call_role import NewOnCallRole from ...models.on_call_role_response import OnCallRoleResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 9837a18e..ccf8a525 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.on_call_role_response import OnCallRoleResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 4a77f349..36a25e42 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.on_call_role_response import OnCallRoleResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 b683999c..5d23915b 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 @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.on_call_role_list import OnCallRoleList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 c59ff1f5..a2e884b3 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.on_call_role_response import OnCallRoleResponse from ...models.update_on_call_role import UpdateOnCallRole -from typing import cast - +from ...types import Response def _get_kwargs( 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 328cc227..b3ec42ca 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_on_call_shadow import NewOnCallShadow from ...models.on_call_shadow_response import OnCallShadowResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 847043ca..efc4e22d 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.on_call_shadow_response import OnCallShadowResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 c2d218a5..efde6a58 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.on_call_shadows_list import OnCallShadowsList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 b03bb0ef..bbd1d9e3 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.on_call_shadow_response import OnCallShadowResponse from ...models.update_on_call_shadow import UpdateOnCallShadow -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/on_calls/list_oncalls.py b/rootly_sdk/api/on_calls/list_oncalls.py index 7e3312a9..e5624bff 100644 --- a/rootly_sdk/api/on_calls/list_oncalls.py +++ b/rootly_sdk/api/on_calls/list_oncalls.py @@ -1,20 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.list_oncalls_include import check_list_oncalls_include from ...models.list_oncalls_include import ListOncallsInclude from ...models.oncall_list import OncallList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/override_shifts/create_override_shift.py b/rootly_sdk/api/override_shifts/create_override_shift.py index c761020c..60c2890e 100644 --- a/rootly_sdk/api/override_shifts/create_override_shift.py +++ b/rootly_sdk/api/override_shifts/create_override_shift.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_override_shift import NewOverrideShift from ...models.override_shift_response import OverrideShiftResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 8b0d9613..a568fa02 100644 --- a/rootly_sdk/api/override_shifts/delete_on_call_shadow.py +++ b/rootly_sdk/api/override_shifts/delete_on_call_shadow.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.on_call_shadow_response import OnCallShadowResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/override_shifts/delete_override_shift.py b/rootly_sdk/api/override_shifts/delete_override_shift.py index 6165f554..211afd2f 100644 --- a/rootly_sdk/api/override_shifts/delete_override_shift.py +++ b/rootly_sdk/api/override_shifts/delete_override_shift.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.override_shift_response import OverrideShiftResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/override_shifts/get_override_shift.py b/rootly_sdk/api/override_shifts/get_override_shift.py index 322a7566..3296a663 100644 --- a/rootly_sdk/api/override_shifts/get_override_shift.py +++ b/rootly_sdk/api/override_shifts/get_override_shift.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.override_shift_response import OverrideShiftResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/override_shifts/list_override_shifts.py b/rootly_sdk/api/override_shifts/list_override_shifts.py index c28117bc..f528b896 100644 --- a/rootly_sdk/api/override_shifts/list_override_shifts.py +++ b/rootly_sdk/api/override_shifts/list_override_shifts.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.override_shift_list import OverrideShiftList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/override_shifts/update_override_shift.py b/rootly_sdk/api/override_shifts/update_override_shift.py index db880ac8..151c774f 100644 --- a/rootly_sdk/api/override_shifts/update_override_shift.py +++ b/rootly_sdk/api/override_shifts/update_override_shift.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.override_shift_response import OverrideShiftResponse from ...models.update_override_shift import UpdateOverrideShift -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/playbook_tasks/create_playbook_task.py b/rootly_sdk/api/playbook_tasks/create_playbook_task.py index 7b315557..0f1f0759 100644 --- a/rootly_sdk/api/playbook_tasks/create_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/create_playbook_task.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_playbook_task import NewPlaybookTask from ...models.playbook_task_response import PlaybookTaskResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/playbook_tasks/delete_playbook_task.py b/rootly_sdk/api/playbook_tasks/delete_playbook_task.py index 809f79a1..86cdba80 100644 --- a/rootly_sdk/api/playbook_tasks/delete_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/delete_playbook_task.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.playbook_task_response import PlaybookTaskResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/playbook_tasks/get_playbook_task.py b/rootly_sdk/api/playbook_tasks/get_playbook_task.py index b0c6d45c..b0513fa2 100644 --- a/rootly_sdk/api/playbook_tasks/get_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/get_playbook_task.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.playbook_task_response import PlaybookTaskResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py b/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py index da240e21..77d003b3 100644 --- a/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py +++ b/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.playbook_task_list import PlaybookTaskList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/playbook_tasks/update_playbook_task.py b/rootly_sdk/api/playbook_tasks/update_playbook_task.py index 0603f570..9164fb36 100644 --- a/rootly_sdk/api/playbook_tasks/update_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/update_playbook_task.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.playbook_task_response import PlaybookTaskResponse from ...models.update_playbook_task import UpdatePlaybookTask -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/playbooks/create_playbook.py b/rootly_sdk/api/playbooks/create_playbook.py index df70c5d5..3e590e64 100644 --- a/rootly_sdk/api/playbooks/create_playbook.py +++ b/rootly_sdk/api/playbooks/create_playbook.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_playbook import NewPlaybook from ...models.playbook_response import PlaybookResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/playbooks/delete_playbook.py b/rootly_sdk/api/playbooks/delete_playbook.py index 50a2ca88..3232d1a9 100644 --- a/rootly_sdk/api/playbooks/delete_playbook.py +++ b/rootly_sdk/api/playbooks/delete_playbook.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.playbook_response import PlaybookResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/playbooks/get_playbook.py b/rootly_sdk/api/playbooks/get_playbook.py index 06063d8b..d2ead9cb 100644 --- a/rootly_sdk/api/playbooks/get_playbook.py +++ b/rootly_sdk/api/playbooks/get_playbook.py @@ -1,20 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.get_playbook_include import check_get_playbook_include from ...models.get_playbook_include import GetPlaybookInclude from ...models.playbook_response import PlaybookResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/playbooks/list_playbooks.py b/rootly_sdk/api/playbooks/list_playbooks.py index 7139e3c1..f4850a11 100644 --- a/rootly_sdk/api/playbooks/list_playbooks.py +++ b/rootly_sdk/api/playbooks/list_playbooks.py @@ -1,19 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.list_playbooks_include import check_list_playbooks_include +from ...client import AuthenticatedClient, Client from ...models.list_playbooks_include import ListPlaybooksInclude from ...models.playbook_list import PlaybookList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/playbooks/update_playbook.py b/rootly_sdk/api/playbooks/update_playbook.py index 0401e2e4..e8f3d840 100644 --- a/rootly_sdk/api/playbooks/update_playbook.py +++ b/rootly_sdk/api/playbooks/update_playbook.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.playbook_response import PlaybookResponse from ...models.update_playbook import UpdatePlaybook -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/pulses/create_pulse.py b/rootly_sdk/api/pulses/create_pulse.py index 1f4c302d..2a363a25 100644 --- a/rootly_sdk/api/pulses/create_pulse.py +++ b/rootly_sdk/api/pulses/create_pulse.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_pulse import NewPulse from ...models.pulse_response import PulseResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/pulses/get_pulse.py b/rootly_sdk/api/pulses/get_pulse.py index d7357bf5..0ad8c36e 100644 --- a/rootly_sdk/api/pulses/get_pulse.py +++ b/rootly_sdk/api/pulses/get_pulse.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.pulse_response import PulseResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/pulses/list_pulses.py b/rootly_sdk/api/pulses/list_pulses.py index a7073f79..647ea640 100644 --- a/rootly_sdk/api/pulses/list_pulses.py +++ b/rootly_sdk/api/pulses/list_pulses.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.pulse_list import PulseList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/pulses/update_pulse.py b/rootly_sdk/api/pulses/update_pulse.py index fa753c1f..354e0290 100644 --- a/rootly_sdk/api/pulses/update_pulse.py +++ b/rootly_sdk/api/pulses/update_pulse.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.pulse_response import PulseResponse from ...models.update_pulse import UpdatePulse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py b/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py index e473100d..e128def7 100644 --- a/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py +++ b/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py @@ -1,20 +1,17 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.get_retrospective_configuration_include import check_get_retrospective_configuration_include -from ...models.get_retrospective_configuration_include import GetRetrospectiveConfigurationInclude +from ...models.get_retrospective_configuration_include import ( + GetRetrospectiveConfigurationInclude, +) from ...models.retrospective_configuration_response import RetrospectiveConfigurationResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py b/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py index ef015eb5..65645a85 100644 --- a/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py +++ b/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.list_retrospective_configurations_include import check_list_retrospective_configurations_include -from ...models.list_retrospective_configurations_include import ListRetrospectiveConfigurationsInclude +from ...client import AuthenticatedClient, Client +from ...models.list_retrospective_configurations_include import ( + ListRetrospectiveConfigurationsInclude, +) from ...models.retrospective_configuration_list import RetrospectiveConfigurationList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py b/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py index e99cdb2e..4f4cf761 100644 --- a/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py +++ b/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.retrospective_configuration_response import RetrospectiveConfigurationResponse from ...models.update_retrospective_configuration import UpdateRetrospectiveConfiguration -from typing import cast - +from ...types import Response def _get_kwargs( 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 052f8295..b685e5e7 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_retrospective_process_group_step import NewRetrospectiveProcessGroupStep from ...models.retrospective_process_group_step_response import RetrospectiveProcessGroupStepResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 b039fa33..c93807f3 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.retrospective_process_group_step_response import RetrospectiveProcessGroupStepResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 f5542d80..f87bd7bd 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,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.retrospective_process_group_step_response import RetrospectiveProcessGroupStepResponse -from typing import cast - +from ...types import Response def _get_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 1f578efa..96b8a832 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.retrospective_process_group_step_list import RetrospectiveProcessGroupStepList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 b857d4d0..4a965479 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.retrospective_process_group_step_response import RetrospectiveProcessGroupStepResponse from ...models.update_retrospective_process_group_step import UpdateRetrospectiveProcessGroupStep -from typing import cast - +from ...types import Response def _get_kwargs( 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 967dce4f..7b89f7e6 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_retrospective_process_group import NewRetrospectiveProcessGroup from ...models.retrospective_process_group_response import RetrospectiveProcessGroupResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 3824d276..5ec78e5a 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.retrospective_process_group_response import RetrospectiveProcessGroupResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 3eff88fa..d92aa925 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,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.get_retrospective_process_group_include import check_get_retrospective_process_group_include -from ...models.get_retrospective_process_group_include import GetRetrospectiveProcessGroupInclude +from ...client import AuthenticatedClient, Client +from ...models.get_retrospective_process_group_include import ( + GetRetrospectiveProcessGroupInclude, +) from ...models.retrospective_process_group_response import RetrospectiveProcessGroupResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 0110741b..f9c6dc6a 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,21 +1,19 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.list_retrospective_process_groups_include import check_list_retrospective_process_groups_include -from ...models.list_retrospective_process_groups_include import ListRetrospectiveProcessGroupsInclude -from ...models.list_retrospective_process_groups_sort import check_list_retrospective_process_groups_sort -from ...models.list_retrospective_process_groups_sort import ListRetrospectiveProcessGroupsSort +from ...client import AuthenticatedClient, Client +from ...models.list_retrospective_process_groups_include import ( + ListRetrospectiveProcessGroupsInclude, +) +from ...models.list_retrospective_process_groups_sort import ( + ListRetrospectiveProcessGroupsSort, +) from ...models.retrospective_process_group_list import RetrospectiveProcessGroupList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 c5554781..a1c69c70 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.retrospective_process_group_response import RetrospectiveProcessGroupResponse from ...models.update_retrospective_process_group import UpdateRetrospectiveProcessGroup -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_processes/create_retrospective_process.py b/rootly_sdk/api/retrospective_processes/create_retrospective_process.py index fc0bd1ca..a3318c02 100644 --- a/rootly_sdk/api/retrospective_processes/create_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/create_retrospective_process.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_retrospective_process import NewRetrospectiveProcess from ...models.retrospective_process_response import RetrospectiveProcessResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py b/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py index ab820d47..665d05ac 100644 --- a/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.retrospective_process_response import RetrospectiveProcessResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_processes/get_retrospective_process.py b/rootly_sdk/api/retrospective_processes/get_retrospective_process.py index 26e6550b..0cc2260d 100644 --- a/rootly_sdk/api/retrospective_processes/get_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/get_retrospective_process.py @@ -1,20 +1,17 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.get_retrospective_process_include import check_get_retrospective_process_include -from ...models.get_retrospective_process_include import GetRetrospectiveProcessInclude +from ...models.get_retrospective_process_include import ( + GetRetrospectiveProcessInclude, +) from ...models.retrospective_process_response import RetrospectiveProcessResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py b/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py index 6d84afd1..e0baeee6 100644 --- a/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py +++ b/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.list_retrospective_processes_include import check_list_retrospective_processes_include -from ...models.list_retrospective_processes_include import ListRetrospectiveProcessesInclude +from ...client import AuthenticatedClient, Client +from ...models.list_retrospective_processes_include import ( + ListRetrospectiveProcessesInclude, +) from ...models.retrospective_process_list import RetrospectiveProcessList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_processes/update_retrospective_process.py b/rootly_sdk/api/retrospective_processes/update_retrospective_process.py index 2c714245..8ca0883a 100644 --- a/rootly_sdk/api/retrospective_processes/update_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/update_retrospective_process.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.retrospective_process_response import RetrospectiveProcessResponse from ...models.update_retrospective_process import UpdateRetrospectiveProcess -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_steps/create_retrospective_step.py b/rootly_sdk/api/retrospective_steps/create_retrospective_step.py index cb9bd195..d131dc96 100644 --- a/rootly_sdk/api/retrospective_steps/create_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/create_retrospective_step.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_retrospective_step import NewRetrospectiveStep from ...models.retrospective_step_response import RetrospectiveStepResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py b/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py index b7926401..2574fb5e 100644 --- a/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.retrospective_step_response import RetrospectiveStepResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_steps/get_retrospective_step.py b/rootly_sdk/api/retrospective_steps/get_retrospective_step.py index 8b267c5c..4391ba02 100644 --- a/rootly_sdk/api/retrospective_steps/get_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/get_retrospective_step.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.retrospective_step_response import RetrospectiveStepResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py b/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py index ccb78c71..1daf49a6 100644 --- a/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py +++ b/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.retrospective_step_list import RetrospectiveStepList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_steps/update_retrospective_step.py b/rootly_sdk/api/retrospective_steps/update_retrospective_step.py index 877e8d4f..31f946d2 100644 --- a/rootly_sdk/api/retrospective_steps/update_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/update_retrospective_step.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.retrospective_step_response import RetrospectiveStepResponse from ...models.update_retrospective_step import UpdateRetrospectiveStep -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_templates/create_postmortem_template.py b/rootly_sdk/api/retrospective_templates/create_postmortem_template.py index a9f1513c..1a543ae2 100644 --- a/rootly_sdk/api/retrospective_templates/create_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/create_postmortem_template.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_post_mortem_template import NewPostMortemTemplate from ...models.post_mortem_template_response import PostMortemTemplateResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py b/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py index f6d8c433..75990be1 100644 --- a/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.post_mortem_template_response import PostMortemTemplateResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_templates/get_postmortem_template.py b/rootly_sdk/api/retrospective_templates/get_postmortem_template.py index 61e0a0e5..fbe27f91 100644 --- a/rootly_sdk/api/retrospective_templates/get_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/get_postmortem_template.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.post_mortem_template_response import PostMortemTemplateResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py b/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py index abba4bad..dae2f2ad 100644 --- a/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py +++ b/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.post_mortem_template_list import PostMortemTemplateList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/retrospective_templates/update_postmortem_template.py b/rootly_sdk/api/retrospective_templates/update_postmortem_template.py index 95e60ef8..9e840b8d 100644 --- a/rootly_sdk/api/retrospective_templates/update_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/update_postmortem_template.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.post_mortem_template_response import PostMortemTemplateResponse from ...models.update_post_mortem_template import UpdatePostMortemTemplate -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/roles/create_role.py b/rootly_sdk/api/roles/create_role.py index b15c9c4b..8b9f812c 100644 --- a/rootly_sdk/api/roles/create_role.py +++ b/rootly_sdk/api/roles/create_role.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_role import NewRole from ...models.role_response import RoleResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/roles/delete_role.py b/rootly_sdk/api/roles/delete_role.py index f8220206..37666e5f 100644 --- a/rootly_sdk/api/roles/delete_role.py +++ b/rootly_sdk/api/roles/delete_role.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.role_response import RoleResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/roles/get_role.py b/rootly_sdk/api/roles/get_role.py index 5b9ffa28..e27afd1b 100644 --- a/rootly_sdk/api/roles/get_role.py +++ b/rootly_sdk/api/roles/get_role.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.role_response import RoleResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/roles/list_roles.py b/rootly_sdk/api/roles/list_roles.py index 781defdc..53a8c51f 100644 --- a/rootly_sdk/api/roles/list_roles.py +++ b/rootly_sdk/api/roles/list_roles.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.role_list import RoleList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/roles/update_role.py b/rootly_sdk/api/roles/update_role.py index b5f87327..d49dc5fe 100644 --- a/rootly_sdk/api/roles/update_role.py +++ b/rootly_sdk/api/roles/update_role.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.role_response import RoleResponse from ...models.update_role import UpdateRole -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 402a9991..c452b283 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_schedule_rotation_active_day import NewScheduleRotationActiveDay from ...models.schedule_rotation_active_day_response import ScheduleRotationActiveDayResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 4e264f59..24502cec 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_rotation_active_day_response import ScheduleRotationActiveDayResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 e12d6e25..96876d4c 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_rotation_active_day_response import ScheduleRotationActiveDayResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 a8daeb00..4d88567b 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.schedule_rotation_active_day_list import ScheduleRotationActiveDayList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 1397cf3a..2cf07c19 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_rotation_active_day_response import ScheduleRotationActiveDayResponse from ...models.update_schedule_rotation_active_day import UpdateScheduleRotationActiveDay -from typing import cast - +from ...types import Response def _get_kwargs( 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 e573f9ba..a0010b58 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_schedule_rotation_user import NewScheduleRotationUser from ...models.schedule_rotation_user_response import ScheduleRotationUserResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 23cfa8c0..eb2e1d71 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_rotation_user_response import ScheduleRotationUserResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 c34e59b6..9f0c7d4a 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_rotation_user_response import ScheduleRotationUserResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 24cb32b7..60441737 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.schedule_rotation_user_list import ScheduleRotationUserList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 a960ea40..9b9cfb63 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_rotation_user_response import ScheduleRotationUserResponse from ...models.update_schedule_rotation_user import UpdateScheduleRotationUser -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py index 78a06971..612f50c2 100644 --- a/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_schedule_rotation import NewScheduleRotation from ...models.schedule_rotation_response import ScheduleRotationResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py index f5ae20a6..b7e86348 100644 --- a/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_rotation_response import ScheduleRotationResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py index 609a3e3f..879fb583 100644 --- a/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_rotation_response import ScheduleRotationResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py b/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py index 1872704a..f2ad1705 100644 --- a/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py +++ b/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.schedule_rotation_list import ScheduleRotationList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py index d3cb258f..d8121e42 100644 --- a/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_rotation_response import ScheduleRotationResponse from ...models.update_schedule_rotation import UpdateScheduleRotation -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/schedules/create_schedule.py b/rootly_sdk/api/schedules/create_schedule.py index 683a7c0e..d4dc2d24 100644 --- a/rootly_sdk/api/schedules/create_schedule.py +++ b/rootly_sdk/api/schedules/create_schedule.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_schedule import NewSchedule from ...models.schedule_response import ScheduleResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/schedules/delete_schedule.py b/rootly_sdk/api/schedules/delete_schedule.py index c126f560..3a43333f 100644 --- a/rootly_sdk/api/schedules/delete_schedule.py +++ b/rootly_sdk/api/schedules/delete_schedule.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_response import ScheduleResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/schedules/get_schedule.py b/rootly_sdk/api/schedules/get_schedule.py index 9835f3b3..bbcfa9c7 100644 --- a/rootly_sdk/api/schedules/get_schedule.py +++ b/rootly_sdk/api/schedules/get_schedule.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_response import ScheduleResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/schedules/list_schedules.py b/rootly_sdk/api/schedules/list_schedules.py index 1e136a1b..f6d28f49 100644 --- a/rootly_sdk/api/schedules/list_schedules.py +++ b/rootly_sdk/api/schedules/list_schedules.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.schedule_list import ScheduleList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/schedules/update_schedule.py b/rootly_sdk/api/schedules/update_schedule.py index 212a933d..b2923e48 100644 --- a/rootly_sdk/api/schedules/update_schedule.py +++ b/rootly_sdk/api/schedules/update_schedule.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.schedule_response import ScheduleResponse from ...models.update_schedule import UpdateSchedule -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/secrets/create_secret.py b/rootly_sdk/api/secrets/create_secret.py index 687b4955..f55ef863 100644 --- a/rootly_sdk/api/secrets/create_secret.py +++ b/rootly_sdk/api/secrets/create_secret.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_secret import NewSecret from ...models.secret_response import SecretResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/secrets/delete_secret.py b/rootly_sdk/api/secrets/delete_secret.py index 855dbe5b..eb564884 100644 --- a/rootly_sdk/api/secrets/delete_secret.py +++ b/rootly_sdk/api/secrets/delete_secret.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.secret_response import SecretResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/secrets/get_secret.py b/rootly_sdk/api/secrets/get_secret.py index 07d1ad3a..f8ea520f 100644 --- a/rootly_sdk/api/secrets/get_secret.py +++ b/rootly_sdk/api/secrets/get_secret.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.secret_response import SecretResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/secrets/list_secrets.py b/rootly_sdk/api/secrets/list_secrets.py index e7052751..a4385f26 100644 --- a/rootly_sdk/api/secrets/list_secrets.py +++ b/rootly_sdk/api/secrets/list_secrets.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.secret_list import SecretList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/secrets/update_secret.py b/rootly_sdk/api/secrets/update_secret.py index 646db44c..55a8a9cf 100644 --- a/rootly_sdk/api/secrets/update_secret.py +++ b/rootly_sdk/api/secrets/update_secret.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.secret_response import SecretResponse from ...models.update_secret import UpdateSecret -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/services/bulk_delete_services.py b/rootly_sdk/api/services/bulk_delete_services.py index 1faa309a..9af124a3 100644 --- a/rootly_sdk/api/services/bulk_delete_services.py +++ b/rootly_sdk/api/services/bulk_delete_services.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_destroy_services_response import BulkDestroyServicesResponse from ...models.bulk_destroy_services_type_0 import BulkDestroyServicesType0 from ...models.bulk_destroy_services_type_1 import BulkDestroyServicesType1 from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/services/bulk_upsert_services.py b/rootly_sdk/api/services/bulk_upsert_services.py index d5e266fc..fc5c8168 100644 --- a/rootly_sdk/api/services/bulk_upsert_services.py +++ b/rootly_sdk/api/services/bulk_upsert_services.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_upsert_services import BulkUpsertServices from ...models.bulk_upsert_services_error import BulkUpsertServicesError from ...models.bulk_upsert_services_response import BulkUpsertServicesResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/services/create_service.py b/rootly_sdk/api/services/create_service.py index 27f946b2..ed8e5153 100644 --- a/rootly_sdk/api/services/create_service.py +++ b/rootly_sdk/api/services/create_service.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_service import NewService from ...models.service_response import ServiceResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/services/create_service_catalog_property.py b/rootly_sdk/api/services/create_service_catalog_property.py index 84460894..162e3122 100644 --- a/rootly_sdk/api/services/create_service_catalog_property.py +++ b/rootly_sdk/api/services/create_service_catalog_property.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/services/delete_service.py b/rootly_sdk/api/services/delete_service.py index bbcda5d4..f8de3316 100644 --- a/rootly_sdk/api/services/delete_service.py +++ b/rootly_sdk/api/services/delete_service.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.service_response import ServiceResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/services/get_service.py b/rootly_sdk/api/services/get_service.py index c88fbe8b..fda87ae4 100644 --- a/rootly_sdk/api/services/get_service.py +++ b/rootly_sdk/api/services/get_service.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.service_response import ServiceResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/services/get_service_incidents_chart.py b/rootly_sdk/api/services/get_service_incidents_chart.py index 4262a8f8..9c9985c2 100644 --- a/rootly_sdk/api/services/get_service_incidents_chart.py +++ b/rootly_sdk/api/services/get_service_incidents_chart.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incidents_chart_response import IncidentsChartResponse -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response def _get_kwargs( diff --git a/rootly_sdk/api/services/get_service_uptime_chart.py b/rootly_sdk/api/services/get_service_uptime_chart.py index 3dec2458..b4fe86ad 100644 --- a/rootly_sdk/api/services/get_service_uptime_chart.py +++ b/rootly_sdk/api/services/get_service_uptime_chart.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.uptime_chart_response import UptimeChartResponse -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/services/list_service_catalog_properties.py b/rootly_sdk/api/services/list_service_catalog_properties.py index 825fed21..f86a36c9 100644 --- a/rootly_sdk/api/services/list_service_catalog_properties.py +++ b/rootly_sdk/api/services/list_service_catalog_properties.py @@ -1,21 +1,18 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_property_list import CatalogPropertyList -from ...models.list_service_catalog_properties_include import check_list_service_catalog_properties_include -from ...models.list_service_catalog_properties_include import ListServiceCatalogPropertiesInclude -from ...models.list_service_catalog_properties_sort import check_list_service_catalog_properties_sort -from ...models.list_service_catalog_properties_sort import ListServiceCatalogPropertiesSort -from ...types import UNSET, Unset -from typing import cast - +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( diff --git a/rootly_sdk/api/services/list_services.py b/rootly_sdk/api/services/list_services.py index 69a6c048..f245812d 100644 --- a/rootly_sdk/api/services/list_services.py +++ b/rootly_sdk/api/services/list_services.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.service_list import ServiceList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/services/update_service.py b/rootly_sdk/api/services/update_service.py index 0a52c208..b6b26bbc 100644 --- a/rootly_sdk/api/services/update_service.py +++ b/rootly_sdk/api/services/update_service.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.service_response import ServiceResponse from ...models.update_service import UpdateService -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/severities/create_severity.py b/rootly_sdk/api/severities/create_severity.py index bcf9f071..10aa975d 100644 --- a/rootly_sdk/api/severities/create_severity.py +++ b/rootly_sdk/api/severities/create_severity.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_severity import NewSeverity from ...models.severity_response import SeverityResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/severities/delete_severity.py b/rootly_sdk/api/severities/delete_severity.py index 63d1fb00..f881bf76 100644 --- a/rootly_sdk/api/severities/delete_severity.py +++ b/rootly_sdk/api/severities/delete_severity.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.severity_response import SeverityResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/severities/get_severity.py b/rootly_sdk/api/severities/get_severity.py index b8565f4a..8052c896 100644 --- a/rootly_sdk/api/severities/get_severity.py +++ b/rootly_sdk/api/severities/get_severity.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.severity_response import SeverityResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/severities/list_severities.py b/rootly_sdk/api/severities/list_severities.py index 82e201f2..10b1cc86 100644 --- a/rootly_sdk/api/severities/list_severities.py +++ b/rootly_sdk/api/severities/list_severities.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.severity_list import SeverityList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/severities/update_severity.py b/rootly_sdk/api/severities/update_severity.py index dd956d42..d2b55f77 100644 --- a/rootly_sdk/api/severities/update_severity.py +++ b/rootly_sdk/api/severities/update_severity.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.severity_response import SeverityResponse from ...models.update_severity import UpdateSeverity -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py index a0be3f3c..4f4fe512 100644 --- a/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py +++ b/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_shift_coverage_request import NewShiftCoverageRequest from ...models.shift_coverage_request_list import ShiftCoverageRequestList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py index d03189e1..3918f752 100644 --- a/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py +++ b/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py @@ -1,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.shift_coverage_request_response import ShiftCoverageRequestResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py index b29594d8..5724fd2e 100644 --- a/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py +++ b/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py @@ -1,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.shift_coverage_request_response import ShiftCoverageRequestResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py b/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py index ed6faecc..90598715 100644 --- a/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py +++ b/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py @@ -1,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.shift_coverage_request_list import ShiftCoverageRequestList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/shifts/get_schedule_shifts.py b/rootly_sdk/api/shifts/get_schedule_shifts.py index 49a900b1..0ab10eb8 100644 --- a/rootly_sdk/api/shifts/get_schedule_shifts.py +++ b/rootly_sdk/api/shifts/get_schedule_shifts.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.shift_list import ShiftList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/shifts/list_shifts.py b/rootly_sdk/api/shifts/list_shifts.py index 32d0cc84..c2a3880f 100644 --- a/rootly_sdk/api/shifts/list_shifts.py +++ b/rootly_sdk/api/shifts/list_shifts.py @@ -1,20 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.list_shifts_include import check_list_shifts_include from ...models.list_shifts_include import ListShiftsInclude from ...models.shift_list import ShiftList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/sl_as/create_sla.py b/rootly_sdk/api/sl_as/create_sla.py index 20381da2..73c5545c 100644 --- a/rootly_sdk/api/sl_as/create_sla.py +++ b/rootly_sdk/api/sl_as/create_sla.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_sla import NewSla from ...models.sla_response import SlaResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/sl_as/delete_sla.py b/rootly_sdk/api/sl_as/delete_sla.py index f79d1ba7..86b33ea2 100644 --- a/rootly_sdk/api/sl_as/delete_sla.py +++ b/rootly_sdk/api/sl_as/delete_sla.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.sla_response import SlaResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/sl_as/get_sla.py b/rootly_sdk/api/sl_as/get_sla.py index b54687ed..4b1f9b34 100644 --- a/rootly_sdk/api/sl_as/get_sla.py +++ b/rootly_sdk/api/sl_as/get_sla.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.sla_response import SlaResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/sl_as/list_sl_as.py b/rootly_sdk/api/sl_as/list_sl_as.py index 4767ea0a..09f7e651 100644 --- a/rootly_sdk/api/sl_as/list_sl_as.py +++ b/rootly_sdk/api/sl_as/list_sl_as.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.sla_list import SlaList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/sl_as/update_sla.py b/rootly_sdk/api/sl_as/update_sla.py index a5d3f83c..0b28c96e 100644 --- a/rootly_sdk/api/sl_as/update_sla.py +++ b/rootly_sdk/api/sl_as/update_sla.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.sla_response import SlaResponse from ...models.update_sla import UpdateSla -from typing import cast - +from ...types import Response def _get_kwargs( 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 fe08e958..8a2e57bc 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.status_page_template import StatusPageTemplate from ...models.status_page_template_response import StatusPageTemplateResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 f3ab8bb5..e64b4ed4 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.status_page_template_response import StatusPageTemplateResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 f0b34551..85967bf5 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.status_page_template_response import StatusPageTemplateResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 1a65f26c..065e09d5 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.status_page_template_list import StatusPageTemplateList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 0a845111..840d9a20 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.status_page_template import StatusPageTemplate from ...models.status_page_template_response import StatusPageTemplateResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/status_pages/create_status_page.py b/rootly_sdk/api/status_pages/create_status_page.py index 801934f5..48df8501 100644 --- a/rootly_sdk/api/status_pages/create_status_page.py +++ b/rootly_sdk/api/status_pages/create_status_page.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_status_page import NewStatusPage from ...models.status_page_response import StatusPageResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/status_pages/delete_status_page.py b/rootly_sdk/api/status_pages/delete_status_page.py index 3d379436..90a80ca5 100644 --- a/rootly_sdk/api/status_pages/delete_status_page.py +++ b/rootly_sdk/api/status_pages/delete_status_page.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.status_page_response import StatusPageResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/status_pages/get_status_page.py b/rootly_sdk/api/status_pages/get_status_page.py index fb34e2c6..2e74f226 100644 --- a/rootly_sdk/api/status_pages/get_status_page.py +++ b/rootly_sdk/api/status_pages/get_status_page.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.status_page_response import StatusPageResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/status_pages/list_status_pages.py b/rootly_sdk/api/status_pages/list_status_pages.py index 8db56bb6..27e3d5f7 100644 --- a/rootly_sdk/api/status_pages/list_status_pages.py +++ b/rootly_sdk/api/status_pages/list_status_pages.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.status_page_list import StatusPageList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/status_pages/update_status_page.py b/rootly_sdk/api/status_pages/update_status_page.py index fb640426..2e675a2b 100644 --- a/rootly_sdk/api/status_pages/update_status_page.py +++ b/rootly_sdk/api/status_pages/update_status_page.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.status_page_response import StatusPageResponse from ...models.update_status_page import UpdateStatusPage -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/statuses/get_status.py b/rootly_sdk/api/statuses/get_status.py index aa8d7443..868449cb 100644 --- a/rootly_sdk/api/statuses/get_status.py +++ b/rootly_sdk/api/statuses/get_status.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.status_response import StatusResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/statuses/list_statuses.py b/rootly_sdk/api/statuses/list_statuses.py index 976996ba..6ef59703 100644 --- a/rootly_sdk/api/statuses/list_statuses.py +++ b/rootly_sdk/api/statuses/list_statuses.py @@ -1,18 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.status_list import StatusList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/sub_statuses/create_sub_status.py b/rootly_sdk/api/sub_statuses/create_sub_status.py index 39ab1554..aadefe27 100644 --- a/rootly_sdk/api/sub_statuses/create_sub_status.py +++ b/rootly_sdk/api/sub_statuses/create_sub_status.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_sub_status import NewSubStatus from ...models.sub_status_response import SubStatusResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/sub_statuses/delete_sub_status.py b/rootly_sdk/api/sub_statuses/delete_sub_status.py index ba59d0a5..a5a182a3 100644 --- a/rootly_sdk/api/sub_statuses/delete_sub_status.py +++ b/rootly_sdk/api/sub_statuses/delete_sub_status.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.sub_status_response import SubStatusResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/sub_statuses/get_sub_status.py b/rootly_sdk/api/sub_statuses/get_sub_status.py index c9feb633..efce5621 100644 --- a/rootly_sdk/api/sub_statuses/get_sub_status.py +++ b/rootly_sdk/api/sub_statuses/get_sub_status.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.sub_status_response import SubStatusResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/sub_statuses/list_sub_statuses.py b/rootly_sdk/api/sub_statuses/list_sub_statuses.py index 2211bddc..6f10c920 100644 --- a/rootly_sdk/api/sub_statuses/list_sub_statuses.py +++ b/rootly_sdk/api/sub_statuses/list_sub_statuses.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.sub_status_list import SubStatusList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/sub_statuses/update_sub_status.py b/rootly_sdk/api/sub_statuses/update_sub_status.py index ee30d4d4..6c27e118 100644 --- a/rootly_sdk/api/sub_statuses/update_sub_status.py +++ b/rootly_sdk/api/sub_statuses/update_sub_status.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.sub_status_response import SubStatusResponse from ...models.update_sub_status import UpdateSubStatus -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/teams/bulk_delete_groups.py b/rootly_sdk/api/teams/bulk_delete_groups.py index fdffef17..39a1d313 100644 --- a/rootly_sdk/api/teams/bulk_delete_groups.py +++ b/rootly_sdk/api/teams/bulk_delete_groups.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_destroy_teams_response import BulkDestroyTeamsResponse from ...models.bulk_destroy_teams_type_0 import BulkDestroyTeamsType0 from ...models.bulk_destroy_teams_type_1 import BulkDestroyTeamsType1 from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/teams/bulk_upsert_groups.py b/rootly_sdk/api/teams/bulk_upsert_groups.py index 69d20c23..45cdb26c 100644 --- a/rootly_sdk/api/teams/bulk_upsert_groups.py +++ b/rootly_sdk/api/teams/bulk_upsert_groups.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.bulk_upsert_teams import BulkUpsertTeams from ...models.bulk_upsert_teams_error import BulkUpsertTeamsError from ...models.bulk_upsert_teams_response import BulkUpsertTeamsResponse from ...models.errors_list import ErrorsList -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/teams/create_group_catalog_property.py b/rootly_sdk/api/teams/create_group_catalog_property.py index 92e1ab03..667aa2d9 100644 --- a/rootly_sdk/api/teams/create_group_catalog_property.py +++ b/rootly_sdk/api/teams/create_group_catalog_property.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET 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 typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/teams/create_team.py b/rootly_sdk/api/teams/create_team.py index abeab7a4..64336b1c 100644 --- a/rootly_sdk/api/teams/create_team.py +++ b/rootly_sdk/api/teams/create_team.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_team import NewTeam from ...models.team_response import TeamResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/teams/delete_team.py b/rootly_sdk/api/teams/delete_team.py index fb25bc57..6b8aeef4 100644 --- a/rootly_sdk/api/teams/delete_team.py +++ b/rootly_sdk/api/teams/delete_team.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.team_response import TeamResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/teams/get_team.py b/rootly_sdk/api/teams/get_team.py index 27b4ef29..c2cca437 100644 --- a/rootly_sdk/api/teams/get_team.py +++ b/rootly_sdk/api/teams/get_team.py @@ -1,21 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.get_team_include import check_get_team_include from ...models.get_team_include import GetTeamInclude from ...models.team_response import TeamResponse -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/teams/get_team_incidents_chart.py b/rootly_sdk/api/teams/get_team_incidents_chart.py index d2b7a490..cae557f5 100644 --- a/rootly_sdk/api/teams/get_team_incidents_chart.py +++ b/rootly_sdk/api/teams/get_team_incidents_chart.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.incidents_chart_response import IncidentsChartResponse -from typing import cast - +from ...types import UNSET, Response def _get_kwargs( diff --git a/rootly_sdk/api/teams/list_group_catalog_properties.py b/rootly_sdk/api/teams/list_group_catalog_properties.py index 3533b817..780416a9 100644 --- a/rootly_sdk/api/teams/list_group_catalog_properties.py +++ b/rootly_sdk/api/teams/list_group_catalog_properties.py @@ -1,21 +1,18 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.catalog_property_list import CatalogPropertyList -from ...models.list_group_catalog_properties_include import check_list_group_catalog_properties_include -from ...models.list_group_catalog_properties_include import ListGroupCatalogPropertiesInclude -from ...models.list_group_catalog_properties_sort import check_list_group_catalog_properties_sort -from ...models.list_group_catalog_properties_sort import ListGroupCatalogPropertiesSort -from ...types import UNSET, Unset -from typing import cast - +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( diff --git a/rootly_sdk/api/teams/list_teams.py b/rootly_sdk/api/teams/list_teams.py index df2c9891..b97bed92 100644 --- a/rootly_sdk/api/teams/list_teams.py +++ b/rootly_sdk/api/teams/list_teams.py @@ -1,19 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.list_teams_include import check_list_teams_include +from ...client import AuthenticatedClient, Client from ...models.list_teams_include import ListTeamsInclude from ...models.team_list import TeamList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/teams/update_team.py b/rootly_sdk/api/teams/update_team.py index c8e5f8e9..a0e8d96c 100644 --- a/rootly_sdk/api/teams/update_team.py +++ b/rootly_sdk/api/teams/update_team.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.team_response import TeamResponse from ...models.update_team import UpdateTeam -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( 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 97ae88b2..47ab4359 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_user_email_address import NewUserEmailAddress from ...models.user_email_address_response import UserEmailAddressResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 c82c6818..eaac6866 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_email_address_response import UserEmailAddressResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 8beb63ef..1ccb7cf2 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_email_address_list import UserEmailAddressList -from typing import cast - +from ...types import Response def _get_kwargs( 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 33e3bdda..98929369 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_email_address_response import UserEmailAddressResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 d933eb6f..9416a47c 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_email_address_response import UserEmailAddressResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 333c3744..a0f9f5f0 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_user_email_address import UpdateUserEmailAddress from ...models.user_email_address_response import UserEmailAddressResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 abfc7127..c1705bf3 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_email_address_response import UserEmailAddressResponse -from typing import cast - +from ...types import UNSET, Response def _get_kwargs( 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 adb50c47..19253753 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_user_notification_rule import NewUserNotificationRule from ...models.user_notification_rule_response import UserNotificationRuleResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 0519499a..ac285e3d 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_notification_rule_response import UserNotificationRuleResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 2bb5d176..068564e7 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_notification_rule_response import UserNotificationRuleResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 3bbd782d..cd513ec7 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.user_notification_rule_list import UserNotificationRuleList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 8746054f..8f7cde00 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_user_notification_rule import UpdateUserNotificationRule from ...models.user_notification_rule_response import UserNotificationRuleResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 cd83367b..f8811d68 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_user_phone_number import NewUserPhoneNumber from ...models.user_phone_number_response import UserPhoneNumberResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 064fe4cf..34c67d76 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_phone_number_response import UserPhoneNumberResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 747c37b5..4d12979d 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_phone_number_list import UserPhoneNumberList -from typing import cast - +from ...types import Response def _get_kwargs( 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 f99b7bf4..5e73d520 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_phone_number_response import UserPhoneNumberResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 799c9877..b34f6764 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_user_phone_number import UpdateUserPhoneNumber from ...models.user_phone_number_response import UserPhoneNumberResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/users/delete_user.py b/rootly_sdk/api/users/delete_user.py index c0994de1..72db2e32 100644 --- a/rootly_sdk/api/users/delete_user.py +++ b/rootly_sdk/api/users/delete_user.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_response import UserResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/users/get_current_user.py b/rootly_sdk/api/users/get_current_user.py index 9939a35e..efed9786 100644 --- a/rootly_sdk/api/users/get_current_user.py +++ b/rootly_sdk/api/users/get_current_user.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.user_response import UserResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/users/get_user.py b/rootly_sdk/api/users/get_user.py index 7f6098d9..b5b7dd44 100644 --- a/rootly_sdk/api/users/get_user.py +++ b/rootly_sdk/api/users/get_user.py @@ -1,20 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.get_user_include import check_get_user_include from ...models.get_user_include import GetUserInclude from ...models.user_response import UserResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/users/list_users.py b/rootly_sdk/api/users/list_users.py index 68d556c6..94015268 100644 --- a/rootly_sdk/api/users/list_users.py +++ b/rootly_sdk/api/users/list_users.py @@ -1,22 +1,15 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.list_users_include import check_list_users_include from ...models.list_users_include import ListUsersInclude -from ...models.list_users_sort import check_list_users_sort from ...models.list_users_sort import ListUsersSort from ...models.user_list import UserList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/users/update_user.py b/rootly_sdk/api/users/update_user.py index a7626389..2b964d01 100644 --- a/rootly_sdk/api/users/update_user.py +++ b/rootly_sdk/api/users/update_user.py @@ -1,19 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_user import UpdateUser from ...models.user_response import UserResponse -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py b/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py index b9f42f48..b6bc0805 100644 --- a/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py +++ b/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py @@ -1,16 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.webhooks_delivery_response import WebhooksDeliveryResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py b/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py index c292d8f2..c479e65a 100644 --- a/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py +++ b/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.webhooks_delivery_response import WebhooksDeliveryResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py b/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py index be0907d8..dd41af2b 100644 --- a/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py +++ b/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.webhooks_delivery_list import WebhooksDeliveryList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py index fe2c5c2d..20da6ccd 100644 --- a/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_webhooks_endpoint import NewWebhooksEndpoint from ...models.webhooks_endpoint_response import WebhooksEndpointResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py index 70cba34f..78d15ce4 100644 --- a/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.webhooks_endpoint_response import WebhooksEndpointResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py index 37cd65aa..76356bae 100644 --- a/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.webhooks_endpoint_response import WebhooksEndpointResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py b/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py index 9578b24e..98342393 100644 --- a/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py +++ b/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.webhooks_endpoint_list import WebhooksEndpointList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py index 37bef65a..5ee6fc83 100644 --- a/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_webhooks_endpoint import UpdateWebhooksEndpoint from ...models.webhooks_endpoint_response import WebhooksEndpointResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py index 80863b1f..85cb61bc 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py @@ -4,15 +4,12 @@ import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_workflow_action_item_form_field_condition import NewWorkflowActionItemFormFieldCondition from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py index fd8560c4..e0f022ea 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py index abf5d342..cc189f69 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py index b26c709c..4f92c141 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.workflow_action_item_form_field_condition_list import WorkflowActionItemFormFieldConditionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py index 855c00b7..a3f9d143 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_workflow_action_item_form_field_condition import UpdateWorkflowActionItemFormFieldCondition from ...models.workflow_action_item_form_field_condition_response import WorkflowActionItemFormFieldConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 85344529..9b07fc05 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_workflow_form_field_condition import NewWorkflowFormFieldCondition from ...models.workflow_form_field_condition_response import WorkflowFormFieldConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 4aa474f5..a09a4b5a 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_form_field_condition_response import WorkflowFormFieldConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 031fe6a4..be51dff7 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,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_form_field_condition_response import WorkflowFormFieldConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( 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 6cf64c6e..9b1abf32 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,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.workflow_form_field_condition_list import WorkflowFormFieldConditionList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( 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 71981e17..4a0bb263 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,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_workflow_form_field_condition import UpdateWorkflowFormFieldCondition from ...models.workflow_form_field_condition_response import WorkflowFormFieldConditionResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_groups/create_workflow_group.py b/rootly_sdk/api/workflow_groups/create_workflow_group.py index e0f7f977..2ec68289 100644 --- a/rootly_sdk/api/workflow_groups/create_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/create_workflow_group.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_workflow_group import NewWorkflowGroup from ...models.workflow_group_response import WorkflowGroupResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_groups/delete_workflow_group.py b/rootly_sdk/api/workflow_groups/delete_workflow_group.py index ad4490fb..9faf6070 100644 --- a/rootly_sdk/api/workflow_groups/delete_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/delete_workflow_group.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_group_response import WorkflowGroupResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_groups/get_workflow_group.py b/rootly_sdk/api/workflow_groups/get_workflow_group.py index cb60e2af..ca691893 100644 --- a/rootly_sdk/api/workflow_groups/get_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/get_workflow_group.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_group_response import WorkflowGroupResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_groups/list_workflow_groups.py b/rootly_sdk/api/workflow_groups/list_workflow_groups.py index dd8eda5e..61535a4a 100644 --- a/rootly_sdk/api/workflow_groups/list_workflow_groups.py +++ b/rootly_sdk/api/workflow_groups/list_workflow_groups.py @@ -1,17 +1,12 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.workflow_group_list import WorkflowGroupList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/workflow_groups/update_workflow_group.py b/rootly_sdk/api/workflow_groups/update_workflow_group.py index 1e5f71eb..f07c29eb 100644 --- a/rootly_sdk/api/workflow_groups/update_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/update_workflow_group.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_workflow_group import UpdateWorkflowGroup from ...models.workflow_group_response import WorkflowGroupResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_runs/create_workflow_run.py b/rootly_sdk/api/workflow_runs/create_workflow_run.py index 20aee5b5..807401a1 100644 --- a/rootly_sdk/api/workflow_runs/create_workflow_run.py +++ b/rootly_sdk/api/workflow_runs/create_workflow_run.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_workflow_run import NewWorkflowRun from ...models.workflow_run_response import WorkflowRunResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_runs/list_workflow_runs.py b/rootly_sdk/api/workflow_runs/list_workflow_runs.py index de37d060..410344c1 100644 --- a/rootly_sdk/api/workflow_runs/list_workflow_runs.py +++ b/rootly_sdk/api/workflow_runs/list_workflow_runs.py @@ -1,19 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.list_workflow_runs_include import check_list_workflow_runs_include +from ...client import AuthenticatedClient, Client from ...models.list_workflow_runs_include import ListWorkflowRunsInclude from ...models.workflow_runs_list import WorkflowRunsList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/workflow_tasks/create_workflow_task.py b/rootly_sdk/api/workflow_tasks/create_workflow_task.py index 25d67f11..f1d81127 100644 --- a/rootly_sdk/api/workflow_tasks/create_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/create_workflow_task.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_workflow_task import NewWorkflowTask from ...models.workflow_task_response import WorkflowTaskResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_tasks/delete_workflow_task.py b/rootly_sdk/api/workflow_tasks/delete_workflow_task.py index 9dc65cc7..6838a0f6 100644 --- a/rootly_sdk/api/workflow_tasks/delete_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/delete_workflow_task.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_task_response import WorkflowTaskResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_tasks/get_workflow_task.py b/rootly_sdk/api/workflow_tasks/get_workflow_task.py index 9306c592..6d2cf894 100644 --- a/rootly_sdk/api/workflow_tasks/get_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/get_workflow_task.py @@ -1,17 +1,14 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_task_response import WorkflowTaskResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py index 8fd1ce0b..e90b20ce 100644 --- a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py +++ b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py @@ -1,17 +1,13 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.workflow_task_list import WorkflowTaskList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/workflow_tasks/update_workflow_task.py b/rootly_sdk/api/workflow_tasks/update_workflow_task.py index 0bea4d44..99d59d37 100644 --- a/rootly_sdk/api/workflow_tasks/update_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/update_workflow_task.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_workflow_task import UpdateWorkflowTask from ...models.workflow_task_response import WorkflowTaskResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflows/create_workflow.py b/rootly_sdk/api/workflows/create_workflow.py index 3bf862af..e442e251 100644 --- a/rootly_sdk/api/workflows/create_workflow.py +++ b/rootly_sdk/api/workflows/create_workflow.py @@ -1,18 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.new_workflow import NewWorkflow from ...models.workflow_response import WorkflowResponse -from typing import cast - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflows/delete_workflow.py b/rootly_sdk/api/workflows/delete_workflow.py index c8e84977..25e1f741 100644 --- a/rootly_sdk/api/workflows/delete_workflow.py +++ b/rootly_sdk/api/workflows/delete_workflow.py @@ -1,18 +1,15 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.workflow_response import WorkflowResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/api/workflows/get_workflow.py b/rootly_sdk/api/workflows/get_workflow.py index 8b50481c..54e1957f 100644 --- a/rootly_sdk/api/workflows/get_workflow.py +++ b/rootly_sdk/api/workflows/get_workflow.py @@ -1,21 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList -from ...models.get_workflow_include import check_get_workflow_include from ...models.get_workflow_include import GetWorkflowInclude from ...models.workflow_response import WorkflowResponse -from ...types import UNSET, Unset -from typing import cast -from uuid import UUID - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/workflows/list_workflows.py b/rootly_sdk/api/workflows/list_workflows.py index 5429b215..a28d9c95 100644 --- a/rootly_sdk/api/workflows/list_workflows.py +++ b/rootly_sdk/api/workflows/list_workflows.py @@ -1,21 +1,14 @@ from http import HTTPStatus -from typing import Any, cast -from urllib.parse import quote +from typing import Any import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - -from ...models.list_workflows_include import check_list_workflows_include +from ...client import AuthenticatedClient, Client from ...models.list_workflows_include import ListWorkflowsInclude -from ...models.list_workflows_sort import check_list_workflows_sort from ...models.list_workflows_sort import ListWorkflowsSort from ...models.workflow_list import WorkflowList -from ...types import UNSET, Unset -from typing import cast - +from ...types import UNSET, Response, Unset def _get_kwargs( diff --git a/rootly_sdk/api/workflows/update_workflow.py b/rootly_sdk/api/workflows/update_workflow.py index 478e5725..cd73da6f 100644 --- a/rootly_sdk/api/workflows/update_workflow.py +++ b/rootly_sdk/api/workflows/update_workflow.py @@ -1,19 +1,16 @@ from http import HTTPStatus -from typing import Any, cast +from typing import Any from urllib.parse import quote +from uuid import UUID import httpx -from ...client import AuthenticatedClient, Client -from ...types import Response, UNSET from ... import errors - +from ...client import AuthenticatedClient, Client from ...models.errors_list import ErrorsList from ...models.update_workflow import UpdateWorkflow from ...models.workflow_response import WorkflowResponse -from typing import cast -from uuid import UUID - +from ...types import Response def _get_kwargs( diff --git a/rootly_sdk/client.py b/rootly_sdk/client.py index 5eeb05a0..92d39e90 100644 --- a/rootly_sdk/client.py +++ b/rootly_sdk/client.py @@ -1,11 +1,8 @@ import ssl from typing import Any -from attrs import define, field, evolve import httpx - - - +from attrs import define, evolve, field @define diff --git a/rootly_sdk/models/action_item_trigger_params.py b/rootly_sdk/models/action_item_trigger_params.py index 0851eaa9..21a6b5c3 100644 --- a/rootly_sdk/models/action_item_trigger_params.py +++ b/rootly_sdk/models/action_item_trigger_params.py @@ -1,180 +1,136 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.action_item_trigger_params_incident_action_item_condition import ( ActionItemTriggerParamsIncidentActionItemCondition, -) -from ..models.action_item_trigger_params_incident_action_item_condition import ( check_action_item_trigger_params_incident_action_item_condition, ) from ..models.action_item_trigger_params_incident_action_item_condition_group import ( ActionItemTriggerParamsIncidentActionItemConditionGroup, -) -from ..models.action_item_trigger_params_incident_action_item_condition_group import ( check_action_item_trigger_params_incident_action_item_condition_group, ) from ..models.action_item_trigger_params_incident_action_item_condition_kind import ( ActionItemTriggerParamsIncidentActionItemConditionKind, -) -from ..models.action_item_trigger_params_incident_action_item_condition_kind import ( check_action_item_trigger_params_incident_action_item_condition_kind, ) from ..models.action_item_trigger_params_incident_action_item_condition_priority import ( ActionItemTriggerParamsIncidentActionItemConditionPriority, -) -from ..models.action_item_trigger_params_incident_action_item_condition_priority import ( check_action_item_trigger_params_incident_action_item_condition_priority, ) from ..models.action_item_trigger_params_incident_action_item_condition_status import ( ActionItemTriggerParamsIncidentActionItemConditionStatus, -) -from ..models.action_item_trigger_params_incident_action_item_condition_status import ( check_action_item_trigger_params_incident_action_item_condition_status, ) from ..models.action_item_trigger_params_incident_action_item_kinds_item import ( ActionItemTriggerParamsIncidentActionItemKindsItem, -) -from ..models.action_item_trigger_params_incident_action_item_kinds_item import ( check_action_item_trigger_params_incident_action_item_kinds_item, ) from ..models.action_item_trigger_params_incident_action_item_priorities_item import ( ActionItemTriggerParamsIncidentActionItemPrioritiesItem, -) -from ..models.action_item_trigger_params_incident_action_item_priorities_item import ( check_action_item_trigger_params_incident_action_item_priorities_item, ) from ..models.action_item_trigger_params_incident_action_item_statuses_item import ( ActionItemTriggerParamsIncidentActionItemStatusesItem, -) -from ..models.action_item_trigger_params_incident_action_item_statuses_item import ( check_action_item_trigger_params_incident_action_item_statuses_item, ) -from ..models.action_item_trigger_params_incident_condition import ActionItemTriggerParamsIncidentCondition -from ..models.action_item_trigger_params_incident_condition import check_action_item_trigger_params_incident_condition -from ..models.action_item_trigger_params_incident_condition_acknowledged_at import ( - ActionItemTriggerParamsIncidentConditionAcknowledgedAt, +from ..models.action_item_trigger_params_incident_condition import ( + ActionItemTriggerParamsIncidentCondition, + check_action_item_trigger_params_incident_condition, ) from ..models.action_item_trigger_params_incident_condition_acknowledged_at import ( + ActionItemTriggerParamsIncidentConditionAcknowledgedAt, check_action_item_trigger_params_incident_condition_acknowledged_at, ) from ..models.action_item_trigger_params_incident_condition_detected_at import ( ActionItemTriggerParamsIncidentConditionDetectedAt, -) -from ..models.action_item_trigger_params_incident_condition_detected_at import ( check_action_item_trigger_params_incident_condition_detected_at, ) from ..models.action_item_trigger_params_incident_condition_environment import ( ActionItemTriggerParamsIncidentConditionEnvironment, -) -from ..models.action_item_trigger_params_incident_condition_environment import ( check_action_item_trigger_params_incident_condition_environment, ) from ..models.action_item_trigger_params_incident_condition_functionality import ( ActionItemTriggerParamsIncidentConditionFunctionality, -) -from ..models.action_item_trigger_params_incident_condition_functionality import ( check_action_item_trigger_params_incident_condition_functionality, ) -from ..models.action_item_trigger_params_incident_condition_group import ActionItemTriggerParamsIncidentConditionGroup from ..models.action_item_trigger_params_incident_condition_group import ( + ActionItemTriggerParamsIncidentConditionGroup, check_action_item_trigger_params_incident_condition_group, ) from ..models.action_item_trigger_params_incident_condition_incident_roles import ( ActionItemTriggerParamsIncidentConditionIncidentRoles, -) -from ..models.action_item_trigger_params_incident_condition_incident_roles import ( check_action_item_trigger_params_incident_condition_incident_roles, ) from ..models.action_item_trigger_params_incident_condition_incident_type import ( ActionItemTriggerParamsIncidentConditionIncidentType, -) -from ..models.action_item_trigger_params_incident_condition_incident_type import ( check_action_item_trigger_params_incident_condition_incident_type, ) -from ..models.action_item_trigger_params_incident_condition_kind import ActionItemTriggerParamsIncidentConditionKind from ..models.action_item_trigger_params_incident_condition_kind import ( + ActionItemTriggerParamsIncidentConditionKind, check_action_item_trigger_params_incident_condition_kind, ) -from ..models.action_item_trigger_params_incident_condition_label import ActionItemTriggerParamsIncidentConditionLabel from ..models.action_item_trigger_params_incident_condition_label import ( + ActionItemTriggerParamsIncidentConditionLabel, check_action_item_trigger_params_incident_condition_label, ) from ..models.action_item_trigger_params_incident_condition_mitigated_at import ( ActionItemTriggerParamsIncidentConditionMitigatedAt, -) -from ..models.action_item_trigger_params_incident_condition_mitigated_at import ( check_action_item_trigger_params_incident_condition_mitigated_at, ) from ..models.action_item_trigger_params_incident_condition_resolved_at import ( ActionItemTriggerParamsIncidentConditionResolvedAt, -) -from ..models.action_item_trigger_params_incident_condition_resolved_at import ( check_action_item_trigger_params_incident_condition_resolved_at, ) from ..models.action_item_trigger_params_incident_condition_service import ( ActionItemTriggerParamsIncidentConditionService, -) -from ..models.action_item_trigger_params_incident_condition_service import ( check_action_item_trigger_params_incident_condition_service, ) from ..models.action_item_trigger_params_incident_condition_severity import ( ActionItemTriggerParamsIncidentConditionSeverity, -) -from ..models.action_item_trigger_params_incident_condition_severity import ( check_action_item_trigger_params_incident_condition_severity, ) from ..models.action_item_trigger_params_incident_condition_started_at import ( ActionItemTriggerParamsIncidentConditionStartedAt, -) -from ..models.action_item_trigger_params_incident_condition_started_at import ( check_action_item_trigger_params_incident_condition_started_at, ) -from ..models.action_item_trigger_params_incident_condition_status import ActionItemTriggerParamsIncidentConditionStatus from ..models.action_item_trigger_params_incident_condition_status import ( + ActionItemTriggerParamsIncidentConditionStatus, check_action_item_trigger_params_incident_condition_status, ) from ..models.action_item_trigger_params_incident_condition_sub_status import ( ActionItemTriggerParamsIncidentConditionSubStatus, -) -from ..models.action_item_trigger_params_incident_condition_sub_status import ( check_action_item_trigger_params_incident_condition_sub_status, ) from ..models.action_item_trigger_params_incident_condition_summary import ( ActionItemTriggerParamsIncidentConditionSummary, -) -from ..models.action_item_trigger_params_incident_condition_summary import ( check_action_item_trigger_params_incident_condition_summary, ) from ..models.action_item_trigger_params_incident_condition_visibility import ( ActionItemTriggerParamsIncidentConditionVisibility, -) -from ..models.action_item_trigger_params_incident_condition_visibility import ( check_action_item_trigger_params_incident_condition_visibility, ) from ..models.action_item_trigger_params_incident_conditional_inactivity import ( ActionItemTriggerParamsIncidentConditionalInactivity, -) -from ..models.action_item_trigger_params_incident_conditional_inactivity import ( check_action_item_trigger_params_incident_conditional_inactivity, ) -from ..models.action_item_trigger_params_incident_kinds_item import ActionItemTriggerParamsIncidentKindsItem -from ..models.action_item_trigger_params_incident_kinds_item import check_action_item_trigger_params_incident_kinds_item -from ..models.action_item_trigger_params_incident_statuses_item import ActionItemTriggerParamsIncidentStatusesItem +from ..models.action_item_trigger_params_incident_kinds_item import ( + ActionItemTriggerParamsIncidentKindsItem, + check_action_item_trigger_params_incident_kinds_item, +) from ..models.action_item_trigger_params_incident_statuses_item import ( + ActionItemTriggerParamsIncidentStatusesItem, check_action_item_trigger_params_incident_statuses_item, ) -from ..models.action_item_trigger_params_trigger_type import ActionItemTriggerParamsTriggerType -from ..models.action_item_trigger_params_trigger_type import check_action_item_trigger_params_trigger_type +from ..models.action_item_trigger_params_trigger_type import ( + ActionItemTriggerParamsTriggerType, + check_action_item_trigger_params_trigger_type, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="ActionItemTriggerParams") diff --git a/rootly_sdk/models/add_action_item_task_params.py b/rootly_sdk/models/add_action_item_task_params.py index b01ac691..5d141312 100644 --- a/rootly_sdk/models/add_action_item_task_params.py +++ b/rootly_sdk/models/add_action_item_task_params.py @@ -1,25 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.add_action_item_task_params_attribute_to_query_by import AddActionItemTaskParamsAttributeToQueryBy from ..models.add_action_item_task_params_attribute_to_query_by import ( + AddActionItemTaskParamsAttributeToQueryBy, check_add_action_item_task_params_attribute_to_query_by, ) -from ..models.add_action_item_task_params_priority import AddActionItemTaskParamsPriority -from ..models.add_action_item_task_params_priority import check_add_action_item_task_params_priority -from ..models.add_action_item_task_params_status import AddActionItemTaskParamsStatus -from ..models.add_action_item_task_params_status import check_add_action_item_task_params_status -from ..models.add_action_item_task_params_task_type import AddActionItemTaskParamsTaskType -from ..models.add_action_item_task_params_task_type import check_add_action_item_task_params_task_type +from ..models.add_action_item_task_params_priority import ( + AddActionItemTaskParamsPriority, + check_add_action_item_task_params_priority, +) +from ..models.add_action_item_task_params_status import ( + AddActionItemTaskParamsStatus, + check_add_action_item_task_params_status, +) +from ..models.add_action_item_task_params_task_type import ( + AddActionItemTaskParamsTaskType, + check_add_action_item_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.add_action_item_task_params_assigned_to_user import AddActionItemTaskParamsAssignedToUser @@ -71,10 +74,6 @@ class AddActionItemTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.add_action_item_task_params_assigned_to_user import AddActionItemTaskParamsAssignedToUser - from ..models.add_action_item_task_params_post_to_slack_channels_item import ( - AddActionItemTaskParamsPostToSlackChannelsItem, - ) priority: str = self.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 162c54ff..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AddActionItemTaskParamsAssignedToUser") 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 8eb97801..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AddActionItemTaskParamsPostToSlackChannelsItem") 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 5af195a7..97e5faf6 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,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.add_microsoft_teams_chat_tab_task_params_task_type import AddMicrosoftTeamsChatTabTaskParamsTaskType from ..models.add_microsoft_teams_chat_tab_task_params_task_type import ( + AddMicrosoftTeamsChatTabTaskParamsTaskType, check_add_microsoft_teams_chat_tab_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.add_microsoft_teams_chat_tab_task_params_chat import AddMicrosoftTeamsChatTabTaskParamsChat @@ -39,7 +36,6 @@ class AddMicrosoftTeamsChatTabTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.add_microsoft_teams_chat_tab_task_params_chat import AddMicrosoftTeamsChatTabTaskParamsChat chat = self.chat.to_dict() 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 3928a22b..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AddMicrosoftTeamsChatTabTaskParamsChat") diff --git a/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py index 95097dc1..b641221f 100644 --- a/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py +++ b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AddMicrosoftTeamsTabTaskParamsType0") diff --git a/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py index 79b3e9ea..d3997e1b 100644 --- a/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py +++ b/rootly_sdk/models/add_microsoft_teams_tab_task_params_type_1.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AddMicrosoftTeamsTabTaskParamsType1") diff --git a/rootly_sdk/models/add_role_task_params.py b/rootly_sdk/models/add_role_task_params.py index e7a5ef42..c00fb3ce 100644 --- a/rootly_sdk/models/add_role_task_params.py +++ b/rootly_sdk/models/add_role_task_params.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.add_role_task_params_task_type import AddRoleTaskParamsTaskType, check_add_role_task_params_task_type from ..types import UNSET, Unset -from ..models.add_role_task_params_task_type import AddRoleTaskParamsTaskType -from ..models.add_role_task_params_task_type import check_add_role_task_params_task_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.add_role_task_params_assigned_to_user import AddRoleTaskParamsAssignedToUser @@ -38,7 +34,6 @@ class AddRoleTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.add_role_task_params_assigned_to_user import AddRoleTaskParamsAssignedToUser incident_role_id = self.incident_role_id 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 4accb57a..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AddRoleTaskParamsAssignedToUser") diff --git a/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py b/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py index 86a13d51..e256010f 100644 --- a/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py +++ b/rootly_sdk/models/add_slack_bookmark_task_params_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AddSlackBookmarkTaskParamsType0") diff --git a/rootly_sdk/models/add_slack_bookmark_task_params_type_1.py b/rootly_sdk/models/add_slack_bookmark_task_params_type_1.py index c5fde13d..051110dd 100644 --- a/rootly_sdk/models/add_slack_bookmark_task_params_type_1.py +++ b/rootly_sdk/models/add_slack_bookmark_task_params_type_1.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AddSlackBookmarkTaskParamsType1") diff --git a/rootly_sdk/models/add_subscribers.py b/rootly_sdk/models/add_subscribers.py index f6a86098..50590e8b 100644 --- a/rootly_sdk/models/add_subscribers.py +++ b/rootly_sdk/models/add_subscribers.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.add_subscribers_data import AddSubscribersData @@ -28,7 +24,6 @@ class AddSubscribers: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.add_subscribers_data import AddSubscribersData data = self.data.to_dict() diff --git a/rootly_sdk/models/add_subscribers_data.py b/rootly_sdk/models/add_subscribers_data.py index 3406f35a..07e1b77d 100644 --- a/rootly_sdk/models/add_subscribers_data.py +++ b/rootly_sdk/models/add_subscribers_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.add_subscribers_data_type import AddSubscribersDataType -from ..models.add_subscribers_data_type import check_add_subscribers_data_type -from typing import cast +from ..models.add_subscribers_data_type import AddSubscribersDataType, check_add_subscribers_data_type if TYPE_CHECKING: from ..models.add_subscribers_data_attributes import AddSubscribersDataAttributes @@ -32,7 +28,6 @@ class AddSubscribersData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.add_subscribers_data_attributes import AddSubscribersDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/add_subscribers_data_attributes.py b/rootly_sdk/models/add_subscribers_data_attributes.py index 4415f6fe..7f819592 100644 --- a/rootly_sdk/models/add_subscribers_data_attributes.py +++ b/rootly_sdk/models/add_subscribers_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="AddSubscribersDataAttributes") diff --git a/rootly_sdk/models/add_team_task_params.py b/rootly_sdk/models/add_team_task_params.py index 60066717..20b40bd2 100644 --- a/rootly_sdk/models/add_team_task_params.py +++ b/rootly_sdk/models/add_team_task_params.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.add_team_task_params_task_type import AddTeamTaskParamsTaskType, check_add_team_task_params_task_type from ..types import UNSET, Unset -from ..models.add_team_task_params_task_type import AddTeamTaskParamsTaskType -from ..models.add_team_task_params_task_type import check_add_team_task_params_task_type -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="AddTeamTaskParams") diff --git a/rootly_sdk/models/add_to_timeline_task_params.py b/rootly_sdk/models/add_to_timeline_task_params.py index f3979c53..d94652d3 100644 --- a/rootly_sdk/models/add_to_timeline_task_params.py +++ b/rootly_sdk/models/add_to_timeline_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.add_to_timeline_task_params_task_type import ( + AddToTimelineTaskParamsTaskType, + check_add_to_timeline_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.add_to_timeline_task_params_task_type import AddToTimelineTaskParamsTaskType -from ..models.add_to_timeline_task_params_task_type import check_add_to_timeline_task_params_task_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.add_to_timeline_task_params_post_to_slack_channels_item import ( AddToTimelineTaskParamsPostToSlackChannelsItem, @@ -39,9 +38,6 @@ class AddToTimelineTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.add_to_timeline_task_params_post_to_slack_channels_item import ( - AddToTimelineTaskParamsPostToSlackChannelsItem, - ) event = self.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 d9a815e1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AddToTimelineTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/ai_chat_response.py b/rootly_sdk/models/ai_chat_response.py index 64f562cf..d4a4d120 100644 --- a/rootly_sdk/models/ai_chat_response.py +++ b/rootly_sdk/models/ai_chat_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.ai_chat_response_data import AiChatResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AiChatResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.ai_chat_response_data import AiChatResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/ai_chat_response_data.py b/rootly_sdk/models/ai_chat_response_data.py index b4f9c600..9a4718a5 100644 --- a/rootly_sdk/models/ai_chat_response_data.py +++ b/rootly_sdk/models/ai_chat_response_data.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.ai_chat_response_data_type import AiChatResponseDataType -from ..models.ai_chat_response_data_type import check_ai_chat_response_data_type -from typing import cast -from uuid import UUID +from ..models.ai_chat_response_data_type import AiChatResponseDataType, check_ai_chat_response_data_type if TYPE_CHECKING: from ..models.ai_chat_response_data_attributes import AiChatResponseDataAttributes @@ -35,7 +31,6 @@ class AiChatResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.ai_chat_response_data_attributes import AiChatResponseDataAttributes id = str(self.id) diff --git a/rootly_sdk/models/ai_chat_response_data_attributes.py b/rootly_sdk/models/ai_chat_response_data_attributes.py index baaaae07..67c0577f 100644 --- a/rootly_sdk/models/ai_chat_response_data_attributes.py +++ b/rootly_sdk/models/ai_chat_response_data_attributes.py @@ -1,20 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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.ai_chat_response_data_attributes_status import ( + AiChatResponseDataAttributesStatus, + check_ai_chat_response_data_attributes_status, +) from ..types import UNSET, Unset -from ..models.ai_chat_response_data_attributes_status import AiChatResponseDataAttributesStatus -from ..models.ai_chat_response_data_attributes_status import check_ai_chat_response_data_attributes_status -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - - T = TypeVar("T", bound="AiChatResponseDataAttributes") diff --git a/rootly_sdk/models/ai_chat_session_message.py b/rootly_sdk/models/ai_chat_session_message.py index 339b3a07..272ca8ed 100644 --- a/rootly_sdk/models/ai_chat_session_message.py +++ b/rootly_sdk/models/ai_chat_session_message.py @@ -1,20 +1,15 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -from ..models.ai_chat_session_message_role import AiChatSessionMessageRole -from ..models.ai_chat_session_message_role import check_ai_chat_session_message_role from dateutil.parser import isoparse -from typing import cast -from uuid import UUID -import datetime +from ..models.ai_chat_session_message_role import AiChatSessionMessageRole, check_ai_chat_session_message_role T = TypeVar("T", bound="AiChatSessionMessage") diff --git a/rootly_sdk/models/ai_chat_session_message_list.py b/rootly_sdk/models/ai_chat_session_message_list.py index 0b09d867..7d5486bd 100644 --- a/rootly_sdk/models/ai_chat_session_message_list.py +++ b/rootly_sdk/models/ai_chat_session_message_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.ai_chat_session_message import AiChatSessionMessage from ..models.ai_chat_session_message_list_meta import AiChatSessionMessageListMeta @@ -32,8 +29,6 @@ class AiChatSessionMessageList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.ai_chat_session_message_list_meta import AiChatSessionMessageListMeta - from ..models.ai_chat_session_message import AiChatSessionMessage messages = [] for messages_item_data in self.messages: diff --git a/rootly_sdk/models/ai_chat_session_message_list_meta.py b/rootly_sdk/models/ai_chat_session_message_list_meta.py index 9f0cb383..6d3a6dd3 100644 --- a/rootly_sdk/models/ai_chat_session_message_list_meta.py +++ b/rootly_sdk/models/ai_chat_session_message_list_meta.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AiChatSessionMessageListMeta") diff --git a/rootly_sdk/models/alert.py b/rootly_sdk/models/alert.py index 15ced4bc..db843d35 100644 --- a/rootly_sdk/models/alert.py +++ b/rootly_sdk/models/alert.py @@ -1,24 +1,18 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from dateutil.parser import isoparse +from ..models.alert_noise import AlertNoise, check_alert_noise +from ..models.alert_notification_target_type import AlertNotificationTargetType, check_alert_notification_target_type +from ..models.alert_status import AlertStatus, check_alert_status from ..types import UNSET, Unset -from ..models.alert_noise import AlertNoise -from ..models.alert_noise import check_alert_noise -from ..models.alert_notification_target_type import AlertNotificationTargetType -from ..models.alert_notification_target_type import check_alert_notification_target_type -from ..models.alert_status import AlertStatus -from ..models.alert_status import check_alert_status -from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime - if TYPE_CHECKING: from ..models.alert_alert_field_values_type_0_item import AlertAlertFieldValuesType0Item from ..models.alert_alerting_targets_type_0_item import AlertAlertingTargetsType0Item @@ -122,17 +116,8 @@ class Alert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_alerting_targets_type_0_item import AlertAlertingTargetsType0Item - from ..models.service import Service - from ..models.alert_alert_field_values_type_0_item import AlertAlertFieldValuesType0Item - from ..models.user_flat_response import UserFlatResponse - from ..models.user import User - from ..models.team import Team from ..models.alert_data_type_0 import AlertDataType0 from ..models.alert_labels_item_type_0 import AlertLabelsItemType0 - from ..models.environment import Environment - from ..models.functionality import Functionality - from ..models.alert_urgency import AlertUrgency short_id = self.short_id diff --git a/rootly_sdk/models/alert_alert_field_values_type_0_item.py b/rootly_sdk/models/alert_alert_field_values_type_0_item.py index e2df660e..2be2c603 100644 --- a/rootly_sdk/models/alert_alert_field_values_type_0_item.py +++ b/rootly_sdk/models/alert_alert_field_values_type_0_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AlertAlertFieldValuesType0Item") diff --git a/rootly_sdk/models/alert_alerting_targets_type_0_item.py b/rootly_sdk/models/alert_alerting_targets_type_0_item.py index 86df5734..2ed599cc 100644 --- a/rootly_sdk/models/alert_alerting_targets_type_0_item.py +++ b/rootly_sdk/models/alert_alerting_targets_type_0_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AlertAlertingTargetsType0Item") diff --git a/rootly_sdk/models/alert_data_type_0.py b/rootly_sdk/models/alert_data_type_0.py index bfe7fa8f..ce1e2630 100644 --- a/rootly_sdk/models/alert_data_type_0.py +++ b/rootly_sdk/models/alert_data_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AlertDataType0") diff --git a/rootly_sdk/models/alert_event.py b/rootly_sdk/models/alert_event.py index 8f9e898b..66639594 100644 --- a/rootly_sdk/models/alert_event.py +++ b/rootly_sdk/models/alert_event.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.alert_event_action import AlertEventAction, check_alert_event_action +from ..models.alert_event_kind import AlertEventKind, check_alert_event_kind from ..types import UNSET, Unset -from ..models.alert_event_action import AlertEventAction -from ..models.alert_event_action import check_alert_event_action -from ..models.alert_event_kind import AlertEventKind -from ..models.alert_event_kind import check_alert_event_kind -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 from ..models.alert_event_incident_type_0 import AlertEventIncidentType0 @@ -69,9 +64,7 @@ class AlertEvent: def to_dict(self) -> dict[str, Any]: from ..models.alert_event_escalation_target_type_0 import AlertEventEscalationTargetType0 - from ..models.slack_channel import SlackChannel from ..models.alert_event_incident_type_0 import AlertEventIncidentType0 - from ..models.alert_event_user import AlertEventUser from ..models.alert_event_schedule_type_0 import AlertEventScheduleType0 alert_id = self.alert_id diff --git a/rootly_sdk/models/alert_event_escalation_target_type_0.py b/rootly_sdk/models/alert_event_escalation_target_type_0.py index 58f2f757..5d706e96 100644 --- a/rootly_sdk/models/alert_event_escalation_target_type_0.py +++ b/rootly_sdk/models/alert_event_escalation_target_type_0.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_event_escalation_target_type_0_data import AlertEventEscalationTargetType0Data @@ -30,7 +27,6 @@ class AlertEventEscalationTargetType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_event_escalation_target_type_0_data import AlertEventEscalationTargetType0Data data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/alert_event_escalation_target_type_0_data.py b/rootly_sdk/models/alert_event_escalation_target_type_0_data.py index e7c1d87b..70c7da0d 100644 --- a/rootly_sdk/models/alert_event_escalation_target_type_0_data.py +++ b/rootly_sdk/models/alert_event_escalation_target_type_0_data.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_event_escalation_target_type_0_data_attributes import ( AlertEventEscalationTargetType0DataAttributes, @@ -35,9 +32,6 @@ class AlertEventEscalationTargetType0Data: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_event_escalation_target_type_0_data_attributes import ( - AlertEventEscalationTargetType0DataAttributes, - ) id = self.id diff --git a/rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py b/rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py index 41a8f35a..dc65c652 100644 --- a/rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py +++ b/rootly_sdk/models/alert_event_escalation_target_type_0_data_attributes.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AlertEventEscalationTargetType0DataAttributes") diff --git a/rootly_sdk/models/alert_event_feed_list.py b/rootly_sdk/models/alert_event_feed_list.py index ae334aac..bf831ccd 100644 --- a/rootly_sdk/models/alert_event_feed_list.py +++ b/rootly_sdk/models/alert_event_feed_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_event_feed_list_data_item import AlertEventFeedListDataItem from ..models.alert_event_feed_meta import AlertEventFeedMeta @@ -39,10 +36,6 @@ class AlertEventFeedList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_event_feed_meta import AlertEventFeedMeta - from ..models.alert_event_feed_list_data_item import AlertEventFeedListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/alert_event_feed_list_data_item.py b/rootly_sdk/models/alert_event_feed_list_data_item.py index e7b3d8e8..acf7a370 100644 --- a/rootly_sdk/models/alert_event_feed_list_data_item.py +++ b/rootly_sdk/models/alert_event_feed_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_event_feed_list_data_item_type import AlertEventFeedListDataItemType -from ..models.alert_event_feed_list_data_item_type import check_alert_event_feed_list_data_item_type -from typing import cast +from ..models.alert_event_feed_list_data_item_type import ( + AlertEventFeedListDataItemType, + check_alert_event_feed_list_data_item_type, +) if TYPE_CHECKING: from ..models.alert_event import AlertEvent @@ -34,7 +33,6 @@ class AlertEventFeedListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_event import AlertEvent id = self.id diff --git a/rootly_sdk/models/alert_event_feed_meta.py b/rootly_sdk/models/alert_event_feed_meta.py index 838283b6..cde271b6 100644 --- a/rootly_sdk/models/alert_event_feed_meta.py +++ b/rootly_sdk/models/alert_event_feed_meta.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="AlertEventFeedMeta") diff --git a/rootly_sdk/models/alert_event_incident_type_0.py b/rootly_sdk/models/alert_event_incident_type_0.py index 5d4b0da7..902f09f6 100644 --- a/rootly_sdk/models/alert_event_incident_type_0.py +++ b/rootly_sdk/models/alert_event_incident_type_0.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="AlertEventIncidentType0") diff --git a/rootly_sdk/models/alert_event_list.py b/rootly_sdk/models/alert_event_list.py index 4ff1e890..796c0bfd 100644 --- a/rootly_sdk/models/alert_event_list.py +++ b/rootly_sdk/models/alert_event_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_event_list_data_item import AlertEventListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class AlertEventList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.alert_event_list_data_item import AlertEventListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/alert_event_list_data_item.py b/rootly_sdk/models/alert_event_list_data_item.py index 6a655475..3691da9b 100644 --- a/rootly_sdk/models/alert_event_list_data_item.py +++ b/rootly_sdk/models/alert_event_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_event_list_data_item_type import AlertEventListDataItemType -from ..models.alert_event_list_data_item_type import check_alert_event_list_data_item_type -from typing import cast +from ..models.alert_event_list_data_item_type import AlertEventListDataItemType, check_alert_event_list_data_item_type if TYPE_CHECKING: from ..models.alert_event import AlertEvent @@ -34,7 +30,6 @@ class AlertEventListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_event import AlertEvent id = self.id diff --git a/rootly_sdk/models/alert_event_response.py b/rootly_sdk/models/alert_event_response.py index 38d883fc..95a9e35b 100644 --- a/rootly_sdk/models/alert_event_response.py +++ b/rootly_sdk/models/alert_event_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_event_response_data import AlertEventResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AlertEventResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_event_response_data import AlertEventResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/alert_event_response_data.py b/rootly_sdk/models/alert_event_response_data.py index 0633a39c..5fddf97f 100644 --- a/rootly_sdk/models/alert_event_response_data.py +++ b/rootly_sdk/models/alert_event_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_event_response_data_type import AlertEventResponseDataType -from ..models.alert_event_response_data_type import check_alert_event_response_data_type -from typing import cast +from ..models.alert_event_response_data_type import AlertEventResponseDataType, check_alert_event_response_data_type if TYPE_CHECKING: from ..models.alert_event import AlertEvent @@ -34,7 +30,6 @@ class AlertEventResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_event import AlertEvent id = self.id diff --git a/rootly_sdk/models/alert_event_schedule_type_0.py b/rootly_sdk/models/alert_event_schedule_type_0.py index 41daf17f..fb8c5b4c 100644 --- a/rootly_sdk/models/alert_event_schedule_type_0.py +++ b/rootly_sdk/models/alert_event_schedule_type_0.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_event_schedule_type_0_escalation_policies_item import ( AlertEventScheduleType0EscalationPoliciesItem, @@ -41,9 +38,6 @@ class AlertEventScheduleType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_event_schedule_type_0_escalation_policies_item import ( - AlertEventScheduleType0EscalationPoliciesItem, - ) id = self.id diff --git a/rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py b/rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py index 83e7fe16..3f33fcf9 100644 --- a/rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py +++ b/rootly_sdk/models/alert_event_schedule_type_0_escalation_policies_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AlertEventScheduleType0EscalationPoliciesItem") diff --git a/rootly_sdk/models/alert_event_user.py b/rootly_sdk/models/alert_event_user.py index b0beba62..d299cff7 100644 --- a/rootly_sdk/models/alert_event_user.py +++ b/rootly_sdk/models/alert_event_user.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="AlertEventUser") diff --git a/rootly_sdk/models/alert_field.py b/rootly_sdk/models/alert_field.py index 2ea39d4c..57d6df37 100644 --- a/rootly_sdk/models/alert_field.py +++ b/rootly_sdk/models/alert_field.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AlertField") diff --git a/rootly_sdk/models/alert_field_list.py b/rootly_sdk/models/alert_field_list.py index a901a40b..24964325 100644 --- a/rootly_sdk/models/alert_field_list.py +++ b/rootly_sdk/models/alert_field_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_field_list_data_item import AlertFieldListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class AlertFieldList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_field_list_data_item import AlertFieldListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/alert_field_list_data_item.py b/rootly_sdk/models/alert_field_list_data_item.py index 5af1d05e..86f5e2a0 100644 --- a/rootly_sdk/models/alert_field_list_data_item.py +++ b/rootly_sdk/models/alert_field_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_field_list_data_item_type import AlertFieldListDataItemType -from ..models.alert_field_list_data_item_type import check_alert_field_list_data_item_type -from typing import cast +from ..models.alert_field_list_data_item_type import AlertFieldListDataItemType, check_alert_field_list_data_item_type if TYPE_CHECKING: from ..models.alert_field import AlertField @@ -34,7 +30,6 @@ class AlertFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_field import AlertField id = self.id diff --git a/rootly_sdk/models/alert_field_response.py b/rootly_sdk/models/alert_field_response.py index 3c7abe70..17f1725b 100644 --- a/rootly_sdk/models/alert_field_response.py +++ b/rootly_sdk/models/alert_field_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_field_response_data import AlertFieldResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AlertFieldResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_field_response_data import AlertFieldResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/alert_field_response_data.py b/rootly_sdk/models/alert_field_response_data.py index b5631597..ab7e7923 100644 --- a/rootly_sdk/models/alert_field_response_data.py +++ b/rootly_sdk/models/alert_field_response_data.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.alert_field_response_data_type import AlertFieldResponseDataType, check_alert_field_response_data_type from ..types import UNSET, Unset -from ..models.alert_field_response_data_type import AlertFieldResponseDataType -from ..models.alert_field_response_data_type import check_alert_field_response_data_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_field import AlertField @@ -35,7 +31,6 @@ class AlertFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_field import AlertField type_: str = self.type_ diff --git a/rootly_sdk/models/alert_group.py b/rootly_sdk/models/alert_group.py index 5130e281..9a198b9c 100644 --- a/rootly_sdk/models/alert_group.py +++ b/rootly_sdk/models/alert_group.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_group_attributes_item import AlertGroupAttributesItem from ..models.alert_group_conditions_item import AlertGroupConditionsItem @@ -58,9 +55,6 @@ class AlertGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_group_attributes_item import AlertGroupAttributesItem - from ..models.alert_group_targets_item import AlertGroupTargetsItem - from ..models.alert_group_conditions_item import AlertGroupConditionsItem name = self.name diff --git a/rootly_sdk/models/alert_group_attributes_item.py b/rootly_sdk/models/alert_group_attributes_item.py index 64442695..574f2129 100644 --- a/rootly_sdk/models/alert_group_attributes_item.py +++ b/rootly_sdk/models/alert_group_attributes_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AlertGroupAttributesItem") diff --git a/rootly_sdk/models/alert_group_conditions_item.py b/rootly_sdk/models/alert_group_conditions_item.py index 02336271..7a2c80f7 100644 --- a/rootly_sdk/models/alert_group_conditions_item.py +++ b/rootly_sdk/models/alert_group_conditions_item.py @@ -1,27 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_group_conditions_item_conditionable_type import AlertGroupConditionsItemConditionableType -from ..models.alert_group_conditions_item_conditionable_type import check_alert_group_conditions_item_conditionable_type -from ..models.alert_group_conditions_item_property_field_condition_type import ( - AlertGroupConditionsItemPropertyFieldConditionType, +from ..models.alert_group_conditions_item_conditionable_type import ( + AlertGroupConditionsItemConditionableType, + check_alert_group_conditions_item_conditionable_type, ) from ..models.alert_group_conditions_item_property_field_condition_type import ( + AlertGroupConditionsItemPropertyFieldConditionType, check_alert_group_conditions_item_property_field_condition_type, ) -from ..models.alert_group_conditions_item_property_field_type import AlertGroupConditionsItemPropertyFieldType from ..models.alert_group_conditions_item_property_field_type import ( + AlertGroupConditionsItemPropertyFieldType, check_alert_group_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.alert_group_conditions_item_values_item_type_0 import AlertGroupConditionsItemValuesItemType0 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 73ad87f4..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AlertGroupConditionsItemValuesItemType0") diff --git a/rootly_sdk/models/alert_group_list.py b/rootly_sdk/models/alert_group_list.py index 294946d9..bbf287d9 100644 --- a/rootly_sdk/models/alert_group_list.py +++ b/rootly_sdk/models/alert_group_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_group_list_data_item import AlertGroupListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AlertGroupList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_group_list_data_item import AlertGroupListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/alert_group_list_data_item.py b/rootly_sdk/models/alert_group_list_data_item.py index 7833e787..47de586a 100644 --- a/rootly_sdk/models/alert_group_list_data_item.py +++ b/rootly_sdk/models/alert_group_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_group_list_data_item_type import AlertGroupListDataItemType -from ..models.alert_group_list_data_item_type import check_alert_group_list_data_item_type -from typing import cast +from ..models.alert_group_list_data_item_type import AlertGroupListDataItemType, check_alert_group_list_data_item_type if TYPE_CHECKING: from ..models.alert_group import AlertGroup @@ -34,7 +30,6 @@ class AlertGroupListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_group import AlertGroup id = self.id diff --git a/rootly_sdk/models/alert_group_response.py b/rootly_sdk/models/alert_group_response.py index 53616400..5c9c2520 100644 --- a/rootly_sdk/models/alert_group_response.py +++ b/rootly_sdk/models/alert_group_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_group_response_data import AlertGroupResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AlertGroupResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.alert_group_response_data import AlertGroupResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/alert_group_response_data.py b/rootly_sdk/models/alert_group_response_data.py index 8a014a5d..8d3b3d49 100644 --- a/rootly_sdk/models/alert_group_response_data.py +++ b/rootly_sdk/models/alert_group_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_group_response_data_type import AlertGroupResponseDataType -from ..models.alert_group_response_data_type import check_alert_group_response_data_type -from typing import cast +from ..models.alert_group_response_data_type import AlertGroupResponseDataType, check_alert_group_response_data_type if TYPE_CHECKING: from ..models.alert_group import AlertGroup @@ -34,7 +30,6 @@ class AlertGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_group import AlertGroup id = self.id diff --git a/rootly_sdk/models/alert_group_targets_item.py b/rootly_sdk/models/alert_group_targets_item.py index fd236465..1d7557d3 100644 --- a/rootly_sdk/models/alert_group_targets_item.py +++ b/rootly_sdk/models/alert_group_targets_item.py @@ -1,18 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.alert_group_targets_item_target_type import AlertGroupTargetsItemTargetType -from ..models.alert_group_targets_item_target_type import check_alert_group_targets_item_target_type -from typing import cast -from uuid import UUID - +from ..models.alert_group_targets_item_target_type import ( + AlertGroupTargetsItemTargetType, + check_alert_group_targets_item_target_type, +) T = TypeVar("T", bound="AlertGroupTargetsItem") diff --git a/rootly_sdk/models/alert_labels_item_type_0.py b/rootly_sdk/models/alert_labels_item_type_0.py index e68c8c5e..432ad1f0 100644 --- a/rootly_sdk/models/alert_labels_item_type_0.py +++ b/rootly_sdk/models/alert_labels_item_type_0.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="AlertLabelsItemType0") diff --git a/rootly_sdk/models/alert_list.py b/rootly_sdk/models/alert_list.py index 2ffc2898..e56e45f3 100644 --- a/rootly_sdk/models/alert_list.py +++ b/rootly_sdk/models/alert_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_list_data_item import AlertListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class AlertList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_list_data_item import AlertListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/alert_list_data_item.py b/rootly_sdk/models/alert_list_data_item.py index c2b9171c..4f9d74d7 100644 --- a/rootly_sdk/models/alert_list_data_item.py +++ b/rootly_sdk/models/alert_list_data_item.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.alert_list_data_item_type import AlertListDataItemType, check_alert_list_data_item_type from ..types import UNSET, Unset -from ..models.alert_list_data_item_type import AlertListDataItemType -from ..models.alert_list_data_item_type import check_alert_list_data_item_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert import Alert @@ -37,7 +33,6 @@ class AlertListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert import Alert id = self.id diff --git a/rootly_sdk/models/alert_response.py b/rootly_sdk/models/alert_response.py index 469b976a..f165c1b4 100644 --- a/rootly_sdk/models/alert_response.py +++ b/rootly_sdk/models/alert_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_response_data import AlertResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AlertResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_response_data import AlertResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/alert_response_data.py b/rootly_sdk/models/alert_response_data.py index 2c6dd079..c5700bfe 100644 --- a/rootly_sdk/models/alert_response_data.py +++ b/rootly_sdk/models/alert_response_data.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.alert_response_data_type import AlertResponseDataType, check_alert_response_data_type from ..types import UNSET, Unset -from ..models.alert_response_data_type import AlertResponseDataType -from ..models.alert_response_data_type import check_alert_response_data_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert import Alert @@ -37,7 +33,6 @@ class AlertResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert import Alert id = self.id diff --git a/rootly_sdk/models/alert_route.py b/rootly_sdk/models/alert_route.py index b915ace9..abfbd781 100644 --- a/rootly_sdk/models/alert_route.py +++ b/rootly_sdk/models/alert_route.py @@ -1,17 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.alert_route_rules_item import AlertRouteRulesItem @@ -38,7 +35,6 @@ class AlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_route_rules_item import AlertRouteRulesItem name = self.name diff --git a/rootly_sdk/models/alert_route_list.py b/rootly_sdk/models/alert_route_list.py index 1a3a5147..c6276ba7 100644 --- a/rootly_sdk/models/alert_route_list.py +++ b/rootly_sdk/models/alert_route_list.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.alert_route_list_data_item import AlertRouteListDataItem from ..models.links import Links @@ -34,9 +30,6 @@ class AlertRouteList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.alert_route_list_data_item import AlertRouteListDataItem - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/alert_route_list_data_item.py b/rootly_sdk/models/alert_route_list_data_item.py index 1c08ed24..4ec22e8a 100644 --- a/rootly_sdk/models/alert_route_list_data_item.py +++ b/rootly_sdk/models/alert_route_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_route_list_data_item_type import AlertRouteListDataItemType -from ..models.alert_route_list_data_item_type import check_alert_route_list_data_item_type -from typing import cast +from ..models.alert_route_list_data_item_type import AlertRouteListDataItemType, check_alert_route_list_data_item_type if TYPE_CHECKING: from ..models.alert_route import AlertRoute @@ -34,7 +30,6 @@ class AlertRouteListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_route import AlertRoute id = self.id diff --git a/rootly_sdk/models/alert_route_response.py b/rootly_sdk/models/alert_route_response.py index fcff2ad6..53657a71 100644 --- a/rootly_sdk/models/alert_route_response.py +++ b/rootly_sdk/models/alert_route_response.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.alert_route_response_data import AlertRouteResponseData @@ -28,7 +24,6 @@ class AlertRouteResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_route_response_data import AlertRouteResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/alert_route_response_data.py b/rootly_sdk/models/alert_route_response_data.py index 56573057..4bf1cb69 100644 --- a/rootly_sdk/models/alert_route_response_data.py +++ b/rootly_sdk/models/alert_route_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_route_response_data_type import AlertRouteResponseDataType -from ..models.alert_route_response_data_type import check_alert_route_response_data_type -from typing import cast +from ..models.alert_route_response_data_type import AlertRouteResponseDataType, check_alert_route_response_data_type if TYPE_CHECKING: from ..models.alert_route import AlertRoute @@ -34,7 +30,6 @@ class AlertRouteResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_route import AlertRoute id = self.id diff --git a/rootly_sdk/models/alert_route_rules_item.py b/rootly_sdk/models/alert_route_rules_item.py index 81a01777..7764fdcb 100644 --- a/rootly_sdk/models/alert_route_rules_item.py +++ b/rootly_sdk/models/alert_route_rules_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_route_rules_item_condition_groups_item import AlertRouteRulesItemConditionGroupsItem from ..models.alert_route_rules_item_destinations_item import AlertRouteRulesItemDestinationsItem @@ -38,8 +35,6 @@ class AlertRouteRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_route_rules_item_destinations_item import AlertRouteRulesItemDestinationsItem - from ..models.alert_route_rules_item_condition_groups_item import AlertRouteRulesItemConditionGroupsItem name = self.name 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 46830797..45faaf7b 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_route_rules_item_condition_groups_item_conditions_item import ( AlertRouteRulesItemConditionGroupsItemConditionsItem, @@ -33,9 +30,6 @@ class AlertRouteRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_route_rules_item_condition_groups_item_conditions_item import ( - AlertRouteRulesItemConditionGroupsItemConditionsItem, - ) conditions = [] for conditions_item_data in self.conditions: 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 b55db9b6..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,35 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - from ..models.alert_route_rules_item_condition_groups_item_conditions_item_conditionable_type import ( AlertRouteRulesItemConditionGroupsItemConditionsItemConditionableType, -) -from ..models.alert_route_rules_item_condition_groups_item_conditions_item_conditionable_type import ( check_alert_route_rules_item_condition_groups_item_conditions_item_conditionable_type, ) from ..models.alert_route_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( AlertRouteRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, -) -from ..models.alert_route_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( check_alert_route_rules_item_condition_groups_item_conditions_item_property_field_condition_type, ) from ..models.alert_route_rules_item_condition_groups_item_conditions_item_property_field_type import ( AlertRouteRulesItemConditionGroupsItemConditionsItemPropertyFieldType, -) -from ..models.alert_route_rules_item_condition_groups_item_conditions_item_property_field_type import ( check_alert_route_rules_item_condition_groups_item_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="AlertRouteRulesItemConditionGroupsItemConditionsItem") 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 8a9ff179..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,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.alert_route_rules_item_destinations_item_target_type import AlertRouteRulesItemDestinationsItemTargetType from ..models.alert_route_rules_item_destinations_item_target_type import ( + AlertRouteRulesItemDestinationsItemTargetType, check_alert_route_rules_item_destinations_item_target_type, ) -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="AlertRouteRulesItemDestinationsItem") diff --git a/rootly_sdk/models/alert_routing_rule.py b/rootly_sdk/models/alert_routing_rule.py index 4c39f144..1ca607b9 100644 --- a/rootly_sdk/models/alert_routing_rule.py +++ b/rootly_sdk/models/alert_routing_rule.py @@ -1,19 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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.alert_routing_rule_condition_type import ( + AlertRoutingRuleConditionType, + check_alert_routing_rule_condition_type, +) from ..types import UNSET, Unset -from ..models.alert_routing_rule_condition_type import AlertRoutingRuleConditionType -from ..models.alert_routing_rule_condition_type import check_alert_routing_rule_condition_type -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.alert_routing_rule_condition_groups_item import AlertRoutingRuleConditionGroupsItem from ..models.alert_routing_rule_conditions_item import AlertRoutingRuleConditionsItem @@ -53,8 +52,6 @@ class AlertRoutingRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_routing_rule_conditions_item import AlertRoutingRuleConditionsItem - from ..models.alert_routing_rule_condition_groups_item import AlertRoutingRuleConditionGroupsItem from ..models.alert_routing_rule_destination_type_0 import AlertRoutingRuleDestinationType0 name = self.name diff --git a/rootly_sdk/models/alert_routing_rule_condition.py b/rootly_sdk/models/alert_routing_rule_condition.py index 936673b1..0ab961a3 100644 --- a/rootly_sdk/models/alert_routing_rule_condition.py +++ b/rootly_sdk/models/alert_routing_rule_condition.py @@ -1,27 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - from ..models.alert_routing_rule_condition_property_field_condition_type import ( AlertRoutingRuleConditionPropertyFieldConditionType, -) -from ..models.alert_routing_rule_condition_property_field_condition_type import ( check_alert_routing_rule_condition_property_field_condition_type, ) -from ..models.alert_routing_rule_condition_property_field_type import AlertRoutingRuleConditionPropertyFieldType from ..models.alert_routing_rule_condition_property_field_type import ( + AlertRoutingRuleConditionPropertyFieldType, check_alert_routing_rule_condition_property_field_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="AlertRoutingRuleCondition") diff --git a/rootly_sdk/models/alert_routing_rule_condition_group.py b/rootly_sdk/models/alert_routing_rule_condition_group.py index 1fc99e65..56abd818 100644 --- a/rootly_sdk/models/alert_routing_rule_condition_group.py +++ b/rootly_sdk/models/alert_routing_rule_condition_group.py @@ -1,17 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.alert_routing_rule_condition import AlertRoutingRuleCondition @@ -39,7 +36,6 @@ class AlertRoutingRuleConditionGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_routing_rule_condition import AlertRoutingRuleCondition position = self.position 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 3be95269..72ea94ca 100644 --- a/rootly_sdk/models/alert_routing_rule_condition_groups_item.py +++ b/rootly_sdk/models/alert_routing_rule_condition_groups_item.py @@ -1,17 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.alert_routing_rule_condition_groups_item_conditions_item import ( AlertRoutingRuleConditionGroupsItemConditionsItem, @@ -40,9 +37,6 @@ class AlertRoutingRuleConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_routing_rule_condition_groups_item_conditions_item import ( - AlertRoutingRuleConditionGroupsItemConditionsItem, - ) position = self.position 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 625328f7..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,29 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - from ..models.alert_routing_rule_condition_groups_item_conditions_item_property_field_condition_type import ( AlertRoutingRuleConditionGroupsItemConditionsItemPropertyFieldConditionType, -) -from ..models.alert_routing_rule_condition_groups_item_conditions_item_property_field_condition_type import ( check_alert_routing_rule_condition_groups_item_conditions_item_property_field_condition_type, ) from ..models.alert_routing_rule_condition_groups_item_conditions_item_property_field_type import ( AlertRoutingRuleConditionGroupsItemConditionsItemPropertyFieldType, -) -from ..models.alert_routing_rule_condition_groups_item_conditions_item_property_field_type import ( check_alert_routing_rule_condition_groups_item_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="AlertRoutingRuleConditionGroupsItemConditionsItem") diff --git a/rootly_sdk/models/alert_routing_rule_conditions_item.py b/rootly_sdk/models/alert_routing_rule_conditions_item.py index 8b10d015..7d65f2f1 100644 --- a/rootly_sdk/models/alert_routing_rule_conditions_item.py +++ b/rootly_sdk/models/alert_routing_rule_conditions_item.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.alert_routing_rule_conditions_item_property_field_condition_type import ( AlertRoutingRuleConditionsItemPropertyFieldConditionType, -) -from ..models.alert_routing_rule_conditions_item_property_field_condition_type import ( check_alert_routing_rule_conditions_item_property_field_condition_type, ) from ..models.alert_routing_rule_conditions_item_property_field_type import ( AlertRoutingRuleConditionsItemPropertyFieldType, -) -from ..models.alert_routing_rule_conditions_item_property_field_type import ( check_alert_routing_rule_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="AlertRoutingRuleConditionsItem") 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 f3ccd9d0..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,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.alert_routing_rule_destination_type_0_target_type import AlertRoutingRuleDestinationType0TargetType from ..models.alert_routing_rule_destination_type_0_target_type import ( + AlertRoutingRuleDestinationType0TargetType, check_alert_routing_rule_destination_type_0_target_type, ) -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="AlertRoutingRuleDestinationType0") diff --git a/rootly_sdk/models/alert_routing_rule_list.py b/rootly_sdk/models/alert_routing_rule_list.py index c4096779..3c3aaa42 100644 --- a/rootly_sdk/models/alert_routing_rule_list.py +++ b/rootly_sdk/models/alert_routing_rule_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_routing_rule_list_data_item import AlertRoutingRuleListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class AlertRoutingRuleList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.alert_routing_rule_list_data_item import AlertRoutingRuleListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 79f69a9b..7245f458 100644 --- a/rootly_sdk/models/alert_routing_rule_list_data_item.py +++ b/rootly_sdk/models/alert_routing_rule_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_routing_rule_list_data_item_type import AlertRoutingRuleListDataItemType -from ..models.alert_routing_rule_list_data_item_type import check_alert_routing_rule_list_data_item_type -from typing import cast +from ..models.alert_routing_rule_list_data_item_type import ( + AlertRoutingRuleListDataItemType, + check_alert_routing_rule_list_data_item_type, +) if TYPE_CHECKING: from ..models.alert_routing_rule import AlertRoutingRule @@ -34,7 +33,6 @@ class AlertRoutingRuleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_routing_rule import AlertRoutingRule id = self.id diff --git a/rootly_sdk/models/alert_routing_rule_response.py b/rootly_sdk/models/alert_routing_rule_response.py index ecbf2c0e..f10281d6 100644 --- a/rootly_sdk/models/alert_routing_rule_response.py +++ b/rootly_sdk/models/alert_routing_rule_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_routing_rule_response_data import AlertRoutingRuleResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AlertRoutingRuleResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_routing_rule_response_data import AlertRoutingRuleResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/alert_routing_rule_response_data.py b/rootly_sdk/models/alert_routing_rule_response_data.py index 48e7d8b9..bf0c7fc4 100644 --- a/rootly_sdk/models/alert_routing_rule_response_data.py +++ b/rootly_sdk/models/alert_routing_rule_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_routing_rule_response_data_type import AlertRoutingRuleResponseDataType -from ..models.alert_routing_rule_response_data_type import check_alert_routing_rule_response_data_type -from typing import cast +from ..models.alert_routing_rule_response_data_type import ( + AlertRoutingRuleResponseDataType, + check_alert_routing_rule_response_data_type, +) if TYPE_CHECKING: from ..models.alert_routing_rule import AlertRoutingRule @@ -34,7 +33,6 @@ class AlertRoutingRuleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_routing_rule import AlertRoutingRule id = self.id 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 92caf33e..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,18 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.alert_routing_rule_target_type_0_target_type import AlertRoutingRuleTargetType0TargetType -from ..models.alert_routing_rule_target_type_0_target_type import check_alert_routing_rule_target_type_0_target_type -from typing import cast -from uuid import UUID - +from ..models.alert_routing_rule_target_type_0_target_type import ( + AlertRoutingRuleTargetType0TargetType, + check_alert_routing_rule_target_type_0_target_type, +) T = TypeVar("T", bound="AlertRoutingRuleTargetType0") diff --git a/rootly_sdk/models/alert_trigger_params.py b/rootly_sdk/models/alert_trigger_params.py index 3ae687a4..6d99afd0 100644 --- a/rootly_sdk/models/alert_trigger_params.py +++ b/rootly_sdk/models/alert_trigger_params.py @@ -1,33 +1,46 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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.alert_trigger_params_alert_condition import ( + AlertTriggerParamsAlertCondition, + check_alert_trigger_params_alert_condition, +) +from ..models.alert_trigger_params_alert_condition_label import ( + AlertTriggerParamsAlertConditionLabel, + check_alert_trigger_params_alert_condition_label, +) +from ..models.alert_trigger_params_alert_condition_payload import ( + AlertTriggerParamsAlertConditionPayload, + check_alert_trigger_params_alert_condition_payload, +) +from ..models.alert_trigger_params_alert_condition_source import ( + AlertTriggerParamsAlertConditionSource, + check_alert_trigger_params_alert_condition_source, +) +from ..models.alert_trigger_params_alert_condition_status import ( + 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, +) +from ..models.alert_trigger_params_triggers_item import ( + AlertTriggerParamsTriggersItem, + check_alert_trigger_params_triggers_item, +) from ..types import UNSET, Unset -from ..models.alert_trigger_params_alert_condition import AlertTriggerParamsAlertCondition -from ..models.alert_trigger_params_alert_condition import check_alert_trigger_params_alert_condition -from ..models.alert_trigger_params_alert_condition_label import AlertTriggerParamsAlertConditionLabel -from ..models.alert_trigger_params_alert_condition_label import check_alert_trigger_params_alert_condition_label -from ..models.alert_trigger_params_alert_condition_payload import AlertTriggerParamsAlertConditionPayload -from ..models.alert_trigger_params_alert_condition_payload import check_alert_trigger_params_alert_condition_payload -from ..models.alert_trigger_params_alert_condition_source import AlertTriggerParamsAlertConditionSource -from ..models.alert_trigger_params_alert_condition_source import check_alert_trigger_params_alert_condition_source -from ..models.alert_trigger_params_alert_condition_status import AlertTriggerParamsAlertConditionStatus -from ..models.alert_trigger_params_alert_condition_status import check_alert_trigger_params_alert_condition_status -from ..models.alert_trigger_params_alert_condition_urgency import AlertTriggerParamsAlertConditionUrgency -from ..models.alert_trigger_params_alert_condition_urgency import check_alert_trigger_params_alert_condition_urgency -from ..models.alert_trigger_params_trigger_type import AlertTriggerParamsTriggerType -from ..models.alert_trigger_params_trigger_type import check_alert_trigger_params_trigger_type -from ..models.alert_trigger_params_triggers_item import AlertTriggerParamsTriggersItem -from ..models.alert_trigger_params_triggers_item import check_alert_trigger_params_triggers_item -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.alert_trigger_params_alert_field_conditions_item import AlertTriggerParamsAlertFieldConditionsItem from ..models.alert_trigger_params_alert_payload_conditions import AlertTriggerParamsAlertPayloadConditions @@ -85,8 +98,6 @@ class AlertTriggerParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_trigger_params_alert_field_conditions_item import AlertTriggerParamsAlertFieldConditionsItem - from ..models.alert_trigger_params_alert_payload_conditions import AlertTriggerParamsAlertPayloadConditions trigger_type: str = self.trigger_type 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 a99f9c0f..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.alert_trigger_params_alert_field_conditions_item_condition_type import ( AlertTriggerParamsAlertFieldConditionsItemConditionType, -) -from ..models.alert_trigger_params_alert_field_conditions_item_condition_type import ( check_alert_trigger_params_alert_field_conditions_item_condition_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="AlertTriggerParamsAlertFieldConditionsItem") 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 9096d62c..a8a3fc50 100644 --- a/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py +++ b/rootly_sdk/models/alert_trigger_params_alert_payload_conditions.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_trigger_params_alert_payload_conditions_logic import AlertTriggerParamsAlertPayloadConditionsLogic from ..models.alert_trigger_params_alert_payload_conditions_logic import ( + AlertTriggerParamsAlertPayloadConditionsLogic, check_alert_trigger_params_alert_payload_conditions_logic, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.alert_trigger_params_alert_payload_conditions_conditions_item import ( @@ -37,9 +34,6 @@ class AlertTriggerParamsAlertPayloadConditions: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_trigger_params_alert_payload_conditions_conditions_item import ( - AlertTriggerParamsAlertPayloadConditionsConditionsItem, - ) logic: str | Unset = UNSET if not isinstance(self.logic, Unset): 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 d32a93bb..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.alert_trigger_params_alert_payload_conditions_conditions_item_operator import ( AlertTriggerParamsAlertPayloadConditionsConditionsItemOperator, -) -from ..models.alert_trigger_params_alert_payload_conditions_conditions_item_operator import ( check_alert_trigger_params_alert_payload_conditions_conditions_item_operator, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="AlertTriggerParamsAlertPayloadConditionsConditionsItem") diff --git a/rootly_sdk/models/alert_urgency.py b/rootly_sdk/models/alert_urgency.py index 638ad8b2..3921a818 100644 --- a/rootly_sdk/models/alert_urgency.py +++ b/rootly_sdk/models/alert_urgency.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="AlertUrgency") diff --git a/rootly_sdk/models/alert_urgency_list.py b/rootly_sdk/models/alert_urgency_list.py index bb60d6cb..385c12fd 100644 --- a/rootly_sdk/models/alert_urgency_list.py +++ b/rootly_sdk/models/alert_urgency_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_urgency_list_data_item import AlertUrgencyListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class AlertUrgencyList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_urgency_list_data_item import AlertUrgencyListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/alert_urgency_list_data_item.py b/rootly_sdk/models/alert_urgency_list_data_item.py index 93631dd1..9fd99c3a 100644 --- a/rootly_sdk/models/alert_urgency_list_data_item.py +++ b/rootly_sdk/models/alert_urgency_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_urgency_list_data_item_type import AlertUrgencyListDataItemType -from ..models.alert_urgency_list_data_item_type import check_alert_urgency_list_data_item_type -from typing import cast +from ..models.alert_urgency_list_data_item_type import ( + AlertUrgencyListDataItemType, + check_alert_urgency_list_data_item_type, +) if TYPE_CHECKING: from ..models.alert_urgency import AlertUrgency @@ -34,7 +33,6 @@ class AlertUrgencyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_urgency import AlertUrgency id = self.id diff --git a/rootly_sdk/models/alert_urgency_response.py b/rootly_sdk/models/alert_urgency_response.py index 28d62a46..6e59691a 100644 --- a/rootly_sdk/models/alert_urgency_response.py +++ b/rootly_sdk/models/alert_urgency_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alert_urgency_response_data import AlertUrgencyResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AlertUrgencyResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_urgency_response_data import AlertUrgencyResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/alert_urgency_response_data.py b/rootly_sdk/models/alert_urgency_response_data.py index f7982c72..e2a938c7 100644 --- a/rootly_sdk/models/alert_urgency_response_data.py +++ b/rootly_sdk/models/alert_urgency_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alert_urgency_response_data_type import AlertUrgencyResponseDataType -from ..models.alert_urgency_response_data_type import check_alert_urgency_response_data_type -from typing import cast +from ..models.alert_urgency_response_data_type import ( + AlertUrgencyResponseDataType, + check_alert_urgency_response_data_type, +) if TYPE_CHECKING: from ..models.alert_urgency import AlertUrgency @@ -34,7 +33,6 @@ class AlertUrgencyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alert_urgency import AlertUrgency id = self.id diff --git a/rootly_sdk/models/alerts_source.py b/rootly_sdk/models/alerts_source.py index cb9e97e5..13b79b88 100644 --- a/rootly_sdk/models/alerts_source.py +++ b/rootly_sdk/models/alerts_source.py @@ -1,22 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.alerts_source_deduplication_key_kind import ( + AlertsSourceDeduplicationKeyKind, + check_alerts_source_deduplication_key_kind, +) +from ..models.alerts_source_source_type import AlertsSourceSourceType, check_alerts_source_source_type +from ..models.alerts_source_status import AlertsSourceStatus, check_alerts_source_status from ..types import UNSET, Unset -from ..models.alerts_source_deduplication_key_kind import AlertsSourceDeduplicationKeyKind -from ..models.alerts_source_deduplication_key_kind import check_alerts_source_deduplication_key_kind -from ..models.alerts_source_source_type import AlertsSourceSourceType -from ..models.alerts_source_source_type import check_alerts_source_source_type -from ..models.alerts_source_status import AlertsSourceStatus -from ..models.alerts_source_status import check_alerts_source_status -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alerts_source_alert_source_fields_attributes_item import AlertsSourceAlertSourceFieldsAttributesItem from ..models.alerts_source_alert_source_urgency_rules_attributes_item import ( @@ -88,15 +85,9 @@ class AlertsSource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alerts_source_sourceable_attributes_type_0 import AlertsSourceSourceableAttributesType0 - from ..models.alerts_source_alert_source_urgency_rules_attributes_item import ( - AlertsSourceAlertSourceUrgencyRulesAttributesItem, - ) - from ..models.alerts_source_resolution_rule_attributes_type_0 import AlertsSourceResolutionRuleAttributesType0 from ..models.alerts_source_alert_template_attributes_type_0 import AlertsSourceAlertTemplateAttributesType0 - from ..models.alerts_source_alert_source_fields_attributes_item import ( - AlertsSourceAlertSourceFieldsAttributesItem, - ) + from ..models.alerts_source_resolution_rule_attributes_type_0 import AlertsSourceResolutionRuleAttributesType0 + from ..models.alerts_source_sourceable_attributes_type_0 import AlertsSourceSourceableAttributesType0 name = self.name 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 bee31c7c..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="AlertsSourceAlertSourceFieldsAttributesItem") 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 16ceeeaf..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,34 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.alerts_source_alert_source_urgency_rules_attributes_item_conditionable_type import ( AlertsSourceAlertSourceUrgencyRulesAttributesItemConditionableType, -) -from ..models.alerts_source_alert_source_urgency_rules_attributes_item_conditionable_type import ( check_alerts_source_alert_source_urgency_rules_attributes_item_conditionable_type, ) from ..models.alerts_source_alert_source_urgency_rules_attributes_item_kind import ( AlertsSourceAlertSourceUrgencyRulesAttributesItemKind, -) -from ..models.alerts_source_alert_source_urgency_rules_attributes_item_kind import ( check_alerts_source_alert_source_urgency_rules_attributes_item_kind, ) from ..models.alerts_source_alert_source_urgency_rules_attributes_item_operator import ( AlertsSourceAlertSourceUrgencyRulesAttributesItemOperator, -) -from ..models.alerts_source_alert_source_urgency_rules_attributes_item_operator import ( check_alerts_source_alert_source_urgency_rules_attributes_item_operator, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="AlertsSourceAlertSourceUrgencyRulesAttributesItem") 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 ec5440ee..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="AlertsSourceAlertTemplateAttributesType0") diff --git a/rootly_sdk/models/alerts_source_list.py b/rootly_sdk/models/alerts_source_list.py index 756055bd..922a66a7 100644 --- a/rootly_sdk/models/alerts_source_list.py +++ b/rootly_sdk/models/alerts_source_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alerts_source_list_data_item import AlertsSourceListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class AlertsSourceList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alerts_source_list_data_item import AlertsSourceListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/alerts_source_list_data_item.py b/rootly_sdk/models/alerts_source_list_data_item.py index c393510a..697c5bc3 100644 --- a/rootly_sdk/models/alerts_source_list_data_item.py +++ b/rootly_sdk/models/alerts_source_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alerts_source_list_data_item_type import AlertsSourceListDataItemType -from ..models.alerts_source_list_data_item_type import check_alerts_source_list_data_item_type -from typing import cast +from ..models.alerts_source_list_data_item_type import ( + AlertsSourceListDataItemType, + check_alerts_source_list_data_item_type, +) if TYPE_CHECKING: from ..models.alerts_source import AlertsSource @@ -34,7 +33,6 @@ class AlertsSourceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alerts_source import AlertsSource id = self.id 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 e0e9c42a..efa3dec0 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,33 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.alerts_source_resolution_rule_attributes_type_0_condition_type import ( AlertsSourceResolutionRuleAttributesType0ConditionType, -) -from ..models.alerts_source_resolution_rule_attributes_type_0_condition_type import ( check_alerts_source_resolution_rule_attributes_type_0_condition_type, ) from ..models.alerts_source_resolution_rule_attributes_type_0_identifier_matchable_type import ( AlertsSourceResolutionRuleAttributesType0IdentifierMatchableType, -) -from ..models.alerts_source_resolution_rule_attributes_type_0_identifier_matchable_type import ( check_alerts_source_resolution_rule_attributes_type_0_identifier_matchable_type, ) from ..models.alerts_source_resolution_rule_attributes_type_0_identifier_reference_kind import ( AlertsSourceResolutionRuleAttributesType0IdentifierReferenceKind, -) -from ..models.alerts_source_resolution_rule_attributes_type_0_identifier_reference_kind import ( check_alerts_source_resolution_rule_attributes_type_0_identifier_reference_kind, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item import ( @@ -71,9 +62,6 @@ class AlertsSourceResolutionRuleAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item import ( - AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem, - ) enabled = self.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 f35e632e..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,34 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemConditionableType, -) -from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( check_alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type, ) from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemKind, -) -from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( check_alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_kind, ) from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItemOperator, -) -from ..models.alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( check_alerts_source_resolution_rule_attributes_type_0_conditions_attributes_item_operator, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="AlertsSourceResolutionRuleAttributesType0ConditionsAttributesItem") diff --git a/rootly_sdk/models/alerts_source_response.py b/rootly_sdk/models/alerts_source_response.py index bf473a26..e90b0d90 100644 --- a/rootly_sdk/models/alerts_source_response.py +++ b/rootly_sdk/models/alerts_source_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alerts_source_response_data import AlertsSourceResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AlertsSourceResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alerts_source_response_data import AlertsSourceResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/alerts_source_response_data.py b/rootly_sdk/models/alerts_source_response_data.py index b6bfea92..848030dc 100644 --- a/rootly_sdk/models/alerts_source_response_data.py +++ b/rootly_sdk/models/alerts_source_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.alerts_source_response_data_type import AlertsSourceResponseDataType -from ..models.alerts_source_response_data_type import check_alerts_source_response_data_type -from typing import cast +from ..models.alerts_source_response_data_type import ( + AlertsSourceResponseDataType, + check_alerts_source_response_data_type, +) if TYPE_CHECKING: from ..models.alerts_source import AlertsSource @@ -34,7 +33,6 @@ class AlertsSourceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alerts_source import AlertsSource id = self.id 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 38150882..e7714a10 100644 --- a/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py +++ b/rootly_sdk/models/alerts_source_sourceable_attributes_type_0.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item import ( AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem, @@ -41,9 +38,6 @@ class AlertsSourceSourceableAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item import ( - AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem, - ) auto_resolve = self.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 a3a71b3e..af6141fc 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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - from ..models.alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( AlertsSourceSourceableAttributesType0FieldMappingsAttributesItemField, -) -from ..models.alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( check_alerts_source_sourceable_attributes_type_0_field_mappings_attributes_item_field, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="AlertsSourceSourceableAttributesType0FieldMappingsAttributesItem") diff --git a/rootly_sdk/models/api_key.py b/rootly_sdk/models/api_key.py index d89c0820..c58d6d6b 100644 --- a/rootly_sdk/models/api_key.py +++ b/rootly_sdk/models/api_key.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.api_key_kind import ApiKeyKind -from ..models.api_key_kind import check_api_key_kind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="ApiKey") diff --git a/rootly_sdk/models/api_key_list.py b/rootly_sdk/models/api_key_list.py index 698b7d01..ec533508 100644 --- a/rootly_sdk/models/api_key_list.py +++ b/rootly_sdk/models/api_key_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.api_key_list_data_item import ApiKeyListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class ApiKeyList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.api_key_list_data_item import ApiKeyListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/api_key_list_data_item.py b/rootly_sdk/models/api_key_list_data_item.py index 3a0b542c..805cc948 100644 --- a/rootly_sdk/models/api_key_list_data_item.py +++ b/rootly_sdk/models/api_key_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.api_key_list_data_item_type import ApiKeyListDataItemType -from ..models.api_key_list_data_item_type import check_api_key_list_data_item_type -from typing import cast +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 @@ -34,7 +30,6 @@ class ApiKeyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.api_key import ApiKey id = self.id diff --git a/rootly_sdk/models/api_key_response.py b/rootly_sdk/models/api_key_response.py index 63149492..73e001f3 100644 --- a/rootly_sdk/models/api_key_response.py +++ b/rootly_sdk/models/api_key_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.api_key_response_data import ApiKeyResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class ApiKeyResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.api_key_response_data import ApiKeyResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/api_key_response_data.py b/rootly_sdk/models/api_key_response_data.py index 1a3b045a..ecc665d2 100644 --- a/rootly_sdk/models/api_key_response_data.py +++ b/rootly_sdk/models/api_key_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.api_key_response_data_type import ApiKeyResponseDataType -from ..models.api_key_response_data_type import check_api_key_response_data_type -from typing import cast +from ..models.api_key_response_data_type import ApiKeyResponseDataType, check_api_key_response_data_type if TYPE_CHECKING: from ..models.api_key import ApiKey @@ -34,7 +30,6 @@ class ApiKeyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.api_key import ApiKey id = self.id diff --git a/rootly_sdk/models/api_key_with_token_response.py b/rootly_sdk/models/api_key_with_token_response.py index 211ea91a..1d29d480 100644 --- a/rootly_sdk/models/api_key_with_token_response.py +++ b/rootly_sdk/models/api_key_with_token_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.api_key_with_token_response_data import ApiKeyWithTokenResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class ApiKeyWithTokenResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.api_key_with_token_response_data import ApiKeyWithTokenResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/api_key_with_token_response_data.py b/rootly_sdk/models/api_key_with_token_response_data.py index 4a4b4016..3df6e4e5 100644 --- a/rootly_sdk/models/api_key_with_token_response_data.py +++ b/rootly_sdk/models/api_key_with_token_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.api_key_with_token_response_data_type import ApiKeyWithTokenResponseDataType -from ..models.api_key_with_token_response_data_type import check_api_key_with_token_response_data_type -from typing import cast +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 @@ -34,7 +33,6 @@ class ApiKeyWithTokenResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.api_key_with_token_response_data_attributes import ApiKeyWithTokenResponseDataAttributes id = self.id 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 index 441d3e73..31d30f84 100644 --- a/rootly_sdk/models/api_key_with_token_response_data_attributes.py +++ b/rootly_sdk/models/api_key_with_token_response_data_attributes.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.api_key_kind import ApiKeyKind -from ..models.api_key_kind import check_api_key_kind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="ApiKeyWithTokenResponseDataAttributes") diff --git a/rootly_sdk/models/archive_google_chat_spaces_task_params.py b/rootly_sdk/models/archive_google_chat_spaces_task_params.py index 1d3568ec..2389e17f 100644 --- a/rootly_sdk/models/archive_google_chat_spaces_task_params.py +++ b/rootly_sdk/models/archive_google_chat_spaces_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.archive_google_chat_spaces_task_params_task_type import ArchiveGoogleChatSpacesTaskParamsTaskType from ..models.archive_google_chat_spaces_task_params_task_type import ( + ArchiveGoogleChatSpacesTaskParamsTaskType, check_archive_google_chat_spaces_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.archive_google_chat_spaces_task_params_spaces_item import ArchiveGoogleChatSpacesTaskParamsSpacesItem @@ -35,9 +32,6 @@ class ArchiveGoogleChatSpacesTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.archive_google_chat_spaces_task_params_spaces_item import ( - ArchiveGoogleChatSpacesTaskParamsSpacesItem, - ) spaces = [] for spaces_item_data in self.spaces: diff --git a/rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py b/rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py index 07ad20c5..ae50ba42 100644 --- a/rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py +++ b/rootly_sdk/models/archive_google_chat_spaces_task_params_spaces_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ArchiveGoogleChatSpacesTaskParamsSpacesItem") 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 06233910..5187f9fd 100644 --- a/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py +++ b/rootly_sdk/models/archive_microsoft_teams_channels_task_params.py @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.archive_microsoft_teams_channels_task_params_task_type import ( ArchiveMicrosoftTeamsChannelsTaskParamsTaskType, -) -from ..models.archive_microsoft_teams_channels_task_params_task_type import ( check_archive_microsoft_teams_channels_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.archive_microsoft_teams_channels_task_params_channels_item import ( @@ -42,12 +37,6 @@ class ArchiveMicrosoftTeamsChannelsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.archive_microsoft_teams_channels_task_params_team import ( - ArchiveMicrosoftTeamsChannelsTaskParamsTeam, - ) - from ..models.archive_microsoft_teams_channels_task_params_channels_item import ( - ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem, - ) team = self.team.to_dict() 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 788fa491..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ArchiveMicrosoftTeamsChannelsTaskParamsChannelsItem") 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 bd07560a..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ArchiveMicrosoftTeamsChannelsTaskParamsTeam") diff --git a/rootly_sdk/models/archive_slack_channels_task_params.py b/rootly_sdk/models/archive_slack_channels_task_params.py index 58b9a1ae..a808ecd2 100644 --- a/rootly_sdk/models/archive_slack_channels_task_params.py +++ b/rootly_sdk/models/archive_slack_channels_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.archive_slack_channels_task_params_task_type import ( + ArchiveSlackChannelsTaskParamsTaskType, + check_archive_slack_channels_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.archive_slack_channels_task_params_task_type import ArchiveSlackChannelsTaskParamsTaskType -from ..models.archive_slack_channels_task_params_task_type import check_archive_slack_channels_task_params_task_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.archive_slack_channels_task_params_channels_item import ArchiveSlackChannelsTaskParamsChannelsItem @@ -33,7 +32,6 @@ class ArchiveSlackChannelsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.archive_slack_channels_task_params_channels_item import ArchiveSlackChannelsTaskParamsChannelsItem channels = [] for channels_item_data in self.channels: 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 1c8c2aea..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ArchiveSlackChannelsTaskParamsChannelsItem") diff --git a/rootly_sdk/models/assign_role_to_user.py b/rootly_sdk/models/assign_role_to_user.py index 1b1dd309..947a8507 100644 --- a/rootly_sdk/models/assign_role_to_user.py +++ b/rootly_sdk/models/assign_role_to_user.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.assign_role_to_user_data import AssignRoleToUserData @@ -28,7 +24,6 @@ class AssignRoleToUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.assign_role_to_user_data import AssignRoleToUserData data = self.data.to_dict() diff --git a/rootly_sdk/models/assign_role_to_user_data.py b/rootly_sdk/models/assign_role_to_user_data.py index 91ea7e45..461a07ed 100644 --- a/rootly_sdk/models/assign_role_to_user_data.py +++ b/rootly_sdk/models/assign_role_to_user_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.assign_role_to_user_data_type import AssignRoleToUserDataType -from ..models.assign_role_to_user_data_type import check_assign_role_to_user_data_type -from typing import cast +from ..models.assign_role_to_user_data_type import AssignRoleToUserDataType, check_assign_role_to_user_data_type if TYPE_CHECKING: from ..models.assign_role_to_user_data_attributes import AssignRoleToUserDataAttributes @@ -32,7 +28,6 @@ class AssignRoleToUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.assign_role_to_user_data_attributes import AssignRoleToUserDataAttributes type_: str = self.type_ 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 f71c44b2..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AssignRoleToUserDataAttributes") diff --git a/rootly_sdk/models/attach_alert.py b/rootly_sdk/models/attach_alert.py index e2a43e08..39dc5313 100644 --- a/rootly_sdk/models/attach_alert.py +++ b/rootly_sdk/models/attach_alert.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.attach_alert_data import AttachAlertData @@ -28,7 +24,6 @@ class AttachAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.attach_alert_data import AttachAlertData data = self.data.to_dict() diff --git a/rootly_sdk/models/attach_alert_data.py b/rootly_sdk/models/attach_alert_data.py index 48dcb138..347f3b33 100644 --- a/rootly_sdk/models/attach_alert_data.py +++ b/rootly_sdk/models/attach_alert_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.attach_alert_data_type import AttachAlertDataType -from ..models.attach_alert_data_type import check_attach_alert_data_type -from typing import cast +from ..models.attach_alert_data_type import AttachAlertDataType, check_attach_alert_data_type if TYPE_CHECKING: from ..models.attach_alert_data_attributes import AttachAlertDataAttributes @@ -32,7 +28,6 @@ class AttachAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.attach_alert_data_attributes import AttachAlertDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/attach_alert_data_attributes.py b/rootly_sdk/models/attach_alert_data_attributes.py index 6d971aa9..6e524c81 100644 --- a/rootly_sdk/models/attach_alert_data_attributes.py +++ b/rootly_sdk/models/attach_alert_data_attributes.py @@ -1,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="AttachAlertDataAttributes") diff --git a/rootly_sdk/models/attach_datadog_dashboards_task_params.py b/rootly_sdk/models/attach_datadog_dashboards_task_params.py index ee8d6e87..d40d148b 100644 --- a/rootly_sdk/models/attach_datadog_dashboards_task_params.py +++ b/rootly_sdk/models/attach_datadog_dashboards_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.attach_datadog_dashboards_task_params_task_type import AttachDatadogDashboardsTaskParamsTaskType from ..models.attach_datadog_dashboards_task_params_task_type import ( + AttachDatadogDashboardsTaskParamsTaskType, check_attach_datadog_dashboards_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.attach_datadog_dashboards_task_params_dashboards_item import ( @@ -44,12 +41,6 @@ class AttachDatadogDashboardsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.attach_datadog_dashboards_task_params_dashboards_item import ( - AttachDatadogDashboardsTaskParamsDashboardsItem, - ) - from ..models.attach_datadog_dashboards_task_params_post_to_slack_channels_item import ( - AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem, - ) dashboards = [] for dashboards_item_data in self.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 4d16eec1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AttachDatadogDashboardsTaskParamsDashboardsItem") 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 c14c49c1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AttachDatadogDashboardsTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py index afe4862b..64c10013 100644 --- a/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py +++ b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params.py @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.attach_retrospective_pdf_to_jira_issue_task_params_task_type import ( AttachRetrospectivePdfToJiraIssueTaskParamsTaskType, -) -from ..models.attach_retrospective_pdf_to_jira_issue_task_params_task_type import ( check_attach_retrospective_pdf_to_jira_issue_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.attach_retrospective_pdf_to_jira_issue_task_params_integration import ( @@ -44,9 +39,6 @@ class AttachRetrospectivePdfToJiraIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.attach_retrospective_pdf_to_jira_issue_task_params_integration import ( - AttachRetrospectivePdfToJiraIssueTaskParamsIntegration, - ) issue_id = self.issue_id diff --git a/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py index 0f2aafac..8041a47a 100644 --- a/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py +++ b/rootly_sdk/models/attach_retrospective_pdf_to_jira_issue_task_params_integration.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AttachRetrospectivePdfToJiraIssueTaskParamsIntegration") diff --git a/rootly_sdk/models/audit.py b/rootly_sdk/models/audit.py index 72f37e85..1efaa9d8 100644 --- a/rootly_sdk/models/audit.py +++ b/rootly_sdk/models/audit.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.audit_item_type import AuditItemType, check_audit_item_type from ..types import UNSET, Unset -from ..models.audit_item_type import AuditItemType -from ..models.audit_item_type import check_audit_item_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.audit_object_changes_type_0 import AuditObjectChangesType0 from ..models.audit_object_type_0 import AuditObjectType0 @@ -62,8 +58,8 @@ class Audit: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.audit_object_type_0 import AuditObjectType0 from ..models.audit_object_changes_type_0 import AuditObjectChangesType0 + from ..models.audit_object_type_0 import AuditObjectType0 event = self.event diff --git a/rootly_sdk/models/audit_object_changes_type_0.py b/rootly_sdk/models/audit_object_changes_type_0.py index a28c8697..adacb420 100644 --- a/rootly_sdk/models/audit_object_changes_type_0.py +++ b/rootly_sdk/models/audit_object_changes_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AuditObjectChangesType0") diff --git a/rootly_sdk/models/audit_object_type_0.py b/rootly_sdk/models/audit_object_type_0.py index c583fa66..2a1a35a1 100644 --- a/rootly_sdk/models/audit_object_type_0.py +++ b/rootly_sdk/models/audit_object_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="AuditObjectType0") diff --git a/rootly_sdk/models/audits_list.py b/rootly_sdk/models/audits_list.py index 54527c32..85729264 100644 --- a/rootly_sdk/models/audits_list.py +++ b/rootly_sdk/models/audits_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.audits_list_data_item import AuditsListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class AuditsList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.audits_list_data_item import AuditsListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/audits_list_data_item.py b/rootly_sdk/models/audits_list_data_item.py index 8d424654..4056d5dd 100644 --- a/rootly_sdk/models/audits_list_data_item.py +++ b/rootly_sdk/models/audits_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.audits_list_data_item_type import AuditsListDataItemType -from ..models.audits_list_data_item_type import check_audits_list_data_item_type -from typing import cast +from ..models.audits_list_data_item_type import AuditsListDataItemType, check_audits_list_data_item_type if TYPE_CHECKING: from ..models.audit import Audit @@ -34,7 +30,6 @@ class AuditsListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.audit import Audit id = self.id diff --git a/rootly_sdk/models/authorization.py b/rootly_sdk/models/authorization.py index 2e4304fd..62b21259 100644 --- a/rootly_sdk/models/authorization.py +++ b/rootly_sdk/models/authorization.py @@ -1,21 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.authorization_authorizable_type import AuthorizationAuthorizableType -from ..models.authorization_authorizable_type import check_authorization_authorizable_type -from ..models.authorization_grantee_type import AuthorizationGranteeType -from ..models.authorization_grantee_type import check_authorization_grantee_type -from ..models.authorization_permissions_item import AuthorizationPermissionsItem -from ..models.authorization_permissions_item import check_authorization_permissions_item -from typing import cast - +from ..models.authorization_authorizable_type import ( + AuthorizationAuthorizableType, + check_authorization_authorizable_type, +) +from ..models.authorization_grantee_type import AuthorizationGranteeType, check_authorization_grantee_type +from ..models.authorization_permissions_item import AuthorizationPermissionsItem, check_authorization_permissions_item T = TypeVar("T", bound="Authorization") diff --git a/rootly_sdk/models/authorization_list.py b/rootly_sdk/models/authorization_list.py index 76f06a88..a3e81667 100644 --- a/rootly_sdk/models/authorization_list.py +++ b/rootly_sdk/models/authorization_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.authorization_list_data_item import AuthorizationListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class AuthorizationList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.authorization_list_data_item import AuthorizationListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/authorization_list_data_item.py b/rootly_sdk/models/authorization_list_data_item.py index a2fee453..bbd20e83 100644 --- a/rootly_sdk/models/authorization_list_data_item.py +++ b/rootly_sdk/models/authorization_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.authorization_list_data_item_type import AuthorizationListDataItemType -from ..models.authorization_list_data_item_type import check_authorization_list_data_item_type -from typing import cast +from ..models.authorization_list_data_item_type import ( + AuthorizationListDataItemType, + check_authorization_list_data_item_type, +) if TYPE_CHECKING: from ..models.authorization import Authorization @@ -34,7 +33,6 @@ class AuthorizationListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.authorization import Authorization id = self.id diff --git a/rootly_sdk/models/authorization_response.py b/rootly_sdk/models/authorization_response.py index 92df6c2e..8ac40ff2 100644 --- a/rootly_sdk/models/authorization_response.py +++ b/rootly_sdk/models/authorization_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.authorization_response_data import AuthorizationResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class AuthorizationResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.authorization_response_data import AuthorizationResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/authorization_response_data.py b/rootly_sdk/models/authorization_response_data.py index fc1cd627..16703d12 100644 --- a/rootly_sdk/models/authorization_response_data.py +++ b/rootly_sdk/models/authorization_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.authorization_response_data_type import AuthorizationResponseDataType -from ..models.authorization_response_data_type import check_authorization_response_data_type -from typing import cast +from ..models.authorization_response_data_type import ( + AuthorizationResponseDataType, + check_authorization_response_data_type, +) if TYPE_CHECKING: from ..models.authorization import Authorization @@ -34,7 +33,6 @@ class AuthorizationResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.authorization import Authorization id = self.id 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 c6cb8e9d..ab61baa7 100644 --- a/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py +++ b/rootly_sdk/models/auto_assign_role_opsgenie_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.auto_assign_role_opsgenie_task_params_task_type import AutoAssignRoleOpsgenieTaskParamsTaskType from ..models.auto_assign_role_opsgenie_task_params_task_type import ( + AutoAssignRoleOpsgenieTaskParamsTaskType, check_auto_assign_role_opsgenie_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.auto_assign_role_opsgenie_task_params_schedule import AutoAssignRoleOpsgenieTaskParamsSchedule @@ -37,7 +34,6 @@ class AutoAssignRoleOpsgenieTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.auto_assign_role_opsgenie_task_params_schedule import AutoAssignRoleOpsgenieTaskParamsSchedule incident_role_id = self.incident_role_id 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 a7d159ed..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AutoAssignRoleOpsgenieTaskParamsSchedule") diff --git a/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py index 2db8db93..cd35eaf2 100644 --- a/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py +++ b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_0_schedule.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AutoAssignRolePagerdutyTaskParamsType0Schedule") diff --git a/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py index 9b5c045b..3ef911c2 100644 --- a/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py +++ b/rootly_sdk/models/auto_assign_role_pagerduty_task_params_type_1_escalation_policy.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AutoAssignRolePagerdutyTaskParamsType1EscalationPolicy") 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 6c33c4bb..865859ae 100644 --- a/rootly_sdk/models/auto_assign_role_rootly_task_params.py +++ b/rootly_sdk/models/auto_assign_role_rootly_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.auto_assign_role_rootly_task_params_task_type import ( + AutoAssignRoleRootlyTaskParamsTaskType, + check_auto_assign_role_rootly_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.auto_assign_role_rootly_task_params_task_type import AutoAssignRoleRootlyTaskParamsTaskType -from ..models.auto_assign_role_rootly_task_params_task_type import check_auto_assign_role_rootly_task_params_task_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.auto_assign_role_rootly_task_params_escalation_policy_target import ( AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget, @@ -51,17 +50,6 @@ class AutoAssignRoleRootlyTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.auto_assign_role_rootly_task_params_escalation_policy_target import ( - AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget, - ) - from ..models.auto_assign_role_rootly_task_params_group_target import AutoAssignRoleRootlyTaskParamsGroupTarget - from ..models.auto_assign_role_rootly_task_params_user_target import AutoAssignRoleRootlyTaskParamsUserTarget - from ..models.auto_assign_role_rootly_task_params_service_target import ( - AutoAssignRoleRootlyTaskParamsServiceTarget, - ) - from ..models.auto_assign_role_rootly_task_params_schedule_target import ( - AutoAssignRoleRootlyTaskParamsScheduleTarget, - ) incident_role_id = self.incident_role_id 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 490f0091..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsEscalationPolicyTarget") 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 7fd6b7c9..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsGroupTarget") 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 7cb4b096..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsScheduleTarget") 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 e298e5a4..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsServiceTarget") 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 bf9442ea..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AutoAssignRoleRootlyTaskParamsUserTarget") 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 b70eccd1..74213134 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,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.auto_assign_role_victor_ops_task_params_task_type import AutoAssignRoleVictorOpsTaskParamsTaskType from ..models.auto_assign_role_victor_ops_task_params_task_type import ( + AutoAssignRoleVictorOpsTaskParamsTaskType, check_auto_assign_role_victor_ops_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.auto_assign_role_victor_ops_task_params_team import AutoAssignRoleVictorOpsTaskParamsTeam @@ -37,7 +34,6 @@ class AutoAssignRoleVictorOpsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.auto_assign_role_victor_ops_task_params_team import AutoAssignRoleVictorOpsTaskParamsTeam incident_role_id = self.incident_role_id 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 e5342158..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="AutoAssignRoleVictorOpsTaskParamsTeam") diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_response.py b/rootly_sdk/models/bulk_destroy_catalog_entities_response.py index f49bf356..e78840fa 100644 --- a/rootly_sdk/models/bulk_destroy_catalog_entities_response.py +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_destroy_catalog_entities_response_data import BulkDestroyCatalogEntitiesResponseData @@ -29,7 +26,6 @@ class BulkDestroyCatalogEntitiesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_destroy_catalog_entities_response_data import BulkDestroyCatalogEntitiesResponseData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py b/rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py index f9ad8125..100418a0 100644 --- a/rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_response_data.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="BulkDestroyCatalogEntitiesResponseData") diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py b/rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py index c61622f1..aa0318b3 100644 --- a/rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_type_0.py @@ -1,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="BulkDestroyCatalogEntitiesType0") diff --git a/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py index d7fc643b..82423407 100644 --- a/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py +++ b/rootly_sdk/models/bulk_destroy_catalog_entities_type_1.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.bulk_destroy_catalog_entities_type_1_managed_by import BulkDestroyCatalogEntitiesType1ManagedBy from ..models.bulk_destroy_catalog_entities_type_1_managed_by import ( + BulkDestroyCatalogEntitiesType1ManagedBy, check_bulk_destroy_catalog_entities_type_1_managed_by, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="BulkDestroyCatalogEntitiesType1") diff --git a/rootly_sdk/models/bulk_destroy_environments_response.py b/rootly_sdk/models/bulk_destroy_environments_response.py index e366ec67..b10deeef 100644 --- a/rootly_sdk/models/bulk_destroy_environments_response.py +++ b/rootly_sdk/models/bulk_destroy_environments_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_destroy_environments_response_data import BulkDestroyEnvironmentsResponseData @@ -29,7 +26,6 @@ class BulkDestroyEnvironmentsResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_destroy_environments_response_data import BulkDestroyEnvironmentsResponseData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_destroy_environments_response_data.py b/rootly_sdk/models/bulk_destroy_environments_response_data.py index 2c69f3aa..64ba34fd 100644 --- a/rootly_sdk/models/bulk_destroy_environments_response_data.py +++ b/rootly_sdk/models/bulk_destroy_environments_response_data.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="BulkDestroyEnvironmentsResponseData") diff --git a/rootly_sdk/models/bulk_destroy_environments_type_0.py b/rootly_sdk/models/bulk_destroy_environments_type_0.py index 953e91f9..f214081d 100644 --- a/rootly_sdk/models/bulk_destroy_environments_type_0.py +++ b/rootly_sdk/models/bulk_destroy_environments_type_0.py @@ -1,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="BulkDestroyEnvironmentsType0") diff --git a/rootly_sdk/models/bulk_destroy_environments_type_1.py b/rootly_sdk/models/bulk_destroy_environments_type_1.py index 5a257d19..ce96f4b6 100644 --- a/rootly_sdk/models/bulk_destroy_environments_type_1.py +++ b/rootly_sdk/models/bulk_destroy_environments_type_1.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.bulk_destroy_environments_type_1_managed_by import ( + BulkDestroyEnvironmentsType1ManagedBy, + check_bulk_destroy_environments_type_1_managed_by, +) from ..types import UNSET, Unset -from ..models.bulk_destroy_environments_type_1_managed_by import BulkDestroyEnvironmentsType1ManagedBy -from ..models.bulk_destroy_environments_type_1_managed_by import check_bulk_destroy_environments_type_1_managed_by -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="BulkDestroyEnvironmentsType1") diff --git a/rootly_sdk/models/bulk_destroy_functionalities_response.py b/rootly_sdk/models/bulk_destroy_functionalities_response.py index 29aa5170..07bfc6d7 100644 --- a/rootly_sdk/models/bulk_destroy_functionalities_response.py +++ b/rootly_sdk/models/bulk_destroy_functionalities_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_destroy_functionalities_response_data import BulkDestroyFunctionalitiesResponseData @@ -29,7 +26,6 @@ class BulkDestroyFunctionalitiesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_destroy_functionalities_response_data import BulkDestroyFunctionalitiesResponseData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_destroy_functionalities_response_data.py b/rootly_sdk/models/bulk_destroy_functionalities_response_data.py index 578866aa..09696126 100644 --- a/rootly_sdk/models/bulk_destroy_functionalities_response_data.py +++ b/rootly_sdk/models/bulk_destroy_functionalities_response_data.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="BulkDestroyFunctionalitiesResponseData") diff --git a/rootly_sdk/models/bulk_destroy_functionalities_type_0.py b/rootly_sdk/models/bulk_destroy_functionalities_type_0.py index 1cc010e8..3d848f82 100644 --- a/rootly_sdk/models/bulk_destroy_functionalities_type_0.py +++ b/rootly_sdk/models/bulk_destroy_functionalities_type_0.py @@ -1,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="BulkDestroyFunctionalitiesType0") diff --git a/rootly_sdk/models/bulk_destroy_functionalities_type_1.py b/rootly_sdk/models/bulk_destroy_functionalities_type_1.py index bdfd5a19..f26f768a 100644 --- a/rootly_sdk/models/bulk_destroy_functionalities_type_1.py +++ b/rootly_sdk/models/bulk_destroy_functionalities_type_1.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.bulk_destroy_functionalities_type_1_managed_by import ( + BulkDestroyFunctionalitiesType1ManagedBy, + check_bulk_destroy_functionalities_type_1_managed_by, +) from ..types import UNSET, Unset -from ..models.bulk_destroy_functionalities_type_1_managed_by import BulkDestroyFunctionalitiesType1ManagedBy -from ..models.bulk_destroy_functionalities_type_1_managed_by import check_bulk_destroy_functionalities_type_1_managed_by -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="BulkDestroyFunctionalitiesType1") diff --git a/rootly_sdk/models/bulk_destroy_services_response.py b/rootly_sdk/models/bulk_destroy_services_response.py index 965dd103..74550d05 100644 --- a/rootly_sdk/models/bulk_destroy_services_response.py +++ b/rootly_sdk/models/bulk_destroy_services_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_destroy_services_response_data import BulkDestroyServicesResponseData @@ -29,7 +26,6 @@ class BulkDestroyServicesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_destroy_services_response_data import BulkDestroyServicesResponseData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_destroy_services_response_data.py b/rootly_sdk/models/bulk_destroy_services_response_data.py index 151cd4c7..f1a02711 100644 --- a/rootly_sdk/models/bulk_destroy_services_response_data.py +++ b/rootly_sdk/models/bulk_destroy_services_response_data.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="BulkDestroyServicesResponseData") diff --git a/rootly_sdk/models/bulk_destroy_services_type_0.py b/rootly_sdk/models/bulk_destroy_services_type_0.py index 47735c27..1c0b2be3 100644 --- a/rootly_sdk/models/bulk_destroy_services_type_0.py +++ b/rootly_sdk/models/bulk_destroy_services_type_0.py @@ -1,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="BulkDestroyServicesType0") diff --git a/rootly_sdk/models/bulk_destroy_services_type_1.py b/rootly_sdk/models/bulk_destroy_services_type_1.py index 2e9b6d9e..30af9e88 100644 --- a/rootly_sdk/models/bulk_destroy_services_type_1.py +++ b/rootly_sdk/models/bulk_destroy_services_type_1.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.bulk_destroy_services_type_1_managed_by import ( + BulkDestroyServicesType1ManagedBy, + check_bulk_destroy_services_type_1_managed_by, +) from ..types import UNSET, Unset -from ..models.bulk_destroy_services_type_1_managed_by import BulkDestroyServicesType1ManagedBy -from ..models.bulk_destroy_services_type_1_managed_by import check_bulk_destroy_services_type_1_managed_by -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="BulkDestroyServicesType1") diff --git a/rootly_sdk/models/bulk_destroy_teams_response.py b/rootly_sdk/models/bulk_destroy_teams_response.py index 84d918ae..d84b0f6d 100644 --- a/rootly_sdk/models/bulk_destroy_teams_response.py +++ b/rootly_sdk/models/bulk_destroy_teams_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_destroy_teams_response_data import BulkDestroyTeamsResponseData @@ -29,7 +26,6 @@ class BulkDestroyTeamsResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_destroy_teams_response_data import BulkDestroyTeamsResponseData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_destroy_teams_response_data.py b/rootly_sdk/models/bulk_destroy_teams_response_data.py index f24d8d1b..c4e2e3fc 100644 --- a/rootly_sdk/models/bulk_destroy_teams_response_data.py +++ b/rootly_sdk/models/bulk_destroy_teams_response_data.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="BulkDestroyTeamsResponseData") diff --git a/rootly_sdk/models/bulk_destroy_teams_type_0.py b/rootly_sdk/models/bulk_destroy_teams_type_0.py index 249f5557..3e2eb0d5 100644 --- a/rootly_sdk/models/bulk_destroy_teams_type_0.py +++ b/rootly_sdk/models/bulk_destroy_teams_type_0.py @@ -1,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="BulkDestroyTeamsType0") diff --git a/rootly_sdk/models/bulk_destroy_teams_type_1.py b/rootly_sdk/models/bulk_destroy_teams_type_1.py index 6e5eab55..881d654b 100644 --- a/rootly_sdk/models/bulk_destroy_teams_type_1.py +++ b/rootly_sdk/models/bulk_destroy_teams_type_1.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.bulk_destroy_teams_type_1_managed_by import ( + BulkDestroyTeamsType1ManagedBy, + check_bulk_destroy_teams_type_1_managed_by, +) from ..types import UNSET, Unset -from ..models.bulk_destroy_teams_type_1_managed_by import BulkDestroyTeamsType1ManagedBy -from ..models.bulk_destroy_teams_type_1_managed_by import check_bulk_destroy_teams_type_1_managed_by -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="BulkDestroyTeamsType1") diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities.py b/rootly_sdk/models/bulk_upsert_catalog_entities.py index 6db2b26d..d6d87d56 100644 --- a/rootly_sdk/models/bulk_upsert_catalog_entities.py +++ b/rootly_sdk/models/bulk_upsert_catalog_entities.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_catalog_entities_entities_item import BulkUpsertCatalogEntitiesEntitiesItem @@ -29,7 +25,6 @@ class BulkUpsertCatalogEntities: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_catalog_entities_entities_item import BulkUpsertCatalogEntitiesEntitiesItem entities = [] for entities_item_data in self.entities: diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py index c07be25e..941d1738 100644 --- a/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_catalog_entities_entities_item_fields_item import ( BulkUpsertCatalogEntitiesEntitiesItemFieldsItem, @@ -41,9 +38,6 @@ class BulkUpsertCatalogEntitiesEntitiesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_catalog_entities_entities_item_fields_item import ( - BulkUpsertCatalogEntitiesEntitiesItemFieldsItem, - ) external_id = self.external_id diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py index aa7e237e..4ee249c4 100644 --- a/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_entities_item_fields_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="BulkUpsertCatalogEntitiesEntitiesItemFieldsItem") diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_error.py b/rootly_sdk/models/bulk_upsert_catalog_entities_error.py index a555ed91..ef8ea3cd 100644 --- a/rootly_sdk/models/bulk_upsert_catalog_entities_error.py +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_error.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_catalog_entities_error_errors_item import BulkUpsertCatalogEntitiesErrorErrorsItem @@ -28,7 +24,6 @@ class BulkUpsertCatalogEntitiesError: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_catalog_entities_error_errors_item import BulkUpsertCatalogEntitiesErrorErrorsItem errors = [] for errors_item_data in self.errors: diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py index e26761e2..996410a2 100644 --- a/rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_error_errors_item.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="BulkUpsertCatalogEntitiesErrorErrorsItem") diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_response.py b/rootly_sdk/models/bulk_upsert_catalog_entities_response.py index 57f300f7..41ada9ec 100644 --- a/rootly_sdk/models/bulk_upsert_catalog_entities_response.py +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_catalog_entities_response_data_item import BulkUpsertCatalogEntitiesResponseDataItem @@ -29,7 +26,6 @@ class BulkUpsertCatalogEntitiesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_catalog_entities_response_data_item import BulkUpsertCatalogEntitiesResponseDataItem data: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py index 4dd31d8b..17df9577 100644 --- a/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py +++ b/rootly_sdk/models/bulk_upsert_catalog_entities_response_data_item.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.bulk_upsert_catalog_entities_response_data_item_type import BulkUpsertCatalogEntitiesResponseDataItemType from ..models.bulk_upsert_catalog_entities_response_data_item_type import ( + BulkUpsertCatalogEntitiesResponseDataItemType, check_bulk_upsert_catalog_entities_response_data_item_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.catalog_entity import CatalogEntity @@ -37,7 +34,6 @@ class BulkUpsertCatalogEntitiesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity import CatalogEntity id = self.id diff --git a/rootly_sdk/models/bulk_upsert_environments.py b/rootly_sdk/models/bulk_upsert_environments.py index 9ecd5f92..8b79a7f4 100644 --- a/rootly_sdk/models/bulk_upsert_environments.py +++ b/rootly_sdk/models/bulk_upsert_environments.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_environments_entities_item import BulkUpsertEnvironmentsEntitiesItem @@ -29,7 +25,6 @@ class BulkUpsertEnvironments: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_environments_entities_item import BulkUpsertEnvironmentsEntitiesItem entities = [] for entities_item_data in self.entities: diff --git a/rootly_sdk/models/bulk_upsert_environments_entities_item.py b/rootly_sdk/models/bulk_upsert_environments_entities_item.py index b2eee7ec..fc203929 100644 --- a/rootly_sdk/models/bulk_upsert_environments_entities_item.py +++ b/rootly_sdk/models/bulk_upsert_environments_entities_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_environments_entities_item_fields_item import BulkUpsertEnvironmentsEntitiesItemFieldsItem @@ -42,9 +39,6 @@ class BulkUpsertEnvironmentsEntitiesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_environments_entities_item_fields_item import ( - BulkUpsertEnvironmentsEntitiesItemFieldsItem, - ) external_id = self.external_id diff --git a/rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py index 18a5a0c4..a2fb5f0b 100644 --- a/rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py +++ b/rootly_sdk/models/bulk_upsert_environments_entities_item_fields_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="BulkUpsertEnvironmentsEntitiesItemFieldsItem") diff --git a/rootly_sdk/models/bulk_upsert_environments_error.py b/rootly_sdk/models/bulk_upsert_environments_error.py index 730aa248..38e7490e 100644 --- a/rootly_sdk/models/bulk_upsert_environments_error.py +++ b/rootly_sdk/models/bulk_upsert_environments_error.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_environments_error_errors_item import BulkUpsertEnvironmentsErrorErrorsItem @@ -28,7 +24,6 @@ class BulkUpsertEnvironmentsError: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_environments_error_errors_item import BulkUpsertEnvironmentsErrorErrorsItem errors = [] for errors_item_data in self.errors: diff --git a/rootly_sdk/models/bulk_upsert_environments_error_errors_item.py b/rootly_sdk/models/bulk_upsert_environments_error_errors_item.py index db0f8aa1..39c9c7b2 100644 --- a/rootly_sdk/models/bulk_upsert_environments_error_errors_item.py +++ b/rootly_sdk/models/bulk_upsert_environments_error_errors_item.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="BulkUpsertEnvironmentsErrorErrorsItem") diff --git a/rootly_sdk/models/bulk_upsert_environments_response.py b/rootly_sdk/models/bulk_upsert_environments_response.py index 85815be4..3e7032dc 100644 --- a/rootly_sdk/models/bulk_upsert_environments_response.py +++ b/rootly_sdk/models/bulk_upsert_environments_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_environments_response_data_item import BulkUpsertEnvironmentsResponseDataItem @@ -29,7 +26,6 @@ class BulkUpsertEnvironmentsResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_environments_response_data_item import BulkUpsertEnvironmentsResponseDataItem data: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_upsert_environments_response_data_item.py b/rootly_sdk/models/bulk_upsert_environments_response_data_item.py index 1e6186b7..57f2a594 100644 --- a/rootly_sdk/models/bulk_upsert_environments_response_data_item.py +++ b/rootly_sdk/models/bulk_upsert_environments_response_data_item.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.bulk_upsert_environments_response_data_item_type import BulkUpsertEnvironmentsResponseDataItemType from ..models.bulk_upsert_environments_response_data_item_type import ( + BulkUpsertEnvironmentsResponseDataItemType, check_bulk_upsert_environments_response_data_item_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.environment import Environment @@ -37,7 +34,6 @@ class BulkUpsertEnvironmentsResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.environment import Environment id = self.id diff --git a/rootly_sdk/models/bulk_upsert_functionalities.py b/rootly_sdk/models/bulk_upsert_functionalities.py index 849ffc9e..31332a66 100644 --- a/rootly_sdk/models/bulk_upsert_functionalities.py +++ b/rootly_sdk/models/bulk_upsert_functionalities.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_functionalities_entities_item import BulkUpsertFunctionalitiesEntitiesItem @@ -30,7 +26,6 @@ class BulkUpsertFunctionalities: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_functionalities_entities_item import BulkUpsertFunctionalitiesEntitiesItem entities = [] for entities_item_data in self.entities: diff --git a/rootly_sdk/models/bulk_upsert_functionalities_entities_item.py b/rootly_sdk/models/bulk_upsert_functionalities_entities_item.py index 17ca54dc..e0dc2dec 100644 --- a/rootly_sdk/models/bulk_upsert_functionalities_entities_item.py +++ b/rootly_sdk/models/bulk_upsert_functionalities_entities_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_functionalities_entities_item_fields_item import ( BulkUpsertFunctionalitiesEntitiesItemFieldsItem, @@ -64,9 +61,6 @@ class BulkUpsertFunctionalitiesEntitiesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_functionalities_entities_item_fields_item import ( - BulkUpsertFunctionalitiesEntitiesItemFieldsItem, - ) external_id = self.external_id diff --git a/rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py index 0cf60b77..f56126ce 100644 --- a/rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py +++ b/rootly_sdk/models/bulk_upsert_functionalities_entities_item_fields_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="BulkUpsertFunctionalitiesEntitiesItemFieldsItem") diff --git a/rootly_sdk/models/bulk_upsert_functionalities_error.py b/rootly_sdk/models/bulk_upsert_functionalities_error.py index 20eba8b4..2c93c715 100644 --- a/rootly_sdk/models/bulk_upsert_functionalities_error.py +++ b/rootly_sdk/models/bulk_upsert_functionalities_error.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_functionalities_error_errors_item import BulkUpsertFunctionalitiesErrorErrorsItem @@ -28,7 +24,6 @@ class BulkUpsertFunctionalitiesError: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_functionalities_error_errors_item import BulkUpsertFunctionalitiesErrorErrorsItem errors = [] for errors_item_data in self.errors: diff --git a/rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py b/rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py index 79208314..8ae7ae2e 100644 --- a/rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py +++ b/rootly_sdk/models/bulk_upsert_functionalities_error_errors_item.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="BulkUpsertFunctionalitiesErrorErrorsItem") diff --git a/rootly_sdk/models/bulk_upsert_functionalities_response.py b/rootly_sdk/models/bulk_upsert_functionalities_response.py index 0f6ec4bc..1318338b 100644 --- a/rootly_sdk/models/bulk_upsert_functionalities_response.py +++ b/rootly_sdk/models/bulk_upsert_functionalities_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_functionalities_response_data_item import BulkUpsertFunctionalitiesResponseDataItem @@ -29,7 +26,6 @@ class BulkUpsertFunctionalitiesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_functionalities_response_data_item import BulkUpsertFunctionalitiesResponseDataItem data: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py index b7ddb73d..a96ca1af 100644 --- a/rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py +++ b/rootly_sdk/models/bulk_upsert_functionalities_response_data_item.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.bulk_upsert_functionalities_response_data_item_type import BulkUpsertFunctionalitiesResponseDataItemType from ..models.bulk_upsert_functionalities_response_data_item_type import ( + BulkUpsertFunctionalitiesResponseDataItemType, check_bulk_upsert_functionalities_response_data_item_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.functionality import Functionality @@ -37,7 +34,6 @@ class BulkUpsertFunctionalitiesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.functionality import Functionality id = self.id diff --git a/rootly_sdk/models/bulk_upsert_services.py b/rootly_sdk/models/bulk_upsert_services.py index 985fbc09..e027c8be 100644 --- a/rootly_sdk/models/bulk_upsert_services.py +++ b/rootly_sdk/models/bulk_upsert_services.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_services_entities_item import BulkUpsertServicesEntitiesItem @@ -29,7 +25,6 @@ class BulkUpsertServices: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_services_entities_item import BulkUpsertServicesEntitiesItem entities = [] for entities_item_data in self.entities: diff --git a/rootly_sdk/models/bulk_upsert_services_entities_item.py b/rootly_sdk/models/bulk_upsert_services_entities_item.py index 7de233eb..9c8d36e8 100644 --- a/rootly_sdk/models/bulk_upsert_services_entities_item.py +++ b/rootly_sdk/models/bulk_upsert_services_entities_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_services_entities_item_fields_item import BulkUpsertServicesEntitiesItemFieldsItem @@ -74,7 +71,6 @@ class BulkUpsertServicesEntitiesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_services_entities_item_fields_item import BulkUpsertServicesEntitiesItemFieldsItem external_id = self.external_id diff --git a/rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py index 02bbd314..1c8f31dc 100644 --- a/rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py +++ b/rootly_sdk/models/bulk_upsert_services_entities_item_fields_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="BulkUpsertServicesEntitiesItemFieldsItem") diff --git a/rootly_sdk/models/bulk_upsert_services_error.py b/rootly_sdk/models/bulk_upsert_services_error.py index f1a14e03..2c96bf7d 100644 --- a/rootly_sdk/models/bulk_upsert_services_error.py +++ b/rootly_sdk/models/bulk_upsert_services_error.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_services_error_errors_item import BulkUpsertServicesErrorErrorsItem @@ -28,7 +24,6 @@ class BulkUpsertServicesError: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_services_error_errors_item import BulkUpsertServicesErrorErrorsItem errors = [] for errors_item_data in self.errors: diff --git a/rootly_sdk/models/bulk_upsert_services_error_errors_item.py b/rootly_sdk/models/bulk_upsert_services_error_errors_item.py index 33da926f..8fb6bac4 100644 --- a/rootly_sdk/models/bulk_upsert_services_error_errors_item.py +++ b/rootly_sdk/models/bulk_upsert_services_error_errors_item.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="BulkUpsertServicesErrorErrorsItem") diff --git a/rootly_sdk/models/bulk_upsert_services_response.py b/rootly_sdk/models/bulk_upsert_services_response.py index 8ccd0f04..60959ba7 100644 --- a/rootly_sdk/models/bulk_upsert_services_response.py +++ b/rootly_sdk/models/bulk_upsert_services_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_services_response_data_item import BulkUpsertServicesResponseDataItem @@ -29,7 +26,6 @@ class BulkUpsertServicesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_services_response_data_item import BulkUpsertServicesResponseDataItem data: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_upsert_services_response_data_item.py b/rootly_sdk/models/bulk_upsert_services_response_data_item.py index 786fed4e..a57b5d08 100644 --- a/rootly_sdk/models/bulk_upsert_services_response_data_item.py +++ b/rootly_sdk/models/bulk_upsert_services_response_data_item.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.bulk_upsert_services_response_data_item_type import ( + BulkUpsertServicesResponseDataItemType, + check_bulk_upsert_services_response_data_item_type, +) from ..types import UNSET, Unset -from ..models.bulk_upsert_services_response_data_item_type import BulkUpsertServicesResponseDataItemType -from ..models.bulk_upsert_services_response_data_item_type import check_bulk_upsert_services_response_data_item_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.service import Service @@ -35,7 +34,6 @@ class BulkUpsertServicesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.service import Service id = self.id diff --git a/rootly_sdk/models/bulk_upsert_teams.py b/rootly_sdk/models/bulk_upsert_teams.py index b060d1c8..8495037f 100644 --- a/rootly_sdk/models/bulk_upsert_teams.py +++ b/rootly_sdk/models/bulk_upsert_teams.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_teams_entities_item import BulkUpsertTeamsEntitiesItem @@ -29,7 +25,6 @@ class BulkUpsertTeams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_teams_entities_item import BulkUpsertTeamsEntitiesItem entities = [] for entities_item_data in self.entities: diff --git a/rootly_sdk/models/bulk_upsert_teams_entities_item.py b/rootly_sdk/models/bulk_upsert_teams_entities_item.py index 9ceb7438..2f881903 100644 --- a/rootly_sdk/models/bulk_upsert_teams_entities_item.py +++ b/rootly_sdk/models/bulk_upsert_teams_entities_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_teams_entities_item_fields_item import BulkUpsertTeamsEntitiesItemFieldsItem @@ -62,7 +59,6 @@ class BulkUpsertTeamsEntitiesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_teams_entities_item_fields_item import BulkUpsertTeamsEntitiesItemFieldsItem external_id = self.external_id diff --git a/rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py b/rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py index 95e2a785..72057a8f 100644 --- a/rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py +++ b/rootly_sdk/models/bulk_upsert_teams_entities_item_fields_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="BulkUpsertTeamsEntitiesItemFieldsItem") diff --git a/rootly_sdk/models/bulk_upsert_teams_error.py b/rootly_sdk/models/bulk_upsert_teams_error.py index f6855672..1c23d188 100644 --- a/rootly_sdk/models/bulk_upsert_teams_error.py +++ b/rootly_sdk/models/bulk_upsert_teams_error.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_teams_error_errors_item import BulkUpsertTeamsErrorErrorsItem @@ -28,7 +24,6 @@ class BulkUpsertTeamsError: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_teams_error_errors_item import BulkUpsertTeamsErrorErrorsItem errors = [] for errors_item_data in self.errors: diff --git a/rootly_sdk/models/bulk_upsert_teams_error_errors_item.py b/rootly_sdk/models/bulk_upsert_teams_error_errors_item.py index eff080f1..bb7cffdc 100644 --- a/rootly_sdk/models/bulk_upsert_teams_error_errors_item.py +++ b/rootly_sdk/models/bulk_upsert_teams_error_errors_item.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="BulkUpsertTeamsErrorErrorsItem") diff --git a/rootly_sdk/models/bulk_upsert_teams_response.py b/rootly_sdk/models/bulk_upsert_teams_response.py index 9db14eca..6080b412 100644 --- a/rootly_sdk/models/bulk_upsert_teams_response.py +++ b/rootly_sdk/models/bulk_upsert_teams_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.bulk_upsert_teams_response_data_item import BulkUpsertTeamsResponseDataItem @@ -29,7 +26,6 @@ class BulkUpsertTeamsResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.bulk_upsert_teams_response_data_item import BulkUpsertTeamsResponseDataItem data: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/bulk_upsert_teams_response_data_item.py b/rootly_sdk/models/bulk_upsert_teams_response_data_item.py index ef17e781..16ccb481 100644 --- a/rootly_sdk/models/bulk_upsert_teams_response_data_item.py +++ b/rootly_sdk/models/bulk_upsert_teams_response_data_item.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.bulk_upsert_teams_response_data_item_type import ( + BulkUpsertTeamsResponseDataItemType, + check_bulk_upsert_teams_response_data_item_type, +) from ..types import UNSET, Unset -from ..models.bulk_upsert_teams_response_data_item_type import BulkUpsertTeamsResponseDataItemType -from ..models.bulk_upsert_teams_response_data_item_type import check_bulk_upsert_teams_response_data_item_type -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.team import Team @@ -35,7 +34,6 @@ class BulkUpsertTeamsResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.team import Team id = self.id diff --git a/rootly_sdk/models/call_people_task_params.py b/rootly_sdk/models/call_people_task_params.py index cb562c36..c5cebec4 100644 --- a/rootly_sdk/models/call_people_task_params.py +++ b/rootly_sdk/models/call_people_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.call_people_task_params_task_type import ( + CallPeopleTaskParamsTaskType, + check_call_people_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.call_people_task_params_task_type import CallPeopleTaskParamsTaskType -from ..models.call_people_task_params_task_type import check_call_people_task_params_task_type -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CallPeopleTaskParams") diff --git a/rootly_sdk/models/cancel_incident.py b/rootly_sdk/models/cancel_incident.py index c6d334f2..d8a65df4 100644 --- a/rootly_sdk/models/cancel_incident.py +++ b/rootly_sdk/models/cancel_incident.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.cancel_incident_data import CancelIncidentData @@ -28,7 +24,6 @@ class CancelIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.cancel_incident_data import CancelIncidentData data = self.data.to_dict() diff --git a/rootly_sdk/models/cancel_incident_data.py b/rootly_sdk/models/cancel_incident_data.py index 498e333e..3e06852a 100644 --- a/rootly_sdk/models/cancel_incident_data.py +++ b/rootly_sdk/models/cancel_incident_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.cancel_incident_data_type import CancelIncidentDataType -from ..models.cancel_incident_data_type import check_cancel_incident_data_type -from typing import cast +from ..models.cancel_incident_data_type import CancelIncidentDataType, check_cancel_incident_data_type if TYPE_CHECKING: from ..models.cancel_incident_data_attributes import CancelIncidentDataAttributes @@ -32,7 +28,6 @@ class CancelIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.cancel_incident_data_attributes import CancelIncidentDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/cancel_incident_data_attributes.py b/rootly_sdk/models/cancel_incident_data_attributes.py index b4ccac5b..c3362192 100644 --- a/rootly_sdk/models/cancel_incident_data_attributes.py +++ b/rootly_sdk/models/cancel_incident_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CancelIncidentDataAttributes") diff --git a/rootly_sdk/models/catalog.py b/rootly_sdk/models/catalog.py index cbaec6ed..97470165 100644 --- a/rootly_sdk/models/catalog.py +++ b/rootly_sdk/models/catalog.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.catalog_icon import CatalogIcon, check_catalog_icon +from ..models.catalog_managed_by import CatalogManagedBy, check_catalog_managed_by from ..types import UNSET, Unset -from ..models.catalog_icon import CatalogIcon -from ..models.catalog_icon import check_catalog_icon -from ..models.catalog_managed_by import CatalogManagedBy -from ..models.catalog_managed_by import check_catalog_managed_by -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Catalog") diff --git a/rootly_sdk/models/catalog_checklist_template.py b/rootly_sdk/models/catalog_checklist_template.py index 7807c520..44046997 100644 --- a/rootly_sdk/models/catalog_checklist_template.py +++ b/rootly_sdk/models/catalog_checklist_template.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.catalog_checklist_template_catalog_type import CatalogChecklistTemplateCatalogType -from ..models.catalog_checklist_template_catalog_type import check_catalog_checklist_template_catalog_type -from ..models.catalog_checklist_template_scope_type import CatalogChecklistTemplateScopeType -from ..models.catalog_checklist_template_scope_type import check_catalog_checklist_template_scope_type -from ..types import UNSET, Unset -from typing import cast - 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 @@ -52,8 +53,6 @@ class CatalogChecklistTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_checklist_template_owners_type_0_item import CatalogChecklistTemplateOwnersType0Item - from ..models.catalog_checklist_template_fields_type_0_item import CatalogChecklistTemplateFieldsType0Item name = self.name 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 index b3db1cbc..c2eaf173 100644 --- a/rootly_sdk/models/catalog_checklist_template_fields_type_0_item.py +++ b/rootly_sdk/models/catalog_checklist_template_fields_type_0_item.py @@ -1,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.catalog_checklist_template_fields_type_0_item_field_source import ( CatalogChecklistTemplateFieldsType0ItemFieldSource, -) -from ..models.catalog_checklist_template_fields_type_0_item_field_source import ( check_catalog_checklist_template_fields_type_0_item_field_source, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="CatalogChecklistTemplateFieldsType0Item") diff --git a/rootly_sdk/models/catalog_checklist_template_list.py b/rootly_sdk/models/catalog_checklist_template_list.py index 3c589c9e..c0f7ee80 100644 --- a/rootly_sdk/models/catalog_checklist_template_list.py +++ b/rootly_sdk/models/catalog_checklist_template_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_checklist_template_list_data_item import CatalogChecklistTemplateListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CatalogChecklistTemplateList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.catalog_checklist_template_list_data_item import CatalogChecklistTemplateListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/catalog_checklist_template_list_data_item.py b/rootly_sdk/models/catalog_checklist_template_list_data_item.py index 07fb8931..be31006e 100644 --- a/rootly_sdk/models/catalog_checklist_template_list_data_item.py +++ b/rootly_sdk/models/catalog_checklist_template_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_checklist_template_list_data_item_type import CatalogChecklistTemplateListDataItemType -from ..models.catalog_checklist_template_list_data_item_type import check_catalog_checklist_template_list_data_item_type -from typing import cast +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 @@ -34,7 +33,6 @@ class CatalogChecklistTemplateListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_checklist_template import CatalogChecklistTemplate id = self.id 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 index 4aca50b1..23e30f42 100644 --- a/rootly_sdk/models/catalog_checklist_template_owners_type_0_item.py +++ b/rootly_sdk/models/catalog_checklist_template_owners_type_0_item.py @@ -1,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.catalog_checklist_template_owners_type_0_item_type import CatalogChecklistTemplateOwnersType0ItemType 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 -from typing import cast - T = TypeVar("T", bound="CatalogChecklistTemplateOwnersType0Item") diff --git a/rootly_sdk/models/catalog_checklist_template_response.py b/rootly_sdk/models/catalog_checklist_template_response.py index 5abbfce9..c86b6fd4 100644 --- a/rootly_sdk/models/catalog_checklist_template_response.py +++ b/rootly_sdk/models/catalog_checklist_template_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_checklist_template_response_data import CatalogChecklistTemplateResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CatalogChecklistTemplateResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_checklist_template_response_data import CatalogChecklistTemplateResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/catalog_checklist_template_response_data.py b/rootly_sdk/models/catalog_checklist_template_response_data.py index 10f0aee4..777c5a27 100644 --- a/rootly_sdk/models/catalog_checklist_template_response_data.py +++ b/rootly_sdk/models/catalog_checklist_template_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_checklist_template_response_data_type import CatalogChecklistTemplateResponseDataType -from ..models.catalog_checklist_template_response_data_type import check_catalog_checklist_template_response_data_type -from typing import cast +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 @@ -34,7 +33,6 @@ class CatalogChecklistTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_checklist_template import CatalogChecklistTemplate id = self.id diff --git a/rootly_sdk/models/catalog_entity.py b/rootly_sdk/models/catalog_entity.py index 44e39d99..abd0a3b3 100644 --- a/rootly_sdk/models/catalog_entity.py +++ b/rootly_sdk/models/catalog_entity.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_managed_by import CatalogEntityManagedBy, check_catalog_entity_managed_by from ..types import UNSET, Unset -from ..models.catalog_entity_managed_by import CatalogEntityManagedBy -from ..models.catalog_entity_managed_by import check_catalog_entity_managed_by -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_properties_item import CatalogEntityPropertiesItem @@ -48,7 +44,6 @@ class CatalogEntity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_properties_item import CatalogEntityPropertiesItem name = self.name diff --git a/rootly_sdk/models/catalog_entity_checklist.py b/rootly_sdk/models/catalog_entity_checklist.py index 73db8a17..24f345bc 100644 --- a/rootly_sdk/models/catalog_entity_checklist.py +++ b/rootly_sdk/models/catalog_entity_checklist.py @@ -1,20 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.catalog_entity_checklist_auditable_type import CatalogEntityChecklistAuditableType -from ..models.catalog_entity_checklist_auditable_type import check_catalog_entity_checklist_auditable_type -from ..models.catalog_entity_checklist_status import CatalogEntityChecklistStatus -from ..models.catalog_entity_checklist_status import check_catalog_entity_checklist_status -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_fields_type_0_item import ( CatalogEntityChecklistChecklistFieldsType0Item, @@ -58,12 +56,6 @@ class CatalogEntityChecklist: 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 import ( - CatalogEntityChecklistChecklistFieldsType0Item, - ) - from ..models.catalog_entity_checklist_checklist_owners_type_0_item import ( - CatalogEntityChecklistChecklistOwnersType0Item, - ) catalog_checklist_template_id = self.catalog_checklist_template_id 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 index 7dfe9858..6543fd4e 100644 --- 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 @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data import ( CatalogEntityChecklistChecklistFieldsType0ItemData, @@ -31,9 +28,6 @@ class CatalogEntityChecklistChecklistFieldsType0Item: 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 import ( - CatalogEntityChecklistChecklistFieldsType0ItemData, - ) data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): 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 index efb1008c..577b41b2 100644 --- 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 @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_type import ( CatalogEntityChecklistChecklistFieldsType0ItemDataType, -) -from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_type import ( check_catalog_entity_checklist_checklist_fields_type_0_item_data_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_attributes import ( @@ -41,9 +36,6 @@ class CatalogEntityChecklistChecklistFieldsType0ItemData: 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 import ( - CatalogEntityChecklistChecklistFieldsType0ItemDataAttributes, - ) id = self.id 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 index 47e7427f..21f60c2e 100644 --- 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 @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_fields_type_0_item_data_attributes_value_snapshot_type_0 import ( CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0, 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 index d424e933..c0b25867 100644 --- 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 @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="CatalogEntityChecklistChecklistFieldsType0ItemDataAttributesValueSnapshotType0") 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 index e1b915b4..a0e411bc 100644 --- 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 @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data import ( CatalogEntityChecklistChecklistOwnersType0ItemData, @@ -31,9 +28,6 @@ class CatalogEntityChecklistChecklistOwnersType0Item: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data import ( - CatalogEntityChecklistChecklistOwnersType0ItemData, - ) data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): 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 index dcfd7d6b..b2e34423 100644 --- 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 @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_type import ( CatalogEntityChecklistChecklistOwnersType0ItemDataType, -) -from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_type import ( check_catalog_entity_checklist_checklist_owners_type_0_item_data_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_attributes import ( @@ -41,9 +36,6 @@ class CatalogEntityChecklistChecklistOwnersType0ItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_checklist_checklist_owners_type_0_item_data_attributes import ( - CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes, - ) id = self.id 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 index 664c992b..923596d6 100644 --- 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 @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CatalogEntityChecklistChecklistOwnersType0ItemDataAttributes") diff --git a/rootly_sdk/models/catalog_entity_checklist_list.py b/rootly_sdk/models/catalog_entity_checklist_list.py index f171edcc..2eaf2854 100644 --- a/rootly_sdk/models/catalog_entity_checklist_list.py +++ b/rootly_sdk/models/catalog_entity_checklist_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_checklist_list_data_item import CatalogEntityChecklistListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CatalogEntityChecklistList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_checklist_list_data_item import CatalogEntityChecklistListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/catalog_entity_checklist_list_data_item.py b/rootly_sdk/models/catalog_entity_checklist_list_data_item.py index 3f2ddeb4..4e904d00 100644 --- a/rootly_sdk/models/catalog_entity_checklist_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_checklist_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_entity_checklist_list_data_item_type import CatalogEntityChecklistListDataItemType -from ..models.catalog_entity_checklist_list_data_item_type import check_catalog_entity_checklist_list_data_item_type -from typing import cast +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 @@ -34,7 +33,6 @@ class CatalogEntityChecklistListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_checklist import CatalogEntityChecklist id = self.id diff --git a/rootly_sdk/models/catalog_entity_checklist_response.py b/rootly_sdk/models/catalog_entity_checklist_response.py index 6554f44f..649544ff 100644 --- a/rootly_sdk/models/catalog_entity_checklist_response.py +++ b/rootly_sdk/models/catalog_entity_checklist_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_checklist_response_data import CatalogEntityChecklistResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CatalogEntityChecklistResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_checklist_response_data import CatalogEntityChecklistResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/catalog_entity_checklist_response_data.py b/rootly_sdk/models/catalog_entity_checklist_response_data.py index c818be36..0f7379b9 100644 --- a/rootly_sdk/models/catalog_entity_checklist_response_data.py +++ b/rootly_sdk/models/catalog_entity_checklist_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_entity_checklist_response_data_type import CatalogEntityChecklistResponseDataType -from ..models.catalog_entity_checklist_response_data_type import check_catalog_entity_checklist_response_data_type -from typing import cast +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 @@ -34,7 +33,6 @@ class CatalogEntityChecklistResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_checklist import CatalogEntityChecklist id = self.id diff --git a/rootly_sdk/models/catalog_entity_list.py b/rootly_sdk/models/catalog_entity_list.py index 15f39dfe..25ebef55 100644 --- a/rootly_sdk/models/catalog_entity_list.py +++ b/rootly_sdk/models/catalog_entity_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_list_data_item import CatalogEntityListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CatalogEntityList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.catalog_entity_list_data_item import CatalogEntityListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/catalog_entity_list_data_item.py b/rootly_sdk/models/catalog_entity_list_data_item.py index e2ee709e..d6635a40 100644 --- a/rootly_sdk/models/catalog_entity_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_entity_list_data_item_type import CatalogEntityListDataItemType -from ..models.catalog_entity_list_data_item_type import check_catalog_entity_list_data_item_type -from typing import cast +from ..models.catalog_entity_list_data_item_type import ( + CatalogEntityListDataItemType, + check_catalog_entity_list_data_item_type, +) if TYPE_CHECKING: from ..models.catalog_entity import CatalogEntity @@ -34,7 +33,6 @@ class CatalogEntityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity import CatalogEntity id = self.id diff --git a/rootly_sdk/models/catalog_entity_properties_item.py b/rootly_sdk/models/catalog_entity_properties_item.py index 6b618914..a96d631a 100644 --- a/rootly_sdk/models/catalog_entity_properties_item.py +++ b/rootly_sdk/models/catalog_entity_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="CatalogEntityPropertiesItem") diff --git a/rootly_sdk/models/catalog_entity_property.py b/rootly_sdk/models/catalog_entity_property.py index a5299a0b..36c57257 100644 --- a/rootly_sdk/models/catalog_entity_property.py +++ b/rootly_sdk/models/catalog_entity_property.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.catalog_entity_property_key import CatalogEntityPropertyKey -from ..models.catalog_entity_property_key import check_catalog_entity_property_key -from typing import cast - +from ..models.catalog_entity_property_key import CatalogEntityPropertyKey, check_catalog_entity_property_key T = TypeVar("T", bound="CatalogEntityProperty") diff --git a/rootly_sdk/models/catalog_entity_property_list.py b/rootly_sdk/models/catalog_entity_property_list.py index cabb6472..ee46c1ca 100644 --- a/rootly_sdk/models/catalog_entity_property_list.py +++ b/rootly_sdk/models/catalog_entity_property_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_property_list_data_item import CatalogEntityPropertyListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -40,10 +37,6 @@ class CatalogEntityPropertyList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.catalog_entity_property_list_data_item import CatalogEntityPropertyListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 f04dcfdc..076db434 100644 --- a/rootly_sdk/models/catalog_entity_property_list_data_item.py +++ b/rootly_sdk/models/catalog_entity_property_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_entity_property_list_data_item_type import CatalogEntityPropertyListDataItemType -from ..models.catalog_entity_property_list_data_item_type import check_catalog_entity_property_list_data_item_type -from typing import cast +from ..models.catalog_entity_property_list_data_item_type import ( + CatalogEntityPropertyListDataItemType, + check_catalog_entity_property_list_data_item_type, +) if TYPE_CHECKING: from ..models.catalog_entity_property import CatalogEntityProperty @@ -36,7 +35,6 @@ class CatalogEntityPropertyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_property import CatalogEntityProperty id = self.id diff --git a/rootly_sdk/models/catalog_entity_property_response.py b/rootly_sdk/models/catalog_entity_property_response.py index f621fe7b..dcc92f35 100644 --- a/rootly_sdk/models/catalog_entity_property_response.py +++ b/rootly_sdk/models/catalog_entity_property_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_property_response_data import CatalogEntityPropertyResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -34,8 +31,6 @@ class CatalogEntityPropertyResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_property_response_data import CatalogEntityPropertyResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/catalog_entity_property_response_data.py b/rootly_sdk/models/catalog_entity_property_response_data.py index b6f8b345..498e31c9 100644 --- a/rootly_sdk/models/catalog_entity_property_response_data.py +++ b/rootly_sdk/models/catalog_entity_property_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_entity_property_response_data_type import CatalogEntityPropertyResponseDataType -from ..models.catalog_entity_property_response_data_type import check_catalog_entity_property_response_data_type -from typing import cast +from ..models.catalog_entity_property_response_data_type import ( + CatalogEntityPropertyResponseDataType, + check_catalog_entity_property_response_data_type, +) if TYPE_CHECKING: from ..models.catalog_entity_property import CatalogEntityProperty @@ -36,7 +35,6 @@ class CatalogEntityPropertyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_property import CatalogEntityProperty id = self.id diff --git a/rootly_sdk/models/catalog_entity_response.py b/rootly_sdk/models/catalog_entity_response.py index 272afa80..d4021d60 100644 --- a/rootly_sdk/models/catalog_entity_response.py +++ b/rootly_sdk/models/catalog_entity_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_entity_response_data import CatalogEntityResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CatalogEntityResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity_response_data import CatalogEntityResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/catalog_entity_response_data.py b/rootly_sdk/models/catalog_entity_response_data.py index ff6a5e5c..c94fce28 100644 --- a/rootly_sdk/models/catalog_entity_response_data.py +++ b/rootly_sdk/models/catalog_entity_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_entity_response_data_type import CatalogEntityResponseDataType -from ..models.catalog_entity_response_data_type import check_catalog_entity_response_data_type -from typing import cast +from ..models.catalog_entity_response_data_type import ( + CatalogEntityResponseDataType, + check_catalog_entity_response_data_type, +) if TYPE_CHECKING: from ..models.catalog_entity import CatalogEntity @@ -34,7 +33,6 @@ class CatalogEntityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_entity import CatalogEntity id = self.id diff --git a/rootly_sdk/models/catalog_field.py b/rootly_sdk/models/catalog_field.py index dc4c0c86..ec19027e 100644 --- a/rootly_sdk/models/catalog_field.py +++ b/rootly_sdk/models/catalog_field.py @@ -1,23 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.catalog_field_catalog_type import CatalogFieldCatalogType, check_catalog_field_catalog_type +from ..models.catalog_field_kind import CatalogFieldKind, check_catalog_field_kind +from ..models.catalog_field_managed_by import CatalogFieldManagedBy, check_catalog_field_managed_by from ..types import UNSET, Unset -from ..models.catalog_field_catalog_type import CatalogFieldCatalogType -from ..models.catalog_field_catalog_type import check_catalog_field_catalog_type -from ..models.catalog_field_kind import CatalogFieldKind -from ..models.catalog_field_kind import check_catalog_field_kind -from ..models.catalog_field_managed_by import CatalogFieldManagedBy -from ..models.catalog_field_managed_by import check_catalog_field_managed_by -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CatalogField") diff --git a/rootly_sdk/models/catalog_field_list.py b/rootly_sdk/models/catalog_field_list.py index e5811f08..701ad0c1 100644 --- a/rootly_sdk/models/catalog_field_list.py +++ b/rootly_sdk/models/catalog_field_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_field_list_data_item import CatalogFieldListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CatalogFieldList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.catalog_field_list_data_item import CatalogFieldListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/catalog_field_list_data_item.py b/rootly_sdk/models/catalog_field_list_data_item.py index 88e753fa..682398fe 100644 --- a/rootly_sdk/models/catalog_field_list_data_item.py +++ b/rootly_sdk/models/catalog_field_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_field_list_data_item_type import CatalogFieldListDataItemType -from ..models.catalog_field_list_data_item_type import check_catalog_field_list_data_item_type -from typing import cast +from ..models.catalog_field_list_data_item_type import ( + CatalogFieldListDataItemType, + check_catalog_field_list_data_item_type, +) if TYPE_CHECKING: from ..models.catalog_field import CatalogField @@ -34,7 +33,6 @@ class CatalogFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_field import CatalogField id = self.id diff --git a/rootly_sdk/models/catalog_field_response.py b/rootly_sdk/models/catalog_field_response.py index 76620f22..28027488 100644 --- a/rootly_sdk/models/catalog_field_response.py +++ b/rootly_sdk/models/catalog_field_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_field_response_data import CatalogFieldResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CatalogFieldResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.catalog_field_response_data import CatalogFieldResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/catalog_field_response_data.py b/rootly_sdk/models/catalog_field_response_data.py index 27210b9c..8e7af968 100644 --- a/rootly_sdk/models/catalog_field_response_data.py +++ b/rootly_sdk/models/catalog_field_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_field_response_data_type import CatalogFieldResponseDataType -from ..models.catalog_field_response_data_type import check_catalog_field_response_data_type -from typing import cast +from ..models.catalog_field_response_data_type import ( + CatalogFieldResponseDataType, + check_catalog_field_response_data_type, +) if TYPE_CHECKING: from ..models.catalog_field import CatalogField @@ -34,7 +33,6 @@ class CatalogFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_field import CatalogField id = self.id diff --git a/rootly_sdk/models/catalog_list.py b/rootly_sdk/models/catalog_list.py index 92c9f070..b08d4e29 100644 --- a/rootly_sdk/models/catalog_list.py +++ b/rootly_sdk/models/catalog_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_list_data_item import CatalogListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CatalogList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_list_data_item import CatalogListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/catalog_list_data_item.py b/rootly_sdk/models/catalog_list_data_item.py index 5cc606f3..b571539d 100644 --- a/rootly_sdk/models/catalog_list_data_item.py +++ b/rootly_sdk/models/catalog_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_list_data_item_type import CatalogListDataItemType -from ..models.catalog_list_data_item_type import check_catalog_list_data_item_type -from typing import cast +from ..models.catalog_list_data_item_type import CatalogListDataItemType, check_catalog_list_data_item_type if TYPE_CHECKING: from ..models.catalog import Catalog @@ -34,7 +30,6 @@ class CatalogListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog import Catalog id = self.id diff --git a/rootly_sdk/models/catalog_property.py b/rootly_sdk/models/catalog_property.py index 86dceeb0..290c5655 100644 --- a/rootly_sdk/models/catalog_property.py +++ b/rootly_sdk/models/catalog_property.py @@ -1,23 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..models.catalog_property_managed_by import CatalogPropertyManagedBy, check_catalog_property_managed_by from ..types import UNSET, Unset -from ..models.catalog_property_catalog_type import CatalogPropertyCatalogType -from ..models.catalog_property_catalog_type import check_catalog_property_catalog_type -from ..models.catalog_property_kind import CatalogPropertyKind -from ..models.catalog_property_kind import check_catalog_property_kind -from ..models.catalog_property_managed_by import CatalogPropertyManagedBy -from ..models.catalog_property_managed_by import check_catalog_property_managed_by -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CatalogProperty") diff --git a/rootly_sdk/models/catalog_property_list.py b/rootly_sdk/models/catalog_property_list.py index 468e1ac9..599d86d9 100644 --- a/rootly_sdk/models/catalog_property_list.py +++ b/rootly_sdk/models/catalog_property_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_property_list_data_item import CatalogPropertyListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CatalogPropertyList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.catalog_property_list_data_item import CatalogPropertyListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/catalog_property_list_data_item.py b/rootly_sdk/models/catalog_property_list_data_item.py index e6158d1b..30b3a4f7 100644 --- a/rootly_sdk/models/catalog_property_list_data_item.py +++ b/rootly_sdk/models/catalog_property_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_property_list_data_item_type import CatalogPropertyListDataItemType -from ..models.catalog_property_list_data_item_type import check_catalog_property_list_data_item_type -from typing import cast +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 @@ -34,7 +33,6 @@ class CatalogPropertyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_property import CatalogProperty id = self.id diff --git a/rootly_sdk/models/catalog_property_response.py b/rootly_sdk/models/catalog_property_response.py index 0852a2fe..9487ea12 100644 --- a/rootly_sdk/models/catalog_property_response.py +++ b/rootly_sdk/models/catalog_property_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_property_response_data import CatalogPropertyResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CatalogPropertyResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.catalog_property_response_data import CatalogPropertyResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/catalog_property_response_data.py b/rootly_sdk/models/catalog_property_response_data.py index 60b14e8d..97cf9c33 100644 --- a/rootly_sdk/models/catalog_property_response_data.py +++ b/rootly_sdk/models/catalog_property_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_property_response_data_type import CatalogPropertyResponseDataType -from ..models.catalog_property_response_data_type import check_catalog_property_response_data_type -from typing import cast +from ..models.catalog_property_response_data_type import ( + CatalogPropertyResponseDataType, + check_catalog_property_response_data_type, +) if TYPE_CHECKING: from ..models.catalog_property import CatalogProperty @@ -34,7 +33,6 @@ class CatalogPropertyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_property import CatalogProperty id = self.id diff --git a/rootly_sdk/models/catalog_response.py b/rootly_sdk/models/catalog_response.py index 29817c70..803acfef 100644 --- a/rootly_sdk/models/catalog_response.py +++ b/rootly_sdk/models/catalog_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.catalog_response_data import CatalogResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CatalogResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog_response_data import CatalogResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/catalog_response_data.py b/rootly_sdk/models/catalog_response_data.py index b46e16d8..3043dcd1 100644 --- a/rootly_sdk/models/catalog_response_data.py +++ b/rootly_sdk/models/catalog_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.catalog_response_data_type import CatalogResponseDataType -from ..models.catalog_response_data_type import check_catalog_response_data_type -from typing import cast +from ..models.catalog_response_data_type import CatalogResponseDataType, check_catalog_response_data_type if TYPE_CHECKING: from ..models.catalog import Catalog @@ -34,7 +30,6 @@ class CatalogResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.catalog import Catalog id = self.id diff --git a/rootly_sdk/models/cause.py b/rootly_sdk/models/cause.py index 55ccc96d..0f7cc7b6 100644 --- a/rootly_sdk/models/cause.py +++ b/rootly_sdk/models/cause.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.cause_properties_item import CausePropertiesItem @@ -41,7 +38,6 @@ class Cause: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.cause_properties_item import CausePropertiesItem name = self.name diff --git a/rootly_sdk/models/cause_list.py b/rootly_sdk/models/cause_list.py index 7477662c..09bf20ee 100644 --- a/rootly_sdk/models/cause_list.py +++ b/rootly_sdk/models/cause_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.cause_list_data_item import CauseListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CauseList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.cause_list_data_item import CauseListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/cause_list_data_item.py b/rootly_sdk/models/cause_list_data_item.py index 0e4e4286..ab260383 100644 --- a/rootly_sdk/models/cause_list_data_item.py +++ b/rootly_sdk/models/cause_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.cause_list_data_item_type import CauseListDataItemType -from ..models.cause_list_data_item_type import check_cause_list_data_item_type -from typing import cast +from ..models.cause_list_data_item_type import CauseListDataItemType, check_cause_list_data_item_type if TYPE_CHECKING: from ..models.cause import Cause @@ -34,7 +30,6 @@ class CauseListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.cause import Cause id = self.id diff --git a/rootly_sdk/models/cause_properties_item.py b/rootly_sdk/models/cause_properties_item.py index 7a61cc81..ada1e890 100644 --- a/rootly_sdk/models/cause_properties_item.py +++ b/rootly_sdk/models/cause_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="CausePropertiesItem") diff --git a/rootly_sdk/models/cause_response.py b/rootly_sdk/models/cause_response.py index 972ae855..5b7f1b42 100644 --- a/rootly_sdk/models/cause_response.py +++ b/rootly_sdk/models/cause_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.cause_response_data import CauseResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CauseResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.cause_response_data import CauseResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/cause_response_data.py b/rootly_sdk/models/cause_response_data.py index 4bb34cba..26df2bb4 100644 --- a/rootly_sdk/models/cause_response_data.py +++ b/rootly_sdk/models/cause_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.cause_response_data_type import CauseResponseDataType -from ..models.cause_response_data_type import check_cause_response_data_type -from typing import cast +from ..models.cause_response_data_type import CauseResponseDataType, check_cause_response_data_type if TYPE_CHECKING: from ..models.cause import Cause @@ -34,7 +30,6 @@ class CauseResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.cause import Cause id = self.id diff --git a/rootly_sdk/models/change_google_chat_space_privacy_task_params.py b/rootly_sdk/models/change_google_chat_space_privacy_task_params.py index 371ac9c6..b38539dc 100644 --- a/rootly_sdk/models/change_google_chat_space_privacy_task_params.py +++ b/rootly_sdk/models/change_google_chat_space_privacy_task_params.py @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.change_google_chat_space_privacy_task_params_task_type import ( ChangeGoogleChatSpacePrivacyTaskParamsTaskType, -) -from ..models.change_google_chat_space_privacy_task_params_task_type import ( check_change_google_chat_space_privacy_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.change_google_chat_space_privacy_task_params_space import ChangeGoogleChatSpacePrivacyTaskParamsSpace @@ -40,9 +35,6 @@ class ChangeGoogleChatSpacePrivacyTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.change_google_chat_space_privacy_task_params_space import ( - ChangeGoogleChatSpacePrivacyTaskParamsSpace, - ) space = self.space.to_dict() diff --git a/rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py b/rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py index b57994d4..cf4c0984 100644 --- a/rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py +++ b/rootly_sdk/models/change_google_chat_space_privacy_task_params_space.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ChangeGoogleChatSpacePrivacyTaskParamsSpace") 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 67b27448..58c10e84 100644 --- a/rootly_sdk/models/change_slack_channel_privacy_task_params.py +++ b/rootly_sdk/models/change_slack_channel_privacy_task_params.py @@ -1,23 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.change_slack_channel_privacy_task_params_privacy import ChangeSlackChannelPrivacyTaskParamsPrivacy from ..models.change_slack_channel_privacy_task_params_privacy import ( + ChangeSlackChannelPrivacyTaskParamsPrivacy, check_change_slack_channel_privacy_task_params_privacy, ) -from ..models.change_slack_channel_privacy_task_params_task_type import ChangeSlackChannelPrivacyTaskParamsTaskType from ..models.change_slack_channel_privacy_task_params_task_type import ( + ChangeSlackChannelPrivacyTaskParamsTaskType, check_change_slack_channel_privacy_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.change_slack_channel_privacy_task_params_channel import ChangeSlackChannelPrivacyTaskParamsChannel @@ -41,7 +38,6 @@ class ChangeSlackChannelPrivacyTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.change_slack_channel_privacy_task_params_channel import ChangeSlackChannelPrivacyTaskParamsChannel channel = self.channel.to_dict() 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 0368bc27..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ChangeSlackChannelPrivacyTaskParamsChannel") diff --git a/rootly_sdk/models/communications_group.py b/rootly_sdk/models/communications_group.py index 2d4fa619..a6028858 100644 --- a/rootly_sdk/models/communications_group.py +++ b/rootly_sdk/models/communications_group.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.communications_group_condition_type import ( + CommunicationsGroupConditionType, + check_communications_group_condition_type, +) from ..types import UNSET, Unset -from ..models.communications_group_condition_type import check_communications_group_condition_type -from ..models.communications_group_condition_type import CommunicationsGroupConditionType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_group_communication_external_group_members_type_0_item import ( CommunicationsGroupCommunicationExternalGroupMembersType0Item, @@ -68,12 +67,6 @@ class CommunicationsGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_group_communication_group_conditions_type_0_item import ( - CommunicationsGroupCommunicationGroupConditionsType0Item, - ) - from ..models.communications_group_communication_external_group_members_type_0_item import ( - CommunicationsGroupCommunicationExternalGroupMembersType0Item, - ) name = self.name 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 ed8a4f88..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CommunicationsGroupCommunicationExternalGroupMembersType0Item") 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 17a9e664..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.communications_group_communication_group_conditions_type_0_item_property_type import ( - check_communications_group_communication_group_conditions_type_0_item_property_type, -) from ..models.communications_group_communication_group_conditions_type_0_item_property_type import ( CommunicationsGroupCommunicationGroupConditionsType0ItemPropertyType, + check_communications_group_communication_group_conditions_type_0_item_property_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="CommunicationsGroupCommunicationGroupConditionsType0Item") diff --git a/rootly_sdk/models/communications_group_response.py b/rootly_sdk/models/communications_group_response.py index 38767f1b..b5a5b73d 100644 --- a/rootly_sdk/models/communications_group_response.py +++ b/rootly_sdk/models/communications_group_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_group_response_data import CommunicationsGroupResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CommunicationsGroupResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_group_response_data import CommunicationsGroupResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/communications_group_response_data.py b/rootly_sdk/models/communications_group_response_data.py index 64b46f0d..348403a7 100644 --- a/rootly_sdk/models/communications_group_response_data.py +++ b/rootly_sdk/models/communications_group_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.communications_group_response_data_type import check_communications_group_response_data_type -from ..models.communications_group_response_data_type import CommunicationsGroupResponseDataType -from typing import cast +from ..models.communications_group_response_data_type import ( + CommunicationsGroupResponseDataType, + check_communications_group_response_data_type, +) if TYPE_CHECKING: from ..models.communications_group import CommunicationsGroup @@ -34,7 +33,6 @@ class CommunicationsGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_group import CommunicationsGroup id = self.id diff --git a/rootly_sdk/models/communications_groups_response.py b/rootly_sdk/models/communications_groups_response.py index 6535985c..073a891b 100644 --- a/rootly_sdk/models/communications_groups_response.py +++ b/rootly_sdk/models/communications_groups_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_groups_response_data_item import CommunicationsGroupsResponseDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CommunicationsGroupsResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_groups_response_data_item import CommunicationsGroupsResponseDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/communications_groups_response_data_item.py b/rootly_sdk/models/communications_groups_response_data_item.py index f70d6d4b..9aa6b3cd 100644 --- a/rootly_sdk/models/communications_groups_response_data_item.py +++ b/rootly_sdk/models/communications_groups_response_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.communications_groups_response_data_item_type import check_communications_groups_response_data_item_type -from ..models.communications_groups_response_data_item_type import CommunicationsGroupsResponseDataItemType -from typing import cast +from ..models.communications_groups_response_data_item_type import ( + CommunicationsGroupsResponseDataItemType, + check_communications_groups_response_data_item_type, +) if TYPE_CHECKING: from ..models.communications_group import CommunicationsGroup @@ -34,7 +33,6 @@ class CommunicationsGroupsResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_group import CommunicationsGroup id = self.id diff --git a/rootly_sdk/models/communications_stage.py b/rootly_sdk/models/communications_stage.py index 49db3952..a32faca1 100644 --- a/rootly_sdk/models/communications_stage.py +++ b/rootly_sdk/models/communications_stage.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CommunicationsStage") diff --git a/rootly_sdk/models/communications_stage_response.py b/rootly_sdk/models/communications_stage_response.py index 7f18ad8c..4fd84073 100644 --- a/rootly_sdk/models/communications_stage_response.py +++ b/rootly_sdk/models/communications_stage_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_stage_response_data import CommunicationsStageResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CommunicationsStageResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_stage_response_data import CommunicationsStageResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/communications_stage_response_data.py b/rootly_sdk/models/communications_stage_response_data.py index d1f24885..740ecf53 100644 --- a/rootly_sdk/models/communications_stage_response_data.py +++ b/rootly_sdk/models/communications_stage_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.communications_stage_response_data_type import check_communications_stage_response_data_type -from ..models.communications_stage_response_data_type import CommunicationsStageResponseDataType -from typing import cast +from ..models.communications_stage_response_data_type import ( + CommunicationsStageResponseDataType, + check_communications_stage_response_data_type, +) if TYPE_CHECKING: from ..models.communications_stage import CommunicationsStage @@ -34,7 +33,6 @@ class CommunicationsStageResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_stage import CommunicationsStage id = self.id diff --git a/rootly_sdk/models/communications_stages_response.py b/rootly_sdk/models/communications_stages_response.py index 3f76aa71..bc18ddc2 100644 --- a/rootly_sdk/models/communications_stages_response.py +++ b/rootly_sdk/models/communications_stages_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_stages_response_data_item import CommunicationsStagesResponseDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CommunicationsStagesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.communications_stages_response_data_item import CommunicationsStagesResponseDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/communications_stages_response_data_item.py b/rootly_sdk/models/communications_stages_response_data_item.py index 967515b6..08d91cc3 100644 --- a/rootly_sdk/models/communications_stages_response_data_item.py +++ b/rootly_sdk/models/communications_stages_response_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.communications_stages_response_data_item_type import check_communications_stages_response_data_item_type -from ..models.communications_stages_response_data_item_type import CommunicationsStagesResponseDataItemType -from typing import cast +from ..models.communications_stages_response_data_item_type import ( + CommunicationsStagesResponseDataItemType, + check_communications_stages_response_data_item_type, +) if TYPE_CHECKING: from ..models.communications_stage import CommunicationsStage @@ -34,7 +33,6 @@ class CommunicationsStagesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_stage import CommunicationsStage id = self.id diff --git a/rootly_sdk/models/communications_template.py b/rootly_sdk/models/communications_template.py index c1f08430..6e9b9007 100644 --- a/rootly_sdk/models/communications_template.py +++ b/rootly_sdk/models/communications_template.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_template_communication_template_stages_type_0_item import ( CommunicationsTemplateCommunicationTemplateStagesType0Item, @@ -51,10 +48,6 @@ class CommunicationsTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_template_communication_template_stages_type_0_item import ( - CommunicationsTemplateCommunicationTemplateStagesType0Item, - ) - from ..models.communications_template_communication_type import CommunicationsTemplateCommunicationType name = self.name 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 32d6b497..1d8c4f18 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_template_communication_template_stages_type_0_item_data import ( CommunicationsTemplateCommunicationTemplateStagesType0ItemData, @@ -31,9 +28,6 @@ class CommunicationsTemplateCommunicationTemplateStagesType0Item: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_template_communication_template_stages_type_0_item_data import ( - CommunicationsTemplateCommunicationTemplateStagesType0ItemData, - ) data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): 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 990ebf11..0999ec29 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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.communications_template_communication_template_stages_type_0_item_data_type import ( - check_communications_template_communication_template_stages_type_0_item_data_type, -) from ..models.communications_template_communication_template_stages_type_0_item_data_type import ( CommunicationsTemplateCommunicationTemplateStagesType0ItemDataType, + check_communications_template_communication_template_stages_type_0_item_data_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.communications_template_communication_template_stages_type_0_item_data_attributes import ( @@ -41,9 +36,6 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_template_communication_template_stages_type_0_item_data_attributes import ( - CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes, - ) id = self.id 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 3d2d0d12..1d91175b 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_template_communication_template_stages_type_0_item_data_attributes_communication_stage import ( CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage, @@ -54,12 +51,6 @@ class CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_template_communication_template_stages_type_0_item_data_attributes_communication_template import ( - CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate, - ) - from ..models.communications_template_communication_template_stages_type_0_item_data_attributes_communication_stage import ( - CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage, - ) email_body: None | str | Unset if isinstance(self.email_body, 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 401f88c1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationStage") 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 f25b3fcf..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CommunicationsTemplateCommunicationTemplateStagesType0ItemDataAttributesCommunicationTemplate") diff --git a/rootly_sdk/models/communications_template_communication_type.py b/rootly_sdk/models/communications_template_communication_type.py index 3c0a7a78..c4b73f8c 100644 --- a/rootly_sdk/models/communications_template_communication_type.py +++ b/rootly_sdk/models/communications_template_communication_type.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CommunicationsTemplateCommunicationType") diff --git a/rootly_sdk/models/communications_template_response.py b/rootly_sdk/models/communications_template_response.py index a724ae7a..ad97411a 100644 --- a/rootly_sdk/models/communications_template_response.py +++ b/rootly_sdk/models/communications_template_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_template_response_data import CommunicationsTemplateResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CommunicationsTemplateResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.communications_template_response_data import CommunicationsTemplateResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/communications_template_response_data.py b/rootly_sdk/models/communications_template_response_data.py index f8eb48ef..a5f60679 100644 --- a/rootly_sdk/models/communications_template_response_data.py +++ b/rootly_sdk/models/communications_template_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.communications_template_response_data_type import check_communications_template_response_data_type -from ..models.communications_template_response_data_type import CommunicationsTemplateResponseDataType -from typing import cast +from ..models.communications_template_response_data_type import ( + CommunicationsTemplateResponseDataType, + check_communications_template_response_data_type, +) if TYPE_CHECKING: from ..models.communications_template import CommunicationsTemplate @@ -34,7 +33,6 @@ class CommunicationsTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_template import CommunicationsTemplate id = self.id diff --git a/rootly_sdk/models/communications_templates_response.py b/rootly_sdk/models/communications_templates_response.py index bb7670ec..c8d4f769 100644 --- a/rootly_sdk/models/communications_templates_response.py +++ b/rootly_sdk/models/communications_templates_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_templates_response_data_item import CommunicationsTemplatesResponseDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CommunicationsTemplatesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.communications_templates_response_data_item import CommunicationsTemplatesResponseDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/communications_templates_response_data_item.py b/rootly_sdk/models/communications_templates_response_data_item.py index 5b681fa8..1c42e544 100644 --- a/rootly_sdk/models/communications_templates_response_data_item.py +++ b/rootly_sdk/models/communications_templates_response_data_item.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.communications_templates_response_data_item_type import ( + CommunicationsTemplatesResponseDataItemType, check_communications_templates_response_data_item_type, ) -from ..models.communications_templates_response_data_item_type import CommunicationsTemplatesResponseDataItemType -from typing import cast if TYPE_CHECKING: from ..models.communications_template import CommunicationsTemplate @@ -36,7 +33,6 @@ class CommunicationsTemplatesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_template import CommunicationsTemplate id = self.id diff --git a/rootly_sdk/models/communications_type.py b/rootly_sdk/models/communications_type.py index d0b603f2..0323e1ec 100644 --- a/rootly_sdk/models/communications_type.py +++ b/rootly_sdk/models/communications_type.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CommunicationsType") diff --git a/rootly_sdk/models/communications_type_response.py b/rootly_sdk/models/communications_type_response.py index 33f9f280..87a0439a 100644 --- a/rootly_sdk/models/communications_type_response.py +++ b/rootly_sdk/models/communications_type_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_type_response_data import CommunicationsTypeResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CommunicationsTypeResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.communications_type_response_data import CommunicationsTypeResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/communications_type_response_data.py b/rootly_sdk/models/communications_type_response_data.py index 99865fe0..f37e6746 100644 --- a/rootly_sdk/models/communications_type_response_data.py +++ b/rootly_sdk/models/communications_type_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.communications_type_response_data_type import check_communications_type_response_data_type -from ..models.communications_type_response_data_type import CommunicationsTypeResponseDataType -from typing import cast +from ..models.communications_type_response_data_type import ( + CommunicationsTypeResponseDataType, + check_communications_type_response_data_type, +) if TYPE_CHECKING: from ..models.communications_type import CommunicationsType @@ -34,7 +33,6 @@ class CommunicationsTypeResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_type import CommunicationsType id = self.id diff --git a/rootly_sdk/models/communications_types_response.py b/rootly_sdk/models/communications_types_response.py index 10055e6e..adbf3c58 100644 --- a/rootly_sdk/models/communications_types_response.py +++ b/rootly_sdk/models/communications_types_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.communications_types_response_data_item import CommunicationsTypesResponseDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CommunicationsTypesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_types_response_data_item import CommunicationsTypesResponseDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/communications_types_response_data_item.py b/rootly_sdk/models/communications_types_response_data_item.py index bd132a02..21bd7214 100644 --- a/rootly_sdk/models/communications_types_response_data_item.py +++ b/rootly_sdk/models/communications_types_response_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.communications_types_response_data_item_type import check_communications_types_response_data_item_type -from ..models.communications_types_response_data_item_type import CommunicationsTypesResponseDataItemType -from typing import cast +from ..models.communications_types_response_data_item_type import ( + CommunicationsTypesResponseDataItemType, + check_communications_types_response_data_item_type, +) if TYPE_CHECKING: from ..models.communications_type import CommunicationsType @@ -34,7 +33,6 @@ class CommunicationsTypesResponseDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.communications_type import CommunicationsType id = self.id 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 f1cebd32..61670f3d 100644 --- a/rootly_sdk/models/create_airtable_table_record_task_params.py +++ b/rootly_sdk/models/create_airtable_table_record_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_airtable_table_record_task_params_task_type import ( + CreateAirtableTableRecordTaskParamsTaskType, check_create_airtable_table_record_task_params_task_type, ) -from ..models.create_airtable_table_record_task_params_task_type import CreateAirtableTableRecordTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_airtable_table_record_task_params_base import CreateAirtableTableRecordTaskParamsBase @@ -41,8 +38,6 @@ class CreateAirtableTableRecordTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_airtable_table_record_task_params_table import CreateAirtableTableRecordTaskParamsTable - from ..models.create_airtable_table_record_task_params_base import CreateAirtableTableRecordTaskParamsBase base = self.base.to_dict() 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 0c7b567f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateAirtableTableRecordTaskParamsBase") 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 003c1f5e..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateAirtableTableRecordTaskParamsTable") 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 0f219c09..fe2527e4 100644 --- a/rootly_sdk/models/create_anthropic_chat_completion_task_params.py +++ b/rootly_sdk/models/create_anthropic_chat_completion_task_params.py @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.create_anthropic_chat_completion_task_params_task_type import ( - check_create_anthropic_chat_completion_task_params_task_type, -) from ..models.create_anthropic_chat_completion_task_params_task_type import ( CreateAnthropicChatCompletionTaskParamsTaskType, + check_create_anthropic_chat_completion_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_anthropic_chat_completion_task_params_model import CreateAnthropicChatCompletionTaskParamsModel @@ -41,9 +36,6 @@ class CreateAnthropicChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_anthropic_chat_completion_task_params_model import ( - CreateAnthropicChatCompletionTaskParamsModel, - ) model = self.model.to_dict() 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 8f02b483..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateAnthropicChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_asana_subtask_task_params.py b/rootly_sdk/models/create_asana_subtask_task_params.py index 85cca5fe..3c379f45 100644 --- a/rootly_sdk/models/create_asana_subtask_task_params.py +++ b/rootly_sdk/models/create_asana_subtask_task_params.py @@ -1,23 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_asana_subtask_task_params_dependency_direction import ( + CreateAsanaSubtaskTaskParamsDependencyDirection, check_create_asana_subtask_task_params_dependency_direction, ) -from ..models.create_asana_subtask_task_params_dependency_direction import ( - CreateAsanaSubtaskTaskParamsDependencyDirection, +from ..models.create_asana_subtask_task_params_task_type import ( + CreateAsanaSubtaskTaskParamsTaskType, + check_create_asana_subtask_task_params_task_type, ) -from ..models.create_asana_subtask_task_params_task_type import check_create_asana_subtask_task_params_task_type -from ..models.create_asana_subtask_task_params_task_type import CreateAsanaSubtaskTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_asana_subtask_task_params_completion import CreateAsanaSubtaskTaskParamsCompletion @@ -56,7 +53,6 @@ class CreateAsanaSubtaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_asana_subtask_task_params_completion import CreateAsanaSubtaskTaskParamsCompletion parent_task_id = self.parent_task_id 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 052d020d..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateAsanaSubtaskTaskParamsCompletion") diff --git a/rootly_sdk/models/create_asana_task_task_params.py b/rootly_sdk/models/create_asana_task_task_params.py index 5f20f8a4..173324ea 100644 --- a/rootly_sdk/models/create_asana_task_task_params.py +++ b/rootly_sdk/models/create_asana_task_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_asana_task_task_params_dependency_direction import ( + CreateAsanaTaskTaskParamsDependencyDirection, check_create_asana_task_task_params_dependency_direction, ) -from ..models.create_asana_task_task_params_dependency_direction import CreateAsanaTaskTaskParamsDependencyDirection -from ..models.create_asana_task_task_params_task_type import check_create_asana_task_task_params_task_type -from ..models.create_asana_task_task_params_task_type import CreateAsanaTaskTaskParamsTaskType +from ..models.create_asana_task_task_params_task_type import ( + CreateAsanaTaskTaskParamsTaskType, + check_create_asana_task_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_asana_task_task_params_completion import CreateAsanaTaskTaskParamsCompletion @@ -58,9 +57,6 @@ class CreateAsanaTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_asana_task_task_params_workspace import CreateAsanaTaskTaskParamsWorkspace - from ..models.create_asana_task_task_params_projects_item import CreateAsanaTaskTaskParamsProjectsItem - from ..models.create_asana_task_task_params_completion import CreateAsanaTaskTaskParamsCompletion workspace = self.workspace.to_dict() 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 b3877536..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateAsanaTaskTaskParamsCompletion") 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 6b185824..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateAsanaTaskTaskParamsProjectsItem") 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 941e42c3..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateAsanaTaskTaskParamsWorkspace") diff --git a/rootly_sdk/models/create_clickup_task_task_params.py b/rootly_sdk/models/create_clickup_task_task_params.py index 8fa3aaa1..9231249b 100644 --- a/rootly_sdk/models/create_clickup_task_task_params.py +++ b/rootly_sdk/models/create_clickup_task_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_clickup_task_task_params_task_type import ( + CreateClickupTaskTaskParamsTaskType, + check_create_clickup_task_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_clickup_task_task_params_task_type import check_create_clickup_task_task_params_task_type -from ..models.create_clickup_task_task_params_task_type import CreateClickupTaskTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_clickup_task_task_params_priority import CreateClickupTaskTaskParamsPriority @@ -47,7 +46,6 @@ class CreateClickupTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_clickup_task_task_params_priority import CreateClickupTaskTaskParamsPriority title = self.title 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 0a722b11..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateClickupTaskTaskParamsPriority") diff --git a/rootly_sdk/models/create_coda_page_task_params.py b/rootly_sdk/models/create_coda_page_task_params.py index 7339e65d..4d8fb030 100644 --- a/rootly_sdk/models/create_coda_page_task_params.py +++ b/rootly_sdk/models/create_coda_page_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_coda_page_task_params_task_type import ( + CreateCodaPageTaskParamsTaskType, + check_create_coda_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_coda_page_task_params_task_type import check_create_coda_page_task_params_task_type -from ..models.create_coda_page_task_params_task_type import CreateCodaPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_coda_page_task_params_doc import CreateCodaPageTaskParamsDoc from ..models.create_coda_page_task_params_template import CreateCodaPageTaskParamsTemplate @@ -48,8 +47,6 @@ class CreateCodaPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_coda_page_task_params_doc import CreateCodaPageTaskParamsDoc - from ..models.create_coda_page_task_params_template import CreateCodaPageTaskParamsTemplate title = self.title 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 85e9eec0..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateCodaPageTaskParamsDoc") 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 777981f7..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateCodaPageTaskParamsTemplate") diff --git a/rootly_sdk/models/create_confluence_page_task_params.py b/rootly_sdk/models/create_confluence_page_task_params.py index 5c6f9cb8..f1cb980e 100644 --- a/rootly_sdk/models/create_confluence_page_task_params.py +++ b/rootly_sdk/models/create_confluence_page_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_confluence_page_task_params_task_type import ( + CreateConfluencePageTaskParamsTaskType, + check_create_confluence_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_confluence_page_task_params_task_type import check_create_confluence_page_task_params_task_type -from ..models.create_confluence_page_task_params_task_type import CreateConfluencePageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_confluence_page_task_params_ancestor import CreateConfluencePageTaskParamsAncestor from ..models.create_confluence_page_task_params_integration import CreateConfluencePageTaskParamsIntegration @@ -57,10 +56,6 @@ class CreateConfluencePageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_confluence_page_task_params_space import CreateConfluencePageTaskParamsSpace - from ..models.create_confluence_page_task_params_ancestor import CreateConfluencePageTaskParamsAncestor - from ..models.create_confluence_page_task_params_integration import CreateConfluencePageTaskParamsIntegration - from ..models.create_confluence_page_task_params_template import CreateConfluencePageTaskParamsTemplate space = self.space.to_dict() 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 17d8b9cd..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateConfluencePageTaskParamsAncestor") 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 468ce780..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateConfluencePageTaskParamsIntegration") 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 fe39f021..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateConfluencePageTaskParamsSpace") 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 1e70b1f8..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateConfluencePageTaskParamsTemplate") diff --git a/rootly_sdk/models/create_datadog_notebook_task_params.py b/rootly_sdk/models/create_datadog_notebook_task_params.py index 8215b95e..02c1c0ae 100644 --- a/rootly_sdk/models/create_datadog_notebook_task_params.py +++ b/rootly_sdk/models/create_datadog_notebook_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_datadog_notebook_task_params_kind import ( + CreateDatadogNotebookTaskParamsKind, + check_create_datadog_notebook_task_params_kind, +) +from ..models.create_datadog_notebook_task_params_task_type import ( + CreateDatadogNotebookTaskParamsTaskType, + check_create_datadog_notebook_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_datadog_notebook_task_params_kind import check_create_datadog_notebook_task_params_kind -from ..models.create_datadog_notebook_task_params_kind import CreateDatadogNotebookTaskParamsKind -from ..models.create_datadog_notebook_task_params_task_type import check_create_datadog_notebook_task_params_task_type -from ..models.create_datadog_notebook_task_params_task_type import CreateDatadogNotebookTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_datadog_notebook_task_params_template import CreateDatadogNotebookTaskParamsTemplate @@ -45,7 +46,6 @@ class CreateDatadogNotebookTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_datadog_notebook_task_params_template import CreateDatadogNotebookTaskParamsTemplate title = self.title 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 0192ded7..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateDatadogNotebookTaskParamsTemplate") 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 81a2d1ec..415cf46f 100644 --- a/rootly_sdk/models/create_dropbox_paper_page_task_params.py +++ b/rootly_sdk/models/create_dropbox_paper_page_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_dropbox_paper_page_task_params_task_type import ( + CreateDropboxPaperPageTaskParamsTaskType, check_create_dropbox_paper_page_task_params_task_type, ) -from ..models.create_dropbox_paper_page_task_params_task_type import CreateDropboxPaperPageTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_dropbox_paper_page_task_params_namespace import CreateDropboxPaperPageTaskParamsNamespace @@ -48,10 +45,6 @@ class CreateDropboxPaperPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_dropbox_paper_page_task_params_parent_folder import ( - CreateDropboxPaperPageTaskParamsParentFolder, - ) - from ..models.create_dropbox_paper_page_task_params_namespace import CreateDropboxPaperPageTaskParamsNamespace title = self.title 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 c546d663..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateDropboxPaperPageTaskParamsNamespace") 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 191c7698..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateDropboxPaperPageTaskParamsParentFolder") diff --git a/rootly_sdk/models/create_edge_connector_action_body.py b/rootly_sdk/models/create_edge_connector_action_body.py index cc4f6750..72e8c61c 100644 --- a/rootly_sdk/models/create_edge_connector_action_body.py +++ b/rootly_sdk/models/create_edge_connector_action_body.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_edge_connector_action_body_action import CreateEdgeConnectorActionBodyAction @@ -29,7 +26,6 @@ class CreateEdgeConnectorActionBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_edge_connector_action_body_action import CreateEdgeConnectorActionBodyAction action: dict[str, Any] | Unset = UNSET if not isinstance(self.action, Unset): 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 18fe0b8a..f8fedce0 100644 --- a/rootly_sdk/models/create_edge_connector_action_body_action.py +++ b/rootly_sdk/models/create_edge_connector_action_body_action.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_edge_connector_action_body_action_action_type import ( + CreateEdgeConnectorActionBodyActionActionType, check_create_edge_connector_action_body_action_action_type, ) -from ..models.create_edge_connector_action_body_action_action_type import CreateEdgeConnectorActionBodyActionActionType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_edge_connector_action_body_action_metadata import CreateEdgeConnectorActionBodyActionMetadata @@ -37,9 +34,6 @@ class CreateEdgeConnectorActionBodyAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_edge_connector_action_body_action_metadata import ( - CreateEdgeConnectorActionBodyActionMetadata, - ) name = self.name 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 2d261e28..46132686 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_edge_connector_action_body_action_metadata_parameters_item import ( CreateEdgeConnectorActionBodyActionMetadataParametersItem, @@ -35,9 +32,6 @@ class CreateEdgeConnectorActionBodyActionMetadata: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_edge_connector_action_body_action_metadata_parameters_item import ( - CreateEdgeConnectorActionBodyActionMetadataParametersItem, - ) description = self.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 4ca50667..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.create_edge_connector_action_body_action_metadata_parameters_item_type import ( - check_create_edge_connector_action_body_action_metadata_parameters_item_type, -) from ..models.create_edge_connector_action_body_action_metadata_parameters_item_type import ( CreateEdgeConnectorActionBodyActionMetadataParametersItemType, + check_create_edge_connector_action_body_action_metadata_parameters_item_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="CreateEdgeConnectorActionBodyActionMetadataParametersItem") diff --git a/rootly_sdk/models/create_edge_connector_body.py b/rootly_sdk/models/create_edge_connector_body.py index f48afbb5..26b01395 100644 --- a/rootly_sdk/models/create_edge_connector_body.py +++ b/rootly_sdk/models/create_edge_connector_body.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.create_edge_connector_body_data import CreateEdgeConnectorBodyData @@ -28,7 +24,6 @@ class CreateEdgeConnectorBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_edge_connector_body_data import CreateEdgeConnectorBodyData data = self.data.to_dict() diff --git a/rootly_sdk/models/create_edge_connector_body_data.py b/rootly_sdk/models/create_edge_connector_body_data.py index b1f7f3d4..a9d31183 100644 --- a/rootly_sdk/models/create_edge_connector_body_data.py +++ b/rootly_sdk/models/create_edge_connector_body_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.create_edge_connector_body_data_type import check_create_edge_connector_body_data_type -from ..models.create_edge_connector_body_data_type import CreateEdgeConnectorBodyDataType -from typing import cast +from ..models.create_edge_connector_body_data_type import ( + CreateEdgeConnectorBodyDataType, + check_create_edge_connector_body_data_type, +) if TYPE_CHECKING: from ..models.create_edge_connector_body_data_attributes import CreateEdgeConnectorBodyDataAttributes @@ -32,7 +31,6 @@ class CreateEdgeConnectorBodyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_edge_connector_body_data_attributes import CreateEdgeConnectorBodyDataAttributes type_: str = self.type_ 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 79b49889..5731ed4c 100644 --- a/rootly_sdk/models/create_edge_connector_body_data_attributes.py +++ b/rootly_sdk/models/create_edge_connector_body_data_attributes.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_edge_connector_body_data_attributes_status import ( + CreateEdgeConnectorBodyDataAttributesStatus, check_create_edge_connector_body_data_attributes_status, ) -from ..models.create_edge_connector_body_data_attributes_status import CreateEdgeConnectorBodyDataAttributesStatus from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_edge_connector_body_data_attributes_filters import CreateEdgeConnectorBodyDataAttributesFilters @@ -42,9 +39,6 @@ class CreateEdgeConnectorBodyDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_edge_connector_body_data_attributes_filters import ( - CreateEdgeConnectorBodyDataAttributesFilters, - ) name = self.name diff --git a/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py b/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py index caf1ea15..14497423 100644 --- a/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py +++ b/rootly_sdk/models/create_edge_connector_body_data_attributes_filters.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CreateEdgeConnectorBodyDataAttributesFilters") diff --git a/rootly_sdk/models/create_github_issue_task_params.py b/rootly_sdk/models/create_github_issue_task_params.py index af49a7d7..26f28b7a 100644 --- a/rootly_sdk/models/create_github_issue_task_params.py +++ b/rootly_sdk/models/create_github_issue_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_github_issue_task_params_task_type import ( + CreateGithubIssueTaskParamsTaskType, + check_create_github_issue_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_github_issue_task_params_task_type import check_create_github_issue_task_params_task_type -from ..models.create_github_issue_task_params_task_type import CreateGithubIssueTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - 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 @@ -48,9 +47,6 @@ class CreateGithubIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_github_issue_task_params_labels_item import CreateGithubIssueTaskParamsLabelsItem - from ..models.create_github_issue_task_params_issue_type import CreateGithubIssueTaskParamsIssueType - from ..models.create_github_issue_task_params_repository import CreateGithubIssueTaskParamsRepository title = self.title 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 index 5056a6ac..8dcdb1a0 100644 --- a/rootly_sdk/models/create_github_issue_task_params_issue_type.py +++ b/rootly_sdk/models/create_github_issue_task_params_issue_type.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGithubIssueTaskParamsIssueType") 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 index e3a9b383..ae8e2abb 100644 --- a/rootly_sdk/models/create_github_issue_task_params_labels_item.py +++ b/rootly_sdk/models/create_github_issue_task_params_labels_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGithubIssueTaskParamsLabelsItem") 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 ba1e5905..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGithubIssueTaskParamsRepository") diff --git a/rootly_sdk/models/create_gitlab_issue_task_params.py b/rootly_sdk/models/create_gitlab_issue_task_params.py index b95a3741..f8d4741b 100644 --- a/rootly_sdk/models/create_gitlab_issue_task_params.py +++ b/rootly_sdk/models/create_gitlab_issue_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_gitlab_issue_task_params_issue_type import ( + CreateGitlabIssueTaskParamsIssueType, + check_create_gitlab_issue_task_params_issue_type, +) +from ..models.create_gitlab_issue_task_params_task_type import ( + CreateGitlabIssueTaskParamsTaskType, + check_create_gitlab_issue_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_gitlab_issue_task_params_issue_type import check_create_gitlab_issue_task_params_issue_type -from ..models.create_gitlab_issue_task_params_issue_type import CreateGitlabIssueTaskParamsIssueType -from ..models.create_gitlab_issue_task_params_task_type import check_create_gitlab_issue_task_params_task_type -from ..models.create_gitlab_issue_task_params_task_type import CreateGitlabIssueTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_gitlab_issue_task_params_repository import CreateGitlabIssueTaskParamsRepository @@ -45,7 +46,6 @@ class CreateGitlabIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_gitlab_issue_task_params_repository import CreateGitlabIssueTaskParamsRepository title = self.title 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 9c8be69f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGitlabIssueTaskParamsRepository") 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 7f37e176..e2ffda6c 100644 --- a/rootly_sdk/models/create_go_to_meeting_task_params.py +++ b/rootly_sdk/models/create_go_to_meeting_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_go_to_meeting_task_params_conference_call_info import ( + CreateGoToMeetingTaskParamsConferenceCallInfo, check_create_go_to_meeting_task_params_conference_call_info, ) -from ..models.create_go_to_meeting_task_params_conference_call_info import CreateGoToMeetingTaskParamsConferenceCallInfo -from ..models.create_go_to_meeting_task_params_task_type import check_create_go_to_meeting_task_params_task_type -from ..models.create_go_to_meeting_task_params_task_type import CreateGoToMeetingTaskParamsTaskType +from ..models.create_go_to_meeting_task_params_task_type import ( + CreateGoToMeetingTaskParamsTaskType, + check_create_go_to_meeting_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_go_to_meeting_task_params_post_to_slack_channels_item import ( @@ -47,9 +46,6 @@ class CreateGoToMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_go_to_meeting_task_params_post_to_slack_channels_item import ( - CreateGoToMeetingTaskParamsPostToSlackChannelsItem, - ) subject = self.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 500cd5cf..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGoToMeetingTaskParamsPostToSlackChannelsItem") 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 7ab438e6..0ea08aee 100644 --- a/rootly_sdk/models/create_google_calendar_event_task_params.py +++ b/rootly_sdk/models/create_google_calendar_event_task_params.py @@ -1,25 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.create_google_calendar_event_task_params_conference_solution_key import ( - check_create_google_calendar_event_task_params_conference_solution_key, -) from ..models.create_google_calendar_event_task_params_conference_solution_key import ( CreateGoogleCalendarEventTaskParamsConferenceSolutionKey, + check_create_google_calendar_event_task_params_conference_solution_key, ) from ..models.create_google_calendar_event_task_params_task_type import ( + CreateGoogleCalendarEventTaskParamsTaskType, check_create_google_calendar_event_task_params_task_type, ) -from ..models.create_google_calendar_event_task_params_task_type import CreateGoogleCalendarEventTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_google_calendar_event_task_params_post_to_slack_channels_item import ( @@ -74,9 +69,6 @@ class CreateGoogleCalendarEventTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_google_calendar_event_task_params_post_to_slack_channels_item import ( - CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem, - ) days_until_meeting = self.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 1ee0ac36..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGoogleCalendarEventTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/create_google_chat_space_task_params.py b/rootly_sdk/models/create_google_chat_space_task_params.py index 8e3dab24..ff6a09f3 100644 --- a/rootly_sdk/models/create_google_chat_space_task_params.py +++ b/rootly_sdk/models/create_google_chat_space_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_google_chat_space_task_params_task_type import ( + CreateGoogleChatSpaceTaskParamsTaskType, + check_create_google_chat_space_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_google_chat_space_task_params_task_type import check_create_google_chat_space_task_params_task_type -from ..models.create_google_chat_space_task_params_task_type import CreateGoogleChatSpaceTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CreateGoogleChatSpaceTaskParams") 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 425c7a82..3b931d6f 100644 --- a/rootly_sdk/models/create_google_docs_page_task_params.py +++ b/rootly_sdk/models/create_google_docs_page_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_google_docs_page_task_params_task_type import ( + CreateGoogleDocsPageTaskParamsTaskType, + check_create_google_docs_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_google_docs_page_task_params_task_type import check_create_google_docs_page_task_params_task_type -from ..models.create_google_docs_page_task_params_task_type import CreateGoogleDocsPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_google_docs_page_task_params_drive import CreateGoogleDocsPageTaskParamsDrive from ..models.create_google_docs_page_task_params_parent_folder import CreateGoogleDocsPageTaskParamsParentFolder @@ -52,10 +51,6 @@ class CreateGoogleDocsPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_google_docs_page_task_params_drive import CreateGoogleDocsPageTaskParamsDrive - from ..models.create_google_docs_page_task_params_parent_folder import ( - CreateGoogleDocsPageTaskParamsParentFolder, - ) title = self.title 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 2cbacae9..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGoogleDocsPageTaskParamsDrive") 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 fa65cf49..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGoogleDocsPageTaskParamsParentFolder") 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 716c87cc..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,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_google_docs_permissions_task_params_task_type import ( + CreateGoogleDocsPermissionsTaskParamsTaskType, check_create_google_docs_permissions_task_params_task_type, ) -from ..models.create_google_docs_permissions_task_params_task_type import CreateGoogleDocsPermissionsTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="CreateGoogleDocsPermissionsTaskParams") 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 907dc533..ad8a81b6 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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.create_google_gemini_chat_completion_task_params_task_type import ( - check_create_google_gemini_chat_completion_task_params_task_type, -) from ..models.create_google_gemini_chat_completion_task_params_task_type import ( CreateGoogleGeminiChatCompletionTaskParamsTaskType, + check_create_google_gemini_chat_completion_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_google_gemini_chat_completion_task_params_model import ( @@ -43,9 +38,6 @@ class CreateGoogleGeminiChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_google_gemini_chat_completion_task_params_model import ( - CreateGoogleGeminiChatCompletionTaskParamsModel, - ) model = self.model.to_dict() 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 1567876f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGoogleGeminiChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_google_meeting_task_params.py b/rootly_sdk/models/create_google_meeting_task_params.py index 137bb791..2bf70afb 100644 --- a/rootly_sdk/models/create_google_meeting_task_params.py +++ b/rootly_sdk/models/create_google_meeting_task_params.py @@ -1,27 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.create_google_meeting_task_params_conference_solution_key import ( - check_create_google_meeting_task_params_conference_solution_key, -) from ..models.create_google_meeting_task_params_conference_solution_key import ( CreateGoogleMeetingTaskParamsConferenceSolutionKey, + check_create_google_meeting_task_params_conference_solution_key, ) from ..models.create_google_meeting_task_params_recording_mode import ( + CreateGoogleMeetingTaskParamsRecordingMode, check_create_google_meeting_task_params_recording_mode, ) -from ..models.create_google_meeting_task_params_recording_mode import CreateGoogleMeetingTaskParamsRecordingMode -from ..models.create_google_meeting_task_params_task_type import check_create_google_meeting_task_params_task_type -from ..models.create_google_meeting_task_params_task_type import CreateGoogleMeetingTaskParamsTaskType +from ..models.create_google_meeting_task_params_task_type import ( + CreateGoogleMeetingTaskParamsTaskType, + check_create_google_meeting_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_google_meeting_task_params_post_to_slack_channels_item import ( @@ -60,9 +57,6 @@ class CreateGoogleMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_google_meeting_task_params_post_to_slack_channels_item import ( - CreateGoogleMeetingTaskParamsPostToSlackChannelsItem, - ) summary: None | str summary = self.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 22b44767..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateGoogleMeetingTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/create_incident_postmortem_task_params.py b/rootly_sdk/models/create_incident_postmortem_task_params.py index 48f794d8..8c8d0253 100644 --- a/rootly_sdk/models/create_incident_postmortem_task_params.py +++ b/rootly_sdk/models/create_incident_postmortem_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_incident_postmortem_task_params_task_type import ( + CreateIncidentPostmortemTaskParamsTaskType, check_create_incident_postmortem_task_params_task_type, ) -from ..models.create_incident_postmortem_task_params_task_type import CreateIncidentPostmortemTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_incident_postmortem_task_params_template_type_0 import ( 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 15ac052e..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateIncidentPostmortemTaskParamsTemplateType0") diff --git a/rootly_sdk/models/create_incident_task_params.py b/rootly_sdk/models/create_incident_task_params.py index e0f9276b..0431e24c 100644 --- a/rootly_sdk/models/create_incident_task_params.py +++ b/rootly_sdk/models/create_incident_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_incident_task_params_task_type import ( + CreateIncidentTaskParamsTaskType, + check_create_incident_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_incident_task_params_task_type import check_create_incident_task_params_task_type -from ..models.create_incident_task_params_task_type import CreateIncidentTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CreateIncidentTaskParams") diff --git a/rootly_sdk/models/create_jira_issue_task_params.py b/rootly_sdk/models/create_jira_issue_task_params.py index bee594a5..83f02914 100644 --- a/rootly_sdk/models/create_jira_issue_task_params.py +++ b/rootly_sdk/models/create_jira_issue_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_jira_issue_task_params_task_type import ( + CreateJiraIssueTaskParamsTaskType, + check_create_jira_issue_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_jira_issue_task_params_task_type import check_create_jira_issue_task_params_task_type -from ..models.create_jira_issue_task_params_task_type import CreateJiraIssueTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_jira_issue_task_params_integration import CreateJiraIssueTaskParamsIntegration from ..models.create_jira_issue_task_params_issue_type import CreateJiraIssueTaskParamsIssueType @@ -62,10 +61,6 @@ class CreateJiraIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_jira_issue_task_params_integration import CreateJiraIssueTaskParamsIntegration - from ..models.create_jira_issue_task_params_status import CreateJiraIssueTaskParamsStatus - from ..models.create_jira_issue_task_params_priority import CreateJiraIssueTaskParamsPriority - from ..models.create_jira_issue_task_params_issue_type import CreateJiraIssueTaskParamsIssueType title = self.title 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 9e5542c6..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJiraIssueTaskParamsIntegration") 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 fcf62409..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJiraIssueTaskParamsIssueType") 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 eb94a10f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJiraIssueTaskParamsPriority") 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 8bfcf1fc..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJiraIssueTaskParamsStatus") diff --git a/rootly_sdk/models/create_jira_subtask_task_params.py b/rootly_sdk/models/create_jira_subtask_task_params.py index cdfe549c..f94a8ba6 100644 --- a/rootly_sdk/models/create_jira_subtask_task_params.py +++ b/rootly_sdk/models/create_jira_subtask_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_jira_subtask_task_params_task_type import ( + CreateJiraSubtaskTaskParamsTaskType, + check_create_jira_subtask_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_jira_subtask_task_params_task_type import check_create_jira_subtask_task_params_task_type -from ..models.create_jira_subtask_task_params_task_type import CreateJiraSubtaskTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_jira_subtask_task_params_integration import CreateJiraSubtaskTaskParamsIntegration from ..models.create_jira_subtask_task_params_priority import CreateJiraSubtaskTaskParamsPriority @@ -64,12 +63,6 @@ class CreateJiraSubtaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_jira_subtask_task_params_status import CreateJiraSubtaskTaskParamsStatus - from ..models.create_jira_subtask_task_params_priority import CreateJiraSubtaskTaskParamsPriority - from ..models.create_jira_subtask_task_params_subtask_issue_type import ( - CreateJiraSubtaskTaskParamsSubtaskIssueType, - ) - from ..models.create_jira_subtask_task_params_integration import CreateJiraSubtaskTaskParamsIntegration project_key = self.project_key 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 735db331..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJiraSubtaskTaskParamsIntegration") 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 6ea34c21..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJiraSubtaskTaskParamsPriority") 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 a517884d..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJiraSubtaskTaskParamsStatus") 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 95aa4a07..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJiraSubtaskTaskParamsSubtaskIssueType") diff --git a/rootly_sdk/models/create_jsmops_alert_task_params.py b/rootly_sdk/models/create_jsmops_alert_task_params.py index d7232794..5fa7699e 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.create_jsmops_alert_task_params_priority import check_create_jsmops_alert_task_params_priority -from ..models.create_jsmops_alert_task_params_priority import CreateJsmopsAlertTaskParamsPriority -from ..models.create_jsmops_alert_task_params_task_type import check_create_jsmops_alert_task_params_task_type -from ..models.create_jsmops_alert_task_params_task_type import CreateJsmopsAlertTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - 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 @@ -53,10 +54,6 @@ class CreateJsmopsAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_jsmops_alert_task_params_users_item import CreateJsmopsAlertTaskParamsUsersItem - from ..models.create_jsmops_alert_task_params_schedules_item import CreateJsmopsAlertTaskParamsSchedulesItem - from ..models.create_jsmops_alert_task_params_escalations_item import CreateJsmopsAlertTaskParamsEscalationsItem - from ..models.create_jsmops_alert_task_params_teams_item import CreateJsmopsAlertTaskParamsTeamsItem message = self.message 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 index d00c5f04..933c82bf 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params_escalations_item.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params_escalations_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsEscalationsItem") 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 index d189e271..0ab25c3f 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params_schedules_item.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params_schedules_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsSchedulesItem") 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 index e038c81b..802141da 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params_teams_item.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params_teams_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsTeamsItem") 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 index cb721771..92d7c0a2 100644 --- a/rootly_sdk/models/create_jsmops_alert_task_params_users_item.py +++ b/rootly_sdk/models/create_jsmops_alert_task_params_users_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateJsmopsAlertTaskParamsUsersItem") 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 60844aa8..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,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - from ..models.create_linear_issue_comment_task_params_task_type import ( + CreateLinearIssueCommentTaskParamsTaskType, check_create_linear_issue_comment_task_params_task_type, ) -from ..models.create_linear_issue_comment_task_params_task_type import CreateLinearIssueCommentTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="CreateLinearIssueCommentTaskParams") diff --git a/rootly_sdk/models/create_linear_issue_task_params.py b/rootly_sdk/models/create_linear_issue_task_params.py index e155eb27..df69a9e7 100644 --- a/rootly_sdk/models/create_linear_issue_task_params.py +++ b/rootly_sdk/models/create_linear_issue_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_linear_issue_task_params_task_type import ( + CreateLinearIssueTaskParamsTaskType, + check_create_linear_issue_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_linear_issue_task_params_task_type import check_create_linear_issue_task_params_task_type -from ..models.create_linear_issue_task_params_task_type import CreateLinearIssueTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_linear_issue_task_params_labels_item import CreateLinearIssueTaskParamsLabelsItem from ..models.create_linear_issue_task_params_priority import CreateLinearIssueTaskParamsPriority @@ -54,11 +53,6 @@ class CreateLinearIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_linear_issue_task_params_labels_item import CreateLinearIssueTaskParamsLabelsItem - from ..models.create_linear_issue_task_params_team import CreateLinearIssueTaskParamsTeam - from ..models.create_linear_issue_task_params_state import CreateLinearIssueTaskParamsState - from ..models.create_linear_issue_task_params_priority import CreateLinearIssueTaskParamsPriority - from ..models.create_linear_issue_task_params_project import CreateLinearIssueTaskParamsProject title = self.title 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 577cdd5e..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateLinearIssueTaskParamsLabelsItem") 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 ebc8f641..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateLinearIssueTaskParamsPriority") 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 a98ebe4e..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateLinearIssueTaskParamsProject") 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 4d14709b..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateLinearIssueTaskParamsState") 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 e70c46be..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateLinearIssueTaskParamsTeam") 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 eccd0009..aa6a3465 100644 --- a/rootly_sdk/models/create_linear_subtask_issue_task_params.py +++ b/rootly_sdk/models/create_linear_subtask_issue_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_linear_subtask_issue_task_params_task_type import ( + CreateLinearSubtaskIssueTaskParamsTaskType, check_create_linear_subtask_issue_task_params_task_type, ) -from ..models.create_linear_subtask_issue_task_params_task_type import CreateLinearSubtaskIssueTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_linear_subtask_issue_task_params_labels_item import ( @@ -54,11 +51,6 @@ class CreateLinearSubtaskIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_linear_subtask_issue_task_params_state import CreateLinearSubtaskIssueTaskParamsState - from ..models.create_linear_subtask_issue_task_params_priority import CreateLinearSubtaskIssueTaskParamsPriority - from ..models.create_linear_subtask_issue_task_params_labels_item import ( - CreateLinearSubtaskIssueTaskParamsLabelsItem, - ) parent_issue_id = self.parent_issue_id 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 97ae6ffc..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateLinearSubtaskIssueTaskParamsLabelsItem") 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 9bf8e3b4..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateLinearSubtaskIssueTaskParamsPriority") 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 f39c6268..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateLinearSubtaskIssueTaskParamsState") 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 282d9344..a52cb327 100644 --- a/rootly_sdk/models/create_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_channel_task_params.py @@ -1,23 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_microsoft_teams_channel_task_params_private import ( + CreateMicrosoftTeamsChannelTaskParamsPrivate, check_create_microsoft_teams_channel_task_params_private, ) -from ..models.create_microsoft_teams_channel_task_params_private import CreateMicrosoftTeamsChannelTaskParamsPrivate from ..models.create_microsoft_teams_channel_task_params_task_type import ( + CreateMicrosoftTeamsChannelTaskParamsTaskType, check_create_microsoft_teams_channel_task_params_task_type, ) -from ..models.create_microsoft_teams_channel_task_params_task_type import CreateMicrosoftTeamsChannelTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_microsoft_teams_channel_task_params_team import CreateMicrosoftTeamsChannelTaskParamsTeam @@ -45,7 +42,6 @@ class CreateMicrosoftTeamsChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_microsoft_teams_channel_task_params_team import CreateMicrosoftTeamsChannelTaskParamsTeam team = self.team.to_dict() 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 2c52dda6..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateMicrosoftTeamsChannelTaskParamsTeam") 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 c200b790..28cf2434 100644 --- a/rootly_sdk/models/create_microsoft_teams_chat_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_chat_task_params.py @@ -1,23 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_microsoft_teams_chat_task_params_chat_type import ( + CreateMicrosoftTeamsChatTaskParamsChatType, check_create_microsoft_teams_chat_task_params_chat_type, ) -from ..models.create_microsoft_teams_chat_task_params_chat_type import CreateMicrosoftTeamsChatTaskParamsChatType from ..models.create_microsoft_teams_chat_task_params_task_type import ( + CreateMicrosoftTeamsChatTaskParamsTaskType, check_create_microsoft_teams_chat_task_params_task_type, ) -from ..models.create_microsoft_teams_chat_task_params_task_type import CreateMicrosoftTeamsChatTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_microsoft_teams_chat_task_params_members_item import ( @@ -45,9 +42,6 @@ class CreateMicrosoftTeamsChatTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_microsoft_teams_chat_task_params_members_item import ( - CreateMicrosoftTeamsChatTaskParamsMembersItem, - ) members = [] for members_item_data in self.members: 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 77100602..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateMicrosoftTeamsChatTaskParamsMembersItem") 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 ff526dde..02fb935f 100644 --- a/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py +++ b/rootly_sdk/models/create_microsoft_teams_meeting_task_params.py @@ -1,25 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.create_microsoft_teams_meeting_task_params_recording_mode import ( - check_create_microsoft_teams_meeting_task_params_recording_mode, -) from ..models.create_microsoft_teams_meeting_task_params_recording_mode import ( CreateMicrosoftTeamsMeetingTaskParamsRecordingMode, + check_create_microsoft_teams_meeting_task_params_recording_mode, ) from ..models.create_microsoft_teams_meeting_task_params_task_type import ( + CreateMicrosoftTeamsMeetingTaskParamsTaskType, check_create_microsoft_teams_meeting_task_params_task_type, ) -from ..models.create_microsoft_teams_meeting_task_params_task_type import CreateMicrosoftTeamsMeetingTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_microsoft_teams_meeting_task_params_post_to_slack_channels_item import ( @@ -55,9 +50,6 @@ class CreateMicrosoftTeamsMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_microsoft_teams_meeting_task_params_post_to_slack_channels_item import ( - CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem, - ) name = self.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 cac10453..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateMicrosoftTeamsMeetingTaskParamsPostToSlackChannelsItem") 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 24d757d0..2747acd8 100644 --- a/rootly_sdk/models/create_mistral_chat_completion_task_params.py +++ b/rootly_sdk/models/create_mistral_chat_completion_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_mistral_chat_completion_task_params_task_type import ( + CreateMistralChatCompletionTaskParamsTaskType, check_create_mistral_chat_completion_task_params_task_type, ) -from ..models.create_mistral_chat_completion_task_params_task_type import CreateMistralChatCompletionTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_mistral_chat_completion_task_params_model import CreateMistralChatCompletionTaskParamsModel @@ -45,7 +42,6 @@ class CreateMistralChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_mistral_chat_completion_task_params_model import CreateMistralChatCompletionTaskParamsModel model = self.model.to_dict() 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 33ddb6a8..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateMistralChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_motion_task_task_params.py b/rootly_sdk/models/create_motion_task_task_params.py index 63f94af2..f266e09a 100644 --- a/rootly_sdk/models/create_motion_task_task_params.py +++ b/rootly_sdk/models/create_motion_task_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_motion_task_task_params_task_type import ( + CreateMotionTaskTaskParamsTaskType, + check_create_motion_task_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_motion_task_task_params_task_type import check_create_motion_task_task_params_task_type -from ..models.create_motion_task_task_params_task_type import CreateMotionTaskTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_motion_task_task_params_priority import CreateMotionTaskTaskParamsPriority from ..models.create_motion_task_task_params_project import CreateMotionTaskTaskParamsProject @@ -52,10 +51,6 @@ class CreateMotionTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_motion_task_task_params_workspace import CreateMotionTaskTaskParamsWorkspace - from ..models.create_motion_task_task_params_project import CreateMotionTaskTaskParamsProject - from ..models.create_motion_task_task_params_priority import CreateMotionTaskTaskParamsPriority - from ..models.create_motion_task_task_params_status import CreateMotionTaskTaskParamsStatus workspace = self.workspace.to_dict() 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 122da765..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateMotionTaskTaskParamsPriority") 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 435124ef..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateMotionTaskTaskParamsProject") 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 8a4a7433..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateMotionTaskTaskParamsStatus") 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 52a930b5..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateMotionTaskTaskParamsWorkspace") diff --git a/rootly_sdk/models/create_notion_page_task_params.py b/rootly_sdk/models/create_notion_page_task_params.py index cec234df..aa2d8930 100644 --- a/rootly_sdk/models/create_notion_page_task_params.py +++ b/rootly_sdk/models/create_notion_page_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_notion_page_task_params_task_type import ( + CreateNotionPageTaskParamsTaskType, + check_create_notion_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_notion_page_task_params_task_type import check_create_notion_page_task_params_task_type -from ..models.create_notion_page_task_params_task_type import CreateNotionPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_notion_page_task_params_parent_page import CreateNotionPageTaskParamsParentPage @@ -46,7 +45,6 @@ class CreateNotionPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_notion_page_task_params_parent_page import CreateNotionPageTaskParamsParentPage title = self.title 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 b23d3737..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateNotionPageTaskParamsParentPage") 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 747ac536..fbe1281e 100644 --- a/rootly_sdk/models/create_openai_chat_completion_task_params.py +++ b/rootly_sdk/models/create_openai_chat_completion_task_params.py @@ -1,31 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.create_openai_chat_completion_task_params_reasoning_effort import ( - check_create_openai_chat_completion_task_params_reasoning_effort, -) from ..models.create_openai_chat_completion_task_params_reasoning_effort import ( CreateOpenaiChatCompletionTaskParamsReasoningEffort, -) -from ..models.create_openai_chat_completion_task_params_reasoning_summary import ( - check_create_openai_chat_completion_task_params_reasoning_summary, + check_create_openai_chat_completion_task_params_reasoning_effort, ) from ..models.create_openai_chat_completion_task_params_reasoning_summary import ( CreateOpenaiChatCompletionTaskParamsReasoningSummary, + check_create_openai_chat_completion_task_params_reasoning_summary, ) from ..models.create_openai_chat_completion_task_params_task_type import ( + CreateOpenaiChatCompletionTaskParamsTaskType, check_create_openai_chat_completion_task_params_task_type, ) -from ..models.create_openai_chat_completion_task_params_task_type import CreateOpenaiChatCompletionTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_openai_chat_completion_task_params_model import CreateOpenaiChatCompletionTaskParamsModel @@ -63,7 +56,6 @@ class CreateOpenaiChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_openai_chat_completion_task_params_model import CreateOpenaiChatCompletionTaskParamsModel model = self.model.to_dict() 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 26538120..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateOpenaiChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_opsgenie_alert_task_params.py b/rootly_sdk/models/create_opsgenie_alert_task_params.py index 3c33c358..b1e7967b 100644 --- a/rootly_sdk/models/create_opsgenie_alert_task_params.py +++ b/rootly_sdk/models/create_opsgenie_alert_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_opsgenie_alert_task_params_priority import ( + CreateOpsgenieAlertTaskParamsPriority, + check_create_opsgenie_alert_task_params_priority, +) +from ..models.create_opsgenie_alert_task_params_task_type import ( + CreateOpsgenieAlertTaskParamsTaskType, + check_create_opsgenie_alert_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_opsgenie_alert_task_params_priority import check_create_opsgenie_alert_task_params_priority -from ..models.create_opsgenie_alert_task_params_priority import CreateOpsgenieAlertTaskParamsPriority -from ..models.create_opsgenie_alert_task_params_task_type import check_create_opsgenie_alert_task_params_task_type -from ..models.create_opsgenie_alert_task_params_task_type import CreateOpsgenieAlertTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_opsgenie_alert_task_params_escalations_item import CreateOpsgenieAlertTaskParamsEscalationsItem from ..models.create_opsgenie_alert_task_params_schedules_item import CreateOpsgenieAlertTaskParamsSchedulesItem @@ -53,12 +54,6 @@ class CreateOpsgenieAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_opsgenie_alert_task_params_users_item import CreateOpsgenieAlertTaskParamsUsersItem - from ..models.create_opsgenie_alert_task_params_teams_item import CreateOpsgenieAlertTaskParamsTeamsItem - from ..models.create_opsgenie_alert_task_params_schedules_item import CreateOpsgenieAlertTaskParamsSchedulesItem - from ..models.create_opsgenie_alert_task_params_escalations_item import ( - CreateOpsgenieAlertTaskParamsEscalationsItem, - ) message = self.message 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 5c2e34df..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateOpsgenieAlertTaskParamsEscalationsItem") 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 28508062..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateOpsgenieAlertTaskParamsSchedulesItem") 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 27fb2ceb..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateOpsgenieAlertTaskParamsTeamsItem") 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 510ab306..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateOpsgenieAlertTaskParamsUsersItem") diff --git a/rootly_sdk/models/create_outlook_event_task_params.py b/rootly_sdk/models/create_outlook_event_task_params.py index 6b951b1d..a5bcdd67 100644 --- a/rootly_sdk/models/create_outlook_event_task_params.py +++ b/rootly_sdk/models/create_outlook_event_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_outlook_event_task_params_task_type import ( + CreateOutlookEventTaskParamsTaskType, + check_create_outlook_event_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_outlook_event_task_params_task_type import check_create_outlook_event_task_params_task_type -from ..models.create_outlook_event_task_params_task_type import CreateOutlookEventTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_outlook_event_task_params_calendar import CreateOutlookEventTaskParamsCalendar from ..models.create_outlook_event_task_params_post_to_slack_channels_item import ( @@ -58,10 +57,6 @@ class CreateOutlookEventTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_outlook_event_task_params_calendar import CreateOutlookEventTaskParamsCalendar - from ..models.create_outlook_event_task_params_post_to_slack_channels_item import ( - CreateOutlookEventTaskParamsPostToSlackChannelsItem, - ) calendar = self.calendar.to_dict() 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 1ff6cff1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateOutlookEventTaskParamsCalendar") 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 84b0e936..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateOutlookEventTaskParamsPostToSlackChannelsItem") 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 8125b9db..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,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - from ..models.create_pagerduty_status_update_task_params_task_type import ( + CreatePagerdutyStatusUpdateTaskParamsTaskType, check_create_pagerduty_status_update_task_params_task_type, ) -from ..models.create_pagerduty_status_update_task_params_task_type import CreatePagerdutyStatusUpdateTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="CreatePagerdutyStatusUpdateTaskParams") diff --git a/rootly_sdk/models/create_pagertree_alert_task_params.py b/rootly_sdk/models/create_pagertree_alert_task_params.py index 7e3df8c9..599a1b7b 100644 --- a/rootly_sdk/models/create_pagertree_alert_task_params.py +++ b/rootly_sdk/models/create_pagertree_alert_task_params.py @@ -1,22 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_pagertree_alert_task_params_severity import ( + CreatePagertreeAlertTaskParamsSeverity, + check_create_pagertree_alert_task_params_severity, +) +from ..models.create_pagertree_alert_task_params_task_type import ( + CreatePagertreeAlertTaskParamsTaskType, + check_create_pagertree_alert_task_params_task_type, +) +from ..models.create_pagertree_alert_task_params_urgency import ( + CreatePagertreeAlertTaskParamsUrgency, + check_create_pagertree_alert_task_params_urgency, +) from ..types import UNSET, Unset -from ..models.create_pagertree_alert_task_params_severity import check_create_pagertree_alert_task_params_severity -from ..models.create_pagertree_alert_task_params_severity import CreatePagertreeAlertTaskParamsSeverity -from ..models.create_pagertree_alert_task_params_task_type import check_create_pagertree_alert_task_params_task_type -from ..models.create_pagertree_alert_task_params_task_type import CreatePagertreeAlertTaskParamsTaskType -from ..models.create_pagertree_alert_task_params_urgency import check_create_pagertree_alert_task_params_urgency -from ..models.create_pagertree_alert_task_params_urgency import CreatePagertreeAlertTaskParamsUrgency -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_pagertree_alert_task_params_teams_item import CreatePagertreeAlertTaskParamsTeamsItem from ..models.create_pagertree_alert_task_params_users_item import CreatePagertreeAlertTaskParamsUsersItem @@ -50,8 +53,6 @@ class CreatePagertreeAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_pagertree_alert_task_params_teams_item import CreatePagertreeAlertTaskParamsTeamsItem - from ..models.create_pagertree_alert_task_params_users_item import CreatePagertreeAlertTaskParamsUsersItem task_type: str | Unset = UNSET if not isinstance(self.task_type, 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 e8b83efe..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreatePagertreeAlertTaskParamsTeamsItem") 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 c88dafcb..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreatePagertreeAlertTaskParamsUsersItem") diff --git a/rootly_sdk/models/create_quip_page_task_params.py b/rootly_sdk/models/create_quip_page_task_params.py index c70cc0b3..9265d881 100644 --- a/rootly_sdk/models/create_quip_page_task_params.py +++ b/rootly_sdk/models/create_quip_page_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_quip_page_task_params_task_type import ( + CreateQuipPageTaskParamsTaskType, + check_create_quip_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_quip_page_task_params_task_type import check_create_quip_page_task_params_task_type -from ..models.create_quip_page_task_params_task_type import CreateQuipPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CreateQuipPageTaskParams") 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 08960098..0f10232b 100644 --- a/rootly_sdk/models/create_service_now_incident_task_params.py +++ b/rootly_sdk/models/create_service_now_incident_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_service_now_incident_task_params_task_type import ( + CreateServiceNowIncidentTaskParamsTaskType, check_create_service_now_incident_task_params_task_type, ) -from ..models.create_service_now_incident_task_params_task_type import CreateServiceNowIncidentTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_service_now_incident_task_params_completion import CreateServiceNowIncidentTaskParamsCompletion @@ -45,10 +42,6 @@ class CreateServiceNowIncidentTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_service_now_incident_task_params_completion import ( - CreateServiceNowIncidentTaskParamsCompletion, - ) - from ..models.create_service_now_incident_task_params_priority import CreateServiceNowIncidentTaskParamsPriority title = self.title 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 0424ecab..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateServiceNowIncidentTaskParamsCompletion") 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 534a9ff4..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateServiceNowIncidentTaskParamsPriority") diff --git a/rootly_sdk/models/create_sharepoint_page_task_params.py b/rootly_sdk/models/create_sharepoint_page_task_params.py index a80751c8..f76d8f61 100644 --- a/rootly_sdk/models/create_sharepoint_page_task_params.py +++ b/rootly_sdk/models/create_sharepoint_page_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_sharepoint_page_task_params_task_type import ( + CreateSharepointPageTaskParamsTaskType, + check_create_sharepoint_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_sharepoint_page_task_params_task_type import check_create_sharepoint_page_task_params_task_type -from ..models.create_sharepoint_page_task_params_task_type import CreateSharepointPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_sharepoint_page_task_params_drive import CreateSharepointPageTaskParamsDrive from ..models.create_sharepoint_page_task_params_parent_folder import CreateSharepointPageTaskParamsParentFolder @@ -49,9 +48,6 @@ class CreateSharepointPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_sharepoint_page_task_params_site import CreateSharepointPageTaskParamsSite - from ..models.create_sharepoint_page_task_params_drive import CreateSharepointPageTaskParamsDrive - from ..models.create_sharepoint_page_task_params_parent_folder import CreateSharepointPageTaskParamsParentFolder title = self.title 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 e5a4705d..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateSharepointPageTaskParamsDrive") 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 5a6db9fd..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateSharepointPageTaskParamsParentFolder") 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 2f75461d..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateSharepointPageTaskParamsSite") diff --git a/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py b/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py index 51c4b8fa..1f749fa3 100644 --- a/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py +++ b/rootly_sdk/models/create_shortcut_story_task_params_type_0_project.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateShortcutStoryTaskParamsType0Project") diff --git a/rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py b/rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py index fd0b4a21..cf311fb3 100644 --- a/rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py +++ b/rootly_sdk/models/create_shortcut_story_task_params_type_1_workflow_state.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateShortcutStoryTaskParamsType1WorkflowState") diff --git a/rootly_sdk/models/create_shortcut_task_task_params.py b/rootly_sdk/models/create_shortcut_task_task_params.py index 46d8db89..2b27b227 100644 --- a/rootly_sdk/models/create_shortcut_task_task_params.py +++ b/rootly_sdk/models/create_shortcut_task_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_shortcut_task_task_params_task_type import ( + CreateShortcutTaskTaskParamsTaskType, + check_create_shortcut_task_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_shortcut_task_task_params_task_type import check_create_shortcut_task_task_params_task_type -from ..models.create_shortcut_task_task_params_task_type import CreateShortcutTaskTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_shortcut_task_task_params_completion import CreateShortcutTaskTaskParamsCompletion @@ -37,7 +36,6 @@ class CreateShortcutTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_shortcut_task_task_params_completion import CreateShortcutTaskTaskParamsCompletion parent_story_id = self.parent_story_id 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 5813bc46..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateShortcutTaskTaskParamsCompletion") diff --git a/rootly_sdk/models/create_slack_channel_task_params.py b/rootly_sdk/models/create_slack_channel_task_params.py index 1c63612d..4587c12a 100644 --- a/rootly_sdk/models/create_slack_channel_task_params.py +++ b/rootly_sdk/models/create_slack_channel_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_slack_channel_task_params_private import ( + CreateSlackChannelTaskParamsPrivate, + check_create_slack_channel_task_params_private, +) +from ..models.create_slack_channel_task_params_task_type import ( + CreateSlackChannelTaskParamsTaskType, + check_create_slack_channel_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_slack_channel_task_params_private import check_create_slack_channel_task_params_private -from ..models.create_slack_channel_task_params_private import CreateSlackChannelTaskParamsPrivate -from ..models.create_slack_channel_task_params_task_type import check_create_slack_channel_task_params_task_type -from ..models.create_slack_channel_task_params_task_type import CreateSlackChannelTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_slack_channel_task_params_workspace import CreateSlackChannelTaskParamsWorkspace @@ -39,7 +40,6 @@ class CreateSlackChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_slack_channel_task_params_workspace import CreateSlackChannelTaskParamsWorkspace workspace = self.workspace.to_dict() 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 41a01f29..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateSlackChannelTaskParamsWorkspace") diff --git a/rootly_sdk/models/create_sub_incident_task_params.py b/rootly_sdk/models/create_sub_incident_task_params.py index 93305597..0f2a0359 100644 --- a/rootly_sdk/models/create_sub_incident_task_params.py +++ b/rootly_sdk/models/create_sub_incident_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_sub_incident_task_params_task_type import ( + CreateSubIncidentTaskParamsTaskType, + check_create_sub_incident_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_sub_incident_task_params_task_type import check_create_sub_incident_task_params_task_type -from ..models.create_sub_incident_task_params_task_type import CreateSubIncidentTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CreateSubIncidentTaskParams") diff --git a/rootly_sdk/models/create_trello_card_task_params.py b/rootly_sdk/models/create_trello_card_task_params.py index f4f4e107..b1d2e73f 100644 --- a/rootly_sdk/models/create_trello_card_task_params.py +++ b/rootly_sdk/models/create_trello_card_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_trello_card_task_params_task_type import ( + CreateTrelloCardTaskParamsTaskType, + check_create_trello_card_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_trello_card_task_params_task_type import check_create_trello_card_task_params_task_type -from ..models.create_trello_card_task_params_task_type import CreateTrelloCardTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_trello_card_task_params_archivation import CreateTrelloCardTaskParamsArchivation from ..models.create_trello_card_task_params_board import CreateTrelloCardTaskParamsBoard @@ -48,10 +47,6 @@ class CreateTrelloCardTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_trello_card_task_params_list import CreateTrelloCardTaskParamsList - from ..models.create_trello_card_task_params_board import CreateTrelloCardTaskParamsBoard - from ..models.create_trello_card_task_params_labels_item import CreateTrelloCardTaskParamsLabelsItem - from ..models.create_trello_card_task_params_archivation import CreateTrelloCardTaskParamsArchivation title = self.title 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 ea1598ec..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateTrelloCardTaskParamsArchivation") 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 3d974424..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateTrelloCardTaskParamsBoard") 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 1a7eed5c..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateTrelloCardTaskParamsLabelsItem") 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 828bf046..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateTrelloCardTaskParamsList") 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 1c7e190e..0524c92d 100644 --- a/rootly_sdk/models/create_watsonx_chat_completion_task_params.py +++ b/rootly_sdk/models/create_watsonx_chat_completion_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_watsonx_chat_completion_task_params_task_type import ( + CreateWatsonxChatCompletionTaskParamsTaskType, check_create_watsonx_chat_completion_task_params_task_type, ) -from ..models.create_watsonx_chat_completion_task_params_task_type import CreateWatsonxChatCompletionTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_watsonx_chat_completion_task_params_model import CreateWatsonxChatCompletionTaskParamsModel @@ -41,7 +38,6 @@ class CreateWatsonxChatCompletionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_watsonx_chat_completion_task_params_model import CreateWatsonxChatCompletionTaskParamsModel model = self.model.to_dict() 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 74131d63..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateWatsonxChatCompletionTaskParamsModel") diff --git a/rootly_sdk/models/create_webex_meeting_task_params.py b/rootly_sdk/models/create_webex_meeting_task_params.py index be525e0f..20afbca5 100644 --- a/rootly_sdk/models/create_webex_meeting_task_params.py +++ b/rootly_sdk/models/create_webex_meeting_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.create_webex_meeting_task_params_recording_mode import ( + CreateWebexMeetingTaskParamsRecordingMode, check_create_webex_meeting_task_params_recording_mode, ) -from ..models.create_webex_meeting_task_params_recording_mode import CreateWebexMeetingTaskParamsRecordingMode -from ..models.create_webex_meeting_task_params_task_type import check_create_webex_meeting_task_params_task_type -from ..models.create_webex_meeting_task_params_task_type import CreateWebexMeetingTaskParamsTaskType +from ..models.create_webex_meeting_task_params_task_type import ( + CreateWebexMeetingTaskParamsTaskType, + check_create_webex_meeting_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.create_webex_meeting_task_params_post_to_slack_channels_item import ( @@ -51,9 +50,6 @@ class CreateWebexMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_webex_meeting_task_params_post_to_slack_channels_item import ( - CreateWebexMeetingTaskParamsPostToSlackChannelsItem, - ) topic = self.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 7697a1ff..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateWebexMeetingTaskParamsPostToSlackChannelsItem") 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 46928003..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,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.create_zendesk_jira_link_task_params_task_type import ( + CreateZendeskJiraLinkTaskParamsTaskType, + check_create_zendesk_jira_link_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_zendesk_jira_link_task_params_task_type import check_create_zendesk_jira_link_task_params_task_type -from ..models.create_zendesk_jira_link_task_params_task_type import CreateZendeskJiraLinkTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CreateZendeskJiraLinkTaskParams") diff --git a/rootly_sdk/models/create_zendesk_ticket_task_params.py b/rootly_sdk/models/create_zendesk_ticket_task_params.py index 58391a8e..ecf79ca3 100644 --- a/rootly_sdk/models/create_zendesk_ticket_task_params.py +++ b/rootly_sdk/models/create_zendesk_ticket_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_zendesk_ticket_task_params_kind import ( + CreateZendeskTicketTaskParamsKind, + check_create_zendesk_ticket_task_params_kind, +) +from ..models.create_zendesk_ticket_task_params_task_type import ( + CreateZendeskTicketTaskParamsTaskType, + check_create_zendesk_ticket_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_zendesk_ticket_task_params_kind import check_create_zendesk_ticket_task_params_kind -from ..models.create_zendesk_ticket_task_params_kind import CreateZendeskTicketTaskParamsKind -from ..models.create_zendesk_ticket_task_params_task_type import check_create_zendesk_ticket_task_params_task_type -from ..models.create_zendesk_ticket_task_params_task_type import CreateZendeskTicketTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_zendesk_ticket_task_params_completion import CreateZendeskTicketTaskParamsCompletion from ..models.create_zendesk_ticket_task_params_priority import CreateZendeskTicketTaskParamsPriority @@ -52,8 +53,6 @@ class CreateZendeskTicketTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_zendesk_ticket_task_params_completion import CreateZendeskTicketTaskParamsCompletion - from ..models.create_zendesk_ticket_task_params_priority import CreateZendeskTicketTaskParamsPriority kind: str = self.kind 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 8d3af537..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateZendeskTicketTaskParamsCompletion") 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 c0f4e0b4..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateZendeskTicketTaskParamsPriority") diff --git a/rootly_sdk/models/create_zoom_meeting_task_params.py b/rootly_sdk/models/create_zoom_meeting_task_params.py index b8a58755..835f6ef5 100644 --- a/rootly_sdk/models/create_zoom_meeting_task_params.py +++ b/rootly_sdk/models/create_zoom_meeting_task_params.py @@ -1,22 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_zoom_meeting_task_params_auto_recording import ( + CreateZoomMeetingTaskParamsAutoRecording, + check_create_zoom_meeting_task_params_auto_recording, +) +from ..models.create_zoom_meeting_task_params_recording_mode import ( + CreateZoomMeetingTaskParamsRecordingMode, + check_create_zoom_meeting_task_params_recording_mode, +) +from ..models.create_zoom_meeting_task_params_task_type import ( + CreateZoomMeetingTaskParamsTaskType, + check_create_zoom_meeting_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.create_zoom_meeting_task_params_auto_recording import check_create_zoom_meeting_task_params_auto_recording -from ..models.create_zoom_meeting_task_params_auto_recording import CreateZoomMeetingTaskParamsAutoRecording -from ..models.create_zoom_meeting_task_params_recording_mode import check_create_zoom_meeting_task_params_recording_mode -from ..models.create_zoom_meeting_task_params_recording_mode import CreateZoomMeetingTaskParamsRecordingMode -from ..models.create_zoom_meeting_task_params_task_type import check_create_zoom_meeting_task_params_task_type -from ..models.create_zoom_meeting_task_params_task_type import CreateZoomMeetingTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.create_zoom_meeting_task_params_post_to_slack_channels_item import ( CreateZoomMeetingTaskParamsPostToSlackChannelsItem, @@ -60,9 +63,6 @@ class CreateZoomMeetingTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.create_zoom_meeting_task_params_post_to_slack_channels_item import ( - CreateZoomMeetingTaskParamsPostToSlackChannelsItem, - ) topic = self.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 60487e80..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CreateZoomMeetingTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/custom_field.py b/rootly_sdk/models/custom_field.py index a98075de..b4fbada2 100644 --- a/rootly_sdk/models/custom_field.py +++ b/rootly_sdk/models/custom_field.py @@ -1,21 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.custom_field_required_type_0_item import ( + CustomFieldRequiredType0Item, + check_custom_field_required_type_0_item, +) +from ..models.custom_field_shown_item import CustomFieldShownItem, check_custom_field_shown_item from ..types import UNSET, Unset -from ..models.custom_field_required_type_0_item import check_custom_field_required_type_0_item -from ..models.custom_field_required_type_0_item import CustomFieldRequiredType0Item -from ..models.custom_field_shown_item import check_custom_field_shown_item -from ..models.custom_field_shown_item import CustomFieldShownItem -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CustomField") diff --git a/rootly_sdk/models/custom_field_list.py b/rootly_sdk/models/custom_field_list.py index b6a5d60f..fe97544e 100644 --- a/rootly_sdk/models/custom_field_list.py +++ b/rootly_sdk/models/custom_field_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.custom_field_list_data_item import CustomFieldListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CustomFieldList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.custom_field_list_data_item import CustomFieldListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/custom_field_list_data_item.py b/rootly_sdk/models/custom_field_list_data_item.py index 4fdbf5b6..fffd241a 100644 --- a/rootly_sdk/models/custom_field_list_data_item.py +++ b/rootly_sdk/models/custom_field_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.custom_field_list_data_item_type import check_custom_field_list_data_item_type -from ..models.custom_field_list_data_item_type import CustomFieldListDataItemType -from typing import cast +from ..models.custom_field_list_data_item_type import ( + CustomFieldListDataItemType, + check_custom_field_list_data_item_type, +) if TYPE_CHECKING: from ..models.custom_field import CustomField @@ -34,7 +33,6 @@ class CustomFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.custom_field import CustomField id = self.id diff --git a/rootly_sdk/models/custom_field_option.py b/rootly_sdk/models/custom_field_option.py index e7c8a749..74f9d516 100644 --- a/rootly_sdk/models/custom_field_option.py +++ b/rootly_sdk/models/custom_field_option.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="CustomFieldOption") diff --git a/rootly_sdk/models/custom_field_option_list.py b/rootly_sdk/models/custom_field_option_list.py index e6d778be..8a317936 100644 --- a/rootly_sdk/models/custom_field_option_list.py +++ b/rootly_sdk/models/custom_field_option_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.custom_field_option_list_data_item import CustomFieldOptionListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CustomFieldOptionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.custom_field_option_list_data_item import CustomFieldOptionListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 516bef03..a4f0144a 100644 --- a/rootly_sdk/models/custom_field_option_list_data_item.py +++ b/rootly_sdk/models/custom_field_option_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.custom_field_option_list_data_item_type import check_custom_field_option_list_data_item_type -from ..models.custom_field_option_list_data_item_type import CustomFieldOptionListDataItemType -from typing import cast +from ..models.custom_field_option_list_data_item_type import ( + CustomFieldOptionListDataItemType, + check_custom_field_option_list_data_item_type, +) if TYPE_CHECKING: from ..models.custom_field_option import CustomFieldOption @@ -34,7 +33,6 @@ class CustomFieldOptionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.custom_field_option import CustomFieldOption id = self.id diff --git a/rootly_sdk/models/custom_field_option_response.py b/rootly_sdk/models/custom_field_option_response.py index 632c99f2..88160965 100644 --- a/rootly_sdk/models/custom_field_option_response.py +++ b/rootly_sdk/models/custom_field_option_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.custom_field_option_response_data import CustomFieldOptionResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CustomFieldOptionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.custom_field_option_response_data import CustomFieldOptionResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/custom_field_option_response_data.py b/rootly_sdk/models/custom_field_option_response_data.py index 4074a8fb..d715f128 100644 --- a/rootly_sdk/models/custom_field_option_response_data.py +++ b/rootly_sdk/models/custom_field_option_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.custom_field_option_response_data_type import check_custom_field_option_response_data_type -from ..models.custom_field_option_response_data_type import CustomFieldOptionResponseDataType -from typing import cast +from ..models.custom_field_option_response_data_type import ( + CustomFieldOptionResponseDataType, + check_custom_field_option_response_data_type, +) if TYPE_CHECKING: from ..models.custom_field_option import CustomFieldOption @@ -34,7 +33,6 @@ class CustomFieldOptionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.custom_field_option import CustomFieldOption id = self.id diff --git a/rootly_sdk/models/custom_field_response.py b/rootly_sdk/models/custom_field_response.py index 238e6100..502d3f37 100644 --- a/rootly_sdk/models/custom_field_response.py +++ b/rootly_sdk/models/custom_field_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.custom_field_response_data import CustomFieldResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CustomFieldResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.custom_field_response_data import CustomFieldResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/custom_field_response_data.py b/rootly_sdk/models/custom_field_response_data.py index 05b404bc..54454627 100644 --- a/rootly_sdk/models/custom_field_response_data.py +++ b/rootly_sdk/models/custom_field_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.custom_field_response_data_type import check_custom_field_response_data_type -from ..models.custom_field_response_data_type import CustomFieldResponseDataType -from typing import cast +from ..models.custom_field_response_data_type import CustomFieldResponseDataType, check_custom_field_response_data_type if TYPE_CHECKING: from ..models.custom_field import CustomField @@ -34,7 +30,6 @@ class CustomFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.custom_field import CustomField id = self.id diff --git a/rootly_sdk/models/custom_form.py b/rootly_sdk/models/custom_form.py index 53dc6ced..78ee24bb 100644 --- a/rootly_sdk/models/custom_form.py +++ b/rootly_sdk/models/custom_form.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="CustomForm") diff --git a/rootly_sdk/models/custom_form_list.py b/rootly_sdk/models/custom_form_list.py index 34b3ae86..8c429938 100644 --- a/rootly_sdk/models/custom_form_list.py +++ b/rootly_sdk/models/custom_form_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.custom_form_list_data_item import CustomFormListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class CustomFormList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.custom_form_list_data_item import CustomFormListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/custom_form_list_data_item.py b/rootly_sdk/models/custom_form_list_data_item.py index 4dc93929..3aba2bac 100644 --- a/rootly_sdk/models/custom_form_list_data_item.py +++ b/rootly_sdk/models/custom_form_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.custom_form_list_data_item_type import check_custom_form_list_data_item_type -from ..models.custom_form_list_data_item_type import CustomFormListDataItemType -from typing import cast +from ..models.custom_form_list_data_item_type import CustomFormListDataItemType, check_custom_form_list_data_item_type if TYPE_CHECKING: from ..models.custom_form import CustomForm @@ -34,7 +30,6 @@ class CustomFormListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.custom_form import CustomForm id = self.id diff --git a/rootly_sdk/models/custom_form_response.py b/rootly_sdk/models/custom_form_response.py index 20e9cf75..f1bfe51b 100644 --- a/rootly_sdk/models/custom_form_response.py +++ b/rootly_sdk/models/custom_form_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.custom_form_response_data import CustomFormResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class CustomFormResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.custom_form_response_data import CustomFormResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/custom_form_response_data.py b/rootly_sdk/models/custom_form_response_data.py index 9266bb5a..3ea9ebe9 100644 --- a/rootly_sdk/models/custom_form_response_data.py +++ b/rootly_sdk/models/custom_form_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.custom_form_response_data_type import check_custom_form_response_data_type -from ..models.custom_form_response_data_type import CustomFormResponseDataType -from typing import cast +from ..models.custom_form_response_data_type import CustomFormResponseDataType, check_custom_form_response_data_type if TYPE_CHECKING: from ..models.custom_form import CustomForm @@ -34,7 +30,6 @@ class CustomFormResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.custom_form import CustomForm id = self.id diff --git a/rootly_sdk/models/dashboard.py b/rootly_sdk/models/dashboard.py index 955a561c..f83fc0c9 100644 --- a/rootly_sdk/models/dashboard.py +++ b/rootly_sdk/models/dashboard.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.dashboard_color import DashboardColor, check_dashboard_color +from ..models.dashboard_owner import DashboardOwner, check_dashboard_owner from ..types import UNSET, Unset -from ..models.dashboard_color import check_dashboard_color -from ..models.dashboard_color import DashboardColor -from ..models.dashboard_owner import check_dashboard_owner -from ..models.dashboard_owner import DashboardOwner -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Dashboard") diff --git a/rootly_sdk/models/dashboard_list.py b/rootly_sdk/models/dashboard_list.py index aab0f0dd..265ba250 100644 --- a/rootly_sdk/models/dashboard_list.py +++ b/rootly_sdk/models/dashboard_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.dashboard_list_data_item import DashboardListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class DashboardList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.dashboard_list_data_item import DashboardListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/dashboard_list_data_item.py b/rootly_sdk/models/dashboard_list_data_item.py index 505b648d..8950eaf7 100644 --- a/rootly_sdk/models/dashboard_list_data_item.py +++ b/rootly_sdk/models/dashboard_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.dashboard_list_data_item_type import check_dashboard_list_data_item_type -from ..models.dashboard_list_data_item_type import DashboardListDataItemType -from typing import cast +from ..models.dashboard_list_data_item_type import DashboardListDataItemType, check_dashboard_list_data_item_type if TYPE_CHECKING: from ..models.dashboard import Dashboard @@ -34,7 +30,6 @@ class DashboardListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dashboard import Dashboard id = self.id diff --git a/rootly_sdk/models/dashboard_panel.py b/rootly_sdk/models/dashboard_panel.py index 670dc966..4cd0dbe5 100644 --- a/rootly_sdk/models/dashboard_panel.py +++ b/rootly_sdk/models/dashboard_panel.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.dashboard_panel_data_item import DashboardPanelDataItem from ..models.dashboard_panel_params import DashboardPanelParams @@ -39,9 +36,7 @@ class DashboardPanel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dashboard_panel_data_item import DashboardPanelDataItem from ..models.dashboard_panel_position_type_0 import DashboardPanelPositionType0 - from ..models.dashboard_panel_params import DashboardPanelParams params = self.params.to_dict() diff --git a/rootly_sdk/models/dashboard_panel_data_item.py b/rootly_sdk/models/dashboard_panel_data_item.py index bc7c8163..3e9c8030 100644 --- a/rootly_sdk/models/dashboard_panel_data_item.py +++ b/rootly_sdk/models/dashboard_panel_data_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="DashboardPanelDataItem") diff --git a/rootly_sdk/models/dashboard_panel_list.py b/rootly_sdk/models/dashboard_panel_list.py index 19a741ff..bde2df38 100644 --- a/rootly_sdk/models/dashboard_panel_list.py +++ b/rootly_sdk/models/dashboard_panel_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.dashboard_panel_list_data_item import DashboardPanelListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class DashboardPanelList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.dashboard_panel_list_data_item import DashboardPanelListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/dashboard_panel_list_data_item.py b/rootly_sdk/models/dashboard_panel_list_data_item.py index 067a2553..bd1dc5f7 100644 --- a/rootly_sdk/models/dashboard_panel_list_data_item.py +++ b/rootly_sdk/models/dashboard_panel_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.dashboard_panel_list_data_item_type import check_dashboard_panel_list_data_item_type -from ..models.dashboard_panel_list_data_item_type import DashboardPanelListDataItemType -from typing import cast +from ..models.dashboard_panel_list_data_item_type import ( + DashboardPanelListDataItemType, + check_dashboard_panel_list_data_item_type, +) if TYPE_CHECKING: from ..models.dashboard_panel import DashboardPanel @@ -34,7 +33,6 @@ class DashboardPanelListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dashboard_panel import DashboardPanel id = self.id diff --git a/rootly_sdk/models/dashboard_panel_params.py b/rootly_sdk/models/dashboard_panel_params.py index 6599bfb4..66aed2da 100644 --- a/rootly_sdk/models/dashboard_panel_params.py +++ b/rootly_sdk/models/dashboard_panel_params.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.dashboard_panel_params_display import DashboardPanelParamsDisplay, check_dashboard_panel_params_display from ..types import UNSET, Unset -from ..models.dashboard_panel_params_display import check_dashboard_panel_params_display -from ..models.dashboard_panel_params_display import DashboardPanelParamsDisplay -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.dashboard_panel_params_datalabels import DashboardPanelParamsDatalabels from ..models.dashboard_panel_params_datasets_item import DashboardPanelParamsDatasetsItem @@ -43,9 +39,6 @@ class DashboardPanelParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dashboard_panel_params_datalabels import DashboardPanelParamsDatalabels - from ..models.dashboard_panel_params_legend import DashboardPanelParamsLegend - from ..models.dashboard_panel_params_datasets_item import DashboardPanelParamsDatasetsItem display: str | Unset = UNSET if not isinstance(self.display, Unset): diff --git a/rootly_sdk/models/dashboard_panel_params_datalabels.py b/rootly_sdk/models/dashboard_panel_params_datalabels.py index cc681abd..be9de80e 100644 --- a/rootly_sdk/models/dashboard_panel_params_datalabels.py +++ b/rootly_sdk/models/dashboard_panel_params_datalabels.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="DashboardPanelParamsDatalabels") diff --git a/rootly_sdk/models/dashboard_panel_params_datasets_item.py b/rootly_sdk/models/dashboard_panel_params_datasets_item.py index cc0332f7..21e85bab 100644 --- a/rootly_sdk/models/dashboard_panel_params_datasets_item.py +++ b/rootly_sdk/models/dashboard_panel_params_datasets_item.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.dashboard_panel_params_datasets_item_collection import ( + DashboardPanelParamsDatasetsItemCollection, check_dashboard_panel_params_datasets_item_collection, ) -from ..models.dashboard_panel_params_datasets_item_collection import DashboardPanelParamsDatasetsItemCollection from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.dashboard_panel_params_datasets_item_aggregate_type_0 import ( @@ -53,7 +50,6 @@ def to_dict(self) -> dict[str, Any]: from ..models.dashboard_panel_params_datasets_item_group_by_type_1_type_0 import ( DashboardPanelParamsDatasetsItemGroupByType1Type0, ) - from ..models.dashboard_panel_params_datasets_item_filter_item import DashboardPanelParamsDatasetsItemFilterItem name: None | str | Unset if isinstance(self.name, 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 68e989ec..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.dashboard_panel_params_datasets_item_aggregate_type_0_operation import ( - check_dashboard_panel_params_datasets_item_aggregate_type_0_operation, -) from ..models.dashboard_panel_params_datasets_item_aggregate_type_0_operation import ( DashboardPanelParamsDatasetsItemAggregateType0Operation, + check_dashboard_panel_params_datasets_item_aggregate_type_0_operation, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="DashboardPanelParamsDatasetsItemAggregateType0") 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 c99b76ad..1eaceebe 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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.dashboard_panel_params_datasets_item_filter_item_operation import ( - check_dashboard_panel_params_datasets_item_filter_item_operation, -) from ..models.dashboard_panel_params_datasets_item_filter_item_operation import ( DashboardPanelParamsDatasetsItemFilterItemOperation, + check_dashboard_panel_params_datasets_item_filter_item_operation, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item import ( @@ -39,9 +34,6 @@ class DashboardPanelParamsDatasetsItemFilterItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item import ( - DashboardPanelParamsDatasetsItemFilterItemRulesItem, - ) operation: str | Unset = UNSET if not isinstance(self.operation, Unset): 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 3cfe4ea5..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item_condition import ( - check_dashboard_panel_params_datasets_item_filter_item_rules_item_condition, -) from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item_condition import ( DashboardPanelParamsDatasetsItemFilterItemRulesItemCondition, -) -from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item_operation import ( - check_dashboard_panel_params_datasets_item_filter_item_rules_item_operation, + check_dashboard_panel_params_datasets_item_filter_item_rules_item_condition, ) from ..models.dashboard_panel_params_datasets_item_filter_item_rules_item_operation import ( DashboardPanelParamsDatasetsItemFilterItemRulesItemOperation, + check_dashboard_panel_params_datasets_item_filter_item_rules_item_operation, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="DashboardPanelParamsDatasetsItemFilterItemRulesItem") 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 13df359e..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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.dashboard_panel_params_datasets_item_group_by_type_1_type_0_key import ( - check_dashboard_panel_params_datasets_item_group_by_type_1_type_0_key, -) from ..models.dashboard_panel_params_datasets_item_group_by_type_1_type_0_key import ( DashboardPanelParamsDatasetsItemGroupByType1Type0Key, + check_dashboard_panel_params_datasets_item_group_by_type_1_type_0_key, ) -from typing import cast - T = TypeVar("T", bound="DashboardPanelParamsDatasetsItemGroupByType1Type0") diff --git a/rootly_sdk/models/dashboard_panel_params_legend.py b/rootly_sdk/models/dashboard_panel_params_legend.py index f61e5aa8..e39a194f 100644 --- a/rootly_sdk/models/dashboard_panel_params_legend.py +++ b/rootly_sdk/models/dashboard_panel_params_legend.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.dashboard_panel_params_legend_groups import ( + DashboardPanelParamsLegendGroups, + check_dashboard_panel_params_legend_groups, +) from ..types import UNSET, Unset -from ..models.dashboard_panel_params_legend_groups import check_dashboard_panel_params_legend_groups -from ..models.dashboard_panel_params_legend_groups import DashboardPanelParamsLegendGroups -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="DashboardPanelParamsLegend") diff --git a/rootly_sdk/models/dashboard_panel_position_type_0.py b/rootly_sdk/models/dashboard_panel_position_type_0.py index dc3fa3a4..f64f7720 100644 --- a/rootly_sdk/models/dashboard_panel_position_type_0.py +++ b/rootly_sdk/models/dashboard_panel_position_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="DashboardPanelPositionType0") diff --git a/rootly_sdk/models/dashboard_panel_response.py b/rootly_sdk/models/dashboard_panel_response.py index da80d5b6..53b175e2 100644 --- a/rootly_sdk/models/dashboard_panel_response.py +++ b/rootly_sdk/models/dashboard_panel_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.dashboard_panel_response_data import DashboardPanelResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class DashboardPanelResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.dashboard_panel_response_data import DashboardPanelResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/dashboard_panel_response_data.py b/rootly_sdk/models/dashboard_panel_response_data.py index 0b95ea0a..17f3d2bc 100644 --- a/rootly_sdk/models/dashboard_panel_response_data.py +++ b/rootly_sdk/models/dashboard_panel_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.dashboard_panel_response_data_type import check_dashboard_panel_response_data_type -from ..models.dashboard_panel_response_data_type import DashboardPanelResponseDataType -from typing import cast +from ..models.dashboard_panel_response_data_type import ( + DashboardPanelResponseDataType, + check_dashboard_panel_response_data_type, +) if TYPE_CHECKING: from ..models.dashboard_panel import DashboardPanel @@ -34,7 +33,6 @@ class DashboardPanelResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dashboard_panel import DashboardPanel id = self.id diff --git a/rootly_sdk/models/dashboard_response.py b/rootly_sdk/models/dashboard_response.py index 347048d9..8ccf9235 100644 --- a/rootly_sdk/models/dashboard_response.py +++ b/rootly_sdk/models/dashboard_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.dashboard_response_data import DashboardResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class DashboardResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dashboard_response_data import DashboardResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/dashboard_response_data.py b/rootly_sdk/models/dashboard_response_data.py index 05ef4249..2ba914b5 100644 --- a/rootly_sdk/models/dashboard_response_data.py +++ b/rootly_sdk/models/dashboard_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.dashboard_response_data_type import check_dashboard_response_data_type -from ..models.dashboard_response_data_type import DashboardResponseDataType -from typing import cast +from ..models.dashboard_response_data_type import DashboardResponseDataType, check_dashboard_response_data_type if TYPE_CHECKING: from ..models.dashboard import Dashboard @@ -34,7 +30,6 @@ class DashboardResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.dashboard import Dashboard id = self.id diff --git a/rootly_sdk/models/delete_alert_route_response_200.py b/rootly_sdk/models/delete_alert_route_response_200.py index 4212fe2f..dfee77b3 100644 --- a/rootly_sdk/models/delete_alert_route_response_200.py +++ b/rootly_sdk/models/delete_alert_route_response_200.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.delete_alert_route_response_200_data import DeleteAlertRouteResponse200Data @@ -29,7 +26,6 @@ class DeleteAlertRouteResponse200: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.delete_alert_route_response_200_data import DeleteAlertRouteResponse200Data data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): 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 a9cb94c8..95d7b221 100644 --- a/rootly_sdk/models/delete_alert_route_response_200_data.py +++ b/rootly_sdk/models/delete_alert_route_response_200_data.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.delete_alert_route_response_200_data_attributes import DeleteAlertRouteResponse200DataAttributes @@ -33,7 +30,6 @@ class DeleteAlertRouteResponse200Data: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.delete_alert_route_response_200_data_attributes import DeleteAlertRouteResponse200DataAttributes id = self.id 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 34439e01..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="DeleteAlertRouteResponse200DataAttributes") diff --git a/rootly_sdk/models/duplicate_incident.py b/rootly_sdk/models/duplicate_incident.py index 5fbe49d6..55260f94 100644 --- a/rootly_sdk/models/duplicate_incident.py +++ b/rootly_sdk/models/duplicate_incident.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.duplicate_incident_data import DuplicateIncidentData @@ -28,7 +24,6 @@ class DuplicateIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.duplicate_incident_data import DuplicateIncidentData data = self.data.to_dict() diff --git a/rootly_sdk/models/duplicate_incident_data.py b/rootly_sdk/models/duplicate_incident_data.py index 0ea66018..8b075bd7 100644 --- a/rootly_sdk/models/duplicate_incident_data.py +++ b/rootly_sdk/models/duplicate_incident_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.duplicate_incident_data_type import check_duplicate_incident_data_type -from ..models.duplicate_incident_data_type import DuplicateIncidentDataType -from typing import cast +from ..models.duplicate_incident_data_type import DuplicateIncidentDataType, check_duplicate_incident_data_type if TYPE_CHECKING: from ..models.duplicate_incident_data_attributes import DuplicateIncidentDataAttributes @@ -32,7 +28,6 @@ class DuplicateIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.duplicate_incident_data_attributes import DuplicateIncidentDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/duplicate_incident_data_attributes.py b/rootly_sdk/models/duplicate_incident_data_attributes.py index 34fc291d..61946c43 100644 --- a/rootly_sdk/models/duplicate_incident_data_attributes.py +++ b/rootly_sdk/models/duplicate_incident_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="DuplicateIncidentDataAttributes") diff --git a/rootly_sdk/models/edge_connector.py b/rootly_sdk/models/edge_connector.py index cb6cb8a9..09054d23 100644 --- a/rootly_sdk/models/edge_connector.py +++ b/rootly_sdk/models/edge_connector.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.edge_connector_data import EdgeConnectorData @@ -28,7 +24,6 @@ class EdgeConnector: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.edge_connector_data import EdgeConnectorData data = self.data.to_dict() diff --git a/rootly_sdk/models/edge_connector_action.py b/rootly_sdk/models/edge_connector_action.py index 018c9b8b..4480e034 100644 --- a/rootly_sdk/models/edge_connector_action.py +++ b/rootly_sdk/models/edge_connector_action.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.edge_connector_action_data import EdgeConnectorActionData @@ -28,7 +24,6 @@ class EdgeConnectorAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.edge_connector_action_data import EdgeConnectorActionData data = self.data.to_dict() diff --git a/rootly_sdk/models/edge_connector_action_data.py b/rootly_sdk/models/edge_connector_action_data.py index c9f7f880..e87a97a7 100644 --- a/rootly_sdk/models/edge_connector_action_data.py +++ b/rootly_sdk/models/edge_connector_action_data.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.edge_connector_action_data_type import check_edge_connector_action_data_type -from ..models.edge_connector_action_data_type import EdgeConnectorActionDataType -from typing import cast -from uuid import UUID +from ..models.edge_connector_action_data_type import EdgeConnectorActionDataType, check_edge_connector_action_data_type if TYPE_CHECKING: from ..models.edge_connector_action_data_attributes import EdgeConnectorActionDataAttributes @@ -35,7 +31,6 @@ class EdgeConnectorActionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.edge_connector_action_data_attributes import EdgeConnectorActionDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/edge_connector_action_data_attributes.py b/rootly_sdk/models/edge_connector_action_data_attributes.py index 9bf2c7e9..6c67eee5 100644 --- a/rootly_sdk/models/edge_connector_action_data_attributes.py +++ b/rootly_sdk/models/edge_connector_action_data_attributes.py @@ -1,23 +1,22 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 +from dateutil.parser import isoparse from ..models.edge_connector_action_data_attributes_action_type import ( + EdgeConnectorActionDataAttributesActionType, check_edge_connector_action_data_attributes_action_type, ) -from ..models.edge_connector_action_data_attributes_action_type import EdgeConnectorActionDataAttributesActionType -from ..models.edge_connector_action_data_attributes_icon import check_edge_connector_action_data_attributes_icon -from ..models.edge_connector_action_data_attributes_icon import EdgeConnectorActionDataAttributesIcon +from ..models.edge_connector_action_data_attributes_icon import ( + EdgeConnectorActionDataAttributesIcon, + check_edge_connector_action_data_attributes_icon, +) from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime if TYPE_CHECKING: from ..models.edge_connector_action_data_attributes_parameters_type_0_item import ( @@ -57,9 +56,6 @@ class EdgeConnectorActionDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.edge_connector_action_data_attributes_parameters_type_0_item import ( - EdgeConnectorActionDataAttributesParametersType0Item, - ) name = self.name 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 b2939ded..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.edge_connector_action_data_attributes_parameters_type_0_item_type import ( - check_edge_connector_action_data_attributes_parameters_type_0_item_type, -) from ..models.edge_connector_action_data_attributes_parameters_type_0_item_type import ( EdgeConnectorActionDataAttributesParametersType0ItemType, + check_edge_connector_action_data_attributes_parameters_type_0_item_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EdgeConnectorActionDataAttributesParametersType0Item") diff --git a/rootly_sdk/models/edge_connector_data.py b/rootly_sdk/models/edge_connector_data.py index 05008768..1264673c 100644 --- a/rootly_sdk/models/edge_connector_data.py +++ b/rootly_sdk/models/edge_connector_data.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.edge_connector_data_type import check_edge_connector_data_type -from ..models.edge_connector_data_type import EdgeConnectorDataType -from typing import cast -from uuid import UUID +from ..models.edge_connector_data_type import EdgeConnectorDataType, check_edge_connector_data_type if TYPE_CHECKING: from ..models.edge_connector_data_attributes import EdgeConnectorDataAttributes @@ -35,7 +31,6 @@ class EdgeConnectorData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.edge_connector_data_attributes import EdgeConnectorDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/edge_connector_data_attributes.py b/rootly_sdk/models/edge_connector_data_attributes.py index 3a685374..8281a4d4 100644 --- a/rootly_sdk/models/edge_connector_data_attributes.py +++ b/rootly_sdk/models/edge_connector_data_attributes.py @@ -1,20 +1,18 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.edge_connector_data_attributes_status import check_edge_connector_data_attributes_status -from ..models.edge_connector_data_attributes_status import EdgeConnectorDataAttributesStatus -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +from ..models.edge_connector_data_attributes_status import ( + EdgeConnectorDataAttributesStatus, + check_edge_connector_data_attributes_status, +) +from ..types import UNSET, Unset T = TypeVar("T", bound="EdgeConnectorDataAttributes") diff --git a/rootly_sdk/models/environment.py b/rootly_sdk/models/environment.py index 0b659f80..652d2359 100644 --- a/rootly_sdk/models/environment.py +++ b/rootly_sdk/models/environment.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.environment_managed_by import EnvironmentManagedBy, check_environment_managed_by from ..types import UNSET, Unset -from ..models.environment_managed_by import check_environment_managed_by -from ..models.environment_managed_by import EnvironmentManagedBy -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.environment_properties_type_0_item import EnvironmentPropertiesType0Item from ..models.environment_slack_aliases_type_0_item import EnvironmentSlackAliasesType0Item @@ -60,9 +56,6 @@ class Environment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.environment_slack_aliases_type_0_item import EnvironmentSlackAliasesType0Item - from ..models.environment_slack_channels_type_0_item import EnvironmentSlackChannelsType0Item - from ..models.environment_properties_type_0_item import EnvironmentPropertiesType0Item name = self.name diff --git a/rootly_sdk/models/environment_list.py b/rootly_sdk/models/environment_list.py index c0942a31..28818d4b 100644 --- a/rootly_sdk/models/environment_list.py +++ b/rootly_sdk/models/environment_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.environment_list_data_item import EnvironmentListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class EnvironmentList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.environment_list_data_item import EnvironmentListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/environment_list_data_item.py b/rootly_sdk/models/environment_list_data_item.py index b1b85b93..9cd8698e 100644 --- a/rootly_sdk/models/environment_list_data_item.py +++ b/rootly_sdk/models/environment_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.environment_list_data_item_type import check_environment_list_data_item_type -from ..models.environment_list_data_item_type import EnvironmentListDataItemType -from typing import cast +from ..models.environment_list_data_item_type import EnvironmentListDataItemType, check_environment_list_data_item_type if TYPE_CHECKING: from ..models.environment import Environment @@ -34,7 +30,6 @@ class EnvironmentListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.environment import Environment id = self.id diff --git a/rootly_sdk/models/environment_properties_type_0_item.py b/rootly_sdk/models/environment_properties_type_0_item.py index 7f0e2cda..1e6c007a 100644 --- a/rootly_sdk/models/environment_properties_type_0_item.py +++ b/rootly_sdk/models/environment_properties_type_0_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="EnvironmentPropertiesType0Item") diff --git a/rootly_sdk/models/environment_response.py b/rootly_sdk/models/environment_response.py index fd70c8fe..9bc22e2b 100644 --- a/rootly_sdk/models/environment_response.py +++ b/rootly_sdk/models/environment_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.environment_response_data import EnvironmentResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class EnvironmentResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.environment_response_data import EnvironmentResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/environment_response_data.py b/rootly_sdk/models/environment_response_data.py index 17051882..b2a242c7 100644 --- a/rootly_sdk/models/environment_response_data.py +++ b/rootly_sdk/models/environment_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.environment_response_data_type import check_environment_response_data_type -from ..models.environment_response_data_type import EnvironmentResponseDataType -from typing import cast +from ..models.environment_response_data_type import EnvironmentResponseDataType, check_environment_response_data_type if TYPE_CHECKING: from ..models.environment import Environment @@ -34,7 +30,6 @@ class EnvironmentResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.environment import Environment id = self.id 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 99680d69..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="EnvironmentSlackAliasesType0Item") 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 5518e6e3..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="EnvironmentSlackChannelsType0Item") diff --git a/rootly_sdk/models/errors_list.py b/rootly_sdk/models/errors_list.py index 84ecafa1..51274091 100644 --- a/rootly_sdk/models/errors_list.py +++ b/rootly_sdk/models/errors_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.errors_list_errors_item import ErrorsListErrorsItem @@ -29,7 +26,6 @@ class ErrorsList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.errors_list_errors_item import ErrorsListErrorsItem errors: list[dict[str, Any]] | Unset = UNSET if not isinstance(self.errors, Unset): diff --git a/rootly_sdk/models/errors_list_errors_item.py b/rootly_sdk/models/errors_list_errors_item.py index 789ca7a0..55c41afb 100644 --- a/rootly_sdk/models/errors_list_errors_item.py +++ b/rootly_sdk/models/errors_list_errors_item.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="ErrorsListErrorsItem") diff --git a/rootly_sdk/models/escalate_alert.py b/rootly_sdk/models/escalate_alert.py index ed196035..ecd3882d 100644 --- a/rootly_sdk/models/escalate_alert.py +++ b/rootly_sdk/models/escalate_alert.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalate_alert_data import EscalateAlertData @@ -29,7 +26,6 @@ class EscalateAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalate_alert_data import EscalateAlertData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/escalate_alert_data.py b/rootly_sdk/models/escalate_alert_data.py index f876f4c9..beb705bc 100644 --- a/rootly_sdk/models/escalate_alert_data.py +++ b/rootly_sdk/models/escalate_alert_data.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.escalate_alert_data_type import EscalateAlertDataType, check_escalate_alert_data_type from ..types import UNSET, Unset -from ..models.escalate_alert_data_type import check_escalate_alert_data_type -from ..models.escalate_alert_data_type import EscalateAlertDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalate_alert_data_attributes import EscalateAlertDataAttributes @@ -33,7 +29,6 @@ class EscalateAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalate_alert_data_attributes import EscalateAlertDataAttributes type_: str | Unset = UNSET if not isinstance(self.type_, Unset): diff --git a/rootly_sdk/models/escalate_alert_data_attributes.py b/rootly_sdk/models/escalate_alert_data_attributes.py index 2dbd2c7c..b22f75ee 100644 --- a/rootly_sdk/models/escalate_alert_data_attributes.py +++ b/rootly_sdk/models/escalate_alert_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="EscalateAlertDataAttributes") diff --git a/rootly_sdk/models/escalation_policy.py b/rootly_sdk/models/escalation_policy.py index 1c8ae36f..222eaa40 100644 --- a/rootly_sdk/models/escalation_policy.py +++ b/rootly_sdk/models/escalation_policy.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_business_hours_type_0 import EscalationPolicyBusinessHoursType0 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 4d311fed..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,26 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_business_hours_type_0_days_type_0_item import ( - check_escalation_policy_business_hours_type_0_days_type_0_item, -) from ..models.escalation_policy_business_hours_type_0_days_type_0_item import ( EscalationPolicyBusinessHoursType0DaysType0Item, + check_escalation_policy_business_hours_type_0_days_type_0_item, ) from ..models.escalation_policy_business_hours_type_0_time_zone import ( + EscalationPolicyBusinessHoursType0TimeZone, check_escalation_policy_business_hours_type_0_time_zone, ) -from ..models.escalation_policy_business_hours_type_0_time_zone import EscalationPolicyBusinessHoursType0TimeZone from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EscalationPolicyBusinessHoursType0") diff --git a/rootly_sdk/models/escalation_policy_level.py b/rootly_sdk/models/escalation_policy_level.py index e2b37699..71d1397a 100644 --- a/rootly_sdk/models/escalation_policy_level.py +++ b/rootly_sdk/models/escalation_policy_level.py @@ -1,27 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_level_paging_strategy_configuration_schedule_strategy import ( - check_escalation_policy_level_paging_strategy_configuration_schedule_strategy, -) from ..models.escalation_policy_level_paging_strategy_configuration_schedule_strategy import ( EscalationPolicyLevelPagingStrategyConfigurationScheduleStrategy, -) -from ..models.escalation_policy_level_paging_strategy_configuration_strategy import ( - check_escalation_policy_level_paging_strategy_configuration_strategy, + check_escalation_policy_level_paging_strategy_configuration_schedule_strategy, ) from ..models.escalation_policy_level_paging_strategy_configuration_strategy import ( EscalationPolicyLevelPagingStrategyConfigurationStrategy, + check_escalation_policy_level_paging_strategy_configuration_strategy, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.escalation_policy_level_notification_target_params_item_type_0 import ( diff --git a/rootly_sdk/models/escalation_policy_level_list.py b/rootly_sdk/models/escalation_policy_level_list.py index f4c9a165..98857100 100644 --- a/rootly_sdk/models/escalation_policy_level_list.py +++ b/rootly_sdk/models/escalation_policy_level_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_level_list_data_item import EscalationPolicyLevelListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class EscalationPolicyLevelList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy_level_list_data_item import EscalationPolicyLevelListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 4a8fe090..5f8d975f 100644 --- a/rootly_sdk/models/escalation_policy_level_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_level_list_data_item.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_level import EscalationPolicyLevel @@ -30,7 +26,6 @@ class EscalationPolicyLevelListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy_level import EscalationPolicyLevel id = self.id 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 be07d5fc..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.escalation_policy_level_notification_target_params_item_type_0_team_members import ( - check_escalation_policy_level_notification_target_params_item_type_0_team_members, -) from ..models.escalation_policy_level_notification_target_params_item_type_0_team_members import ( EscalationPolicyLevelNotificationTargetParamsItemType0TeamMembers, -) -from ..models.escalation_policy_level_notification_target_params_item_type_0_type import ( - check_escalation_policy_level_notification_target_params_item_type_0_type, + check_escalation_policy_level_notification_target_params_item_type_0_team_members, ) from ..models.escalation_policy_level_notification_target_params_item_type_0_type import ( EscalationPolicyLevelNotificationTargetParamsItemType0Type, + check_escalation_policy_level_notification_target_params_item_type_0_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EscalationPolicyLevelNotificationTargetParamsItemType0") diff --git a/rootly_sdk/models/escalation_policy_level_response.py b/rootly_sdk/models/escalation_policy_level_response.py index a65a6860..262024a3 100644 --- a/rootly_sdk/models/escalation_policy_level_response.py +++ b/rootly_sdk/models/escalation_policy_level_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_level_response_data import EscalationPolicyLevelResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class EscalationPolicyLevelResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy_level_response_data import EscalationPolicyLevelResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/escalation_policy_level_response_data.py b/rootly_sdk/models/escalation_policy_level_response_data.py index d9652d3b..34e59feb 100644 --- a/rootly_sdk/models/escalation_policy_level_response_data.py +++ b/rootly_sdk/models/escalation_policy_level_response_data.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_level_response_data_type import ( + EscalationPolicyLevelResponseDataType, + check_escalation_policy_level_response_data_type, +) from ..types import UNSET, Unset -from ..models.escalation_policy_level_response_data_type import check_escalation_policy_level_response_data_type -from ..models.escalation_policy_level_response_data_type import EscalationPolicyLevelResponseDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_level import EscalationPolicyLevel @@ -35,7 +34,6 @@ class EscalationPolicyLevelResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy_level import EscalationPolicyLevel id = self.id diff --git a/rootly_sdk/models/escalation_policy_list.py b/rootly_sdk/models/escalation_policy_list.py index dd2beb27..98fe7348 100644 --- a/rootly_sdk/models/escalation_policy_list.py +++ b/rootly_sdk/models/escalation_policy_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_list_data_item import EscalationPolicyListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class EscalationPolicyList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.escalation_policy_list_data_item import EscalationPolicyListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/escalation_policy_list_data_item.py b/rootly_sdk/models/escalation_policy_list_data_item.py index b584d977..36be2375 100644 --- a/rootly_sdk/models/escalation_policy_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_list_data_item_type import check_escalation_policy_list_data_item_type -from ..models.escalation_policy_list_data_item_type import EscalationPolicyListDataItemType -from typing import cast +from ..models.escalation_policy_list_data_item_type import ( + EscalationPolicyListDataItemType, + check_escalation_policy_list_data_item_type, +) if TYPE_CHECKING: from ..models.escalation_policy import EscalationPolicy @@ -34,7 +33,6 @@ class EscalationPolicyListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy import EscalationPolicy id = self.id diff --git a/rootly_sdk/models/escalation_policy_path.py b/rootly_sdk/models/escalation_policy_path.py index d690132e..def4ef06 100644 --- a/rootly_sdk/models/escalation_policy_path.py +++ b/rootly_sdk/models/escalation_policy_path.py @@ -1,25 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_after_deferral_behavior import check_escalation_policy_path_after_deferral_behavior -from ..models.escalation_policy_path_after_deferral_behavior import EscalationPolicyPathAfterDeferralBehavior -from ..models.escalation_policy_path_match_mode import check_escalation_policy_path_match_mode -from ..models.escalation_policy_path_match_mode import EscalationPolicyPathMatchMode -from ..models.escalation_policy_path_path_type import check_escalation_policy_path_path_type -from ..models.escalation_policy_path_path_type import EscalationPolicyPathPathType +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, ) -from ..models.escalation_policy_path_time_restriction_time_zone import EscalationPolicyPathTimeRestrictionTimeZone from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 @@ -138,31 +141,29 @@ 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_4 import EscalationPolicyPathRulesItemType4 - from ..models.escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 - from ..models.escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 - from ..models.escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 + 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_8_type_1 import EscalationPolicyPathRulesItemType8Type1 - from ..models.escalation_policy_path_rules_item_type_9_type_7 import EscalationPolicyPathRulesItemType9Type7 - from ..models.escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 + 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 import EscalationPolicyPathRulesItemType6 - from ..models.escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 - from ..models.escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 - from ..models.escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 - from ..models.escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 - from ..models.escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 + from ..models.escalation_policy_path_rules_item_type_7 import EscalationPolicyPathRulesItemType7 from ..models.escalation_policy_path_rules_item_type_8_type_0 import EscalationPolicyPathRulesItemType8Type0 + from ..models.escalation_policy_path_rules_item_type_8_type_1 import EscalationPolicyPathRulesItemType8Type1 + from ..models.escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 + from ..models.escalation_policy_path_rules_item_type_8_type_3 import EscalationPolicyPathRulesItemType8Type3 + from ..models.escalation_policy_path_rules_item_type_8_type_4 import EscalationPolicyPathRulesItemType8Type4 from ..models.escalation_policy_path_rules_item_type_8_type_5 import EscalationPolicyPathRulesItemType8Type5 - from ..models.escalation_policy_path_rules_item_type_3 import EscalationPolicyPathRulesItemType3 + from ..models.escalation_policy_path_rules_item_type_8_type_6 import EscalationPolicyPathRulesItemType8Type6 + from ..models.escalation_policy_path_rules_item_type_8_type_7 import EscalationPolicyPathRulesItemType8Type7 from ..models.escalation_policy_path_rules_item_type_9_type_0 import EscalationPolicyPathRulesItemType9Type0 - from ..models.escalation_policy_path_rules_item_type_0 import EscalationPolicyPathRulesItemType0 - from ..models.escalation_policy_path_rules_item_type_2 import EscalationPolicyPathRulesItemType2 - from ..models.escalation_policy_path_rules_item_type_5 import EscalationPolicyPathRulesItemType5 - from ..models.escalation_policy_path_time_restrictions_item import EscalationPolicyPathTimeRestrictionsItem - from ..models.escalation_policy_path_rules_item_type_8_type_2 import EscalationPolicyPathRulesItemType8Type2 - from ..models.escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 from ..models.escalation_policy_path_rules_item_type_9_type_1 import EscalationPolicyPathRulesItemType9Type1 + from ..models.escalation_policy_path_rules_item_type_9_type_2 import EscalationPolicyPathRulesItemType9Type2 + from ..models.escalation_policy_path_rules_item_type_9_type_3 import EscalationPolicyPathRulesItemType9Type3 + from ..models.escalation_policy_path_rules_item_type_9_type_4 import EscalationPolicyPathRulesItemType9Type4 + from ..models.escalation_policy_path_rules_item_type_9_type_5 import EscalationPolicyPathRulesItemType9Type5 + from ..models.escalation_policy_path_rules_item_type_9_type_6 import EscalationPolicyPathRulesItemType9Type6 name = self.name diff --git a/rootly_sdk/models/escalation_policy_path_list.py b/rootly_sdk/models/escalation_policy_path_list.py index 7b2dfcbf..3c07f135 100644 --- a/rootly_sdk/models/escalation_policy_path_list.py +++ b/rootly_sdk/models/escalation_policy_path_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_path_list_data_item import EscalationPolicyPathListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class EscalationPolicyPathList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy_path_list_data_item import EscalationPolicyPathListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 0deb2c07..bcb35aac 100644 --- a/rootly_sdk/models/escalation_policy_path_list_data_item.py +++ b/rootly_sdk/models/escalation_policy_path_list_data_item.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_path import EscalationPolicyPath @@ -30,7 +26,6 @@ class EscalationPolicyPathListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy_path import EscalationPolicyPath id = self.id diff --git a/rootly_sdk/models/escalation_policy_path_response.py b/rootly_sdk/models/escalation_policy_path_response.py index 9402f849..0983a792 100644 --- a/rootly_sdk/models/escalation_policy_path_response.py +++ b/rootly_sdk/models/escalation_policy_path_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_path_response_data import EscalationPolicyPathResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class EscalationPolicyPathResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.escalation_policy_path_response_data import EscalationPolicyPathResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/escalation_policy_path_response_data.py b/rootly_sdk/models/escalation_policy_path_response_data.py index 0822c461..0b318cc3 100644 --- a/rootly_sdk/models/escalation_policy_path_response_data.py +++ b/rootly_sdk/models/escalation_policy_path_response_data.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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_response_data_type import ( + EscalationPolicyPathResponseDataType, + check_escalation_policy_path_response_data_type, +) from ..types import UNSET, Unset -from ..models.escalation_policy_path_response_data_type import check_escalation_policy_path_response_data_type -from ..models.escalation_policy_path_response_data_type import EscalationPolicyPathResponseDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_path import EscalationPolicyPath @@ -35,7 +34,6 @@ class EscalationPolicyPathResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy_path import EscalationPolicyPath id = self.id 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 6c74acb0..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,19 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - 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_policy_path_rules_item_type_0_rule_type import EscalationPolicyPathRulesItemType0RuleType -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType0") 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 e6f9c13c..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,19 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - 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_policy_path_rules_item_type_1_rule_type import EscalationPolicyPathRulesItemType1RuleType -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType1") 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 0fb1d1f3..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,24 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.escalation_policy_path_rules_item_type_2_operator import ( + EscalationPolicyPathRulesItemType2Operator, check_escalation_policy_path_rules_item_type_2_operator, ) -from ..models.escalation_policy_path_rules_item_type_2_operator import EscalationPolicyPathRulesItemType2Operator 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_policy_path_rules_item_type_2_rule_type import EscalationPolicyPathRulesItemType2RuleType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType2") 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 977d1c19..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,24 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.escalation_policy_path_rules_item_type_3_operator import ( + EscalationPolicyPathRulesItemType3Operator, check_escalation_policy_path_rules_item_type_3_operator, ) -from ..models.escalation_policy_path_rules_item_type_3_operator import EscalationPolicyPathRulesItemType3Operator 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_policy_path_rules_item_type_3_rule_type import EscalationPolicyPathRulesItemType3RuleType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType3") 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 index 6822abd1..0b343c49 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_4.py @@ -1,19 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - 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_policy_path_rules_item_type_4_rule_type import EscalationPolicyPathRulesItemType4RuleType -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType4") 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 index 2bbd8cb1..e0cca146 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_5.py @@ -1,22 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - 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_rule_type import EscalationPolicyPathRulesItemType5RuleType 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_policy_path_rules_item_type_5_time_zone import EscalationPolicyPathRulesItemType5TimeZone -from typing import cast if TYPE_CHECKING: from ..models.escalation_policy_path_rules_item_type_5_time_blocks_item import ( @@ -43,9 +40,6 @@ class EscalationPolicyPathRulesItemType5: 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_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType5TimeBlocksItem, - ) rule_type: str = self.rule_type 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 index c6514f9b..2c596cc9 100644 --- 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 @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType5TimeBlocksItem") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_6.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_6.py index 1b486b2a..5b56175d 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_6.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_6.py @@ -1,23 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.escalation_policy_path_rules_item_type_6_operator import ( + EscalationPolicyPathRulesItemType6Operator, check_escalation_policy_path_rules_item_type_6_operator, ) -from ..models.escalation_policy_path_rules_item_type_6_operator import EscalationPolicyPathRulesItemType6Operator from ..models.escalation_policy_path_rules_item_type_6_rule_type import ( + EscalationPolicyPathRulesItemType6RuleType, check_escalation_policy_path_rules_item_type_6_rule_type, ) -from ..models.escalation_policy_path_rules_item_type_6_rule_type import EscalationPolicyPathRulesItemType6RuleType -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType6") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py index c0061fc8..76be2bb0 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_7.py @@ -1,23 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - from ..models.escalation_policy_path_rules_item_type_7_operator import ( + EscalationPolicyPathRulesItemType7Operator, check_escalation_policy_path_rules_item_type_7_operator, ) -from ..models.escalation_policy_path_rules_item_type_7_operator import EscalationPolicyPathRulesItemType7Operator from ..models.escalation_policy_path_rules_item_type_7_rule_type import ( + EscalationPolicyPathRulesItemType7RuleType, check_escalation_policy_path_rules_item_type_7_rule_type, ) -from ..models.escalation_policy_path_rules_item_type_7_rule_type import EscalationPolicyPathRulesItemType7RuleType -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType7") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py index 16cc8c77..cac3b5ab 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_0.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_8_type_0_rule_type import ( - check_escalation_policy_path_rules_item_type_8_type_0_rule_type, -) from ..models.escalation_policy_path_rules_item_type_8_type_0_rule_type import ( EscalationPolicyPathRulesItemType8Type0RuleType, + check_escalation_policy_path_rules_item_type_8_type_0_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type0") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py index 068ae869..c58ca2b9 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_1.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.escalation_policy_path_rules_item_type_8_type_1_rule_type import ( - check_escalation_policy_path_rules_item_type_8_type_1_rule_type, -) from ..models.escalation_policy_path_rules_item_type_8_type_1_rule_type import ( EscalationPolicyPathRulesItemType8Type1RuleType, + check_escalation_policy_path_rules_item_type_8_type_1_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type1") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py index 1fb1caa6..1f0b82f7 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_2.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_8_type_2_operator import ( - check_escalation_policy_path_rules_item_type_8_type_2_operator, -) from ..models.escalation_policy_path_rules_item_type_8_type_2_operator import ( EscalationPolicyPathRulesItemType8Type2Operator, -) -from ..models.escalation_policy_path_rules_item_type_8_type_2_rule_type import ( - check_escalation_policy_path_rules_item_type_8_type_2_rule_type, + check_escalation_policy_path_rules_item_type_8_type_2_operator, ) from ..models.escalation_policy_path_rules_item_type_8_type_2_rule_type import ( EscalationPolicyPathRulesItemType8Type2RuleType, + check_escalation_policy_path_rules_item_type_8_type_2_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type2") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py index c8acca55..2081dba4 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_3.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_8_type_3_operator import ( - check_escalation_policy_path_rules_item_type_8_type_3_operator, -) from ..models.escalation_policy_path_rules_item_type_8_type_3_operator import ( EscalationPolicyPathRulesItemType8Type3Operator, -) -from ..models.escalation_policy_path_rules_item_type_8_type_3_rule_type import ( - check_escalation_policy_path_rules_item_type_8_type_3_rule_type, + check_escalation_policy_path_rules_item_type_8_type_3_operator, ) from ..models.escalation_policy_path_rules_item_type_8_type_3_rule_type import ( EscalationPolicyPathRulesItemType8Type3RuleType, + check_escalation_policy_path_rules_item_type_8_type_3_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type3") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py index e0e1ad89..ffbf6f87 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_4.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_8_type_4_rule_type import ( - check_escalation_policy_path_rules_item_type_8_type_4_rule_type, -) from ..models.escalation_policy_path_rules_item_type_8_type_4_rule_type import ( EscalationPolicyPathRulesItemType8Type4RuleType, + check_escalation_policy_path_rules_item_type_8_type_4_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type4") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py index 22bf6537..1143016f 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5.py @@ -1,26 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_8_type_5_rule_type import ( - check_escalation_policy_path_rules_item_type_8_type_5_rule_type, -) from ..models.escalation_policy_path_rules_item_type_8_type_5_rule_type import ( EscalationPolicyPathRulesItemType8Type5RuleType, -) -from ..models.escalation_policy_path_rules_item_type_8_type_5_time_zone import ( - check_escalation_policy_path_rules_item_type_8_type_5_time_zone, + check_escalation_policy_path_rules_item_type_8_type_5_rule_type, ) from ..models.escalation_policy_path_rules_item_type_8_type_5_time_zone import ( EscalationPolicyPathRulesItemType8Type5TimeZone, + check_escalation_policy_path_rules_item_type_8_type_5_time_zone, ) -from typing import cast if TYPE_CHECKING: from ..models.escalation_policy_path_rules_item_type_8_type_5_time_blocks_item import ( @@ -47,9 +40,6 @@ class EscalationPolicyPathRulesItemType8Type5: 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_8_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType8Type5TimeBlocksItem, - ) rule_type: str = self.rule_type diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py index beaae0f7..78acd66d 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_5_time_blocks_item.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type5TimeBlocksItem") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py index 6fa13683..c83904aa 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_6.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_8_type_6_operator import ( - check_escalation_policy_path_rules_item_type_8_type_6_operator, -) from ..models.escalation_policy_path_rules_item_type_8_type_6_operator import ( EscalationPolicyPathRulesItemType8Type6Operator, -) -from ..models.escalation_policy_path_rules_item_type_8_type_6_rule_type import ( - check_escalation_policy_path_rules_item_type_8_type_6_rule_type, + check_escalation_policy_path_rules_item_type_8_type_6_operator, ) from ..models.escalation_policy_path_rules_item_type_8_type_6_rule_type import ( EscalationPolicyPathRulesItemType8Type6RuleType, + check_escalation_policy_path_rules_item_type_8_type_6_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type6") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py index db981f1c..435bdc44 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_8_type_7.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.escalation_policy_path_rules_item_type_8_type_7_operator import ( - check_escalation_policy_path_rules_item_type_8_type_7_operator, -) from ..models.escalation_policy_path_rules_item_type_8_type_7_operator import ( EscalationPolicyPathRulesItemType8Type7Operator, -) -from ..models.escalation_policy_path_rules_item_type_8_type_7_rule_type import ( - check_escalation_policy_path_rules_item_type_8_type_7_rule_type, + check_escalation_policy_path_rules_item_type_8_type_7_operator, ) from ..models.escalation_policy_path_rules_item_type_8_type_7_rule_type import ( EscalationPolicyPathRulesItemType8Type7RuleType, + check_escalation_policy_path_rules_item_type_8_type_7_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType8Type7") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py index 0d4c27ec..ec39d280 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_0.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_9_type_0_rule_type import ( - check_escalation_policy_path_rules_item_type_9_type_0_rule_type, -) from ..models.escalation_policy_path_rules_item_type_9_type_0_rule_type import ( EscalationPolicyPathRulesItemType9Type0RuleType, + check_escalation_policy_path_rules_item_type_9_type_0_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type0") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py index 3a1ddb7e..6ba315ef 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_1.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.escalation_policy_path_rules_item_type_9_type_1_rule_type import ( - check_escalation_policy_path_rules_item_type_9_type_1_rule_type, -) from ..models.escalation_policy_path_rules_item_type_9_type_1_rule_type import ( EscalationPolicyPathRulesItemType9Type1RuleType, + check_escalation_policy_path_rules_item_type_9_type_1_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type1") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py index 2ee64dee..97d1442c 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_2.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_9_type_2_operator import ( - check_escalation_policy_path_rules_item_type_9_type_2_operator, -) from ..models.escalation_policy_path_rules_item_type_9_type_2_operator import ( EscalationPolicyPathRulesItemType9Type2Operator, -) -from ..models.escalation_policy_path_rules_item_type_9_type_2_rule_type import ( - check_escalation_policy_path_rules_item_type_9_type_2_rule_type, + check_escalation_policy_path_rules_item_type_9_type_2_operator, ) from ..models.escalation_policy_path_rules_item_type_9_type_2_rule_type import ( EscalationPolicyPathRulesItemType9Type2RuleType, + check_escalation_policy_path_rules_item_type_9_type_2_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type2") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py index 366d4ad2..6c5863b1 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_3.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_9_type_3_operator import ( - check_escalation_policy_path_rules_item_type_9_type_3_operator, -) from ..models.escalation_policy_path_rules_item_type_9_type_3_operator import ( EscalationPolicyPathRulesItemType9Type3Operator, -) -from ..models.escalation_policy_path_rules_item_type_9_type_3_rule_type import ( - check_escalation_policy_path_rules_item_type_9_type_3_rule_type, + check_escalation_policy_path_rules_item_type_9_type_3_operator, ) from ..models.escalation_policy_path_rules_item_type_9_type_3_rule_type import ( EscalationPolicyPathRulesItemType9Type3RuleType, + check_escalation_policy_path_rules_item_type_9_type_3_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type3") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py index 08151c16..d20cd9a4 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_4.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_9_type_4_rule_type import ( - check_escalation_policy_path_rules_item_type_9_type_4_rule_type, -) from ..models.escalation_policy_path_rules_item_type_9_type_4_rule_type import ( EscalationPolicyPathRulesItemType9Type4RuleType, + check_escalation_policy_path_rules_item_type_9_type_4_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type4") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py index 1ff6b9d0..69651641 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5.py @@ -1,26 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_9_type_5_rule_type import ( - check_escalation_policy_path_rules_item_type_9_type_5_rule_type, -) from ..models.escalation_policy_path_rules_item_type_9_type_5_rule_type import ( EscalationPolicyPathRulesItemType9Type5RuleType, -) -from ..models.escalation_policy_path_rules_item_type_9_type_5_time_zone import ( - check_escalation_policy_path_rules_item_type_9_type_5_time_zone, + check_escalation_policy_path_rules_item_type_9_type_5_rule_type, ) from ..models.escalation_policy_path_rules_item_type_9_type_5_time_zone import ( EscalationPolicyPathRulesItemType9Type5TimeZone, + check_escalation_policy_path_rules_item_type_9_type_5_time_zone, ) -from typing import cast if TYPE_CHECKING: from ..models.escalation_policy_path_rules_item_type_9_type_5_time_blocks_item import ( @@ -47,9 +40,6 @@ class EscalationPolicyPathRulesItemType9Type5: 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_9_type_5_time_blocks_item import ( - EscalationPolicyPathRulesItemType9Type5TimeBlocksItem, - ) rule_type: str = self.rule_type diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py index bb9863a1..6b32dea9 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_5_time_blocks_item.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type5TimeBlocksItem") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py index 11d98342..ac30f0d9 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_6.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_path_rules_item_type_9_type_6_operator import ( - check_escalation_policy_path_rules_item_type_9_type_6_operator, -) from ..models.escalation_policy_path_rules_item_type_9_type_6_operator import ( EscalationPolicyPathRulesItemType9Type6Operator, -) -from ..models.escalation_policy_path_rules_item_type_9_type_6_rule_type import ( - check_escalation_policy_path_rules_item_type_9_type_6_rule_type, + check_escalation_policy_path_rules_item_type_9_type_6_operator, ) from ..models.escalation_policy_path_rules_item_type_9_type_6_rule_type import ( EscalationPolicyPathRulesItemType9Type6RuleType, + check_escalation_policy_path_rules_item_type_9_type_6_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type6") diff --git a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py index 93bfd13c..c66bd1f0 100644 --- a/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py +++ b/rootly_sdk/models/escalation_policy_path_rules_item_type_9_type_7.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.escalation_policy_path_rules_item_type_9_type_7_operator import ( - check_escalation_policy_path_rules_item_type_9_type_7_operator, -) from ..models.escalation_policy_path_rules_item_type_9_type_7_operator import ( EscalationPolicyPathRulesItemType9Type7Operator, -) -from ..models.escalation_policy_path_rules_item_type_9_type_7_rule_type import ( - check_escalation_policy_path_rules_item_type_9_type_7_rule_type, + check_escalation_policy_path_rules_item_type_9_type_7_operator, ) from ..models.escalation_policy_path_rules_item_type_9_type_7_rule_type import ( EscalationPolicyPathRulesItemType9Type7RuleType, + check_escalation_policy_path_rules_item_type_9_type_7_rule_type, ) -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathRulesItemType9Type7") 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 a25ef92d..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.escalation_policy_path_time_restrictions_item_end_day import ( - check_escalation_policy_path_time_restrictions_item_end_day, -) from ..models.escalation_policy_path_time_restrictions_item_end_day import ( EscalationPolicyPathTimeRestrictionsItemEndDay, -) -from ..models.escalation_policy_path_time_restrictions_item_start_day import ( - check_escalation_policy_path_time_restrictions_item_start_day, + check_escalation_policy_path_time_restrictions_item_end_day, ) from ..models.escalation_policy_path_time_restrictions_item_start_day import ( EscalationPolicyPathTimeRestrictionsItemStartDay, + check_escalation_policy_path_time_restrictions_item_start_day, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="EscalationPolicyPathTimeRestrictionsItem") diff --git a/rootly_sdk/models/escalation_policy_response.py b/rootly_sdk/models/escalation_policy_response.py index 5572e8c7..75a58333 100644 --- a/rootly_sdk/models/escalation_policy_response.py +++ b/rootly_sdk/models/escalation_policy_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.escalation_policy_response_data import EscalationPolicyResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class EscalationPolicyResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy_response_data import EscalationPolicyResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/escalation_policy_response_data.py b/rootly_sdk/models/escalation_policy_response_data.py index e157dc85..04dc48e4 100644 --- a/rootly_sdk/models/escalation_policy_response_data.py +++ b/rootly_sdk/models/escalation_policy_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.escalation_policy_response_data_type import check_escalation_policy_response_data_type -from ..models.escalation_policy_response_data_type import EscalationPolicyResponseDataType -from typing import cast +from ..models.escalation_policy_response_data_type import ( + EscalationPolicyResponseDataType, + check_escalation_policy_response_data_type, +) if TYPE_CHECKING: from ..models.escalation_policy import EscalationPolicy @@ -34,7 +33,6 @@ class EscalationPolicyResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.escalation_policy import EscalationPolicy id = self.id diff --git a/rootly_sdk/models/form_field.py b/rootly_sdk/models/form_field.py index fc5ce9ef..37eb897e 100644 --- a/rootly_sdk/models/form_field.py +++ b/rootly_sdk/models/form_field.py @@ -1,23 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.form_field_input_kind import FormFieldInputKind, check_form_field_input_kind +from ..models.form_field_kind import FormFieldKind, check_form_field_kind +from ..models.form_field_value_kind import FormFieldValueKind, check_form_field_value_kind from ..types import UNSET, Unset -from ..models.form_field_input_kind import check_form_field_input_kind -from ..models.form_field_input_kind import FormFieldInputKind -from ..models.form_field_kind import check_form_field_kind -from ..models.form_field_kind import FormFieldKind -from ..models.form_field_value_kind import check_form_field_value_kind -from ..models.form_field_value_kind import FormFieldValueKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="FormField") diff --git a/rootly_sdk/models/form_field_list.py b/rootly_sdk/models/form_field_list.py index 26b30185..2011c3b9 100644 --- a/rootly_sdk/models/form_field_list.py +++ b/rootly_sdk/models/form_field_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_list_data_item import FormFieldListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class FormFieldList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_list_data_item import FormFieldListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/form_field_list_data_item.py b/rootly_sdk/models/form_field_list_data_item.py index 2b385d4b..e25163e5 100644 --- a/rootly_sdk/models/form_field_list_data_item.py +++ b/rootly_sdk/models/form_field_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_field_list_data_item_type import check_form_field_list_data_item_type -from ..models.form_field_list_data_item_type import FormFieldListDataItemType -from typing import cast +from ..models.form_field_list_data_item_type import FormFieldListDataItemType, check_form_field_list_data_item_type if TYPE_CHECKING: from ..models.form_field import FormField @@ -34,7 +30,6 @@ class FormFieldListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field import FormField id = self.id diff --git a/rootly_sdk/models/form_field_option.py b/rootly_sdk/models/form_field_option.py index c13d97f6..c26efcd3 100644 --- a/rootly_sdk/models/form_field_option.py +++ b/rootly_sdk/models/form_field_option.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="FormFieldOption") diff --git a/rootly_sdk/models/form_field_option_list.py b/rootly_sdk/models/form_field_option_list.py index a2416c77..e790315c 100644 --- a/rootly_sdk/models/form_field_option_list.py +++ b/rootly_sdk/models/form_field_option_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_option_list_data_item import FormFieldOptionListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class FormFieldOptionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.form_field_option_list_data_item import FormFieldOptionListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 79208553..cd8c8f3b 100644 --- a/rootly_sdk/models/form_field_option_list_data_item.py +++ b/rootly_sdk/models/form_field_option_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_field_option_list_data_item_type import check_form_field_option_list_data_item_type -from ..models.form_field_option_list_data_item_type import FormFieldOptionListDataItemType -from typing import cast +from ..models.form_field_option_list_data_item_type import ( + FormFieldOptionListDataItemType, + check_form_field_option_list_data_item_type, +) if TYPE_CHECKING: from ..models.form_field_option import FormFieldOption @@ -34,7 +33,6 @@ class FormFieldOptionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_option import FormFieldOption id = self.id diff --git a/rootly_sdk/models/form_field_option_response.py b/rootly_sdk/models/form_field_option_response.py index c5bdd37a..a4531c97 100644 --- a/rootly_sdk/models/form_field_option_response.py +++ b/rootly_sdk/models/form_field_option_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_option_response_data import FormFieldOptionResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class FormFieldOptionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_option_response_data import FormFieldOptionResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/form_field_option_response_data.py b/rootly_sdk/models/form_field_option_response_data.py index 49b1902f..e9ccf686 100644 --- a/rootly_sdk/models/form_field_option_response_data.py +++ b/rootly_sdk/models/form_field_option_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_field_option_response_data_type import check_form_field_option_response_data_type -from ..models.form_field_option_response_data_type import FormFieldOptionResponseDataType -from typing import cast +from ..models.form_field_option_response_data_type import ( + FormFieldOptionResponseDataType, + check_form_field_option_response_data_type, +) if TYPE_CHECKING: from ..models.form_field_option import FormFieldOption @@ -34,7 +33,6 @@ class FormFieldOptionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_option import FormFieldOption id = self.id diff --git a/rootly_sdk/models/form_field_placement.py b/rootly_sdk/models/form_field_placement.py index 2887057a..e9a20d4d 100644 --- a/rootly_sdk/models/form_field_placement.py +++ b/rootly_sdk/models/form_field_placement.py @@ -1,21 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.form_field_placement_placement_operator import ( + FormFieldPlacementPlacementOperator, + check_form_field_placement_placement_operator, +) +from ..models.form_field_placement_required_operator import ( + FormFieldPlacementRequiredOperator, + check_form_field_placement_required_operator, +) from ..types import UNSET, Unset -from ..models.form_field_placement_placement_operator import check_form_field_placement_placement_operator -from ..models.form_field_placement_placement_operator import FormFieldPlacementPlacementOperator -from ..models.form_field_placement_required_operator import check_form_field_placement_required_operator -from ..models.form_field_placement_required_operator import FormFieldPlacementRequiredOperator -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="FormFieldPlacement") diff --git a/rootly_sdk/models/form_field_placement_condition.py b/rootly_sdk/models/form_field_placement_condition.py index 80495fae..727f0372 100644 --- a/rootly_sdk/models/form_field_placement_condition.py +++ b/rootly_sdk/models/form_field_placement_condition.py @@ -1,19 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_field_placement_condition_comparison import check_form_field_placement_condition_comparison -from ..models.form_field_placement_condition_comparison import FormFieldPlacementConditionComparison -from ..models.form_field_placement_condition_conditioned import check_form_field_placement_condition_conditioned -from ..models.form_field_placement_condition_conditioned import FormFieldPlacementConditionConditioned -from typing import cast - +from ..models.form_field_placement_condition_comparison import ( + FormFieldPlacementConditionComparison, + check_form_field_placement_condition_comparison, +) +from ..models.form_field_placement_condition_conditioned import ( + FormFieldPlacementConditionConditioned, + check_form_field_placement_condition_conditioned, +) T = TypeVar("T", bound="FormFieldPlacementCondition") diff --git a/rootly_sdk/models/form_field_placement_condition_list.py b/rootly_sdk/models/form_field_placement_condition_list.py index 66985431..94fe706f 100644 --- a/rootly_sdk/models/form_field_placement_condition_list.py +++ b/rootly_sdk/models/form_field_placement_condition_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_placement_condition_list_data_item import FormFieldPlacementConditionListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class FormFieldPlacementConditionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_placement_condition_list_data_item import FormFieldPlacementConditionListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 ff718947..5f15820c 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,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.form_field_placement_condition_list_data_item_type import ( + FormFieldPlacementConditionListDataItemType, check_form_field_placement_condition_list_data_item_type, ) -from ..models.form_field_placement_condition_list_data_item_type import FormFieldPlacementConditionListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.form_field_placement_condition import FormFieldPlacementCondition @@ -36,7 +33,6 @@ class FormFieldPlacementConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_placement_condition import FormFieldPlacementCondition id = self.id diff --git a/rootly_sdk/models/form_field_placement_condition_response.py b/rootly_sdk/models/form_field_placement_condition_response.py index 86d99226..c374c385 100644 --- a/rootly_sdk/models/form_field_placement_condition_response.py +++ b/rootly_sdk/models/form_field_placement_condition_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_placement_condition_response_data import FormFieldPlacementConditionResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class FormFieldPlacementConditionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_placement_condition_response_data import FormFieldPlacementConditionResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() 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 cd320783..61facbc0 100644 --- a/rootly_sdk/models/form_field_placement_condition_response_data.py +++ b/rootly_sdk/models/form_field_placement_condition_response_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.form_field_placement_condition_response_data_type import ( + FormFieldPlacementConditionResponseDataType, check_form_field_placement_condition_response_data_type, ) -from ..models.form_field_placement_condition_response_data_type import FormFieldPlacementConditionResponseDataType -from typing import cast if TYPE_CHECKING: from ..models.form_field_placement_condition import FormFieldPlacementCondition @@ -36,7 +33,6 @@ class FormFieldPlacementConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_placement_condition import FormFieldPlacementCondition id = self.id diff --git a/rootly_sdk/models/form_field_placement_list.py b/rootly_sdk/models/form_field_placement_list.py index 731a85b1..3e82fdde 100644 --- a/rootly_sdk/models/form_field_placement_list.py +++ b/rootly_sdk/models/form_field_placement_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_placement_list_data_item import FormFieldPlacementListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class FormFieldPlacementList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.form_field_placement_list_data_item import FormFieldPlacementListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 d8194b71..fb27515a 100644 --- a/rootly_sdk/models/form_field_placement_list_data_item.py +++ b/rootly_sdk/models/form_field_placement_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_field_placement_list_data_item_type import check_form_field_placement_list_data_item_type -from ..models.form_field_placement_list_data_item_type import FormFieldPlacementListDataItemType -from typing import cast +from ..models.form_field_placement_list_data_item_type import ( + FormFieldPlacementListDataItemType, + check_form_field_placement_list_data_item_type, +) if TYPE_CHECKING: from ..models.form_field_placement import FormFieldPlacement @@ -34,7 +33,6 @@ class FormFieldPlacementListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_placement import FormFieldPlacement id = self.id diff --git a/rootly_sdk/models/form_field_placement_response.py b/rootly_sdk/models/form_field_placement_response.py index ffd08f88..e1366e5f 100644 --- a/rootly_sdk/models/form_field_placement_response.py +++ b/rootly_sdk/models/form_field_placement_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_placement_response_data import FormFieldPlacementResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class FormFieldPlacementResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_placement_response_data import FormFieldPlacementResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/form_field_placement_response_data.py b/rootly_sdk/models/form_field_placement_response_data.py index 8ee42998..c36d8782 100644 --- a/rootly_sdk/models/form_field_placement_response_data.py +++ b/rootly_sdk/models/form_field_placement_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_field_placement_response_data_type import check_form_field_placement_response_data_type -from ..models.form_field_placement_response_data_type import FormFieldPlacementResponseDataType -from typing import cast +from ..models.form_field_placement_response_data_type import ( + FormFieldPlacementResponseDataType, + check_form_field_placement_response_data_type, +) if TYPE_CHECKING: from ..models.form_field_placement import FormFieldPlacement @@ -34,7 +33,6 @@ class FormFieldPlacementResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_placement import FormFieldPlacement id = self.id diff --git a/rootly_sdk/models/form_field_position.py b/rootly_sdk/models/form_field_position.py index 78018615..88003c9f 100644 --- a/rootly_sdk/models/form_field_position.py +++ b/rootly_sdk/models/form_field_position.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.form_field_position_form import check_form_field_position_form -from ..models.form_field_position_form import FormFieldPositionForm -from typing import cast - +from ..models.form_field_position_form import FormFieldPositionForm, check_form_field_position_form T = TypeVar("T", bound="FormFieldPosition") diff --git a/rootly_sdk/models/form_field_position_list.py b/rootly_sdk/models/form_field_position_list.py index 3d06aea2..6acf4d07 100644 --- a/rootly_sdk/models/form_field_position_list.py +++ b/rootly_sdk/models/form_field_position_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_position_list_data_item import FormFieldPositionListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class FormFieldPositionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.form_field_position_list_data_item import FormFieldPositionListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 e659620d..e0c0a026 100644 --- a/rootly_sdk/models/form_field_position_list_data_item.py +++ b/rootly_sdk/models/form_field_position_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_field_position_list_data_item_type import check_form_field_position_list_data_item_type -from ..models.form_field_position_list_data_item_type import FormFieldPositionListDataItemType -from typing import cast +from ..models.form_field_position_list_data_item_type import ( + FormFieldPositionListDataItemType, + check_form_field_position_list_data_item_type, +) if TYPE_CHECKING: from ..models.form_field_position import FormFieldPosition @@ -34,7 +33,6 @@ class FormFieldPositionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_position import FormFieldPosition id = self.id diff --git a/rootly_sdk/models/form_field_position_response.py b/rootly_sdk/models/form_field_position_response.py index f6dc097a..5fbc79a2 100644 --- a/rootly_sdk/models/form_field_position_response.py +++ b/rootly_sdk/models/form_field_position_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_position_response_data import FormFieldPositionResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class FormFieldPositionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.form_field_position_response_data import FormFieldPositionResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/form_field_position_response_data.py b/rootly_sdk/models/form_field_position_response_data.py index 909f92fa..d1e206d9 100644 --- a/rootly_sdk/models/form_field_position_response_data.py +++ b/rootly_sdk/models/form_field_position_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_field_position_response_data_type import check_form_field_position_response_data_type -from ..models.form_field_position_response_data_type import FormFieldPositionResponseDataType -from typing import cast +from ..models.form_field_position_response_data_type import ( + FormFieldPositionResponseDataType, + check_form_field_position_response_data_type, +) if TYPE_CHECKING: from ..models.form_field_position import FormFieldPosition @@ -34,7 +33,6 @@ class FormFieldPositionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field_position import FormFieldPosition id = self.id diff --git a/rootly_sdk/models/form_field_response.py b/rootly_sdk/models/form_field_response.py index 712f0257..f84e4bb3 100644 --- a/rootly_sdk/models/form_field_response.py +++ b/rootly_sdk/models/form_field_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_field_response_data import FormFieldResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class FormFieldResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.form_field_response_data import FormFieldResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/form_field_response_data.py b/rootly_sdk/models/form_field_response_data.py index 6321874d..00a95f7a 100644 --- a/rootly_sdk/models/form_field_response_data.py +++ b/rootly_sdk/models/form_field_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_field_response_data_type import check_form_field_response_data_type -from ..models.form_field_response_data_type import FormFieldResponseDataType -from typing import cast +from ..models.form_field_response_data_type import FormFieldResponseDataType, check_form_field_response_data_type if TYPE_CHECKING: from ..models.form_field import FormField @@ -34,7 +30,6 @@ class FormFieldResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_field import FormField id = self.id diff --git a/rootly_sdk/models/form_set.py b/rootly_sdk/models/form_set.py index 3c018c15..4800d2d5 100644 --- a/rootly_sdk/models/form_set.py +++ b/rootly_sdk/models/form_set.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="FormSet") diff --git a/rootly_sdk/models/form_set_condition.py b/rootly_sdk/models/form_set_condition.py index 998578e9..571f0ed8 100644 --- a/rootly_sdk/models/form_set_condition.py +++ b/rootly_sdk/models/form_set_condition.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_set_condition_comparison import check_form_set_condition_comparison -from ..models.form_set_condition_comparison import FormSetConditionComparison -from typing import cast - +from ..models.form_set_condition_comparison import FormSetConditionComparison, check_form_set_condition_comparison T = TypeVar("T", bound="FormSetCondition") diff --git a/rootly_sdk/models/form_set_condition_list.py b/rootly_sdk/models/form_set_condition_list.py index df722af8..427a6913 100644 --- a/rootly_sdk/models/form_set_condition_list.py +++ b/rootly_sdk/models/form_set_condition_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_set_condition_list_data_item import FormSetConditionListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class FormSetConditionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.form_set_condition_list_data_item import FormSetConditionListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 13c12edf..4e33ff01 100644 --- a/rootly_sdk/models/form_set_condition_list_data_item.py +++ b/rootly_sdk/models/form_set_condition_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_set_condition_list_data_item_type import check_form_set_condition_list_data_item_type -from ..models.form_set_condition_list_data_item_type import FormSetConditionListDataItemType -from typing import cast +from ..models.form_set_condition_list_data_item_type import ( + FormSetConditionListDataItemType, + check_form_set_condition_list_data_item_type, +) if TYPE_CHECKING: from ..models.form_set_condition import FormSetCondition @@ -34,7 +33,6 @@ class FormSetConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_set_condition import FormSetCondition id = self.id diff --git a/rootly_sdk/models/form_set_condition_response.py b/rootly_sdk/models/form_set_condition_response.py index ac033acf..d2e7b00a 100644 --- a/rootly_sdk/models/form_set_condition_response.py +++ b/rootly_sdk/models/form_set_condition_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_set_condition_response_data import FormSetConditionResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class FormSetConditionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_set_condition_response_data import FormSetConditionResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/form_set_condition_response_data.py b/rootly_sdk/models/form_set_condition_response_data.py index e203695d..37053a7c 100644 --- a/rootly_sdk/models/form_set_condition_response_data.py +++ b/rootly_sdk/models/form_set_condition_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_set_condition_response_data_type import check_form_set_condition_response_data_type -from ..models.form_set_condition_response_data_type import FormSetConditionResponseDataType -from typing import cast +from ..models.form_set_condition_response_data_type import ( + FormSetConditionResponseDataType, + check_form_set_condition_response_data_type, +) if TYPE_CHECKING: from ..models.form_set_condition import FormSetCondition @@ -34,7 +33,6 @@ class FormSetConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_set_condition import FormSetCondition id = self.id diff --git a/rootly_sdk/models/form_set_list.py b/rootly_sdk/models/form_set_list.py index 7b59cb03..451c198c 100644 --- a/rootly_sdk/models/form_set_list.py +++ b/rootly_sdk/models/form_set_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_set_list_data_item import FormSetListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class FormSetList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.form_set_list_data_item import FormSetListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/form_set_list_data_item.py b/rootly_sdk/models/form_set_list_data_item.py index 73ce85c2..21ac0f95 100644 --- a/rootly_sdk/models/form_set_list_data_item.py +++ b/rootly_sdk/models/form_set_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_set_list_data_item_type import check_form_set_list_data_item_type -from ..models.form_set_list_data_item_type import FormSetListDataItemType -from typing import cast +from ..models.form_set_list_data_item_type import FormSetListDataItemType, check_form_set_list_data_item_type if TYPE_CHECKING: from ..models.form_set import FormSet @@ -34,7 +30,6 @@ class FormSetListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_set import FormSet id = self.id diff --git a/rootly_sdk/models/form_set_response.py b/rootly_sdk/models/form_set_response.py index d7c2f95f..a8cd8b95 100644 --- a/rootly_sdk/models/form_set_response.py +++ b/rootly_sdk/models/form_set_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.form_set_response_data import FormSetResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class FormSetResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_set_response_data import FormSetResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/form_set_response_data.py b/rootly_sdk/models/form_set_response_data.py index 580c93f3..9c7d1e8e 100644 --- a/rootly_sdk/models/form_set_response_data.py +++ b/rootly_sdk/models/form_set_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.form_set_response_data_type import check_form_set_response_data_type -from ..models.form_set_response_data_type import FormSetResponseDataType -from typing import cast +from ..models.form_set_response_data_type import FormSetResponseDataType, check_form_set_response_data_type if TYPE_CHECKING: from ..models.form_set import FormSet @@ -34,7 +30,6 @@ class FormSetResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.form_set import FormSet id = self.id diff --git a/rootly_sdk/models/functionality.py b/rootly_sdk/models/functionality.py index a86c3ece..5c5f97c0 100644 --- a/rootly_sdk/models/functionality.py +++ b/rootly_sdk/models/functionality.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.functionality_managed_by import FunctionalityManagedBy, check_functionality_managed_by from ..types import UNSET, Unset -from ..models.functionality_managed_by import check_functionality_managed_by -from ..models.functionality_managed_by import FunctionalityManagedBy -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.functionality_properties_type_0_item import FunctionalityPropertiesType0Item from ..models.functionality_slack_aliases_type_0_item import FunctionalitySlackAliasesType0Item @@ -86,9 +82,6 @@ class Functionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.functionality_slack_channels_type_0_item import FunctionalitySlackChannelsType0Item - from ..models.functionality_slack_aliases_type_0_item import FunctionalitySlackAliasesType0Item - from ..models.functionality_properties_type_0_item import FunctionalityPropertiesType0Item name = self.name diff --git a/rootly_sdk/models/functionality_list.py b/rootly_sdk/models/functionality_list.py index 2a7d67f3..fbc1c27f 100644 --- a/rootly_sdk/models/functionality_list.py +++ b/rootly_sdk/models/functionality_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.functionality_list_data_item import FunctionalityListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class FunctionalityList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.functionality_list_data_item import FunctionalityListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/functionality_list_data_item.py b/rootly_sdk/models/functionality_list_data_item.py index d5d0807e..df02f6b2 100644 --- a/rootly_sdk/models/functionality_list_data_item.py +++ b/rootly_sdk/models/functionality_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.functionality_list_data_item_type import check_functionality_list_data_item_type -from ..models.functionality_list_data_item_type import FunctionalityListDataItemType -from typing import cast +from ..models.functionality_list_data_item_type import ( + FunctionalityListDataItemType, + check_functionality_list_data_item_type, +) if TYPE_CHECKING: from ..models.functionality import Functionality @@ -34,7 +33,6 @@ class FunctionalityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.functionality import Functionality id = self.id diff --git a/rootly_sdk/models/functionality_properties_type_0_item.py b/rootly_sdk/models/functionality_properties_type_0_item.py index 8e7331a6..6bcb6048 100644 --- a/rootly_sdk/models/functionality_properties_type_0_item.py +++ b/rootly_sdk/models/functionality_properties_type_0_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="FunctionalityPropertiesType0Item") diff --git a/rootly_sdk/models/functionality_response.py b/rootly_sdk/models/functionality_response.py index 61da71a9..87433a01 100644 --- a/rootly_sdk/models/functionality_response.py +++ b/rootly_sdk/models/functionality_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.functionality_response_data import FunctionalityResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class FunctionalityResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.functionality_response_data import FunctionalityResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/functionality_response_data.py b/rootly_sdk/models/functionality_response_data.py index 14de612d..cd1b0087 100644 --- a/rootly_sdk/models/functionality_response_data.py +++ b/rootly_sdk/models/functionality_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.functionality_response_data_type import check_functionality_response_data_type -from ..models.functionality_response_data_type import FunctionalityResponseDataType -from typing import cast +from ..models.functionality_response_data_type import ( + FunctionalityResponseDataType, + check_functionality_response_data_type, +) if TYPE_CHECKING: from ..models.functionality import Functionality @@ -34,7 +33,6 @@ class FunctionalityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.functionality import Functionality id = self.id 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 923494d9..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="FunctionalitySlackAliasesType0Item") 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 21dbfc17..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="FunctionalitySlackChannelsType0Item") diff --git a/rootly_sdk/models/get_alerts_task_params.py b/rootly_sdk/models/get_alerts_task_params.py index b4820ea9..ed386b43 100644 --- a/rootly_sdk/models/get_alerts_task_params.py +++ b/rootly_sdk/models/get_alerts_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.get_alerts_task_params_task_type import ( + GetAlertsTaskParamsTaskType, + check_get_alerts_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.get_alerts_task_params_task_type import check_get_alerts_task_params_task_type -from ..models.get_alerts_task_params_task_type import GetAlertsTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.get_alerts_task_params_parent_message_thread_task import GetAlertsTaskParamsParentMessageThreadTask from ..models.get_alerts_task_params_post_to_slack_channels_item import GetAlertsTaskParamsPostToSlackChannelsItem @@ -54,12 +53,6 @@ class GetAlertsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.get_alerts_task_params_parent_message_thread_task import ( - GetAlertsTaskParamsParentMessageThreadTask, - ) - from ..models.get_alerts_task_params_post_to_slack_channels_item import ( - GetAlertsTaskParamsPostToSlackChannelsItem, - ) past_duration = self.past_duration 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 9035b08e..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="GetAlertsTaskParamsParentMessageThreadTask") 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 2f5d7b67..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="GetAlertsTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/get_github_commits_task_params_type_0.py b/rootly_sdk/models/get_github_commits_task_params_type_0.py index 5ff0baf4..06c5ef0e 100644 --- a/rootly_sdk/models/get_github_commits_task_params_type_0.py +++ b/rootly_sdk/models/get_github_commits_task_params_type_0.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="GetGithubCommitsTaskParamsType0") diff --git a/rootly_sdk/models/get_github_commits_task_params_type_1.py b/rootly_sdk/models/get_github_commits_task_params_type_1.py index f6c8203b..76dedc3e 100644 --- a/rootly_sdk/models/get_github_commits_task_params_type_1.py +++ b/rootly_sdk/models/get_github_commits_task_params_type_1.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="GetGithubCommitsTaskParamsType1") diff --git a/rootly_sdk/models/get_gitlab_commits_task_params_type_0.py b/rootly_sdk/models/get_gitlab_commits_task_params_type_0.py index b59bd554..b4ead582 100644 --- a/rootly_sdk/models/get_gitlab_commits_task_params_type_0.py +++ b/rootly_sdk/models/get_gitlab_commits_task_params_type_0.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="GetGitlabCommitsTaskParamsType0") diff --git a/rootly_sdk/models/get_gitlab_commits_task_params_type_1.py b/rootly_sdk/models/get_gitlab_commits_task_params_type_1.py index 21a705dc..dac35eb7 100644 --- a/rootly_sdk/models/get_gitlab_commits_task_params_type_1.py +++ b/rootly_sdk/models/get_gitlab_commits_task_params_type_1.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="GetGitlabCommitsTaskParamsType1") diff --git a/rootly_sdk/models/get_pulses_task_params.py b/rootly_sdk/models/get_pulses_task_params.py index d959336d..9587716c 100644 --- a/rootly_sdk/models/get_pulses_task_params.py +++ b/rootly_sdk/models/get_pulses_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.get_pulses_task_params_task_type import ( + GetPulsesTaskParamsTaskType, + check_get_pulses_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.get_pulses_task_params_task_type import check_get_pulses_task_params_task_type -from ..models.get_pulses_task_params_task_type import GetPulsesTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.get_pulses_task_params_parent_message_thread_task import GetPulsesTaskParamsParentMessageThreadTask from ..models.get_pulses_task_params_post_to_slack_channels_item import GetPulsesTaskParamsPostToSlackChannelsItem @@ -56,12 +55,6 @@ class GetPulsesTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.get_pulses_task_params_parent_message_thread_task import ( - GetPulsesTaskParamsParentMessageThreadTask, - ) - from ..models.get_pulses_task_params_post_to_slack_channels_item import ( - GetPulsesTaskParamsPostToSlackChannelsItem, - ) past_duration = self.past_duration 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 d1ed0018..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="GetPulsesTaskParamsParentMessageThreadTask") 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 483104a4..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="GetPulsesTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/heartbeat.py b/rootly_sdk/models/heartbeat.py index 19c6250b..43738654 100644 --- a/rootly_sdk/models/heartbeat.py +++ b/rootly_sdk/models/heartbeat.py @@ -1,23 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.heartbeat_interval_unit import HeartbeatIntervalUnit, check_heartbeat_interval_unit +from ..models.heartbeat_notification_target_type import ( + HeartbeatNotificationTargetType, + check_heartbeat_notification_target_type, +) +from ..models.heartbeat_status import HeartbeatStatus, check_heartbeat_status from ..types import UNSET, Unset -from ..models.heartbeat_interval_unit import check_heartbeat_interval_unit -from ..models.heartbeat_interval_unit import HeartbeatIntervalUnit -from ..models.heartbeat_notification_target_type import check_heartbeat_notification_target_type -from ..models.heartbeat_notification_target_type import HeartbeatNotificationTargetType -from ..models.heartbeat_status import check_heartbeat_status -from ..models.heartbeat_status import HeartbeatStatus -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Heartbeat") diff --git a/rootly_sdk/models/heartbeat_list.py b/rootly_sdk/models/heartbeat_list.py index 0dd1f6a7..1253d2f0 100644 --- a/rootly_sdk/models/heartbeat_list.py +++ b/rootly_sdk/models/heartbeat_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.heartbeat_list_data_item import HeartbeatListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class HeartbeatList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.heartbeat_list_data_item import HeartbeatListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/heartbeat_list_data_item.py b/rootly_sdk/models/heartbeat_list_data_item.py index 8939b536..05cec67e 100644 --- a/rootly_sdk/models/heartbeat_list_data_item.py +++ b/rootly_sdk/models/heartbeat_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.heartbeat_list_data_item_type import check_heartbeat_list_data_item_type -from ..models.heartbeat_list_data_item_type import HeartbeatListDataItemType -from typing import cast +from ..models.heartbeat_list_data_item_type import HeartbeatListDataItemType, check_heartbeat_list_data_item_type if TYPE_CHECKING: from ..models.heartbeat import Heartbeat @@ -34,7 +30,6 @@ class HeartbeatListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.heartbeat import Heartbeat id = self.id diff --git a/rootly_sdk/models/heartbeat_response.py b/rootly_sdk/models/heartbeat_response.py index 8291e91e..46bc93e1 100644 --- a/rootly_sdk/models/heartbeat_response.py +++ b/rootly_sdk/models/heartbeat_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.heartbeat_response_data import HeartbeatResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class HeartbeatResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.heartbeat_response_data import HeartbeatResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/heartbeat_response_data.py b/rootly_sdk/models/heartbeat_response_data.py index 15cd7583..59c3a427 100644 --- a/rootly_sdk/models/heartbeat_response_data.py +++ b/rootly_sdk/models/heartbeat_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.heartbeat_response_data_type import check_heartbeat_response_data_type -from ..models.heartbeat_response_data_type import HeartbeatResponseDataType -from typing import cast +from ..models.heartbeat_response_data_type import HeartbeatResponseDataType, check_heartbeat_response_data_type if TYPE_CHECKING: from ..models.heartbeat import Heartbeat @@ -34,7 +30,6 @@ class HeartbeatResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.heartbeat import Heartbeat id = self.id diff --git a/rootly_sdk/models/http_client_task_params.py b/rootly_sdk/models/http_client_task_params.py index f233febe..69e1619d 100644 --- a/rootly_sdk/models/http_client_task_params.py +++ b/rootly_sdk/models/http_client_task_params.py @@ -1,20 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.http_client_task_params_method import HttpClientTaskParamsMethod, check_http_client_task_params_method +from ..models.http_client_task_params_task_type import ( + HttpClientTaskParamsTaskType, + check_http_client_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.http_client_task_params_method import check_http_client_task_params_method -from ..models.http_client_task_params_method import HttpClientTaskParamsMethod -from ..models.http_client_task_params_task_type import check_http_client_task_params_task_type -from ..models.http_client_task_params_task_type import HttpClientTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.http_client_task_params_post_to_slack_channels_item import HttpClientTaskParamsPostToSlackChannelsItem @@ -60,9 +58,6 @@ class HttpClientTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.http_client_task_params_post_to_slack_channels_item import ( - HttpClientTaskParamsPostToSlackChannelsItem, - ) url = self.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 e493eea7..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="HttpClientTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/import_meeting_recording.py b/rootly_sdk/models/import_meeting_recording.py index e3512ea8..fb318d24 100644 --- a/rootly_sdk/models/import_meeting_recording.py +++ b/rootly_sdk/models/import_meeting_recording.py @@ -1,23 +1,20 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - -from ..models.import_meeting_recording_platform import check_import_meeting_recording_platform -from ..models.import_meeting_recording_platform import ImportMeetingRecordingPlatform -from ..models.import_meeting_recording_source import check_import_meeting_recording_source -from ..models.import_meeting_recording_source import ImportMeetingRecordingSource -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -from uuid import UUID -import datetime +from ..models.import_meeting_recording_platform import ( + ImportMeetingRecordingPlatform, + check_import_meeting_recording_platform, +) +from ..models.import_meeting_recording_source import ImportMeetingRecordingSource, check_import_meeting_recording_source +from ..types import UNSET, Unset T = TypeVar("T", bound="ImportMeetingRecording") diff --git a/rootly_sdk/models/in_triage_incident.py b/rootly_sdk/models/in_triage_incident.py index 6450f8f9..bd1a66ca 100644 --- a/rootly_sdk/models/in_triage_incident.py +++ b/rootly_sdk/models/in_triage_incident.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.in_triage_incident_data import InTriageIncidentData @@ -28,7 +24,6 @@ class InTriageIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.in_triage_incident_data import InTriageIncidentData data = self.data.to_dict() diff --git a/rootly_sdk/models/in_triage_incident_data.py b/rootly_sdk/models/in_triage_incident_data.py index 7533688f..7b9e4f40 100644 --- a/rootly_sdk/models/in_triage_incident_data.py +++ b/rootly_sdk/models/in_triage_incident_data.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.in_triage_incident_data_type import check_in_triage_incident_data_type -from ..models.in_triage_incident_data_type import InTriageIncidentDataType -from typing import cast - +from ..models.in_triage_incident_data_type import InTriageIncidentDataType, check_in_triage_incident_data_type T = TypeVar("T", bound="InTriageIncidentData") diff --git a/rootly_sdk/models/incident.py b/rootly_sdk/models/incident.py index b240b93f..408a7e53 100644 --- a/rootly_sdk/models/incident.py +++ b/rootly_sdk/models/incident.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incident_retrospective_progress_status import ( + IncidentRetrospectiveProgressStatus, + check_incident_retrospective_progress_status, +) from ..types import UNSET, Unset -from ..models.incident_retrospective_progress_status import check_incident_retrospective_progress_status -from ..models.incident_retrospective_progress_status import IncidentRetrospectiveProgressStatus -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.environment_response import EnvironmentResponse from ..models.functionality_response import FunctionalityResponse @@ -319,23 +318,14 @@ class Incident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_closed_by_type_0 import IncidentClosedByType0 from ..models.incident_cancelled_by_type_0 import IncidentCancelledByType0 - from ..models.team_response import TeamResponse - from ..models.functionality_response import FunctionalityResponse - from ..models.incident_type_response import IncidentTypeResponse + from ..models.incident_closed_by_type_0 import IncidentClosedByType0 from ..models.incident_in_triage_by_type_0 import IncidentInTriageByType0 - from ..models.service_response import ServiceResponse - from ..models.severity_response import SeverityResponse - from ..models.incident_started_by_type_0 import IncidentStartedByType0 - from ..models.environment_response import EnvironmentResponse - from ..models.incident_user_type_0 import IncidentUserType0 from ..models.incident_labels_type_0 import IncidentLabelsType0 - from ..models.incident_resolved_by_type_0 import IncidentResolvedByType0 - from ..models.incident_zoom_meeting_global_dial_in_numbers_type_0_item import ( - IncidentZoomMeetingGlobalDialInNumbersType0Item, - ) from ..models.incident_mitigated_by_type_0 import IncidentMitigatedByType0 + from ..models.incident_resolved_by_type_0 import IncidentResolvedByType0 + from ..models.incident_started_by_type_0 import IncidentStartedByType0 + from ..models.incident_user_type_0 import IncidentUserType0 title = self.title diff --git a/rootly_sdk/models/incident_action_item.py b/rootly_sdk/models/incident_action_item.py index deaccfce..ded60de4 100644 --- a/rootly_sdk/models/incident_action_item.py +++ b/rootly_sdk/models/incident_action_item.py @@ -1,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incident_action_item_kind import IncidentActionItemKind, check_incident_action_item_kind +from ..models.incident_action_item_priority import IncidentActionItemPriority, check_incident_action_item_priority +from ..models.incident_action_item_status import IncidentActionItemStatus, check_incident_action_item_status from ..types import UNSET, Unset -from ..models.incident_action_item_kind import check_incident_action_item_kind -from ..models.incident_action_item_kind import IncidentActionItemKind -from ..models.incident_action_item_priority import check_incident_action_item_priority -from ..models.incident_action_item_priority import IncidentActionItemPriority -from ..models.incident_action_item_status import check_incident_action_item_status -from ..models.incident_action_item_status import IncidentActionItemStatus -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.user_flat_response import UserFlatResponse @@ -63,7 +57,6 @@ class IncidentActionItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_flat_response import UserFlatResponse summary = self.summary diff --git a/rootly_sdk/models/incident_action_item_list.py b/rootly_sdk/models/incident_action_item_list.py index 8448da7d..05633372 100644 --- a/rootly_sdk/models/incident_action_item_list.py +++ b/rootly_sdk/models/incident_action_item_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_action_item_list_data_item import IncidentActionItemListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentActionItemList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_action_item_list_data_item import IncidentActionItemListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 1e44486c..ce06e3de 100644 --- a/rootly_sdk/models/incident_action_item_list_data_item.py +++ b/rootly_sdk/models/incident_action_item_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_action_item_list_data_item_type import check_incident_action_item_list_data_item_type -from ..models.incident_action_item_list_data_item_type import IncidentActionItemListDataItemType -from typing import cast +from ..models.incident_action_item_list_data_item_type import ( + IncidentActionItemListDataItemType, + check_incident_action_item_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_action_item import IncidentActionItem @@ -34,7 +33,6 @@ class IncidentActionItemListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_action_item import IncidentActionItem id = self.id diff --git a/rootly_sdk/models/incident_action_item_response.py b/rootly_sdk/models/incident_action_item_response.py index da3d887d..02edb2d1 100644 --- a/rootly_sdk/models/incident_action_item_response.py +++ b/rootly_sdk/models/incident_action_item_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_action_item_response_data import IncidentActionItemResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentActionItemResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_action_item_response_data import IncidentActionItemResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_action_item_response_data.py b/rootly_sdk/models/incident_action_item_response_data.py index c7d87d82..6a0ef40e 100644 --- a/rootly_sdk/models/incident_action_item_response_data.py +++ b/rootly_sdk/models/incident_action_item_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_action_item_response_data_type import check_incident_action_item_response_data_type -from ..models.incident_action_item_response_data_type import IncidentActionItemResponseDataType -from typing import cast +from ..models.incident_action_item_response_data_type import ( + IncidentActionItemResponseDataType, + check_incident_action_item_response_data_type, +) if TYPE_CHECKING: from ..models.incident_action_item import IncidentActionItem @@ -34,7 +33,6 @@ class IncidentActionItemResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_action_item import IncidentActionItem id = self.id diff --git a/rootly_sdk/models/incident_cancelled_by_type_0.py b/rootly_sdk/models/incident_cancelled_by_type_0.py index 85d7a5bb..0e7a89aa 100644 --- a/rootly_sdk/models/incident_cancelled_by_type_0.py +++ b/rootly_sdk/models/incident_cancelled_by_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentCancelledByType0") diff --git a/rootly_sdk/models/incident_closed_by_type_0.py b/rootly_sdk/models/incident_closed_by_type_0.py index 4e04ad14..27fb3bfc 100644 --- a/rootly_sdk/models/incident_closed_by_type_0.py +++ b/rootly_sdk/models/incident_closed_by_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentClosedByType0") diff --git a/rootly_sdk/models/incident_custom_field_selection.py b/rootly_sdk/models/incident_custom_field_selection.py index 4e553f96..8fb65665 100644 --- a/rootly_sdk/models/incident_custom_field_selection.py +++ b/rootly_sdk/models/incident_custom_field_selection.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentCustomFieldSelection") diff --git a/rootly_sdk/models/incident_custom_field_selection_list.py b/rootly_sdk/models/incident_custom_field_selection_list.py index 5f9cfb0d..da3943db 100644 --- a/rootly_sdk/models/incident_custom_field_selection_list.py +++ b/rootly_sdk/models/incident_custom_field_selection_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_custom_field_selection_list_data_item import IncidentCustomFieldSelectionListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentCustomFieldSelectionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_custom_field_selection_list_data_item import IncidentCustomFieldSelectionListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 59cf9a29..699bb419 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,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_custom_field_selection_list_data_item_type import ( + IncidentCustomFieldSelectionListDataItemType, check_incident_custom_field_selection_list_data_item_type, ) -from ..models.incident_custom_field_selection_list_data_item_type import IncidentCustomFieldSelectionListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.incident_custom_field_selection import IncidentCustomFieldSelection @@ -36,7 +33,6 @@ class IncidentCustomFieldSelectionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_custom_field_selection import IncidentCustomFieldSelection id = self.id diff --git a/rootly_sdk/models/incident_custom_field_selection_response.py b/rootly_sdk/models/incident_custom_field_selection_response.py index a52eea6e..2f0b51f0 100644 --- a/rootly_sdk/models/incident_custom_field_selection_response.py +++ b/rootly_sdk/models/incident_custom_field_selection_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_custom_field_selection_response_data import IncidentCustomFieldSelectionResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentCustomFieldSelectionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_custom_field_selection_response_data import IncidentCustomFieldSelectionResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() 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 c65dda61..7648082d 100644 --- a/rootly_sdk/models/incident_custom_field_selection_response_data.py +++ b/rootly_sdk/models/incident_custom_field_selection_response_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_custom_field_selection_response_data_type import ( + IncidentCustomFieldSelectionResponseDataType, check_incident_custom_field_selection_response_data_type, ) -from ..models.incident_custom_field_selection_response_data_type import IncidentCustomFieldSelectionResponseDataType -from typing import cast if TYPE_CHECKING: from ..models.incident_custom_field_selection import IncidentCustomFieldSelection @@ -36,7 +33,6 @@ class IncidentCustomFieldSelectionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_custom_field_selection import IncidentCustomFieldSelection id = self.id diff --git a/rootly_sdk/models/incident_event.py b/rootly_sdk/models/incident_event.py index da86e1f4..0f1d3de6 100644 --- a/rootly_sdk/models/incident_event.py +++ b/rootly_sdk/models/incident_event.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incident_event_visibility import IncidentEventVisibility, check_incident_event_visibility from ..types import UNSET, Unset -from ..models.incident_event_visibility import check_incident_event_visibility -from ..models.incident_event_visibility import IncidentEventVisibility -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentEvent") diff --git a/rootly_sdk/models/incident_event_functionality.py b/rootly_sdk/models/incident_event_functionality.py index 8ce827b8..2283fbd7 100644 --- a/rootly_sdk/models/incident_event_functionality.py +++ b/rootly_sdk/models/incident_event_functionality.py @@ -1,17 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -from ..models.incident_event_functionality_status import check_incident_event_functionality_status -from ..models.incident_event_functionality_status import IncidentEventFunctionalityStatus -from typing import cast +from ..models.incident_event_functionality_status import ( + IncidentEventFunctionalityStatus, + check_incident_event_functionality_status, +) T = TypeVar("T", bound="IncidentEventFunctionality") diff --git a/rootly_sdk/models/incident_event_functionality_list.py b/rootly_sdk/models/incident_event_functionality_list.py index b476452d..eb338790 100644 --- a/rootly_sdk/models/incident_event_functionality_list.py +++ b/rootly_sdk/models/incident_event_functionality_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_event_functionality_list_data_item import IncidentEventFunctionalityListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentEventFunctionalityList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.incident_event_functionality_list_data_item import IncidentEventFunctionalityListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 4c1452df..3c9b49cc 100644 --- a/rootly_sdk/models/incident_event_functionality_list_data_item.py +++ b/rootly_sdk/models/incident_event_functionality_list_data_item.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_event_functionality_list_data_item_type import ( + IncidentEventFunctionalityListDataItemType, check_incident_event_functionality_list_data_item_type, ) -from ..models.incident_event_functionality_list_data_item_type import IncidentEventFunctionalityListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.incident_event_functionality import IncidentEventFunctionality @@ -36,7 +33,6 @@ class IncidentEventFunctionalityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_event_functionality import IncidentEventFunctionality id = self.id diff --git a/rootly_sdk/models/incident_event_functionality_response.py b/rootly_sdk/models/incident_event_functionality_response.py index 70135ed3..6f00656f 100644 --- a/rootly_sdk/models/incident_event_functionality_response.py +++ b/rootly_sdk/models/incident_event_functionality_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_event_functionality_response_data import IncidentEventFunctionalityResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentEventFunctionalityResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.incident_event_functionality_response_data import IncidentEventFunctionalityResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_event_functionality_response_data.py b/rootly_sdk/models/incident_event_functionality_response_data.py index 13525275..76ca707a 100644 --- a/rootly_sdk/models/incident_event_functionality_response_data.py +++ b/rootly_sdk/models/incident_event_functionality_response_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_event_functionality_response_data_type import ( + IncidentEventFunctionalityResponseDataType, check_incident_event_functionality_response_data_type, ) -from ..models.incident_event_functionality_response_data_type import IncidentEventFunctionalityResponseDataType -from typing import cast if TYPE_CHECKING: from ..models.incident_event_functionality import IncidentEventFunctionality @@ -36,7 +33,6 @@ class IncidentEventFunctionalityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_event_functionality import IncidentEventFunctionality id = self.id diff --git a/rootly_sdk/models/incident_event_list.py b/rootly_sdk/models/incident_event_list.py index 019a9b61..10bdd165 100644 --- a/rootly_sdk/models/incident_event_list.py +++ b/rootly_sdk/models/incident_event_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_event_list_data_item import IncidentEventListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentEventList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.incident_event_list_data_item import IncidentEventListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/incident_event_list_data_item.py b/rootly_sdk/models/incident_event_list_data_item.py index 8e30ac6f..40a5cfc6 100644 --- a/rootly_sdk/models/incident_event_list_data_item.py +++ b/rootly_sdk/models/incident_event_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_event_list_data_item_type import check_incident_event_list_data_item_type -from ..models.incident_event_list_data_item_type import IncidentEventListDataItemType -from typing import cast +from ..models.incident_event_list_data_item_type import ( + IncidentEventListDataItemType, + check_incident_event_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_event import IncidentEvent @@ -34,7 +33,6 @@ class IncidentEventListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_event import IncidentEvent id = self.id diff --git a/rootly_sdk/models/incident_event_response.py b/rootly_sdk/models/incident_event_response.py index 187b3b29..13afb6a3 100644 --- a/rootly_sdk/models/incident_event_response.py +++ b/rootly_sdk/models/incident_event_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_event_response_data import IncidentEventResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentEventResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.incident_event_response_data import IncidentEventResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_event_response_data.py b/rootly_sdk/models/incident_event_response_data.py index 57564173..e276e0a7 100644 --- a/rootly_sdk/models/incident_event_response_data.py +++ b/rootly_sdk/models/incident_event_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_event_response_data_type import check_incident_event_response_data_type -from ..models.incident_event_response_data_type import IncidentEventResponseDataType -from typing import cast +from ..models.incident_event_response_data_type import ( + IncidentEventResponseDataType, + check_incident_event_response_data_type, +) if TYPE_CHECKING: from ..models.incident_event import IncidentEvent @@ -34,7 +33,6 @@ class IncidentEventResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_event import IncidentEvent id = self.id diff --git a/rootly_sdk/models/incident_event_service.py b/rootly_sdk/models/incident_event_service.py index a295e27c..1353bf73 100644 --- a/rootly_sdk/models/incident_event_service.py +++ b/rootly_sdk/models/incident_event_service.py @@ -1,17 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -from ..models.incident_event_service_status import check_incident_event_service_status -from ..models.incident_event_service_status import IncidentEventServiceStatus -from typing import cast +from ..models.incident_event_service_status import IncidentEventServiceStatus, check_incident_event_service_status T = TypeVar("T", bound="IncidentEventService") diff --git a/rootly_sdk/models/incident_event_service_list.py b/rootly_sdk/models/incident_event_service_list.py index bcd484b1..d23a4196 100644 --- a/rootly_sdk/models/incident_event_service_list.py +++ b/rootly_sdk/models/incident_event_service_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_event_service_list_data_item import IncidentEventServiceListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentEventServiceList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_event_service_list_data_item import IncidentEventServiceListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 36833623..ac443528 100644 --- a/rootly_sdk/models/incident_event_service_list_data_item.py +++ b/rootly_sdk/models/incident_event_service_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_event_service_list_data_item_type import check_incident_event_service_list_data_item_type -from ..models.incident_event_service_list_data_item_type import IncidentEventServiceListDataItemType -from typing import cast +from ..models.incident_event_service_list_data_item_type import ( + IncidentEventServiceListDataItemType, + check_incident_event_service_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_event_service import IncidentEventService @@ -34,7 +33,6 @@ class IncidentEventServiceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_event_service import IncidentEventService id = self.id diff --git a/rootly_sdk/models/incident_event_service_response.py b/rootly_sdk/models/incident_event_service_response.py index 0957d249..ddb7faf7 100644 --- a/rootly_sdk/models/incident_event_service_response.py +++ b/rootly_sdk/models/incident_event_service_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_event_service_response_data import IncidentEventServiceResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentEventServiceResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_event_service_response_data import IncidentEventServiceResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_event_service_response_data.py b/rootly_sdk/models/incident_event_service_response_data.py index 7f978295..f1c45109 100644 --- a/rootly_sdk/models/incident_event_service_response_data.py +++ b/rootly_sdk/models/incident_event_service_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_event_service_response_data_type import check_incident_event_service_response_data_type -from ..models.incident_event_service_response_data_type import IncidentEventServiceResponseDataType -from typing import cast +from ..models.incident_event_service_response_data_type import ( + IncidentEventServiceResponseDataType, + check_incident_event_service_response_data_type, +) if TYPE_CHECKING: from ..models.incident_event_service import IncidentEventService @@ -34,7 +33,6 @@ class IncidentEventServiceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_event_service import IncidentEventService id = self.id diff --git a/rootly_sdk/models/incident_feedback.py b/rootly_sdk/models/incident_feedback.py index cc97403e..4ea237d8 100644 --- a/rootly_sdk/models/incident_feedback.py +++ b/rootly_sdk/models/incident_feedback.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.incident_feedback_rating import check_incident_feedback_rating -from ..models.incident_feedback_rating import IncidentFeedbackRating -from typing import cast - +from ..models.incident_feedback_rating import IncidentFeedbackRating, check_incident_feedback_rating T = TypeVar("T", bound="IncidentFeedback") diff --git a/rootly_sdk/models/incident_feedback_list.py b/rootly_sdk/models/incident_feedback_list.py index 5d6539cc..06f51a82 100644 --- a/rootly_sdk/models/incident_feedback_list.py +++ b/rootly_sdk/models/incident_feedback_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_feedback_list_data_item import IncidentFeedbackListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentFeedbackList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_feedback_list_data_item import IncidentFeedbackListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/incident_feedback_list_data_item.py b/rootly_sdk/models/incident_feedback_list_data_item.py index 8bd199ea..90c09921 100644 --- a/rootly_sdk/models/incident_feedback_list_data_item.py +++ b/rootly_sdk/models/incident_feedback_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_feedback_list_data_item_type import check_incident_feedback_list_data_item_type -from ..models.incident_feedback_list_data_item_type import IncidentFeedbackListDataItemType -from typing import cast +from ..models.incident_feedback_list_data_item_type import ( + IncidentFeedbackListDataItemType, + check_incident_feedback_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_feedback import IncidentFeedback @@ -34,7 +33,6 @@ class IncidentFeedbackListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_feedback import IncidentFeedback id = self.id diff --git a/rootly_sdk/models/incident_feedback_response.py b/rootly_sdk/models/incident_feedback_response.py index 88c6f6cd..11592806 100644 --- a/rootly_sdk/models/incident_feedback_response.py +++ b/rootly_sdk/models/incident_feedback_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_feedback_response_data import IncidentFeedbackResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentFeedbackResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_feedback_response_data import IncidentFeedbackResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_feedback_response_data.py b/rootly_sdk/models/incident_feedback_response_data.py index 1faf645c..a152326c 100644 --- a/rootly_sdk/models/incident_feedback_response_data.py +++ b/rootly_sdk/models/incident_feedback_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_feedback_response_data_type import check_incident_feedback_response_data_type -from ..models.incident_feedback_response_data_type import IncidentFeedbackResponseDataType -from typing import cast +from ..models.incident_feedback_response_data_type import ( + IncidentFeedbackResponseDataType, + check_incident_feedback_response_data_type, +) if TYPE_CHECKING: from ..models.incident_feedback import IncidentFeedback @@ -34,7 +33,6 @@ class IncidentFeedbackResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_feedback import IncidentFeedback id = self.id diff --git a/rootly_sdk/models/incident_form_field_selection.py b/rootly_sdk/models/incident_form_field_selection.py index 40d0a190..546b0afb 100644 --- a/rootly_sdk/models/incident_form_field_selection.py +++ b/rootly_sdk/models/incident_form_field_selection.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentFormFieldSelection") diff --git a/rootly_sdk/models/incident_form_field_selection_list.py b/rootly_sdk/models/incident_form_field_selection_list.py index 57c40191..01551dd3 100644 --- a/rootly_sdk/models/incident_form_field_selection_list.py +++ b/rootly_sdk/models/incident_form_field_selection_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_form_field_selection_list_data_item import IncidentFormFieldSelectionListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentFormFieldSelectionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_form_field_selection_list_data_item import IncidentFormFieldSelectionListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 ae4c5cfe..009d5fca 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,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_form_field_selection_list_data_item_type import ( + IncidentFormFieldSelectionListDataItemType, check_incident_form_field_selection_list_data_item_type, ) -from ..models.incident_form_field_selection_list_data_item_type import IncidentFormFieldSelectionListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.incident_form_field_selection import IncidentFormFieldSelection @@ -36,7 +33,6 @@ class IncidentFormFieldSelectionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_form_field_selection import IncidentFormFieldSelection id = self.id diff --git a/rootly_sdk/models/incident_form_field_selection_response.py b/rootly_sdk/models/incident_form_field_selection_response.py index be6c673f..ee4c86c0 100644 --- a/rootly_sdk/models/incident_form_field_selection_response.py +++ b/rootly_sdk/models/incident_form_field_selection_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_form_field_selection_response_data import IncidentFormFieldSelectionResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentFormFieldSelectionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.incident_form_field_selection_response_data import IncidentFormFieldSelectionResponseData data = self.data.to_dict() 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 d35bdb35..0054ff14 100644 --- a/rootly_sdk/models/incident_form_field_selection_response_data.py +++ b/rootly_sdk/models/incident_form_field_selection_response_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_form_field_selection_response_data_type import ( + IncidentFormFieldSelectionResponseDataType, check_incident_form_field_selection_response_data_type, ) -from ..models.incident_form_field_selection_response_data_type import IncidentFormFieldSelectionResponseDataType -from typing import cast if TYPE_CHECKING: from ..models.incident_form_field_selection import IncidentFormFieldSelection @@ -36,7 +33,6 @@ class IncidentFormFieldSelectionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_form_field_selection import IncidentFormFieldSelection id = self.id 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 7e9f80d0..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentInTriageByType0") diff --git a/rootly_sdk/models/incident_labels_type_0.py b/rootly_sdk/models/incident_labels_type_0.py index a87ab663..44337a9d 100644 --- a/rootly_sdk/models/incident_labels_type_0.py +++ b/rootly_sdk/models/incident_labels_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentLabelsType0") diff --git a/rootly_sdk/models/incident_list.py b/rootly_sdk/models/incident_list.py index ba61e423..f5784afc 100644 --- a/rootly_sdk/models/incident_list.py +++ b/rootly_sdk/models/incident_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_list_data_item import IncidentListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.incident_list_data_item import IncidentListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/incident_list_data_item.py b/rootly_sdk/models/incident_list_data_item.py index e245c20d..51547f46 100644 --- a/rootly_sdk/models/incident_list_data_item.py +++ b/rootly_sdk/models/incident_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_list_data_item_type import check_incident_list_data_item_type -from ..models.incident_list_data_item_type import IncidentListDataItemType -from typing import cast +from ..models.incident_list_data_item_type import IncidentListDataItemType, check_incident_list_data_item_type if TYPE_CHECKING: from ..models.incident import Incident @@ -34,7 +30,6 @@ class IncidentListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident import Incident id = self.id diff --git a/rootly_sdk/models/incident_mitigated_by_type_0.py b/rootly_sdk/models/incident_mitigated_by_type_0.py index 67f742cd..cb9cdf55 100644 --- a/rootly_sdk/models/incident_mitigated_by_type_0.py +++ b/rootly_sdk/models/incident_mitigated_by_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentMitigatedByType0") diff --git a/rootly_sdk/models/incident_permission_set.py b/rootly_sdk/models/incident_permission_set.py index 07e24708..ea4d766a 100644 --- a/rootly_sdk/models/incident_permission_set.py +++ b/rootly_sdk/models/incident_permission_set.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_permission_set_private_incident_permissions_item import ( - check_incident_permission_set_private_incident_permissions_item, -) from ..models.incident_permission_set_private_incident_permissions_item import ( IncidentPermissionSetPrivateIncidentPermissionsItem, -) -from ..models.incident_permission_set_public_incident_permissions_item import ( - check_incident_permission_set_public_incident_permissions_item, + check_incident_permission_set_private_incident_permissions_item, ) from ..models.incident_permission_set_public_incident_permissions_item import ( IncidentPermissionSetPublicIncidentPermissionsItem, + check_incident_permission_set_public_incident_permissions_item, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="IncidentPermissionSet") diff --git a/rootly_sdk/models/incident_permission_set_boolean.py b/rootly_sdk/models/incident_permission_set_boolean.py index cb873ce4..681230c8 100644 --- a/rootly_sdk/models/incident_permission_set_boolean.py +++ b/rootly_sdk/models/incident_permission_set_boolean.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incident_permission_set_boolean_kind import ( + IncidentPermissionSetBooleanKind, + check_incident_permission_set_boolean_kind, +) from ..types import UNSET, Unset -from ..models.incident_permission_set_boolean_kind import check_incident_permission_set_boolean_kind -from ..models.incident_permission_set_boolean_kind import IncidentPermissionSetBooleanKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentPermissionSetBoolean") diff --git a/rootly_sdk/models/incident_permission_set_boolean_list.py b/rootly_sdk/models/incident_permission_set_boolean_list.py index de19146e..311b960e 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_list.py +++ b/rootly_sdk/models/incident_permission_set_boolean_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_permission_set_boolean_list_data_item import IncidentPermissionSetBooleanListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentPermissionSetBooleanList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.incident_permission_set_boolean_list_data_item import IncidentPermissionSetBooleanListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 29ffdb77..9297d83e 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,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_permission_set_boolean_list_data_item_type import ( + IncidentPermissionSetBooleanListDataItemType, check_incident_permission_set_boolean_list_data_item_type, ) -from ..models.incident_permission_set_boolean_list_data_item_type import IncidentPermissionSetBooleanListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set_boolean import IncidentPermissionSetBoolean @@ -36,7 +33,6 @@ class IncidentPermissionSetBooleanListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_permission_set_boolean import IncidentPermissionSetBoolean id = self.id diff --git a/rootly_sdk/models/incident_permission_set_boolean_response.py b/rootly_sdk/models/incident_permission_set_boolean_response.py index fa4a3acf..ec8e91de 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_response.py +++ b/rootly_sdk/models/incident_permission_set_boolean_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_permission_set_boolean_response_data import IncidentPermissionSetBooleanResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentPermissionSetBooleanResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.incident_permission_set_boolean_response_data import IncidentPermissionSetBooleanResponseData data = self.data.to_dict() 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 652d9191..1c20c8e0 100644 --- a/rootly_sdk/models/incident_permission_set_boolean_response_data.py +++ b/rootly_sdk/models/incident_permission_set_boolean_response_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_permission_set_boolean_response_data_type import ( + IncidentPermissionSetBooleanResponseDataType, check_incident_permission_set_boolean_response_data_type, ) -from ..models.incident_permission_set_boolean_response_data_type import IncidentPermissionSetBooleanResponseDataType -from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set_boolean import IncidentPermissionSetBoolean @@ -36,7 +33,6 @@ class IncidentPermissionSetBooleanResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_permission_set_boolean import IncidentPermissionSetBoolean id = self.id diff --git a/rootly_sdk/models/incident_permission_set_list.py b/rootly_sdk/models/incident_permission_set_list.py index 358ce75d..4330dfc6 100644 --- a/rootly_sdk/models/incident_permission_set_list.py +++ b/rootly_sdk/models/incident_permission_set_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_permission_set_list_data_item import IncidentPermissionSetListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentPermissionSetList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.incident_permission_set_list_data_item import IncidentPermissionSetListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 92700408..33f81a19 100644 --- a/rootly_sdk/models/incident_permission_set_list_data_item.py +++ b/rootly_sdk/models/incident_permission_set_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_permission_set_list_data_item_type import check_incident_permission_set_list_data_item_type -from ..models.incident_permission_set_list_data_item_type import IncidentPermissionSetListDataItemType -from typing import cast +from ..models.incident_permission_set_list_data_item_type import ( + IncidentPermissionSetListDataItemType, + check_incident_permission_set_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_permission_set import IncidentPermissionSet @@ -34,7 +33,6 @@ class IncidentPermissionSetListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_permission_set import IncidentPermissionSet id = self.id diff --git a/rootly_sdk/models/incident_permission_set_resource.py b/rootly_sdk/models/incident_permission_set_resource.py index 0f944fea..301cd270 100644 --- a/rootly_sdk/models/incident_permission_set_resource.py +++ b/rootly_sdk/models/incident_permission_set_resource.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incident_permission_set_resource_kind import ( + IncidentPermissionSetResourceKind, + check_incident_permission_set_resource_kind, +) from ..types import UNSET, Unset -from ..models.incident_permission_set_resource_kind import check_incident_permission_set_resource_kind -from ..models.incident_permission_set_resource_kind import IncidentPermissionSetResourceKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentPermissionSetResource") diff --git a/rootly_sdk/models/incident_permission_set_resource_list.py b/rootly_sdk/models/incident_permission_set_resource_list.py index 96c580ae..870d831f 100644 --- a/rootly_sdk/models/incident_permission_set_resource_list.py +++ b/rootly_sdk/models/incident_permission_set_resource_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_permission_set_resource_list_data_item import IncidentPermissionSetResourceListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentPermissionSetResourceList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.incident_permission_set_resource_list_data_item import IncidentPermissionSetResourceListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 51ee091c..83bca676 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,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_permission_set_resource_list_data_item_type import ( + IncidentPermissionSetResourceListDataItemType, check_incident_permission_set_resource_list_data_item_type, ) -from ..models.incident_permission_set_resource_list_data_item_type import IncidentPermissionSetResourceListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set_resource import IncidentPermissionSetResource @@ -36,7 +33,6 @@ class IncidentPermissionSetResourceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_permission_set_resource import IncidentPermissionSetResource id = self.id diff --git a/rootly_sdk/models/incident_permission_set_resource_response.py b/rootly_sdk/models/incident_permission_set_resource_response.py index 2fb46185..6808e8b3 100644 --- a/rootly_sdk/models/incident_permission_set_resource_response.py +++ b/rootly_sdk/models/incident_permission_set_resource_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_permission_set_resource_response_data import IncidentPermissionSetResourceResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentPermissionSetResourceResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_permission_set_resource_response_data import IncidentPermissionSetResourceResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() 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 7745b7ff..8e10e6a6 100644 --- a/rootly_sdk/models/incident_permission_set_resource_response_data.py +++ b/rootly_sdk/models/incident_permission_set_resource_response_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.incident_permission_set_resource_response_data_type import ( + IncidentPermissionSetResourceResponseDataType, check_incident_permission_set_resource_response_data_type, ) -from ..models.incident_permission_set_resource_response_data_type import IncidentPermissionSetResourceResponseDataType -from typing import cast if TYPE_CHECKING: from ..models.incident_permission_set_resource import IncidentPermissionSetResource @@ -36,7 +33,6 @@ class IncidentPermissionSetResourceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_permission_set_resource import IncidentPermissionSetResource id = self.id diff --git a/rootly_sdk/models/incident_permission_set_response.py b/rootly_sdk/models/incident_permission_set_response.py index 7904d11f..ea4b325f 100644 --- a/rootly_sdk/models/incident_permission_set_response.py +++ b/rootly_sdk/models/incident_permission_set_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_permission_set_response_data import IncidentPermissionSetResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentPermissionSetResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_permission_set_response_data import IncidentPermissionSetResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_permission_set_response_data.py b/rootly_sdk/models/incident_permission_set_response_data.py index 40f08023..d4248f2c 100644 --- a/rootly_sdk/models/incident_permission_set_response_data.py +++ b/rootly_sdk/models/incident_permission_set_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_permission_set_response_data_type import check_incident_permission_set_response_data_type -from ..models.incident_permission_set_response_data_type import IncidentPermissionSetResponseDataType -from typing import cast +from ..models.incident_permission_set_response_data_type import ( + IncidentPermissionSetResponseDataType, + check_incident_permission_set_response_data_type, +) if TYPE_CHECKING: from ..models.incident_permission_set import IncidentPermissionSet @@ -34,7 +33,6 @@ class IncidentPermissionSetResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_permission_set import IncidentPermissionSet id = self.id diff --git a/rootly_sdk/models/incident_post_mortem.py b/rootly_sdk/models/incident_post_mortem.py index 8b90cecc..b3798e39 100644 --- a/rootly_sdk/models/incident_post_mortem.py +++ b/rootly_sdk/models/incident_post_mortem.py @@ -1,21 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incident_post_mortem_show_timeline_order import ( + IncidentPostMortemShowTimelineOrder, + check_incident_post_mortem_show_timeline_order, +) +from ..models.incident_post_mortem_status import IncidentPostMortemStatus, check_incident_post_mortem_status from ..types import UNSET, Unset -from ..models.incident_post_mortem_show_timeline_order import check_incident_post_mortem_show_timeline_order -from ..models.incident_post_mortem_show_timeline_order import IncidentPostMortemShowTimelineOrder -from ..models.incident_post_mortem_status import check_incident_post_mortem_status -from ..models.incident_post_mortem_status import IncidentPostMortemStatus -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentPostMortem") diff --git a/rootly_sdk/models/incident_post_mortem_list.py b/rootly_sdk/models/incident_post_mortem_list.py index 5cc1a8d8..0fdca1ee 100644 --- a/rootly_sdk/models/incident_post_mortem_list.py +++ b/rootly_sdk/models/incident_post_mortem_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_post_mortem_list_data_item import IncidentPostMortemListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentPostMortemList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.incident_post_mortem_list_data_item import IncidentPostMortemListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 fff852cb..55d07674 100644 --- a/rootly_sdk/models/incident_post_mortem_list_data_item.py +++ b/rootly_sdk/models/incident_post_mortem_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_post_mortem_list_data_item_type import check_incident_post_mortem_list_data_item_type -from ..models.incident_post_mortem_list_data_item_type import IncidentPostMortemListDataItemType -from typing import cast +from ..models.incident_post_mortem_list_data_item_type import ( + IncidentPostMortemListDataItemType, + check_incident_post_mortem_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_post_mortem import IncidentPostMortem @@ -34,7 +33,6 @@ class IncidentPostMortemListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_post_mortem import IncidentPostMortem id = self.id diff --git a/rootly_sdk/models/incident_post_mortem_response.py b/rootly_sdk/models/incident_post_mortem_response.py index ab450a68..c76380cb 100644 --- a/rootly_sdk/models/incident_post_mortem_response.py +++ b/rootly_sdk/models/incident_post_mortem_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_post_mortem_response_data import IncidentPostMortemResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentPostMortemResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_post_mortem_response_data import IncidentPostMortemResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_post_mortem_response_data.py b/rootly_sdk/models/incident_post_mortem_response_data.py index 96d6c0ca..0fb9cf28 100644 --- a/rootly_sdk/models/incident_post_mortem_response_data.py +++ b/rootly_sdk/models/incident_post_mortem_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_post_mortem_response_data_type import check_incident_post_mortem_response_data_type -from ..models.incident_post_mortem_response_data_type import IncidentPostMortemResponseDataType -from typing import cast +from ..models.incident_post_mortem_response_data_type import ( + IncidentPostMortemResponseDataType, + check_incident_post_mortem_response_data_type, +) if TYPE_CHECKING: from ..models.incident_post_mortem import IncidentPostMortem @@ -34,7 +33,6 @@ class IncidentPostMortemResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_post_mortem import IncidentPostMortem id = self.id diff --git a/rootly_sdk/models/incident_resolved_by_type_0.py b/rootly_sdk/models/incident_resolved_by_type_0.py index f6b4b6dd..053c1026 100644 --- a/rootly_sdk/models/incident_resolved_by_type_0.py +++ b/rootly_sdk/models/incident_resolved_by_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentResolvedByType0") diff --git a/rootly_sdk/models/incident_response.py b/rootly_sdk/models/incident_response.py index 10c71c19..b865456f 100644 --- a/rootly_sdk/models/incident_response.py +++ b/rootly_sdk/models/incident_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_response_data import IncidentResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_response_data import IncidentResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_response_data.py b/rootly_sdk/models/incident_response_data.py index ab328923..99133947 100644 --- a/rootly_sdk/models/incident_response_data.py +++ b/rootly_sdk/models/incident_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_response_data_type import check_incident_response_data_type -from ..models.incident_response_data_type import IncidentResponseDataType -from typing import cast +from ..models.incident_response_data_type import IncidentResponseDataType, check_incident_response_data_type if TYPE_CHECKING: from ..models.incident import Incident @@ -34,7 +30,6 @@ class IncidentResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident import Incident id = self.id diff --git a/rootly_sdk/models/incident_retrospective_step.py b/rootly_sdk/models/incident_retrospective_step.py index 57bd9a30..96dca873 100644 --- a/rootly_sdk/models/incident_retrospective_step.py +++ b/rootly_sdk/models/incident_retrospective_step.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incident_retrospective_step_status import ( + IncidentRetrospectiveStepStatus, + check_incident_retrospective_step_status, +) from ..types import UNSET, Unset -from ..models.incident_retrospective_step_status import check_incident_retrospective_step_status -from ..models.incident_retrospective_step_status import IncidentRetrospectiveStepStatus -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentRetrospectiveStep") diff --git a/rootly_sdk/models/incident_retrospective_step_response.py b/rootly_sdk/models/incident_retrospective_step_response.py index 3812a1f6..1459b399 100644 --- a/rootly_sdk/models/incident_retrospective_step_response.py +++ b/rootly_sdk/models/incident_retrospective_step_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_retrospective_step_response_data import IncidentRetrospectiveStepResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentRetrospectiveStepResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_retrospective_step_response_data import IncidentRetrospectiveStepResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_retrospective_step_response_data.py b/rootly_sdk/models/incident_retrospective_step_response_data.py index 150af8ec..d8ffeff7 100644 --- a/rootly_sdk/models/incident_retrospective_step_response_data.py +++ b/rootly_sdk/models/incident_retrospective_step_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_retrospective_step_response_data_type import check_incident_retrospective_step_response_data_type -from ..models.incident_retrospective_step_response_data_type import IncidentRetrospectiveStepResponseDataType -from typing import cast +from ..models.incident_retrospective_step_response_data_type import ( + IncidentRetrospectiveStepResponseDataType, + check_incident_retrospective_step_response_data_type, +) if TYPE_CHECKING: from ..models.incident_retrospective_step import IncidentRetrospectiveStep @@ -34,7 +33,6 @@ class IncidentRetrospectiveStepResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_retrospective_step import IncidentRetrospectiveStep id = self.id diff --git a/rootly_sdk/models/incident_role.py b/rootly_sdk/models/incident_role.py index 31c16038..9aa66312 100644 --- a/rootly_sdk/models/incident_role.py +++ b/rootly_sdk/models/incident_role.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentRole") diff --git a/rootly_sdk/models/incident_role_list.py b/rootly_sdk/models/incident_role_list.py index d514d8ed..22dc9520 100644 --- a/rootly_sdk/models/incident_role_list.py +++ b/rootly_sdk/models/incident_role_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_role_list_data_item import IncidentRoleListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentRoleList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_role_list_data_item import IncidentRoleListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/incident_role_list_data_item.py b/rootly_sdk/models/incident_role_list_data_item.py index 8f057241..4ac3dd10 100644 --- a/rootly_sdk/models/incident_role_list_data_item.py +++ b/rootly_sdk/models/incident_role_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_role_list_data_item_type import check_incident_role_list_data_item_type -from ..models.incident_role_list_data_item_type import IncidentRoleListDataItemType -from typing import cast +from ..models.incident_role_list_data_item_type import ( + IncidentRoleListDataItemType, + check_incident_role_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_role import IncidentRole @@ -34,7 +33,6 @@ class IncidentRoleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_role import IncidentRole id = self.id diff --git a/rootly_sdk/models/incident_role_response.py b/rootly_sdk/models/incident_role_response.py index 8a0a0bd4..03c42298 100644 --- a/rootly_sdk/models/incident_role_response.py +++ b/rootly_sdk/models/incident_role_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_role_response_data import IncidentRoleResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentRoleResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_role_response_data import IncidentRoleResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_role_response_data.py b/rootly_sdk/models/incident_role_response_data.py index 48d5137b..94d09f13 100644 --- a/rootly_sdk/models/incident_role_response_data.py +++ b/rootly_sdk/models/incident_role_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_role_response_data_type import check_incident_role_response_data_type -from ..models.incident_role_response_data_type import IncidentRoleResponseDataType -from typing import cast +from ..models.incident_role_response_data_type import ( + IncidentRoleResponseDataType, + check_incident_role_response_data_type, +) if TYPE_CHECKING: from ..models.incident_role import IncidentRole @@ -34,7 +33,6 @@ class IncidentRoleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_role import IncidentRole id = self.id diff --git a/rootly_sdk/models/incident_role_task.py b/rootly_sdk/models/incident_role_task.py index 673440a4..5d7c3c97 100644 --- a/rootly_sdk/models/incident_role_task.py +++ b/rootly_sdk/models/incident_role_task.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incident_role_task_priority import IncidentRoleTaskPriority, check_incident_role_task_priority from ..types import UNSET, Unset -from ..models.incident_role_task_priority import check_incident_role_task_priority -from ..models.incident_role_task_priority import IncidentRoleTaskPriority -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentRoleTask") diff --git a/rootly_sdk/models/incident_role_task_list.py b/rootly_sdk/models/incident_role_task_list.py index 6674403d..5ef2cf2e 100644 --- a/rootly_sdk/models/incident_role_task_list.py +++ b/rootly_sdk/models/incident_role_task_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_role_task_list_data_item import IncidentRoleTaskListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentRoleTaskList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.incident_role_task_list_data_item import IncidentRoleTaskListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 76b1c57d..1821b7a9 100644 --- a/rootly_sdk/models/incident_role_task_list_data_item.py +++ b/rootly_sdk/models/incident_role_task_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_role_task_list_data_item_type import check_incident_role_task_list_data_item_type -from ..models.incident_role_task_list_data_item_type import IncidentRoleTaskListDataItemType -from typing import cast +from ..models.incident_role_task_list_data_item_type import ( + IncidentRoleTaskListDataItemType, + check_incident_role_task_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_role_task import IncidentRoleTask @@ -34,7 +33,6 @@ class IncidentRoleTaskListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_role_task import IncidentRoleTask id = self.id diff --git a/rootly_sdk/models/incident_role_task_response.py b/rootly_sdk/models/incident_role_task_response.py index b1c714f7..b92385ae 100644 --- a/rootly_sdk/models/incident_role_task_response.py +++ b/rootly_sdk/models/incident_role_task_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_role_task_response_data import IncidentRoleTaskResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentRoleTaskResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_role_task_response_data import IncidentRoleTaskResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_role_task_response_data.py b/rootly_sdk/models/incident_role_task_response_data.py index aafc4384..7720f509 100644 --- a/rootly_sdk/models/incident_role_task_response_data.py +++ b/rootly_sdk/models/incident_role_task_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_role_task_response_data_type import check_incident_role_task_response_data_type -from ..models.incident_role_task_response_data_type import IncidentRoleTaskResponseDataType -from typing import cast +from ..models.incident_role_task_response_data_type import ( + IncidentRoleTaskResponseDataType, + check_incident_role_task_response_data_type, +) if TYPE_CHECKING: from ..models.incident_role_task import IncidentRoleTask @@ -34,7 +33,6 @@ class IncidentRoleTaskResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_role_task import IncidentRoleTask id = self.id diff --git a/rootly_sdk/models/incident_started_by_type_0.py b/rootly_sdk/models/incident_started_by_type_0.py index ef08e0d7..241e922c 100644 --- a/rootly_sdk/models/incident_started_by_type_0.py +++ b/rootly_sdk/models/incident_started_by_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentStartedByType0") diff --git a/rootly_sdk/models/incident_status_page_event.py b/rootly_sdk/models/incident_status_page_event.py index 4b402d6f..77bff120 100644 --- a/rootly_sdk/models/incident_status_page_event.py +++ b/rootly_sdk/models/incident_status_page_event.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.incident_status_page_event_status import ( + IncidentStatusPageEventStatus, + check_incident_status_page_event_status, +) from ..types import UNSET, Unset -from ..models.incident_status_page_event_status import check_incident_status_page_event_status -from ..models.incident_status_page_event_status import IncidentStatusPageEventStatus -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentStatusPageEvent") diff --git a/rootly_sdk/models/incident_status_page_event_list.py b/rootly_sdk/models/incident_status_page_event_list.py index 3367efd2..d5b6e98d 100644 --- a/rootly_sdk/models/incident_status_page_event_list.py +++ b/rootly_sdk/models/incident_status_page_event_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_status_page_event_list_data_item import IncidentStatusPageEventListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentStatusPageEventList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.incident_status_page_event_list_data_item import IncidentStatusPageEventListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 10c84ca0..3174294c 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,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_status_page_event_list_data_item_type import check_incident_status_page_event_list_data_item_type -from ..models.incident_status_page_event_list_data_item_type import IncidentStatusPageEventListDataItemType -from typing import cast +from ..models.incident_status_page_event_list_data_item_type import ( + IncidentStatusPageEventListDataItemType, + check_incident_status_page_event_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_status_page_event import IncidentStatusPageEvent @@ -34,7 +33,6 @@ class IncidentStatusPageEventListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_status_page_event import IncidentStatusPageEvent id = self.id diff --git a/rootly_sdk/models/incident_status_page_event_response.py b/rootly_sdk/models/incident_status_page_event_response.py index 891c0ea3..314ed314 100644 --- a/rootly_sdk/models/incident_status_page_event_response.py +++ b/rootly_sdk/models/incident_status_page_event_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_status_page_event_response_data import IncidentStatusPageEventResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentStatusPageEventResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_status_page_event_response_data import IncidentStatusPageEventResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() 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 1f6792cb..a0374d05 100644 --- a/rootly_sdk/models/incident_status_page_event_response_data.py +++ b/rootly_sdk/models/incident_status_page_event_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_status_page_event_response_data_type import check_incident_status_page_event_response_data_type -from ..models.incident_status_page_event_response_data_type import IncidentStatusPageEventResponseDataType -from typing import cast +from ..models.incident_status_page_event_response_data_type import ( + IncidentStatusPageEventResponseDataType, + check_incident_status_page_event_response_data_type, +) if TYPE_CHECKING: from ..models.incident_status_page_event import IncidentStatusPageEvent @@ -34,7 +33,6 @@ class IncidentStatusPageEventResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_status_page_event import IncidentStatusPageEvent id = self.id diff --git a/rootly_sdk/models/incident_sub_status.py b/rootly_sdk/models/incident_sub_status.py index e0b26959..5fa71a29 100644 --- a/rootly_sdk/models/incident_sub_status.py +++ b/rootly_sdk/models/incident_sub_status.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="IncidentSubStatus") diff --git a/rootly_sdk/models/incident_sub_status_list.py b/rootly_sdk/models/incident_sub_status_list.py index b3cfbf4f..f699265c 100644 --- a/rootly_sdk/models/incident_sub_status_list.py +++ b/rootly_sdk/models/incident_sub_status_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_sub_status_list_data_item import IncidentSubStatusListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentSubStatusList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.links import Links - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.incident_sub_status_list_data_item import IncidentSubStatusListDataItem data = [] for data_item_data in self.data: 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 3059747b..322e748c 100644 --- a/rootly_sdk/models/incident_sub_status_list_data_item.py +++ b/rootly_sdk/models/incident_sub_status_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_sub_status_list_data_item_type import check_incident_sub_status_list_data_item_type -from ..models.incident_sub_status_list_data_item_type import IncidentSubStatusListDataItemType -from typing import cast +from ..models.incident_sub_status_list_data_item_type import ( + IncidentSubStatusListDataItemType, + check_incident_sub_status_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_sub_status import IncidentSubStatus @@ -34,7 +33,6 @@ class IncidentSubStatusListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_sub_status import IncidentSubStatus id = self.id diff --git a/rootly_sdk/models/incident_sub_status_response.py b/rootly_sdk/models/incident_sub_status_response.py index b66f9025..5e8bf711 100644 --- a/rootly_sdk/models/incident_sub_status_response.py +++ b/rootly_sdk/models/incident_sub_status_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_sub_status_response_data import IncidentSubStatusResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentSubStatusResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_sub_status_response_data import IncidentSubStatusResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_sub_status_response_data.py b/rootly_sdk/models/incident_sub_status_response_data.py index 3557f524..7d2e2559 100644 --- a/rootly_sdk/models/incident_sub_status_response_data.py +++ b/rootly_sdk/models/incident_sub_status_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_sub_status_response_data_type import check_incident_sub_status_response_data_type -from ..models.incident_sub_status_response_data_type import IncidentSubStatusResponseDataType -from typing import cast +from ..models.incident_sub_status_response_data_type import ( + IncidentSubStatusResponseDataType, + check_incident_sub_status_response_data_type, +) if TYPE_CHECKING: from ..models.incident_sub_status import IncidentSubStatus @@ -34,7 +33,6 @@ class IncidentSubStatusResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_sub_status import IncidentSubStatus id = self.id diff --git a/rootly_sdk/models/incident_trigger_params.py b/rootly_sdk/models/incident_trigger_params.py index ed2e832e..25c3c93b 100644 --- a/rootly_sdk/models/incident_trigger_params.py +++ b/rootly_sdk/models/incident_trigger_params.py @@ -1,134 +1,112 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_trigger_params_incident_condition import check_incident_trigger_params_incident_condition -from ..models.incident_trigger_params_incident_condition import IncidentTriggerParamsIncidentCondition -from ..models.incident_trigger_params_incident_condition_acknowledged_at import ( - check_incident_trigger_params_incident_condition_acknowledged_at, +from ..models.incident_trigger_params_incident_condition import ( + IncidentTriggerParamsIncidentCondition, + check_incident_trigger_params_incident_condition, ) from ..models.incident_trigger_params_incident_condition_acknowledged_at import ( IncidentTriggerParamsIncidentConditionAcknowledgedAt, + check_incident_trigger_params_incident_condition_acknowledged_at, ) from ..models.incident_trigger_params_incident_condition_cause import ( + IncidentTriggerParamsIncidentConditionCause, check_incident_trigger_params_incident_condition_cause, ) -from ..models.incident_trigger_params_incident_condition_cause import IncidentTriggerParamsIncidentConditionCause -from ..models.incident_trigger_params_incident_condition_detected_at import ( - check_incident_trigger_params_incident_condition_detected_at, -) from ..models.incident_trigger_params_incident_condition_detected_at import ( IncidentTriggerParamsIncidentConditionDetectedAt, -) -from ..models.incident_trigger_params_incident_condition_environment import ( - check_incident_trigger_params_incident_condition_environment, + check_incident_trigger_params_incident_condition_detected_at, ) from ..models.incident_trigger_params_incident_condition_environment import ( IncidentTriggerParamsIncidentConditionEnvironment, -) -from ..models.incident_trigger_params_incident_condition_functionality import ( - check_incident_trigger_params_incident_condition_functionality, + check_incident_trigger_params_incident_condition_environment, ) from ..models.incident_trigger_params_incident_condition_functionality import ( IncidentTriggerParamsIncidentConditionFunctionality, + check_incident_trigger_params_incident_condition_functionality, ) from ..models.incident_trigger_params_incident_condition_group import ( + IncidentTriggerParamsIncidentConditionGroup, check_incident_trigger_params_incident_condition_group, ) -from ..models.incident_trigger_params_incident_condition_group import IncidentTriggerParamsIncidentConditionGroup -from ..models.incident_trigger_params_incident_condition_incident_roles import ( - check_incident_trigger_params_incident_condition_incident_roles, -) from ..models.incident_trigger_params_incident_condition_incident_roles import ( IncidentTriggerParamsIncidentConditionIncidentRoles, -) -from ..models.incident_trigger_params_incident_condition_incident_type import ( - check_incident_trigger_params_incident_condition_incident_type, + check_incident_trigger_params_incident_condition_incident_roles, ) from ..models.incident_trigger_params_incident_condition_incident_type import ( IncidentTriggerParamsIncidentConditionIncidentType, + check_incident_trigger_params_incident_condition_incident_type, ) from ..models.incident_trigger_params_incident_condition_kind import ( + IncidentTriggerParamsIncidentConditionKind, check_incident_trigger_params_incident_condition_kind, ) -from ..models.incident_trigger_params_incident_condition_kind import IncidentTriggerParamsIncidentConditionKind from ..models.incident_trigger_params_incident_condition_label import ( + IncidentTriggerParamsIncidentConditionLabel, check_incident_trigger_params_incident_condition_label, ) -from ..models.incident_trigger_params_incident_condition_label import IncidentTriggerParamsIncidentConditionLabel -from ..models.incident_trigger_params_incident_condition_mitigated_at import ( - check_incident_trigger_params_incident_condition_mitigated_at, -) from ..models.incident_trigger_params_incident_condition_mitigated_at import ( IncidentTriggerParamsIncidentConditionMitigatedAt, -) -from ..models.incident_trigger_params_incident_condition_resolved_at import ( - check_incident_trigger_params_incident_condition_resolved_at, + check_incident_trigger_params_incident_condition_mitigated_at, ) from ..models.incident_trigger_params_incident_condition_resolved_at import ( IncidentTriggerParamsIncidentConditionResolvedAt, + check_incident_trigger_params_incident_condition_resolved_at, ) from ..models.incident_trigger_params_incident_condition_service import ( + IncidentTriggerParamsIncidentConditionService, check_incident_trigger_params_incident_condition_service, ) -from ..models.incident_trigger_params_incident_condition_service import IncidentTriggerParamsIncidentConditionService from ..models.incident_trigger_params_incident_condition_severity import ( + IncidentTriggerParamsIncidentConditionSeverity, check_incident_trigger_params_incident_condition_severity, ) -from ..models.incident_trigger_params_incident_condition_severity import IncidentTriggerParamsIncidentConditionSeverity -from ..models.incident_trigger_params_incident_condition_started_at import ( - check_incident_trigger_params_incident_condition_started_at, -) from ..models.incident_trigger_params_incident_condition_started_at import ( IncidentTriggerParamsIncidentConditionStartedAt, + check_incident_trigger_params_incident_condition_started_at, ) from ..models.incident_trigger_params_incident_condition_status import ( + IncidentTriggerParamsIncidentConditionStatus, check_incident_trigger_params_incident_condition_status, ) -from ..models.incident_trigger_params_incident_condition_status import IncidentTriggerParamsIncidentConditionStatus -from ..models.incident_trigger_params_incident_condition_sub_status import ( - check_incident_trigger_params_incident_condition_sub_status, -) from ..models.incident_trigger_params_incident_condition_sub_status import ( IncidentTriggerParamsIncidentConditionSubStatus, + check_incident_trigger_params_incident_condition_sub_status, ) from ..models.incident_trigger_params_incident_condition_summary import ( + IncidentTriggerParamsIncidentConditionSummary, check_incident_trigger_params_incident_condition_summary, ) -from ..models.incident_trigger_params_incident_condition_summary import IncidentTriggerParamsIncidentConditionSummary -from ..models.incident_trigger_params_incident_condition_visibility import ( - check_incident_trigger_params_incident_condition_visibility, -) from ..models.incident_trigger_params_incident_condition_visibility import ( IncidentTriggerParamsIncidentConditionVisibility, + check_incident_trigger_params_incident_condition_visibility, ) from ..models.incident_trigger_params_incident_conditional_inactivity import ( + IncidentTriggerParamsIncidentConditionalInactivity, check_incident_trigger_params_incident_conditional_inactivity, ) -from ..models.incident_trigger_params_incident_conditional_inactivity import ( - IncidentTriggerParamsIncidentConditionalInactivity, +from ..models.incident_trigger_params_incident_kinds_item import ( + IncidentTriggerParamsIncidentKindsItem, + check_incident_trigger_params_incident_kinds_item, ) -from ..models.incident_trigger_params_incident_kinds_item import check_incident_trigger_params_incident_kinds_item -from ..models.incident_trigger_params_incident_kinds_item import IncidentTriggerParamsIncidentKindsItem from ..models.incident_trigger_params_incident_post_mortem_condition_cause import ( + IncidentTriggerParamsIncidentPostMortemConditionCause, check_incident_trigger_params_incident_post_mortem_condition_cause, ) -from ..models.incident_trigger_params_incident_post_mortem_condition_cause import ( - IncidentTriggerParamsIncidentPostMortemConditionCause, +from ..models.incident_trigger_params_incident_statuses_item import ( + IncidentTriggerParamsIncidentStatusesItem, + check_incident_trigger_params_incident_statuses_item, +) +from ..models.incident_trigger_params_trigger_type import ( + IncidentTriggerParamsTriggerType, + check_incident_trigger_params_trigger_type, ) -from ..models.incident_trigger_params_incident_statuses_item import check_incident_trigger_params_incident_statuses_item -from ..models.incident_trigger_params_incident_statuses_item import IncidentTriggerParamsIncidentStatusesItem -from ..models.incident_trigger_params_trigger_type import check_incident_trigger_params_trigger_type -from ..models.incident_trigger_params_trigger_type import IncidentTriggerParamsTriggerType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="IncidentTriggerParams") diff --git a/rootly_sdk/models/incident_type.py b/rootly_sdk/models/incident_type.py index 32343550..b0f8f6fe 100644 --- a/rootly_sdk/models/incident_type.py +++ b/rootly_sdk/models/incident_type.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_type_properties_item import IncidentTypePropertiesItem from ..models.incident_type_slack_aliases_type_0_item import IncidentTypeSlackAliasesType0Item @@ -53,9 +50,6 @@ class IncidentType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_type_slack_channels_type_0_item import IncidentTypeSlackChannelsType0Item - from ..models.incident_type_properties_item import IncidentTypePropertiesItem - from ..models.incident_type_slack_aliases_type_0_item import IncidentTypeSlackAliasesType0Item name = self.name diff --git a/rootly_sdk/models/incident_type_list.py b/rootly_sdk/models/incident_type_list.py index 95963a91..3fcfd517 100644 --- a/rootly_sdk/models/incident_type_list.py +++ b/rootly_sdk/models/incident_type_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_type_list_data_item import IncidentTypeListDataItem from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -38,10 +35,6 @@ class IncidentTypeList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.incident_type_list_data_item import IncidentTypeListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/incident_type_list_data_item.py b/rootly_sdk/models/incident_type_list_data_item.py index 426d6f52..bedeef51 100644 --- a/rootly_sdk/models/incident_type_list_data_item.py +++ b/rootly_sdk/models/incident_type_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_type_list_data_item_type import check_incident_type_list_data_item_type -from ..models.incident_type_list_data_item_type import IncidentTypeListDataItemType -from typing import cast +from ..models.incident_type_list_data_item_type import ( + IncidentTypeListDataItemType, + check_incident_type_list_data_item_type, +) if TYPE_CHECKING: from ..models.incident_type import IncidentType @@ -34,7 +33,6 @@ class IncidentTypeListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_type import IncidentType id = self.id diff --git a/rootly_sdk/models/incident_type_properties_item.py b/rootly_sdk/models/incident_type_properties_item.py index b7bc0429..5bcab317 100644 --- a/rootly_sdk/models/incident_type_properties_item.py +++ b/rootly_sdk/models/incident_type_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentTypePropertiesItem") diff --git a/rootly_sdk/models/incident_type_response.py b/rootly_sdk/models/incident_type_response.py index e5345de8..8345322e 100644 --- a/rootly_sdk/models/incident_type_response.py +++ b/rootly_sdk/models/incident_type_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.incident_type_response_data import IncidentTypeResponseData from ..models.jsonapi_included_resource import JsonapiIncludedResource @@ -32,8 +29,6 @@ class IncidentTypeResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_type_response_data import IncidentTypeResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/incident_type_response_data.py b/rootly_sdk/models/incident_type_response_data.py index eb07ef19..0467f19a 100644 --- a/rootly_sdk/models/incident_type_response_data.py +++ b/rootly_sdk/models/incident_type_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.incident_type_response_data_type import check_incident_type_response_data_type -from ..models.incident_type_response_data_type import IncidentTypeResponseDataType -from typing import cast +from ..models.incident_type_response_data_type import ( + IncidentTypeResponseDataType, + check_incident_type_response_data_type, +) if TYPE_CHECKING: from ..models.incident_type import IncidentType @@ -34,7 +33,6 @@ class IncidentTypeResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incident_type import IncidentType id = self.id 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 035c0361..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentTypeSlackAliasesType0Item") 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 d096eae3..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentTypeSlackChannelsType0Item") diff --git a/rootly_sdk/models/incident_user_type_0.py b/rootly_sdk/models/incident_user_type_0.py index 2a80d969..dce50314 100644 --- a/rootly_sdk/models/incident_user_type_0.py +++ b/rootly_sdk/models/incident_user_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentUserType0") 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 index e22fa440..3bfaac57 100644 --- 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 @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="IncidentZoomMeetingGlobalDialInNumbersType0Item") diff --git a/rootly_sdk/models/incidents_chart_response.py b/rootly_sdk/models/incidents_chart_response.py index db20baba..95932b9f 100644 --- a/rootly_sdk/models/incidents_chart_response.py +++ b/rootly_sdk/models/incidents_chart_response.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.incidents_chart_response_data import IncidentsChartResponseData @@ -28,7 +24,6 @@ class IncidentsChartResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.incidents_chart_response_data import IncidentsChartResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/incidents_chart_response_data.py b/rootly_sdk/models/incidents_chart_response_data.py index 0265af92..544d592e 100644 --- a/rootly_sdk/models/incidents_chart_response_data.py +++ b/rootly_sdk/models/incidents_chart_response_data.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="IncidentsChartResponseData") diff --git a/rootly_sdk/models/invite_to_google_chat_space_task_params.py b/rootly_sdk/models/invite_to_google_chat_space_task_params.py index eb2a0590..ced72472 100644 --- a/rootly_sdk/models/invite_to_google_chat_space_task_params.py +++ b/rootly_sdk/models/invite_to_google_chat_space_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.invite_to_google_chat_space_task_params_task_type import ( + InviteToGoogleChatSpaceTaskParamsTaskType, check_invite_to_google_chat_space_task_params_task_type, ) -from ..models.invite_to_google_chat_space_task_params_task_type import InviteToGoogleChatSpaceTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.invite_to_google_chat_space_task_params_space import InviteToGoogleChatSpaceTaskParamsSpace @@ -37,7 +34,6 @@ class InviteToGoogleChatSpaceTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.invite_to_google_chat_space_task_params_space import InviteToGoogleChatSpaceTaskParamsSpace space = self.space.to_dict() diff --git a/rootly_sdk/models/invite_to_google_chat_space_task_params_space.py b/rootly_sdk/models/invite_to_google_chat_space_task_params_space.py index f5f70c84..90770cb9 100644 --- a/rootly_sdk/models/invite_to_google_chat_space_task_params_space.py +++ b/rootly_sdk/models/invite_to_google_chat_space_task_params_space.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToGoogleChatSpaceTaskParamsSpace") diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py index 7b5ae4e7..ef3f3b57 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params.py @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.invite_to_microsoft_teams_channel_rootly_task_params_task_type import ( - check_invite_to_microsoft_teams_channel_rootly_task_params_task_type, -) from ..models.invite_to_microsoft_teams_channel_rootly_task_params_task_type import ( InviteToMicrosoftTeamsChannelRootlyTaskParamsTaskType, + check_invite_to_microsoft_teams_channel_rootly_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.invite_to_microsoft_teams_channel_rootly_task_params_channel import ( @@ -69,27 +64,6 @@ class InviteToMicrosoftTeamsChannelRootlyTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target import ( - InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget, - ) - from ..models.invite_to_microsoft_teams_channel_rootly_task_params_team import ( - InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam, - ) - from ..models.invite_to_microsoft_teams_channel_rootly_task_params_group_target import ( - InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget, - ) - from ..models.invite_to_microsoft_teams_channel_rootly_task_params_channel import ( - InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel, - ) - from ..models.invite_to_microsoft_teams_channel_rootly_task_params_service_target import ( - InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget, - ) - from ..models.invite_to_microsoft_teams_channel_rootly_task_params_user_target import ( - InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget, - ) - from ..models.invite_to_microsoft_teams_channel_rootly_task_params_schedule_target import ( - InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget, - ) team = self.team.to_dict() diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py index 9cde426a..865e2e95 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_channel.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsChannel") diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py index 6ab59701..4ef5fc51 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_escalation_policy_target.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsEscalationPolicyTarget") diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py index f26c4624..3c2a90e4 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_group_target.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsGroupTarget") diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py index eb8cfa26..0616c5e2 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_schedule_target.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsScheduleTarget") diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py index f9148073..167fa3e6 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_service_target.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsServiceTarget") diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py index 8cdf37bc..f828e8a0 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_team.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsTeam") diff --git a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py index 92f1fa62..ed58e7af 100644 --- a/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py +++ b/rootly_sdk/models/invite_to_microsoft_teams_channel_rootly_task_params_user_target.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelRootlyTaskParamsUserTarget") 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 958642e0..ae59c5cf 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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.invite_to_microsoft_teams_channel_task_params_task_type import ( - check_invite_to_microsoft_teams_channel_task_params_task_type, -) from ..models.invite_to_microsoft_teams_channel_task_params_task_type import ( InviteToMicrosoftTeamsChannelTaskParamsTaskType, + check_invite_to_microsoft_teams_channel_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.invite_to_microsoft_teams_channel_task_params_channel import ( @@ -44,12 +39,6 @@ class InviteToMicrosoftTeamsChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.invite_to_microsoft_teams_channel_task_params_team import ( - InviteToMicrosoftTeamsChannelTaskParamsTeam, - ) - from ..models.invite_to_microsoft_teams_channel_task_params_channel import ( - InviteToMicrosoftTeamsChannelTaskParamsChannel, - ) channel = self.channel.to_dict() 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 d534b741..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelTaskParamsChannel") 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 6713c658..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToMicrosoftTeamsChannelTaskParamsTeam") 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 75b8fd65..852ab3a2 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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.invite_to_slack_channel_opsgenie_task_params_task_type import ( - check_invite_to_slack_channel_opsgenie_task_params_task_type, -) from ..models.invite_to_slack_channel_opsgenie_task_params_task_type import ( InviteToSlackChannelOpsgenieTaskParamsTaskType, + check_invite_to_slack_channel_opsgenie_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.invite_to_slack_channel_opsgenie_task_params_channels_item import ( @@ -44,12 +39,6 @@ class InviteToSlackChannelOpsgenieTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.invite_to_slack_channel_opsgenie_task_params_schedule import ( - InviteToSlackChannelOpsgenieTaskParamsSchedule, - ) - from ..models.invite_to_slack_channel_opsgenie_task_params_channels_item import ( - InviteToSlackChannelOpsgenieTaskParamsChannelsItem, - ) channels = [] for channels_item_data in self.channels: 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 2568cf64..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelOpsgenieTaskParamsChannelsItem") 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 a2006009..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelOpsgenieTaskParamsSchedule") diff --git a/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py index 2d773026..3351841d 100644 --- a/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py +++ b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_0_escalation_policy.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelPagerdutyTaskParamsType0EscalationPolicy") diff --git a/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py index 41fb73e4..41e59cc3 100644 --- a/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py +++ b/rootly_sdk/models/invite_to_slack_channel_pagerduty_task_params_type_1_schedule.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelPagerdutyTaskParamsType1Schedule") 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 c3ecad1c..37ac9795 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,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.invite_to_slack_channel_rootly_task_params_task_type import ( + InviteToSlackChannelRootlyTaskParamsTaskType, check_invite_to_slack_channel_rootly_task_params_task_type, ) -from ..models.invite_to_slack_channel_rootly_task_params_task_type import InviteToSlackChannelRootlyTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.invite_to_slack_channel_rootly_task_params_channels_item import ( @@ -62,24 +59,6 @@ class InviteToSlackChannelRootlyTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.invite_to_slack_channel_rootly_task_params_user_target import ( - InviteToSlackChannelRootlyTaskParamsUserTarget, - ) - from ..models.invite_to_slack_channel_rootly_task_params_service_target import ( - InviteToSlackChannelRootlyTaskParamsServiceTarget, - ) - from ..models.invite_to_slack_channel_rootly_task_params_escalation_policy_target import ( - InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget, - ) - from ..models.invite_to_slack_channel_rootly_task_params_group_target import ( - InviteToSlackChannelRootlyTaskParamsGroupTarget, - ) - from ..models.invite_to_slack_channel_rootly_task_params_schedule_target import ( - InviteToSlackChannelRootlyTaskParamsScheduleTarget, - ) - from ..models.invite_to_slack_channel_rootly_task_params_channels_item import ( - InviteToSlackChannelRootlyTaskParamsChannelsItem, - ) channels = [] for channels_item_data in self.channels: 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 ba16e026..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsChannelsItem") 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 59fd0916..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsEscalationPolicyTarget") 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 a043e6ac..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsGroupTarget") 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 809250d0..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsScheduleTarget") 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 1e160014..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsServiceTarget") 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 ca4c25d9..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelRootlyTaskParamsUserTarget") diff --git a/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py b/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py index 6c745b76..c0d9d99d 100644 --- a/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py +++ b/rootly_sdk/models/invite_to_slack_channel_task_params_type_0_slack_users_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelTaskParamsType0SlackUsersItem") diff --git a/rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py b/rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py index 912c2291..97ba21b9 100644 --- a/rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py +++ b/rootly_sdk/models/invite_to_slack_channel_task_params_type_1_slack_user_groups_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelTaskParamsType1SlackUserGroupsItem") diff --git a/rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py b/rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py index d909c902..ce51bda3 100644 --- a/rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py +++ b/rootly_sdk/models/invite_to_slack_channel_task_params_type_2.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="InviteToSlackChannelTaskParamsType2") 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 fa10efdd..a8e85eaf 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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.invite_to_slack_channel_victor_ops_task_params_task_type import ( - check_invite_to_slack_channel_victor_ops_task_params_task_type, -) from ..models.invite_to_slack_channel_victor_ops_task_params_task_type import ( InviteToSlackChannelVictorOpsTaskParamsTaskType, + check_invite_to_slack_channel_victor_ops_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.invite_to_slack_channel_victor_ops_task_params_channels_item import ( @@ -42,12 +37,6 @@ class InviteToSlackChannelVictorOpsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.invite_to_slack_channel_victor_ops_task_params_team import ( - InviteToSlackChannelVictorOpsTaskParamsTeam, - ) - from ..models.invite_to_slack_channel_victor_ops_task_params_channels_item import ( - InviteToSlackChannelVictorOpsTaskParamsChannelsItem, - ) channels = [] for channels_item_data in self.channels: 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 34442f9e..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelVictorOpsTaskParamsChannelsItem") 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 5b2f7b1f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="InviteToSlackChannelVictorOpsTaskParamsTeam") diff --git a/rootly_sdk/models/ip_ranges.py b/rootly_sdk/models/ip_ranges.py index dad7d465..f959ae26 100644 --- a/rootly_sdk/models/ip_ranges.py +++ b/rootly_sdk/models/ip_ranges.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="IpRanges") diff --git a/rootly_sdk/models/ip_ranges_response.py b/rootly_sdk/models/ip_ranges_response.py index 4fdb056c..6cd7d27e 100644 --- a/rootly_sdk/models/ip_ranges_response.py +++ b/rootly_sdk/models/ip_ranges_response.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.ip_ranges_response_data import IpRangesResponseData @@ -28,7 +24,6 @@ class IpRangesResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.ip_ranges_response_data import IpRangesResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/ip_ranges_response_data.py b/rootly_sdk/models/ip_ranges_response_data.py index 8c09d27f..de55248c 100644 --- a/rootly_sdk/models/ip_ranges_response_data.py +++ b/rootly_sdk/models/ip_ranges_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.ip_ranges_response_data_type import check_ip_ranges_response_data_type -from ..models.ip_ranges_response_data_type import IpRangesResponseDataType -from typing import cast +from ..models.ip_ranges_response_data_type import IpRangesResponseDataType, check_ip_ranges_response_data_type if TYPE_CHECKING: from ..models.ip_ranges import IpRanges @@ -34,7 +30,6 @@ class IpRangesResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.ip_ranges import IpRanges id = self.id diff --git a/rootly_sdk/models/jsonapi_included_resource.py b/rootly_sdk/models/jsonapi_included_resource.py index e18fcf19..bb745c1d 100644 --- a/rootly_sdk/models/jsonapi_included_resource.py +++ b/rootly_sdk/models/jsonapi_included_resource.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource_attributes import JsonapiIncludedResourceAttributes from ..models.jsonapi_included_resource_relationships import JsonapiIncludedResourceRelationships @@ -36,8 +33,6 @@ class JsonapiIncludedResource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource_attributes import JsonapiIncludedResourceAttributes - from ..models.jsonapi_included_resource_relationships import JsonapiIncludedResourceRelationships id = self.id diff --git a/rootly_sdk/models/jsonapi_included_resource_attributes.py b/rootly_sdk/models/jsonapi_included_resource_attributes.py index 5868f3b3..4941c7af 100644 --- a/rootly_sdk/models/jsonapi_included_resource_attributes.py +++ b/rootly_sdk/models/jsonapi_included_resource_attributes.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="JsonapiIncludedResourceAttributes") diff --git a/rootly_sdk/models/jsonapi_included_resource_relationships.py b/rootly_sdk/models/jsonapi_included_resource_relationships.py index 58097847..2ed1ed48 100644 --- a/rootly_sdk/models/jsonapi_included_resource_relationships.py +++ b/rootly_sdk/models/jsonapi_included_resource_relationships.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="JsonapiIncludedResourceRelationships") diff --git a/rootly_sdk/models/links.py b/rootly_sdk/models/links.py index 04d6f508..48bcff63 100644 --- a/rootly_sdk/models/links.py +++ b/rootly_sdk/models/links.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="Links") diff --git a/rootly_sdk/models/live_call_router.py b/rootly_sdk/models/live_call_router.py index c3aa2fff..199b49a8 100644 --- a/rootly_sdk/models/live_call_router.py +++ b/rootly_sdk/models/live_call_router.py @@ -1,24 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.live_call_router_country_code import LiveCallRouterCountryCode, check_live_call_router_country_code +from ..models.live_call_router_kind import LiveCallRouterKind, check_live_call_router_kind +from ..models.live_call_router_phone_type import LiveCallRouterPhoneType, check_live_call_router_phone_type +from ..models.live_call_router_waiting_music_url import ( + LiveCallRouterWaitingMusicUrl, + check_live_call_router_waiting_music_url, +) from ..types import UNSET, Unset -from ..models.live_call_router_country_code import check_live_call_router_country_code -from ..models.live_call_router_country_code import LiveCallRouterCountryCode -from ..models.live_call_router_kind import check_live_call_router_kind -from ..models.live_call_router_kind import LiveCallRouterKind -from ..models.live_call_router_phone_type import check_live_call_router_phone_type -from ..models.live_call_router_phone_type import LiveCallRouterPhoneType -from ..models.live_call_router_waiting_music_url import check_live_call_router_waiting_music_url -from ..models.live_call_router_waiting_music_url import LiveCallRouterWaitingMusicUrl -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.live_call_router_escalation_policy_trigger_params import LiveCallRouterEscalationPolicyTriggerParams from ..models.live_call_router_paging_targets_item import LiveCallRouterPagingTargetsItem @@ -90,10 +86,6 @@ class LiveCallRouter: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.live_call_router_paging_targets_item import LiveCallRouterPagingTargetsItem - from ..models.live_call_router_escalation_policy_trigger_params import ( - LiveCallRouterEscalationPolicyTriggerParams, - ) name = self.name 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 c9a97556..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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.live_call_router_escalation_policy_trigger_params_type import ( - check_live_call_router_escalation_policy_trigger_params_type, -) from ..models.live_call_router_escalation_policy_trigger_params_type import ( LiveCallRouterEscalationPolicyTriggerParamsType, + check_live_call_router_escalation_policy_trigger_params_type, ) -from typing import cast - T = TypeVar("T", bound="LiveCallRouterEscalationPolicyTriggerParams") diff --git a/rootly_sdk/models/live_call_router_list.py b/rootly_sdk/models/live_call_router_list.py index 35dab700..885ce198 100644 --- a/rootly_sdk/models/live_call_router_list.py +++ b/rootly_sdk/models/live_call_router_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class LiveCallRouterList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.live_call_router_list_data_item import LiveCallRouterListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 9d54d043..e68c449c 100644 --- a/rootly_sdk/models/live_call_router_list_data_item.py +++ b/rootly_sdk/models/live_call_router_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.live_call_router_list_data_item_type import check_live_call_router_list_data_item_type -from ..models.live_call_router_list_data_item_type import LiveCallRouterListDataItemType -from typing import cast +from ..models.live_call_router_list_data_item_type import ( + LiveCallRouterListDataItemType, + check_live_call_router_list_data_item_type, +) if TYPE_CHECKING: from ..models.live_call_router import LiveCallRouter @@ -34,7 +33,6 @@ class LiveCallRouterListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.live_call_router import LiveCallRouter id = self.id 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 85cd628e..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,17 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.live_call_router_paging_targets_item_type import check_live_call_router_paging_targets_item_type -from ..models.live_call_router_paging_targets_item_type import LiveCallRouterPagingTargetsItemType -from typing import cast - +from ..models.live_call_router_paging_targets_item_type import ( + LiveCallRouterPagingTargetsItemType, + check_live_call_router_paging_targets_item_type, +) T = TypeVar("T", bound="LiveCallRouterPagingTargetsItem") diff --git a/rootly_sdk/models/live_call_router_response.py b/rootly_sdk/models/live_call_router_response.py index 360a9a67..e00de14c 100644 --- a/rootly_sdk/models/live_call_router_response.py +++ b/rootly_sdk/models/live_call_router_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.live_call_router_response_data import LiveCallRouterResponseData @@ -32,8 +29,6 @@ class LiveCallRouterResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.live_call_router_response_data import LiveCallRouterResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/live_call_router_response_data.py b/rootly_sdk/models/live_call_router_response_data.py index adefdd71..135ae335 100644 --- a/rootly_sdk/models/live_call_router_response_data.py +++ b/rootly_sdk/models/live_call_router_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.live_call_router_response_data_type import check_live_call_router_response_data_type -from ..models.live_call_router_response_data_type import LiveCallRouterResponseDataType -from typing import cast +from ..models.live_call_router_response_data_type import ( + LiveCallRouterResponseDataType, + check_live_call_router_response_data_type, +) if TYPE_CHECKING: from ..models.live_call_router import LiveCallRouter @@ -34,7 +33,6 @@ class LiveCallRouterResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.live_call_router import LiveCallRouter id = self.id diff --git a/rootly_sdk/models/meeting_recording.py b/rootly_sdk/models/meeting_recording.py index 3f83497b..8591364b 100644 --- a/rootly_sdk/models/meeting_recording.py +++ b/rootly_sdk/models/meeting_recording.py @@ -1,22 +1,16 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.meeting_recording_platform import check_meeting_recording_platform -from ..models.meeting_recording_platform import MeetingRecordingPlatform -from ..models.meeting_recording_status import check_meeting_recording_status -from ..models.meeting_recording_status import MeetingRecordingStatus -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +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") diff --git a/rootly_sdk/models/meeting_recording_detail.py b/rootly_sdk/models/meeting_recording_detail.py index 4b11873d..b736f728 100644 --- a/rootly_sdk/models/meeting_recording_detail.py +++ b/rootly_sdk/models/meeting_recording_detail.py @@ -1,22 +1,17 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, 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 -from ..models.meeting_recording_platform import check_meeting_recording_platform -from ..models.meeting_recording_platform import MeetingRecordingPlatform -from ..models.meeting_recording_status import check_meeting_recording_status -from ..models.meeting_recording_status import MeetingRecordingStatus -from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime - if TYPE_CHECKING: from ..models.meeting_recording_detail_transcript_type_1 import MeetingRecordingDetailTranscriptType1 from ..models.meeting_recording_transcript_segment import MeetingRecordingTranscriptSegment @@ -75,8 +70,6 @@ class MeetingRecordingDetail: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meeting_recording_transcript_segment import MeetingRecordingTranscriptSegment - from ..models.meeting_recording_detail_transcript_type_1 import MeetingRecordingDetailTranscriptType1 platform: str = self.platform diff --git a/rootly_sdk/models/meeting_recording_detail_response.py b/rootly_sdk/models/meeting_recording_detail_response.py index 260e3c0f..2aad46f9 100644 --- a/rootly_sdk/models/meeting_recording_detail_response.py +++ b/rootly_sdk/models/meeting_recording_detail_response.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.meeting_recording_detail_response_data import MeetingRecordingDetailResponseData @@ -28,7 +24,6 @@ class MeetingRecordingDetailResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meeting_recording_detail_response_data import MeetingRecordingDetailResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/meeting_recording_detail_response_data.py b/rootly_sdk/models/meeting_recording_detail_response_data.py index 1a994495..c50dcff8 100644 --- a/rootly_sdk/models/meeting_recording_detail_response_data.py +++ b/rootly_sdk/models/meeting_recording_detail_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.meeting_recording_detail_response_data_type import check_meeting_recording_detail_response_data_type -from ..models.meeting_recording_detail_response_data_type import MeetingRecordingDetailResponseDataType -from typing import cast +from ..models.meeting_recording_detail_response_data_type import ( + MeetingRecordingDetailResponseDataType, + check_meeting_recording_detail_response_data_type, +) if TYPE_CHECKING: from ..models.meeting_recording_detail import MeetingRecordingDetail @@ -34,7 +33,6 @@ class MeetingRecordingDetailResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meeting_recording_detail import MeetingRecordingDetail id = self.id diff --git a/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py b/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py index 6651fa03..6faa6679 100644 --- a/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py +++ b/rootly_sdk/models/meeting_recording_detail_transcript_type_1.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="MeetingRecordingDetailTranscriptType1") diff --git a/rootly_sdk/models/meeting_recording_list.py b/rootly_sdk/models/meeting_recording_list.py index d08c81b9..f60139eb 100644 --- a/rootly_sdk/models/meeting_recording_list.py +++ b/rootly_sdk/models/meeting_recording_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.meeting_recording_list_data_item import MeetingRecordingListDataItem from ..models.meta import Meta @@ -32,8 +29,6 @@ class MeetingRecordingList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meeting_recording_list_data_item import MeetingRecordingListDataItem - from ..models.meta import Meta data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/meeting_recording_list_data_item.py b/rootly_sdk/models/meeting_recording_list_data_item.py index 8e715de3..be50f1e5 100644 --- a/rootly_sdk/models/meeting_recording_list_data_item.py +++ b/rootly_sdk/models/meeting_recording_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.meeting_recording_list_data_item_type import check_meeting_recording_list_data_item_type -from ..models.meeting_recording_list_data_item_type import MeetingRecordingListDataItemType -from typing import cast +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 @@ -34,7 +33,6 @@ class MeetingRecordingListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meeting_recording import MeetingRecording id = self.id diff --git a/rootly_sdk/models/meeting_recording_response.py b/rootly_sdk/models/meeting_recording_response.py index daee2744..eac483c2 100644 --- a/rootly_sdk/models/meeting_recording_response.py +++ b/rootly_sdk/models/meeting_recording_response.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.meeting_recording_response_data import MeetingRecordingResponseData @@ -28,7 +24,6 @@ class MeetingRecordingResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meeting_recording_response_data import MeetingRecordingResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/meeting_recording_response_data.py b/rootly_sdk/models/meeting_recording_response_data.py index debc5035..bcfe346c 100644 --- a/rootly_sdk/models/meeting_recording_response_data.py +++ b/rootly_sdk/models/meeting_recording_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.meeting_recording_response_data_type import check_meeting_recording_response_data_type -from ..models.meeting_recording_response_data_type import MeetingRecordingResponseDataType -from typing import cast +from ..models.meeting_recording_response_data_type import ( + MeetingRecordingResponseDataType, + check_meeting_recording_response_data_type, +) if TYPE_CHECKING: from ..models.meeting_recording import MeetingRecording @@ -34,7 +33,6 @@ class MeetingRecordingResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meeting_recording import MeetingRecording id = self.id diff --git a/rootly_sdk/models/meeting_recording_transcript_segment.py b/rootly_sdk/models/meeting_recording_transcript_segment.py index 3345f37a..7335c4f7 100644 --- a/rootly_sdk/models/meeting_recording_transcript_segment.py +++ b/rootly_sdk/models/meeting_recording_transcript_segment.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.meeting_recording_transcript_word import MeetingRecordingTranscriptWord @@ -30,7 +26,6 @@ class MeetingRecordingTranscriptSegment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meeting_recording_transcript_word import MeetingRecordingTranscriptWord speaker = self.speaker diff --git a/rootly_sdk/models/meeting_recording_transcript_word.py b/rootly_sdk/models/meeting_recording_transcript_word.py index 697e93fb..83d7b63f 100644 --- a/rootly_sdk/models/meeting_recording_transcript_word.py +++ b/rootly_sdk/models/meeting_recording_transcript_word.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="MeetingRecordingTranscriptWord") diff --git a/rootly_sdk/models/meta.py b/rootly_sdk/models/meta.py index cfe72785..5612bb1e 100644 --- a/rootly_sdk/models/meta.py +++ b/rootly_sdk/models/meta.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Meta") diff --git a/rootly_sdk/models/mitigate_incident.py b/rootly_sdk/models/mitigate_incident.py index dd012654..fe1ec922 100644 --- a/rootly_sdk/models/mitigate_incident.py +++ b/rootly_sdk/models/mitigate_incident.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.mitigate_incident_data import MitigateIncidentData @@ -28,7 +24,6 @@ class MitigateIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.mitigate_incident_data import MitigateIncidentData data = self.data.to_dict() diff --git a/rootly_sdk/models/mitigate_incident_data.py b/rootly_sdk/models/mitigate_incident_data.py index 3bb4a873..d2daeb4a 100644 --- a/rootly_sdk/models/mitigate_incident_data.py +++ b/rootly_sdk/models/mitigate_incident_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.mitigate_incident_data_type import check_mitigate_incident_data_type -from ..models.mitigate_incident_data_type import MitigateIncidentDataType -from typing import cast +from ..models.mitigate_incident_data_type import MitigateIncidentDataType, check_mitigate_incident_data_type if TYPE_CHECKING: from ..models.mitigate_incident_data_attributes import MitigateIncidentDataAttributes @@ -32,7 +28,6 @@ class MitigateIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.mitigate_incident_data_attributes import MitigateIncidentDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/mitigate_incident_data_attributes.py b/rootly_sdk/models/mitigate_incident_data_attributes.py index 982fd993..58606b79 100644 --- a/rootly_sdk/models/mitigate_incident_data_attributes.py +++ b/rootly_sdk/models/mitigate_incident_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="MitigateIncidentDataAttributes") diff --git a/rootly_sdk/models/new_alert.py b/rootly_sdk/models/new_alert.py index 8e224c03..092db12d 100644 --- a/rootly_sdk/models/new_alert.py +++ b/rootly_sdk/models/new_alert.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_data import NewAlertData @@ -28,7 +24,6 @@ class NewAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_data import NewAlertData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_alert_data.py b/rootly_sdk/models/new_alert_data.py index 08c2287a..64f89fa6 100644 --- a/rootly_sdk/models/new_alert_data.py +++ b/rootly_sdk/models/new_alert_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alert_data_type import check_new_alert_data_type -from ..models.new_alert_data_type import NewAlertDataType -from typing import cast +from ..models.new_alert_data_type import NewAlertDataType, check_new_alert_data_type if TYPE_CHECKING: from ..models.new_alert_data_attributes import NewAlertDataAttributes @@ -32,7 +28,6 @@ class NewAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_data_attributes import NewAlertDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_alert_data_attributes.py b/rootly_sdk/models/new_alert_data_attributes.py index 47846556..31ed11b4 100644 --- a/rootly_sdk/models/new_alert_data_attributes.py +++ b/rootly_sdk/models/new_alert_data_attributes.py @@ -1,25 +1,22 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 +from dateutil.parser import isoparse -from ..models.new_alert_data_attributes_noise import check_new_alert_data_attributes_noise -from ..models.new_alert_data_attributes_noise import NewAlertDataAttributesNoise +from ..models.new_alert_data_attributes_noise import NewAlertDataAttributesNoise, check_new_alert_data_attributes_noise from ..models.new_alert_data_attributes_notification_target_type import ( + NewAlertDataAttributesNotificationTargetType, check_new_alert_data_attributes_notification_target_type, ) -from ..models.new_alert_data_attributes_notification_target_type import NewAlertDataAttributesNotificationTargetType -from ..models.new_alert_data_attributes_status import check_new_alert_data_attributes_status -from ..models.new_alert_data_attributes_status import NewAlertDataAttributesStatus +from ..models.new_alert_data_attributes_status import ( + NewAlertDataAttributesStatus, + check_new_alert_data_attributes_status, +) from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime if TYPE_CHECKING: from ..models.new_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( @@ -100,14 +97,11 @@ class NewAlertDataAttributes: ) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_data_attributes_notification_targets_type_0_item import ( - NewAlertDataAttributesNotificationTargetsType0Item, - ) - from ..models.new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 from ..models.new_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( NewAlertDataAttributesAlertFieldValuesAttributesItemType0, ) from ..models.new_alert_data_attributes_data_type_0 import NewAlertDataAttributesDataType0 + from ..models.new_alert_data_attributes_labels_item_type_0 import NewAlertDataAttributesLabelsItemType0 summary = self.summary 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 60c442d6..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewAlertDataAttributesAlertFieldValuesAttributesItemType0") 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 2a7e220a..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewAlertDataAttributesDataType0") 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 804a92ea..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,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="NewAlertDataAttributesLabelsItemType0") diff --git a/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py index 7b27a82d..2016715d 100644 --- a/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py +++ b/rootly_sdk/models/new_alert_data_attributes_notification_targets_type_0_item.py @@ -1,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_alert_data_attributes_notification_targets_type_0_item_type import ( - check_new_alert_data_attributes_notification_targets_type_0_item_type, -) from ..models.new_alert_data_attributes_notification_targets_type_0_item_type import ( NewAlertDataAttributesNotificationTargetsType0ItemType, + check_new_alert_data_attributes_notification_targets_type_0_item_type, ) -from typing import cast - T = TypeVar("T", bound="NewAlertDataAttributesNotificationTargetsType0Item") diff --git a/rootly_sdk/models/new_alert_event.py b/rootly_sdk/models/new_alert_event.py index 09e4cd59..e8e54def 100644 --- a/rootly_sdk/models/new_alert_event.py +++ b/rootly_sdk/models/new_alert_event.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_event_data import NewAlertEventData @@ -28,7 +24,6 @@ class NewAlertEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_event_data import NewAlertEventData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_alert_event_data.py b/rootly_sdk/models/new_alert_event_data.py index 08466157..1533615e 100644 --- a/rootly_sdk/models/new_alert_event_data.py +++ b/rootly_sdk/models/new_alert_event_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alert_event_data_type import check_new_alert_event_data_type -from ..models.new_alert_event_data_type import NewAlertEventDataType -from typing import cast +from ..models.new_alert_event_data_type import NewAlertEventDataType, check_new_alert_event_data_type if TYPE_CHECKING: from ..models.new_alert_event_data_attributes import NewAlertEventDataAttributes @@ -32,7 +28,6 @@ class NewAlertEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_event_data_attributes import NewAlertEventDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_alert_event_data_attributes.py b/rootly_sdk/models/new_alert_event_data_attributes.py index 9fd68507..fa2ef336 100644 --- a/rootly_sdk/models/new_alert_event_data_attributes.py +++ b/rootly_sdk/models/new_alert_event_data_attributes.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_alert_event_data_attributes_kind import ( + NewAlertEventDataAttributesKind, + check_new_alert_event_data_attributes_kind, +) from ..types import UNSET, Unset -from ..models.new_alert_event_data_attributes_kind import check_new_alert_event_data_attributes_kind -from ..models.new_alert_event_data_attributes_kind import NewAlertEventDataAttributesKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewAlertEventDataAttributes") diff --git a/rootly_sdk/models/new_alert_field.py b/rootly_sdk/models/new_alert_field.py index fcb70fb3..be0fa49a 100644 --- a/rootly_sdk/models/new_alert_field.py +++ b/rootly_sdk/models/new_alert_field.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_field_data import NewAlertFieldData @@ -28,7 +24,6 @@ class NewAlertField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_field_data import NewAlertFieldData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_alert_field_data.py b/rootly_sdk/models/new_alert_field_data.py index a39411a0..2be303ec 100644 --- a/rootly_sdk/models/new_alert_field_data.py +++ b/rootly_sdk/models/new_alert_field_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alert_field_data_type import check_new_alert_field_data_type -from ..models.new_alert_field_data_type import NewAlertFieldDataType -from typing import cast +from ..models.new_alert_field_data_type import NewAlertFieldDataType, check_new_alert_field_data_type if TYPE_CHECKING: from ..models.new_alert_field_data_attributes import NewAlertFieldDataAttributes @@ -32,7 +28,6 @@ class NewAlertFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_field_data_attributes import NewAlertFieldDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_alert_field_data_attributes.py b/rootly_sdk/models/new_alert_field_data_attributes.py index 9931fa39..d3021a24 100644 --- a/rootly_sdk/models/new_alert_field_data_attributes.py +++ b/rootly_sdk/models/new_alert_field_data_attributes.py @@ -1,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewAlertFieldDataAttributes") diff --git a/rootly_sdk/models/new_alert_group.py b/rootly_sdk/models/new_alert_group.py index c0da165a..8f3c7eaf 100644 --- a/rootly_sdk/models/new_alert_group.py +++ b/rootly_sdk/models/new_alert_group.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_group_data import NewAlertGroupData @@ -28,7 +24,6 @@ class NewAlertGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_group_data import NewAlertGroupData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_alert_group_data.py b/rootly_sdk/models/new_alert_group_data.py index 49b1c634..f11830f5 100644 --- a/rootly_sdk/models/new_alert_group_data.py +++ b/rootly_sdk/models/new_alert_group_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alert_group_data_type import check_new_alert_group_data_type -from ..models.new_alert_group_data_type import NewAlertGroupDataType -from typing import cast +from ..models.new_alert_group_data_type import NewAlertGroupDataType, check_new_alert_group_data_type if TYPE_CHECKING: from ..models.new_alert_group_data_attributes import NewAlertGroupDataAttributes @@ -32,7 +28,6 @@ class NewAlertGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_group_data_attributes import NewAlertGroupDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_alert_group_data_attributes.py b/rootly_sdk/models/new_alert_group_data_attributes.py index 6ae3ea27..7fe6b383 100644 --- a/rootly_sdk/models/new_alert_group_data_attributes.py +++ b/rootly_sdk/models/new_alert_group_data_attributes.py @@ -1,27 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alert_group_data_attributes_condition_type import check_new_alert_group_data_attributes_condition_type -from ..models.new_alert_group_data_attributes_condition_type import NewAlertGroupDataAttributesConditionType +from ..models.new_alert_group_data_attributes_condition_type import ( + NewAlertGroupDataAttributesConditionType, + check_new_alert_group_data_attributes_condition_type, +) from ..models.new_alert_group_data_attributes_group_by_alert_title import ( + NewAlertGroupDataAttributesGroupByAlertTitle, check_new_alert_group_data_attributes_group_by_alert_title, ) -from ..models.new_alert_group_data_attributes_group_by_alert_title import NewAlertGroupDataAttributesGroupByAlertTitle -from ..models.new_alert_group_data_attributes_group_by_alert_urgency import ( - check_new_alert_group_data_attributes_group_by_alert_urgency, -) from ..models.new_alert_group_data_attributes_group_by_alert_urgency import ( NewAlertGroupDataAttributesGroupByAlertUrgency, + check_new_alert_group_data_attributes_group_by_alert_urgency, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_alert_group_data_attributes_attributes_item import NewAlertGroupDataAttributesAttributesItem @@ -64,9 +60,6 @@ class NewAlertGroupDataAttributes: conditions: list[NewAlertGroupDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_group_data_attributes_conditions_item import NewAlertGroupDataAttributesConditionsItem - from ..models.new_alert_group_data_attributes_attributes_item import NewAlertGroupDataAttributesAttributesItem - from ..models.new_alert_group_data_attributes_targets_item import NewAlertGroupDataAttributesTargetsItem name = self.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 c02ae335..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewAlertGroupDataAttributesAttributesItem") 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 547d25f6..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,34 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alert_group_data_attributes_conditions_item_conditionable_type import ( - check_new_alert_group_data_attributes_conditions_item_conditionable_type, -) from ..models.new_alert_group_data_attributes_conditions_item_conditionable_type import ( NewAlertGroupDataAttributesConditionsItemConditionableType, -) -from ..models.new_alert_group_data_attributes_conditions_item_property_field_condition_type import ( - check_new_alert_group_data_attributes_conditions_item_property_field_condition_type, + check_new_alert_group_data_attributes_conditions_item_conditionable_type, ) from ..models.new_alert_group_data_attributes_conditions_item_property_field_condition_type import ( NewAlertGroupDataAttributesConditionsItemPropertyFieldConditionType, -) -from ..models.new_alert_group_data_attributes_conditions_item_property_field_type import ( - check_new_alert_group_data_attributes_conditions_item_property_field_type, + check_new_alert_group_data_attributes_conditions_item_property_field_condition_type, ) from ..models.new_alert_group_data_attributes_conditions_item_property_field_type import ( NewAlertGroupDataAttributesConditionsItemPropertyFieldType, + check_new_alert_group_data_attributes_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewAlertGroupDataAttributesConditionsItem") 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 b8b0ab0b..ecc8a286 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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_alert_group_data_attributes_targets_item_target_type import ( - check_new_alert_group_data_attributes_targets_item_target_type, -) from ..models.new_alert_group_data_attributes_targets_item_target_type import ( NewAlertGroupDataAttributesTargetsItemTargetType, + check_new_alert_group_data_attributes_targets_item_target_type, ) -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="NewAlertGroupDataAttributesTargetsItem") diff --git a/rootly_sdk/models/new_alert_route.py b/rootly_sdk/models/new_alert_route.py index 3df66236..12b360a5 100644 --- a/rootly_sdk/models/new_alert_route.py +++ b/rootly_sdk/models/new_alert_route.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_route_data import NewAlertRouteData @@ -29,7 +26,6 @@ class NewAlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_route_data import NewAlertRouteData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/new_alert_route_data.py b/rootly_sdk/models/new_alert_route_data.py index 215410de..45913777 100644 --- a/rootly_sdk/models/new_alert_route_data.py +++ b/rootly_sdk/models/new_alert_route_data.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.new_alert_route_data_type import NewAlertRouteDataType, check_new_alert_route_data_type from ..types import UNSET, Unset -from ..models.new_alert_route_data_type import check_new_alert_route_data_type -from ..models.new_alert_route_data_type import NewAlertRouteDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_route_data_attributes import NewAlertRouteDataAttributes @@ -33,7 +29,6 @@ class NewAlertRouteData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_route_data_attributes import NewAlertRouteDataAttributes type_: str | Unset = UNSET if not isinstance(self.type_, Unset): diff --git a/rootly_sdk/models/new_alert_route_data_attributes.py b/rootly_sdk/models/new_alert_route_data_attributes.py index 5bdb29ba..a68d9865 100644 --- a/rootly_sdk/models/new_alert_route_data_attributes.py +++ b/rootly_sdk/models/new_alert_route_data_attributes.py @@ -1,17 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.new_alert_route_data_attributes_rules_item import NewAlertRouteDataAttributesRulesItem @@ -38,7 +35,6 @@ class NewAlertRouteDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_route_data_attributes_rules_item import NewAlertRouteDataAttributesRulesItem name = self.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 20835287..1c4d8b23 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item import ( NewAlertRouteDataAttributesRulesItemConditionGroupsItem, @@ -42,12 +39,6 @@ class NewAlertRouteDataAttributesRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_route_data_attributes_rules_item_destinations_item import ( - NewAlertRouteDataAttributesRulesItemDestinationsItem, - ) - from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item import ( - NewAlertRouteDataAttributesRulesItemConditionGroupsItem, - ) name = self.name 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 bae52877..f5187e45 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, @@ -33,9 +30,6 @@ class NewAlertRouteDataAttributesRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( - NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, - ) conditions = [] for conditions_item_data in self.conditions: 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 62383a19..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,35 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - -from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( - check_new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type, -) from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType, -) -from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( - check_new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type, + check_new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type, ) from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, -) -from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( - check_new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type, + check_new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type, ) from ..models.new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType, + check_new_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="NewAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem") 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 a092f4b6..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_alert_route_data_attributes_rules_item_destinations_item_target_type import ( - check_new_alert_route_data_attributes_rules_item_destinations_item_target_type, -) from ..models.new_alert_route_data_attributes_rules_item_destinations_item_target_type import ( NewAlertRouteDataAttributesRulesItemDestinationsItemTargetType, + check_new_alert_route_data_attributes_rules_item_destinations_item_target_type, ) -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="NewAlertRouteDataAttributesRulesItemDestinationsItem") diff --git a/rootly_sdk/models/new_alert_routing_rule.py b/rootly_sdk/models/new_alert_routing_rule.py index e28a0e48..99586182 100644 --- a/rootly_sdk/models/new_alert_routing_rule.py +++ b/rootly_sdk/models/new_alert_routing_rule.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_routing_rule_data import NewAlertRoutingRuleData @@ -28,7 +24,6 @@ class NewAlertRoutingRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_routing_rule_data import NewAlertRoutingRuleData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_alert_routing_rule_data.py b/rootly_sdk/models/new_alert_routing_rule_data.py index ae8ef489..82389749 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data.py +++ b/rootly_sdk/models/new_alert_routing_rule_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alert_routing_rule_data_type import check_new_alert_routing_rule_data_type -from ..models.new_alert_routing_rule_data_type import NewAlertRoutingRuleDataType -from typing import cast +from ..models.new_alert_routing_rule_data_type import ( + NewAlertRoutingRuleDataType, + check_new_alert_routing_rule_data_type, +) if TYPE_CHECKING: from ..models.new_alert_routing_rule_data_attributes import NewAlertRoutingRuleDataAttributes @@ -32,7 +31,6 @@ class NewAlertRoutingRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_routing_rule_data_attributes import NewAlertRoutingRuleDataAttributes type_: str = self.type_ 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 c47a6a90..2fb376e7 100644 --- a/rootly_sdk/models/new_alert_routing_rule_data_attributes.py +++ b/rootly_sdk/models/new_alert_routing_rule_data_attributes.py @@ -1,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset -from ..models.new_alert_routing_rule_data_attributes_condition_type import ( - check_new_alert_routing_rule_data_attributes_condition_type, -) from ..models.new_alert_routing_rule_data_attributes_condition_type import ( NewAlertRoutingRuleDataAttributesConditionType, + check_new_alert_routing_rule_data_attributes_condition_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID if TYPE_CHECKING: from ..models.new_alert_routing_rule_data_attributes_conditions_item import ( @@ -55,12 +49,6 @@ class NewAlertRoutingRuleDataAttributes: conditions: list[NewAlertRoutingRuleDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_routing_rule_data_attributes_destination import ( - NewAlertRoutingRuleDataAttributesDestination, - ) - from ..models.new_alert_routing_rule_data_attributes_conditions_item import ( - NewAlertRoutingRuleDataAttributesConditionsItem, - ) name = self.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 f8506d05..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type import ( - check_new_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type, -) from ..models.new_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type import ( NewAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType, -) -from ..models.new_alert_routing_rule_data_attributes_conditions_item_property_field_type import ( - check_new_alert_routing_rule_data_attributes_conditions_item_property_field_type, + check_new_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type, ) from ..models.new_alert_routing_rule_data_attributes_conditions_item_property_field_type import ( NewAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType, + check_new_alert_routing_rule_data_attributes_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewAlertRoutingRuleDataAttributesConditionsItem") 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 51990ec1..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_alert_routing_rule_data_attributes_destination_target_type import ( - check_new_alert_routing_rule_data_attributes_destination_target_type, -) from ..models.new_alert_routing_rule_data_attributes_destination_target_type import ( NewAlertRoutingRuleDataAttributesDestinationTargetType, + check_new_alert_routing_rule_data_attributes_destination_target_type, ) -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="NewAlertRoutingRuleDataAttributesDestination") diff --git a/rootly_sdk/models/new_alert_urgency.py b/rootly_sdk/models/new_alert_urgency.py index 0b25e31b..bb1f20c0 100644 --- a/rootly_sdk/models/new_alert_urgency.py +++ b/rootly_sdk/models/new_alert_urgency.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_alert_urgency_data import NewAlertUrgencyData @@ -28,7 +24,6 @@ class NewAlertUrgency: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_urgency_data import NewAlertUrgencyData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_alert_urgency_data.py b/rootly_sdk/models/new_alert_urgency_data.py index 748153ba..bfef8677 100644 --- a/rootly_sdk/models/new_alert_urgency_data.py +++ b/rootly_sdk/models/new_alert_urgency_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alert_urgency_data_type import check_new_alert_urgency_data_type -from ..models.new_alert_urgency_data_type import NewAlertUrgencyDataType -from typing import cast +from ..models.new_alert_urgency_data_type import NewAlertUrgencyDataType, check_new_alert_urgency_data_type if TYPE_CHECKING: from ..models.new_alert_urgency_data_attributes import NewAlertUrgencyDataAttributes @@ -32,7 +28,6 @@ class NewAlertUrgencyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alert_urgency_data_attributes import NewAlertUrgencyDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_alert_urgency_data_attributes.py b/rootly_sdk/models/new_alert_urgency_data_attributes.py index 624cb712..9a51775d 100644 --- a/rootly_sdk/models/new_alert_urgency_data_attributes.py +++ b/rootly_sdk/models/new_alert_urgency_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewAlertUrgencyDataAttributes") diff --git a/rootly_sdk/models/new_alerts_source.py b/rootly_sdk/models/new_alerts_source.py index 540f42cb..f40df906 100644 --- a/rootly_sdk/models/new_alerts_source.py +++ b/rootly_sdk/models/new_alerts_source.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_alerts_source_data import NewAlertsSourceData @@ -28,7 +24,6 @@ class NewAlertsSource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alerts_source_data import NewAlertsSourceData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_alerts_source_data.py b/rootly_sdk/models/new_alerts_source_data.py index f32c8b23..f5d4b12e 100644 --- a/rootly_sdk/models/new_alerts_source_data.py +++ b/rootly_sdk/models/new_alerts_source_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alerts_source_data_type import check_new_alerts_source_data_type -from ..models.new_alerts_source_data_type import NewAlertsSourceDataType -from typing import cast +from ..models.new_alerts_source_data_type import NewAlertsSourceDataType, check_new_alerts_source_data_type if TYPE_CHECKING: from ..models.new_alerts_source_data_attributes import NewAlertsSourceDataAttributes @@ -32,7 +28,6 @@ class NewAlertsSourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alerts_source_data_attributes import NewAlertsSourceDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_alerts_source_data_attributes.py b/rootly_sdk/models/new_alerts_source_data_attributes.py index cd3f8c85..1cec926d 100644 --- a/rootly_sdk/models/new_alerts_source_data_attributes.py +++ b/rootly_sdk/models/new_alerts_source_data_attributes.py @@ -1,23 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.new_alerts_source_data_attributes_deduplication_key_kind import ( + NewAlertsSourceDataAttributesDeduplicationKeyKind, check_new_alerts_source_data_attributes_deduplication_key_kind, ) -from ..models.new_alerts_source_data_attributes_deduplication_key_kind import ( - NewAlertsSourceDataAttributesDeduplicationKeyKind, +from ..models.new_alerts_source_data_attributes_source_type import ( + NewAlertsSourceDataAttributesSourceType, + check_new_alerts_source_data_attributes_source_type, ) -from ..models.new_alerts_source_data_attributes_source_type import check_new_alerts_source_data_attributes_source_type -from ..models.new_alerts_source_data_attributes_source_type import NewAlertsSourceDataAttributesSourceType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_alerts_source_data_attributes_alert_source_fields_attributes_item import ( @@ -87,12 +83,6 @@ class NewAlertsSourceDataAttributes: alert_source_fields_attributes: list[NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item import ( - NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem, - ) - from ..models.new_alerts_source_data_attributes_alert_source_fields_attributes_item import ( - NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem, - ) from ..models.new_alerts_source_data_attributes_alert_template_attributes_type_0 import ( NewAlertsSourceDataAttributesAlertTemplateAttributesType0, ) 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 0e80a55b..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewAlertsSourceDataAttributesAlertSourceFieldsAttributesItem") 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 195df5cb..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,34 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type import ( - check_new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type, -) from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type import ( NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType, -) -from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind import ( - check_new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind, + check_new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type, ) from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind import ( NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind, -) -from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator import ( - check_new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator, + check_new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind, ) from ..models.new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator import ( NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator, + check_new_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem") 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 db17888d..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewAlertsSourceDataAttributesAlertTemplateAttributesType0") 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 a67c2f40..7af8435b 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,33 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type import ( - check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type, -) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type import ( NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType, -) -from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type import ( - check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type, + check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type, ) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type import ( NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType, -) -from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind import ( - check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind, + check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type, ) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind import ( NewAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind, + check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item import ( @@ -77,9 +68,6 @@ class NewAlertsSourceDataAttributesResolutionRuleAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item import ( - NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem, - ) enabled = self.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 2212983a..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,34 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( - check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type, -) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType, -) -from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( - check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind, + check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type, ) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind, -) -from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( - check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator, + check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind, ) from ..models.new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator, + check_new_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem") 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 b93c412f..07b1013b 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item import ( NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem, @@ -44,9 +41,6 @@ class NewAlertsSourceDataAttributesSourceableAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item import ( - NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem, - ) auto_resolve = self.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 a94840db..680df17a 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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( - check_new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field, -) from ..models.new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField, + check_new_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem") diff --git a/rootly_sdk/models/new_api_key.py b/rootly_sdk/models/new_api_key.py index d45b55d0..76000ed8 100644 --- a/rootly_sdk/models/new_api_key.py +++ b/rootly_sdk/models/new_api_key.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_api_key_data import NewApiKeyData @@ -28,7 +24,6 @@ class NewApiKey: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_api_key_data import NewApiKeyData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_api_key_data.py b/rootly_sdk/models/new_api_key_data.py index 9591a6e9..f8653689 100644 --- a/rootly_sdk/models/new_api_key_data.py +++ b/rootly_sdk/models/new_api_key_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_api_key_data_type import check_new_api_key_data_type -from ..models.new_api_key_data_type import NewApiKeyDataType -from typing import cast +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 @@ -32,7 +28,6 @@ class NewApiKeyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_api_key_data_attributes import NewApiKeyDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_api_key_data_attributes.py b/rootly_sdk/models/new_api_key_data_attributes.py index ec2680e4..8c211349 100644 --- a/rootly_sdk/models/new_api_key_data_attributes.py +++ b/rootly_sdk/models/new_api_key_data_attributes.py @@ -1,20 +1,17 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_api_key_data_attributes_kind import check_new_api_key_data_attributes_kind -from ..models.new_api_key_data_attributes_kind import NewApiKeyDataAttributesKind -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +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") diff --git a/rootly_sdk/models/new_authorization.py b/rootly_sdk/models/new_authorization.py index 214981d7..2e9cf0c3 100644 --- a/rootly_sdk/models/new_authorization.py +++ b/rootly_sdk/models/new_authorization.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_authorization_data import NewAuthorizationData @@ -28,7 +24,6 @@ class NewAuthorization: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_authorization_data import NewAuthorizationData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_authorization_data.py b/rootly_sdk/models/new_authorization_data.py index 9c0cb7c1..31b084d8 100644 --- a/rootly_sdk/models/new_authorization_data.py +++ b/rootly_sdk/models/new_authorization_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_authorization_data_type import check_new_authorization_data_type -from ..models.new_authorization_data_type import NewAuthorizationDataType -from typing import cast +from ..models.new_authorization_data_type import NewAuthorizationDataType, check_new_authorization_data_type if TYPE_CHECKING: from ..models.new_authorization_data_attributes import NewAuthorizationDataAttributes @@ -32,7 +28,6 @@ class NewAuthorizationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_authorization_data_attributes import NewAuthorizationDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_authorization_data_attributes.py b/rootly_sdk/models/new_authorization_data_attributes.py index f56c0865..b0ef4f6f 100644 --- a/rootly_sdk/models/new_authorization_data_attributes.py +++ b/rootly_sdk/models/new_authorization_data_attributes.py @@ -1,25 +1,22 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset from ..models.new_authorization_data_attributes_authorizable_type import ( + NewAuthorizationDataAttributesAuthorizableType, check_new_authorization_data_attributes_authorizable_type, ) -from ..models.new_authorization_data_attributes_authorizable_type import NewAuthorizationDataAttributesAuthorizableType -from ..models.new_authorization_data_attributes_grantee_type import check_new_authorization_data_attributes_grantee_type -from ..models.new_authorization_data_attributes_grantee_type import NewAuthorizationDataAttributesGranteeType +from ..models.new_authorization_data_attributes_grantee_type import ( + NewAuthorizationDataAttributesGranteeType, + check_new_authorization_data_attributes_grantee_type, +) from ..models.new_authorization_data_attributes_permissions_item import ( + NewAuthorizationDataAttributesPermissionsItem, check_new_authorization_data_attributes_permissions_item, ) -from ..models.new_authorization_data_attributes_permissions_item import NewAuthorizationDataAttributesPermissionsItem -from typing import cast - T = TypeVar("T", bound="NewAuthorizationDataAttributes") diff --git a/rootly_sdk/models/new_catalog.py b/rootly_sdk/models/new_catalog.py index 953e33e9..237fa872 100644 --- a/rootly_sdk/models/new_catalog.py +++ b/rootly_sdk/models/new_catalog.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_catalog_data import NewCatalogData @@ -28,7 +24,6 @@ class NewCatalog: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_data import NewCatalogData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_catalog_checklist_template.py b/rootly_sdk/models/new_catalog_checklist_template.py index 63db9dbe..76099d53 100644 --- a/rootly_sdk/models/new_catalog_checklist_template.py +++ b/rootly_sdk/models/new_catalog_checklist_template.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_catalog_checklist_template_data import NewCatalogChecklistTemplateData @@ -28,7 +24,6 @@ class NewCatalogChecklistTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_checklist_template_data import NewCatalogChecklistTemplateData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_catalog_checklist_template_data.py b/rootly_sdk/models/new_catalog_checklist_template_data.py index 6e0be884..46881d35 100644 --- a/rootly_sdk/models/new_catalog_checklist_template_data.py +++ b/rootly_sdk/models/new_catalog_checklist_template_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_catalog_checklist_template_data_type import check_new_catalog_checklist_template_data_type -from ..models.new_catalog_checklist_template_data_type import NewCatalogChecklistTemplateDataType -from typing import cast +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 @@ -32,7 +31,6 @@ class NewCatalogChecklistTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_checklist_template_data_attributes import NewCatalogChecklistTemplateDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py b/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py index 6928e8f4..1d8669c8 100644 --- a/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py +++ b/rootly_sdk/models/new_catalog_checklist_template_data_attributes.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_catalog_checklist_template_data_attributes_catalog_type import ( - check_new_catalog_checklist_template_data_attributes_catalog_type, -) from ..models.new_catalog_checklist_template_data_attributes_catalog_type import ( NewCatalogChecklistTemplateDataAttributesCatalogType, -) -from ..models.new_catalog_checklist_template_data_attributes_scope_type import ( - check_new_catalog_checklist_template_data_attributes_scope_type, + 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 -from typing import cast if TYPE_CHECKING: from ..models.new_catalog_checklist_template_data_attributes_builtin_field import ( @@ -68,15 +60,9 @@ class NewCatalogChecklistTemplateDataAttributes: owners: list[NewCatalogChecklistTemplateDataAttributesOwnersType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_checklist_template_data_attributes_custom_field import ( - NewCatalogChecklistTemplateDataAttributesCustomField, - ) from ..models.new_catalog_checklist_template_data_attributes_builtin_field import ( NewCatalogChecklistTemplateDataAttributesBuiltinField, ) - from ..models.new_catalog_checklist_template_data_attributes_owners_type_0_item import ( - NewCatalogChecklistTemplateDataAttributesOwnersType0Item, - ) name = self.name 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 index 7260d3c4..59cbd408 100644 --- 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 @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_catalog_checklist_template_data_attributes_builtin_field_field_source import ( - check_new_catalog_checklist_template_data_attributes_builtin_field_field_source, -) 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, ) -from typing import cast - T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributesBuiltinField") 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 index 4cd2844d..4c8ca431 100644 --- 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 @@ -1,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_catalog_checklist_template_data_attributes_custom_field_field_source import ( - check_new_catalog_checklist_template_data_attributes_custom_field_field_source, -) 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 -from typing import cast - T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributesCustomField") 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 index bca849b0..36a28929 100644 --- 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 @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_catalog_checklist_template_data_attributes_owners_type_0_item_type import ( - check_new_catalog_checklist_template_data_attributes_owners_type_0_item_type, -) 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, ) -from typing import cast - T = TypeVar("T", bound="NewCatalogChecklistTemplateDataAttributesOwnersType0Item") diff --git a/rootly_sdk/models/new_catalog_data.py b/rootly_sdk/models/new_catalog_data.py index a1059e2f..cdb82389 100644 --- a/rootly_sdk/models/new_catalog_data.py +++ b/rootly_sdk/models/new_catalog_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_catalog_data_type import check_new_catalog_data_type -from ..models.new_catalog_data_type import NewCatalogDataType -from typing import cast +from ..models.new_catalog_data_type import NewCatalogDataType, check_new_catalog_data_type if TYPE_CHECKING: from ..models.new_catalog_data_attributes import NewCatalogDataAttributes @@ -32,7 +28,6 @@ class NewCatalogData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_data_attributes import NewCatalogDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_catalog_data_attributes.py b/rootly_sdk/models/new_catalog_data_attributes.py index 096e2400..ec3d19f4 100644 --- a/rootly_sdk/models/new_catalog_data_attributes.py +++ b/rootly_sdk/models/new_catalog_data_attributes.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_catalog_data_attributes_icon import ( + NewCatalogDataAttributesIcon, + check_new_catalog_data_attributes_icon, +) from ..types import UNSET, Unset -from ..models.new_catalog_data_attributes_icon import check_new_catalog_data_attributes_icon -from ..models.new_catalog_data_attributes_icon import NewCatalogDataAttributesIcon -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewCatalogDataAttributes") diff --git a/rootly_sdk/models/new_catalog_entity.py b/rootly_sdk/models/new_catalog_entity.py index 0c33099a..e69bd8cd 100644 --- a/rootly_sdk/models/new_catalog_entity.py +++ b/rootly_sdk/models/new_catalog_entity.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_catalog_entity_data import NewCatalogEntityData @@ -28,7 +24,6 @@ class NewCatalogEntity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_entity_data import NewCatalogEntityData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_catalog_entity_data.py b/rootly_sdk/models/new_catalog_entity_data.py index c3c6b918..86bda241 100644 --- a/rootly_sdk/models/new_catalog_entity_data.py +++ b/rootly_sdk/models/new_catalog_entity_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_catalog_entity_data_type import check_new_catalog_entity_data_type -from ..models.new_catalog_entity_data_type import NewCatalogEntityDataType -from typing import cast +from ..models.new_catalog_entity_data_type import NewCatalogEntityDataType, check_new_catalog_entity_data_type if TYPE_CHECKING: from ..models.new_catalog_entity_data_attributes import NewCatalogEntityDataAttributes @@ -32,7 +28,6 @@ class NewCatalogEntityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_entity_data_attributes import NewCatalogEntityDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_catalog_entity_data_attributes.py b/rootly_sdk/models/new_catalog_entity_data_attributes.py index 428cb7a9..1afb06cc 100644 --- a/rootly_sdk/models/new_catalog_entity_data_attributes.py +++ b/rootly_sdk/models/new_catalog_entity_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_catalog_entity_data_attributes_properties_item import NewCatalogEntityDataAttributesPropertiesItem @@ -40,9 +36,6 @@ class NewCatalogEntityDataAttributes: properties: list[NewCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_entity_data_attributes_properties_item import ( - NewCatalogEntityDataAttributesPropertiesItem, - ) name = self.name diff --git a/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py b/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py index fc566190..f5636592 100644 --- a/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_catalog_entity_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewCatalogEntityDataAttributesPropertiesItem") diff --git a/rootly_sdk/models/new_catalog_entity_property.py b/rootly_sdk/models/new_catalog_entity_property.py index 4793ef9f..3f7f8636 100644 --- a/rootly_sdk/models/new_catalog_entity_property.py +++ b/rootly_sdk/models/new_catalog_entity_property.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_catalog_entity_property_data import NewCatalogEntityPropertyData @@ -30,7 +26,6 @@ class NewCatalogEntityProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_entity_property_data import NewCatalogEntityPropertyData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_catalog_entity_property_data.py b/rootly_sdk/models/new_catalog_entity_property_data.py index 13d61bb7..81053936 100644 --- a/rootly_sdk/models/new_catalog_entity_property_data.py +++ b/rootly_sdk/models/new_catalog_entity_property_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_catalog_entity_property_data_type import check_new_catalog_entity_property_data_type -from ..models.new_catalog_entity_property_data_type import NewCatalogEntityPropertyDataType -from typing import cast +from ..models.new_catalog_entity_property_data_type import ( + NewCatalogEntityPropertyDataType, + check_new_catalog_entity_property_data_type, +) if TYPE_CHECKING: from ..models.new_catalog_entity_property_data_attributes import NewCatalogEntityPropertyDataAttributes @@ -32,7 +31,6 @@ class NewCatalogEntityPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_entity_property_data_attributes import NewCatalogEntityPropertyDataAttributes type_: str = self.type_ 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 3f6c8f43..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,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset from ..models.new_catalog_entity_property_data_attributes_key import ( + NewCatalogEntityPropertyDataAttributesKey, check_new_catalog_entity_property_data_attributes_key, ) -from ..models.new_catalog_entity_property_data_attributes_key import NewCatalogEntityPropertyDataAttributesKey from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewCatalogEntityPropertyDataAttributes") diff --git a/rootly_sdk/models/new_catalog_field.py b/rootly_sdk/models/new_catalog_field.py index 6de66618..e036da74 100644 --- a/rootly_sdk/models/new_catalog_field.py +++ b/rootly_sdk/models/new_catalog_field.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_catalog_field_data import NewCatalogFieldData @@ -29,7 +25,6 @@ class NewCatalogField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_field_data import NewCatalogFieldData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_catalog_field_data.py b/rootly_sdk/models/new_catalog_field_data.py index f7522a1c..221de699 100644 --- a/rootly_sdk/models/new_catalog_field_data.py +++ b/rootly_sdk/models/new_catalog_field_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_catalog_field_data_type import check_new_catalog_field_data_type -from ..models.new_catalog_field_data_type import NewCatalogFieldDataType -from typing import cast +from ..models.new_catalog_field_data_type import NewCatalogFieldDataType, check_new_catalog_field_data_type if TYPE_CHECKING: from ..models.new_catalog_field_data_attributes import NewCatalogFieldDataAttributes @@ -32,7 +28,6 @@ class NewCatalogFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_field_data_attributes import NewCatalogFieldDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_catalog_field_data_attributes.py b/rootly_sdk/models/new_catalog_field_data_attributes.py index 8a5679bc..2de16529 100644 --- a/rootly_sdk/models/new_catalog_field_data_attributes.py +++ b/rootly_sdk/models/new_catalog_field_data_attributes.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_catalog_field_data_attributes_catalog_type import ( + NewCatalogFieldDataAttributesCatalogType, + check_new_catalog_field_data_attributes_catalog_type, +) +from ..models.new_catalog_field_data_attributes_kind import ( + NewCatalogFieldDataAttributesKind, + check_new_catalog_field_data_attributes_kind, +) from ..types import UNSET, Unset -from ..models.new_catalog_field_data_attributes_catalog_type import check_new_catalog_field_data_attributes_catalog_type -from ..models.new_catalog_field_data_attributes_catalog_type import NewCatalogFieldDataAttributesCatalogType -from ..models.new_catalog_field_data_attributes_kind import check_new_catalog_field_data_attributes_kind -from ..models.new_catalog_field_data_attributes_kind import NewCatalogFieldDataAttributesKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewCatalogFieldDataAttributes") diff --git a/rootly_sdk/models/new_catalog_property.py b/rootly_sdk/models/new_catalog_property.py index 03c59dab..2afbc8a2 100644 --- a/rootly_sdk/models/new_catalog_property.py +++ b/rootly_sdk/models/new_catalog_property.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_catalog_property_data import NewCatalogPropertyData @@ -29,7 +25,6 @@ class NewCatalogProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_property_data import NewCatalogPropertyData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_catalog_property_data.py b/rootly_sdk/models/new_catalog_property_data.py index 0d6ae74a..8e4df1f6 100644 --- a/rootly_sdk/models/new_catalog_property_data.py +++ b/rootly_sdk/models/new_catalog_property_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_catalog_property_data_type import check_new_catalog_property_data_type -from ..models.new_catalog_property_data_type import NewCatalogPropertyDataType -from typing import cast +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 @@ -32,7 +28,6 @@ class NewCatalogPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_catalog_property_data_attributes import NewCatalogPropertyDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_catalog_property_data_attributes.py b/rootly_sdk/models/new_catalog_property_data_attributes.py index c6d6306e..3a4d155c 100644 --- a/rootly_sdk/models/new_catalog_property_data_attributes.py +++ b/rootly_sdk/models/new_catalog_property_data_attributes.py @@ -1,22 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 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_catalog_type import NewCatalogPropertyDataAttributesCatalogType -from ..models.new_catalog_property_data_attributes_kind import check_new_catalog_property_data_attributes_kind -from ..models.new_catalog_property_data_attributes_kind import NewCatalogPropertyDataAttributesKind +from ..models.new_catalog_property_data_attributes_kind import ( + NewCatalogPropertyDataAttributesKind, + check_new_catalog_property_data_attributes_kind, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewCatalogPropertyDataAttributes") diff --git a/rootly_sdk/models/new_cause.py b/rootly_sdk/models/new_cause.py index f00eced9..d00de96f 100644 --- a/rootly_sdk/models/new_cause.py +++ b/rootly_sdk/models/new_cause.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_cause_data import NewCauseData @@ -28,7 +24,6 @@ class NewCause: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_cause_data import NewCauseData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_cause_data.py b/rootly_sdk/models/new_cause_data.py index 3de05de2..bbe9ae91 100644 --- a/rootly_sdk/models/new_cause_data.py +++ b/rootly_sdk/models/new_cause_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_cause_data_type import check_new_cause_data_type -from ..models.new_cause_data_type import NewCauseDataType -from typing import cast +from ..models.new_cause_data_type import NewCauseDataType, check_new_cause_data_type if TYPE_CHECKING: from ..models.new_cause_data_attributes import NewCauseDataAttributes @@ -32,7 +28,6 @@ class NewCauseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_cause_data_attributes import NewCauseDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_cause_data_attributes.py b/rootly_sdk/models/new_cause_data_attributes.py index d21e1844..449fdadd 100644 --- a/rootly_sdk/models/new_cause_data_attributes.py +++ b/rootly_sdk/models/new_cause_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_cause_data_attributes_properties_item import NewCauseDataAttributesPropertiesItem @@ -34,7 +30,6 @@ class NewCauseDataAttributes: properties: list[NewCauseDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_cause_data_attributes_properties_item import NewCauseDataAttributesPropertiesItem name = self.name diff --git a/rootly_sdk/models/new_cause_data_attributes_properties_item.py b/rootly_sdk/models/new_cause_data_attributes_properties_item.py index 07f685b5..da071245 100644 --- a/rootly_sdk/models/new_cause_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_cause_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewCauseDataAttributesPropertiesItem") diff --git a/rootly_sdk/models/new_communications_group.py b/rootly_sdk/models/new_communications_group.py index b34ef0e0..5f9e95a9 100644 --- a/rootly_sdk/models/new_communications_group.py +++ b/rootly_sdk/models/new_communications_group.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_communications_group_data import NewCommunicationsGroupData @@ -28,7 +24,6 @@ class NewCommunicationsGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_group_data import NewCommunicationsGroupData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_communications_group_data.py b/rootly_sdk/models/new_communications_group_data.py index da0c2046..fb3b0193 100644 --- a/rootly_sdk/models/new_communications_group_data.py +++ b/rootly_sdk/models/new_communications_group_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_communications_group_data_type import check_new_communications_group_data_type -from ..models.new_communications_group_data_type import NewCommunicationsGroupDataType -from typing import cast +from ..models.new_communications_group_data_type import ( + NewCommunicationsGroupDataType, + check_new_communications_group_data_type, +) if TYPE_CHECKING: from ..models.new_communications_group_data_attributes import NewCommunicationsGroupDataAttributes @@ -32,7 +31,6 @@ class NewCommunicationsGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_group_data_attributes import NewCommunicationsGroupDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_communications_group_data_attributes.py b/rootly_sdk/models/new_communications_group_data_attributes.py index b60075c7..e156f4be 100644 --- a/rootly_sdk/models/new_communications_group_data_attributes.py +++ b/rootly_sdk/models/new_communications_group_data_attributes.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_communications_group_data_attributes_condition_type import ( - check_new_communications_group_data_attributes_condition_type, -) from ..models.new_communications_group_data_attributes_condition_type import ( NewCommunicationsGroupDataAttributesConditionType, + check_new_communications_group_data_attributes_condition_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_communications_group_data_attributes_communication_external_group_members_type_0_item import ( @@ -66,12 +60,6 @@ class NewCommunicationsGroupDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_group_data_attributes_communication_group_conditions_type_0_item import ( - NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item, - ) - from ..models.new_communications_group_data_attributes_communication_external_group_members_type_0_item import ( - NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item, - ) name = self.name 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 f9970489..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item") 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 f1c17c7b..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type import ( - check_new_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type, -) from ..models.new_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type import ( NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType, + check_new_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item") diff --git a/rootly_sdk/models/new_communications_stage.py b/rootly_sdk/models/new_communications_stage.py index 17619d51..d57d331d 100644 --- a/rootly_sdk/models/new_communications_stage.py +++ b/rootly_sdk/models/new_communications_stage.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_communications_stage_data import NewCommunicationsStageData @@ -28,7 +24,6 @@ class NewCommunicationsStage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_stage_data import NewCommunicationsStageData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_communications_stage_data.py b/rootly_sdk/models/new_communications_stage_data.py index b6b42aa3..9f3d231c 100644 --- a/rootly_sdk/models/new_communications_stage_data.py +++ b/rootly_sdk/models/new_communications_stage_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_communications_stage_data_type import check_new_communications_stage_data_type -from ..models.new_communications_stage_data_type import NewCommunicationsStageDataType -from typing import cast +from ..models.new_communications_stage_data_type import ( + NewCommunicationsStageDataType, + check_new_communications_stage_data_type, +) if TYPE_CHECKING: from ..models.new_communications_stage_data_attributes import NewCommunicationsStageDataAttributes @@ -32,7 +31,6 @@ class NewCommunicationsStageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_stage_data_attributes import NewCommunicationsStageDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_communications_stage_data_attributes.py b/rootly_sdk/models/new_communications_stage_data_attributes.py index 50ddece2..625f18e7 100644 --- a/rootly_sdk/models/new_communications_stage_data_attributes.py +++ b/rootly_sdk/models/new_communications_stage_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewCommunicationsStageDataAttributes") diff --git a/rootly_sdk/models/new_communications_template.py b/rootly_sdk/models/new_communications_template.py index 57b22779..006dea09 100644 --- a/rootly_sdk/models/new_communications_template.py +++ b/rootly_sdk/models/new_communications_template.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_communications_template_data import NewCommunicationsTemplateData @@ -28,7 +24,6 @@ class NewCommunicationsTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_template_data import NewCommunicationsTemplateData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_communications_template_data.py b/rootly_sdk/models/new_communications_template_data.py index 27363e95..086a413b 100644 --- a/rootly_sdk/models/new_communications_template_data.py +++ b/rootly_sdk/models/new_communications_template_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_communications_template_data_type import check_new_communications_template_data_type -from ..models.new_communications_template_data_type import NewCommunicationsTemplateDataType -from typing import cast +from ..models.new_communications_template_data_type import ( + NewCommunicationsTemplateDataType, + check_new_communications_template_data_type, +) if TYPE_CHECKING: from ..models.new_communications_template_data_attributes import NewCommunicationsTemplateDataAttributes @@ -32,7 +31,6 @@ class NewCommunicationsTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_template_data_attributes import NewCommunicationsTemplateDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_communications_template_data_attributes.py b/rootly_sdk/models/new_communications_template_data_attributes.py index da8e4a02..e555a355 100644 --- a/rootly_sdk/models/new_communications_template_data_attributes.py +++ b/rootly_sdk/models/new_communications_template_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_communications_template_data_attributes_communication_template_stages_attributes_type_0_item import ( NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item, @@ -42,9 +38,6 @@ class NewCommunicationsTemplateDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_template_data_attributes_communication_template_stages_attributes_type_0_item import ( - NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item, - ) name = self.name 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 0b8977d2..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item") diff --git a/rootly_sdk/models/new_communications_type.py b/rootly_sdk/models/new_communications_type.py index 97472ef9..473d00ca 100644 --- a/rootly_sdk/models/new_communications_type.py +++ b/rootly_sdk/models/new_communications_type.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_communications_type_data import NewCommunicationsTypeData @@ -28,7 +24,6 @@ class NewCommunicationsType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_type_data import NewCommunicationsTypeData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_communications_type_data.py b/rootly_sdk/models/new_communications_type_data.py index 7812bd27..709dcbfd 100644 --- a/rootly_sdk/models/new_communications_type_data.py +++ b/rootly_sdk/models/new_communications_type_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_communications_type_data_type import check_new_communications_type_data_type -from ..models.new_communications_type_data_type import NewCommunicationsTypeDataType -from typing import cast +from ..models.new_communications_type_data_type import ( + NewCommunicationsTypeDataType, + check_new_communications_type_data_type, +) if TYPE_CHECKING: from ..models.new_communications_type_data_attributes import NewCommunicationsTypeDataAttributes @@ -32,7 +31,6 @@ class NewCommunicationsTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_communications_type_data_attributes import NewCommunicationsTypeDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_communications_type_data_attributes.py b/rootly_sdk/models/new_communications_type_data_attributes.py index deaf518c..3d65eda4 100644 --- a/rootly_sdk/models/new_communications_type_data_attributes.py +++ b/rootly_sdk/models/new_communications_type_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewCommunicationsTypeDataAttributes") diff --git a/rootly_sdk/models/new_custom_field.py b/rootly_sdk/models/new_custom_field.py index b65177ad..eedfff24 100644 --- a/rootly_sdk/models/new_custom_field.py +++ b/rootly_sdk/models/new_custom_field.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_custom_field_data import NewCustomFieldData @@ -28,7 +24,6 @@ class NewCustomField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_custom_field_data import NewCustomFieldData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_custom_field_data.py b/rootly_sdk/models/new_custom_field_data.py index ced5487c..16d37a7b 100644 --- a/rootly_sdk/models/new_custom_field_data.py +++ b/rootly_sdk/models/new_custom_field_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_custom_field_data_type import check_new_custom_field_data_type -from ..models.new_custom_field_data_type import NewCustomFieldDataType -from typing import cast +from ..models.new_custom_field_data_type import NewCustomFieldDataType, check_new_custom_field_data_type if TYPE_CHECKING: from ..models.new_custom_field_data_attributes import NewCustomFieldDataAttributes @@ -32,7 +28,6 @@ class NewCustomFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_custom_field_data_attributes import NewCustomFieldDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_custom_field_data_attributes.py b/rootly_sdk/models/new_custom_field_data_attributes.py index 6418f1a4..f91d2f06 100644 --- a/rootly_sdk/models/new_custom_field_data_attributes.py +++ b/rootly_sdk/models/new_custom_field_data_attributes.py @@ -1,22 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.new_custom_field_data_attributes_required_type_0_item import ( + NewCustomFieldDataAttributesRequiredType0Item, check_new_custom_field_data_attributes_required_type_0_item, ) -from ..models.new_custom_field_data_attributes_required_type_0_item import NewCustomFieldDataAttributesRequiredType0Item -from ..models.new_custom_field_data_attributes_shown_item import check_new_custom_field_data_attributes_shown_item -from ..models.new_custom_field_data_attributes_shown_item import NewCustomFieldDataAttributesShownItem +from ..models.new_custom_field_data_attributes_shown_item import ( + NewCustomFieldDataAttributesShownItem, + check_new_custom_field_data_attributes_shown_item, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewCustomFieldDataAttributes") diff --git a/rootly_sdk/models/new_custom_field_option.py b/rootly_sdk/models/new_custom_field_option.py index 32be86b5..430c0138 100644 --- a/rootly_sdk/models/new_custom_field_option.py +++ b/rootly_sdk/models/new_custom_field_option.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_custom_field_option_data import NewCustomFieldOptionData @@ -28,7 +24,6 @@ class NewCustomFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_custom_field_option_data import NewCustomFieldOptionData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_custom_field_option_data.py b/rootly_sdk/models/new_custom_field_option_data.py index 379d39ad..559f0951 100644 --- a/rootly_sdk/models/new_custom_field_option_data.py +++ b/rootly_sdk/models/new_custom_field_option_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_custom_field_option_data_type import check_new_custom_field_option_data_type -from ..models.new_custom_field_option_data_type import NewCustomFieldOptionDataType -from typing import cast +from ..models.new_custom_field_option_data_type import ( + NewCustomFieldOptionDataType, + check_new_custom_field_option_data_type, +) if TYPE_CHECKING: from ..models.new_custom_field_option_data_attributes import NewCustomFieldOptionDataAttributes @@ -32,7 +31,6 @@ class NewCustomFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_custom_field_option_data_attributes import NewCustomFieldOptionDataAttributes type_: str = self.type_ 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 28325b4f..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewCustomFieldOptionDataAttributes") diff --git a/rootly_sdk/models/new_custom_form.py b/rootly_sdk/models/new_custom_form.py index f8f40254..c3bb94a5 100644 --- a/rootly_sdk/models/new_custom_form.py +++ b/rootly_sdk/models/new_custom_form.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_custom_form_data import NewCustomFormData @@ -28,7 +24,6 @@ class NewCustomForm: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_custom_form_data import NewCustomFormData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_custom_form_data.py b/rootly_sdk/models/new_custom_form_data.py index f4be0b5d..10b2b5b9 100644 --- a/rootly_sdk/models/new_custom_form_data.py +++ b/rootly_sdk/models/new_custom_form_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_custom_form_data_type import check_new_custom_form_data_type -from ..models.new_custom_form_data_type import NewCustomFormDataType -from typing import cast +from ..models.new_custom_form_data_type import NewCustomFormDataType, check_new_custom_form_data_type if TYPE_CHECKING: from ..models.new_custom_form_data_attributes import NewCustomFormDataAttributes @@ -32,7 +28,6 @@ class NewCustomFormData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_custom_form_data_attributes import NewCustomFormDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_custom_form_data_attributes.py b/rootly_sdk/models/new_custom_form_data_attributes.py index 3b2d4d55..747cac35 100644 --- a/rootly_sdk/models/new_custom_form_data_attributes.py +++ b/rootly_sdk/models/new_custom_form_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewCustomFormDataAttributes") diff --git a/rootly_sdk/models/new_dashboard.py b/rootly_sdk/models/new_dashboard.py index 2c3c34f2..6248ee11 100644 --- a/rootly_sdk/models/new_dashboard.py +++ b/rootly_sdk/models/new_dashboard.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_dashboard_data import NewDashboardData @@ -28,7 +24,6 @@ class NewDashboard: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_dashboard_data import NewDashboardData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_dashboard_data.py b/rootly_sdk/models/new_dashboard_data.py index e82062af..c0551ebc 100644 --- a/rootly_sdk/models/new_dashboard_data.py +++ b/rootly_sdk/models/new_dashboard_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_dashboard_data_type import check_new_dashboard_data_type -from ..models.new_dashboard_data_type import NewDashboardDataType -from typing import cast +from ..models.new_dashboard_data_type import NewDashboardDataType, check_new_dashboard_data_type if TYPE_CHECKING: from ..models.new_dashboard_data_attributes import NewDashboardDataAttributes @@ -32,7 +28,6 @@ class NewDashboardData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_dashboard_data_attributes import NewDashboardDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_dashboard_data_attributes.py b/rootly_sdk/models/new_dashboard_data_attributes.py index fe8c96f4..95617d9a 100644 --- a/rootly_sdk/models/new_dashboard_data_attributes.py +++ b/rootly_sdk/models/new_dashboard_data_attributes.py @@ -1,23 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_dashboard_data_attributes_color import ( + NewDashboardDataAttributesColor, + check_new_dashboard_data_attributes_color, +) +from ..models.new_dashboard_data_attributes_owner import ( + NewDashboardDataAttributesOwner, + check_new_dashboard_data_attributes_owner, +) +from ..models.new_dashboard_data_attributes_period import ( + NewDashboardDataAttributesPeriod, + check_new_dashboard_data_attributes_period, +) from ..types import UNSET, Unset -from ..models.new_dashboard_data_attributes_color import check_new_dashboard_data_attributes_color -from ..models.new_dashboard_data_attributes_color import NewDashboardDataAttributesColor -from ..models.new_dashboard_data_attributes_owner import check_new_dashboard_data_attributes_owner -from ..models.new_dashboard_data_attributes_owner import NewDashboardDataAttributesOwner -from ..models.new_dashboard_data_attributes_period import check_new_dashboard_data_attributes_period -from ..models.new_dashboard_data_attributes_period import NewDashboardDataAttributesPeriod -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewDashboardDataAttributes") diff --git a/rootly_sdk/models/new_dashboard_panel.py b/rootly_sdk/models/new_dashboard_panel.py index 53477f21..0a030c43 100644 --- a/rootly_sdk/models/new_dashboard_panel.py +++ b/rootly_sdk/models/new_dashboard_panel.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_dashboard_panel_data import NewDashboardPanelData @@ -28,7 +24,6 @@ class NewDashboardPanel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_dashboard_panel_data import NewDashboardPanelData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_dashboard_panel_data.py b/rootly_sdk/models/new_dashboard_panel_data.py index da0d3a29..3cc44773 100644 --- a/rootly_sdk/models/new_dashboard_panel_data.py +++ b/rootly_sdk/models/new_dashboard_panel_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_dashboard_panel_data_type import check_new_dashboard_panel_data_type -from ..models.new_dashboard_panel_data_type import NewDashboardPanelDataType -from typing import cast +from ..models.new_dashboard_panel_data_type import NewDashboardPanelDataType, check_new_dashboard_panel_data_type if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes import NewDashboardPanelDataAttributes @@ -32,7 +28,6 @@ class NewDashboardPanelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_dashboard_panel_data_attributes import NewDashboardPanelDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_dashboard_panel_data_attributes.py b/rootly_sdk/models/new_dashboard_panel_data_attributes.py index 18d8b63e..3571d9eb 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes_params import NewDashboardPanelDataAttributesParams from ..models.new_dashboard_panel_data_attributes_position_type_0 import ( @@ -38,7 +34,6 @@ def to_dict(self) -> dict[str, Any]: from ..models.new_dashboard_panel_data_attributes_position_type_0 import ( NewDashboardPanelDataAttributesPositionType0, ) - from ..models.new_dashboard_panel_data_attributes_params import NewDashboardPanelDataAttributesParams params = self.params.to_dict() 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 8a4ec239..299e8dc1 100644 --- a/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py +++ b/rootly_sdk/models/new_dashboard_panel_data_attributes_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.new_dashboard_panel_data_attributes_params_display import ( + NewDashboardPanelDataAttributesParamsDisplay, check_new_dashboard_panel_data_attributes_params_display, ) -from ..models.new_dashboard_panel_data_attributes_params_display import NewDashboardPanelDataAttributesParamsDisplay from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes_params_datalabels import ( @@ -49,15 +46,6 @@ class NewDashboardPanelDataAttributesParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_dashboard_panel_data_attributes_params_datalabels import ( - NewDashboardPanelDataAttributesParamsDatalabels, - ) - from ..models.new_dashboard_panel_data_attributes_params_legend import ( - NewDashboardPanelDataAttributesParamsLegend, - ) - from ..models.new_dashboard_panel_data_attributes_params_datasets_item import ( - NewDashboardPanelDataAttributesParamsDatasetsItem, - ) display: str | Unset = UNSET if not isinstance(self.display, Unset): 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 e52a1be1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsDatalabels") 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 b5f4a4f1..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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_dashboard_panel_data_attributes_params_datasets_item_collection import ( - check_new_dashboard_panel_data_attributes_params_datasets_item_collection, -) from ..models.new_dashboard_panel_data_attributes_params_datasets_item_collection import ( NewDashboardPanelDataAttributesParamsDatasetsItemCollection, + check_new_dashboard_panel_data_attributes_params_datasets_item_collection, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0 import ( @@ -51,9 +46,6 @@ class NewDashboardPanelDataAttributesParamsDatasetsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item import ( - NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem, - ) from ..models.new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0 import ( NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0, ) 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 53bd7092..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation import ( - check_new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation, -) from ..models.new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation import ( NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation, + check_new_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsDatasetsItemAggregateType0") 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 6be97c23..1a123cb7 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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation import ( - check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation, -) from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation import ( NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation, + check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item import ( @@ -39,9 +34,6 @@ class NewDashboardPanelDataAttributesParamsDatasetsItemFilterItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item import ( - NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem, - ) operation: str | Unset = UNSET if not isinstance(self.operation, Unset): 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 318c2e85..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition import ( - check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition, -) from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition import ( NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition, -) -from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation import ( - check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation, + check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition, ) from ..models.new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation import ( NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation, + check_new_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem") 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 adb3598d..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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key import ( - check_new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key, -) from ..models.new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key import ( NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key, + check_new_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key, ) -from typing import cast - T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0") 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 a8c958c5..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_dashboard_panel_data_attributes_params_legend_groups import ( - check_new_dashboard_panel_data_attributes_params_legend_groups, -) from ..models.new_dashboard_panel_data_attributes_params_legend_groups import ( NewDashboardPanelDataAttributesParamsLegendGroups, + check_new_dashboard_panel_data_attributes_params_legend_groups, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewDashboardPanelDataAttributesParamsLegend") 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 d44c91b0..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewDashboardPanelDataAttributesPositionType0") diff --git a/rootly_sdk/models/new_edge_connector.py b/rootly_sdk/models/new_edge_connector.py index 6441c368..b0ec3196 100644 --- a/rootly_sdk/models/new_edge_connector.py +++ b/rootly_sdk/models/new_edge_connector.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_edge_connector_edge_connector import NewEdgeConnectorEdgeConnector @@ -28,7 +24,6 @@ class NewEdgeConnector: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_edge_connector_edge_connector import NewEdgeConnectorEdgeConnector edge_connector = self.edge_connector.to_dict() diff --git a/rootly_sdk/models/new_edge_connector_action.py b/rootly_sdk/models/new_edge_connector_action.py index 4ae6b5e3..f8c7d5d8 100644 --- a/rootly_sdk/models/new_edge_connector_action.py +++ b/rootly_sdk/models/new_edge_connector_action.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_edge_connector_action_action import NewEdgeConnectorActionAction @@ -28,7 +24,6 @@ class NewEdgeConnectorAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_edge_connector_action_action import NewEdgeConnectorActionAction action = self.action.to_dict() diff --git a/rootly_sdk/models/new_edge_connector_action_action.py b/rootly_sdk/models/new_edge_connector_action_action.py index adf38e3b..942ab5ea 100644 --- a/rootly_sdk/models/new_edge_connector_action_action.py +++ b/rootly_sdk/models/new_edge_connector_action_action.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.new_edge_connector_action_action_action_type import ( + NewEdgeConnectorActionActionActionType, + check_new_edge_connector_action_action_action_type, +) from ..types import UNSET, Unset -from ..models.new_edge_connector_action_action_action_type import check_new_edge_connector_action_action_action_type -from ..models.new_edge_connector_action_action_action_type import NewEdgeConnectorActionActionActionType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_edge_connector_action_action_metadata import NewEdgeConnectorActionActionMetadata @@ -35,7 +34,6 @@ class NewEdgeConnectorActionAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_edge_connector_action_action_metadata import NewEdgeConnectorActionActionMetadata name = self.name 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 2acce08e..fe6cd145 100644 --- a/rootly_sdk/models/new_edge_connector_action_action_metadata.py +++ b/rootly_sdk/models/new_edge_connector_action_action_metadata.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.new_edge_connector_action_action_metadata_icon import ( + NewEdgeConnectorActionActionMetadataIcon, + check_new_edge_connector_action_action_metadata_icon, +) from ..types import UNSET, Unset -from ..models.new_edge_connector_action_action_metadata_icon import check_new_edge_connector_action_action_metadata_icon -from ..models.new_edge_connector_action_action_metadata_icon import NewEdgeConnectorActionActionMetadataIcon -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_edge_connector_action_action_metadata_parameters_type_0_item import ( NewEdgeConnectorActionActionMetadataParametersType0Item, @@ -39,9 +38,6 @@ class NewEdgeConnectorActionActionMetadata: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_edge_connector_action_action_metadata_parameters_type_0_item import ( - NewEdgeConnectorActionActionMetadataParametersType0Item, - ) description: None | str | Unset if isinstance(self.description, 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 da9db5f3..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_edge_connector_action_action_metadata_parameters_type_0_item_type import ( - check_new_edge_connector_action_action_metadata_parameters_type_0_item_type, -) from ..models.new_edge_connector_action_action_metadata_parameters_type_0_item_type import ( NewEdgeConnectorActionActionMetadataParametersType0ItemType, + check_new_edge_connector_action_action_metadata_parameters_type_0_item_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewEdgeConnectorActionActionMetadataParametersType0Item") diff --git a/rootly_sdk/models/new_edge_connector_edge_connector.py b/rootly_sdk/models/new_edge_connector_edge_connector.py index 1fddefe0..c5d16dd9 100644 --- a/rootly_sdk/models/new_edge_connector_edge_connector.py +++ b/rootly_sdk/models/new_edge_connector_edge_connector.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.new_edge_connector_edge_connector_status import ( + NewEdgeConnectorEdgeConnectorStatus, + check_new_edge_connector_edge_connector_status, +) from ..types import UNSET, Unset -from ..models.new_edge_connector_edge_connector_status import check_new_edge_connector_edge_connector_status -from ..models.new_edge_connector_edge_connector_status import NewEdgeConnectorEdgeConnectorStatus -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewEdgeConnectorEdgeConnector") diff --git a/rootly_sdk/models/new_environment.py b/rootly_sdk/models/new_environment.py index 8163a74f..8f807574 100644 --- a/rootly_sdk/models/new_environment.py +++ b/rootly_sdk/models/new_environment.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_environment_data import NewEnvironmentData @@ -28,7 +24,6 @@ class NewEnvironment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_environment_data import NewEnvironmentData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_environment_data.py b/rootly_sdk/models/new_environment_data.py index d6c0694f..c4497ba1 100644 --- a/rootly_sdk/models/new_environment_data.py +++ b/rootly_sdk/models/new_environment_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_environment_data_type import check_new_environment_data_type -from ..models.new_environment_data_type import NewEnvironmentDataType -from typing import cast +from ..models.new_environment_data_type import NewEnvironmentDataType, check_new_environment_data_type if TYPE_CHECKING: from ..models.new_environment_data_attributes import NewEnvironmentDataAttributes @@ -32,7 +28,6 @@ class NewEnvironmentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_environment_data_attributes import NewEnvironmentDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_environment_data_attributes.py b/rootly_sdk/models/new_environment_data_attributes.py index a09fc25d..fe57fc2c 100644 --- a/rootly_sdk/models/new_environment_data_attributes.py +++ b/rootly_sdk/models/new_environment_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_environment_data_attributes_properties_item import NewEnvironmentDataAttributesPropertiesItem from ..models.new_environment_data_attributes_slack_aliases_type_0_item import ( @@ -53,13 +49,6 @@ class NewEnvironmentDataAttributes: properties: list[NewEnvironmentDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_environment_data_attributes_properties_item import NewEnvironmentDataAttributesPropertiesItem - from ..models.new_environment_data_attributes_slack_channels_type_0_item import ( - NewEnvironmentDataAttributesSlackChannelsType0Item, - ) - from ..models.new_environment_data_attributes_slack_aliases_type_0_item import ( - NewEnvironmentDataAttributesSlackAliasesType0Item, - ) name = self.name diff --git a/rootly_sdk/models/new_environment_data_attributes_properties_item.py b/rootly_sdk/models/new_environment_data_attributes_properties_item.py index 6f1bd57b..417ca4ce 100644 --- a/rootly_sdk/models/new_environment_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_environment_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewEnvironmentDataAttributesPropertiesItem") 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 7e0cd9d3..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewEnvironmentDataAttributesSlackAliasesType0Item") 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 cd2d0049..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewEnvironmentDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_escalation_policy.py b/rootly_sdk/models/new_escalation_policy.py index 0829bf7d..eaf02f09 100644 --- a/rootly_sdk/models/new_escalation_policy.py +++ b/rootly_sdk/models/new_escalation_policy.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_escalation_policy_data import NewEscalationPolicyData @@ -28,7 +24,6 @@ class NewEscalationPolicy: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_escalation_policy_data import NewEscalationPolicyData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_escalation_policy_data.py b/rootly_sdk/models/new_escalation_policy_data.py index 566d556c..63bf20fd 100644 --- a/rootly_sdk/models/new_escalation_policy_data.py +++ b/rootly_sdk/models/new_escalation_policy_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_data_type import check_new_escalation_policy_data_type -from ..models.new_escalation_policy_data_type import NewEscalationPolicyDataType -from typing import cast +from ..models.new_escalation_policy_data_type import NewEscalationPolicyDataType, check_new_escalation_policy_data_type if TYPE_CHECKING: from ..models.new_escalation_policy_data_attributes import NewEscalationPolicyDataAttributes @@ -32,7 +28,6 @@ class NewEscalationPolicyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_escalation_policy_data_attributes import NewEscalationPolicyDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_escalation_policy_data_attributes.py b/rootly_sdk/models/new_escalation_policy_data_attributes.py index acd4598c..ca904842 100644 --- a/rootly_sdk/models/new_escalation_policy_data_attributes.py +++ b/rootly_sdk/models/new_escalation_policy_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_escalation_policy_data_attributes_business_hours_type_0 import ( NewEscalationPolicyDataAttributesBusinessHoursType0, 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 a980cd1c..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item import ( - check_new_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item, -) from ..models.new_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item import ( NewEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item, -) -from ..models.new_escalation_policy_data_attributes_business_hours_type_0_time_zone import ( - check_new_escalation_policy_data_attributes_business_hours_type_0_time_zone, + check_new_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item, ) from ..models.new_escalation_policy_data_attributes_business_hours_type_0_time_zone import ( NewEscalationPolicyDataAttributesBusinessHoursType0TimeZone, + check_new_escalation_policy_data_attributes_business_hours_type_0_time_zone, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyDataAttributesBusinessHoursType0") diff --git a/rootly_sdk/models/new_escalation_policy_level.py b/rootly_sdk/models/new_escalation_policy_level.py index 4d744267..2470c8e6 100644 --- a/rootly_sdk/models/new_escalation_policy_level.py +++ b/rootly_sdk/models/new_escalation_policy_level.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_escalation_policy_level_data import NewEscalationPolicyLevelData @@ -28,7 +24,6 @@ class NewEscalationPolicyLevel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_escalation_policy_level_data import NewEscalationPolicyLevelData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_escalation_policy_level_data.py b/rootly_sdk/models/new_escalation_policy_level_data.py index cd59e7e5..f8b43279 100644 --- a/rootly_sdk/models/new_escalation_policy_level_data.py +++ b/rootly_sdk/models/new_escalation_policy_level_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_level_data_type import check_new_escalation_policy_level_data_type -from ..models.new_escalation_policy_level_data_type import NewEscalationPolicyLevelDataType -from typing import cast +from ..models.new_escalation_policy_level_data_type import ( + NewEscalationPolicyLevelDataType, + check_new_escalation_policy_level_data_type, +) if TYPE_CHECKING: from ..models.new_escalation_policy_level_data_attributes import NewEscalationPolicyLevelDataAttributes @@ -32,7 +31,6 @@ class NewEscalationPolicyLevelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_escalation_policy_level_data_attributes import NewEscalationPolicyLevelDataAttributes type_: str = self.type_ 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 04994317..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,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy import ( - check_new_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy, -) from ..models.new_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy import ( NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy, -) -from ..models.new_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy import ( - check_new_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy, + check_new_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy, ) from ..models.new_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy import ( NewEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy, + check_new_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0 import ( 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 32d73870..9609b665 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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members import ( - check_new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members, -) from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members import ( NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers, -) -from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type import ( - check_new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type, + check_new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members, ) from ..models.new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type import ( NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type, + check_new_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0") diff --git a/rootly_sdk/models/new_escalation_policy_path.py b/rootly_sdk/models/new_escalation_policy_path.py index 1d3ead49..9af97aa7 100644 --- a/rootly_sdk/models/new_escalation_policy_path.py +++ b/rootly_sdk/models/new_escalation_policy_path.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_escalation_policy_path_data import NewEscalationPolicyPathData @@ -28,7 +24,6 @@ class NewEscalationPolicyPath: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_escalation_policy_path_data import NewEscalationPolicyPathData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_escalation_policy_path_data.py b/rootly_sdk/models/new_escalation_policy_path_data.py index cc9050b9..e0b9e314 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data.py +++ b/rootly_sdk/models/new_escalation_policy_path_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_path_data_type import check_new_escalation_policy_path_data_type -from ..models.new_escalation_policy_path_data_type import NewEscalationPolicyPathDataType -from typing import cast +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 @@ -32,7 +31,6 @@ class NewEscalationPolicyPathData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_escalation_policy_path_data_attributes import NewEscalationPolicyPathDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes.py index e56cb160..d4d8fd4f 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes.py @@ -1,43 +1,31 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_path_data_attributes_after_deferral_behavior import ( - check_new_escalation_policy_path_data_attributes_after_deferral_behavior, -) from ..models.new_escalation_policy_path_data_attributes_after_deferral_behavior import ( NewEscalationPolicyPathDataAttributesAfterDeferralBehavior, -) -from ..models.new_escalation_policy_path_data_attributes_match_mode import ( - check_new_escalation_policy_path_data_attributes_match_mode, + check_new_escalation_policy_path_data_attributes_after_deferral_behavior, ) from ..models.new_escalation_policy_path_data_attributes_match_mode import ( NewEscalationPolicyPathDataAttributesMatchMode, -) -from ..models.new_escalation_policy_path_data_attributes_notification_type import ( - check_new_escalation_policy_path_data_attributes_notification_type, + 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_path_type import NewEscalationPolicyPathDataAttributesPathType -from ..models.new_escalation_policy_path_data_attributes_time_restriction_time_zone import ( - check_new_escalation_policy_path_data_attributes_time_restriction_time_zone, -) 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 -from typing import cast if TYPE_CHECKING: from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0 import ( @@ -133,11 +121,11 @@ class NewEscalationPolicyPathDataAttributes: time_restrictions: list[NewEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6 import ( - NewEscalationPolicyPathDataAttributesRulesItemType6, + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0 import ( + NewEscalationPolicyPathDataAttributesRulesItemType0, ) - from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5 import ( - NewEscalationPolicyPathDataAttributesRulesItemType5, + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1 import ( + NewEscalationPolicyPathDataAttributesRulesItemType1, ) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2 import ( NewEscalationPolicyPathDataAttributesRulesItemType2, @@ -145,20 +133,14 @@ def to_dict(self) -> dict[str, Any]: from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3 import ( NewEscalationPolicyPathDataAttributesRulesItemType3, ) - from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item import ( - NewEscalationPolicyPathDataAttributesTimeRestrictionsItem, - ) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4 import ( NewEscalationPolicyPathDataAttributesRulesItemType4, ) - from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1 import ( - NewEscalationPolicyPathDataAttributesRulesItemType1, - ) - from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0 import ( - NewEscalationPolicyPathDataAttributesRulesItemType0, + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5 import ( + NewEscalationPolicyPathDataAttributesRulesItemType5, ) - from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7 import ( - NewEscalationPolicyPathDataAttributesRulesItemType7, + from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6 import ( + NewEscalationPolicyPathDataAttributesRulesItemType6, ) name = self.name diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py index efa278ed..7966b6c7 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_0.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type, -) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( NewEscalationPolicyPathDataAttributesRulesItemType0RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_0_rule_type, ) -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType0") diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py index 39f72e14..0494dba8 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_1.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type, -) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( NewEscalationPolicyPathDataAttributesRulesItemType1RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_1_rule_type, ) -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType1") diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py index ba861f26..c367486f 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_2.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_2_operator, -) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( NewEscalationPolicyPathDataAttributesRulesItemType2Operator, -) -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type, + check_new_escalation_policy_path_data_attributes_rules_item_type_2_operator, ) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( NewEscalationPolicyPathDataAttributesRulesItemType2RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_2_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType2") diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py index ad29da8f..2d43753c 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_3.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_3_operator, -) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( NewEscalationPolicyPathDataAttributesRulesItemType3Operator, -) -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type, + check_new_escalation_policy_path_data_attributes_rules_item_type_3_operator, ) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( NewEscalationPolicyPathDataAttributesRulesItemType3RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_3_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType3") diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py index dcaf0d44..7af44d76 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_4.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type, -) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( NewEscalationPolicyPathDataAttributesRulesItemType4RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_4_rule_type, ) -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType4") diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py index 7ed3af02..cbb79731 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5.py @@ -1,26 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type, -) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( NewEscalationPolicyPathDataAttributesRulesItemType5RuleType, -) -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone, + check_new_escalation_policy_path_data_attributes_rules_item_type_5_rule_type, ) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( NewEscalationPolicyPathDataAttributesRulesItemType5TimeZone, + check_new_escalation_policy_path_data_attributes_rules_item_type_5_time_zone, ) -from typing import cast if TYPE_CHECKING: from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( @@ -47,9 +40,6 @@ class NewEscalationPolicyPathDataAttributesRulesItemType5: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( - NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, - ) rule_type: str = self.rule_type diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py index 7159a034..7f77f267 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem") diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py index b727831c..f96b8c64 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_6.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_6_operator, -) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( NewEscalationPolicyPathDataAttributesRulesItemType6Operator, -) -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type, + check_new_escalation_policy_path_data_attributes_rules_item_type_6_operator, ) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( NewEscalationPolicyPathDataAttributesRulesItemType6RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_6_rule_type, ) -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType6") diff --git a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py index 4871d499..34200850 100644 --- a/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py +++ b/rootly_sdk/models/new_escalation_policy_path_data_attributes_rules_item_type_7.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_7_operator, -) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( NewEscalationPolicyPathDataAttributesRulesItemType7Operator, -) -from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( - check_new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type, + check_new_escalation_policy_path_data_attributes_rules_item_type_7_operator, ) from ..models.new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( NewEscalationPolicyPathDataAttributesRulesItemType7RuleType, + check_new_escalation_policy_path_data_attributes_rules_item_type_7_rule_type, ) -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesRulesItemType7") 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 index 43fbd635..6b6d14be 100644 --- 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 @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item_end_day import ( - check_new_escalation_policy_path_data_attributes_time_restrictions_item_end_day, -) from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item_end_day import ( NewEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, -) -from ..models.new_escalation_policy_path_data_attributes_time_restrictions_item_start_day import ( - check_new_escalation_policy_path_data_attributes_time_restrictions_item_start_day, + 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, ) -from typing import cast - T = TypeVar("T", bound="NewEscalationPolicyPathDataAttributesTimeRestrictionsItem") diff --git a/rootly_sdk/models/new_form_field.py b/rootly_sdk/models/new_form_field.py index 26f39f18..b551a72f 100644 --- a/rootly_sdk/models/new_form_field.py +++ b/rootly_sdk/models/new_form_field.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_form_field_data import NewFormFieldData @@ -28,7 +24,6 @@ class NewFormField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_data import NewFormFieldData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_form_field_data.py b/rootly_sdk/models/new_form_field_data.py index 53c419cd..ed8569e0 100644 --- a/rootly_sdk/models/new_form_field_data.py +++ b/rootly_sdk/models/new_form_field_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_form_field_data_type import check_new_form_field_data_type -from ..models.new_form_field_data_type import NewFormFieldDataType -from typing import cast +from ..models.new_form_field_data_type import NewFormFieldDataType, check_new_form_field_data_type if TYPE_CHECKING: from ..models.new_form_field_data_attributes import NewFormFieldDataAttributes @@ -32,7 +28,6 @@ class NewFormFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_data_attributes import NewFormFieldDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_form_field_data_attributes.py b/rootly_sdk/models/new_form_field_data_attributes.py index b289e241..b33f425d 100644 --- a/rootly_sdk/models/new_form_field_data_attributes.py +++ b/rootly_sdk/models/new_form_field_data_attributes.py @@ -1,23 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_form_field_data_attributes_input_kind import ( + NewFormFieldDataAttributesInputKind, + check_new_form_field_data_attributes_input_kind, +) +from ..models.new_form_field_data_attributes_kind import ( + NewFormFieldDataAttributesKind, + check_new_form_field_data_attributes_kind, +) +from ..models.new_form_field_data_attributes_value_kind import ( + NewFormFieldDataAttributesValueKind, + check_new_form_field_data_attributes_value_kind, +) from ..types import UNSET, Unset -from ..models.new_form_field_data_attributes_input_kind import check_new_form_field_data_attributes_input_kind -from ..models.new_form_field_data_attributes_input_kind import NewFormFieldDataAttributesInputKind -from ..models.new_form_field_data_attributes_kind import check_new_form_field_data_attributes_kind -from ..models.new_form_field_data_attributes_kind import NewFormFieldDataAttributesKind -from ..models.new_form_field_data_attributes_value_kind import check_new_form_field_data_attributes_value_kind -from ..models.new_form_field_data_attributes_value_kind import NewFormFieldDataAttributesValueKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewFormFieldDataAttributes") diff --git a/rootly_sdk/models/new_form_field_option.py b/rootly_sdk/models/new_form_field_option.py index 3bd5c9fa..250f489a 100644 --- a/rootly_sdk/models/new_form_field_option.py +++ b/rootly_sdk/models/new_form_field_option.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_form_field_option_data import NewFormFieldOptionData @@ -28,7 +24,6 @@ class NewFormFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_option_data import NewFormFieldOptionData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_form_field_option_data.py b/rootly_sdk/models/new_form_field_option_data.py index 5f8d4d93..0cfabe8d 100644 --- a/rootly_sdk/models/new_form_field_option_data.py +++ b/rootly_sdk/models/new_form_field_option_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_form_field_option_data_type import check_new_form_field_option_data_type -from ..models.new_form_field_option_data_type import NewFormFieldOptionDataType -from typing import cast +from ..models.new_form_field_option_data_type import NewFormFieldOptionDataType, check_new_form_field_option_data_type if TYPE_CHECKING: from ..models.new_form_field_option_data_attributes import NewFormFieldOptionDataAttributes @@ -32,7 +28,6 @@ class NewFormFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_option_data_attributes import NewFormFieldOptionDataAttributes type_: str = self.type_ 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 3b96e873..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewFormFieldOptionDataAttributes") diff --git a/rootly_sdk/models/new_form_field_placement.py b/rootly_sdk/models/new_form_field_placement.py index 0fb57a98..0319e261 100644 --- a/rootly_sdk/models/new_form_field_placement.py +++ b/rootly_sdk/models/new_form_field_placement.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_form_field_placement_data import NewFormFieldPlacementData @@ -28,7 +24,6 @@ class NewFormFieldPlacement: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_placement_data import NewFormFieldPlacementData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_form_field_placement_condition.py b/rootly_sdk/models/new_form_field_placement_condition.py index 9418b228..622bd443 100644 --- a/rootly_sdk/models/new_form_field_placement_condition.py +++ b/rootly_sdk/models/new_form_field_placement_condition.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_form_field_placement_condition_data import NewFormFieldPlacementConditionData @@ -28,7 +24,6 @@ class NewFormFieldPlacementCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_placement_condition_data import NewFormFieldPlacementConditionData data = self.data.to_dict() 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 feace383..5e26d9a4 100644 --- a/rootly_sdk/models/new_form_field_placement_condition_data.py +++ b/rootly_sdk/models/new_form_field_placement_condition_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_form_field_placement_condition_data_type import check_new_form_field_placement_condition_data_type -from ..models.new_form_field_placement_condition_data_type import NewFormFieldPlacementConditionDataType -from typing import cast +from ..models.new_form_field_placement_condition_data_type import ( + NewFormFieldPlacementConditionDataType, + check_new_form_field_placement_condition_data_type, +) if TYPE_CHECKING: from ..models.new_form_field_placement_condition_data_attributes import NewFormFieldPlacementConditionDataAttributes @@ -32,9 +31,6 @@ class NewFormFieldPlacementConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_placement_condition_data_attributes import ( - NewFormFieldPlacementConditionDataAttributes, - ) type_: str = self.type_ 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 41b5b8d6..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_form_field_placement_condition_data_attributes_comparison import ( - check_new_form_field_placement_condition_data_attributes_comparison, -) from ..models.new_form_field_placement_condition_data_attributes_comparison import ( NewFormFieldPlacementConditionDataAttributesComparison, -) -from ..models.new_form_field_placement_condition_data_attributes_conditioned import ( - check_new_form_field_placement_condition_data_attributes_conditioned, + check_new_form_field_placement_condition_data_attributes_comparison, ) from ..models.new_form_field_placement_condition_data_attributes_conditioned import ( NewFormFieldPlacementConditionDataAttributesConditioned, + check_new_form_field_placement_condition_data_attributes_conditioned, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewFormFieldPlacementConditionDataAttributes") diff --git a/rootly_sdk/models/new_form_field_placement_data.py b/rootly_sdk/models/new_form_field_placement_data.py index a82e90d6..878cd08d 100644 --- a/rootly_sdk/models/new_form_field_placement_data.py +++ b/rootly_sdk/models/new_form_field_placement_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_form_field_placement_data_type import check_new_form_field_placement_data_type -from ..models.new_form_field_placement_data_type import NewFormFieldPlacementDataType -from typing import cast +from ..models.new_form_field_placement_data_type import ( + NewFormFieldPlacementDataType, + check_new_form_field_placement_data_type, +) if TYPE_CHECKING: from ..models.new_form_field_placement_data_attributes import NewFormFieldPlacementDataAttributes @@ -32,7 +31,6 @@ class NewFormFieldPlacementData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_placement_data_attributes import NewFormFieldPlacementDataAttributes type_: str = self.type_ 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 b5d25099..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_form_field_placement_data_attributes_placement_operator import ( - check_new_form_field_placement_data_attributes_placement_operator, -) from ..models.new_form_field_placement_data_attributes_placement_operator import ( NewFormFieldPlacementDataAttributesPlacementOperator, -) -from ..models.new_form_field_placement_data_attributes_required_operator import ( - check_new_form_field_placement_data_attributes_required_operator, + check_new_form_field_placement_data_attributes_placement_operator, ) from ..models.new_form_field_placement_data_attributes_required_operator import ( NewFormFieldPlacementDataAttributesRequiredOperator, + check_new_form_field_placement_data_attributes_required_operator, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewFormFieldPlacementDataAttributes") diff --git a/rootly_sdk/models/new_form_field_position.py b/rootly_sdk/models/new_form_field_position.py index a34ac990..23be155c 100644 --- a/rootly_sdk/models/new_form_field_position.py +++ b/rootly_sdk/models/new_form_field_position.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_form_field_position_data import NewFormFieldPositionData @@ -28,7 +24,6 @@ class NewFormFieldPosition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_position_data import NewFormFieldPositionData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_form_field_position_data.py b/rootly_sdk/models/new_form_field_position_data.py index af1e88d0..29c52e99 100644 --- a/rootly_sdk/models/new_form_field_position_data.py +++ b/rootly_sdk/models/new_form_field_position_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_form_field_position_data_type import check_new_form_field_position_data_type -from ..models.new_form_field_position_data_type import NewFormFieldPositionDataType -from typing import cast +from ..models.new_form_field_position_data_type import ( + NewFormFieldPositionDataType, + check_new_form_field_position_data_type, +) if TYPE_CHECKING: from ..models.new_form_field_position_data_attributes import NewFormFieldPositionDataAttributes @@ -32,7 +31,6 @@ class NewFormFieldPositionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_field_position_data_attributes import NewFormFieldPositionDataAttributes type_: str = self.type_ 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 a55600d7..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,17 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -from ..models.new_form_field_position_data_attributes_form import check_new_form_field_position_data_attributes_form -from ..models.new_form_field_position_data_attributes_form import NewFormFieldPositionDataAttributesForm -from typing import cast +from ..models.new_form_field_position_data_attributes_form import ( + NewFormFieldPositionDataAttributesForm, + check_new_form_field_position_data_attributes_form, +) T = TypeVar("T", bound="NewFormFieldPositionDataAttributes") diff --git a/rootly_sdk/models/new_form_set.py b/rootly_sdk/models/new_form_set.py index 9b41da55..e8de4c16 100644 --- a/rootly_sdk/models/new_form_set.py +++ b/rootly_sdk/models/new_form_set.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_form_set_data import NewFormSetData @@ -28,7 +24,6 @@ class NewFormSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_set_data import NewFormSetData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_form_set_condition.py b/rootly_sdk/models/new_form_set_condition.py index 126e70ae..56277d51 100644 --- a/rootly_sdk/models/new_form_set_condition.py +++ b/rootly_sdk/models/new_form_set_condition.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_form_set_condition_data import NewFormSetConditionData @@ -28,7 +24,6 @@ class NewFormSetCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_set_condition_data import NewFormSetConditionData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_form_set_condition_data.py b/rootly_sdk/models/new_form_set_condition_data.py index fd61cfb6..7ddcc521 100644 --- a/rootly_sdk/models/new_form_set_condition_data.py +++ b/rootly_sdk/models/new_form_set_condition_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_form_set_condition_data_type import check_new_form_set_condition_data_type -from ..models.new_form_set_condition_data_type import NewFormSetConditionDataType -from typing import cast +from ..models.new_form_set_condition_data_type import ( + NewFormSetConditionDataType, + check_new_form_set_condition_data_type, +) if TYPE_CHECKING: from ..models.new_form_set_condition_data_attributes import NewFormSetConditionDataAttributes @@ -32,7 +31,6 @@ class NewFormSetConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_set_condition_data_attributes import NewFormSetConditionDataAttributes type_: str = self.type_ 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 b21fb518..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,19 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.new_form_set_condition_data_attributes_comparison import ( + NewFormSetConditionDataAttributesComparison, check_new_form_set_condition_data_attributes_comparison, ) -from ..models.new_form_set_condition_data_attributes_comparison import NewFormSetConditionDataAttributesComparison -from typing import cast - T = TypeVar("T", bound="NewFormSetConditionDataAttributes") diff --git a/rootly_sdk/models/new_form_set_data.py b/rootly_sdk/models/new_form_set_data.py index a574695b..e6242641 100644 --- a/rootly_sdk/models/new_form_set_data.py +++ b/rootly_sdk/models/new_form_set_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_form_set_data_type import check_new_form_set_data_type -from ..models.new_form_set_data_type import NewFormSetDataType -from typing import cast +from ..models.new_form_set_data_type import NewFormSetDataType, check_new_form_set_data_type if TYPE_CHECKING: from ..models.new_form_set_data_attributes import NewFormSetDataAttributes @@ -32,7 +28,6 @@ class NewFormSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_form_set_data_attributes import NewFormSetDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_form_set_data_attributes.py b/rootly_sdk/models/new_form_set_data_attributes.py index ac1c317d..8d930d67 100644 --- a/rootly_sdk/models/new_form_set_data_attributes.py +++ b/rootly_sdk/models/new_form_set_data_attributes.py @@ -1,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="NewFormSetDataAttributes") diff --git a/rootly_sdk/models/new_functionality.py b/rootly_sdk/models/new_functionality.py index 46865bd3..1338aa78 100644 --- a/rootly_sdk/models/new_functionality.py +++ b/rootly_sdk/models/new_functionality.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_functionality_data import NewFunctionalityData @@ -28,7 +24,6 @@ class NewFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_functionality_data import NewFunctionalityData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_functionality_data.py b/rootly_sdk/models/new_functionality_data.py index 3c78af72..dd92c8a4 100644 --- a/rootly_sdk/models/new_functionality_data.py +++ b/rootly_sdk/models/new_functionality_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_functionality_data_type import check_new_functionality_data_type -from ..models.new_functionality_data_type import NewFunctionalityDataType -from typing import cast +from ..models.new_functionality_data_type import NewFunctionalityDataType, check_new_functionality_data_type if TYPE_CHECKING: from ..models.new_functionality_data_attributes import NewFunctionalityDataAttributes @@ -32,7 +28,6 @@ class NewFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_functionality_data_attributes import NewFunctionalityDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_functionality_data_attributes.py b/rootly_sdk/models/new_functionality_data_attributes.py index 4d4dcb6c..8459211c 100644 --- a/rootly_sdk/models/new_functionality_data_attributes.py +++ b/rootly_sdk/models/new_functionality_data_attributes.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_functionality_data_attributes_show_uptime_last_days import ( - check_new_functionality_data_attributes_show_uptime_last_days, -) from ..models.new_functionality_data_attributes_show_uptime_last_days import ( NewFunctionalityDataAttributesShowUptimeLastDays, + check_new_functionality_data_attributes_show_uptime_last_days, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_functionality_data_attributes_properties_item import NewFunctionalityDataAttributesPropertiesItem @@ -89,15 +83,6 @@ class NewFunctionalityDataAttributes: properties: list[NewFunctionalityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_functionality_data_attributes_slack_channels_type_0_item import ( - NewFunctionalityDataAttributesSlackChannelsType0Item, - ) - from ..models.new_functionality_data_attributes_properties_item import ( - NewFunctionalityDataAttributesPropertiesItem, - ) - from ..models.new_functionality_data_attributes_slack_aliases_type_0_item import ( - NewFunctionalityDataAttributesSlackAliasesType0Item, - ) name = self.name diff --git a/rootly_sdk/models/new_functionality_data_attributes_properties_item.py b/rootly_sdk/models/new_functionality_data_attributes_properties_item.py index cfecc091..b3518fb5 100644 --- a/rootly_sdk/models/new_functionality_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_functionality_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewFunctionalityDataAttributesPropertiesItem") 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 80b6045a..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewFunctionalityDataAttributesSlackAliasesType0Item") 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 f45c9776..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewFunctionalityDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_heartbeat.py b/rootly_sdk/models/new_heartbeat.py index 20b24c5b..81b7f3aa 100644 --- a/rootly_sdk/models/new_heartbeat.py +++ b/rootly_sdk/models/new_heartbeat.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_heartbeat_data import NewHeartbeatData @@ -28,7 +24,6 @@ class NewHeartbeat: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_heartbeat_data import NewHeartbeatData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_heartbeat_data.py b/rootly_sdk/models/new_heartbeat_data.py index 06e0a437..0cc6923b 100644 --- a/rootly_sdk/models/new_heartbeat_data.py +++ b/rootly_sdk/models/new_heartbeat_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_heartbeat_data_type import check_new_heartbeat_data_type -from ..models.new_heartbeat_data_type import NewHeartbeatDataType -from typing import cast +from ..models.new_heartbeat_data_type import NewHeartbeatDataType, check_new_heartbeat_data_type if TYPE_CHECKING: from ..models.new_heartbeat_data_attributes import NewHeartbeatDataAttributes @@ -32,7 +28,6 @@ class NewHeartbeatData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_heartbeat_data_attributes import NewHeartbeatDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_heartbeat_data_attributes.py b/rootly_sdk/models/new_heartbeat_data_attributes.py index 062b72ea..d53146f8 100644 --- a/rootly_sdk/models/new_heartbeat_data_attributes.py +++ b/rootly_sdk/models/new_heartbeat_data_attributes.py @@ -1,24 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_heartbeat_data_attributes_interval_unit import check_new_heartbeat_data_attributes_interval_unit -from ..models.new_heartbeat_data_attributes_interval_unit import NewHeartbeatDataAttributesIntervalUnit -from ..models.new_heartbeat_data_attributes_notification_target_type import ( - check_new_heartbeat_data_attributes_notification_target_type, +from ..models.new_heartbeat_data_attributes_interval_unit import ( + NewHeartbeatDataAttributesIntervalUnit, + check_new_heartbeat_data_attributes_interval_unit, ) from ..models.new_heartbeat_data_attributes_notification_target_type import ( NewHeartbeatDataAttributesNotificationTargetType, + check_new_heartbeat_data_attributes_notification_target_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewHeartbeatDataAttributes") diff --git a/rootly_sdk/models/new_incident.py b/rootly_sdk/models/new_incident.py index c60ef88b..04757579 100644 --- a/rootly_sdk/models/new_incident.py +++ b/rootly_sdk/models/new_incident.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_data import NewIncidentData @@ -28,7 +24,6 @@ class NewIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_data import NewIncidentData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_action_item.py b/rootly_sdk/models/new_incident_action_item.py index 76a36526..849b7b39 100644 --- a/rootly_sdk/models/new_incident_action_item.py +++ b/rootly_sdk/models/new_incident_action_item.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_action_item_data import NewIncidentActionItemData @@ -28,7 +24,6 @@ class NewIncidentActionItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_action_item_data import NewIncidentActionItemData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_action_item_data.py b/rootly_sdk/models/new_incident_action_item_data.py index 1b6f8b0e..7e266944 100644 --- a/rootly_sdk/models/new_incident_action_item_data.py +++ b/rootly_sdk/models/new_incident_action_item_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_action_item_data_type import check_new_incident_action_item_data_type -from ..models.new_incident_action_item_data_type import NewIncidentActionItemDataType -from typing import cast +from ..models.new_incident_action_item_data_type import ( + NewIncidentActionItemDataType, + check_new_incident_action_item_data_type, +) if TYPE_CHECKING: from ..models.new_incident_action_item_data_attributes import NewIncidentActionItemDataAttributes @@ -32,7 +31,6 @@ class NewIncidentActionItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_action_item_data_attributes import NewIncidentActionItemDataAttributes type_: str = self.type_ 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 4ef18edf..784b3739 100644 --- a/rootly_sdk/models/new_incident_action_item_data_attributes.py +++ b/rootly_sdk/models/new_incident_action_item_data_attributes.py @@ -1,25 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_action_item_data_attributes_kind import check_new_incident_action_item_data_attributes_kind -from ..models.new_incident_action_item_data_attributes_kind import NewIncidentActionItemDataAttributesKind +from ..models.new_incident_action_item_data_attributes_kind import ( + NewIncidentActionItemDataAttributesKind, + check_new_incident_action_item_data_attributes_kind, +) from ..models.new_incident_action_item_data_attributes_priority import ( + NewIncidentActionItemDataAttributesPriority, check_new_incident_action_item_data_attributes_priority, ) -from ..models.new_incident_action_item_data_attributes_priority import NewIncidentActionItemDataAttributesPriority from ..models.new_incident_action_item_data_attributes_status import ( + NewIncidentActionItemDataAttributesStatus, check_new_incident_action_item_data_attributes_status, ) -from ..models.new_incident_action_item_data_attributes_status import NewIncidentActionItemDataAttributesStatus from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_incident_action_item_data_attributes_form_field_selections_type_0_item import ( @@ -64,9 +62,6 @@ class NewIncidentActionItemDataAttributes: form_field_selections: list[NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_action_item_data_attributes_form_field_selections_type_0_item import ( - NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item, - ) summary = self.summary diff --git a/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py b/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py index bc0f708d..f8730f92 100644 --- a/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py +++ b/rootly_sdk/models/new_incident_action_item_data_attributes_form_field_selections_type_0_item.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewIncidentActionItemDataAttributesFormFieldSelectionsType0Item") diff --git a/rootly_sdk/models/new_incident_custom_field_selection.py b/rootly_sdk/models/new_incident_custom_field_selection.py index e71f306e..2b9c1ab1 100644 --- a/rootly_sdk/models/new_incident_custom_field_selection.py +++ b/rootly_sdk/models/new_incident_custom_field_selection.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_custom_field_selection_data import NewIncidentCustomFieldSelectionData @@ -28,7 +24,6 @@ class NewIncidentCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_custom_field_selection_data import NewIncidentCustomFieldSelectionData data = self.data.to_dict() 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 54d553f5..d5151e61 100644 --- a/rootly_sdk/models/new_incident_custom_field_selection_data.py +++ b/rootly_sdk/models/new_incident_custom_field_selection_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_custom_field_selection_data_type import check_new_incident_custom_field_selection_data_type -from ..models.new_incident_custom_field_selection_data_type import NewIncidentCustomFieldSelectionDataType -from typing import cast +from ..models.new_incident_custom_field_selection_data_type import ( + NewIncidentCustomFieldSelectionDataType, + check_new_incident_custom_field_selection_data_type, +) if TYPE_CHECKING: from ..models.new_incident_custom_field_selection_data_attributes import ( @@ -34,9 +33,6 @@ class NewIncidentCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_custom_field_selection_data_attributes import ( - NewIncidentCustomFieldSelectionDataAttributes, - ) type_: str = self.type_ 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 467b5444..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,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewIncidentCustomFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/new_incident_data.py b/rootly_sdk/models/new_incident_data.py index 3e1e3cb8..34e87501 100644 --- a/rootly_sdk/models/new_incident_data.py +++ b/rootly_sdk/models/new_incident_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_data_type import check_new_incident_data_type -from ..models.new_incident_data_type import NewIncidentDataType -from typing import cast +from ..models.new_incident_data_type import NewIncidentDataType, check_new_incident_data_type if TYPE_CHECKING: from ..models.new_incident_data_attributes import NewIncidentDataAttributes @@ -32,7 +28,6 @@ class NewIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_data_attributes import NewIncidentDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_incident_data_attributes.py b/rootly_sdk/models/new_incident_data_attributes.py index 1575417c..8a795611 100644 --- a/rootly_sdk/models/new_incident_data_attributes.py +++ b/rootly_sdk/models/new_incident_data_attributes.py @@ -1,20 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_incident_data_attributes_kind import ( + NewIncidentDataAttributesKind, + check_new_incident_data_attributes_kind, +) +from ..models.new_incident_data_attributes_status import ( + NewIncidentDataAttributesStatus, + check_new_incident_data_attributes_status, +) from ..types import UNSET, Unset -from ..models.new_incident_data_attributes_kind import check_new_incident_data_attributes_kind -from ..models.new_incident_data_attributes_kind import NewIncidentDataAttributesKind -from ..models.new_incident_data_attributes_status import check_new_incident_data_attributes_status -from ..models.new_incident_data_attributes_status import NewIncidentDataAttributesStatus -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_data_attributes_labels_type_0 import NewIncidentDataAttributesLabelsType0 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 da6f4ea8..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewIncidentDataAttributesLabelsType0") diff --git a/rootly_sdk/models/new_incident_event.py b/rootly_sdk/models/new_incident_event.py index 84217994..423b6167 100644 --- a/rootly_sdk/models/new_incident_event.py +++ b/rootly_sdk/models/new_incident_event.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_event_data import NewIncidentEventData @@ -28,7 +24,6 @@ class NewIncidentEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_event_data import NewIncidentEventData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_event_data.py b/rootly_sdk/models/new_incident_event_data.py index 374a4bba..3c9d261d 100644 --- a/rootly_sdk/models/new_incident_event_data.py +++ b/rootly_sdk/models/new_incident_event_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_event_data_type import check_new_incident_event_data_type -from ..models.new_incident_event_data_type import NewIncidentEventDataType -from typing import cast +from ..models.new_incident_event_data_type import NewIncidentEventDataType, check_new_incident_event_data_type if TYPE_CHECKING: from ..models.new_incident_event_data_attributes import NewIncidentEventDataAttributes @@ -32,7 +28,6 @@ class NewIncidentEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_event_data_attributes import NewIncidentEventDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_incident_event_data_attributes.py b/rootly_sdk/models/new_incident_event_data_attributes.py index f050a895..c7702049 100644 --- a/rootly_sdk/models/new_incident_event_data_attributes.py +++ b/rootly_sdk/models/new_incident_event_data_attributes.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_incident_event_data_attributes_visibility import ( + NewIncidentEventDataAttributesVisibility, + check_new_incident_event_data_attributes_visibility, +) from ..types import UNSET, Unset -from ..models.new_incident_event_data_attributes_visibility import check_new_incident_event_data_attributes_visibility -from ..models.new_incident_event_data_attributes_visibility import NewIncidentEventDataAttributesVisibility -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewIncidentEventDataAttributes") diff --git a/rootly_sdk/models/new_incident_event_functionality.py b/rootly_sdk/models/new_incident_event_functionality.py index cb5a3eb1..6d66318c 100644 --- a/rootly_sdk/models/new_incident_event_functionality.py +++ b/rootly_sdk/models/new_incident_event_functionality.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_event_functionality_data import NewIncidentEventFunctionalityData @@ -28,7 +24,6 @@ class NewIncidentEventFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_event_functionality_data import NewIncidentEventFunctionalityData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_event_functionality_data.py b/rootly_sdk/models/new_incident_event_functionality_data.py index 34047198..3f7e2f4d 100644 --- a/rootly_sdk/models/new_incident_event_functionality_data.py +++ b/rootly_sdk/models/new_incident_event_functionality_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_event_functionality_data_type import check_new_incident_event_functionality_data_type -from ..models.new_incident_event_functionality_data_type import NewIncidentEventFunctionalityDataType -from typing import cast +from ..models.new_incident_event_functionality_data_type import ( + NewIncidentEventFunctionalityDataType, + check_new_incident_event_functionality_data_type, +) if TYPE_CHECKING: from ..models.new_incident_event_functionality_data_attributes import NewIncidentEventFunctionalityDataAttributes @@ -32,9 +31,6 @@ class NewIncidentEventFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_event_functionality_data_attributes import ( - NewIncidentEventFunctionalityDataAttributes, - ) type_: str = self.type_ 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 1b85c299..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_incident_event_functionality_data_attributes_status import ( - check_new_incident_event_functionality_data_attributes_status, -) from ..models.new_incident_event_functionality_data_attributes_status import ( NewIncidentEventFunctionalityDataAttributesStatus, + check_new_incident_event_functionality_data_attributes_status, ) -from typing import cast - T = TypeVar("T", bound="NewIncidentEventFunctionalityDataAttributes") diff --git a/rootly_sdk/models/new_incident_event_service.py b/rootly_sdk/models/new_incident_event_service.py index 388e4e23..95f67979 100644 --- a/rootly_sdk/models/new_incident_event_service.py +++ b/rootly_sdk/models/new_incident_event_service.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_event_service_data import NewIncidentEventServiceData @@ -28,7 +24,6 @@ class NewIncidentEventService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_event_service_data import NewIncidentEventServiceData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_event_service_data.py b/rootly_sdk/models/new_incident_event_service_data.py index 055ab3ef..72500c26 100644 --- a/rootly_sdk/models/new_incident_event_service_data.py +++ b/rootly_sdk/models/new_incident_event_service_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_event_service_data_type import check_new_incident_event_service_data_type -from ..models.new_incident_event_service_data_type import NewIncidentEventServiceDataType -from typing import cast +from ..models.new_incident_event_service_data_type import ( + NewIncidentEventServiceDataType, + check_new_incident_event_service_data_type, +) if TYPE_CHECKING: from ..models.new_incident_event_service_data_attributes import NewIncidentEventServiceDataAttributes @@ -32,7 +31,6 @@ class NewIncidentEventServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_event_service_data_attributes import NewIncidentEventServiceDataAttributes type_: str = self.type_ 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 616a7063..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,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset from ..models.new_incident_event_service_data_attributes_status import ( + NewIncidentEventServiceDataAttributesStatus, check_new_incident_event_service_data_attributes_status, ) -from ..models.new_incident_event_service_data_attributes_status import NewIncidentEventServiceDataAttributesStatus -from typing import cast - T = TypeVar("T", bound="NewIncidentEventServiceDataAttributes") diff --git a/rootly_sdk/models/new_incident_feedback.py b/rootly_sdk/models/new_incident_feedback.py index e0a0a056..d1a89314 100644 --- a/rootly_sdk/models/new_incident_feedback.py +++ b/rootly_sdk/models/new_incident_feedback.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_feedback_data import NewIncidentFeedbackData @@ -28,7 +24,6 @@ class NewIncidentFeedback: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_feedback_data import NewIncidentFeedbackData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_feedback_data.py b/rootly_sdk/models/new_incident_feedback_data.py index 0f53c1ea..dbc9e5fe 100644 --- a/rootly_sdk/models/new_incident_feedback_data.py +++ b/rootly_sdk/models/new_incident_feedback_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_feedback_data_type import check_new_incident_feedback_data_type -from ..models.new_incident_feedback_data_type import NewIncidentFeedbackDataType -from typing import cast +from ..models.new_incident_feedback_data_type import NewIncidentFeedbackDataType, check_new_incident_feedback_data_type if TYPE_CHECKING: from ..models.new_incident_feedback_data_attributes import NewIncidentFeedbackDataAttributes @@ -32,7 +28,6 @@ class NewIncidentFeedbackData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_feedback_data_attributes import NewIncidentFeedbackDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_incident_feedback_data_attributes.py b/rootly_sdk/models/new_incident_feedback_data_attributes.py index 19994961..0f7b6fec 100644 --- a/rootly_sdk/models/new_incident_feedback_data_attributes.py +++ b/rootly_sdk/models/new_incident_feedback_data_attributes.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_incident_feedback_data_attributes_rating import ( + NewIncidentFeedbackDataAttributesRating, + check_new_incident_feedback_data_attributes_rating, +) from ..types import UNSET, Unset -from ..models.new_incident_feedback_data_attributes_rating import check_new_incident_feedback_data_attributes_rating -from ..models.new_incident_feedback_data_attributes_rating import NewIncidentFeedbackDataAttributesRating -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewIncidentFeedbackDataAttributes") diff --git a/rootly_sdk/models/new_incident_form_field_selection.py b/rootly_sdk/models/new_incident_form_field_selection.py index 71d2e9ec..6510663e 100644 --- a/rootly_sdk/models/new_incident_form_field_selection.py +++ b/rootly_sdk/models/new_incident_form_field_selection.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_form_field_selection_data import NewIncidentFormFieldSelectionData @@ -28,7 +24,6 @@ class NewIncidentFormFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_form_field_selection_data import NewIncidentFormFieldSelectionData data = self.data.to_dict() 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 a87bfde3..afba8396 100644 --- a/rootly_sdk/models/new_incident_form_field_selection_data.py +++ b/rootly_sdk/models/new_incident_form_field_selection_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_form_field_selection_data_type import check_new_incident_form_field_selection_data_type -from ..models.new_incident_form_field_selection_data_type import NewIncidentFormFieldSelectionDataType -from typing import cast +from ..models.new_incident_form_field_selection_data_type import ( + NewIncidentFormFieldSelectionDataType, + check_new_incident_form_field_selection_data_type, +) if TYPE_CHECKING: from ..models.new_incident_form_field_selection_data_attributes import NewIncidentFormFieldSelectionDataAttributes @@ -32,9 +31,6 @@ class NewIncidentFormFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_form_field_selection_data_attributes import ( - NewIncidentFormFieldSelectionDataAttributes, - ) type_: str = self.type_ 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 2b61bc02..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,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewIncidentFormFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/new_incident_permission_set.py b/rootly_sdk/models/new_incident_permission_set.py index cd4e5a37..ea88d5ab 100644 --- a/rootly_sdk/models/new_incident_permission_set.py +++ b/rootly_sdk/models/new_incident_permission_set.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_permission_set_data import NewIncidentPermissionSetData @@ -28,7 +24,6 @@ class NewIncidentPermissionSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_permission_set_data import NewIncidentPermissionSetData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_permission_set_boolean.py b/rootly_sdk/models/new_incident_permission_set_boolean.py index d12fa44d..7fabf216 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_permission_set_boolean_data import NewIncidentPermissionSetBooleanData @@ -28,7 +24,6 @@ class NewIncidentPermissionSetBoolean: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_permission_set_boolean_data import NewIncidentPermissionSetBooleanData data = self.data.to_dict() 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 756f5b18..f522dff8 100644 --- a/rootly_sdk/models/new_incident_permission_set_boolean_data.py +++ b/rootly_sdk/models/new_incident_permission_set_boolean_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_permission_set_boolean_data_type import check_new_incident_permission_set_boolean_data_type -from ..models.new_incident_permission_set_boolean_data_type import NewIncidentPermissionSetBooleanDataType -from typing import cast +from ..models.new_incident_permission_set_boolean_data_type import ( + NewIncidentPermissionSetBooleanDataType, + check_new_incident_permission_set_boolean_data_type, +) if TYPE_CHECKING: from ..models.new_incident_permission_set_boolean_data_attributes import ( @@ -34,9 +33,6 @@ class NewIncidentPermissionSetBooleanData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_permission_set_boolean_data_attributes import ( - NewIncidentPermissionSetBooleanDataAttributes, - ) type_: str = self.type_ 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 eddf1d89..6b11f358 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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_permission_set_boolean_data_attributes_kind import ( - check_new_incident_permission_set_boolean_data_attributes_kind, -) from ..models.new_incident_permission_set_boolean_data_attributes_kind import ( NewIncidentPermissionSetBooleanDataAttributesKind, + check_new_incident_permission_set_boolean_data_attributes_kind, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_incident_permission_set_boolean_data_attributes_severity_params import ( @@ -44,9 +38,6 @@ class NewIncidentPermissionSetBooleanDataAttributes: severity_params: NewIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_permission_set_boolean_data_attributes_severity_params import ( - NewIncidentPermissionSetBooleanDataAttributesSeverityParams, - ) incident_permission_set_id = self.incident_permission_set_id 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 fd87367e..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewIncidentPermissionSetBooleanDataAttributesSeverityParams") diff --git a/rootly_sdk/models/new_incident_permission_set_data.py b/rootly_sdk/models/new_incident_permission_set_data.py index e152b8b4..fb6362a2 100644 --- a/rootly_sdk/models/new_incident_permission_set_data.py +++ b/rootly_sdk/models/new_incident_permission_set_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_permission_set_data_type import check_new_incident_permission_set_data_type -from ..models.new_incident_permission_set_data_type import NewIncidentPermissionSetDataType -from typing import cast +from ..models.new_incident_permission_set_data_type import ( + NewIncidentPermissionSetDataType, + check_new_incident_permission_set_data_type, +) if TYPE_CHECKING: from ..models.new_incident_permission_set_data_attributes import NewIncidentPermissionSetDataAttributes @@ -32,7 +31,6 @@ class NewIncidentPermissionSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_permission_set_data_attributes import NewIncidentPermissionSetDataAttributes type_: str = self.type_ 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 236ea9a5..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,28 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_permission_set_data_attributes_private_incident_permissions_item import ( - check_new_incident_permission_set_data_attributes_private_incident_permissions_item, -) from ..models.new_incident_permission_set_data_attributes_private_incident_permissions_item import ( NewIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem, -) -from ..models.new_incident_permission_set_data_attributes_public_incident_permissions_item import ( - check_new_incident_permission_set_data_attributes_public_incident_permissions_item, + check_new_incident_permission_set_data_attributes_private_incident_permissions_item, ) from ..models.new_incident_permission_set_data_attributes_public_incident_permissions_item import ( NewIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem, + check_new_incident_permission_set_data_attributes_public_incident_permissions_item, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewIncidentPermissionSetDataAttributes") diff --git a/rootly_sdk/models/new_incident_permission_set_resource.py b/rootly_sdk/models/new_incident_permission_set_resource.py index bf58585f..409075ea 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource.py +++ b/rootly_sdk/models/new_incident_permission_set_resource.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_permission_set_resource_data import NewIncidentPermissionSetResourceData @@ -28,7 +24,6 @@ class NewIncidentPermissionSetResource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_permission_set_resource_data import NewIncidentPermissionSetResourceData data = self.data.to_dict() 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 a467f9a8..6e0dc6ca 100644 --- a/rootly_sdk/models/new_incident_permission_set_resource_data.py +++ b/rootly_sdk/models/new_incident_permission_set_resource_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_permission_set_resource_data_type import check_new_incident_permission_set_resource_data_type -from ..models.new_incident_permission_set_resource_data_type import NewIncidentPermissionSetResourceDataType -from typing import cast +from ..models.new_incident_permission_set_resource_data_type import ( + NewIncidentPermissionSetResourceDataType, + check_new_incident_permission_set_resource_data_type, +) if TYPE_CHECKING: from ..models.new_incident_permission_set_resource_data_attributes import ( @@ -34,9 +33,6 @@ class NewIncidentPermissionSetResourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_permission_set_resource_data_attributes import ( - NewIncidentPermissionSetResourceDataAttributes, - ) type_: str = self.type_ 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 e62a5a9d..4ed0a0bf 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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_permission_set_resource_data_attributes_kind import ( - check_new_incident_permission_set_resource_data_attributes_kind, -) from ..models.new_incident_permission_set_resource_data_attributes_kind import ( NewIncidentPermissionSetResourceDataAttributesKind, + check_new_incident_permission_set_resource_data_attributes_kind, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_incident_permission_set_resource_data_attributes_severity_params import ( @@ -46,9 +40,6 @@ class NewIncidentPermissionSetResourceDataAttributes: severity_params: NewIncidentPermissionSetResourceDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_permission_set_resource_data_attributes_severity_params import ( - NewIncidentPermissionSetResourceDataAttributesSeverityParams, - ) incident_permission_set_id = self.incident_permission_set_id 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 1147d721..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewIncidentPermissionSetResourceDataAttributesSeverityParams") diff --git a/rootly_sdk/models/new_incident_role.py b/rootly_sdk/models/new_incident_role.py index 0e03f611..0904e87b 100644 --- a/rootly_sdk/models/new_incident_role.py +++ b/rootly_sdk/models/new_incident_role.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_role_data import NewIncidentRoleData @@ -28,7 +24,6 @@ class NewIncidentRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_role_data import NewIncidentRoleData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_role_data.py b/rootly_sdk/models/new_incident_role_data.py index 22eb9aa5..1611d57e 100644 --- a/rootly_sdk/models/new_incident_role_data.py +++ b/rootly_sdk/models/new_incident_role_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_role_data_type import check_new_incident_role_data_type -from ..models.new_incident_role_data_type import NewIncidentRoleDataType -from typing import cast +from ..models.new_incident_role_data_type import NewIncidentRoleDataType, check_new_incident_role_data_type if TYPE_CHECKING: from ..models.new_incident_role_data_attributes import NewIncidentRoleDataAttributes @@ -32,7 +28,6 @@ class NewIncidentRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_role_data_attributes import NewIncidentRoleDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_incident_role_data_attributes.py b/rootly_sdk/models/new_incident_role_data_attributes.py index 6b020b93..bdf3cc53 100644 --- a/rootly_sdk/models/new_incident_role_data_attributes.py +++ b/rootly_sdk/models/new_incident_role_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewIncidentRoleDataAttributes") diff --git a/rootly_sdk/models/new_incident_role_task.py b/rootly_sdk/models/new_incident_role_task.py index 542c5fb3..b5513090 100644 --- a/rootly_sdk/models/new_incident_role_task.py +++ b/rootly_sdk/models/new_incident_role_task.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_role_task_data import NewIncidentRoleTaskData @@ -28,7 +24,6 @@ class NewIncidentRoleTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_role_task_data import NewIncidentRoleTaskData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_role_task_data.py b/rootly_sdk/models/new_incident_role_task_data.py index f76f8f67..35bda731 100644 --- a/rootly_sdk/models/new_incident_role_task_data.py +++ b/rootly_sdk/models/new_incident_role_task_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_role_task_data_type import check_new_incident_role_task_data_type -from ..models.new_incident_role_task_data_type import NewIncidentRoleTaskDataType -from typing import cast +from ..models.new_incident_role_task_data_type import ( + NewIncidentRoleTaskDataType, + check_new_incident_role_task_data_type, +) if TYPE_CHECKING: from ..models.new_incident_role_task_data_attributes import NewIncidentRoleTaskDataAttributes @@ -32,7 +31,6 @@ class NewIncidentRoleTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_role_task_data_attributes import NewIncidentRoleTaskDataAttributes type_: str = self.type_ 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 47dbddb9..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,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.new_incident_role_task_data_attributes_priority import ( + NewIncidentRoleTaskDataAttributesPriority, check_new_incident_role_task_data_attributes_priority, ) -from ..models.new_incident_role_task_data_attributes_priority import NewIncidentRoleTaskDataAttributesPriority from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewIncidentRoleTaskDataAttributes") diff --git a/rootly_sdk/models/new_incident_status_page_event.py b/rootly_sdk/models/new_incident_status_page_event.py index b1a778af..87aec609 100644 --- a/rootly_sdk/models/new_incident_status_page_event.py +++ b/rootly_sdk/models/new_incident_status_page_event.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_status_page_event_data import NewIncidentStatusPageEventData @@ -28,7 +24,6 @@ class NewIncidentStatusPageEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_status_page_event_data import NewIncidentStatusPageEventData data = self.data.to_dict() 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 f5624902..14e5a75a 100644 --- a/rootly_sdk/models/new_incident_status_page_event_data.py +++ b/rootly_sdk/models/new_incident_status_page_event_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_status_page_event_data_type import check_new_incident_status_page_event_data_type -from ..models.new_incident_status_page_event_data_type import NewIncidentStatusPageEventDataType -from typing import cast +from ..models.new_incident_status_page_event_data_type import ( + NewIncidentStatusPageEventDataType, + check_new_incident_status_page_event_data_type, +) if TYPE_CHECKING: from ..models.new_incident_status_page_event_data_attributes import NewIncidentStatusPageEventDataAttributes @@ -32,7 +31,6 @@ class NewIncidentStatusPageEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_status_page_event_data_attributes import NewIncidentStatusPageEventDataAttributes type_: str = self.type_ 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 7ebcb483..528e5f80 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,24 +1,17 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 +from dateutil.parser import isoparse -from ..models.new_incident_status_page_event_data_attributes_status import ( - check_new_incident_status_page_event_data_attributes_status, -) from ..models.new_incident_status_page_event_data_attributes_status import ( NewIncidentStatusPageEventDataAttributesStatus, + check_new_incident_status_page_event_data_attributes_status, ) from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime - T = TypeVar("T", bound="NewIncidentStatusPageEventDataAttributes") diff --git a/rootly_sdk/models/new_incident_sub_status.py b/rootly_sdk/models/new_incident_sub_status.py index 136aa867..6514f78e 100644 --- a/rootly_sdk/models/new_incident_sub_status.py +++ b/rootly_sdk/models/new_incident_sub_status.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_sub_status_data import NewIncidentSubStatusData @@ -28,7 +24,6 @@ class NewIncidentSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_sub_status_data import NewIncidentSubStatusData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_sub_status_data.py b/rootly_sdk/models/new_incident_sub_status_data.py index 1750b15d..6124b0a8 100644 --- a/rootly_sdk/models/new_incident_sub_status_data.py +++ b/rootly_sdk/models/new_incident_sub_status_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_sub_status_data_type import check_new_incident_sub_status_data_type -from ..models.new_incident_sub_status_data_type import NewIncidentSubStatusDataType -from typing import cast +from ..models.new_incident_sub_status_data_type import ( + NewIncidentSubStatusDataType, + check_new_incident_sub_status_data_type, +) if TYPE_CHECKING: from ..models.new_incident_sub_status_data_attributes import NewIncidentSubStatusDataAttributes @@ -32,7 +31,6 @@ class NewIncidentSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_sub_status_data_attributes import NewIncidentSubStatusDataAttributes type_: str = self.type_ 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 61d71e21..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,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewIncidentSubStatusDataAttributes") diff --git a/rootly_sdk/models/new_incident_type.py b/rootly_sdk/models/new_incident_type.py index f191429d..e92d9824 100644 --- a/rootly_sdk/models/new_incident_type.py +++ b/rootly_sdk/models/new_incident_type.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_type_data import NewIncidentTypeData @@ -28,7 +24,6 @@ class NewIncidentType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_type_data import NewIncidentTypeData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_incident_type_data.py b/rootly_sdk/models/new_incident_type_data.py index 6ac7b601..9409b7a5 100644 --- a/rootly_sdk/models/new_incident_type_data.py +++ b/rootly_sdk/models/new_incident_type_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_incident_type_data_type import check_new_incident_type_data_type -from ..models.new_incident_type_data_type import NewIncidentTypeDataType -from typing import cast +from ..models.new_incident_type_data_type import NewIncidentTypeDataType, check_new_incident_type_data_type if TYPE_CHECKING: from ..models.new_incident_type_data_attributes import NewIncidentTypeDataAttributes @@ -32,7 +28,6 @@ class NewIncidentTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_incident_type_data_attributes import NewIncidentTypeDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_incident_type_data_attributes.py b/rootly_sdk/models/new_incident_type_data_attributes.py index e3c14a31..3c96c37c 100644 --- a/rootly_sdk/models/new_incident_type_data_attributes.py +++ b/rootly_sdk/models/new_incident_type_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_incident_type_data_attributes_properties_item import NewIncidentTypeDataAttributesPropertiesItem from ..models.new_incident_type_data_attributes_slack_aliases_type_0_item import ( @@ -51,15 +47,6 @@ class NewIncidentTypeDataAttributes: properties: list[NewIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - 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, - ) - from ..models.new_incident_type_data_attributes_slack_channels_type_0_item import ( - NewIncidentTypeDataAttributesSlackChannelsType0Item, - ) name = self.name diff --git a/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py b/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py index ca42ade8..5d2658eb 100644 --- a/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_incident_type_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewIncidentTypeDataAttributesPropertiesItem") 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 23177812..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewIncidentTypeDataAttributesSlackAliasesType0Item") 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 a4007fc6..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewIncidentTypeDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_live_call_router.py b/rootly_sdk/models/new_live_call_router.py index becfe898..bafd6e61 100644 --- a/rootly_sdk/models/new_live_call_router.py +++ b/rootly_sdk/models/new_live_call_router.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_live_call_router_data import NewLiveCallRouterData @@ -28,7 +24,6 @@ class NewLiveCallRouter: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_live_call_router_data import NewLiveCallRouterData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_live_call_router_data.py b/rootly_sdk/models/new_live_call_router_data.py index 4136963f..26152d3d 100644 --- a/rootly_sdk/models/new_live_call_router_data.py +++ b/rootly_sdk/models/new_live_call_router_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_live_call_router_data_type import check_new_live_call_router_data_type -from ..models.new_live_call_router_data_type import NewLiveCallRouterDataType -from typing import cast +from ..models.new_live_call_router_data_type import NewLiveCallRouterDataType, check_new_live_call_router_data_type if TYPE_CHECKING: from ..models.new_live_call_router_data_attributes import NewLiveCallRouterDataAttributes @@ -32,7 +28,6 @@ class NewLiveCallRouterData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_live_call_router_data_attributes import NewLiveCallRouterDataAttributes type_: str = self.type_ 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 ad89529b..ffd5bcf2 100644 --- a/rootly_sdk/models/new_live_call_router_data_attributes.py +++ b/rootly_sdk/models/new_live_call_router_data_attributes.py @@ -1,31 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.new_live_call_router_data_attributes_country_code import ( + NewLiveCallRouterDataAttributesCountryCode, check_new_live_call_router_data_attributes_country_code, ) -from ..models.new_live_call_router_data_attributes_country_code import NewLiveCallRouterDataAttributesCountryCode -from ..models.new_live_call_router_data_attributes_kind import check_new_live_call_router_data_attributes_kind -from ..models.new_live_call_router_data_attributes_kind import NewLiveCallRouterDataAttributesKind +from ..models.new_live_call_router_data_attributes_kind import ( + NewLiveCallRouterDataAttributesKind, + check_new_live_call_router_data_attributes_kind, +) from ..models.new_live_call_router_data_attributes_phone_type import ( + NewLiveCallRouterDataAttributesPhoneType, check_new_live_call_router_data_attributes_phone_type, ) -from ..models.new_live_call_router_data_attributes_phone_type import NewLiveCallRouterDataAttributesPhoneType -from ..models.new_live_call_router_data_attributes_waiting_music_url import ( - check_new_live_call_router_data_attributes_waiting_music_url, -) from ..models.new_live_call_router_data_attributes_waiting_music_url import ( NewLiveCallRouterDataAttributesWaitingMusicUrl, + check_new_live_call_router_data_attributes_waiting_music_url, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_live_call_router_data_attributes_escalation_policy_trigger_params import ( @@ -101,12 +97,6 @@ class NewLiveCallRouterDataAttributes: escalation_policy_trigger_params: NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_live_call_router_data_attributes_escalation_policy_trigger_params import ( - NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams, - ) - from ..models.new_live_call_router_data_attributes_paging_targets_item import ( - NewLiveCallRouterDataAttributesPagingTargetsItem, - ) kind: str = self.kind 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 c54e8a90..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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_live_call_router_data_attributes_escalation_policy_trigger_params_type import ( - check_new_live_call_router_data_attributes_escalation_policy_trigger_params_type, -) from ..models.new_live_call_router_data_attributes_escalation_policy_trigger_params_type import ( NewLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType, + check_new_live_call_router_data_attributes_escalation_policy_trigger_params_type, ) -from typing import cast - T = TypeVar("T", bound="NewLiveCallRouterDataAttributesEscalationPolicyTriggerParams") 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 66502648..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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_live_call_router_data_attributes_paging_targets_item_type import ( - check_new_live_call_router_data_attributes_paging_targets_item_type, -) from ..models.new_live_call_router_data_attributes_paging_targets_item_type import ( NewLiveCallRouterDataAttributesPagingTargetsItemType, + check_new_live_call_router_data_attributes_paging_targets_item_type, ) -from typing import cast - T = TypeVar("T", bound="NewLiveCallRouterDataAttributesPagingTargetsItem") diff --git a/rootly_sdk/models/new_on_call_pay_report.py b/rootly_sdk/models/new_on_call_pay_report.py index bce61f52..dedd08a5 100644 --- a/rootly_sdk/models/new_on_call_pay_report.py +++ b/rootly_sdk/models/new_on_call_pay_report.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_on_call_pay_report_data import NewOnCallPayReportData @@ -28,7 +24,6 @@ class NewOnCallPayReport: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_on_call_pay_report_data import NewOnCallPayReportData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_on_call_pay_report_data.py b/rootly_sdk/models/new_on_call_pay_report_data.py index 2935a2f2..a50b78a5 100644 --- a/rootly_sdk/models/new_on_call_pay_report_data.py +++ b/rootly_sdk/models/new_on_call_pay_report_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_on_call_pay_report_data_type import check_new_on_call_pay_report_data_type -from ..models.new_on_call_pay_report_data_type import NewOnCallPayReportDataType -from typing import cast +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 @@ -32,7 +28,6 @@ class NewOnCallPayReportData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_on_call_pay_report_data_attributes import NewOnCallPayReportDataAttributes type_: str = self.type_ 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 index 3072e917..ee306056 100644 --- a/rootly_sdk/models/new_on_call_pay_report_data_attributes.py +++ b/rootly_sdk/models/new_on_call_pay_report_data_attributes.py @@ -1,18 +1,13 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +from ..types import UNSET, Unset T = TypeVar("T", bound="NewOnCallPayReportDataAttributes") diff --git a/rootly_sdk/models/new_on_call_role.py b/rootly_sdk/models/new_on_call_role.py index a55dbc48..da10105a 100644 --- a/rootly_sdk/models/new_on_call_role.py +++ b/rootly_sdk/models/new_on_call_role.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_on_call_role_data import NewOnCallRoleData @@ -28,7 +24,6 @@ class NewOnCallRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_on_call_role_data import NewOnCallRoleData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_on_call_role_data.py b/rootly_sdk/models/new_on_call_role_data.py index 4e949cf7..e48c91f9 100644 --- a/rootly_sdk/models/new_on_call_role_data.py +++ b/rootly_sdk/models/new_on_call_role_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_on_call_role_data_type import check_new_on_call_role_data_type -from ..models.new_on_call_role_data_type import NewOnCallRoleDataType -from typing import cast +from ..models.new_on_call_role_data_type import NewOnCallRoleDataType, check_new_on_call_role_data_type if TYPE_CHECKING: from ..models.new_on_call_role_data_attributes import NewOnCallRoleDataAttributes @@ -32,7 +28,6 @@ class NewOnCallRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_on_call_role_data_attributes import NewOnCallRoleDataAttributes type_: str = self.type_ 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 f849cded..6b1abb86 100644 --- a/rootly_sdk/models/new_on_call_role_data_attributes.py +++ b/rootly_sdk/models/new_on_call_role_data_attributes.py @@ -1,160 +1,107 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset -from ..models.new_on_call_role_data_attributes_alert_fields_permissions_item import ( - check_new_on_call_role_data_attributes_alert_fields_permissions_item, -) from ..models.new_on_call_role_data_attributes_alert_fields_permissions_item import ( NewOnCallRoleDataAttributesAlertFieldsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_alert_groups_permissions_item import ( - check_new_on_call_role_data_attributes_alert_groups_permissions_item, + check_new_on_call_role_data_attributes_alert_fields_permissions_item, ) from ..models.new_on_call_role_data_attributes_alert_groups_permissions_item import ( NewOnCallRoleDataAttributesAlertGroupsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_alert_routing_rules_permissions_item import ( - check_new_on_call_role_data_attributes_alert_routing_rules_permissions_item, + check_new_on_call_role_data_attributes_alert_groups_permissions_item, ) from ..models.new_on_call_role_data_attributes_alert_routing_rules_permissions_item import ( NewOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_alert_sources_permissions_item import ( - check_new_on_call_role_data_attributes_alert_sources_permissions_item, + check_new_on_call_role_data_attributes_alert_routing_rules_permissions_item, ) from ..models.new_on_call_role_data_attributes_alert_sources_permissions_item import ( NewOnCallRoleDataAttributesAlertSourcesPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_alert_urgency_permissions_item import ( - check_new_on_call_role_data_attributes_alert_urgency_permissions_item, + check_new_on_call_role_data_attributes_alert_sources_permissions_item, ) from ..models.new_on_call_role_data_attributes_alert_urgency_permissions_item import ( NewOnCallRoleDataAttributesAlertUrgencyPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_alerts_permissions_item import ( - check_new_on_call_role_data_attributes_alerts_permissions_item, + check_new_on_call_role_data_attributes_alert_urgency_permissions_item, ) from ..models.new_on_call_role_data_attributes_alerts_permissions_item import ( NewOnCallRoleDataAttributesAlertsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_api_keys_permissions_item import ( - check_new_on_call_role_data_attributes_api_keys_permissions_item, + check_new_on_call_role_data_attributes_alerts_permissions_item, ) from ..models.new_on_call_role_data_attributes_api_keys_permissions_item import ( NewOnCallRoleDataAttributesApiKeysPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_audits_permissions_item import ( - check_new_on_call_role_data_attributes_audits_permissions_item, + check_new_on_call_role_data_attributes_api_keys_permissions_item, ) from ..models.new_on_call_role_data_attributes_audits_permissions_item import ( NewOnCallRoleDataAttributesAuditsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_catalogs_permissions_item import ( - check_new_on_call_role_data_attributes_catalogs_permissions_item, + check_new_on_call_role_data_attributes_audits_permissions_item, ) from ..models.new_on_call_role_data_attributes_catalogs_permissions_item import ( NewOnCallRoleDataAttributesCatalogsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_contacts_permissions_item import ( - check_new_on_call_role_data_attributes_contacts_permissions_item, + check_new_on_call_role_data_attributes_catalogs_permissions_item, ) from ..models.new_on_call_role_data_attributes_contacts_permissions_item import ( NewOnCallRoleDataAttributesContactsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_escalation_policies_permissions_item import ( - check_new_on_call_role_data_attributes_escalation_policies_permissions_item, + check_new_on_call_role_data_attributes_contacts_permissions_item, ) from ..models.new_on_call_role_data_attributes_escalation_policies_permissions_item import ( NewOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_functionalities_permissions_item import ( - check_new_on_call_role_data_attributes_functionalities_permissions_item, + check_new_on_call_role_data_attributes_escalation_policies_permissions_item, ) from ..models.new_on_call_role_data_attributes_functionalities_permissions_item import ( NewOnCallRoleDataAttributesFunctionalitiesPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_groups_permissions_item import ( - check_new_on_call_role_data_attributes_groups_permissions_item, + check_new_on_call_role_data_attributes_functionalities_permissions_item, ) from ..models.new_on_call_role_data_attributes_groups_permissions_item import ( NewOnCallRoleDataAttributesGroupsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_heartbeats_permissions_item import ( - check_new_on_call_role_data_attributes_heartbeats_permissions_item, + check_new_on_call_role_data_attributes_groups_permissions_item, ) from ..models.new_on_call_role_data_attributes_heartbeats_permissions_item import ( NewOnCallRoleDataAttributesHeartbeatsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_integrations_permissions_item import ( - check_new_on_call_role_data_attributes_integrations_permissions_item, + check_new_on_call_role_data_attributes_heartbeats_permissions_item, ) from ..models.new_on_call_role_data_attributes_integrations_permissions_item import ( NewOnCallRoleDataAttributesIntegrationsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_invitations_permissions_item import ( - check_new_on_call_role_data_attributes_invitations_permissions_item, + check_new_on_call_role_data_attributes_integrations_permissions_item, ) from ..models.new_on_call_role_data_attributes_invitations_permissions_item import ( NewOnCallRoleDataAttributesInvitationsPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_live_call_routing_permissions_item import ( - check_new_on_call_role_data_attributes_live_call_routing_permissions_item, + check_new_on_call_role_data_attributes_invitations_permissions_item, ) from ..models.new_on_call_role_data_attributes_live_call_routing_permissions_item import ( NewOnCallRoleDataAttributesLiveCallRoutingPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_on_call_readiness_report_permissions_item import ( - check_new_on_call_role_data_attributes_on_call_readiness_report_permissions_item, + check_new_on_call_role_data_attributes_live_call_routing_permissions_item, ) from ..models.new_on_call_role_data_attributes_on_call_readiness_report_permissions_item import ( NewOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_on_call_roles_permissions_item import ( - check_new_on_call_role_data_attributes_on_call_roles_permissions_item, + check_new_on_call_role_data_attributes_on_call_readiness_report_permissions_item, ) from ..models.new_on_call_role_data_attributes_on_call_roles_permissions_item import ( NewOnCallRoleDataAttributesOnCallRolesPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_schedule_override_permissions_item import ( - check_new_on_call_role_data_attributes_schedule_override_permissions_item, + check_new_on_call_role_data_attributes_on_call_roles_permissions_item, ) from ..models.new_on_call_role_data_attributes_schedule_override_permissions_item import ( NewOnCallRoleDataAttributesScheduleOverridePermissionsItem, -) -from ..models.new_on_call_role_data_attributes_schedules_permissions_item import ( - check_new_on_call_role_data_attributes_schedules_permissions_item, + check_new_on_call_role_data_attributes_schedule_override_permissions_item, ) from ..models.new_on_call_role_data_attributes_schedules_permissions_item import ( NewOnCallRoleDataAttributesSchedulesPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_services_permissions_item import ( - check_new_on_call_role_data_attributes_services_permissions_item, + check_new_on_call_role_data_attributes_schedules_permissions_item, ) from ..models.new_on_call_role_data_attributes_services_permissions_item import ( NewOnCallRoleDataAttributesServicesPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_webhooks_permissions_item import ( - check_new_on_call_role_data_attributes_webhooks_permissions_item, + check_new_on_call_role_data_attributes_services_permissions_item, ) from ..models.new_on_call_role_data_attributes_webhooks_permissions_item import ( NewOnCallRoleDataAttributesWebhooksPermissionsItem, -) -from ..models.new_on_call_role_data_attributes_workflows_permissions_item import ( - check_new_on_call_role_data_attributes_workflows_permissions_item, + check_new_on_call_role_data_attributes_webhooks_permissions_item, ) from ..models.new_on_call_role_data_attributes_workflows_permissions_item import ( NewOnCallRoleDataAttributesWorkflowsPermissionsItem, + check_new_on_call_role_data_attributes_workflows_permissions_item, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewOnCallRoleDataAttributes") diff --git a/rootly_sdk/models/new_on_call_shadow.py b/rootly_sdk/models/new_on_call_shadow.py index 0d343e13..a4930c3e 100644 --- a/rootly_sdk/models/new_on_call_shadow.py +++ b/rootly_sdk/models/new_on_call_shadow.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_on_call_shadow_data import NewOnCallShadowData @@ -28,7 +24,6 @@ class NewOnCallShadow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_on_call_shadow_data import NewOnCallShadowData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_on_call_shadow_data.py b/rootly_sdk/models/new_on_call_shadow_data.py index 08660bba..52139f94 100644 --- a/rootly_sdk/models/new_on_call_shadow_data.py +++ b/rootly_sdk/models/new_on_call_shadow_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_on_call_shadow_data_type import check_new_on_call_shadow_data_type -from ..models.new_on_call_shadow_data_type import NewOnCallShadowDataType -from typing import cast +from ..models.new_on_call_shadow_data_type import NewOnCallShadowDataType, check_new_on_call_shadow_data_type if TYPE_CHECKING: from ..models.new_on_call_shadow_data_attributes import NewOnCallShadowDataAttributes @@ -32,7 +28,6 @@ class NewOnCallShadowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_on_call_shadow_data_attributes import NewOnCallShadowDataAttributes type_: str = self.type_ 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 10caff6e..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,21 +1,16 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset +from dateutil.parser import isoparse from ..models.new_on_call_shadow_data_attributes_shadowable_type import ( + NewOnCallShadowDataAttributesShadowableType, check_new_on_call_shadow_data_attributes_shadowable_type, ) -from ..models.new_on_call_shadow_data_attributes_shadowable_type import NewOnCallShadowDataAttributesShadowableType -from dateutil.parser import isoparse -from typing import cast -import datetime - T = TypeVar("T", bound="NewOnCallShadowDataAttributes") diff --git a/rootly_sdk/models/new_override_shift.py b/rootly_sdk/models/new_override_shift.py index ab8418e1..b2a8ebc8 100644 --- a/rootly_sdk/models/new_override_shift.py +++ b/rootly_sdk/models/new_override_shift.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_override_shift_data import NewOverrideShiftData @@ -28,7 +24,6 @@ class NewOverrideShift: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_override_shift_data import NewOverrideShiftData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_override_shift_data.py b/rootly_sdk/models/new_override_shift_data.py index fec80c40..8164aa47 100644 --- a/rootly_sdk/models/new_override_shift_data.py +++ b/rootly_sdk/models/new_override_shift_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_override_shift_data_type import check_new_override_shift_data_type -from ..models.new_override_shift_data_type import NewOverrideShiftDataType -from typing import cast +from ..models.new_override_shift_data_type import NewOverrideShiftDataType, check_new_override_shift_data_type if TYPE_CHECKING: from ..models.new_override_shift_data_attributes import NewOverrideShiftDataAttributes @@ -32,7 +28,6 @@ class NewOverrideShiftData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_override_shift_data_attributes import NewOverrideShiftDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_override_shift_data_attributes.py b/rootly_sdk/models/new_override_shift_data_attributes.py index ce42cbc7..028469d7 100644 --- a/rootly_sdk/models/new_override_shift_data_attributes.py +++ b/rootly_sdk/models/new_override_shift_data_attributes.py @@ -1,17 +1,11 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - from dateutil.parser import isoparse -from typing import cast -import datetime - T = TypeVar("T", bound="NewOverrideShiftDataAttributes") diff --git a/rootly_sdk/models/new_playbook.py b/rootly_sdk/models/new_playbook.py index 0422988f..2877e31f 100644 --- a/rootly_sdk/models/new_playbook.py +++ b/rootly_sdk/models/new_playbook.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_playbook_data import NewPlaybookData @@ -28,7 +24,6 @@ class NewPlaybook: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_playbook_data import NewPlaybookData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_playbook_data.py b/rootly_sdk/models/new_playbook_data.py index 4a781381..85e7114a 100644 --- a/rootly_sdk/models/new_playbook_data.py +++ b/rootly_sdk/models/new_playbook_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_playbook_data_type import check_new_playbook_data_type -from ..models.new_playbook_data_type import NewPlaybookDataType -from typing import cast +from ..models.new_playbook_data_type import NewPlaybookDataType, check_new_playbook_data_type if TYPE_CHECKING: from ..models.new_playbook_data_attributes import NewPlaybookDataAttributes @@ -32,7 +28,6 @@ class NewPlaybookData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_playbook_data_attributes import NewPlaybookDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_playbook_data_attributes.py b/rootly_sdk/models/new_playbook_data_attributes.py index b85e3d88..5dae9c85 100644 --- a/rootly_sdk/models/new_playbook_data_attributes.py +++ b/rootly_sdk/models/new_playbook_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewPlaybookDataAttributes") diff --git a/rootly_sdk/models/new_playbook_task.py b/rootly_sdk/models/new_playbook_task.py index f9854fce..2358ad45 100644 --- a/rootly_sdk/models/new_playbook_task.py +++ b/rootly_sdk/models/new_playbook_task.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_playbook_task_data import NewPlaybookTaskData @@ -28,7 +24,6 @@ class NewPlaybookTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_playbook_task_data import NewPlaybookTaskData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_playbook_task_data.py b/rootly_sdk/models/new_playbook_task_data.py index 9f359c4f..68af70e6 100644 --- a/rootly_sdk/models/new_playbook_task_data.py +++ b/rootly_sdk/models/new_playbook_task_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_playbook_task_data_type import check_new_playbook_task_data_type -from ..models.new_playbook_task_data_type import NewPlaybookTaskDataType -from typing import cast +from ..models.new_playbook_task_data_type import NewPlaybookTaskDataType, check_new_playbook_task_data_type if TYPE_CHECKING: from ..models.new_playbook_task_data_attributes import NewPlaybookTaskDataAttributes @@ -32,7 +28,6 @@ class NewPlaybookTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_playbook_task_data_attributes import NewPlaybookTaskDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_playbook_task_data_attributes.py b/rootly_sdk/models/new_playbook_task_data_attributes.py index 2b93c5b5..7888c99c 100644 --- a/rootly_sdk/models/new_playbook_task_data_attributes.py +++ b/rootly_sdk/models/new_playbook_task_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewPlaybookTaskDataAttributes") diff --git a/rootly_sdk/models/new_post_mortem_template.py b/rootly_sdk/models/new_post_mortem_template.py index c5d55dcf..9e51b0d5 100644 --- a/rootly_sdk/models/new_post_mortem_template.py +++ b/rootly_sdk/models/new_post_mortem_template.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_post_mortem_template_data import NewPostMortemTemplateData @@ -28,7 +24,6 @@ class NewPostMortemTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_post_mortem_template_data import NewPostMortemTemplateData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_post_mortem_template_data.py b/rootly_sdk/models/new_post_mortem_template_data.py index cbfb237d..96041417 100644 --- a/rootly_sdk/models/new_post_mortem_template_data.py +++ b/rootly_sdk/models/new_post_mortem_template_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_post_mortem_template_data_type import check_new_post_mortem_template_data_type -from ..models.new_post_mortem_template_data_type import NewPostMortemTemplateDataType -from typing import cast +from ..models.new_post_mortem_template_data_type import ( + NewPostMortemTemplateDataType, + check_new_post_mortem_template_data_type, +) if TYPE_CHECKING: from ..models.new_post_mortem_template_data_attributes import NewPostMortemTemplateDataAttributes @@ -32,7 +31,6 @@ class NewPostMortemTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_post_mortem_template_data_attributes import NewPostMortemTemplateDataAttributes type_: str = self.type_ 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 da42c003..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,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.new_post_mortem_template_data_attributes_format import ( + NewPostMortemTemplateDataAttributesFormat, check_new_post_mortem_template_data_attributes_format, ) -from ..models.new_post_mortem_template_data_attributes_format import NewPostMortemTemplateDataAttributesFormat from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewPostMortemTemplateDataAttributes") diff --git a/rootly_sdk/models/new_pulse.py b/rootly_sdk/models/new_pulse.py index 125b2cb3..b674db54 100644 --- a/rootly_sdk/models/new_pulse.py +++ b/rootly_sdk/models/new_pulse.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_pulse_data import NewPulseData @@ -28,7 +24,6 @@ class NewPulse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_pulse_data import NewPulseData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_pulse_data.py b/rootly_sdk/models/new_pulse_data.py index ec2ca557..7e407845 100644 --- a/rootly_sdk/models/new_pulse_data.py +++ b/rootly_sdk/models/new_pulse_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_pulse_data_type import check_new_pulse_data_type -from ..models.new_pulse_data_type import NewPulseDataType -from typing import cast +from ..models.new_pulse_data_type import NewPulseDataType, check_new_pulse_data_type if TYPE_CHECKING: from ..models.new_pulse_data_attributes import NewPulseDataAttributes @@ -32,7 +28,6 @@ class NewPulseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_pulse_data_attributes import NewPulseDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_pulse_data_attributes.py b/rootly_sdk/models/new_pulse_data_attributes.py index 6c244458..c16515c8 100644 --- a/rootly_sdk/models/new_pulse_data_attributes.py +++ b/rootly_sdk/models/new_pulse_data_attributes.py @@ -1,17 +1,13 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 +from dateutil.parser import isoparse from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime if TYPE_CHECKING: from ..models.new_pulse_data_attributes_data_type_0 import NewPulseDataAttributesDataType0 @@ -51,8 +47,8 @@ class NewPulseDataAttributes: def to_dict(self) -> dict[str, Any]: from ..models.new_pulse_data_attributes_data_type_0 import NewPulseDataAttributesDataType0 - from ..models.new_pulse_data_attributes_refs_item_type_0 import NewPulseDataAttributesRefsItemType0 from ..models.new_pulse_data_attributes_labels_item_type_0 import NewPulseDataAttributesLabelsItemType0 + from ..models.new_pulse_data_attributes_refs_item_type_0 import NewPulseDataAttributesRefsItemType0 summary = self.summary 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 64853a52..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewPulseDataAttributesDataType0") 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 ce76c671..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewPulseDataAttributesLabelsItemType0") 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 403b65c5..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewPulseDataAttributesRefsItemType0") diff --git a/rootly_sdk/models/new_retrospective_process.py b/rootly_sdk/models/new_retrospective_process.py index 786332f4..b503747b 100644 --- a/rootly_sdk/models/new_retrospective_process.py +++ b/rootly_sdk/models/new_retrospective_process.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_retrospective_process_data import NewRetrospectiveProcessData @@ -28,7 +24,6 @@ class NewRetrospectiveProcess: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_retrospective_process_data import NewRetrospectiveProcessData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_retrospective_process_data.py b/rootly_sdk/models/new_retrospective_process_data.py index add0293f..0784fceb 100644 --- a/rootly_sdk/models/new_retrospective_process_data.py +++ b/rootly_sdk/models/new_retrospective_process_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_retrospective_process_data_type import check_new_retrospective_process_data_type -from ..models.new_retrospective_process_data_type import NewRetrospectiveProcessDataType -from typing import cast +from ..models.new_retrospective_process_data_type import ( + NewRetrospectiveProcessDataType, + check_new_retrospective_process_data_type, +) if TYPE_CHECKING: from ..models.new_retrospective_process_data_attributes import NewRetrospectiveProcessDataAttributes @@ -32,7 +31,6 @@ class NewRetrospectiveProcessData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_retrospective_process_data_attributes import NewRetrospectiveProcessDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_retrospective_process_data_attributes.py b/rootly_sdk/models/new_retrospective_process_data_attributes.py index ef8f9b22..49bfd3bf 100644 --- a/rootly_sdk/models/new_retrospective_process_data_attributes.py +++ b/rootly_sdk/models/new_retrospective_process_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0 import ( NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0, @@ -51,9 +47,6 @@ class NewRetrospectiveProcessDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2 import ( - NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2, - ) from ..models.new_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0 import ( NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0, ) 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 ff1d8a5a..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,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0") 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 b0e950c8..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,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1") 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 aec4fb34..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,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="NewRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2") diff --git a/rootly_sdk/models/new_retrospective_process_group.py b/rootly_sdk/models/new_retrospective_process_group.py index a9259b26..8af8a734 100644 --- a/rootly_sdk/models/new_retrospective_process_group.py +++ b/rootly_sdk/models/new_retrospective_process_group.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_retrospective_process_group_data import NewRetrospectiveProcessGroupData @@ -28,7 +24,6 @@ class NewRetrospectiveProcessGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_retrospective_process_group_data import NewRetrospectiveProcessGroupData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_retrospective_process_group_data.py b/rootly_sdk/models/new_retrospective_process_group_data.py index bbca31ad..10615645 100644 --- a/rootly_sdk/models/new_retrospective_process_group_data.py +++ b/rootly_sdk/models/new_retrospective_process_group_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_retrospective_process_group_data_type import check_new_retrospective_process_group_data_type -from ..models.new_retrospective_process_group_data_type import NewRetrospectiveProcessGroupDataType -from typing import cast +from ..models.new_retrospective_process_group_data_type import ( + NewRetrospectiveProcessGroupDataType, + check_new_retrospective_process_group_data_type, +) if TYPE_CHECKING: from ..models.new_retrospective_process_group_data_attributes import NewRetrospectiveProcessGroupDataAttributes @@ -32,7 +31,6 @@ class NewRetrospectiveProcessGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_retrospective_process_group_data_attributes import NewRetrospectiveProcessGroupDataAttributes type_: str = self.type_ 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 d5dc514a..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewRetrospectiveProcessGroupDataAttributes") diff --git a/rootly_sdk/models/new_retrospective_process_group_step.py b/rootly_sdk/models/new_retrospective_process_group_step.py index 9b0e63c7..b700bfc2 100644 --- a/rootly_sdk/models/new_retrospective_process_group_step.py +++ b/rootly_sdk/models/new_retrospective_process_group_step.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_retrospective_process_group_step_data import NewRetrospectiveProcessGroupStepData @@ -28,7 +24,6 @@ class NewRetrospectiveProcessGroupStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_retrospective_process_group_step_data import NewRetrospectiveProcessGroupStepData data = self.data.to_dict() 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 90faeaaa..7aeeb8b3 100644 --- a/rootly_sdk/models/new_retrospective_process_group_step_data.py +++ b/rootly_sdk/models/new_retrospective_process_group_step_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_retrospective_process_group_step_data_type import check_new_retrospective_process_group_step_data_type -from ..models.new_retrospective_process_group_step_data_type import NewRetrospectiveProcessGroupStepDataType -from typing import cast +from ..models.new_retrospective_process_group_step_data_type import ( + NewRetrospectiveProcessGroupStepDataType, + check_new_retrospective_process_group_step_data_type, +) if TYPE_CHECKING: from ..models.new_retrospective_process_group_step_data_attributes import ( @@ -34,9 +33,6 @@ class NewRetrospectiveProcessGroupStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_retrospective_process_group_step_data_attributes import ( - NewRetrospectiveProcessGroupStepDataAttributes, - ) type_: str = self.type_ 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 7deb3453..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewRetrospectiveProcessGroupStepDataAttributes") diff --git a/rootly_sdk/models/new_retrospective_step.py b/rootly_sdk/models/new_retrospective_step.py index 7a7f504e..f1f314d6 100644 --- a/rootly_sdk/models/new_retrospective_step.py +++ b/rootly_sdk/models/new_retrospective_step.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_retrospective_step_data import NewRetrospectiveStepData @@ -28,7 +24,6 @@ class NewRetrospectiveStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_retrospective_step_data import NewRetrospectiveStepData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_retrospective_step_data.py b/rootly_sdk/models/new_retrospective_step_data.py index 13f136f0..940e62ff 100644 --- a/rootly_sdk/models/new_retrospective_step_data.py +++ b/rootly_sdk/models/new_retrospective_step_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_retrospective_step_data_type import check_new_retrospective_step_data_type -from ..models.new_retrospective_step_data_type import NewRetrospectiveStepDataType -from typing import cast +from ..models.new_retrospective_step_data_type import ( + NewRetrospectiveStepDataType, + check_new_retrospective_step_data_type, +) if TYPE_CHECKING: from ..models.new_retrospective_step_data_attributes import NewRetrospectiveStepDataAttributes @@ -32,7 +31,6 @@ class NewRetrospectiveStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_retrospective_step_data_attributes import NewRetrospectiveStepDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_retrospective_step_data_attributes.py b/rootly_sdk/models/new_retrospective_step_data_attributes.py index d93ae994..3b6079ec 100644 --- a/rootly_sdk/models/new_retrospective_step_data_attributes.py +++ b/rootly_sdk/models/new_retrospective_step_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewRetrospectiveStepDataAttributes") diff --git a/rootly_sdk/models/new_role.py b/rootly_sdk/models/new_role.py index b16d90b7..ec5324cb 100644 --- a/rootly_sdk/models/new_role.py +++ b/rootly_sdk/models/new_role.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_role_data import NewRoleData @@ -28,7 +24,6 @@ class NewRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_role_data import NewRoleData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_role_data.py b/rootly_sdk/models/new_role_data.py index f25364db..f591f76f 100644 --- a/rootly_sdk/models/new_role_data.py +++ b/rootly_sdk/models/new_role_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_role_data_type import check_new_role_data_type -from ..models.new_role_data_type import NewRoleDataType -from typing import cast +from ..models.new_role_data_type import NewRoleDataType, check_new_role_data_type if TYPE_CHECKING: from ..models.new_role_data_attributes import NewRoleDataAttributes @@ -32,7 +28,6 @@ class NewRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_role_data_attributes import NewRoleDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_role_data_attributes.py b/rootly_sdk/models/new_role_data_attributes.py index 1e0152e5..db2e7aa3 100644 --- a/rootly_sdk/models/new_role_data_attributes.py +++ b/rootly_sdk/models/new_role_data_attributes.py @@ -1,178 +1,143 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.new_role_data_attributes_alerts_permissions_item import ( + NewRoleDataAttributesAlertsPermissionsItem, check_new_role_data_attributes_alerts_permissions_item, ) -from ..models.new_role_data_attributes_alerts_permissions_item import NewRoleDataAttributesAlertsPermissionsItem from ..models.new_role_data_attributes_api_keys_permissions_item import ( + NewRoleDataAttributesApiKeysPermissionsItem, check_new_role_data_attributes_api_keys_permissions_item, ) -from ..models.new_role_data_attributes_api_keys_permissions_item import NewRoleDataAttributesApiKeysPermissionsItem from ..models.new_role_data_attributes_audits_permissions_item import ( + NewRoleDataAttributesAuditsPermissionsItem, check_new_role_data_attributes_audits_permissions_item, ) -from ..models.new_role_data_attributes_audits_permissions_item import NewRoleDataAttributesAuditsPermissionsItem from ..models.new_role_data_attributes_billing_permissions_item import ( + NewRoleDataAttributesBillingPermissionsItem, check_new_role_data_attributes_billing_permissions_item, ) -from ..models.new_role_data_attributes_billing_permissions_item import NewRoleDataAttributesBillingPermissionsItem 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_catalogs_permissions_item import NewRoleDataAttributesCatalogsPermissionsItem -from ..models.new_role_data_attributes_communication_permissions_item import ( - check_new_role_data_attributes_communication_permissions_item, -) from ..models.new_role_data_attributes_communication_permissions_item import ( NewRoleDataAttributesCommunicationPermissionsItem, -) -from ..models.new_role_data_attributes_edge_connector_permissions_item import ( - check_new_role_data_attributes_edge_connector_permissions_item, + check_new_role_data_attributes_communication_permissions_item, ) from ..models.new_role_data_attributes_edge_connector_permissions_item import ( NewRoleDataAttributesEdgeConnectorPermissionsItem, -) -from ..models.new_role_data_attributes_environments_permissions_item import ( - check_new_role_data_attributes_environments_permissions_item, + check_new_role_data_attributes_edge_connector_permissions_item, ) from ..models.new_role_data_attributes_environments_permissions_item import ( NewRoleDataAttributesEnvironmentsPermissionsItem, -) -from ..models.new_role_data_attributes_form_fields_permissions_item import ( - check_new_role_data_attributes_form_fields_permissions_item, + check_new_role_data_attributes_environments_permissions_item, ) from ..models.new_role_data_attributes_form_fields_permissions_item import ( NewRoleDataAttributesFormFieldsPermissionsItem, -) -from ..models.new_role_data_attributes_functionalities_permissions_item import ( - check_new_role_data_attributes_functionalities_permissions_item, + check_new_role_data_attributes_form_fields_permissions_item, ) from ..models.new_role_data_attributes_functionalities_permissions_item import ( NewRoleDataAttributesFunctionalitiesPermissionsItem, + check_new_role_data_attributes_functionalities_permissions_item, ) from ..models.new_role_data_attributes_groups_permissions_item import ( + NewRoleDataAttributesGroupsPermissionsItem, check_new_role_data_attributes_groups_permissions_item, ) -from ..models.new_role_data_attributes_groups_permissions_item import NewRoleDataAttributesGroupsPermissionsItem -from ..models.new_role_data_attributes_incident_causes_permissions_item import ( - check_new_role_data_attributes_incident_causes_permissions_item, -) from ..models.new_role_data_attributes_incident_causes_permissions_item import ( NewRoleDataAttributesIncidentCausesPermissionsItem, -) -from ..models.new_role_data_attributes_incident_communication_permissions_item import ( - check_new_role_data_attributes_incident_communication_permissions_item, + check_new_role_data_attributes_incident_causes_permissions_item, ) from ..models.new_role_data_attributes_incident_communication_permissions_item import ( NewRoleDataAttributesIncidentCommunicationPermissionsItem, -) -from ..models.new_role_data_attributes_incident_feedbacks_permissions_item import ( - check_new_role_data_attributes_incident_feedbacks_permissions_item, + check_new_role_data_attributes_incident_communication_permissions_item, ) from ..models.new_role_data_attributes_incident_feedbacks_permissions_item import ( NewRoleDataAttributesIncidentFeedbacksPermissionsItem, -) -from ..models.new_role_data_attributes_incident_roles_permissions_item import ( - check_new_role_data_attributes_incident_roles_permissions_item, + check_new_role_data_attributes_incident_feedbacks_permissions_item, ) from ..models.new_role_data_attributes_incident_roles_permissions_item import ( NewRoleDataAttributesIncidentRolesPermissionsItem, -) -from ..models.new_role_data_attributes_incident_types_permissions_item import ( - check_new_role_data_attributes_incident_types_permissions_item, + check_new_role_data_attributes_incident_roles_permissions_item, ) from ..models.new_role_data_attributes_incident_types_permissions_item import ( NewRoleDataAttributesIncidentTypesPermissionsItem, + check_new_role_data_attributes_incident_types_permissions_item, ) from ..models.new_role_data_attributes_incidents_permissions_item import ( + NewRoleDataAttributesIncidentsPermissionsItem, check_new_role_data_attributes_incidents_permissions_item, ) -from ..models.new_role_data_attributes_incidents_permissions_item import NewRoleDataAttributesIncidentsPermissionsItem -from ..models.new_role_data_attributes_integrations_permissions_item import ( - check_new_role_data_attributes_integrations_permissions_item, -) from ..models.new_role_data_attributes_integrations_permissions_item import ( NewRoleDataAttributesIntegrationsPermissionsItem, -) -from ..models.new_role_data_attributes_invitations_permissions_item import ( - check_new_role_data_attributes_invitations_permissions_item, + check_new_role_data_attributes_integrations_permissions_item, ) from ..models.new_role_data_attributes_invitations_permissions_item import ( 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_paging_permissions_item import NewRoleDataAttributesPagingPermissionsItem from ..models.new_role_data_attributes_playbooks_permissions_item import ( + NewRoleDataAttributesPlaybooksPermissionsItem, check_new_role_data_attributes_playbooks_permissions_item, ) -from ..models.new_role_data_attributes_playbooks_permissions_item import NewRoleDataAttributesPlaybooksPermissionsItem -from ..models.new_role_data_attributes_private_incidents_permissions_item import ( - check_new_role_data_attributes_private_incidents_permissions_item, -) from ..models.new_role_data_attributes_private_incidents_permissions_item import ( NewRoleDataAttributesPrivateIncidentsPermissionsItem, + check_new_role_data_attributes_private_incidents_permissions_item, ) from ..models.new_role_data_attributes_pulses_permissions_item import ( + NewRoleDataAttributesPulsesPermissionsItem, check_new_role_data_attributes_pulses_permissions_item, ) -from ..models.new_role_data_attributes_pulses_permissions_item import NewRoleDataAttributesPulsesPermissionsItem -from ..models.new_role_data_attributes_retrospective_permissions_item import ( - check_new_role_data_attributes_retrospective_permissions_item, -) from ..models.new_role_data_attributes_retrospective_permissions_item import ( NewRoleDataAttributesRetrospectivePermissionsItem, + check_new_role_data_attributes_retrospective_permissions_item, ) from ..models.new_role_data_attributes_roles_permissions_item import ( + NewRoleDataAttributesRolesPermissionsItem, check_new_role_data_attributes_roles_permissions_item, ) -from ..models.new_role_data_attributes_roles_permissions_item import NewRoleDataAttributesRolesPermissionsItem from ..models.new_role_data_attributes_secrets_permissions_item import ( + NewRoleDataAttributesSecretsPermissionsItem, check_new_role_data_attributes_secrets_permissions_item, ) -from ..models.new_role_data_attributes_secrets_permissions_item import NewRoleDataAttributesSecretsPermissionsItem from ..models.new_role_data_attributes_services_permissions_item import ( + NewRoleDataAttributesServicesPermissionsItem, check_new_role_data_attributes_services_permissions_item, ) -from ..models.new_role_data_attributes_services_permissions_item import NewRoleDataAttributesServicesPermissionsItem from ..models.new_role_data_attributes_severities_permissions_item import ( + NewRoleDataAttributesSeveritiesPermissionsItem, check_new_role_data_attributes_severities_permissions_item, ) -from ..models.new_role_data_attributes_severities_permissions_item import NewRoleDataAttributesSeveritiesPermissionsItem -from ..models.new_role_data_attributes_slas_permissions_item import check_new_role_data_attributes_slas_permissions_item -from ..models.new_role_data_attributes_slas_permissions_item import NewRoleDataAttributesSlasPermissionsItem -from ..models.new_role_data_attributes_status_pages_permissions_item import ( - check_new_role_data_attributes_status_pages_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, -) -from ..models.new_role_data_attributes_sub_statuses_permissions_item import ( - check_new_role_data_attributes_sub_statuses_permissions_item, + 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, ) -from ..models.new_role_data_attributes_webhooks_permissions_item import NewRoleDataAttributesWebhooksPermissionsItem from ..models.new_role_data_attributes_workflows_permissions_item import ( + NewRoleDataAttributesWorkflowsPermissionsItem, check_new_role_data_attributes_workflows_permissions_item, ) -from ..models.new_role_data_attributes_workflows_permissions_item import NewRoleDataAttributesWorkflowsPermissionsItem from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewRoleDataAttributes") diff --git a/rootly_sdk/models/new_schedule.py b/rootly_sdk/models/new_schedule.py index 4b975b0d..b82c394e 100644 --- a/rootly_sdk/models/new_schedule.py +++ b/rootly_sdk/models/new_schedule.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_schedule_data import NewScheduleData @@ -28,7 +24,6 @@ class NewSchedule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_data import NewScheduleData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_schedule_data.py b/rootly_sdk/models/new_schedule_data.py index 0526a9f8..04b89e20 100644 --- a/rootly_sdk/models/new_schedule_data.py +++ b/rootly_sdk/models/new_schedule_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_schedule_data_type import check_new_schedule_data_type -from ..models.new_schedule_data_type import NewScheduleDataType -from typing import cast +from ..models.new_schedule_data_type import NewScheduleDataType, check_new_schedule_data_type if TYPE_CHECKING: from ..models.new_schedule_data_attributes import NewScheduleDataAttributes @@ -32,7 +28,6 @@ class NewScheduleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_data_attributes import NewScheduleDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_schedule_data_attributes.py b/rootly_sdk/models/new_schedule_data_attributes.py index da6811c8..9495aef6 100644 --- a/rootly_sdk/models/new_schedule_data_attributes.py +++ b/rootly_sdk/models/new_schedule_data_attributes.py @@ -1,19 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.new_schedule_data_attributes_shift_report_day_of_week import ( + NewScheduleDataAttributesShiftReportDayOfWeek, check_new_schedule_data_attributes_shift_report_day_of_week, ) -from ..models.new_schedule_data_attributes_shift_report_day_of_week import NewScheduleDataAttributesShiftReportDayOfWeek from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_schedule_data_attributes_slack_channel_type_0 import NewScheduleDataAttributesSlackChannelType0 @@ -68,7 +64,6 @@ class NewScheduleDataAttributes: shift_report_time_zone: None | str | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_data_attributes_slack_user_group import NewScheduleDataAttributesSlackUserGroup from ..models.new_schedule_data_attributes_slack_channel_type_0 import ( NewScheduleDataAttributesSlackChannelType0, ) 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 5748a3ca..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewScheduleDataAttributesSlackChannelType0") 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 e83db1bb..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewScheduleDataAttributesSlackUserGroup") diff --git a/rootly_sdk/models/new_schedule_rotation.py b/rootly_sdk/models/new_schedule_rotation.py index bc75487d..8aee39c4 100644 --- a/rootly_sdk/models/new_schedule_rotation.py +++ b/rootly_sdk/models/new_schedule_rotation.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_schedule_rotation_data import NewScheduleRotationData @@ -28,7 +24,6 @@ class NewScheduleRotation: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_rotation_data import NewScheduleRotationData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_schedule_rotation_active_day.py b/rootly_sdk/models/new_schedule_rotation_active_day.py index be9b2b8e..864d684e 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_schedule_rotation_active_day_data import NewScheduleRotationActiveDayData @@ -28,7 +24,6 @@ class NewScheduleRotationActiveDay: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_rotation_active_day_data import NewScheduleRotationActiveDayData data = self.data.to_dict() 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 f29790b0..50b7ea10 100644 --- a/rootly_sdk/models/new_schedule_rotation_active_day_data.py +++ b/rootly_sdk/models/new_schedule_rotation_active_day_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_schedule_rotation_active_day_data_type import check_new_schedule_rotation_active_day_data_type -from ..models.new_schedule_rotation_active_day_data_type import NewScheduleRotationActiveDayDataType -from typing import cast +from ..models.new_schedule_rotation_active_day_data_type import ( + NewScheduleRotationActiveDayDataType, + check_new_schedule_rotation_active_day_data_type, +) if TYPE_CHECKING: from ..models.new_schedule_rotation_active_day_data_attributes import NewScheduleRotationActiveDayDataAttributes @@ -32,7 +31,6 @@ class NewScheduleRotationActiveDayData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_rotation_active_day_data_attributes import NewScheduleRotationActiveDayDataAttributes type_: str = self.type_ 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 14a000d5..5c90b1da 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,20 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_schedule_rotation_active_day_data_attributes_day_name import ( - check_new_schedule_rotation_active_day_data_attributes_day_name, -) from ..models.new_schedule_rotation_active_day_data_attributes_day_name import ( NewScheduleRotationActiveDayDataAttributesDayName, + check_new_schedule_rotation_active_day_data_attributes_day_name, ) -from typing import cast if TYPE_CHECKING: from ..models.new_schedule_rotation_active_day_data_attributes_active_time_attributes_item import ( @@ -39,9 +33,6 @@ class NewScheduleRotationActiveDayDataAttributes: active_time_attributes: list[NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_rotation_active_day_data_attributes_active_time_attributes_item import ( - NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem, - ) 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 2f1bc597..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem") diff --git a/rootly_sdk/models/new_schedule_rotation_data.py b/rootly_sdk/models/new_schedule_rotation_data.py index fe46dcba..98a6852d 100644 --- a/rootly_sdk/models/new_schedule_rotation_data.py +++ b/rootly_sdk/models/new_schedule_rotation_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_schedule_rotation_data_type import check_new_schedule_rotation_data_type -from ..models.new_schedule_rotation_data_type import NewScheduleRotationDataType -from typing import cast +from ..models.new_schedule_rotation_data_type import NewScheduleRotationDataType, check_new_schedule_rotation_data_type if TYPE_CHECKING: from ..models.new_schedule_rotation_data_attributes import NewScheduleRotationDataAttributes @@ -32,7 +28,6 @@ class NewScheduleRotationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_rotation_data_attributes import NewScheduleRotationDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_schedule_rotation_data_attributes.py b/rootly_sdk/models/new_schedule_rotation_data_attributes.py index bff6c6fc..58de8732 100644 --- a/rootly_sdk/models/new_schedule_rotation_data_attributes.py +++ b/rootly_sdk/models/new_schedule_rotation_data_attributes.py @@ -1,29 +1,21 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 +from dateutil.parser import isoparse -from ..models.new_schedule_rotation_data_attributes_active_days_item import ( - check_new_schedule_rotation_data_attributes_active_days_item, -) from ..models.new_schedule_rotation_data_attributes_active_days_item import ( NewScheduleRotationDataAttributesActiveDaysItem, -) -from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_type import ( - check_new_schedule_rotation_data_attributes_schedule_rotationable_type, + check_new_schedule_rotation_data_attributes_active_days_item, ) from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_type import ( NewScheduleRotationDataAttributesScheduleRotationableType, + check_new_schedule_rotation_data_attributes_schedule_rotationable_type, ) from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime if TYPE_CHECKING: from ..models.new_schedule_rotation_data_attributes_active_time_attributes_item import ( @@ -98,18 +90,9 @@ def to_dict(self) -> dict[str, Any]: from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0 import ( NewScheduleRotationDataAttributesScheduleRotationableAttributesType0, ) - from ..models.new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item import ( - NewScheduleRotationDataAttributesScheduleRotationMembersType0Item, - ) - from ..models.new_schedule_rotation_data_attributes_active_time_attributes_item import ( - NewScheduleRotationDataAttributesActiveTimeAttributesItem, - ) from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1 import ( NewScheduleRotationDataAttributesScheduleRotationableAttributesType1, ) - from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3 import ( - NewScheduleRotationDataAttributesScheduleRotationableAttributesType3, - ) from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2 import ( NewScheduleRotationDataAttributesScheduleRotationableAttributesType2, ) 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 4bc97cca..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewScheduleRotationDataAttributesActiveTimeAttributesItem") 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 b861aadb..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type import ( - check_new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type, -) from ..models.new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type import ( NewScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType, + check_new_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewScheduleRotationDataAttributesScheduleRotationMembersType0Item") 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 82bfa7eb..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,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewScheduleRotationDataAttributesScheduleRotationableAttributesType0") 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 54ecf4e8..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day import ( - check_new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day, -) from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day import ( NewScheduleRotationDataAttributesScheduleRotationableAttributesType1HandoffDay, + check_new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day, ) -from typing import cast - T = TypeVar("T", bound="NewScheduleRotationDataAttributesScheduleRotationableAttributesType1") 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 9f020760..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day import ( - check_new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day, -) from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day import ( NewScheduleRotationDataAttributesScheduleRotationableAttributesType2HandoffDay, + check_new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day, ) -from typing import cast - T = TypeVar("T", bound="NewScheduleRotationDataAttributesScheduleRotationableAttributesType2") 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 fd599201..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit import ( - check_new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit, -) from ..models.new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit import ( NewScheduleRotationDataAttributesScheduleRotationableAttributesType3ShiftLengthUnit, + check_new_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit, ) -from typing import cast - T = TypeVar("T", bound="NewScheduleRotationDataAttributesScheduleRotationableAttributesType3") diff --git a/rootly_sdk/models/new_schedule_rotation_user.py b/rootly_sdk/models/new_schedule_rotation_user.py index ddc2efd1..a6ff2183 100644 --- a/rootly_sdk/models/new_schedule_rotation_user.py +++ b/rootly_sdk/models/new_schedule_rotation_user.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_schedule_rotation_user_data import NewScheduleRotationUserData @@ -29,7 +26,6 @@ class NewScheduleRotationUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_rotation_user_data import NewScheduleRotationUserData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/new_schedule_rotation_user_data.py b/rootly_sdk/models/new_schedule_rotation_user_data.py index c2ee1d6a..e7939952 100644 --- a/rootly_sdk/models/new_schedule_rotation_user_data.py +++ b/rootly_sdk/models/new_schedule_rotation_user_data.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.new_schedule_rotation_user_data_type import ( + NewScheduleRotationUserDataType, + check_new_schedule_rotation_user_data_type, +) from ..types import UNSET, Unset -from ..models.new_schedule_rotation_user_data_type import check_new_schedule_rotation_user_data_type -from ..models.new_schedule_rotation_user_data_type import NewScheduleRotationUserDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_schedule_rotation_user_data_attributes import NewScheduleRotationUserDataAttributes @@ -33,7 +32,6 @@ class NewScheduleRotationUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_schedule_rotation_user_data_attributes import NewScheduleRotationUserDataAttributes type_: str | Unset = UNSET if not isinstance(self.type_, Unset): 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 1526c1d6..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewScheduleRotationUserDataAttributes") diff --git a/rootly_sdk/models/new_secret.py b/rootly_sdk/models/new_secret.py index 191dae76..159467a5 100644 --- a/rootly_sdk/models/new_secret.py +++ b/rootly_sdk/models/new_secret.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_secret_data import NewSecretData @@ -28,7 +24,6 @@ class NewSecret: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_secret_data import NewSecretData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_secret_data.py b/rootly_sdk/models/new_secret_data.py index 697197b3..39ddaac2 100644 --- a/rootly_sdk/models/new_secret_data.py +++ b/rootly_sdk/models/new_secret_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_secret_data_type import check_new_secret_data_type -from ..models.new_secret_data_type import NewSecretDataType -from typing import cast +from ..models.new_secret_data_type import NewSecretDataType, check_new_secret_data_type if TYPE_CHECKING: from ..models.new_secret_data_attributes import NewSecretDataAttributes @@ -32,7 +28,6 @@ class NewSecretData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_secret_data_attributes import NewSecretDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_secret_data_attributes.py b/rootly_sdk/models/new_secret_data_attributes.py index f6cf4a08..53d1dd68 100644 --- a/rootly_sdk/models/new_secret_data_attributes.py +++ b/rootly_sdk/models/new_secret_data_attributes.py @@ -1,19 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_secret_data_attributes_kind import NewSecretDataAttributesKind, check_new_secret_data_attributes_kind from ..types import UNSET, Unset -from ..models.new_secret_data_attributes_kind import check_new_secret_data_attributes_kind -from ..models.new_secret_data_attributes_kind import NewSecretDataAttributesKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewSecretDataAttributes") diff --git a/rootly_sdk/models/new_service.py b/rootly_sdk/models/new_service.py index 116c856d..85709594 100644 --- a/rootly_sdk/models/new_service.py +++ b/rootly_sdk/models/new_service.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_service_data import NewServiceData @@ -28,7 +24,6 @@ class NewService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_service_data import NewServiceData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_service_data.py b/rootly_sdk/models/new_service_data.py index a40ea8f8..bfa03fd3 100644 --- a/rootly_sdk/models/new_service_data.py +++ b/rootly_sdk/models/new_service_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_service_data_type import check_new_service_data_type -from ..models.new_service_data_type import NewServiceDataType -from typing import cast +from ..models.new_service_data_type import NewServiceDataType, check_new_service_data_type if TYPE_CHECKING: from ..models.new_service_data_attributes import NewServiceDataAttributes @@ -32,7 +28,6 @@ class NewServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_service_data_attributes import NewServiceDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_service_data_attributes.py b/rootly_sdk/models/new_service_data_attributes.py index 2fbda657..2420ad46 100644 --- a/rootly_sdk/models/new_service_data_attributes.py +++ b/rootly_sdk/models/new_service_data_attributes.py @@ -1,19 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.new_service_data_attributes_show_uptime_last_days import ( + NewServiceDataAttributesShowUptimeLastDays, check_new_service_data_attributes_show_uptime_last_days, ) -from ..models.new_service_data_attributes_show_uptime_last_days import NewServiceDataAttributesShowUptimeLastDays from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_service_data_attributes_alert_broadcast_channel_type_0 import ( @@ -118,18 +114,11 @@ class NewServiceDataAttributes: properties: list[NewServiceDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_service_data_attributes_incident_broadcast_channel_type_0 import ( - NewServiceDataAttributesIncidentBroadcastChannelType0, - ) from ..models.new_service_data_attributes_alert_broadcast_channel_type_0 import ( NewServiceDataAttributesAlertBroadcastChannelType0, ) - from ..models.new_service_data_attributes_properties_item import NewServiceDataAttributesPropertiesItem - from ..models.new_service_data_attributes_slack_channels_type_0_item import ( - NewServiceDataAttributesSlackChannelsType0Item, - ) - from ..models.new_service_data_attributes_slack_aliases_type_0_item import ( - NewServiceDataAttributesSlackAliasesType0Item, + from ..models.new_service_data_attributes_incident_broadcast_channel_type_0 import ( + NewServiceDataAttributesIncidentBroadcastChannelType0, ) name = self.name 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 6a71612a..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewServiceDataAttributesAlertBroadcastChannelType0") 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 0133720b..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewServiceDataAttributesIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/new_service_data_attributes_properties_item.py b/rootly_sdk/models/new_service_data_attributes_properties_item.py index 36c464fc..3110be0d 100644 --- a/rootly_sdk/models/new_service_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_service_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewServiceDataAttributesPropertiesItem") 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 51c49388..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewServiceDataAttributesSlackAliasesType0Item") 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 b2e13da4..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewServiceDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_severity.py b/rootly_sdk/models/new_severity.py index e01e0d2b..261efd5e 100644 --- a/rootly_sdk/models/new_severity.py +++ b/rootly_sdk/models/new_severity.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_severity_data import NewSeverityData @@ -28,7 +24,6 @@ class NewSeverity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_severity_data import NewSeverityData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_severity_data.py b/rootly_sdk/models/new_severity_data.py index 39ea5dac..b34b5cd8 100644 --- a/rootly_sdk/models/new_severity_data.py +++ b/rootly_sdk/models/new_severity_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_severity_data_type import check_new_severity_data_type -from ..models.new_severity_data_type import NewSeverityDataType -from typing import cast +from ..models.new_severity_data_type import NewSeverityDataType, check_new_severity_data_type if TYPE_CHECKING: from ..models.new_severity_data_attributes import NewSeverityDataAttributes @@ -32,7 +28,6 @@ class NewSeverityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_severity_data_attributes import NewSeverityDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_severity_data_attributes.py b/rootly_sdk/models/new_severity_data_attributes.py index 5645af95..f90fa798 100644 --- a/rootly_sdk/models/new_severity_data_attributes.py +++ b/rootly_sdk/models/new_severity_data_attributes.py @@ -1,18 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_severity_data_attributes_severity import ( + NewSeverityDataAttributesSeverity, + check_new_severity_data_attributes_severity, +) from ..types import UNSET, Unset -from ..models.new_severity_data_attributes_severity import check_new_severity_data_attributes_severity -from ..models.new_severity_data_attributes_severity import NewSeverityDataAttributesSeverity -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_severity_data_attributes_slack_aliases_type_0_item import ( NewSeverityDataAttributesSlackAliasesType0Item, @@ -51,12 +49,6 @@ class NewSeverityDataAttributes: slack_aliases: list[NewSeverityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_severity_data_attributes_slack_aliases_type_0_item import ( - NewSeverityDataAttributesSlackAliasesType0Item, - ) - from ..models.new_severity_data_attributes_slack_channels_type_0_item import ( - NewSeverityDataAttributesSlackChannelsType0Item, - ) name = self.name 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 5dc7b42f..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewSeverityDataAttributesSlackAliasesType0Item") 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 476e0aa0..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewSeverityDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_shift_coverage_request.py b/rootly_sdk/models/new_shift_coverage_request.py index d0f8d0fb..310e914f 100644 --- a/rootly_sdk/models/new_shift_coverage_request.py +++ b/rootly_sdk/models/new_shift_coverage_request.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_shift_coverage_request_data import NewShiftCoverageRequestData @@ -28,7 +24,6 @@ class NewShiftCoverageRequest: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_shift_coverage_request_data import NewShiftCoverageRequestData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_shift_coverage_request_data.py b/rootly_sdk/models/new_shift_coverage_request_data.py index 58edc6f8..d5a821e9 100644 --- a/rootly_sdk/models/new_shift_coverage_request_data.py +++ b/rootly_sdk/models/new_shift_coverage_request_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_shift_coverage_request_data_type import check_new_shift_coverage_request_data_type -from ..models.new_shift_coverage_request_data_type import NewShiftCoverageRequestDataType -from typing import cast +from ..models.new_shift_coverage_request_data_type import ( + NewShiftCoverageRequestDataType, + check_new_shift_coverage_request_data_type, +) if TYPE_CHECKING: from ..models.new_shift_coverage_request_data_attributes import NewShiftCoverageRequestDataAttributes @@ -32,7 +31,6 @@ class NewShiftCoverageRequestData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_shift_coverage_request_data_attributes import NewShiftCoverageRequestDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_shift_coverage_request_data_attributes.py b/rootly_sdk/models/new_shift_coverage_request_data_attributes.py index 2223aa4a..f709df3b 100644 --- a/rootly_sdk/models/new_shift_coverage_request_data_attributes.py +++ b/rootly_sdk/models/new_shift_coverage_request_data_attributes.py @@ -1,18 +1,13 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +from ..types import UNSET, Unset T = TypeVar("T", bound="NewShiftCoverageRequestDataAttributes") diff --git a/rootly_sdk/models/new_sla.py b/rootly_sdk/models/new_sla.py index fde851f3..d7e331d4 100644 --- a/rootly_sdk/models/new_sla.py +++ b/rootly_sdk/models/new_sla.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_sla_data import NewSlaData @@ -28,7 +24,6 @@ class NewSla: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_sla_data import NewSlaData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_sla_data.py b/rootly_sdk/models/new_sla_data.py index d3d445e0..c1b1c15d 100644 --- a/rootly_sdk/models/new_sla_data.py +++ b/rootly_sdk/models/new_sla_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_sla_data_type import check_new_sla_data_type -from ..models.new_sla_data_type import NewSlaDataType -from typing import cast +from ..models.new_sla_data_type import NewSlaDataType, check_new_sla_data_type if TYPE_CHECKING: from ..models.new_sla_data_attributes import NewSlaDataAttributes @@ -32,7 +28,6 @@ class NewSlaData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_sla_data_attributes import NewSlaDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_sla_data_attributes.py b/rootly_sdk/models/new_sla_data_attributes.py index 76e55053..ad31ed6d 100644 --- a/rootly_sdk/models/new_sla_data_attributes.py +++ b/rootly_sdk/models/new_sla_data_attributes.py @@ -1,38 +1,32 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset 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_days import NewSlaDataAttributesAssignmentDeadlineDays -from ..models.new_sla_data_attributes_assignment_deadline_parent_status import ( - check_new_sla_data_attributes_assignment_deadline_parent_status, -) 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_days import NewSlaDataAttributesCompletionDeadlineDays 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_completion_deadline_parent_status import ( - NewSlaDataAttributesCompletionDeadlineParentStatus, +from ..models.new_sla_data_attributes_condition_match_type import ( + NewSlaDataAttributesConditionMatchType, + check_new_sla_data_attributes_condition_match_type, ) -from ..models.new_sla_data_attributes_condition_match_type import check_new_sla_data_attributes_condition_match_type -from ..models.new_sla_data_attributes_condition_match_type import NewSlaDataAttributesConditionMatchType from ..types import UNSET, Unset -from typing import cast -from uuid import UUID if TYPE_CHECKING: from ..models.new_sla_data_attributes_conditions_item import NewSlaDataAttributesConditionsItem @@ -94,10 +88,6 @@ class NewSlaDataAttributes: notification_configurations: list[NewSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_sla_data_attributes_conditions_item import NewSlaDataAttributesConditionsItem - from ..models.new_sla_data_attributes_notification_configurations_item import ( - NewSlaDataAttributesNotificationConfigurationsItem, - ) name = self.name diff --git a/rootly_sdk/models/new_sla_data_attributes_conditions_item.py b/rootly_sdk/models/new_sla_data_attributes_conditions_item.py index 9f2baa3e..12795ef1 100644 --- a/rootly_sdk/models/new_sla_data_attributes_conditions_item.py +++ b/rootly_sdk/models/new_sla_data_attributes_conditions_item.py @@ -1,27 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - -from ..models.new_sla_data_attributes_conditions_item_conditionable_type import ( - check_new_sla_data_attributes_conditions_item_conditionable_type, -) 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 ..models.new_sla_data_attributes_conditions_item_property import NewSlaDataAttributesConditionsItemProperty from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="NewSlaDataAttributesConditionsItem") 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 index a33a3e2b..33589513 100644 --- a/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item.py +++ b/rootly_sdk/models/new_sla_data_attributes_notification_configurations_item.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.new_sla_data_attributes_notification_configurations_item_offset_type import ( - check_new_sla_data_attributes_notification_configurations_item_offset_type, -) from ..models.new_sla_data_attributes_notification_configurations_item_offset_type import ( NewSlaDataAttributesNotificationConfigurationsItemOffsetType, + check_new_sla_data_attributes_notification_configurations_item_offset_type, ) -from typing import cast - T = TypeVar("T", bound="NewSlaDataAttributesNotificationConfigurationsItem") diff --git a/rootly_sdk/models/new_status_page.py b/rootly_sdk/models/new_status_page.py index 520f13f6..f3db92c7 100644 --- a/rootly_sdk/models/new_status_page.py +++ b/rootly_sdk/models/new_status_page.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_status_page_data import NewStatusPageData @@ -28,7 +24,6 @@ class NewStatusPage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_status_page_data import NewStatusPageData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_status_page_data.py b/rootly_sdk/models/new_status_page_data.py index dab69190..5d400e07 100644 --- a/rootly_sdk/models/new_status_page_data.py +++ b/rootly_sdk/models/new_status_page_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_status_page_data_type import check_new_status_page_data_type -from ..models.new_status_page_data_type import NewStatusPageDataType -from typing import cast +from ..models.new_status_page_data_type import NewStatusPageDataType, check_new_status_page_data_type if TYPE_CHECKING: from ..models.new_status_page_data_attributes import NewStatusPageDataAttributes @@ -32,7 +28,6 @@ class NewStatusPageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_status_page_data_attributes import NewStatusPageDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_status_page_data_attributes.py b/rootly_sdk/models/new_status_page_data_attributes.py index e227b185..a19825e4 100644 --- a/rootly_sdk/models/new_status_page_data_attributes.py +++ b/rootly_sdk/models/new_status_page_data_attributes.py @@ -1,38 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_status_page_data_attributes_authentication_method import ( - check_new_status_page_data_attributes_authentication_method, -) from ..models.new_status_page_data_attributes_authentication_method import ( NewStatusPageDataAttributesAuthenticationMethod, -) -from ..models.new_status_page_data_attributes_saml_name_identifier_format import ( - check_new_status_page_data_attributes_saml_name_identifier_format, + check_new_status_page_data_attributes_authentication_method, ) from ..models.new_status_page_data_attributes_saml_name_identifier_format import ( NewStatusPageDataAttributesSamlNameIdentifierFormat, -) -from ..models.new_status_page_data_attributes_section_order_type_0_item import ( - check_new_status_page_data_attributes_section_order_type_0_item, + 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, ) -from ..models.new_status_page_data_attributes_show_uptime_last_days import NewStatusPageDataAttributesShowUptimeLastDays from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewStatusPageDataAttributes") diff --git a/rootly_sdk/models/new_status_page_template.py b/rootly_sdk/models/new_status_page_template.py index 2a270353..be295a5d 100644 --- a/rootly_sdk/models/new_status_page_template.py +++ b/rootly_sdk/models/new_status_page_template.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_status_page_template_data import NewStatusPageTemplateData @@ -28,7 +24,6 @@ class NewStatusPageTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_status_page_template_data import NewStatusPageTemplateData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_status_page_template_data.py b/rootly_sdk/models/new_status_page_template_data.py index 23472878..a5f25d1c 100644 --- a/rootly_sdk/models/new_status_page_template_data.py +++ b/rootly_sdk/models/new_status_page_template_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_status_page_template_data_type import check_new_status_page_template_data_type -from ..models.new_status_page_template_data_type import NewStatusPageTemplateDataType -from typing import cast +from ..models.new_status_page_template_data_type import ( + NewStatusPageTemplateDataType, + check_new_status_page_template_data_type, +) if TYPE_CHECKING: from ..models.new_status_page_template_data_attributes import NewStatusPageTemplateDataAttributes @@ -32,7 +31,6 @@ class NewStatusPageTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_status_page_template_data_attributes import NewStatusPageTemplateDataAttributes type_: str = self.type_ 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 4e5d037a..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,24 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_status_page_template_data_attributes_kind import check_new_status_page_template_data_attributes_kind -from ..models.new_status_page_template_data_attributes_kind import NewStatusPageTemplateDataAttributesKind -from ..models.new_status_page_template_data_attributes_update_status import ( - check_new_status_page_template_data_attributes_update_status, +from ..models.new_status_page_template_data_attributes_kind import ( + NewStatusPageTemplateDataAttributesKind, + check_new_status_page_template_data_attributes_kind, ) from ..models.new_status_page_template_data_attributes_update_status import ( NewStatusPageTemplateDataAttributesUpdateStatus, + check_new_status_page_template_data_attributes_update_status, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewStatusPageTemplateDataAttributes") diff --git a/rootly_sdk/models/new_sub_status.py b/rootly_sdk/models/new_sub_status.py index 797d2276..02753d5a 100644 --- a/rootly_sdk/models/new_sub_status.py +++ b/rootly_sdk/models/new_sub_status.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_sub_status_data import NewSubStatusData @@ -28,7 +24,6 @@ class NewSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_sub_status_data import NewSubStatusData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_sub_status_data.py b/rootly_sdk/models/new_sub_status_data.py index 8400bcad..fb4d42e9 100644 --- a/rootly_sdk/models/new_sub_status_data.py +++ b/rootly_sdk/models/new_sub_status_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_sub_status_data_type import check_new_sub_status_data_type -from ..models.new_sub_status_data_type import NewSubStatusDataType -from typing import cast +from ..models.new_sub_status_data_type import NewSubStatusDataType, check_new_sub_status_data_type if TYPE_CHECKING: from ..models.new_sub_status_data_attributes import NewSubStatusDataAttributes @@ -32,7 +28,6 @@ class NewSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_sub_status_data_attributes import NewSubStatusDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_sub_status_data_attributes.py b/rootly_sdk/models/new_sub_status_data_attributes.py index 40b4b1d6..c228516b 100644 --- a/rootly_sdk/models/new_sub_status_data_attributes.py +++ b/rootly_sdk/models/new_sub_status_data_attributes.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_sub_status_data_attributes_parent_status import ( + NewSubStatusDataAttributesParentStatus, + check_new_sub_status_data_attributes_parent_status, +) from ..types import UNSET, Unset -from ..models.new_sub_status_data_attributes_parent_status import check_new_sub_status_data_attributes_parent_status -from ..models.new_sub_status_data_attributes_parent_status import NewSubStatusDataAttributesParentStatus -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewSubStatusDataAttributes") diff --git a/rootly_sdk/models/new_team.py b/rootly_sdk/models/new_team.py index dcc66912..cf16853b 100644 --- a/rootly_sdk/models/new_team.py +++ b/rootly_sdk/models/new_team.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_team_data import NewTeamData @@ -28,7 +24,6 @@ class NewTeam: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_team_data import NewTeamData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_team_data.py b/rootly_sdk/models/new_team_data.py index 0573ce7c..91f45014 100644 --- a/rootly_sdk/models/new_team_data.py +++ b/rootly_sdk/models/new_team_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_team_data_type import check_new_team_data_type -from ..models.new_team_data_type import NewTeamDataType -from typing import cast +from ..models.new_team_data_type import NewTeamDataType, check_new_team_data_type if TYPE_CHECKING: from ..models.new_team_data_attributes import NewTeamDataAttributes @@ -32,7 +28,6 @@ class NewTeamData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_team_data_attributes import NewTeamDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_team_data_attributes.py b/rootly_sdk/models/new_team_data_attributes.py index 82829f1f..a05a78f5 100644 --- a/rootly_sdk/models/new_team_data_attributes.py +++ b/rootly_sdk/models/new_team_data_attributes.py @@ -1,19 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.new_team_data_attributes_auto_add_members_scope import ( + NewTeamDataAttributesAutoAddMembersScope, check_new_team_data_attributes_auto_add_members_scope, ) -from ..models.new_team_data_attributes_auto_add_members_scope import NewTeamDataAttributesAutoAddMembersScope from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_team_data_attributes_alert_broadcast_channel_type_0 import ( @@ -105,16 +101,9 @@ def to_dict(self) -> dict[str, Any]: from ..models.new_team_data_attributes_alert_broadcast_channel_type_0 import ( NewTeamDataAttributesAlertBroadcastChannelType0, ) - 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_incident_broadcast_channel_type_0 import ( NewTeamDataAttributesIncidentBroadcastChannelType0, ) - from ..models.new_team_data_attributes_slack_channels_type_0_item import ( - NewTeamDataAttributesSlackChannelsType0Item, - ) name = self.name 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 ec2f9065..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewTeamDataAttributesAlertBroadcastChannelType0") 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 9c022472..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="NewTeamDataAttributesIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/new_team_data_attributes_properties_item.py b/rootly_sdk/models/new_team_data_attributes_properties_item.py index a99fc513..ec6700ba 100644 --- a/rootly_sdk/models/new_team_data_attributes_properties_item.py +++ b/rootly_sdk/models/new_team_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewTeamDataAttributesPropertiesItem") 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 48d219c8..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewTeamDataAttributesSlackAliasesType0Item") 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 0d6de2f4..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewTeamDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/new_user_email_address.py b/rootly_sdk/models/new_user_email_address.py index 36d94d7b..44365818 100644 --- a/rootly_sdk/models/new_user_email_address.py +++ b/rootly_sdk/models/new_user_email_address.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_user_email_address_data import NewUserEmailAddressData @@ -28,7 +24,6 @@ class NewUserEmailAddress: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_user_email_address_data import NewUserEmailAddressData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_user_email_address_data.py b/rootly_sdk/models/new_user_email_address_data.py index 843ecde6..39826d81 100644 --- a/rootly_sdk/models/new_user_email_address_data.py +++ b/rootly_sdk/models/new_user_email_address_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_user_email_address_data_type import check_new_user_email_address_data_type -from ..models.new_user_email_address_data_type import NewUserEmailAddressDataType -from typing import cast +from ..models.new_user_email_address_data_type import ( + NewUserEmailAddressDataType, + check_new_user_email_address_data_type, +) if TYPE_CHECKING: from ..models.new_user_email_address_data_attributes import NewUserEmailAddressDataAttributes @@ -32,7 +31,6 @@ class NewUserEmailAddressData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_user_email_address_data_attributes import NewUserEmailAddressDataAttributes type_: str = self.type_ 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 2be98c91..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,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewUserEmailAddressDataAttributes") diff --git a/rootly_sdk/models/new_user_notification_rule.py b/rootly_sdk/models/new_user_notification_rule.py index e2b40ef6..87bbb9bb 100644 --- a/rootly_sdk/models/new_user_notification_rule.py +++ b/rootly_sdk/models/new_user_notification_rule.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_user_notification_rule_data import NewUserNotificationRuleData @@ -28,7 +24,6 @@ class NewUserNotificationRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_user_notification_rule_data import NewUserNotificationRuleData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_user_notification_rule_data.py b/rootly_sdk/models/new_user_notification_rule_data.py index 1f2a1cb9..0fd914eb 100644 --- a/rootly_sdk/models/new_user_notification_rule_data.py +++ b/rootly_sdk/models/new_user_notification_rule_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_user_notification_rule_data_type import check_new_user_notification_rule_data_type -from ..models.new_user_notification_rule_data_type import NewUserNotificationRuleDataType -from typing import cast +from ..models.new_user_notification_rule_data_type import ( + NewUserNotificationRuleDataType, + check_new_user_notification_rule_data_type, +) if TYPE_CHECKING: from ..models.new_user_notification_rule_data_attributes import NewUserNotificationRuleDataAttributes @@ -32,7 +31,6 @@ class NewUserNotificationRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_user_notification_rule_data_attributes import NewUserNotificationRuleDataAttributes type_: str = self.type_ 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 0f6ede4d..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,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.new_user_notification_rule_data_attributes_enabled_contact_types_item import ( - check_new_user_notification_rule_data_attributes_enabled_contact_types_item, -) from ..models.new_user_notification_rule_data_attributes_enabled_contact_types_item import ( NewUserNotificationRuleDataAttributesEnabledContactTypesItem, + check_new_user_notification_rule_data_attributes_enabled_contact_types_item, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewUserNotificationRuleDataAttributes") diff --git a/rootly_sdk/models/new_user_phone_number.py b/rootly_sdk/models/new_user_phone_number.py index 141ad15e..77d68eb2 100644 --- a/rootly_sdk/models/new_user_phone_number.py +++ b/rootly_sdk/models/new_user_phone_number.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_user_phone_number_data import NewUserPhoneNumberData @@ -28,7 +24,6 @@ class NewUserPhoneNumber: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_user_phone_number_data import NewUserPhoneNumberData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_user_phone_number_data.py b/rootly_sdk/models/new_user_phone_number_data.py index bf7ea950..e5bb6a12 100644 --- a/rootly_sdk/models/new_user_phone_number_data.py +++ b/rootly_sdk/models/new_user_phone_number_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_user_phone_number_data_type import check_new_user_phone_number_data_type -from ..models.new_user_phone_number_data_type import NewUserPhoneNumberDataType -from typing import cast +from ..models.new_user_phone_number_data_type import NewUserPhoneNumberDataType, check_new_user_phone_number_data_type if TYPE_CHECKING: from ..models.new_user_phone_number_data_attributes import NewUserPhoneNumberDataAttributes @@ -32,7 +28,6 @@ class NewUserPhoneNumberData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_user_phone_number_data_attributes import NewUserPhoneNumberDataAttributes type_: str = self.type_ 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 45221541..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,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewUserPhoneNumberDataAttributes") diff --git a/rootly_sdk/models/new_webhooks_endpoint.py b/rootly_sdk/models/new_webhooks_endpoint.py index 17fb59b5..086d10ce 100644 --- a/rootly_sdk/models/new_webhooks_endpoint.py +++ b/rootly_sdk/models/new_webhooks_endpoint.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_webhooks_endpoint_data import NewWebhooksEndpointData @@ -28,7 +24,6 @@ class NewWebhooksEndpoint: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_webhooks_endpoint_data import NewWebhooksEndpointData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_webhooks_endpoint_data.py b/rootly_sdk/models/new_webhooks_endpoint_data.py index 6e4b76ea..08c54004 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_webhooks_endpoint_data_type import check_new_webhooks_endpoint_data_type -from ..models.new_webhooks_endpoint_data_type import NewWebhooksEndpointDataType -from typing import cast +from ..models.new_webhooks_endpoint_data_type import NewWebhooksEndpointDataType, check_new_webhooks_endpoint_data_type if TYPE_CHECKING: from ..models.new_webhooks_endpoint_data_attributes import NewWebhooksEndpointDataAttributes @@ -32,7 +28,6 @@ class NewWebhooksEndpointData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_webhooks_endpoint_data_attributes import NewWebhooksEndpointDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py b/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py index 22b036a3..ee615dde 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data_attributes.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_webhooks_endpoint_data_attributes_event_types_item import ( - check_new_webhooks_endpoint_data_attributes_event_types_item, -) from ..models.new_webhooks_endpoint_data_attributes_event_types_item import ( NewWebhooksEndpointDataAttributesEventTypesItem, + check_new_webhooks_endpoint_data_attributes_event_types_item, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.new_webhooks_endpoint_data_attributes_custom_headers_item import ( @@ -47,9 +41,6 @@ class NewWebhooksEndpointDataAttributes: custom_headers: list[NewWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.new_webhooks_endpoint_data_attributes_custom_headers_item import ( - NewWebhooksEndpointDataAttributesCustomHeadersItem, - ) name = self.name diff --git a/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py index 6bfa854b..3ffe6bda 100644 --- a/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py +++ b/rootly_sdk/models/new_webhooks_endpoint_data_attributes_custom_headers_item.py @@ -1,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewWebhooksEndpointDataAttributesCustomHeadersItem") diff --git a/rootly_sdk/models/new_workflow.py b/rootly_sdk/models/new_workflow.py index 0d9230b3..e499f14c 100644 --- a/rootly_sdk/models/new_workflow.py +++ b/rootly_sdk/models/new_workflow.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_data import NewWorkflowData @@ -28,7 +24,6 @@ class NewWorkflow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_data import NewWorkflowData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition.py index 7f855c82..9033a121 100644 --- a/rootly_sdk/models/new_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_action_item_form_field_condition_data import NewWorkflowActionItemFormFieldConditionData @@ -28,9 +24,6 @@ class NewWorkflowActionItemFormFieldCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_action_item_form_field_condition_data import ( - NewWorkflowActionItemFormFieldConditionData, - ) data = self.data.to_dict() diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py index 167eae34..5fc82e95 100644 --- a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_workflow_action_item_form_field_condition_data_type import ( - check_new_workflow_action_item_form_field_condition_data_type, -) from ..models.new_workflow_action_item_form_field_condition_data_type import ( NewWorkflowActionItemFormFieldConditionDataType, + check_new_workflow_action_item_form_field_condition_data_type, ) -from typing import cast if TYPE_CHECKING: from ..models.new_workflow_action_item_form_field_condition_data_attributes import ( @@ -38,9 +33,6 @@ class NewWorkflowActionItemFormFieldConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_action_item_form_field_condition_data_attributes import ( - NewWorkflowActionItemFormFieldConditionDataAttributes, - ) type_: str = self.type_ diff --git a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py index 2aadf0fe..9e6b01df 100644 --- a/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py +++ b/rootly_sdk/models/new_workflow_action_item_form_field_condition_data_attributes.py @@ -1,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.new_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( - check_new_workflow_action_item_form_field_condition_data_attributes_action_item_condition, -) from ..models.new_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( NewWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, + check_new_workflow_action_item_form_field_condition_data_attributes_action_item_condition, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewWorkflowActionItemFormFieldConditionDataAttributes") diff --git a/rootly_sdk/models/new_workflow_custom_field_selection.py b/rootly_sdk/models/new_workflow_custom_field_selection.py index 272327b7..975e1d93 100644 --- a/rootly_sdk/models/new_workflow_custom_field_selection.py +++ b/rootly_sdk/models/new_workflow_custom_field_selection.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_custom_field_selection_data import NewWorkflowCustomFieldSelectionData @@ -28,7 +24,6 @@ class NewWorkflowCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_custom_field_selection_data import NewWorkflowCustomFieldSelectionData data = self.data.to_dict() 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 0b15d793..7a299699 100644 --- a/rootly_sdk/models/new_workflow_custom_field_selection_data.py +++ b/rootly_sdk/models/new_workflow_custom_field_selection_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_workflow_custom_field_selection_data_type import check_new_workflow_custom_field_selection_data_type -from ..models.new_workflow_custom_field_selection_data_type import NewWorkflowCustomFieldSelectionDataType -from typing import cast +from ..models.new_workflow_custom_field_selection_data_type import ( + NewWorkflowCustomFieldSelectionDataType, + check_new_workflow_custom_field_selection_data_type, +) if TYPE_CHECKING: from ..models.new_workflow_custom_field_selection_data_attributes import ( @@ -34,9 +33,6 @@ class NewWorkflowCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_custom_field_selection_data_attributes import ( - NewWorkflowCustomFieldSelectionDataAttributes, - ) type_: str = self.type_ 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 3fcbd407..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,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.new_workflow_custom_field_selection_data_attributes_incident_condition import ( - check_new_workflow_custom_field_selection_data_attributes_incident_condition, -) from ..models.new_workflow_custom_field_selection_data_attributes_incident_condition import ( NewWorkflowCustomFieldSelectionDataAttributesIncidentCondition, + check_new_workflow_custom_field_selection_data_attributes_incident_condition, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewWorkflowCustomFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/new_workflow_data.py b/rootly_sdk/models/new_workflow_data.py index 0d1f19c7..3cf1a8d0 100644 --- a/rootly_sdk/models/new_workflow_data.py +++ b/rootly_sdk/models/new_workflow_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_workflow_data_type import check_new_workflow_data_type -from ..models.new_workflow_data_type import NewWorkflowDataType -from typing import cast +from ..models.new_workflow_data_type import NewWorkflowDataType, check_new_workflow_data_type if TYPE_CHECKING: from ..models.new_workflow_data_attributes import NewWorkflowDataAttributes @@ -32,7 +28,6 @@ class NewWorkflowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_data_attributes import NewWorkflowDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_workflow_data_attributes.py b/rootly_sdk/models/new_workflow_data_attributes.py index 4b44dda6..8badb4d0 100644 --- a/rootly_sdk/models/new_workflow_data_attributes.py +++ b/rootly_sdk/models/new_workflow_data_attributes.py @@ -1,20 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.new_workflow_data_attributes_priority import ( + NewWorkflowDataAttributesPriority, + check_new_workflow_data_attributes_priority, +) +from ..models.new_workflow_data_attributes_repeat_on_item import ( + NewWorkflowDataAttributesRepeatOnItem, + check_new_workflow_data_attributes_repeat_on_item, +) from ..types import UNSET, Unset -from ..models.new_workflow_data_attributes_priority import check_new_workflow_data_attributes_priority -from ..models.new_workflow_data_attributes_priority import NewWorkflowDataAttributesPriority -from ..models.new_workflow_data_attributes_repeat_on_item import check_new_workflow_data_attributes_repeat_on_item -from ..models.new_workflow_data_attributes_repeat_on_item import NewWorkflowDataAttributesRepeatOnItem -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.action_item_trigger_params import ActionItemTriggerParams from ..models.alert_trigger_params import AlertTriggerParams @@ -96,10 +96,9 @@ class NewWorkflowDataAttributes: sub_status_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.simple_trigger_params import SimpleTriggerParams - from ..models.incident_trigger_params import IncidentTriggerParams - from ..models.alert_trigger_params import AlertTriggerParams from ..models.action_item_trigger_params import ActionItemTriggerParams + from ..models.alert_trigger_params import AlertTriggerParams + from ..models.incident_trigger_params import IncidentTriggerParams from ..models.pulse_trigger_params import PulseTriggerParams name = self.name diff --git a/rootly_sdk/models/new_workflow_form_field_condition.py b/rootly_sdk/models/new_workflow_form_field_condition.py index 246aea42..ac32f11d 100644 --- a/rootly_sdk/models/new_workflow_form_field_condition.py +++ b/rootly_sdk/models/new_workflow_form_field_condition.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_form_field_condition_data import NewWorkflowFormFieldConditionData @@ -28,7 +24,6 @@ class NewWorkflowFormFieldCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_form_field_condition_data import NewWorkflowFormFieldConditionData data = self.data.to_dict() 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 9d78b65a..ccbc5b02 100644 --- a/rootly_sdk/models/new_workflow_form_field_condition_data.py +++ b/rootly_sdk/models/new_workflow_form_field_condition_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_workflow_form_field_condition_data_type import check_new_workflow_form_field_condition_data_type -from ..models.new_workflow_form_field_condition_data_type import NewWorkflowFormFieldConditionDataType -from typing import cast +from ..models.new_workflow_form_field_condition_data_type import ( + NewWorkflowFormFieldConditionDataType, + check_new_workflow_form_field_condition_data_type, +) if TYPE_CHECKING: from ..models.new_workflow_form_field_condition_data_attributes import NewWorkflowFormFieldConditionDataAttributes @@ -32,9 +31,6 @@ class NewWorkflowFormFieldConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_form_field_condition_data_attributes import ( - NewWorkflowFormFieldConditionDataAttributes, - ) type_: str = self.type_ 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 c7e12f93..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,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.new_workflow_form_field_condition_data_attributes_incident_condition import ( - check_new_workflow_form_field_condition_data_attributes_incident_condition, -) from ..models.new_workflow_form_field_condition_data_attributes_incident_condition import ( NewWorkflowFormFieldConditionDataAttributesIncidentCondition, + check_new_workflow_form_field_condition_data_attributes_incident_condition, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="NewWorkflowFormFieldConditionDataAttributes") diff --git a/rootly_sdk/models/new_workflow_group.py b/rootly_sdk/models/new_workflow_group.py index cd958860..cbe30f10 100644 --- a/rootly_sdk/models/new_workflow_group.py +++ b/rootly_sdk/models/new_workflow_group.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_group_data import NewWorkflowGroupData @@ -28,7 +24,6 @@ class NewWorkflowGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_group_data import NewWorkflowGroupData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_workflow_group_data.py b/rootly_sdk/models/new_workflow_group_data.py index 7b39860b..00fab324 100644 --- a/rootly_sdk/models/new_workflow_group_data.py +++ b/rootly_sdk/models/new_workflow_group_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_workflow_group_data_type import check_new_workflow_group_data_type -from ..models.new_workflow_group_data_type import NewWorkflowGroupDataType -from typing import cast +from ..models.new_workflow_group_data_type import NewWorkflowGroupDataType, check_new_workflow_group_data_type if TYPE_CHECKING: from ..models.new_workflow_group_data_attributes import NewWorkflowGroupDataAttributes @@ -32,7 +28,6 @@ class NewWorkflowGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_group_data_attributes import NewWorkflowGroupDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_workflow_group_data_attributes.py b/rootly_sdk/models/new_workflow_group_data_attributes.py index 4147dde2..29d5a22d 100644 --- a/rootly_sdk/models/new_workflow_group_data_attributes.py +++ b/rootly_sdk/models/new_workflow_group_data_attributes.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.new_workflow_group_data_attributes_kind import ( + NewWorkflowGroupDataAttributesKind, + check_new_workflow_group_data_attributes_kind, +) from ..types import UNSET, Unset -from ..models.new_workflow_group_data_attributes_kind import check_new_workflow_group_data_attributes_kind -from ..models.new_workflow_group_data_attributes_kind import NewWorkflowGroupDataAttributesKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="NewWorkflowGroupDataAttributes") diff --git a/rootly_sdk/models/new_workflow_run.py b/rootly_sdk/models/new_workflow_run.py index 5e1c238b..489e4c89 100644 --- a/rootly_sdk/models/new_workflow_run.py +++ b/rootly_sdk/models/new_workflow_run.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_run_data import NewWorkflowRunData @@ -28,7 +24,6 @@ class NewWorkflowRun: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_run_data import NewWorkflowRunData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_workflow_run_data.py b/rootly_sdk/models/new_workflow_run_data.py index fcd124bb..6f30cb5c 100644 --- a/rootly_sdk/models/new_workflow_run_data.py +++ b/rootly_sdk/models/new_workflow_run_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_workflow_run_data_type import check_new_workflow_run_data_type -from ..models.new_workflow_run_data_type import NewWorkflowRunDataType -from typing import cast +from ..models.new_workflow_run_data_type import NewWorkflowRunDataType, check_new_workflow_run_data_type if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_0 import NewWorkflowRunDataAttributesType0 @@ -46,12 +42,11 @@ class NewWorkflowRunData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_run_data_attributes_type_4 import NewWorkflowRunDataAttributesType4 - from ..models.new_workflow_run_data_attributes_type_2 import NewWorkflowRunDataAttributesType2 - from ..models.new_workflow_run_data_attributes_type_1 import NewWorkflowRunDataAttributesType1 from ..models.new_workflow_run_data_attributes_type_0 import NewWorkflowRunDataAttributesType0 - from ..models.new_workflow_run_data_attributes_type_5 import NewWorkflowRunDataAttributesType5 + from ..models.new_workflow_run_data_attributes_type_1 import NewWorkflowRunDataAttributesType1 + from ..models.new_workflow_run_data_attributes_type_2 import NewWorkflowRunDataAttributesType2 from ..models.new_workflow_run_data_attributes_type_3 import NewWorkflowRunDataAttributesType3 + from ..models.new_workflow_run_data_attributes_type_4 import NewWorkflowRunDataAttributesType4 type_: str = self.type_ 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 11406258..75346b25 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_0_context import NewWorkflowRunDataAttributesType0Context @@ -35,7 +32,6 @@ class NewWorkflowRunDataAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_run_data_attributes_type_0_context import NewWorkflowRunDataAttributesType0Context immediate: bool | None | Unset if isinstance(self.immediate, Unset): 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 cd409813..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewWorkflowRunDataAttributesType0Context") 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 ab90d2d9..9bc7f2a1 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_1_context import NewWorkflowRunDataAttributesType1Context @@ -36,7 +33,6 @@ class NewWorkflowRunDataAttributesType1: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_run_data_attributes_type_1_context import NewWorkflowRunDataAttributesType1Context incident_id = self.incident_id 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 5d420a30..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewWorkflowRunDataAttributesType1Context") 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 697bbe0f..7e8c4507 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_2_context import NewWorkflowRunDataAttributesType2Context @@ -36,7 +33,6 @@ class NewWorkflowRunDataAttributesType2: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_run_data_attributes_type_2_context import NewWorkflowRunDataAttributesType2Context post_mortem_id = self.post_mortem_id 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 2b3f37e7..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewWorkflowRunDataAttributesType2Context") 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 d4b09166..4b82e605 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_3_context import NewWorkflowRunDataAttributesType3Context @@ -36,7 +33,6 @@ class NewWorkflowRunDataAttributesType3: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_run_data_attributes_type_3_context import NewWorkflowRunDataAttributesType3Context action_item_id = self.action_item_id 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 4b152c07..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewWorkflowRunDataAttributesType3Context") 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 05454f18..b55b35af 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_4_context import NewWorkflowRunDataAttributesType4Context @@ -36,7 +33,6 @@ class NewWorkflowRunDataAttributesType4: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_run_data_attributes_type_4_context import NewWorkflowRunDataAttributesType4Context alert_id = self.alert_id 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 efc24594..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewWorkflowRunDataAttributesType4Context") 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 89435782..797c45f2 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_run_data_attributes_type_5_context import NewWorkflowRunDataAttributesType5Context @@ -36,7 +33,6 @@ class NewWorkflowRunDataAttributesType5: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_run_data_attributes_type_5_context import NewWorkflowRunDataAttributesType5Context pulse_id = self.pulse_id 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 feddc784..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="NewWorkflowRunDataAttributesType5Context") diff --git a/rootly_sdk/models/new_workflow_task.py b/rootly_sdk/models/new_workflow_task.py index a70f46be..0e065727 100644 --- a/rootly_sdk/models/new_workflow_task.py +++ b/rootly_sdk/models/new_workflow_task.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.new_workflow_task_data import NewWorkflowTaskData @@ -28,7 +24,6 @@ class NewWorkflowTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_task_data import NewWorkflowTaskData data = self.data.to_dict() diff --git a/rootly_sdk/models/new_workflow_task_data.py b/rootly_sdk/models/new_workflow_task_data.py index ee7bf083..eab5be62 100644 --- a/rootly_sdk/models/new_workflow_task_data.py +++ b/rootly_sdk/models/new_workflow_task_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.new_workflow_task_data_type import check_new_workflow_task_data_type -from ..models.new_workflow_task_data_type import NewWorkflowTaskDataType -from typing import cast +from ..models.new_workflow_task_data_type import NewWorkflowTaskDataType, check_new_workflow_task_data_type if TYPE_CHECKING: from ..models.new_workflow_task_data_attributes import NewWorkflowTaskDataAttributes @@ -32,7 +28,6 @@ class NewWorkflowTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.new_workflow_task_data_attributes import NewWorkflowTaskDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/new_workflow_task_data_attributes.py b/rootly_sdk/models/new_workflow_task_data_attributes.py index 020a24f1..a38f85cc 100644 --- a/rootly_sdk/models/new_workflow_task_data_attributes.py +++ b/rootly_sdk/models/new_workflow_task_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams @@ -424,179 +420,178 @@ class NewWorkflowTaskDataAttributes: enabled: bool | Unset = True def to_dict(self) -> dict[str, Any]: - from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 - from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams + from ..models.add_action_item_task_params import AddActionItemTaskParams + from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 - from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams - from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams - from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams - from ..models.create_notion_page_task_params import CreateNotionPageTaskParams - from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 - from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( - InviteToMicrosoftTeamsChannelRootlyTaskParams, - ) - from ..models.create_confluence_page_task_params import CreateConfluencePageTaskParams - from ..models.send_sms_task_params import SendSmsTaskParams - from ..models.call_people_task_params import CallPeopleTaskParams - from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams - from ..models.create_incident_task_params import CreateIncidentTaskParams - from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams - from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 - from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 - from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 - from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams - from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams - from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams + from ..models.add_role_task_params import AddRoleTaskParams from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 - from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams - from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams - from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams - from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams - from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams - from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams - from ..models.get_pulses_task_params import GetPulsesTaskParams - from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams - from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams - from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams - from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams - from ..models.publish_incident_task_params import PublishIncidentTaskParams - from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams - from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams - from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams - from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 - from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams - from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 + from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams - from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams - from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams - from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams + from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams - from ..models.update_incident_task_params import UpdateIncidentTaskParams - from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams - from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams - from ..models.get_alerts_task_params import GetAlertsTaskParams - from ..models.add_team_task_params import AddTeamTaskParams - from ..models.update_status_task_params import UpdateStatusTaskParams - from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams - from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 - from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 - from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 - from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams - from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams + from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( AttachRetrospectivePdfToJiraIssueTaskParams, ) - from ..models.redis_client_task_params import RedisClientTaskParams - from ..models.add_action_item_task_params import AddActionItemTaskParams - from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams - from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 - from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 + from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams + from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams + from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams + from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams + from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams + from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams + from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams + from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams + from ..models.create_coda_page_task_params import CreateCodaPageTaskParams + from ..models.create_confluence_page_task_params import CreateConfluencePageTaskParams + from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams + from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams + from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams + from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams + from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams + from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams + from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams + from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams - from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 - from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams - from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 - from ..models.http_client_task_params import HttpClientTaskParams - from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams from ..models.create_google_meeting_task_params import CreateGoogleMeetingTaskParams + from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams + from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams - from ..models.update_asana_task_task_params import UpdateAsanaTaskTaskParams - from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams + 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 + from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams + from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams + from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams + from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams + from ..models.create_motion_task_task_params import CreateMotionTaskTaskParams + from ..models.create_notion_page_task_params import CreateNotionPageTaskParams + from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams + from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams + from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams + from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams + from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams + from ..models.create_quip_page_task_params import CreateQuipPageTaskParams + from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams + from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 + from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams + from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams + from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams + from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams + from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams + from ..models.create_webex_meeting_task_params import CreateWebexMeetingTaskParams + from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams + from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams + from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams + from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 + from ..models.get_pulses_task_params import GetPulsesTaskParams + from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) + from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams + from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( InviteToSlackChannelPagerdutyTaskParamsType0, ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) + from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 - from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams + 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 from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( PageVictorOpsOnCallRespondersTaskParamsType0, ) - from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams - from ..models.create_coda_page_task_params import CreateCodaPageTaskParams from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( PageVictorOpsOnCallRespondersTaskParamsType1, ) - from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams - from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams - from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams - from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams - from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams - from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams - from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams - from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 - from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams - from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams - from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams - from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams - from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams - from ..models.create_motion_task_task_params import CreateMotionTaskTaskParams - from ..models.update_action_item_task_params import UpdateActionItemTaskParams from ..models.print_task_params import PrintTaskParams - from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 - from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams - from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams - from ..models.create_quip_page_task_params import CreateQuipPageTaskParams - from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams - from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams - from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams - from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams - from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams - from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams - from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( - InviteToSlackChannelPagerdutyTaskParamsType1, - ) - from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams - from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams - from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams - from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams - from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams - from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams - from ..models.create_webex_meeting_task_params import CreateWebexMeetingTaskParams - from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams - from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams - from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams - from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams - from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams - from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams + from ..models.publish_incident_task_params import PublishIncidentTaskParams + from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams - from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams - from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams - from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams - from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams - from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams - from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams - from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 - from ..models.add_role_task_params import AddRoleTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams - from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams - from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams - from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams + from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams + from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams + from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams - from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams - from ..models.snapshot_looker_look_task_params import SnapshotLookerLookTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 + from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 - from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams - from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams - from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams - from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams - from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams - from ..models.update_clickup_task_task_params import UpdateClickupTaskTaskParams - from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams - from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 - from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 + from ..models.send_sms_task_params import SendSmsTaskParams + from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams + from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams + from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams + from ..models.snapshot_looker_look_task_params import SnapshotLookerLookTaskParams + from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams + from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams + from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams + from ..models.update_action_item_task_params import UpdateActionItemTaskParams from ..models.update_airtable_table_record_task_params import UpdateAirtableTableRecordTaskParams - from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 - from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams - from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams - from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 - from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams + from ..models.update_asana_task_task_params import UpdateAsanaTaskTaskParams + from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams + from ..models.update_clickup_task_task_params import UpdateClickupTaskTaskParams + from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams + from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams + from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams + from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams + from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams - from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams + from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams + from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams + from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams + from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams + from ..models.update_incident_task_params import UpdateIncidentTaskParams + from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams + from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams + from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams + from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams + from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams from ..models.update_opsgenie_incident_task_params import UpdateOpsgenieIncidentTaskParams - from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams - from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams - from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams - from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams - from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams + from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams + from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams + from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams + from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams + from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams + from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams + from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams + from ..models.update_status_task_params import UpdateStatusTaskParams + from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams + from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams + from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams task_params: dict[str, Any] if isinstance(self.task_params, AddActionItemTaskParams): diff --git a/rootly_sdk/models/on_call_pay_report.py b/rootly_sdk/models/on_call_pay_report.py index 089edad9..dad69a6f 100644 --- a/rootly_sdk/models/on_call_pay_report.py +++ b/rootly_sdk/models/on_call_pay_report.py @@ -1,22 +1,16 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.on_call_pay_report_pay_type import check_on_call_pay_report_pay_type -from ..models.on_call_pay_report_pay_type import OnCallPayReportPayType -from ..models.on_call_pay_report_status import check_on_call_pay_report_status -from ..models.on_call_pay_report_status import OnCallPayReportStatus -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +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") diff --git a/rootly_sdk/models/on_call_pay_report_list.py b/rootly_sdk/models/on_call_pay_report_list.py index ad0784b9..8bf6f298 100644 --- a/rootly_sdk/models/on_call_pay_report_list.py +++ b/rootly_sdk/models/on_call_pay_report_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class OnCallPayReportList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.on_call_pay_report_list_data_item import OnCallPayReportListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 index a4dfebea..4de3e80b 100644 --- a/rootly_sdk/models/on_call_pay_report_list_data_item.py +++ b/rootly_sdk/models/on_call_pay_report_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.on_call_pay_report_list_data_item_type import check_on_call_pay_report_list_data_item_type -from ..models.on_call_pay_report_list_data_item_type import OnCallPayReportListDataItemType -from typing import cast +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 @@ -34,7 +33,6 @@ class OnCallPayReportListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.on_call_pay_report import OnCallPayReport id = self.id diff --git a/rootly_sdk/models/on_call_pay_report_response.py b/rootly_sdk/models/on_call_pay_report_response.py index b3feec3b..4094814e 100644 --- a/rootly_sdk/models/on_call_pay_report_response.py +++ b/rootly_sdk/models/on_call_pay_report_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_pay_report_response_data import OnCallPayReportResponseData @@ -32,8 +29,6 @@ class OnCallPayReportResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.on_call_pay_report_response_data import OnCallPayReportResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/on_call_pay_report_response_data.py b/rootly_sdk/models/on_call_pay_report_response_data.py index 770b6888..c072c414 100644 --- a/rootly_sdk/models/on_call_pay_report_response_data.py +++ b/rootly_sdk/models/on_call_pay_report_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.on_call_pay_report_response_data_type import check_on_call_pay_report_response_data_type -from ..models.on_call_pay_report_response_data_type import OnCallPayReportResponseDataType -from typing import cast +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 @@ -34,7 +33,6 @@ class OnCallPayReportResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.on_call_pay_report import OnCallPayReport id = self.id diff --git a/rootly_sdk/models/on_call_role.py b/rootly_sdk/models/on_call_role.py index 81487dc5..6f9fbc29 100644 --- a/rootly_sdk/models/on_call_role.py +++ b/rootly_sdk/models/on_call_role.py @@ -1,76 +1,108 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.on_call_role_alert_fields_permissions_item import check_on_call_role_alert_fields_permissions_item -from ..models.on_call_role_alert_fields_permissions_item import OnCallRoleAlertFieldsPermissionsItem -from ..models.on_call_role_alert_groups_permissions_item import check_on_call_role_alert_groups_permissions_item -from ..models.on_call_role_alert_groups_permissions_item import OnCallRoleAlertGroupsPermissionsItem +from ..models.on_call_role_alert_fields_permissions_item import ( + OnCallRoleAlertFieldsPermissionsItem, + check_on_call_role_alert_fields_permissions_item, +) +from ..models.on_call_role_alert_groups_permissions_item import ( + OnCallRoleAlertGroupsPermissionsItem, + check_on_call_role_alert_groups_permissions_item, +) from ..models.on_call_role_alert_routing_rules_permissions_item import ( + OnCallRoleAlertRoutingRulesPermissionsItem, check_on_call_role_alert_routing_rules_permissions_item, ) -from ..models.on_call_role_alert_routing_rules_permissions_item import OnCallRoleAlertRoutingRulesPermissionsItem -from ..models.on_call_role_alert_sources_permissions_item import check_on_call_role_alert_sources_permissions_item -from ..models.on_call_role_alert_sources_permissions_item import OnCallRoleAlertSourcesPermissionsItem -from ..models.on_call_role_alert_urgency_permissions_item import check_on_call_role_alert_urgency_permissions_item -from ..models.on_call_role_alert_urgency_permissions_item import OnCallRoleAlertUrgencyPermissionsItem -from ..models.on_call_role_alerts_permissions_item import check_on_call_role_alerts_permissions_item -from ..models.on_call_role_alerts_permissions_item import OnCallRoleAlertsPermissionsItem -from ..models.on_call_role_api_keys_permissions_item import check_on_call_role_api_keys_permissions_item -from ..models.on_call_role_api_keys_permissions_item import OnCallRoleApiKeysPermissionsItem -from ..models.on_call_role_audits_permissions_item import check_on_call_role_audits_permissions_item -from ..models.on_call_role_audits_permissions_item import OnCallRoleAuditsPermissionsItem -from ..models.on_call_role_catalogs_permissions_item import check_on_call_role_catalogs_permissions_item -from ..models.on_call_role_catalogs_permissions_item import OnCallRoleCatalogsPermissionsItem -from ..models.on_call_role_contacts_permissions_item import check_on_call_role_contacts_permissions_item -from ..models.on_call_role_contacts_permissions_item import OnCallRoleContactsPermissionsItem +from ..models.on_call_role_alert_sources_permissions_item import ( + OnCallRoleAlertSourcesPermissionsItem, + check_on_call_role_alert_sources_permissions_item, +) +from ..models.on_call_role_alert_urgency_permissions_item import ( + OnCallRoleAlertUrgencyPermissionsItem, + check_on_call_role_alert_urgency_permissions_item, +) +from ..models.on_call_role_alerts_permissions_item import ( + OnCallRoleAlertsPermissionsItem, + check_on_call_role_alerts_permissions_item, +) +from ..models.on_call_role_api_keys_permissions_item import ( + OnCallRoleApiKeysPermissionsItem, + check_on_call_role_api_keys_permissions_item, +) +from ..models.on_call_role_audits_permissions_item import ( + OnCallRoleAuditsPermissionsItem, + check_on_call_role_audits_permissions_item, +) +from ..models.on_call_role_catalogs_permissions_item import ( + OnCallRoleCatalogsPermissionsItem, + check_on_call_role_catalogs_permissions_item, +) +from ..models.on_call_role_contacts_permissions_item import ( + OnCallRoleContactsPermissionsItem, + check_on_call_role_contacts_permissions_item, +) from ..models.on_call_role_escalation_policies_permissions_item import ( + OnCallRoleEscalationPoliciesPermissionsItem, check_on_call_role_escalation_policies_permissions_item, ) -from ..models.on_call_role_escalation_policies_permissions_item import OnCallRoleEscalationPoliciesPermissionsItem -from ..models.on_call_role_functionalities_permissions_item import check_on_call_role_functionalities_permissions_item -from ..models.on_call_role_functionalities_permissions_item import OnCallRoleFunctionalitiesPermissionsItem -from ..models.on_call_role_groups_permissions_item import check_on_call_role_groups_permissions_item -from ..models.on_call_role_groups_permissions_item import OnCallRoleGroupsPermissionsItem -from ..models.on_call_role_heartbeats_permissions_item import check_on_call_role_heartbeats_permissions_item -from ..models.on_call_role_heartbeats_permissions_item import OnCallRoleHeartbeatsPermissionsItem -from ..models.on_call_role_integrations_permissions_item import check_on_call_role_integrations_permissions_item -from ..models.on_call_role_integrations_permissions_item import OnCallRoleIntegrationsPermissionsItem -from ..models.on_call_role_invitations_permissions_item import check_on_call_role_invitations_permissions_item -from ..models.on_call_role_invitations_permissions_item import OnCallRoleInvitationsPermissionsItem +from ..models.on_call_role_functionalities_permissions_item import ( + OnCallRoleFunctionalitiesPermissionsItem, + check_on_call_role_functionalities_permissions_item, +) +from ..models.on_call_role_groups_permissions_item import ( + OnCallRoleGroupsPermissionsItem, + check_on_call_role_groups_permissions_item, +) +from ..models.on_call_role_heartbeats_permissions_item import ( + OnCallRoleHeartbeatsPermissionsItem, + check_on_call_role_heartbeats_permissions_item, +) +from ..models.on_call_role_integrations_permissions_item import ( + OnCallRoleIntegrationsPermissionsItem, + check_on_call_role_integrations_permissions_item, +) +from ..models.on_call_role_invitations_permissions_item import ( + OnCallRoleInvitationsPermissionsItem, + check_on_call_role_invitations_permissions_item, +) from ..models.on_call_role_live_call_routing_permissions_item import ( + OnCallRoleLiveCallRoutingPermissionsItem, check_on_call_role_live_call_routing_permissions_item, ) -from ..models.on_call_role_live_call_routing_permissions_item import OnCallRoleLiveCallRoutingPermissionsItem from ..models.on_call_role_on_call_readiness_report_permissions_item import ( + OnCallRoleOnCallReadinessReportPermissionsItem, check_on_call_role_on_call_readiness_report_permissions_item, ) -from ..models.on_call_role_on_call_readiness_report_permissions_item import ( - OnCallRoleOnCallReadinessReportPermissionsItem, +from ..models.on_call_role_on_call_roles_permissions_item import ( + OnCallRoleOnCallRolesPermissionsItem, + check_on_call_role_on_call_roles_permissions_item, ) -from ..models.on_call_role_on_call_roles_permissions_item import check_on_call_role_on_call_roles_permissions_item -from ..models.on_call_role_on_call_roles_permissions_item import OnCallRoleOnCallRolesPermissionsItem from ..models.on_call_role_schedule_override_permissions_item import ( + OnCallRoleScheduleOverridePermissionsItem, check_on_call_role_schedule_override_permissions_item, ) -from ..models.on_call_role_schedule_override_permissions_item import OnCallRoleScheduleOverridePermissionsItem -from ..models.on_call_role_schedules_permissions_item import check_on_call_role_schedules_permissions_item -from ..models.on_call_role_schedules_permissions_item import OnCallRoleSchedulesPermissionsItem -from ..models.on_call_role_services_permissions_item import check_on_call_role_services_permissions_item -from ..models.on_call_role_services_permissions_item import OnCallRoleServicesPermissionsItem -from ..models.on_call_role_webhooks_permissions_item import check_on_call_role_webhooks_permissions_item -from ..models.on_call_role_webhooks_permissions_item import OnCallRoleWebhooksPermissionsItem -from ..models.on_call_role_workflows_permissions_item import check_on_call_role_workflows_permissions_item -from ..models.on_call_role_workflows_permissions_item import OnCallRoleWorkflowsPermissionsItem +from ..models.on_call_role_schedules_permissions_item import ( + OnCallRoleSchedulesPermissionsItem, + check_on_call_role_schedules_permissions_item, +) +from ..models.on_call_role_services_permissions_item import ( + OnCallRoleServicesPermissionsItem, + check_on_call_role_services_permissions_item, +) +from ..models.on_call_role_webhooks_permissions_item import ( + OnCallRoleWebhooksPermissionsItem, + check_on_call_role_webhooks_permissions_item, +) +from ..models.on_call_role_workflows_permissions_item import ( + OnCallRoleWorkflowsPermissionsItem, + check_on_call_role_workflows_permissions_item, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="OnCallRole") diff --git a/rootly_sdk/models/on_call_role_list.py b/rootly_sdk/models/on_call_role_list.py index 85b1d4cd..ae3d3942 100644 --- a/rootly_sdk/models/on_call_role_list.py +++ b/rootly_sdk/models/on_call_role_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class OnCallRoleList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.on_call_role_list_data_item import OnCallRoleListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 ea8bc573..2de264b6 100644 --- a/rootly_sdk/models/on_call_role_list_data_item.py +++ b/rootly_sdk/models/on_call_role_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.on_call_role_list_data_item_type import check_on_call_role_list_data_item_type -from ..models.on_call_role_list_data_item_type import OnCallRoleListDataItemType -from typing import cast +from ..models.on_call_role_list_data_item_type import OnCallRoleListDataItemType, check_on_call_role_list_data_item_type if TYPE_CHECKING: from ..models.on_call_role import OnCallRole @@ -34,7 +30,6 @@ class OnCallRoleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.on_call_role import OnCallRole id = self.id diff --git a/rootly_sdk/models/on_call_role_relationship.py b/rootly_sdk/models/on_call_role_relationship.py index b712edfb..b1385f6f 100644 --- a/rootly_sdk/models/on_call_role_relationship.py +++ b/rootly_sdk/models/on_call_role_relationship.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.on_call_role_relationship_data_type_0 import OnCallRoleRelationshipDataType0 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 51181c88..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,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.on_call_role_relationship_data_type_0_type import ( + OnCallRoleRelationshipDataType0Type, + check_on_call_role_relationship_data_type_0_type, +) from ..types import UNSET, Unset -from ..models.on_call_role_relationship_data_type_0_type import check_on_call_role_relationship_data_type_0_type -from ..models.on_call_role_relationship_data_type_0_type import OnCallRoleRelationshipDataType0Type -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="OnCallRoleRelationshipDataType0") diff --git a/rootly_sdk/models/on_call_role_response.py b/rootly_sdk/models/on_call_role_response.py index 6ff08084..f6ba050c 100644 --- a/rootly_sdk/models/on_call_role_response.py +++ b/rootly_sdk/models/on_call_role_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_role_response_data import OnCallRoleResponseData @@ -32,8 +29,6 @@ class OnCallRoleResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.on_call_role_response_data import OnCallRoleResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/on_call_role_response_data.py b/rootly_sdk/models/on_call_role_response_data.py index ef5af7fe..6a49a2a1 100644 --- a/rootly_sdk/models/on_call_role_response_data.py +++ b/rootly_sdk/models/on_call_role_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.on_call_role_response_data_type import check_on_call_role_response_data_type -from ..models.on_call_role_response_data_type import OnCallRoleResponseDataType -from typing import cast +from ..models.on_call_role_response_data_type import OnCallRoleResponseDataType, check_on_call_role_response_data_type if TYPE_CHECKING: from ..models.on_call_role import OnCallRole @@ -34,7 +30,6 @@ class OnCallRoleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.on_call_role import OnCallRole id = self.id diff --git a/rootly_sdk/models/on_call_shadow.py b/rootly_sdk/models/on_call_shadow.py index e78a3a8d..c04b4ed3 100644 --- a/rootly_sdk/models/on_call_shadow.py +++ b/rootly_sdk/models/on_call_shadow.py @@ -1,20 +1,15 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field - -from ..types import UNSET, Unset - -from ..models.on_call_shadow_shadowable_type import check_on_call_shadow_shadowable_type -from ..models.on_call_shadow_shadowable_type import OnCallShadowShadowableType -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +from ..models.on_call_shadow_shadowable_type import OnCallShadowShadowableType, check_on_call_shadow_shadowable_type +from ..types import UNSET, Unset T = TypeVar("T", bound="OnCallShadow") diff --git a/rootly_sdk/models/on_call_shadow_response.py b/rootly_sdk/models/on_call_shadow_response.py index beb76314..e9e20b04 100644 --- a/rootly_sdk/models/on_call_shadow_response.py +++ b/rootly_sdk/models/on_call_shadow_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.on_call_shadow_response_data import OnCallShadowResponseData @@ -32,8 +29,6 @@ class OnCallShadowResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.on_call_shadow_response_data import OnCallShadowResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/on_call_shadow_response_data.py b/rootly_sdk/models/on_call_shadow_response_data.py index 517c9ac8..b0b5e603 100644 --- a/rootly_sdk/models/on_call_shadow_response_data.py +++ b/rootly_sdk/models/on_call_shadow_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.on_call_shadow_response_data_type import check_on_call_shadow_response_data_type -from ..models.on_call_shadow_response_data_type import OnCallShadowResponseDataType -from typing import cast +from ..models.on_call_shadow_response_data_type import ( + OnCallShadowResponseDataType, + check_on_call_shadow_response_data_type, +) if TYPE_CHECKING: from ..models.on_call_shadow import OnCallShadow @@ -34,7 +33,6 @@ class OnCallShadowResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.on_call_shadow import OnCallShadow id = self.id diff --git a/rootly_sdk/models/on_call_shadows_list.py b/rootly_sdk/models/on_call_shadows_list.py index 373bd52a..cd3e8af6 100644 --- a/rootly_sdk/models/on_call_shadows_list.py +++ b/rootly_sdk/models/on_call_shadows_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class OnCallShadowsList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.on_call_shadows_list_data_item import OnCallShadowsListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 50b0efd1..ce854fcf 100644 --- a/rootly_sdk/models/on_call_shadows_list_data_item.py +++ b/rootly_sdk/models/on_call_shadows_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.on_call_shadows_list_data_item_type import check_on_call_shadows_list_data_item_type -from ..models.on_call_shadows_list_data_item_type import OnCallShadowsListDataItemType -from typing import cast +from ..models.on_call_shadows_list_data_item_type import ( + OnCallShadowsListDataItemType, + check_on_call_shadows_list_data_item_type, +) if TYPE_CHECKING: from ..models.on_call_shadow import OnCallShadow @@ -34,7 +33,6 @@ class OnCallShadowsListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.on_call_shadow import OnCallShadow id = self.id diff --git a/rootly_sdk/models/oncall.py b/rootly_sdk/models/oncall.py index 2a09bceb..7e3fac08 100644 --- a/rootly_sdk/models/oncall.py +++ b/rootly_sdk/models/oncall.py @@ -1,20 +1,15 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.oncall_notification_type import check_oncall_notification_type -from ..models.oncall_notification_type import OncallNotificationType -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +from ..models.oncall_notification_type import OncallNotificationType, check_oncall_notification_type +from ..types import UNSET, Unset T = TypeVar("T", bound="Oncall") diff --git a/rootly_sdk/models/oncall_list.py b/rootly_sdk/models/oncall_list.py index edc881f2..30e12715 100644 --- a/rootly_sdk/models/oncall_list.py +++ b/rootly_sdk/models/oncall_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.oncall_list_data_item import OncallListDataItem @@ -32,8 +29,6 @@ class OncallList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.oncall_list_data_item import OncallListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/oncall_list_data_item.py b/rootly_sdk/models/oncall_list_data_item.py index 7a122904..b1860ed4 100644 --- a/rootly_sdk/models/oncall_list_data_item.py +++ b/rootly_sdk/models/oncall_list_data_item.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.oncall_list_data_item_type import OncallListDataItemType, check_oncall_list_data_item_type from ..types import UNSET, Unset -from ..models.oncall_list_data_item_type import check_oncall_list_data_item_type -from ..models.oncall_list_data_item_type import OncallListDataItemType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.oncall import Oncall from ..models.oncall_relationships import OncallRelationships @@ -38,8 +34,6 @@ class OncallListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.oncall_relationships import OncallRelationships - from ..models.oncall import Oncall id = self.id diff --git a/rootly_sdk/models/oncall_relationships.py b/rootly_sdk/models/oncall_relationships.py index d61c947a..c31f0763 100644 --- a/rootly_sdk/models/oncall_relationships.py +++ b/rootly_sdk/models/oncall_relationships.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.oncall_relationships_escalation_policy import OncallRelationshipsEscalationPolicy from ..models.oncall_relationships_schedule import OncallRelationshipsSchedule @@ -35,9 +32,6 @@ class OncallRelationships: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.oncall_relationships_escalation_policy import OncallRelationshipsEscalationPolicy - from ..models.oncall_relationships_schedule import OncallRelationshipsSchedule - from ..models.oncall_relationships_user import OncallRelationshipsUser user: dict[str, Any] | Unset = UNSET if not isinstance(self.user, Unset): diff --git a/rootly_sdk/models/oncall_relationships_escalation_policy.py b/rootly_sdk/models/oncall_relationships_escalation_policy.py index 87b8a802..6d5b37df 100644 --- a/rootly_sdk/models/oncall_relationships_escalation_policy.py +++ b/rootly_sdk/models/oncall_relationships_escalation_policy.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.oncall_relationships_escalation_policy_data_type_0 import OncallRelationshipsEscalationPolicyDataType0 diff --git a/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py index 0363ab4a..5f4db389 100644 --- a/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py +++ b/rootly_sdk/models/oncall_relationships_escalation_policy_data_type_0.py @@ -1,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.oncall_relationships_escalation_policy_data_type_0_type import ( - check_oncall_relationships_escalation_policy_data_type_0_type, -) from ..models.oncall_relationships_escalation_policy_data_type_0_type import ( OncallRelationshipsEscalationPolicyDataType0Type, + check_oncall_relationships_escalation_policy_data_type_0_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="OncallRelationshipsEscalationPolicyDataType0") diff --git a/rootly_sdk/models/oncall_relationships_schedule.py b/rootly_sdk/models/oncall_relationships_schedule.py index eaa0a3cf..e09c49b7 100644 --- a/rootly_sdk/models/oncall_relationships_schedule.py +++ b/rootly_sdk/models/oncall_relationships_schedule.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.oncall_relationships_schedule_data_type_0 import OncallRelationshipsScheduleDataType0 diff --git a/rootly_sdk/models/oncall_relationships_schedule_data_type_0.py b/rootly_sdk/models/oncall_relationships_schedule_data_type_0.py index b37f924b..c9919c8a 100644 --- a/rootly_sdk/models/oncall_relationships_schedule_data_type_0.py +++ b/rootly_sdk/models/oncall_relationships_schedule_data_type_0.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.oncall_relationships_schedule_data_type_0_type import ( + OncallRelationshipsScheduleDataType0Type, + check_oncall_relationships_schedule_data_type_0_type, +) from ..types import UNSET, Unset -from ..models.oncall_relationships_schedule_data_type_0_type import check_oncall_relationships_schedule_data_type_0_type -from ..models.oncall_relationships_schedule_data_type_0_type import OncallRelationshipsScheduleDataType0Type -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="OncallRelationshipsScheduleDataType0") diff --git a/rootly_sdk/models/oncall_relationships_user.py b/rootly_sdk/models/oncall_relationships_user.py index cdbd6f45..6c35d047 100644 --- a/rootly_sdk/models/oncall_relationships_user.py +++ b/rootly_sdk/models/oncall_relationships_user.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.oncall_relationships_user_data_type_0 import OncallRelationshipsUserDataType0 diff --git a/rootly_sdk/models/oncall_relationships_user_data_type_0.py b/rootly_sdk/models/oncall_relationships_user_data_type_0.py index efbe81a8..0554b0fc 100644 --- a/rootly_sdk/models/oncall_relationships_user_data_type_0.py +++ b/rootly_sdk/models/oncall_relationships_user_data_type_0.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.oncall_relationships_user_data_type_0_type import ( + OncallRelationshipsUserDataType0Type, + check_oncall_relationships_user_data_type_0_type, +) from ..types import UNSET, Unset -from ..models.oncall_relationships_user_data_type_0_type import check_oncall_relationships_user_data_type_0_type -from ..models.oncall_relationships_user_data_type_0_type import OncallRelationshipsUserDataType0Type -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="OncallRelationshipsUserDataType0") diff --git a/rootly_sdk/models/override_shift.py b/rootly_sdk/models/override_shift.py index e95e29a8..287ca8fe 100644 --- a/rootly_sdk/models/override_shift.py +++ b/rootly_sdk/models/override_shift.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.shift_override_response import ShiftOverrideResponse from ..models.user_response import UserResponse @@ -48,8 +45,6 @@ class OverrideShift: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_response import UserResponse - from ..models.shift_override_response import ShiftOverrideResponse schedule_id = self.schedule_id diff --git a/rootly_sdk/models/override_shift_list.py b/rootly_sdk/models/override_shift_list.py index 77ac1206..d589839b 100644 --- a/rootly_sdk/models/override_shift_list.py +++ b/rootly_sdk/models/override_shift_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class OverrideShiftList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.links import Links - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.override_shift_list_data_item import OverrideShiftListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/override_shift_list_data_item.py b/rootly_sdk/models/override_shift_list_data_item.py index 93a7f501..391a89d5 100644 --- a/rootly_sdk/models/override_shift_list_data_item.py +++ b/rootly_sdk/models/override_shift_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.override_shift_list_data_item_type import check_override_shift_list_data_item_type -from ..models.override_shift_list_data_item_type import OverrideShiftListDataItemType -from typing import cast +from ..models.override_shift_list_data_item_type import ( + OverrideShiftListDataItemType, + check_override_shift_list_data_item_type, +) if TYPE_CHECKING: from ..models.override_shift import OverrideShift @@ -34,7 +33,6 @@ class OverrideShiftListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.override_shift import OverrideShift id = self.id diff --git a/rootly_sdk/models/override_shift_response.py b/rootly_sdk/models/override_shift_response.py index 0c7753a6..9c0c2d7b 100644 --- a/rootly_sdk/models/override_shift_response.py +++ b/rootly_sdk/models/override_shift_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.override_shift_response_data import OverrideShiftResponseData @@ -32,8 +29,6 @@ class OverrideShiftResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.override_shift_response_data import OverrideShiftResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/override_shift_response_data.py b/rootly_sdk/models/override_shift_response_data.py index cff7afbe..3b051c10 100644 --- a/rootly_sdk/models/override_shift_response_data.py +++ b/rootly_sdk/models/override_shift_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.override_shift_response_data_type import check_override_shift_response_data_type -from ..models.override_shift_response_data_type import OverrideShiftResponseDataType -from typing import cast +from ..models.override_shift_response_data_type import ( + OverrideShiftResponseDataType, + check_override_shift_response_data_type, +) if TYPE_CHECKING: from ..models.override_shift import OverrideShift @@ -34,7 +33,6 @@ class OverrideShiftResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.override_shift import OverrideShift id = self.id 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 index 4b463b6d..916d1784 100644 --- a/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py +++ b/rootly_sdk/models/page_jsmops_on_call_responders_task_params.py @@ -1,23 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - 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_priority import PageJsmopsOnCallRespondersTaskParamsPriority from ..models.page_jsmops_on_call_responders_task_params_task_type import ( + PageJsmopsOnCallRespondersTaskParamsTaskType, check_page_jsmops_on_call_responders_task_params_task_type, ) -from ..models.page_jsmops_on_call_responders_task_params_task_type import PageJsmopsOnCallRespondersTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.page_jsmops_on_call_responders_task_params_teams_item import ( @@ -55,12 +52,6 @@ class PageJsmopsOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - 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, - ) task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): 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 index b44eb7f3..9dee4774 100644 --- 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 @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageJsmopsOnCallRespondersTaskParamsTeamsItem") 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 index eb7a9677..24aa7ba3 100644 --- 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 @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageJsmopsOnCallRespondersTaskParamsUsersItem") 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 e93bcf95..a278eb46 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,27 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.page_opsgenie_on_call_responders_task_params_priority import ( - check_page_opsgenie_on_call_responders_task_params_priority, -) from ..models.page_opsgenie_on_call_responders_task_params_priority import ( PageOpsgenieOnCallRespondersTaskParamsPriority, -) -from ..models.page_opsgenie_on_call_responders_task_params_task_type import ( - check_page_opsgenie_on_call_responders_task_params_task_type, + check_page_opsgenie_on_call_responders_task_params_priority, ) from ..models.page_opsgenie_on_call_responders_task_params_task_type import ( PageOpsgenieOnCallRespondersTaskParamsTaskType, + check_page_opsgenie_on_call_responders_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.page_opsgenie_on_call_responders_task_params_teams_item import ( @@ -59,12 +52,6 @@ class PageOpsgenieOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.page_opsgenie_on_call_responders_task_params_users_item import ( - PageOpsgenieOnCallRespondersTaskParamsUsersItem, - ) - from ..models.page_opsgenie_on_call_responders_task_params_teams_item import ( - PageOpsgenieOnCallRespondersTaskParamsTeamsItem, - ) task_type: str | Unset = UNSET if not isinstance(self.task_type, Unset): 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 1af810e1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageOpsgenieOnCallRespondersTaskParamsTeamsItem") 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 c865ec58..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageOpsgenieOnCallRespondersTaskParamsUsersItem") 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 a3c17f2e..cd792d21 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,27 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.page_pagerduty_on_call_responders_task_params_task_type import ( - check_page_pagerduty_on_call_responders_task_params_task_type, -) from ..models.page_pagerduty_on_call_responders_task_params_task_type import ( PagePagerdutyOnCallRespondersTaskParamsTaskType, -) -from ..models.page_pagerduty_on_call_responders_task_params_urgency import ( - check_page_pagerduty_on_call_responders_task_params_urgency, + check_page_pagerduty_on_call_responders_task_params_task_type, ) from ..models.page_pagerduty_on_call_responders_task_params_urgency import ( PagePagerdutyOnCallRespondersTaskParamsUrgency, + check_page_pagerduty_on_call_responders_task_params_urgency, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.page_pagerduty_on_call_responders_task_params_escalation_policies_item import ( @@ -69,15 +62,6 @@ class PagePagerdutyOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.page_pagerduty_on_call_responders_task_params_escalation_policies_item import ( - PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem, - ) - from ..models.page_pagerduty_on_call_responders_task_params_users_item import ( - PagePagerdutyOnCallRespondersTaskParamsUsersItem, - ) - from ..models.page_pagerduty_on_call_responders_task_params_service import ( - PagePagerdutyOnCallRespondersTaskParamsService, - ) service = self.service.to_dict() 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 9cf742aa..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PagePagerdutyOnCallRespondersTaskParamsEscalationPoliciesItem") 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 e877c6cf..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PagePagerdutyOnCallRespondersTaskParamsService") 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 bfa1b3f3..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PagePagerdutyOnCallRespondersTaskParamsUsersItem") 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 ae3f9b70..e35e7ba7 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,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.page_rootly_on_call_responders_task_params_task_type import ( + PageRootlyOnCallRespondersTaskParamsTaskType, check_page_rootly_on_call_responders_task_params_task_type, ) -from ..models.page_rootly_on_call_responders_task_params_task_type import PageRootlyOnCallRespondersTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.page_rootly_on_call_responders_task_params_escalation_policy_target import ( @@ -68,21 +65,6 @@ class PageRootlyOnCallRespondersTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.page_rootly_on_call_responders_task_params_user_target import ( - PageRootlyOnCallRespondersTaskParamsUserTarget, - ) - from ..models.page_rootly_on_call_responders_task_params_service_target import ( - PageRootlyOnCallRespondersTaskParamsServiceTarget, - ) - 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, - ) - from ..models.page_rootly_on_call_responders_task_params_escalation_policy_target import ( - PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget, - ) alert_urgency_id = self.alert_urgency_id 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 f93db879..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsEscalationPolicyTarget") 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 index cd339f87..9d0b0fcf 100644 --- 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 @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsFunctionalityTarget") 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 e8bdabbe..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsGroupTarget") 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 343232bb..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsServiceTarget") 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 58d40aef..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageRootlyOnCallRespondersTaskParamsUserTarget") diff --git a/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py index fb84fc01..941d2835 100644 --- a/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py +++ b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_0_users_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageVictorOpsOnCallRespondersTaskParamsType0UsersItem") diff --git a/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py index 5270737d..5848af71 100644 --- a/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py +++ b/rootly_sdk/models/page_victor_ops_on_call_responders_task_params_type_1_escalation_policies_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PageVictorOpsOnCallRespondersTaskParamsType1EscalationPoliciesItem") diff --git a/rootly_sdk/models/patch_alert_route.py b/rootly_sdk/models/patch_alert_route.py index 9257444c..ad87d4c5 100644 --- a/rootly_sdk/models/patch_alert_route.py +++ b/rootly_sdk/models/patch_alert_route.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.patch_alert_route_data import PatchAlertRouteData @@ -28,7 +24,6 @@ class PatchAlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.patch_alert_route_data import PatchAlertRouteData data = self.data.to_dict() diff --git a/rootly_sdk/models/patch_alert_route_data.py b/rootly_sdk/models/patch_alert_route_data.py index 58e57480..334bec3e 100644 --- a/rootly_sdk/models/patch_alert_route_data.py +++ b/rootly_sdk/models/patch_alert_route_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.patch_alert_route_data_type import check_patch_alert_route_data_type -from ..models.patch_alert_route_data_type import PatchAlertRouteDataType -from typing import cast +from ..models.patch_alert_route_data_type import PatchAlertRouteDataType, check_patch_alert_route_data_type if TYPE_CHECKING: from ..models.patch_alert_route_data_attributes import PatchAlertRouteDataAttributes @@ -32,7 +28,6 @@ class PatchAlertRouteData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.patch_alert_route_data_attributes import PatchAlertRouteDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/patch_alert_route_data_attributes.py b/rootly_sdk/models/patch_alert_route_data_attributes.py index 57656b6e..04d8dd16 100644 --- a/rootly_sdk/models/patch_alert_route_data_attributes.py +++ b/rootly_sdk/models/patch_alert_route_data_attributes.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.patch_alert_route_data_attributes_rules_item import PatchAlertRouteDataAttributesRulesItem @@ -37,7 +33,6 @@ class PatchAlertRouteDataAttributes: rules: list[PatchAlertRouteDataAttributesRulesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.patch_alert_route_data_attributes_rules_item import PatchAlertRouteDataAttributesRulesItem name = self.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 c3514e26..83f9eba3 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,17 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item import ( PatchAlertRouteDataAttributesRulesItemConditionGroupsItem, @@ -47,12 +44,6 @@ class PatchAlertRouteDataAttributesRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.patch_alert_route_data_attributes_rules_item_destinations_item import ( - PatchAlertRouteDataAttributesRulesItemDestinationsItem, - ) - from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item import ( - PatchAlertRouteDataAttributesRulesItemConditionGroupsItem, - ) id: str | Unset = UNSET if not isinstance(self.id, Unset): 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 5887cdd3..dde7d127 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,17 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, @@ -38,9 +35,6 @@ class PatchAlertRouteDataAttributesRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( - PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, - ) id: str | Unset = UNSET if not isinstance(self.id, Unset): 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 fb9ba625..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,35 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - -from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( - check_patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type, -) from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType, -) -from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( - check_patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type, + check_patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type, ) from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, -) -from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( - check_patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type, + check_patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type, ) from ..models.patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType, + check_patch_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="PatchAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem") 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 7b20639f..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,23 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.patch_alert_route_data_attributes_rules_item_destinations_item_target_type import ( - check_patch_alert_route_data_attributes_rules_item_destinations_item_target_type, -) from ..models.patch_alert_route_data_attributes_rules_item_destinations_item_target_type import ( PatchAlertRouteDataAttributesRulesItemDestinationsItemTargetType, + check_patch_alert_route_data_attributes_rules_item_destinations_item_target_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="PatchAlertRouteDataAttributesRulesItemDestinationsItem") diff --git a/rootly_sdk/models/phone_verification_response.py b/rootly_sdk/models/phone_verification_response.py index 353135f3..636cfa5a 100644 --- a/rootly_sdk/models/phone_verification_response.py +++ b/rootly_sdk/models/phone_verification_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PhoneVerificationResponse") diff --git a/rootly_sdk/models/playbook.py b/rootly_sdk/models/playbook.py index 2788435e..cc9126ef 100644 --- a/rootly_sdk/models/playbook.py +++ b/rootly_sdk/models/playbook.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Playbook") diff --git a/rootly_sdk/models/playbook_list.py b/rootly_sdk/models/playbook_list.py index 8c109251..41883360 100644 --- a/rootly_sdk/models/playbook_list.py +++ b/rootly_sdk/models/playbook_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class PlaybookList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.playbook_list_data_item import PlaybookListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/playbook_list_data_item.py b/rootly_sdk/models/playbook_list_data_item.py index a8ffafe2..90c8ddde 100644 --- a/rootly_sdk/models/playbook_list_data_item.py +++ b/rootly_sdk/models/playbook_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.playbook_list_data_item_type import check_playbook_list_data_item_type -from ..models.playbook_list_data_item_type import PlaybookListDataItemType -from typing import cast +from ..models.playbook_list_data_item_type import PlaybookListDataItemType, check_playbook_list_data_item_type if TYPE_CHECKING: from ..models.playbook import Playbook @@ -34,7 +30,6 @@ class PlaybookListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.playbook import Playbook id = self.id diff --git a/rootly_sdk/models/playbook_response.py b/rootly_sdk/models/playbook_response.py index f6cb4955..09e9cb31 100644 --- a/rootly_sdk/models/playbook_response.py +++ b/rootly_sdk/models/playbook_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_response_data import PlaybookResponseData @@ -32,8 +29,6 @@ class PlaybookResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.playbook_response_data import PlaybookResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/playbook_response_data.py b/rootly_sdk/models/playbook_response_data.py index b0b11ef8..8c844e20 100644 --- a/rootly_sdk/models/playbook_response_data.py +++ b/rootly_sdk/models/playbook_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.playbook_response_data_type import check_playbook_response_data_type -from ..models.playbook_response_data_type import PlaybookResponseDataType -from typing import cast +from ..models.playbook_response_data_type import PlaybookResponseDataType, check_playbook_response_data_type if TYPE_CHECKING: from ..models.playbook import Playbook @@ -34,7 +30,6 @@ class PlaybookResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.playbook import Playbook id = self.id diff --git a/rootly_sdk/models/playbook_task.py b/rootly_sdk/models/playbook_task.py index d4dfe32d..401f39aa 100644 --- a/rootly_sdk/models/playbook_task.py +++ b/rootly_sdk/models/playbook_task.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="PlaybookTask") diff --git a/rootly_sdk/models/playbook_task_list.py b/rootly_sdk/models/playbook_task_list.py index 0f0ab552..da771781 100644 --- a/rootly_sdk/models/playbook_task_list.py +++ b/rootly_sdk/models/playbook_task_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class PlaybookTaskList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.playbook_task_list_data_item import PlaybookTaskListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/playbook_task_list_data_item.py b/rootly_sdk/models/playbook_task_list_data_item.py index 16c99dc8..6a1a8b7e 100644 --- a/rootly_sdk/models/playbook_task_list_data_item.py +++ b/rootly_sdk/models/playbook_task_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.playbook_task_list_data_item_type import check_playbook_task_list_data_item_type -from ..models.playbook_task_list_data_item_type import PlaybookTaskListDataItemType -from typing import cast +from ..models.playbook_task_list_data_item_type import ( + PlaybookTaskListDataItemType, + check_playbook_task_list_data_item_type, +) if TYPE_CHECKING: from ..models.playbook_task import PlaybookTask @@ -34,7 +33,6 @@ class PlaybookTaskListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.playbook_task import PlaybookTask id = self.id diff --git a/rootly_sdk/models/playbook_task_response.py b/rootly_sdk/models/playbook_task_response.py index d2d17a91..cfa83e2b 100644 --- a/rootly_sdk/models/playbook_task_response.py +++ b/rootly_sdk/models/playbook_task_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.playbook_task_response_data import PlaybookTaskResponseData @@ -32,8 +29,6 @@ class PlaybookTaskResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.playbook_task_response_data import PlaybookTaskResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/playbook_task_response_data.py b/rootly_sdk/models/playbook_task_response_data.py index f7318f9a..8dda77d8 100644 --- a/rootly_sdk/models/playbook_task_response_data.py +++ b/rootly_sdk/models/playbook_task_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.playbook_task_response_data_type import check_playbook_task_response_data_type -from ..models.playbook_task_response_data_type import PlaybookTaskResponseDataType -from typing import cast +from ..models.playbook_task_response_data_type import ( + PlaybookTaskResponseDataType, + check_playbook_task_response_data_type, +) if TYPE_CHECKING: from ..models.playbook_task import PlaybookTask @@ -34,7 +33,6 @@ class PlaybookTaskResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.playbook_task import PlaybookTask id = self.id diff --git a/rootly_sdk/models/post_mortem_template.py b/rootly_sdk/models/post_mortem_template.py index 62e938f0..175b93d9 100644 --- a/rootly_sdk/models/post_mortem_template.py +++ b/rootly_sdk/models/post_mortem_template.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.post_mortem_template_format import PostMortemTemplateFormat, check_post_mortem_template_format from ..types import UNSET, Unset -from ..models.post_mortem_template_format import check_post_mortem_template_format -from ..models.post_mortem_template_format import PostMortemTemplateFormat -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.post_mortem_template_content_json_type_0 import PostMortemTemplateContentJsonType0 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 6aedaf3a..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="PostMortemTemplateContentJsonType0") diff --git a/rootly_sdk/models/post_mortem_template_list.py b/rootly_sdk/models/post_mortem_template_list.py index 0705cc01..f855b333 100644 --- a/rootly_sdk/models/post_mortem_template_list.py +++ b/rootly_sdk/models/post_mortem_template_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class PostMortemTemplateList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.post_mortem_template_list_data_item import PostMortemTemplateListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 762ec30c..18004832 100644 --- a/rootly_sdk/models/post_mortem_template_list_data_item.py +++ b/rootly_sdk/models/post_mortem_template_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.post_mortem_template_list_data_item_type import check_post_mortem_template_list_data_item_type -from ..models.post_mortem_template_list_data_item_type import PostMortemTemplateListDataItemType -from typing import cast +from ..models.post_mortem_template_list_data_item_type import ( + PostMortemTemplateListDataItemType, + check_post_mortem_template_list_data_item_type, +) if TYPE_CHECKING: from ..models.post_mortem_template import PostMortemTemplate @@ -34,7 +33,6 @@ class PostMortemTemplateListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.post_mortem_template import PostMortemTemplate id = self.id diff --git a/rootly_sdk/models/post_mortem_template_response.py b/rootly_sdk/models/post_mortem_template_response.py index bdc2ed8a..19995e60 100644 --- a/rootly_sdk/models/post_mortem_template_response.py +++ b/rootly_sdk/models/post_mortem_template_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.post_mortem_template_response_data import PostMortemTemplateResponseData @@ -32,8 +29,6 @@ class PostMortemTemplateResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.post_mortem_template_response_data import PostMortemTemplateResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/post_mortem_template_response_data.py b/rootly_sdk/models/post_mortem_template_response_data.py index ff81261e..839a4498 100644 --- a/rootly_sdk/models/post_mortem_template_response_data.py +++ b/rootly_sdk/models/post_mortem_template_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.post_mortem_template_response_data_type import check_post_mortem_template_response_data_type -from ..models.post_mortem_template_response_data_type import PostMortemTemplateResponseDataType -from typing import cast +from ..models.post_mortem_template_response_data_type import ( + PostMortemTemplateResponseDataType, + check_post_mortem_template_response_data_type, +) if TYPE_CHECKING: from ..models.post_mortem_template import PostMortemTemplate @@ -34,7 +33,6 @@ class PostMortemTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.post_mortem_template import PostMortemTemplate id = self.id diff --git a/rootly_sdk/models/post_mortem_trigger_params.py b/rootly_sdk/models/post_mortem_trigger_params.py index ae9f06a2..a045bbe9 100644 --- a/rootly_sdk/models/post_mortem_trigger_params.py +++ b/rootly_sdk/models/post_mortem_trigger_params.py @@ -1,160 +1,124 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.post_mortem_trigger_params_incident_condition import check_post_mortem_trigger_params_incident_condition -from ..models.post_mortem_trigger_params_incident_condition import PostMortemTriggerParamsIncidentCondition -from ..models.post_mortem_trigger_params_incident_condition_acknowledged_at import ( - check_post_mortem_trigger_params_incident_condition_acknowledged_at, +from ..models.post_mortem_trigger_params_incident_condition import ( + PostMortemTriggerParamsIncidentCondition, + check_post_mortem_trigger_params_incident_condition, ) from ..models.post_mortem_trigger_params_incident_condition_acknowledged_at import ( PostMortemTriggerParamsIncidentConditionAcknowledgedAt, + check_post_mortem_trigger_params_incident_condition_acknowledged_at, ) from ..models.post_mortem_trigger_params_incident_condition_cause import ( + PostMortemTriggerParamsIncidentConditionCause, check_post_mortem_trigger_params_incident_condition_cause, ) -from ..models.post_mortem_trigger_params_incident_condition_cause import PostMortemTriggerParamsIncidentConditionCause -from ..models.post_mortem_trigger_params_incident_condition_detected_at import ( - check_post_mortem_trigger_params_incident_condition_detected_at, -) from ..models.post_mortem_trigger_params_incident_condition_detected_at import ( PostMortemTriggerParamsIncidentConditionDetectedAt, -) -from ..models.post_mortem_trigger_params_incident_condition_environment import ( - check_post_mortem_trigger_params_incident_condition_environment, + check_post_mortem_trigger_params_incident_condition_detected_at, ) from ..models.post_mortem_trigger_params_incident_condition_environment import ( PostMortemTriggerParamsIncidentConditionEnvironment, -) -from ..models.post_mortem_trigger_params_incident_condition_functionality import ( - check_post_mortem_trigger_params_incident_condition_functionality, + check_post_mortem_trigger_params_incident_condition_environment, ) from ..models.post_mortem_trigger_params_incident_condition_functionality import ( PostMortemTriggerParamsIncidentConditionFunctionality, + check_post_mortem_trigger_params_incident_condition_functionality, ) from ..models.post_mortem_trigger_params_incident_condition_group import ( + PostMortemTriggerParamsIncidentConditionGroup, check_post_mortem_trigger_params_incident_condition_group, ) -from ..models.post_mortem_trigger_params_incident_condition_group import PostMortemTriggerParamsIncidentConditionGroup -from ..models.post_mortem_trigger_params_incident_condition_incident_roles import ( - check_post_mortem_trigger_params_incident_condition_incident_roles, -) from ..models.post_mortem_trigger_params_incident_condition_incident_roles import ( PostMortemTriggerParamsIncidentConditionIncidentRoles, -) -from ..models.post_mortem_trigger_params_incident_condition_incident_type import ( - check_post_mortem_trigger_params_incident_condition_incident_type, + check_post_mortem_trigger_params_incident_condition_incident_roles, ) from ..models.post_mortem_trigger_params_incident_condition_incident_type import ( PostMortemTriggerParamsIncidentConditionIncidentType, + check_post_mortem_trigger_params_incident_condition_incident_type, ) from ..models.post_mortem_trigger_params_incident_condition_kind import ( + PostMortemTriggerParamsIncidentConditionKind, check_post_mortem_trigger_params_incident_condition_kind, ) -from ..models.post_mortem_trigger_params_incident_condition_kind import PostMortemTriggerParamsIncidentConditionKind from ..models.post_mortem_trigger_params_incident_condition_label import ( + PostMortemTriggerParamsIncidentConditionLabel, check_post_mortem_trigger_params_incident_condition_label, ) -from ..models.post_mortem_trigger_params_incident_condition_label import PostMortemTriggerParamsIncidentConditionLabel -from ..models.post_mortem_trigger_params_incident_condition_mitigated_at import ( - check_post_mortem_trigger_params_incident_condition_mitigated_at, -) from ..models.post_mortem_trigger_params_incident_condition_mitigated_at import ( PostMortemTriggerParamsIncidentConditionMitigatedAt, -) -from ..models.post_mortem_trigger_params_incident_condition_resolved_at import ( - check_post_mortem_trigger_params_incident_condition_resolved_at, + check_post_mortem_trigger_params_incident_condition_mitigated_at, ) from ..models.post_mortem_trigger_params_incident_condition_resolved_at import ( PostMortemTriggerParamsIncidentConditionResolvedAt, -) -from ..models.post_mortem_trigger_params_incident_condition_service import ( - check_post_mortem_trigger_params_incident_condition_service, + check_post_mortem_trigger_params_incident_condition_resolved_at, ) from ..models.post_mortem_trigger_params_incident_condition_service import ( PostMortemTriggerParamsIncidentConditionService, -) -from ..models.post_mortem_trigger_params_incident_condition_severity import ( - check_post_mortem_trigger_params_incident_condition_severity, + check_post_mortem_trigger_params_incident_condition_service, ) from ..models.post_mortem_trigger_params_incident_condition_severity import ( PostMortemTriggerParamsIncidentConditionSeverity, -) -from ..models.post_mortem_trigger_params_incident_condition_started_at import ( - check_post_mortem_trigger_params_incident_condition_started_at, + check_post_mortem_trigger_params_incident_condition_severity, ) from ..models.post_mortem_trigger_params_incident_condition_started_at import ( PostMortemTriggerParamsIncidentConditionStartedAt, + check_post_mortem_trigger_params_incident_condition_started_at, ) from ..models.post_mortem_trigger_params_incident_condition_status import ( + PostMortemTriggerParamsIncidentConditionStatus, check_post_mortem_trigger_params_incident_condition_status, ) -from ..models.post_mortem_trigger_params_incident_condition_status import PostMortemTriggerParamsIncidentConditionStatus -from ..models.post_mortem_trigger_params_incident_condition_sub_status import ( - check_post_mortem_trigger_params_incident_condition_sub_status, -) from ..models.post_mortem_trigger_params_incident_condition_sub_status import ( PostMortemTriggerParamsIncidentConditionSubStatus, -) -from ..models.post_mortem_trigger_params_incident_condition_summary import ( - check_post_mortem_trigger_params_incident_condition_summary, + check_post_mortem_trigger_params_incident_condition_sub_status, ) from ..models.post_mortem_trigger_params_incident_condition_summary import ( PostMortemTriggerParamsIncidentConditionSummary, -) -from ..models.post_mortem_trigger_params_incident_condition_visibility import ( - check_post_mortem_trigger_params_incident_condition_visibility, + check_post_mortem_trigger_params_incident_condition_summary, ) from ..models.post_mortem_trigger_params_incident_condition_visibility import ( PostMortemTriggerParamsIncidentConditionVisibility, -) -from ..models.post_mortem_trigger_params_incident_conditional_inactivity import ( - check_post_mortem_trigger_params_incident_conditional_inactivity, + check_post_mortem_trigger_params_incident_condition_visibility, ) from ..models.post_mortem_trigger_params_incident_conditional_inactivity import ( PostMortemTriggerParamsIncidentConditionalInactivity, + check_post_mortem_trigger_params_incident_conditional_inactivity, ) -from ..models.post_mortem_trigger_params_incident_kinds_item import check_post_mortem_trigger_params_incident_kinds_item -from ..models.post_mortem_trigger_params_incident_kinds_item import PostMortemTriggerParamsIncidentKindsItem -from ..models.post_mortem_trigger_params_incident_post_mortem_condition import ( - check_post_mortem_trigger_params_incident_post_mortem_condition, +from ..models.post_mortem_trigger_params_incident_kinds_item import ( + PostMortemTriggerParamsIncidentKindsItem, + check_post_mortem_trigger_params_incident_kinds_item, ) from ..models.post_mortem_trigger_params_incident_post_mortem_condition import ( PostMortemTriggerParamsIncidentPostMortemCondition, -) -from ..models.post_mortem_trigger_params_incident_post_mortem_condition_cause import ( - check_post_mortem_trigger_params_incident_post_mortem_condition_cause, + check_post_mortem_trigger_params_incident_post_mortem_condition, ) from ..models.post_mortem_trigger_params_incident_post_mortem_condition_cause import ( PostMortemTriggerParamsIncidentPostMortemConditionCause, -) -from ..models.post_mortem_trigger_params_incident_post_mortem_condition_status import ( - check_post_mortem_trigger_params_incident_post_mortem_condition_status, + check_post_mortem_trigger_params_incident_post_mortem_condition_cause, ) from ..models.post_mortem_trigger_params_incident_post_mortem_condition_status import ( PostMortemTriggerParamsIncidentPostMortemConditionStatus, -) -from ..models.post_mortem_trigger_params_incident_post_mortem_statuses_item import ( - check_post_mortem_trigger_params_incident_post_mortem_statuses_item, + check_post_mortem_trigger_params_incident_post_mortem_condition_status, ) from ..models.post_mortem_trigger_params_incident_post_mortem_statuses_item import ( PostMortemTriggerParamsIncidentPostMortemStatusesItem, + check_post_mortem_trigger_params_incident_post_mortem_statuses_item, ) from ..models.post_mortem_trigger_params_incident_statuses_item import ( + PostMortemTriggerParamsIncidentStatusesItem, check_post_mortem_trigger_params_incident_statuses_item, ) -from ..models.post_mortem_trigger_params_incident_statuses_item import PostMortemTriggerParamsIncidentStatusesItem -from ..models.post_mortem_trigger_params_trigger_type import check_post_mortem_trigger_params_trigger_type -from ..models.post_mortem_trigger_params_trigger_type import PostMortemTriggerParamsTriggerType +from ..models.post_mortem_trigger_params_trigger_type import ( + PostMortemTriggerParamsTriggerType, + check_post_mortem_trigger_params_trigger_type, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="PostMortemTriggerParams") diff --git a/rootly_sdk/models/print_task_params.py b/rootly_sdk/models/print_task_params.py index 3d663b5d..caf8f707 100644 --- a/rootly_sdk/models/print_task_params.py +++ b/rootly_sdk/models/print_task_params.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.print_task_params_task_type import PrintTaskParamsTaskType, check_print_task_params_task_type from ..types import UNSET, Unset -from ..models.print_task_params_task_type import check_print_task_params_task_type -from ..models.print_task_params_task_type import PrintTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="PrintTaskParams") diff --git a/rootly_sdk/models/publish_incident_task_params.py b/rootly_sdk/models/publish_incident_task_params.py index 75638948..62a95e4c 100644 --- a/rootly_sdk/models/publish_incident_task_params.py +++ b/rootly_sdk/models/publish_incident_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.publish_incident_task_params_status import ( + PublishIncidentTaskParamsStatus, + check_publish_incident_task_params_status, +) +from ..models.publish_incident_task_params_task_type import ( + PublishIncidentTaskParamsTaskType, + check_publish_incident_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.publish_incident_task_params_status import check_publish_incident_task_params_status -from ..models.publish_incident_task_params_status import PublishIncidentTaskParamsStatus -from ..models.publish_incident_task_params_task_type import check_publish_incident_task_params_task_type -from ..models.publish_incident_task_params_task_type import PublishIncidentTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.publish_incident_task_params_incident import PublishIncidentTaskParamsIncident from ..models.publish_incident_task_params_status_page_template import PublishIncidentTaskParamsStatusPageTemplate @@ -55,10 +56,6 @@ class PublishIncidentTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.publish_incident_task_params_incident import PublishIncidentTaskParamsIncident - from ..models.publish_incident_task_params_status_page_template import ( - PublishIncidentTaskParamsStatusPageTemplate, - ) incident = self.incident.to_dict() diff --git a/rootly_sdk/models/publish_incident_task_params_incident.py b/rootly_sdk/models/publish_incident_task_params_incident.py index 37c1d35f..2b20e7ca 100644 --- a/rootly_sdk/models/publish_incident_task_params_incident.py +++ b/rootly_sdk/models/publish_incident_task_params_incident.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PublishIncidentTaskParamsIncident") 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 cc8a21e7..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="PublishIncidentTaskParamsStatusPageTemplate") diff --git a/rootly_sdk/models/pulse.py b/rootly_sdk/models/pulse.py index 4d4613b8..d5f9b38b 100644 --- a/rootly_sdk/models/pulse.py +++ b/rootly_sdk/models/pulse.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.environment import Environment from ..models.pulse_data_type_0 import PulseDataType0 @@ -51,11 +48,9 @@ class Pulse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: + from ..models.pulse_data_type_0 import PulseDataType0 from ..models.pulse_labels_item_type_0 import PulseLabelsItemType0 - from ..models.service import Service from ..models.pulse_refs_item_type_0 import PulseRefsItemType0 - from ..models.environment import Environment - from ..models.pulse_data_type_0 import PulseDataType0 summary = self.summary diff --git a/rootly_sdk/models/pulse_data_type_0.py b/rootly_sdk/models/pulse_data_type_0.py index ee60671b..afcb2bbc 100644 --- a/rootly_sdk/models/pulse_data_type_0.py +++ b/rootly_sdk/models/pulse_data_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="PulseDataType0") diff --git a/rootly_sdk/models/pulse_labels_item_type_0.py b/rootly_sdk/models/pulse_labels_item_type_0.py index 7e6081f6..ff7e4e81 100644 --- a/rootly_sdk/models/pulse_labels_item_type_0.py +++ b/rootly_sdk/models/pulse_labels_item_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="PulseLabelsItemType0") diff --git a/rootly_sdk/models/pulse_list.py b/rootly_sdk/models/pulse_list.py index 1639dbaa..39a986bc 100644 --- a/rootly_sdk/models/pulse_list.py +++ b/rootly_sdk/models/pulse_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class PulseList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.pulse_list_data_item import PulseListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/pulse_list_data_item.py b/rootly_sdk/models/pulse_list_data_item.py index 11ec3cbd..2b770f8e 100644 --- a/rootly_sdk/models/pulse_list_data_item.py +++ b/rootly_sdk/models/pulse_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.pulse_list_data_item_type import check_pulse_list_data_item_type -from ..models.pulse_list_data_item_type import PulseListDataItemType -from typing import cast +from ..models.pulse_list_data_item_type import PulseListDataItemType, check_pulse_list_data_item_type if TYPE_CHECKING: from ..models.pulse import Pulse @@ -34,7 +30,6 @@ class PulseListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.pulse import Pulse id = self.id diff --git a/rootly_sdk/models/pulse_refs_item_type_0.py b/rootly_sdk/models/pulse_refs_item_type_0.py index 74c82441..c65c8b53 100644 --- a/rootly_sdk/models/pulse_refs_item_type_0.py +++ b/rootly_sdk/models/pulse_refs_item_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="PulseRefsItemType0") diff --git a/rootly_sdk/models/pulse_response.py b/rootly_sdk/models/pulse_response.py index c04b37d0..6268b8b5 100644 --- a/rootly_sdk/models/pulse_response.py +++ b/rootly_sdk/models/pulse_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.pulse_response_data import PulseResponseData @@ -32,8 +29,6 @@ class PulseResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.pulse_response_data import PulseResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/pulse_response_data.py b/rootly_sdk/models/pulse_response_data.py index ee1c5888..6efc7c8f 100644 --- a/rootly_sdk/models/pulse_response_data.py +++ b/rootly_sdk/models/pulse_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.pulse_response_data_type import check_pulse_response_data_type -from ..models.pulse_response_data_type import PulseResponseDataType -from typing import cast +from ..models.pulse_response_data_type import PulseResponseDataType, check_pulse_response_data_type if TYPE_CHECKING: from ..models.pulse import Pulse @@ -34,7 +30,6 @@ class PulseResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.pulse import Pulse id = self.id diff --git a/rootly_sdk/models/pulse_trigger_params.py b/rootly_sdk/models/pulse_trigger_params.py index c28f2608..138e75d9 100644 --- a/rootly_sdk/models/pulse_trigger_params.py +++ b/rootly_sdk/models/pulse_trigger_params.py @@ -1,29 +1,37 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.pulse_trigger_params_pulse_condition import ( + PulseTriggerParamsPulseCondition, + check_pulse_trigger_params_pulse_condition, +) +from ..models.pulse_trigger_params_pulse_condition_label import ( + PulseTriggerParamsPulseConditionLabel, + check_pulse_trigger_params_pulse_condition_label, +) +from ..models.pulse_trigger_params_pulse_condition_payload import ( + PulseTriggerParamsPulseConditionPayload, + check_pulse_trigger_params_pulse_condition_payload, +) +from ..models.pulse_trigger_params_pulse_condition_source import ( + PulseTriggerParamsPulseConditionSource, + check_pulse_trigger_params_pulse_condition_source, +) +from ..models.pulse_trigger_params_trigger_type import ( + PulseTriggerParamsTriggerType, + check_pulse_trigger_params_trigger_type, +) +from ..models.pulse_trigger_params_triggers_item import ( + PulseTriggerParamsTriggersItem, + check_pulse_trigger_params_triggers_item, +) from ..types import UNSET, Unset -from ..models.pulse_trigger_params_pulse_condition import check_pulse_trigger_params_pulse_condition -from ..models.pulse_trigger_params_pulse_condition import PulseTriggerParamsPulseCondition -from ..models.pulse_trigger_params_pulse_condition_label import check_pulse_trigger_params_pulse_condition_label -from ..models.pulse_trigger_params_pulse_condition_label import PulseTriggerParamsPulseConditionLabel -from ..models.pulse_trigger_params_pulse_condition_payload import check_pulse_trigger_params_pulse_condition_payload -from ..models.pulse_trigger_params_pulse_condition_payload import PulseTriggerParamsPulseConditionPayload -from ..models.pulse_trigger_params_pulse_condition_source import check_pulse_trigger_params_pulse_condition_source -from ..models.pulse_trigger_params_pulse_condition_source import PulseTriggerParamsPulseConditionSource -from ..models.pulse_trigger_params_trigger_type import check_pulse_trigger_params_trigger_type -from ..models.pulse_trigger_params_trigger_type import PulseTriggerParamsTriggerType -from ..models.pulse_trigger_params_triggers_item import check_pulse_trigger_params_triggers_item -from ..models.pulse_trigger_params_triggers_item import PulseTriggerParamsTriggersItem -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="PulseTriggerParams") diff --git a/rootly_sdk/models/receipt.py b/rootly_sdk/models/receipt.py index 77508ed9..1e6442b7 100644 --- a/rootly_sdk/models/receipt.py +++ b/rootly_sdk/models/receipt.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.receipt_reason import ReceiptReason, check_receipt_reason +from ..models.receipt_state import ReceiptState, check_receipt_state from ..types import UNSET, Unset -from ..models.receipt_reason import check_receipt_reason -from ..models.receipt_reason import ReceiptReason -from ..models.receipt_state import check_receipt_state -from ..models.receipt_state import ReceiptState -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Receipt") diff --git a/rootly_sdk/models/redis_client_task_params.py b/rootly_sdk/models/redis_client_task_params.py index 8944ff6f..4d4b9aab 100644 --- a/rootly_sdk/models/redis_client_task_params.py +++ b/rootly_sdk/models/redis_client_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.redis_client_task_params_task_type import ( + RedisClientTaskParamsTaskType, + check_redis_client_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.redis_client_task_params_task_type import check_redis_client_task_params_task_type -from ..models.redis_client_task_params_task_type import RedisClientTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.redis_client_task_params_post_to_slack_channels_item import ( RedisClientTaskParamsPostToSlackChannelsItem, @@ -45,9 +44,6 @@ class RedisClientTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.redis_client_task_params_post_to_slack_channels_item import ( - RedisClientTaskParamsPostToSlackChannelsItem, - ) url = self.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 f8381c51..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="RedisClientTaskParamsPostToSlackChannelsItem") 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 31c38b06..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,26 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.remove_google_docs_permissions_task_params_attribute_to_query_by import ( - check_remove_google_docs_permissions_task_params_attribute_to_query_by, -) from ..models.remove_google_docs_permissions_task_params_attribute_to_query_by import ( RemoveGoogleDocsPermissionsTaskParamsAttributeToQueryBy, + check_remove_google_docs_permissions_task_params_attribute_to_query_by, ) from ..models.remove_google_docs_permissions_task_params_task_type import ( + RemoveGoogleDocsPermissionsTaskParamsTaskType, check_remove_google_docs_permissions_task_params_task_type, ) -from ..models.remove_google_docs_permissions_task_params_task_type import RemoveGoogleDocsPermissionsTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="RemoveGoogleDocsPermissionsTaskParams") diff --git a/rootly_sdk/models/remove_subscribers.py b/rootly_sdk/models/remove_subscribers.py index 126858f8..84417031 100644 --- a/rootly_sdk/models/remove_subscribers.py +++ b/rootly_sdk/models/remove_subscribers.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.remove_subscribers_data import RemoveSubscribersData @@ -28,7 +24,6 @@ class RemoveSubscribers: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.remove_subscribers_data import RemoveSubscribersData data = self.data.to_dict() diff --git a/rootly_sdk/models/remove_subscribers_data.py b/rootly_sdk/models/remove_subscribers_data.py index 550c0335..0b101a4c 100644 --- a/rootly_sdk/models/remove_subscribers_data.py +++ b/rootly_sdk/models/remove_subscribers_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.remove_subscribers_data_type import check_remove_subscribers_data_type -from ..models.remove_subscribers_data_type import RemoveSubscribersDataType -from typing import cast +from ..models.remove_subscribers_data_type import RemoveSubscribersDataType, check_remove_subscribers_data_type if TYPE_CHECKING: from ..models.remove_subscribers_data_attributes import RemoveSubscribersDataAttributes @@ -32,7 +28,6 @@ class RemoveSubscribersData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.remove_subscribers_data_attributes import RemoveSubscribersDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/remove_subscribers_data_attributes.py b/rootly_sdk/models/remove_subscribers_data_attributes.py index 2b30ec4d..a2b72357 100644 --- a/rootly_sdk/models/remove_subscribers_data_attributes.py +++ b/rootly_sdk/models/remove_subscribers_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="RemoveSubscribersDataAttributes") diff --git a/rootly_sdk/models/rename_google_chat_space_task_params.py b/rootly_sdk/models/rename_google_chat_space_task_params.py index 66af95f5..d1b918ec 100644 --- a/rootly_sdk/models/rename_google_chat_space_task_params.py +++ b/rootly_sdk/models/rename_google_chat_space_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.rename_google_chat_space_task_params_task_type import ( + RenameGoogleChatSpaceTaskParamsTaskType, + check_rename_google_chat_space_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.rename_google_chat_space_task_params_task_type import check_rename_google_chat_space_task_params_task_type -from ..models.rename_google_chat_space_task_params_task_type import RenameGoogleChatSpaceTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.rename_google_chat_space_task_params_space import RenameGoogleChatSpaceTaskParamsSpace @@ -35,7 +34,6 @@ class RenameGoogleChatSpaceTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.rename_google_chat_space_task_params_space import RenameGoogleChatSpaceTaskParamsSpace space = self.space.to_dict() diff --git a/rootly_sdk/models/rename_google_chat_space_task_params_space.py b/rootly_sdk/models/rename_google_chat_space_task_params_space.py index d078ccb0..5b28cfb2 100644 --- a/rootly_sdk/models/rename_google_chat_space_task_params_space.py +++ b/rootly_sdk/models/rename_google_chat_space_task_params_space.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="RenameGoogleChatSpaceTaskParamsSpace") 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 195ccae1..c11439a6 100644 --- a/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py +++ b/rootly_sdk/models/rename_microsoft_teams_channel_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.rename_microsoft_teams_channel_task_params_task_type import ( + RenameMicrosoftTeamsChannelTaskParamsTaskType, check_rename_microsoft_teams_channel_task_params_task_type, ) -from ..models.rename_microsoft_teams_channel_task_params_task_type import RenameMicrosoftTeamsChannelTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.rename_microsoft_teams_channel_task_params_channel import RenameMicrosoftTeamsChannelTaskParamsChannel @@ -40,10 +37,6 @@ class RenameMicrosoftTeamsChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.rename_microsoft_teams_channel_task_params_channel import ( - RenameMicrosoftTeamsChannelTaskParamsChannel, - ) - from ..models.rename_microsoft_teams_channel_task_params_team import RenameMicrosoftTeamsChannelTaskParamsTeam team = self.team.to_dict() 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 fe14a8ad..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="RenameMicrosoftTeamsChannelTaskParamsChannel") 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 c4dda761..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="RenameMicrosoftTeamsChannelTaskParamsTeam") diff --git a/rootly_sdk/models/rename_slack_channel_task_params.py b/rootly_sdk/models/rename_slack_channel_task_params.py index 50d5c18e..1f7b3787 100644 --- a/rootly_sdk/models/rename_slack_channel_task_params.py +++ b/rootly_sdk/models/rename_slack_channel_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.rename_slack_channel_task_params_task_type import ( + RenameSlackChannelTaskParamsTaskType, + check_rename_slack_channel_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.rename_slack_channel_task_params_task_type import check_rename_slack_channel_task_params_task_type -from ..models.rename_slack_channel_task_params_task_type import RenameSlackChannelTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.rename_slack_channel_task_params_channel import RenameSlackChannelTaskParamsChannel @@ -35,7 +34,6 @@ class RenameSlackChannelTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.rename_slack_channel_task_params_channel import RenameSlackChannelTaskParamsChannel channel = self.channel.to_dict() 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 8c60de6d..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="RenameSlackChannelTaskParamsChannel") diff --git a/rootly_sdk/models/resolve_alert.py b/rootly_sdk/models/resolve_alert.py index 2e3c5cf8..5ceee88f 100644 --- a/rootly_sdk/models/resolve_alert.py +++ b/rootly_sdk/models/resolve_alert.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.resolve_alert_data import ResolveAlertData @@ -29,7 +26,6 @@ class ResolveAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.resolve_alert_data import ResolveAlertData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/resolve_alert_data.py b/rootly_sdk/models/resolve_alert_data.py index 73df8cd0..52f09fcf 100644 --- a/rootly_sdk/models/resolve_alert_data.py +++ b/rootly_sdk/models/resolve_alert_data.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.resolve_alert_data_type import ResolveAlertDataType, check_resolve_alert_data_type from ..types import UNSET, Unset -from ..models.resolve_alert_data_type import check_resolve_alert_data_type -from ..models.resolve_alert_data_type import ResolveAlertDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.resolve_alert_data_attributes import ResolveAlertDataAttributes @@ -33,7 +29,6 @@ class ResolveAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.resolve_alert_data_attributes import ResolveAlertDataAttributes type_: str | Unset = UNSET if not isinstance(self.type_, Unset): diff --git a/rootly_sdk/models/resolve_alert_data_attributes.py b/rootly_sdk/models/resolve_alert_data_attributes.py index 85281970..145979dc 100644 --- a/rootly_sdk/models/resolve_alert_data_attributes.py +++ b/rootly_sdk/models/resolve_alert_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="ResolveAlertDataAttributes") diff --git a/rootly_sdk/models/resolve_incident.py b/rootly_sdk/models/resolve_incident.py index ddc07c28..3b7dca45 100644 --- a/rootly_sdk/models/resolve_incident.py +++ b/rootly_sdk/models/resolve_incident.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.resolve_incident_data import ResolveIncidentData @@ -28,7 +24,6 @@ class ResolveIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.resolve_incident_data import ResolveIncidentData data = self.data.to_dict() diff --git a/rootly_sdk/models/resolve_incident_data.py b/rootly_sdk/models/resolve_incident_data.py index 43702cfe..2a3d672f 100644 --- a/rootly_sdk/models/resolve_incident_data.py +++ b/rootly_sdk/models/resolve_incident_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.resolve_incident_data_type import check_resolve_incident_data_type -from ..models.resolve_incident_data_type import ResolveIncidentDataType -from typing import cast +from ..models.resolve_incident_data_type import ResolveIncidentDataType, check_resolve_incident_data_type if TYPE_CHECKING: from ..models.resolve_incident_data_attributes import ResolveIncidentDataAttributes @@ -32,7 +28,6 @@ class ResolveIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.resolve_incident_data_attributes import ResolveIncidentDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/resolve_incident_data_attributes.py b/rootly_sdk/models/resolve_incident_data_attributes.py index 68a84eff..f692c9d9 100644 --- a/rootly_sdk/models/resolve_incident_data_attributes.py +++ b/rootly_sdk/models/resolve_incident_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="ResolveIncidentDataAttributes") diff --git a/rootly_sdk/models/restart_incident.py b/rootly_sdk/models/restart_incident.py index 876c066b..491f2a4a 100644 --- a/rootly_sdk/models/restart_incident.py +++ b/rootly_sdk/models/restart_incident.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.restart_incident_data import RestartIncidentData @@ -28,7 +24,6 @@ class RestartIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.restart_incident_data import RestartIncidentData data = self.data.to_dict() diff --git a/rootly_sdk/models/restart_incident_data.py b/rootly_sdk/models/restart_incident_data.py index 34dfc0ff..0be77f7c 100644 --- a/rootly_sdk/models/restart_incident_data.py +++ b/rootly_sdk/models/restart_incident_data.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.restart_incident_data_type import RestartIncidentDataType, check_restart_incident_data_type from ..types import UNSET, Unset -from ..models.restart_incident_data_type import check_restart_incident_data_type -from ..models.restart_incident_data_type import RestartIncidentDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.restart_incident_data_attributes import RestartIncidentDataAttributes @@ -33,7 +29,6 @@ class RestartIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.restart_incident_data_attributes import RestartIncidentDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/restart_incident_data_attributes.py b/rootly_sdk/models/restart_incident_data_attributes.py index feba786c..3d95b753 100644 --- a/rootly_sdk/models/restart_incident_data_attributes.py +++ b/rootly_sdk/models/restart_incident_data_attributes.py @@ -1,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="RestartIncidentDataAttributes") diff --git a/rootly_sdk/models/retrospective_configuration.py b/rootly_sdk/models/retrospective_configuration.py index 48793c1a..f2ccd845 100644 --- a/rootly_sdk/models/retrospective_configuration.py +++ b/rootly_sdk/models/retrospective_configuration.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.retrospective_configuration_kind import ( + RetrospectiveConfigurationKind, + check_retrospective_configuration_kind, +) from ..types import UNSET, Unset -from ..models.retrospective_configuration_kind import check_retrospective_configuration_kind -from ..models.retrospective_configuration_kind import RetrospectiveConfigurationKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="RetrospectiveConfiguration") diff --git a/rootly_sdk/models/retrospective_configuration_list.py b/rootly_sdk/models/retrospective_configuration_list.py index c077e708..729d9b07 100644 --- a/rootly_sdk/models/retrospective_configuration_list.py +++ b/rootly_sdk/models/retrospective_configuration_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_list_data_item import RetrospectiveConfigurationListDataItem @@ -32,8 +29,6 @@ class RetrospectiveConfigurationList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_configuration_list_data_item import RetrospectiveConfigurationListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/retrospective_configuration_list_data_item.py b/rootly_sdk/models/retrospective_configuration_list_data_item.py index 784722ab..fc365e1b 100644 --- a/rootly_sdk/models/retrospective_configuration_list_data_item.py +++ b/rootly_sdk/models/retrospective_configuration_list_data_item.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.retrospective_configuration_list_data_item_type import ( + RetrospectiveConfigurationListDataItemType, check_retrospective_configuration_list_data_item_type, ) -from ..models.retrospective_configuration_list_data_item_type import RetrospectiveConfigurationListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.retrospective_configuration import RetrospectiveConfiguration @@ -36,7 +33,6 @@ class RetrospectiveConfigurationListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_configuration import RetrospectiveConfiguration id = self.id diff --git a/rootly_sdk/models/retrospective_configuration_response.py b/rootly_sdk/models/retrospective_configuration_response.py index 51633a9c..bd588e56 100644 --- a/rootly_sdk/models/retrospective_configuration_response.py +++ b/rootly_sdk/models/retrospective_configuration_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_configuration_response_data import RetrospectiveConfigurationResponseData @@ -32,8 +29,6 @@ class RetrospectiveConfigurationResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_configuration_response_data import RetrospectiveConfigurationResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/retrospective_configuration_response_data.py b/rootly_sdk/models/retrospective_configuration_response_data.py index 8d170052..0de247d5 100644 --- a/rootly_sdk/models/retrospective_configuration_response_data.py +++ b/rootly_sdk/models/retrospective_configuration_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.retrospective_configuration_response_data_type import check_retrospective_configuration_response_data_type -from ..models.retrospective_configuration_response_data_type import RetrospectiveConfigurationResponseDataType -from typing import cast +from ..models.retrospective_configuration_response_data_type import ( + RetrospectiveConfigurationResponseDataType, + check_retrospective_configuration_response_data_type, +) if TYPE_CHECKING: from ..models.retrospective_configuration import RetrospectiveConfiguration @@ -34,7 +33,6 @@ class RetrospectiveConfigurationResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_configuration import RetrospectiveConfiguration id = self.id diff --git a/rootly_sdk/models/retrospective_process.py b/rootly_sdk/models/retrospective_process.py index 3fb99528..05b0511d 100644 --- a/rootly_sdk/models/retrospective_process.py +++ b/rootly_sdk/models/retrospective_process.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.retrospective_process_retrospective_process_matching_criteria_type_0 import ( RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0, @@ -56,15 +53,12 @@ class RetrospectiveProcess: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process_retrospective_process_matching_criteria_type_2 import ( - RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2, + from ..models.retrospective_process_retrospective_process_matching_criteria_type_0 import ( + RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0, ) from ..models.retrospective_process_retrospective_process_matching_criteria_type_1 import ( RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1, ) - from ..models.retrospective_process_retrospective_process_matching_criteria_type_0 import ( - RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0, - ) name = self.name diff --git a/rootly_sdk/models/retrospective_process_group.py b/rootly_sdk/models/retrospective_process_group.py index f17f622c..c6214add 100644 --- a/rootly_sdk/models/retrospective_process_group.py +++ b/rootly_sdk/models/retrospective_process_group.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="RetrospectiveProcessGroup") diff --git a/rootly_sdk/models/retrospective_process_group_list.py b/rootly_sdk/models/retrospective_process_group_list.py index fc85ec05..c61ee6a9 100644 --- a/rootly_sdk/models/retrospective_process_group_list.py +++ b/rootly_sdk/models/retrospective_process_group_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class RetrospectiveProcessGroupList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.retrospective_process_group_list_data_item import RetrospectiveProcessGroupListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 4d49fe51..019912a5 100644 --- a/rootly_sdk/models/retrospective_process_group_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_group_list_data_item.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.retrospective_process_group_list_data_item_type import ( + RetrospectiveProcessGroupListDataItemType, check_retrospective_process_group_list_data_item_type, ) -from ..models.retrospective_process_group_list_data_item_type import RetrospectiveProcessGroupListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.retrospective_process_group import RetrospectiveProcessGroup @@ -36,7 +33,6 @@ class RetrospectiveProcessGroupListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process_group import RetrospectiveProcessGroup id = self.id diff --git a/rootly_sdk/models/retrospective_process_group_response.py b/rootly_sdk/models/retrospective_process_group_response.py index 85ccde29..0b29d413 100644 --- a/rootly_sdk/models/retrospective_process_group_response.py +++ b/rootly_sdk/models/retrospective_process_group_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_response_data import RetrospectiveProcessGroupResponseData @@ -32,8 +29,6 @@ class RetrospectiveProcessGroupResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.retrospective_process_group_response_data import RetrospectiveProcessGroupResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/retrospective_process_group_response_data.py b/rootly_sdk/models/retrospective_process_group_response_data.py index 59cddffb..ea3a5523 100644 --- a/rootly_sdk/models/retrospective_process_group_response_data.py +++ b/rootly_sdk/models/retrospective_process_group_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.retrospective_process_group_response_data_type import check_retrospective_process_group_response_data_type -from ..models.retrospective_process_group_response_data_type import RetrospectiveProcessGroupResponseDataType -from typing import cast +from ..models.retrospective_process_group_response_data_type import ( + RetrospectiveProcessGroupResponseDataType, + check_retrospective_process_group_response_data_type, +) if TYPE_CHECKING: from ..models.retrospective_process_group import RetrospectiveProcessGroup @@ -34,7 +33,6 @@ class RetrospectiveProcessGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process_group import RetrospectiveProcessGroup id = self.id diff --git a/rootly_sdk/models/retrospective_process_group_step.py b/rootly_sdk/models/retrospective_process_group_step.py index 3aa14e0b..d03eeab7 100644 --- a/rootly_sdk/models/retrospective_process_group_step.py +++ b/rootly_sdk/models/retrospective_process_group_step.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="RetrospectiveProcessGroupStep") diff --git a/rootly_sdk/models/retrospective_process_group_step_list.py b/rootly_sdk/models/retrospective_process_group_step_list.py index 9fe5a3fe..555ec62f 100644 --- a/rootly_sdk/models/retrospective_process_group_step_list.py +++ b/rootly_sdk/models/retrospective_process_group_step_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class RetrospectiveProcessGroupStepList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process_group_step_list_data_item import RetrospectiveProcessGroupStepListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 0ce8c5d9..ebf584e3 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,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.retrospective_process_group_step_list_data_item_type import ( + RetrospectiveProcessGroupStepListDataItemType, check_retrospective_process_group_step_list_data_item_type, ) -from ..models.retrospective_process_group_step_list_data_item_type import RetrospectiveProcessGroupStepListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.retrospective_process_group_step import RetrospectiveProcessGroupStep @@ -36,7 +33,6 @@ class RetrospectiveProcessGroupStepListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process_group_step import RetrospectiveProcessGroupStep id = self.id diff --git a/rootly_sdk/models/retrospective_process_group_step_response.py b/rootly_sdk/models/retrospective_process_group_step_response.py index 773bf1ac..857efd29 100644 --- a/rootly_sdk/models/retrospective_process_group_step_response.py +++ b/rootly_sdk/models/retrospective_process_group_step_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_group_step_response_data import RetrospectiveProcessGroupStepResponseData @@ -32,8 +29,6 @@ class RetrospectiveProcessGroupStepResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process_group_step_response_data import RetrospectiveProcessGroupStepResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() 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 83ba8529..22381d50 100644 --- a/rootly_sdk/models/retrospective_process_group_step_response_data.py +++ b/rootly_sdk/models/retrospective_process_group_step_response_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.retrospective_process_group_step_response_data_type import ( + RetrospectiveProcessGroupStepResponseDataType, check_retrospective_process_group_step_response_data_type, ) -from ..models.retrospective_process_group_step_response_data_type import RetrospectiveProcessGroupStepResponseDataType -from typing import cast if TYPE_CHECKING: from ..models.retrospective_process_group_step import RetrospectiveProcessGroupStep @@ -36,7 +33,6 @@ class RetrospectiveProcessGroupStepResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process_group_step import RetrospectiveProcessGroupStep id = self.id diff --git a/rootly_sdk/models/retrospective_process_list.py b/rootly_sdk/models/retrospective_process_list.py index 6fbe08f4..5afa0273 100644 --- a/rootly_sdk/models/retrospective_process_list.py +++ b/rootly_sdk/models/retrospective_process_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class RetrospectiveProcessList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.retrospective_process_list_data_item import RetrospectiveProcessListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/retrospective_process_list_data_item.py b/rootly_sdk/models/retrospective_process_list_data_item.py index 23f308b3..2d5f8fd7 100644 --- a/rootly_sdk/models/retrospective_process_list_data_item.py +++ b/rootly_sdk/models/retrospective_process_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.retrospective_process_list_data_item_type import check_retrospective_process_list_data_item_type -from ..models.retrospective_process_list_data_item_type import RetrospectiveProcessListDataItemType -from typing import cast +from ..models.retrospective_process_list_data_item_type import ( + RetrospectiveProcessListDataItemType, + check_retrospective_process_list_data_item_type, +) if TYPE_CHECKING: from ..models.retrospective_process import RetrospectiveProcess @@ -34,7 +33,6 @@ class RetrospectiveProcessListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process import RetrospectiveProcess id = self.id diff --git a/rootly_sdk/models/retrospective_process_response.py b/rootly_sdk/models/retrospective_process_response.py index 132b6d56..0ee37bf2 100644 --- a/rootly_sdk/models/retrospective_process_response.py +++ b/rootly_sdk/models/retrospective_process_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_process_response_data import RetrospectiveProcessResponseData @@ -32,8 +29,6 @@ class RetrospectiveProcessResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process_response_data import RetrospectiveProcessResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/retrospective_process_response_data.py b/rootly_sdk/models/retrospective_process_response_data.py index bb4029df..de0061c5 100644 --- a/rootly_sdk/models/retrospective_process_response_data.py +++ b/rootly_sdk/models/retrospective_process_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.retrospective_process_response_data_type import check_retrospective_process_response_data_type -from ..models.retrospective_process_response_data_type import RetrospectiveProcessResponseDataType -from typing import cast +from ..models.retrospective_process_response_data_type import ( + RetrospectiveProcessResponseDataType, + check_retrospective_process_response_data_type, +) if TYPE_CHECKING: from ..models.retrospective_process import RetrospectiveProcess @@ -34,7 +33,6 @@ class RetrospectiveProcessResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_process import RetrospectiveProcess id = self.id 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 9f974ab8..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,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType0") 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 6eaed4b9..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,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType1") 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 9426cb50..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,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="RetrospectiveProcessRetrospectiveProcessMatchingCriteriaType2") diff --git a/rootly_sdk/models/retrospective_step.py b/rootly_sdk/models/retrospective_step.py index 72bd6cbd..2f2c7941 100644 --- a/rootly_sdk/models/retrospective_step.py +++ b/rootly_sdk/models/retrospective_step.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="RetrospectiveStep") diff --git a/rootly_sdk/models/retrospective_step_list.py b/rootly_sdk/models/retrospective_step_list.py index 7a95dc96..217ff699 100644 --- a/rootly_sdk/models/retrospective_step_list.py +++ b/rootly_sdk/models/retrospective_step_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class RetrospectiveStepList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_step_list_data_item import RetrospectiveStepListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/retrospective_step_list_data_item.py b/rootly_sdk/models/retrospective_step_list_data_item.py index 00f0b08f..8b3f2ac7 100644 --- a/rootly_sdk/models/retrospective_step_list_data_item.py +++ b/rootly_sdk/models/retrospective_step_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.retrospective_step_list_data_item_type import check_retrospective_step_list_data_item_type -from ..models.retrospective_step_list_data_item_type import RetrospectiveStepListDataItemType -from typing import cast +from ..models.retrospective_step_list_data_item_type import ( + RetrospectiveStepListDataItemType, + check_retrospective_step_list_data_item_type, +) if TYPE_CHECKING: from ..models.retrospective_step import RetrospectiveStep @@ -34,7 +33,6 @@ class RetrospectiveStepListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_step import RetrospectiveStep id = self.id diff --git a/rootly_sdk/models/retrospective_step_response.py b/rootly_sdk/models/retrospective_step_response.py index 1fd905fe..be53a1f7 100644 --- a/rootly_sdk/models/retrospective_step_response.py +++ b/rootly_sdk/models/retrospective_step_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.retrospective_step_response_data import RetrospectiveStepResponseData @@ -32,8 +29,6 @@ class RetrospectiveStepResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_step_response_data import RetrospectiveStepResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/retrospective_step_response_data.py b/rootly_sdk/models/retrospective_step_response_data.py index 9a8ec7f1..61cc6489 100644 --- a/rootly_sdk/models/retrospective_step_response_data.py +++ b/rootly_sdk/models/retrospective_step_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.retrospective_step_response_data_type import check_retrospective_step_response_data_type -from ..models.retrospective_step_response_data_type import RetrospectiveStepResponseDataType -from typing import cast +from ..models.retrospective_step_response_data_type import ( + RetrospectiveStepResponseDataType, + check_retrospective_step_response_data_type, +) if TYPE_CHECKING: from ..models.retrospective_step import RetrospectiveStep @@ -34,7 +33,6 @@ class RetrospectiveStepResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.retrospective_step import RetrospectiveStep id = self.id diff --git a/rootly_sdk/models/role.py b/rootly_sdk/models/role.py index d4353f5a..58edeedd 100644 --- a/rootly_sdk/models/role.py +++ b/rootly_sdk/models/role.py @@ -1,83 +1,97 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.role_alerts_permissions_item import RoleAlertsPermissionsItem, check_role_alerts_permissions_item +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, +) +from ..models.role_form_fields_permissions_item import ( + RoleFormFieldsPermissionsItem, + check_role_form_fields_permissions_item, +) +from ..models.role_functionalities_permissions_item import ( + RoleFunctionalitiesPermissionsItem, + check_role_functionalities_permissions_item, +) +from ..models.role_groups_permissions_item import RoleGroupsPermissionsItem, check_role_groups_permissions_item +from ..models.role_incident_causes_permissions_item import ( + 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, +) +from ..models.role_incident_roles_permissions_item import ( + RoleIncidentRolesPermissionsItem, + check_role_incident_roles_permissions_item, +) +from ..models.role_incident_types_permissions_item import ( + RoleIncidentTypesPermissionsItem, + check_role_incident_types_permissions_item, +) +from ..models.role_incidents_permissions_item import RoleIncidentsPermissionsItem, check_role_incidents_permissions_item +from ..models.role_integrations_permissions_item import ( + RoleIntegrationsPermissionsItem, + check_role_integrations_permissions_item, +) +from ..models.role_invitations_permissions_item import ( + 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, + check_role_private_incidents_permissions_item, +) +from ..models.role_pulses_permissions_item import RolePulsesPermissionsItem, check_role_pulses_permissions_item +from ..models.role_retrospective_permissions_item import ( + RoleRetrospectivePermissionsItem, + check_role_retrospective_permissions_item, +) +from ..models.role_roles_permissions_item import RoleRolesPermissionsItem, check_role_roles_permissions_item +from ..models.role_secrets_permissions_item import RoleSecretsPermissionsItem, check_role_secrets_permissions_item +from ..models.role_services_permissions_item import RoleServicesPermissionsItem, check_role_services_permissions_item +from ..models.role_severities_permissions_item import ( + 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 -from ..models.role_alerts_permissions_item import check_role_alerts_permissions_item -from ..models.role_alerts_permissions_item import RoleAlertsPermissionsItem -from ..models.role_api_keys_permissions_item import check_role_api_keys_permissions_item -from ..models.role_api_keys_permissions_item import RoleApiKeysPermissionsItem -from ..models.role_audits_permissions_item import check_role_audits_permissions_item -from ..models.role_audits_permissions_item import RoleAuditsPermissionsItem -from ..models.role_billing_permissions_item import check_role_billing_permissions_item -from ..models.role_billing_permissions_item import RoleBillingPermissionsItem -from ..models.role_catalogs_permissions_item import check_role_catalogs_permissions_item -from ..models.role_catalogs_permissions_item import RoleCatalogsPermissionsItem -from ..models.role_communication_permissions_item import check_role_communication_permissions_item -from ..models.role_communication_permissions_item import RoleCommunicationPermissionsItem -from ..models.role_edge_connector_permissions_item import check_role_edge_connector_permissions_item -from ..models.role_edge_connector_permissions_item import RoleEdgeConnectorPermissionsItem -from ..models.role_environments_permissions_item import check_role_environments_permissions_item -from ..models.role_environments_permissions_item import RoleEnvironmentsPermissionsItem -from ..models.role_form_fields_permissions_item import check_role_form_fields_permissions_item -from ..models.role_form_fields_permissions_item import RoleFormFieldsPermissionsItem -from ..models.role_functionalities_permissions_item import check_role_functionalities_permissions_item -from ..models.role_functionalities_permissions_item import RoleFunctionalitiesPermissionsItem -from ..models.role_groups_permissions_item import check_role_groups_permissions_item -from ..models.role_groups_permissions_item import RoleGroupsPermissionsItem -from ..models.role_incident_causes_permissions_item import check_role_incident_causes_permissions_item -from ..models.role_incident_causes_permissions_item import RoleIncidentCausesPermissionsItem -from ..models.role_incident_communication_permissions_item import check_role_incident_communication_permissions_item -from ..models.role_incident_communication_permissions_item import RoleIncidentCommunicationPermissionsItem -from ..models.role_incident_feedbacks_permissions_item import check_role_incident_feedbacks_permissions_item -from ..models.role_incident_feedbacks_permissions_item import RoleIncidentFeedbacksPermissionsItem -from ..models.role_incident_roles_permissions_item import check_role_incident_roles_permissions_item -from ..models.role_incident_roles_permissions_item import RoleIncidentRolesPermissionsItem -from ..models.role_incident_types_permissions_item import check_role_incident_types_permissions_item -from ..models.role_incident_types_permissions_item import RoleIncidentTypesPermissionsItem -from ..models.role_incidents_permissions_item import check_role_incidents_permissions_item -from ..models.role_incidents_permissions_item import RoleIncidentsPermissionsItem -from ..models.role_integrations_permissions_item import check_role_integrations_permissions_item -from ..models.role_integrations_permissions_item import RoleIntegrationsPermissionsItem -from ..models.role_invitations_permissions_item import check_role_invitations_permissions_item -from ..models.role_invitations_permissions_item import RoleInvitationsPermissionsItem -from ..models.role_paging_permissions_item import check_role_paging_permissions_item -from ..models.role_paging_permissions_item import RolePagingPermissionsItem -from ..models.role_playbooks_permissions_item import check_role_playbooks_permissions_item -from ..models.role_playbooks_permissions_item import RolePlaybooksPermissionsItem -from ..models.role_private_incidents_permissions_item import check_role_private_incidents_permissions_item -from ..models.role_private_incidents_permissions_item import RolePrivateIncidentsPermissionsItem -from ..models.role_pulses_permissions_item import check_role_pulses_permissions_item -from ..models.role_pulses_permissions_item import RolePulsesPermissionsItem -from ..models.role_retrospective_permissions_item import check_role_retrospective_permissions_item -from ..models.role_retrospective_permissions_item import RoleRetrospectivePermissionsItem -from ..models.role_roles_permissions_item import check_role_roles_permissions_item -from ..models.role_roles_permissions_item import RoleRolesPermissionsItem -from ..models.role_secrets_permissions_item import check_role_secrets_permissions_item -from ..models.role_secrets_permissions_item import RoleSecretsPermissionsItem -from ..models.role_services_permissions_item import check_role_services_permissions_item -from ..models.role_services_permissions_item import RoleServicesPermissionsItem -from ..models.role_severities_permissions_item import check_role_severities_permissions_item -from ..models.role_severities_permissions_item import RoleSeveritiesPermissionsItem -from ..models.role_slas_permissions_item import check_role_slas_permissions_item -from ..models.role_slas_permissions_item import RoleSlasPermissionsItem -from ..models.role_status_pages_permissions_item import check_role_status_pages_permissions_item -from ..models.role_status_pages_permissions_item import RoleStatusPagesPermissionsItem -from ..models.role_sub_statuses_permissions_item import check_role_sub_statuses_permissions_item -from ..models.role_sub_statuses_permissions_item import RoleSubStatusesPermissionsItem -from ..models.role_webhooks_permissions_item import check_role_webhooks_permissions_item -from ..models.role_webhooks_permissions_item import RoleWebhooksPermissionsItem -from ..models.role_workflows_permissions_item import check_role_workflows_permissions_item -from ..models.role_workflows_permissions_item import RoleWorkflowsPermissionsItem -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Role") diff --git a/rootly_sdk/models/role_list.py b/rootly_sdk/models/role_list.py index 103839fc..84c2a73f 100644 --- a/rootly_sdk/models/role_list.py +++ b/rootly_sdk/models/role_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class RoleList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.role_list_data_item import RoleListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/role_list_data_item.py b/rootly_sdk/models/role_list_data_item.py index a7634784..71ba6db3 100644 --- a/rootly_sdk/models/role_list_data_item.py +++ b/rootly_sdk/models/role_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.role_list_data_item_type import check_role_list_data_item_type -from ..models.role_list_data_item_type import RoleListDataItemType -from typing import cast +from ..models.role_list_data_item_type import RoleListDataItemType, check_role_list_data_item_type if TYPE_CHECKING: from ..models.role import Role @@ -34,7 +30,6 @@ class RoleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.role import Role id = self.id diff --git a/rootly_sdk/models/role_relationship.py b/rootly_sdk/models/role_relationship.py index b7b8ad95..a8a730e0 100644 --- a/rootly_sdk/models/role_relationship.py +++ b/rootly_sdk/models/role_relationship.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.role_relationship_data_type_0 import RoleRelationshipDataType0 diff --git a/rootly_sdk/models/role_relationship_data_type_0.py b/rootly_sdk/models/role_relationship_data_type_0.py index e175dabf..6a7576ec 100644 --- a/rootly_sdk/models/role_relationship_data_type_0.py +++ b/rootly_sdk/models/role_relationship_data_type_0.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.role_relationship_data_type_0_type import ( + RoleRelationshipDataType0Type, + check_role_relationship_data_type_0_type, +) from ..types import UNSET, Unset -from ..models.role_relationship_data_type_0_type import check_role_relationship_data_type_0_type -from ..models.role_relationship_data_type_0_type import RoleRelationshipDataType0Type -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="RoleRelationshipDataType0") diff --git a/rootly_sdk/models/role_response.py b/rootly_sdk/models/role_response.py index fed433ca..a8768453 100644 --- a/rootly_sdk/models/role_response.py +++ b/rootly_sdk/models/role_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.role_response_data import RoleResponseData @@ -32,8 +29,6 @@ class RoleResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.role_response_data import RoleResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/role_response_data.py b/rootly_sdk/models/role_response_data.py index 3c335695..a238ec70 100644 --- a/rootly_sdk/models/role_response_data.py +++ b/rootly_sdk/models/role_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.role_response_data_type import check_role_response_data_type -from ..models.role_response_data_type import RoleResponseDataType -from typing import cast +from ..models.role_response_data_type import RoleResponseDataType, check_role_response_data_type if TYPE_CHECKING: from ..models.role import Role @@ -34,7 +30,6 @@ class RoleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.role import Role id = self.id diff --git a/rootly_sdk/models/rotate_api_key.py b/rootly_sdk/models/rotate_api_key.py index f88735d8..1b5e928b 100644 --- a/rootly_sdk/models/rotate_api_key.py +++ b/rootly_sdk/models/rotate_api_key.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.rotate_api_key_data import RotateApiKeyData @@ -28,7 +24,6 @@ class RotateApiKey: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.rotate_api_key_data import RotateApiKeyData data = self.data.to_dict() diff --git a/rootly_sdk/models/rotate_api_key_data.py b/rootly_sdk/models/rotate_api_key_data.py index 84a0498a..be73db86 100644 --- a/rootly_sdk/models/rotate_api_key_data.py +++ b/rootly_sdk/models/rotate_api_key_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.rotate_api_key_data_type import check_rotate_api_key_data_type -from ..models.rotate_api_key_data_type import RotateApiKeyDataType -from typing import cast +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 @@ -32,7 +28,6 @@ class RotateApiKeyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.rotate_api_key_data_attributes import RotateApiKeyDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/rotate_api_key_data_attributes.py b/rootly_sdk/models/rotate_api_key_data_attributes.py index 475e5b60..a65b88c0 100644 --- a/rootly_sdk/models/rotate_api_key_data_attributes.py +++ b/rootly_sdk/models/rotate_api_key_data_attributes.py @@ -1,18 +1,13 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +from ..types import UNSET, Unset T = TypeVar("T", bound="RotateApiKeyDataAttributes") diff --git a/rootly_sdk/models/run_command_heroku_task_params.py b/rootly_sdk/models/run_command_heroku_task_params.py index b4488535..cfc9232e 100644 --- a/rootly_sdk/models/run_command_heroku_task_params.py +++ b/rootly_sdk/models/run_command_heroku_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.run_command_heroku_task_params_size import ( + RunCommandHerokuTaskParamsSize, + check_run_command_heroku_task_params_size, +) +from ..models.run_command_heroku_task_params_task_type import ( + RunCommandHerokuTaskParamsTaskType, + check_run_command_heroku_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.run_command_heroku_task_params_size import check_run_command_heroku_task_params_size -from ..models.run_command_heroku_task_params_size import RunCommandHerokuTaskParamsSize -from ..models.run_command_heroku_task_params_task_type import check_run_command_heroku_task_params_task_type -from ..models.run_command_heroku_task_params_task_type import RunCommandHerokuTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.run_command_heroku_task_params_post_to_slack_channels_item import ( RunCommandHerokuTaskParamsPostToSlackChannelsItem, @@ -45,9 +46,6 @@ class RunCommandHerokuTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.run_command_heroku_task_params_post_to_slack_channels_item import ( - RunCommandHerokuTaskParamsPostToSlackChannelsItem, - ) command = self.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 08bce14e..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="RunCommandHerokuTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/schedule.py b/rootly_sdk/models/schedule.py index 6f2f1ef4..a876f69e 100644 --- a/rootly_sdk/models/schedule.py +++ b/rootly_sdk/models/schedule.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.schedule_shift_report_day_of_week import ( + ScheduleShiftReportDayOfWeek, + check_schedule_shift_report_day_of_week, +) from ..types import UNSET, Unset -from ..models.schedule_shift_report_day_of_week import check_schedule_shift_report_day_of_week -from ..models.schedule_shift_report_day_of_week import ScheduleShiftReportDayOfWeek -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.schedule_slack_channel_type_0 import ScheduleSlackChannelType0 from ..models.schedule_slack_user_group_type_0 import ScheduleSlackUserGroupType0 @@ -68,8 +67,8 @@ class Schedule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_slack_user_group_type_0 import ScheduleSlackUserGroupType0 from ..models.schedule_slack_channel_type_0 import ScheduleSlackChannelType0 + from ..models.schedule_slack_user_group_type_0 import ScheduleSlackUserGroupType0 name = self.name diff --git a/rootly_sdk/models/schedule_list.py b/rootly_sdk/models/schedule_list.py index 453275ed..1565c112 100644 --- a/rootly_sdk/models/schedule_list.py +++ b/rootly_sdk/models/schedule_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class ScheduleList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.schedule_list_data_item import ScheduleListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/schedule_list_data_item.py b/rootly_sdk/models/schedule_list_data_item.py index 476596d1..9e0cb37f 100644 --- a/rootly_sdk/models/schedule_list_data_item.py +++ b/rootly_sdk/models/schedule_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.schedule_list_data_item_type import check_schedule_list_data_item_type -from ..models.schedule_list_data_item_type import ScheduleListDataItemType -from typing import cast +from ..models.schedule_list_data_item_type import ScheduleListDataItemType, check_schedule_list_data_item_type if TYPE_CHECKING: from ..models.schedule import Schedule @@ -34,7 +30,6 @@ class ScheduleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule import Schedule id = self.id diff --git a/rootly_sdk/models/schedule_response.py b/rootly_sdk/models/schedule_response.py index 2061d78a..35a66c8e 100644 --- a/rootly_sdk/models/schedule_response.py +++ b/rootly_sdk/models/schedule_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_response_data import ScheduleResponseData @@ -32,8 +29,6 @@ class ScheduleResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_response_data import ScheduleResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/schedule_response_data.py b/rootly_sdk/models/schedule_response_data.py index a969c1c8..523ab23b 100644 --- a/rootly_sdk/models/schedule_response_data.py +++ b/rootly_sdk/models/schedule_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.schedule_response_data_type import check_schedule_response_data_type -from ..models.schedule_response_data_type import ScheduleResponseDataType -from typing import cast +from ..models.schedule_response_data_type import ScheduleResponseDataType, check_schedule_response_data_type if TYPE_CHECKING: from ..models.schedule import Schedule @@ -34,7 +30,6 @@ class ScheduleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule import Schedule id = self.id diff --git a/rootly_sdk/models/schedule_rotation.py b/rootly_sdk/models/schedule_rotation.py index 40304eec..18d78321 100644 --- a/rootly_sdk/models/schedule_rotation.py +++ b/rootly_sdk/models/schedule_rotation.py @@ -1,22 +1,23 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from dateutil.parser import isoparse +from ..models.schedule_rotation_active_days_item import ( + ScheduleRotationActiveDaysItem, + check_schedule_rotation_active_days_item, +) +from ..models.schedule_rotation_schedule_rotationable_type import ( + ScheduleRotationScheduleRotationableType, + check_schedule_rotation_schedule_rotationable_type, +) from ..types import UNSET, Unset -from ..models.schedule_rotation_active_days_item import check_schedule_rotation_active_days_item -from ..models.schedule_rotation_active_days_item import ScheduleRotationActiveDaysItem -from ..models.schedule_rotation_schedule_rotationable_type import check_schedule_rotation_schedule_rotationable_type -from ..models.schedule_rotation_schedule_rotationable_type import ScheduleRotationScheduleRotationableType -from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime - if TYPE_CHECKING: from ..models.schedule_rotation_active_time_attributes_item import ScheduleRotationActiveTimeAttributesItem from ..models.schedule_rotation_schedule_rotationable_attributes_type_0 import ( @@ -79,19 +80,15 @@ class ScheduleRotation: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation_schedule_rotationable_attributes_type_1 import ( - ScheduleRotationScheduleRotationableAttributesType1, - ) - from ..models.schedule_rotation_active_time_attributes_item import ScheduleRotationActiveTimeAttributesItem from ..models.schedule_rotation_schedule_rotationable_attributes_type_0 import ( ScheduleRotationScheduleRotationableAttributesType0, ) + from ..models.schedule_rotation_schedule_rotationable_attributes_type_1 import ( + ScheduleRotationScheduleRotationableAttributesType1, + ) from ..models.schedule_rotation_schedule_rotationable_attributes_type_2 import ( ScheduleRotationScheduleRotationableAttributesType2, ) - from ..models.schedule_rotation_schedule_rotationable_attributes_type_3 import ( - ScheduleRotationScheduleRotationableAttributesType3, - ) schedule_id = self.schedule_id diff --git a/rootly_sdk/models/schedule_rotation_active_day.py b/rootly_sdk/models/schedule_rotation_active_day.py index e0a138da..1410cc1e 100644 --- a/rootly_sdk/models/schedule_rotation_active_day.py +++ b/rootly_sdk/models/schedule_rotation_active_day.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.schedule_rotation_active_day_day_name import check_schedule_rotation_active_day_day_name -from ..models.schedule_rotation_active_day_day_name import ScheduleRotationActiveDayDayName -from typing import cast +from ..models.schedule_rotation_active_day_day_name import ( + ScheduleRotationActiveDayDayName, + check_schedule_rotation_active_day_day_name, +) if TYPE_CHECKING: from ..models.schedule_rotation_active_day_active_time_attributes_item import ( @@ -41,9 +40,6 @@ class ScheduleRotationActiveDay: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation_active_day_active_time_attributes_item import ( - ScheduleRotationActiveDayActiveTimeAttributesItem, - ) schedule_rotation_id = self.schedule_rotation_id 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 e0e456ce..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ScheduleRotationActiveDayActiveTimeAttributesItem") diff --git a/rootly_sdk/models/schedule_rotation_active_day_list.py b/rootly_sdk/models/schedule_rotation_active_day_list.py index 8d122821..f359204a 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_list.py +++ b/rootly_sdk/models/schedule_rotation_active_day_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class ScheduleRotationActiveDayList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.schedule_rotation_active_day_list_data_item import ScheduleRotationActiveDayListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 7be37262..4b9438f4 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,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.schedule_rotation_active_day_list_data_item_type import ( + ScheduleRotationActiveDayListDataItemType, check_schedule_rotation_active_day_list_data_item_type, ) -from ..models.schedule_rotation_active_day_list_data_item_type import ScheduleRotationActiveDayListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.schedule_rotation_active_day import ScheduleRotationActiveDay @@ -36,7 +33,6 @@ class ScheduleRotationActiveDayListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation_active_day import ScheduleRotationActiveDay id = self.id diff --git a/rootly_sdk/models/schedule_rotation_active_day_response.py b/rootly_sdk/models/schedule_rotation_active_day_response.py index 18656344..bd8158a0 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_response.py +++ b/rootly_sdk/models/schedule_rotation_active_day_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_active_day_response_data import ScheduleRotationActiveDayResponseData @@ -32,8 +29,6 @@ class ScheduleRotationActiveDayResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation_active_day_response_data import ScheduleRotationActiveDayResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): 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 f8b5df1f..c24c7a76 100644 --- a/rootly_sdk/models/schedule_rotation_active_day_response_data.py +++ b/rootly_sdk/models/schedule_rotation_active_day_response_data.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.schedule_rotation_active_day_response_data_type import ( + ScheduleRotationActiveDayResponseDataType, check_schedule_rotation_active_day_response_data_type, ) -from ..models.schedule_rotation_active_day_response_data_type import ScheduleRotationActiveDayResponseDataType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.schedule_rotation_active_day import ScheduleRotationActiveDay @@ -37,7 +34,6 @@ class ScheduleRotationActiveDayResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation_active_day import ScheduleRotationActiveDay id = self.id 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 07b90e94..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="ScheduleRotationActiveTimeAttributesItem") diff --git a/rootly_sdk/models/schedule_rotation_list.py b/rootly_sdk/models/schedule_rotation_list.py index 2250c40c..9881f2ff 100644 --- a/rootly_sdk/models/schedule_rotation_list.py +++ b/rootly_sdk/models/schedule_rotation_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class ScheduleRotationList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.schedule_rotation_list_data_item import ScheduleRotationListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/schedule_rotation_list_data_item.py b/rootly_sdk/models/schedule_rotation_list_data_item.py index eb399681..032ca96c 100644 --- a/rootly_sdk/models/schedule_rotation_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.schedule_rotation_list_data_item_type import check_schedule_rotation_list_data_item_type -from ..models.schedule_rotation_list_data_item_type import ScheduleRotationListDataItemType -from typing import cast +from ..models.schedule_rotation_list_data_item_type import ( + ScheduleRotationListDataItemType, + check_schedule_rotation_list_data_item_type, +) if TYPE_CHECKING: from ..models.schedule_rotation import ScheduleRotation @@ -34,7 +33,6 @@ class ScheduleRotationListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation import ScheduleRotation id = self.id diff --git a/rootly_sdk/models/schedule_rotation_response.py b/rootly_sdk/models/schedule_rotation_response.py index dde0124f..651e9a21 100644 --- a/rootly_sdk/models/schedule_rotation_response.py +++ b/rootly_sdk/models/schedule_rotation_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_response_data import ScheduleRotationResponseData @@ -32,8 +29,6 @@ class ScheduleRotationResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.schedule_rotation_response_data import ScheduleRotationResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/schedule_rotation_response_data.py b/rootly_sdk/models/schedule_rotation_response_data.py index f5bd8b67..4e1354bb 100644 --- a/rootly_sdk/models/schedule_rotation_response_data.py +++ b/rootly_sdk/models/schedule_rotation_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.schedule_rotation_response_data_type import check_schedule_rotation_response_data_type -from ..models.schedule_rotation_response_data_type import ScheduleRotationResponseDataType -from typing import cast +from ..models.schedule_rotation_response_data_type import ( + ScheduleRotationResponseDataType, + check_schedule_rotation_response_data_type, +) if TYPE_CHECKING: from ..models.schedule_rotation import ScheduleRotation @@ -34,7 +33,6 @@ class ScheduleRotationResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation import ScheduleRotation id = self.id 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 1d07e84c..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,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="ScheduleRotationScheduleRotationableAttributesType0") 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 6d6ad123..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.schedule_rotation_schedule_rotationable_attributes_type_1_handoff_day import ( - check_schedule_rotation_schedule_rotationable_attributes_type_1_handoff_day, -) from ..models.schedule_rotation_schedule_rotationable_attributes_type_1_handoff_day import ( ScheduleRotationScheduleRotationableAttributesType1HandoffDay, + check_schedule_rotation_schedule_rotationable_attributes_type_1_handoff_day, ) -from typing import cast - T = TypeVar("T", bound="ScheduleRotationScheduleRotationableAttributesType1") 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 a4524177..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.schedule_rotation_schedule_rotationable_attributes_type_2_handoff_day import ( - check_schedule_rotation_schedule_rotationable_attributes_type_2_handoff_day, -) from ..models.schedule_rotation_schedule_rotationable_attributes_type_2_handoff_day import ( ScheduleRotationScheduleRotationableAttributesType2HandoffDay, + check_schedule_rotation_schedule_rotationable_attributes_type_2_handoff_day, ) -from typing import cast - T = TypeVar("T", bound="ScheduleRotationScheduleRotationableAttributesType2") 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 a2eed698..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.schedule_rotation_schedule_rotationable_attributes_type_3_shift_length_unit import ( - check_schedule_rotation_schedule_rotationable_attributes_type_3_shift_length_unit, -) from ..models.schedule_rotation_schedule_rotationable_attributes_type_3_shift_length_unit import ( ScheduleRotationScheduleRotationableAttributesType3ShiftLengthUnit, + check_schedule_rotation_schedule_rotationable_attributes_type_3_shift_length_unit, ) -from typing import cast - T = TypeVar("T", bound="ScheduleRotationScheduleRotationableAttributesType3") diff --git a/rootly_sdk/models/schedule_rotation_user.py b/rootly_sdk/models/schedule_rotation_user.py index ad67109e..77738f7a 100644 --- a/rootly_sdk/models/schedule_rotation_user.py +++ b/rootly_sdk/models/schedule_rotation_user.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="ScheduleRotationUser") diff --git a/rootly_sdk/models/schedule_rotation_user_list.py b/rootly_sdk/models/schedule_rotation_user_list.py index abf46540..8eadaa63 100644 --- a/rootly_sdk/models/schedule_rotation_user_list.py +++ b/rootly_sdk/models/schedule_rotation_user_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class ScheduleRotationUserList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation_user_list_data_item import ScheduleRotationUserListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 2f2a80f9..08da3d88 100644 --- a/rootly_sdk/models/schedule_rotation_user_list_data_item.py +++ b/rootly_sdk/models/schedule_rotation_user_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.schedule_rotation_user_list_data_item_type import check_schedule_rotation_user_list_data_item_type -from ..models.schedule_rotation_user_list_data_item_type import ScheduleRotationUserListDataItemType -from typing import cast +from ..models.schedule_rotation_user_list_data_item_type import ( + ScheduleRotationUserListDataItemType, + check_schedule_rotation_user_list_data_item_type, +) if TYPE_CHECKING: from ..models.schedule_rotation_user import ScheduleRotationUser @@ -34,7 +33,6 @@ class ScheduleRotationUserListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation_user import ScheduleRotationUser id = self.id diff --git a/rootly_sdk/models/schedule_rotation_user_response.py b/rootly_sdk/models/schedule_rotation_user_response.py index 8e7688b1..a77b9c0b 100644 --- a/rootly_sdk/models/schedule_rotation_user_response.py +++ b/rootly_sdk/models/schedule_rotation_user_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.schedule_rotation_user_response_data import ScheduleRotationUserResponseData @@ -32,8 +29,6 @@ class ScheduleRotationUserResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.schedule_rotation_user_response_data import ScheduleRotationUserResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/schedule_rotation_user_response_data.py b/rootly_sdk/models/schedule_rotation_user_response_data.py index 9f0d7f9b..c13bc9a8 100644 --- a/rootly_sdk/models/schedule_rotation_user_response_data.py +++ b/rootly_sdk/models/schedule_rotation_user_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.schedule_rotation_user_response_data_type import check_schedule_rotation_user_response_data_type -from ..models.schedule_rotation_user_response_data_type import ScheduleRotationUserResponseDataType -from typing import cast +from ..models.schedule_rotation_user_response_data_type import ( + ScheduleRotationUserResponseDataType, + check_schedule_rotation_user_response_data_type, +) if TYPE_CHECKING: from ..models.schedule_rotation_user import ScheduleRotationUser @@ -34,7 +33,6 @@ class ScheduleRotationUserResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.schedule_rotation_user import ScheduleRotationUser id = self.id diff --git a/rootly_sdk/models/schedule_slack_channel_type_0.py b/rootly_sdk/models/schedule_slack_channel_type_0.py index 04f5779a..eb26f635 100644 --- a/rootly_sdk/models/schedule_slack_channel_type_0.py +++ b/rootly_sdk/models/schedule_slack_channel_type_0.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ScheduleSlackChannelType0") 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 1dfa33f4..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ScheduleSlackUserGroupType0") diff --git a/rootly_sdk/models/secret.py b/rootly_sdk/models/secret.py index 882d6e98..19dae479 100644 --- a/rootly_sdk/models/secret.py +++ b/rootly_sdk/models/secret.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Secret") diff --git a/rootly_sdk/models/secret_list.py b/rootly_sdk/models/secret_list.py index 36df899c..702a4e5a 100644 --- a/rootly_sdk/models/secret_list.py +++ b/rootly_sdk/models/secret_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.links import Links from ..models.meta import Meta @@ -35,9 +32,6 @@ class SecretList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.secret_list_data_item import SecretListDataItem - from ..models.meta import Meta - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/secret_list_data_item.py b/rootly_sdk/models/secret_list_data_item.py index 4acca33e..31a72676 100644 --- a/rootly_sdk/models/secret_list_data_item.py +++ b/rootly_sdk/models/secret_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.secret_list_data_item_type import check_secret_list_data_item_type -from ..models.secret_list_data_item_type import SecretListDataItemType -from typing import cast +from ..models.secret_list_data_item_type import SecretListDataItemType, check_secret_list_data_item_type if TYPE_CHECKING: from ..models.secret import Secret @@ -34,7 +30,6 @@ class SecretListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.secret import Secret id = self.id diff --git a/rootly_sdk/models/secret_response.py b/rootly_sdk/models/secret_response.py index e0819d03..841888e2 100644 --- a/rootly_sdk/models/secret_response.py +++ b/rootly_sdk/models/secret_response.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.secret_response_data import SecretResponseData @@ -28,7 +24,6 @@ class SecretResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.secret_response_data import SecretResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/secret_response_data.py b/rootly_sdk/models/secret_response_data.py index feb95b4e..e7b5504d 100644 --- a/rootly_sdk/models/secret_response_data.py +++ b/rootly_sdk/models/secret_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.secret_response_data_type import check_secret_response_data_type -from ..models.secret_response_data_type import SecretResponseDataType -from typing import cast +from ..models.secret_response_data_type import SecretResponseDataType, check_secret_response_data_type if TYPE_CHECKING: from ..models.secret import Secret @@ -34,7 +30,6 @@ class SecretResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.secret import Secret id = self.id diff --git a/rootly_sdk/models/send_dashboard_report_task_params.py b/rootly_sdk/models/send_dashboard_report_task_params.py index 70ebe6c5..ee77ed07 100644 --- a/rootly_sdk/models/send_dashboard_report_task_params.py +++ b/rootly_sdk/models/send_dashboard_report_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.send_dashboard_report_task_params_task_type import ( + SendDashboardReportTaskParamsTaskType, + check_send_dashboard_report_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.send_dashboard_report_task_params_task_type import check_send_dashboard_report_task_params_task_type -from ..models.send_dashboard_report_task_params_task_type import SendDashboardReportTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="SendDashboardReportTaskParams") diff --git a/rootly_sdk/models/send_email_task_params.py b/rootly_sdk/models/send_email_task_params.py index ac4cb89b..6e1d8cfc 100644 --- a/rootly_sdk/models/send_email_task_params.py +++ b/rootly_sdk/models/send_email_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.send_email_task_params_task_type import ( + SendEmailTaskParamsTaskType, + check_send_email_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.send_email_task_params_task_type import check_send_email_task_params_task_type -from ..models.send_email_task_params_task_type import SendEmailTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="SendEmailTaskParams") diff --git a/rootly_sdk/models/send_google_chat_attachments_task_params.py b/rootly_sdk/models/send_google_chat_attachments_task_params.py index 9b8fa456..dd445380 100644 --- a/rootly_sdk/models/send_google_chat_attachments_task_params.py +++ b/rootly_sdk/models/send_google_chat_attachments_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.send_google_chat_attachments_task_params_task_type import ( + SendGoogleChatAttachmentsTaskParamsTaskType, check_send_google_chat_attachments_task_params_task_type, ) -from ..models.send_google_chat_attachments_task_params_task_type import SendGoogleChatAttachmentsTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.send_google_chat_attachments_task_params_spaces_item import ( @@ -39,9 +36,6 @@ class SendGoogleChatAttachmentsTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.send_google_chat_attachments_task_params_spaces_item import ( - SendGoogleChatAttachmentsTaskParamsSpacesItem, - ) spaces = [] for spaces_item_data in self.spaces: diff --git a/rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py b/rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py index 949e0beb..0b80e5f7 100644 --- a/rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py +++ b/rootly_sdk/models/send_google_chat_attachments_task_params_spaces_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendGoogleChatAttachmentsTaskParamsSpacesItem") diff --git a/rootly_sdk/models/send_google_chat_message_task_params.py b/rootly_sdk/models/send_google_chat_message_task_params.py index dc521234..db4a5839 100644 --- a/rootly_sdk/models/send_google_chat_message_task_params.py +++ b/rootly_sdk/models/send_google_chat_message_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.send_google_chat_message_task_params_task_type import ( + SendGoogleChatMessageTaskParamsTaskType, + check_send_google_chat_message_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.send_google_chat_message_task_params_task_type import check_send_google_chat_message_task_params_task_type -from ..models.send_google_chat_message_task_params_task_type import SendGoogleChatMessageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.send_google_chat_message_task_params_spaces_item import SendGoogleChatMessageTaskParamsSpacesItem @@ -38,7 +37,6 @@ class SendGoogleChatMessageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.send_google_chat_message_task_params_spaces_item import SendGoogleChatMessageTaskParamsSpacesItem spaces = [] for spaces_item_data in self.spaces: diff --git a/rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py b/rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py index 85b1ef97..71a9a418 100644 --- a/rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py +++ b/rootly_sdk/models/send_google_chat_message_task_params_spaces_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendGoogleChatMessageTaskParamsSpacesItem") diff --git a/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py b/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py index a16c6542..6aa1da64 100644 --- a/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py +++ b/rootly_sdk/models/send_microsoft_teams_blocks_task_params_type_0_channels_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendMicrosoftTeamsBlocksTaskParamsType0ChannelsItem") 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 bdb80c1e..9fe2be40 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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.send_microsoft_teams_chat_message_task_params_task_type import ( - check_send_microsoft_teams_chat_message_task_params_task_type, -) from ..models.send_microsoft_teams_chat_message_task_params_task_type import ( SendMicrosoftTeamsChatMessageTaskParamsTaskType, + check_send_microsoft_teams_chat_message_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.send_microsoft_teams_chat_message_task_params_chats_item import ( @@ -41,9 +36,6 @@ class SendMicrosoftTeamsChatMessageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.send_microsoft_teams_chat_message_task_params_chats_item import ( - SendMicrosoftTeamsChatMessageTaskParamsChatsItem, - ) chats = [] for chats_item_data in self.chats: 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 addd3eab..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendMicrosoftTeamsChatMessageTaskParamsChatsItem") diff --git a/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py b/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py index 8a699cda..62d56aa3 100644 --- a/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py +++ b/rootly_sdk/models/send_microsoft_teams_message_task_params_type_0_channels_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendMicrosoftTeamsMessageTaskParamsType0ChannelsItem") diff --git a/rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py b/rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py index 84125bf6..1d13245f 100644 --- a/rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py +++ b/rootly_sdk/models/send_slack_blocks_task_params_type_0_channels_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendSlackBlocksTaskParamsType0ChannelsItem") diff --git a/rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py b/rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py index 70c9941d..fb401ba9 100644 --- a/rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py +++ b/rootly_sdk/models/send_slack_blocks_task_params_type_1_slack_users_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendSlackBlocksTaskParamsType1SlackUsersItem") diff --git a/rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py b/rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py index ea2f6230..54a82d43 100644 --- a/rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py +++ b/rootly_sdk/models/send_slack_blocks_task_params_type_2_slack_user_groups_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendSlackBlocksTaskParamsType2SlackUserGroupsItem") diff --git a/rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py b/rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py index e2517837..07a0fed2 100644 --- a/rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py +++ b/rootly_sdk/models/send_slack_message_task_params_type_0_channels_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendSlackMessageTaskParamsType0ChannelsItem") diff --git a/rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py b/rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py index e3e39320..7aa7cd68 100644 --- a/rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py +++ b/rootly_sdk/models/send_slack_message_task_params_type_1_slack_users_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendSlackMessageTaskParamsType1SlackUsersItem") diff --git a/rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py b/rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py index 092230d8..8a055aa3 100644 --- a/rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py +++ b/rootly_sdk/models/send_slack_message_task_params_type_2_slack_user_groups_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SendSlackMessageTaskParamsType2SlackUserGroupsItem") diff --git a/rootly_sdk/models/send_sms_task_params.py b/rootly_sdk/models/send_sms_task_params.py index dd3d46b6..188935ea 100644 --- a/rootly_sdk/models/send_sms_task_params.py +++ b/rootly_sdk/models/send_sms_task_params.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.send_sms_task_params_task_type import SendSmsTaskParamsTaskType, check_send_sms_task_params_task_type from ..types import UNSET, Unset -from ..models.send_sms_task_params_task_type import check_send_sms_task_params_task_type -from ..models.send_sms_task_params_task_type import SendSmsTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="SendSmsTaskParams") diff --git a/rootly_sdk/models/send_whatsapp_message_task_params.py b/rootly_sdk/models/send_whatsapp_message_task_params.py index c333a236..ba3492e7 100644 --- a/rootly_sdk/models/send_whatsapp_message_task_params.py +++ b/rootly_sdk/models/send_whatsapp_message_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.send_whatsapp_message_task_params_task_type import ( + SendWhatsappMessageTaskParamsTaskType, + check_send_whatsapp_message_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.send_whatsapp_message_task_params_task_type import check_send_whatsapp_message_task_params_task_type -from ..models.send_whatsapp_message_task_params_task_type import SendWhatsappMessageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="SendWhatsappMessageTaskParams") diff --git a/rootly_sdk/models/service.py b/rootly_sdk/models/service.py index 6dd2a277..78237e7e 100644 --- a/rootly_sdk/models/service.py +++ b/rootly_sdk/models/service.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.service_managed_by import ServiceManagedBy, check_service_managed_by from ..types import UNSET, Unset -from ..models.service_managed_by import check_service_managed_by -from ..models.service_managed_by import ServiceManagedBy -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.service_alert_broadcast_channel_type_0 import ServiceAlertBroadcastChannelType0 from ..models.service_incident_broadcast_channel_type_0 import ServiceIncidentBroadcastChannelType0 @@ -111,10 +107,7 @@ class Service: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.service_slack_channels_type_0_item import ServiceSlackChannelsType0Item - from ..models.service_slack_aliases_type_0_item import ServiceSlackAliasesType0Item from ..models.service_alert_broadcast_channel_type_0 import ServiceAlertBroadcastChannelType0 - from ..models.service_properties_type_0_item import ServicePropertiesType0Item from ..models.service_incident_broadcast_channel_type_0 import ServiceIncidentBroadcastChannelType0 name = self.name 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 e5498808..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ServiceAlertBroadcastChannelType0") 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 865d79dd..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ServiceIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/service_list.py b/rootly_sdk/models/service_list.py index 8fac8d1f..b5abbabc 100644 --- a/rootly_sdk/models/service_list.py +++ b/rootly_sdk/models/service_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class ServiceList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.service_list_data_item import ServiceListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/service_list_data_item.py b/rootly_sdk/models/service_list_data_item.py index deeeec40..9134e55d 100644 --- a/rootly_sdk/models/service_list_data_item.py +++ b/rootly_sdk/models/service_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.service_list_data_item_type import check_service_list_data_item_type -from ..models.service_list_data_item_type import ServiceListDataItemType -from typing import cast +from ..models.service_list_data_item_type import ServiceListDataItemType, check_service_list_data_item_type if TYPE_CHECKING: from ..models.service import Service @@ -34,7 +30,6 @@ class ServiceListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.service import Service id = self.id diff --git a/rootly_sdk/models/service_properties_type_0_item.py b/rootly_sdk/models/service_properties_type_0_item.py index 0f758ed7..ca3eadbd 100644 --- a/rootly_sdk/models/service_properties_type_0_item.py +++ b/rootly_sdk/models/service_properties_type_0_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="ServicePropertiesType0Item") diff --git a/rootly_sdk/models/service_response.py b/rootly_sdk/models/service_response.py index b4d53871..3309f183 100644 --- a/rootly_sdk/models/service_response.py +++ b/rootly_sdk/models/service_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.service_response_data import ServiceResponseData @@ -32,8 +29,6 @@ class ServiceResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.service_response_data import ServiceResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/service_response_data.py b/rootly_sdk/models/service_response_data.py index 4a879e02..0ebacacd 100644 --- a/rootly_sdk/models/service_response_data.py +++ b/rootly_sdk/models/service_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.service_response_data_type import check_service_response_data_type -from ..models.service_response_data_type import ServiceResponseDataType -from typing import cast +from ..models.service_response_data_type import ServiceResponseDataType, check_service_response_data_type if TYPE_CHECKING: from ..models.service import Service @@ -34,7 +30,6 @@ class ServiceResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.service import Service id = self.id 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 0a3d067d..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="ServiceSlackAliasesType0Item") 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 f5aab7ca..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="ServiceSlackChannelsType0Item") diff --git a/rootly_sdk/models/severity.py b/rootly_sdk/models/severity.py index 84b58f2a..7e2ec960 100644 --- a/rootly_sdk/models/severity.py +++ b/rootly_sdk/models/severity.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.severity_severity import SeveritySeverity, check_severity_severity from ..types import UNSET, Unset -from ..models.severity_severity import check_severity_severity -from ..models.severity_severity import SeveritySeverity -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.severity_slack_aliases_type_0_item import SeveritySlackAliasesType0Item from ..models.severity_slack_channels_type_0_item import SeveritySlackChannelsType0Item @@ -53,8 +49,6 @@ class Severity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.severity_slack_aliases_type_0_item import SeveritySlackAliasesType0Item - from ..models.severity_slack_channels_type_0_item import SeveritySlackChannelsType0Item name = self.name diff --git a/rootly_sdk/models/severity_list.py b/rootly_sdk/models/severity_list.py index ca244b77..fbde9c29 100644 --- a/rootly_sdk/models/severity_list.py +++ b/rootly_sdk/models/severity_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class SeverityList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.severity_list_data_item import SeverityListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/severity_list_data_item.py b/rootly_sdk/models/severity_list_data_item.py index 5de75842..c720e231 100644 --- a/rootly_sdk/models/severity_list_data_item.py +++ b/rootly_sdk/models/severity_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.severity_list_data_item_type import check_severity_list_data_item_type -from ..models.severity_list_data_item_type import SeverityListDataItemType -from typing import cast +from ..models.severity_list_data_item_type import SeverityListDataItemType, check_severity_list_data_item_type if TYPE_CHECKING: from ..models.severity import Severity @@ -34,7 +30,6 @@ class SeverityListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.severity import Severity id = self.id diff --git a/rootly_sdk/models/severity_response.py b/rootly_sdk/models/severity_response.py index 6238c777..46d0252d 100644 --- a/rootly_sdk/models/severity_response.py +++ b/rootly_sdk/models/severity_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.severity_response_data import SeverityResponseData @@ -32,8 +29,6 @@ class SeverityResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.severity_response_data import SeverityResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/severity_response_data.py b/rootly_sdk/models/severity_response_data.py index 722f1ac9..9382039a 100644 --- a/rootly_sdk/models/severity_response_data.py +++ b/rootly_sdk/models/severity_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.severity_response_data_type import check_severity_response_data_type -from ..models.severity_response_data_type import SeverityResponseDataType -from typing import cast +from ..models.severity_response_data_type import SeverityResponseDataType, check_severity_response_data_type if TYPE_CHECKING: from ..models.severity import Severity @@ -34,7 +30,6 @@ class SeverityResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.severity import Severity id = self.id 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 1df02d13..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="SeveritySlackAliasesType0Item") 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 442bdc93..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="SeveritySlackChannelsType0Item") diff --git a/rootly_sdk/models/shift.py b/rootly_sdk/models/shift.py index 3c4fa6ec..2243e08f 100644 --- a/rootly_sdk/models/shift.py +++ b/rootly_sdk/models/shift.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Shift") diff --git a/rootly_sdk/models/shift_coverage_request.py b/rootly_sdk/models/shift_coverage_request.py index 00c4f49c..88ab9880 100644 --- a/rootly_sdk/models/shift_coverage_request.py +++ b/rootly_sdk/models/shift_coverage_request.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.schedule_response import ScheduleResponse from ..models.shift import Shift @@ -53,9 +50,6 @@ class ShiftCoverageRequest: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_response import UserResponse - from ..models.shift import Shift - from ..models.schedule_response import ScheduleResponse schedule_id = self.schedule_id diff --git a/rootly_sdk/models/shift_coverage_request_list.py b/rootly_sdk/models/shift_coverage_request_list.py index aacb66bd..59327bd2 100644 --- a/rootly_sdk/models/shift_coverage_request_list.py +++ b/rootly_sdk/models/shift_coverage_request_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class ShiftCoverageRequestList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.shift_coverage_request_list_data_item import ShiftCoverageRequestListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/shift_coverage_request_list_data_item.py b/rootly_sdk/models/shift_coverage_request_list_data_item.py index e39437e7..a7c95baa 100644 --- a/rootly_sdk/models/shift_coverage_request_list_data_item.py +++ b/rootly_sdk/models/shift_coverage_request_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.shift_coverage_request_list_data_item_type import check_shift_coverage_request_list_data_item_type -from ..models.shift_coverage_request_list_data_item_type import ShiftCoverageRequestListDataItemType -from typing import cast +from ..models.shift_coverage_request_list_data_item_type import ( + ShiftCoverageRequestListDataItemType, + check_shift_coverage_request_list_data_item_type, +) if TYPE_CHECKING: from ..models.shift_coverage_request import ShiftCoverageRequest @@ -34,7 +33,6 @@ class ShiftCoverageRequestListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shift_coverage_request import ShiftCoverageRequest id = self.id diff --git a/rootly_sdk/models/shift_coverage_request_response.py b/rootly_sdk/models/shift_coverage_request_response.py index bad0a8a4..8157d142 100644 --- a/rootly_sdk/models/shift_coverage_request_response.py +++ b/rootly_sdk/models/shift_coverage_request_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.shift_coverage_request_response_data import ShiftCoverageRequestResponseData @@ -32,8 +29,6 @@ class ShiftCoverageRequestResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.shift_coverage_request_response_data import ShiftCoverageRequestResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/shift_coverage_request_response_data.py b/rootly_sdk/models/shift_coverage_request_response_data.py index c0f83a18..e81cffef 100644 --- a/rootly_sdk/models/shift_coverage_request_response_data.py +++ b/rootly_sdk/models/shift_coverage_request_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.shift_coverage_request_response_data_type import check_shift_coverage_request_response_data_type -from ..models.shift_coverage_request_response_data_type import ShiftCoverageRequestResponseDataType -from typing import cast +from ..models.shift_coverage_request_response_data_type import ( + ShiftCoverageRequestResponseDataType, + check_shift_coverage_request_response_data_type, +) if TYPE_CHECKING: from ..models.shift_coverage_request import ShiftCoverageRequest @@ -34,7 +33,6 @@ class ShiftCoverageRequestResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shift_coverage_request import ShiftCoverageRequest id = self.id diff --git a/rootly_sdk/models/shift_list.py b/rootly_sdk/models/shift_list.py index 5a34fce3..211abcdd 100644 --- a/rootly_sdk/models/shift_list.py +++ b/rootly_sdk/models/shift_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.meta import Meta @@ -35,9 +32,6 @@ class ShiftList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shift_list_data_item import ShiftListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/shift_list_data_item.py b/rootly_sdk/models/shift_list_data_item.py index 970a52d1..fb83466c 100644 --- a/rootly_sdk/models/shift_list_data_item.py +++ b/rootly_sdk/models/shift_list_data_item.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.shift_list_data_item_type import ShiftListDataItemType, check_shift_list_data_item_type from ..types import UNSET, Unset -from ..models.shift_list_data_item_type import check_shift_list_data_item_type -from ..models.shift_list_data_item_type import ShiftListDataItemType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.shift import Shift from ..models.shift_relationships import ShiftRelationships @@ -38,8 +34,6 @@ class ShiftListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shift import Shift - from ..models.shift_relationships import ShiftRelationships id = self.id diff --git a/rootly_sdk/models/shift_override.py b/rootly_sdk/models/shift_override.py index 49ce184d..b96b91fe 100644 --- a/rootly_sdk/models/shift_override.py +++ b/rootly_sdk/models/shift_override.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ShiftOverride") diff --git a/rootly_sdk/models/shift_override_response.py b/rootly_sdk/models/shift_override_response.py index 8c29cb6e..ee694604 100644 --- a/rootly_sdk/models/shift_override_response.py +++ b/rootly_sdk/models/shift_override_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.shift_override_response_data import ShiftOverrideResponseData @@ -32,8 +29,6 @@ class ShiftOverrideResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.shift_override_response_data import ShiftOverrideResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/shift_override_response_data.py b/rootly_sdk/models/shift_override_response_data.py index 560e1726..c49176ef 100644 --- a/rootly_sdk/models/shift_override_response_data.py +++ b/rootly_sdk/models/shift_override_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.shift_override_response_data_type import check_shift_override_response_data_type -from ..models.shift_override_response_data_type import ShiftOverrideResponseDataType -from typing import cast +from ..models.shift_override_response_data_type import ( + ShiftOverrideResponseDataType, + check_shift_override_response_data_type, +) if TYPE_CHECKING: from ..models.shift_override import ShiftOverride @@ -34,7 +33,6 @@ class ShiftOverrideResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shift_override import ShiftOverride id = self.id diff --git a/rootly_sdk/models/shift_relationships.py b/rootly_sdk/models/shift_relationships.py index f8a1fbec..bd1f2776 100644 --- a/rootly_sdk/models/shift_relationships.py +++ b/rootly_sdk/models/shift_relationships.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.shift_relationships_assignee import ShiftRelationshipsAssignee from ..models.shift_relationships_shift_override import ShiftRelationshipsShiftOverride @@ -35,9 +32,6 @@ class ShiftRelationships: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.shift_relationships_user import ShiftRelationshipsUser - from ..models.shift_relationships_assignee import ShiftRelationshipsAssignee - from ..models.shift_relationships_shift_override import ShiftRelationshipsShiftOverride shift_override: dict[str, Any] | Unset = UNSET if not isinstance(self.shift_override, Unset): diff --git a/rootly_sdk/models/shift_relationships_assignee.py b/rootly_sdk/models/shift_relationships_assignee.py index d45d9439..8c75aa9a 100644 --- a/rootly_sdk/models/shift_relationships_assignee.py +++ b/rootly_sdk/models/shift_relationships_assignee.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.shift_relationships_assignee_data_type_0 import ShiftRelationshipsAssigneeDataType0 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 4fc7f899..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="ShiftRelationshipsAssigneeDataType0") diff --git a/rootly_sdk/models/shift_relationships_shift_override.py b/rootly_sdk/models/shift_relationships_shift_override.py index 8ce35621..843e25e3 100644 --- a/rootly_sdk/models/shift_relationships_shift_override.py +++ b/rootly_sdk/models/shift_relationships_shift_override.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.shift_relationships_shift_override_data_type_0 import ShiftRelationshipsShiftOverrideDataType0 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 f57872e2..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,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - from ..models.shift_relationships_shift_override_data_type_0_type import ( + ShiftRelationshipsShiftOverrideDataType0Type, check_shift_relationships_shift_override_data_type_0_type, ) -from ..models.shift_relationships_shift_override_data_type_0_type import ShiftRelationshipsShiftOverrideDataType0Type from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="ShiftRelationshipsShiftOverrideDataType0") diff --git a/rootly_sdk/models/shift_relationships_user.py b/rootly_sdk/models/shift_relationships_user.py index 85946f92..0e550589 100644 --- a/rootly_sdk/models/shift_relationships_user.py +++ b/rootly_sdk/models/shift_relationships_user.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.shift_relationships_user_data_type_0 import ShiftRelationshipsUserDataType0 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 bdbe2049..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,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.shift_relationships_user_data_type_0_type import ( + ShiftRelationshipsUserDataType0Type, + check_shift_relationships_user_data_type_0_type, +) from ..types import UNSET, Unset -from ..models.shift_relationships_user_data_type_0_type import check_shift_relationships_user_data_type_0_type -from ..models.shift_relationships_user_data_type_0_type import ShiftRelationshipsUserDataType0Type -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="ShiftRelationshipsUserDataType0") diff --git a/rootly_sdk/models/simple_trigger_params.py b/rootly_sdk/models/simple_trigger_params.py index f56814fa..75b0f282 100644 --- a/rootly_sdk/models/simple_trigger_params.py +++ b/rootly_sdk/models/simple_trigger_params.py @@ -1,21 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.simple_trigger_params_trigger_type import ( + SimpleTriggerParamsTriggerType, + check_simple_trigger_params_trigger_type, +) +from ..models.simple_trigger_params_triggers_item import ( + SimpleTriggerParamsTriggersItem, + check_simple_trigger_params_triggers_item, +) from ..types import UNSET, Unset -from ..models.simple_trigger_params_trigger_type import check_simple_trigger_params_trigger_type -from ..models.simple_trigger_params_trigger_type import SimpleTriggerParamsTriggerType -from ..models.simple_trigger_params_triggers_item import check_simple_trigger_params_triggers_item -from ..models.simple_trigger_params_triggers_item import SimpleTriggerParamsTriggersItem -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="SimpleTriggerParams") diff --git a/rootly_sdk/models/sla.py b/rootly_sdk/models/sla.py index 62674b3e..cd69fc88 100644 --- a/rootly_sdk/models/sla.py +++ b/rootly_sdk/models/sla.py @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.sla_condition_match_type import check_sla_condition_match_type -from ..models.sla_condition_match_type import SlaConditionMatchType -from ..models.sla_entity_type import check_sla_entity_type -from ..models.sla_entity_type import SlaEntityType -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.sla_conditions_item import SlaConditionsItem from ..models.sla_notification_configurations_item import SlaNotificationConfigurationsItem @@ -78,8 +73,6 @@ class Sla: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.sla_notification_configurations_item import SlaNotificationConfigurationsItem - from ..models.sla_conditions_item import SlaConditionsItem name = self.name diff --git a/rootly_sdk/models/sla_conditions_item.py b/rootly_sdk/models/sla_conditions_item.py index 56581d0d..9a5b164e 100644 --- a/rootly_sdk/models/sla_conditions_item.py +++ b/rootly_sdk/models/sla_conditions_item.py @@ -1,20 +1,18 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.sla_conditions_item_conditionable_type import check_sla_conditions_item_conditionable_type -from ..models.sla_conditions_item_conditionable_type import SlaConditionsItemConditionableType -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - - T = TypeVar("T", bound="SlaConditionsItem") diff --git a/rootly_sdk/models/sla_list.py b/rootly_sdk/models/sla_list.py index 576a5400..50204fc5 100644 --- a/rootly_sdk/models/sla_list.py +++ b/rootly_sdk/models/sla_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class SlaList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.sla_list_data_item import SlaListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/sla_list_data_item.py b/rootly_sdk/models/sla_list_data_item.py index d5709f67..9810e984 100644 --- a/rootly_sdk/models/sla_list_data_item.py +++ b/rootly_sdk/models/sla_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.sla_list_data_item_type import check_sla_list_data_item_type -from ..models.sla_list_data_item_type import SlaListDataItemType -from typing import cast +from ..models.sla_list_data_item_type import SlaListDataItemType, check_sla_list_data_item_type if TYPE_CHECKING: from ..models.sla import Sla @@ -34,7 +30,6 @@ class SlaListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.sla import Sla id = self.id diff --git a/rootly_sdk/models/sla_notification_configurations_item.py b/rootly_sdk/models/sla_notification_configurations_item.py index e02832c1..dfb47329 100644 --- a/rootly_sdk/models/sla_notification_configurations_item.py +++ b/rootly_sdk/models/sla_notification_configurations_item.py @@ -1,21 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - from ..models.sla_notification_configurations_item_offset_type import ( + SlaNotificationConfigurationsItemOffsetType, check_sla_notification_configurations_item_offset_type, ) -from ..models.sla_notification_configurations_item_offset_type import SlaNotificationConfigurationsItemOffsetType from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="SlaNotificationConfigurationsItem") diff --git a/rootly_sdk/models/sla_response.py b/rootly_sdk/models/sla_response.py index e9130072..8876ead5 100644 --- a/rootly_sdk/models/sla_response.py +++ b/rootly_sdk/models/sla_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sla_response_data import SlaResponseData @@ -32,8 +29,6 @@ class SlaResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.sla_response_data import SlaResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/sla_response_data.py b/rootly_sdk/models/sla_response_data.py index 473726bc..df5ff9fc 100644 --- a/rootly_sdk/models/sla_response_data.py +++ b/rootly_sdk/models/sla_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.sla_response_data_type import check_sla_response_data_type -from ..models.sla_response_data_type import SlaResponseDataType -from typing import cast +from ..models.sla_response_data_type import SlaResponseDataType, check_sla_response_data_type if TYPE_CHECKING: from ..models.sla import Sla @@ -34,7 +30,6 @@ class SlaResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.sla import Sla id = self.id diff --git a/rootly_sdk/models/slack_channel.py b/rootly_sdk/models/slack_channel.py index 1b81cb02..845201cd 100644 --- a/rootly_sdk/models/slack_channel.py +++ b/rootly_sdk/models/slack_channel.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="SlackChannel") diff --git a/rootly_sdk/models/snapshot_datadog_graph_task_params.py b/rootly_sdk/models/snapshot_datadog_graph_task_params.py index fea057d1..2781d577 100644 --- a/rootly_sdk/models/snapshot_datadog_graph_task_params.py +++ b/rootly_sdk/models/snapshot_datadog_graph_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.snapshot_datadog_graph_task_params_task_type import ( + SnapshotDatadogGraphTaskParamsTaskType, + check_snapshot_datadog_graph_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.snapshot_datadog_graph_task_params_task_type import check_snapshot_datadog_graph_task_params_task_type -from ..models.snapshot_datadog_graph_task_params_task_type import SnapshotDatadogGraphTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.snapshot_datadog_graph_task_params_dashboards_item import SnapshotDatadogGraphTaskParamsDashboardsItem from ..models.snapshot_datadog_graph_task_params_post_to_slack_channels_item import ( @@ -44,12 +43,6 @@ class SnapshotDatadogGraphTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.snapshot_datadog_graph_task_params_dashboards_item import ( - SnapshotDatadogGraphTaskParamsDashboardsItem, - ) - from ..models.snapshot_datadog_graph_task_params_post_to_slack_channels_item import ( - SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem, - ) past_duration = self.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 5ca21f14..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SnapshotDatadogGraphTaskParamsDashboardsItem") 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 aaee3ca5..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SnapshotDatadogGraphTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py b/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py index 5881e9e5..48b44fbd 100644 --- a/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py +++ b/rootly_sdk/models/snapshot_grafana_dashboard_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.snapshot_grafana_dashboard_task_params_task_type import ( + SnapshotGrafanaDashboardTaskParamsTaskType, check_snapshot_grafana_dashboard_task_params_task_type, ) -from ..models.snapshot_grafana_dashboard_task_params_task_type import SnapshotGrafanaDashboardTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.snapshot_grafana_dashboard_task_params_dashboards_item import ( @@ -44,12 +41,6 @@ class SnapshotGrafanaDashboardTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.snapshot_grafana_dashboard_task_params_post_to_slack_channels_item import ( - SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem, - ) - from ..models.snapshot_grafana_dashboard_task_params_dashboards_item import ( - SnapshotGrafanaDashboardTaskParamsDashboardsItem, - ) dashboards = [] for dashboards_item_data in self.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 d8c6a62b..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SnapshotGrafanaDashboardTaskParamsDashboardsItem") 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 7966fd68..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SnapshotGrafanaDashboardTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/snapshot_looker_look_task_params.py b/rootly_sdk/models/snapshot_looker_look_task_params.py index 70af1204..967ee38b 100644 --- a/rootly_sdk/models/snapshot_looker_look_task_params.py +++ b/rootly_sdk/models/snapshot_looker_look_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.snapshot_looker_look_task_params_task_type import ( + SnapshotLookerLookTaskParamsTaskType, + check_snapshot_looker_look_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.snapshot_looker_look_task_params_task_type import check_snapshot_looker_look_task_params_task_type -from ..models.snapshot_looker_look_task_params_task_type import SnapshotLookerLookTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.snapshot_looker_look_task_params_dashboards_item import SnapshotLookerLookTaskParamsDashboardsItem from ..models.snapshot_looker_look_task_params_post_to_slack_channels_item import ( @@ -40,10 +39,6 @@ class SnapshotLookerLookTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.snapshot_looker_look_task_params_post_to_slack_channels_item import ( - SnapshotLookerLookTaskParamsPostToSlackChannelsItem, - ) - from ..models.snapshot_looker_look_task_params_dashboards_item import SnapshotLookerLookTaskParamsDashboardsItem dashboards = [] for dashboards_item_data in self.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 5e5d4a4e..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SnapshotLookerLookTaskParamsDashboardsItem") 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 7e1bde49..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SnapshotLookerLookTaskParamsPostToSlackChannelsItem") 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 f400fc95..be80e08d 100644 --- a/rootly_sdk/models/snapshot_new_relic_graph_task_params.py +++ b/rootly_sdk/models/snapshot_new_relic_graph_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.snapshot_new_relic_graph_task_params_metric_type import ( + SnapshotNewRelicGraphTaskParamsMetricType, check_snapshot_new_relic_graph_task_params_metric_type, ) -from ..models.snapshot_new_relic_graph_task_params_metric_type import SnapshotNewRelicGraphTaskParamsMetricType -from ..models.snapshot_new_relic_graph_task_params_task_type import check_snapshot_new_relic_graph_task_params_task_type -from ..models.snapshot_new_relic_graph_task_params_task_type import SnapshotNewRelicGraphTaskParamsTaskType +from ..models.snapshot_new_relic_graph_task_params_task_type import ( + SnapshotNewRelicGraphTaskParamsTaskType, + check_snapshot_new_relic_graph_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.snapshot_new_relic_graph_task_params_post_to_slack_channels_item import ( @@ -45,9 +44,6 @@ class SnapshotNewRelicGraphTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.snapshot_new_relic_graph_task_params_post_to_slack_channels_item import ( - SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem, - ) metric_query = self.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 eb9e6134..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="SnapshotNewRelicGraphTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/snooze_alert.py b/rootly_sdk/models/snooze_alert.py index 7107f94a..d4b37fda 100644 --- a/rootly_sdk/models/snooze_alert.py +++ b/rootly_sdk/models/snooze_alert.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.snooze_alert_data import SnoozeAlertData @@ -28,7 +24,6 @@ class SnoozeAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.snooze_alert_data import SnoozeAlertData data = self.data.to_dict() diff --git a/rootly_sdk/models/snooze_alert_data.py b/rootly_sdk/models/snooze_alert_data.py index c94101fe..32aaae38 100644 --- a/rootly_sdk/models/snooze_alert_data.py +++ b/rootly_sdk/models/snooze_alert_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.snooze_alert_data_type import check_snooze_alert_data_type -from ..models.snooze_alert_data_type import SnoozeAlertDataType -from typing import cast +from ..models.snooze_alert_data_type import SnoozeAlertDataType, check_snooze_alert_data_type if TYPE_CHECKING: from ..models.snooze_alert_data_attributes import SnoozeAlertDataAttributes @@ -32,7 +28,6 @@ class SnoozeAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.snooze_alert_data_attributes import SnoozeAlertDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/snooze_alert_data_attributes.py b/rootly_sdk/models/snooze_alert_data_attributes.py index 0aca40e1..812d1f44 100644 --- a/rootly_sdk/models/snooze_alert_data_attributes.py +++ b/rootly_sdk/models/snooze_alert_data_attributes.py @@ -1,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="SnoozeAlertDataAttributes") diff --git a/rootly_sdk/models/start_session_request.py b/rootly_sdk/models/start_session_request.py index 32e9ccc1..bc7434a4 100644 --- a/rootly_sdk/models/start_session_request.py +++ b/rootly_sdk/models/start_session_request.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.start_session_request_platform import StartSessionRequestPlatform, check_start_session_request_platform from ..types import UNSET, Unset -from ..models.start_session_request_platform import check_start_session_request_platform -from ..models.start_session_request_platform import StartSessionRequestPlatform -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="StartSessionRequest") diff --git a/rootly_sdk/models/start_session_response.py b/rootly_sdk/models/start_session_response.py index 7e051316..330d0ce5 100644 --- a/rootly_sdk/models/start_session_response.py +++ b/rootly_sdk/models/start_session_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.start_session_response_data import StartSessionResponseData @@ -29,7 +26,6 @@ class StartSessionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.start_session_response_data import StartSessionResponseData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/start_session_response_data.py b/rootly_sdk/models/start_session_response_data.py index ca443e4f..50fc32db 100644 --- a/rootly_sdk/models/start_session_response_data.py +++ b/rootly_sdk/models/start_session_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from uuid import UUID - - T = TypeVar("T", bound="StartSessionResponseData") diff --git a/rootly_sdk/models/status.py b/rootly_sdk/models/status.py index e7436d0b..629cb1f0 100644 --- a/rootly_sdk/models/status.py +++ b/rootly_sdk/models/status.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="Status") diff --git a/rootly_sdk/models/status_list.py b/rootly_sdk/models/status_list.py index 12dafc72..5f0e0083 100644 --- a/rootly_sdk/models/status_list.py +++ b/rootly_sdk/models/status_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class StatusList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status_list_data_item import StatusListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/status_list_data_item.py b/rootly_sdk/models/status_list_data_item.py index 5e79d05b..95d811a0 100644 --- a/rootly_sdk/models/status_list_data_item.py +++ b/rootly_sdk/models/status_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.status_list_data_item_type import check_status_list_data_item_type -from ..models.status_list_data_item_type import StatusListDataItemType -from typing import cast +from ..models.status_list_data_item_type import StatusListDataItemType, check_status_list_data_item_type if TYPE_CHECKING: from ..models.status import Status @@ -34,7 +30,6 @@ class StatusListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status import Status id = self.id diff --git a/rootly_sdk/models/status_page.py b/rootly_sdk/models/status_page.py index 81d55e06..310d9446 100644 --- a/rootly_sdk/models/status_page.py +++ b/rootly_sdk/models/status_page.py @@ -1,24 +1,29 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.status_page_authentication_method import ( + StatusPageAuthenticationMethod, + check_status_page_authentication_method, +) +from ..models.status_page_saml_name_identifier_format import ( + 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 -from ..models.status_page_authentication_method import check_status_page_authentication_method -from ..models.status_page_authentication_method import StatusPageAuthenticationMethod -from ..models.status_page_saml_name_identifier_format import check_status_page_saml_name_identifier_format -from ..models.status_page_saml_name_identifier_format import StatusPageSamlNameIdentifierFormat -from ..models.status_page_section_order_type_0_item import check_status_page_section_order_type_0_item -from ..models.status_page_section_order_type_0_item import StatusPageSectionOrderType0Item -from ..models.status_page_show_uptime_last_days import check_status_page_show_uptime_last_days -from ..models.status_page_show_uptime_last_days import StatusPageShowUptimeLastDays -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.status_page_cname_records_type_0 import StatusPageCnameRecordsType0 diff --git a/rootly_sdk/models/status_page_cname_records_type_0.py b/rootly_sdk/models/status_page_cname_records_type_0.py index 407b4890..372a2510 100644 --- a/rootly_sdk/models/status_page_cname_records_type_0.py +++ b/rootly_sdk/models/status_page_cname_records_type_0.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="StatusPageCnameRecordsType0") diff --git a/rootly_sdk/models/status_page_list.py b/rootly_sdk/models/status_page_list.py index de991dac..216a7858 100644 --- a/rootly_sdk/models/status_page_list.py +++ b/rootly_sdk/models/status_page_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class StatusPageList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status_page_list_data_item import StatusPageListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/status_page_list_data_item.py b/rootly_sdk/models/status_page_list_data_item.py index 8e47f6ff..8269723b 100644 --- a/rootly_sdk/models/status_page_list_data_item.py +++ b/rootly_sdk/models/status_page_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.status_page_list_data_item_type import check_status_page_list_data_item_type -from ..models.status_page_list_data_item_type import StatusPageListDataItemType -from typing import cast +from ..models.status_page_list_data_item_type import StatusPageListDataItemType, check_status_page_list_data_item_type if TYPE_CHECKING: from ..models.status_page import StatusPage @@ -34,7 +30,6 @@ class StatusPageListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status_page import StatusPage id = self.id diff --git a/rootly_sdk/models/status_page_response.py b/rootly_sdk/models/status_page_response.py index bce6c822..68387501 100644 --- a/rootly_sdk/models/status_page_response.py +++ b/rootly_sdk/models/status_page_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_response_data import StatusPageResponseData @@ -32,8 +29,6 @@ class StatusPageResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status_page_response_data import StatusPageResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/status_page_response_data.py b/rootly_sdk/models/status_page_response_data.py index 6de768d8..0b9f0474 100644 --- a/rootly_sdk/models/status_page_response_data.py +++ b/rootly_sdk/models/status_page_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.status_page_response_data_type import check_status_page_response_data_type -from ..models.status_page_response_data_type import StatusPageResponseDataType -from typing import cast +from ..models.status_page_response_data_type import StatusPageResponseDataType, check_status_page_response_data_type if TYPE_CHECKING: from ..models.status_page import StatusPage @@ -34,7 +30,6 @@ class StatusPageResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status_page import StatusPage id = self.id diff --git a/rootly_sdk/models/status_page_template.py b/rootly_sdk/models/status_page_template.py index e39ae77f..082b8b2b 100644 --- a/rootly_sdk/models/status_page_template.py +++ b/rootly_sdk/models/status_page_template.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.status_page_template_kind import StatusPageTemplateKind, check_status_page_template_kind from ..types import UNSET, Unset -from ..models.status_page_template_kind import check_status_page_template_kind -from ..models.status_page_template_kind import StatusPageTemplateKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="StatusPageTemplate") diff --git a/rootly_sdk/models/status_page_template_list.py b/rootly_sdk/models/status_page_template_list.py index 0a98b70a..8eec7a41 100644 --- a/rootly_sdk/models/status_page_template_list.py +++ b/rootly_sdk/models/status_page_template_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class StatusPageTemplateList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.status_page_template_list_data_item import StatusPageTemplateListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 f8caddd0..4073c903 100644 --- a/rootly_sdk/models/status_page_template_list_data_item.py +++ b/rootly_sdk/models/status_page_template_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.status_page_template_list_data_item_type import check_status_page_template_list_data_item_type -from ..models.status_page_template_list_data_item_type import StatusPageTemplateListDataItemType -from typing import cast +from ..models.status_page_template_list_data_item_type import ( + StatusPageTemplateListDataItemType, + check_status_page_template_list_data_item_type, +) if TYPE_CHECKING: from ..models.status_page_template import StatusPageTemplate @@ -34,7 +33,6 @@ class StatusPageTemplateListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status_page_template import StatusPageTemplate id = self.id diff --git a/rootly_sdk/models/status_page_template_response.py b/rootly_sdk/models/status_page_template_response.py index fc89138c..4c1b4eda 100644 --- a/rootly_sdk/models/status_page_template_response.py +++ b/rootly_sdk/models/status_page_template_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_page_template_response_data import StatusPageTemplateResponseData @@ -32,8 +29,6 @@ class StatusPageTemplateResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status_page_template_response_data import StatusPageTemplateResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/status_page_template_response_data.py b/rootly_sdk/models/status_page_template_response_data.py index e35aef54..5134cc54 100644 --- a/rootly_sdk/models/status_page_template_response_data.py +++ b/rootly_sdk/models/status_page_template_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.status_page_template_response_data_type import check_status_page_template_response_data_type -from ..models.status_page_template_response_data_type import StatusPageTemplateResponseDataType -from typing import cast +from ..models.status_page_template_response_data_type import ( + StatusPageTemplateResponseDataType, + check_status_page_template_response_data_type, +) if TYPE_CHECKING: from ..models.status_page_template import StatusPageTemplate @@ -34,7 +33,6 @@ class StatusPageTemplateResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status_page_template import StatusPageTemplate id = self.id diff --git a/rootly_sdk/models/status_response.py b/rootly_sdk/models/status_response.py index 874bdd7d..3dc0cb9c 100644 --- a/rootly_sdk/models/status_response.py +++ b/rootly_sdk/models/status_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.status_response_data import StatusResponseData @@ -32,8 +29,6 @@ class StatusResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status_response_data import StatusResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/status_response_data.py b/rootly_sdk/models/status_response_data.py index 218d6822..e99a2a6d 100644 --- a/rootly_sdk/models/status_response_data.py +++ b/rootly_sdk/models/status_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.status_response_data_type import check_status_response_data_type -from ..models.status_response_data_type import StatusResponseDataType -from typing import cast +from ..models.status_response_data_type import StatusResponseDataType, check_status_response_data_type if TYPE_CHECKING: from ..models.status import Status @@ -34,7 +30,6 @@ class StatusResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.status import Status id = self.id diff --git a/rootly_sdk/models/sub_status.py b/rootly_sdk/models/sub_status.py index a896b390..6018ef9b 100644 --- a/rootly_sdk/models/sub_status.py +++ b/rootly_sdk/models/sub_status.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.sub_status_parent_status import SubStatusParentStatus, check_sub_status_parent_status from ..types import UNSET, Unset -from ..models.sub_status_parent_status import check_sub_status_parent_status -from ..models.sub_status_parent_status import SubStatusParentStatus -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="SubStatus") diff --git a/rootly_sdk/models/sub_status_list.py b/rootly_sdk/models/sub_status_list.py index 769e7ae3..4ee3da17 100644 --- a/rootly_sdk/models/sub_status_list.py +++ b/rootly_sdk/models/sub_status_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class SubStatusList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.sub_status_list_data_item import SubStatusListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/sub_status_list_data_item.py b/rootly_sdk/models/sub_status_list_data_item.py index 3cb7449a..0c2ad36a 100644 --- a/rootly_sdk/models/sub_status_list_data_item.py +++ b/rootly_sdk/models/sub_status_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.sub_status_list_data_item_type import check_sub_status_list_data_item_type -from ..models.sub_status_list_data_item_type import SubStatusListDataItemType -from typing import cast +from ..models.sub_status_list_data_item_type import SubStatusListDataItemType, check_sub_status_list_data_item_type if TYPE_CHECKING: from ..models.sub_status import SubStatus @@ -34,7 +30,6 @@ class SubStatusListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.sub_status import SubStatus id = self.id diff --git a/rootly_sdk/models/sub_status_response.py b/rootly_sdk/models/sub_status_response.py index 1f1ed8f7..b6929ea4 100644 --- a/rootly_sdk/models/sub_status_response.py +++ b/rootly_sdk/models/sub_status_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.sub_status_response_data import SubStatusResponseData @@ -32,8 +29,6 @@ class SubStatusResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.sub_status_response_data import SubStatusResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/sub_status_response_data.py b/rootly_sdk/models/sub_status_response_data.py index 1f8a9aef..fabf203f 100644 --- a/rootly_sdk/models/sub_status_response_data.py +++ b/rootly_sdk/models/sub_status_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.sub_status_response_data_type import check_sub_status_response_data_type -from ..models.sub_status_response_data_type import SubStatusResponseDataType -from typing import cast +from ..models.sub_status_response_data_type import SubStatusResponseDataType, check_sub_status_response_data_type if TYPE_CHECKING: from ..models.sub_status import SubStatus @@ -34,7 +30,6 @@ class SubStatusResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.sub_status import SubStatus id = self.id diff --git a/rootly_sdk/models/team.py b/rootly_sdk/models/team.py index 658a919c..e8403ea1 100644 --- a/rootly_sdk/models/team.py +++ b/rootly_sdk/models/team.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.team_auto_add_members_scope import TeamAutoAddMembersScope, check_team_auto_add_members_scope +from ..models.team_managed_by import TeamManagedBy, check_team_managed_by from ..types import UNSET, Unset -from ..models.team_auto_add_members_scope import check_team_auto_add_members_scope -from ..models.team_auto_add_members_scope import TeamAutoAddMembersScope -from ..models.team_managed_by import check_team_managed_by -from ..models.team_managed_by import TeamManagedBy -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.team_alert_broadcast_channel_type_0 import TeamAlertBroadcastChannelType0 from ..models.team_incident_broadcast_channel_type_0 import TeamIncidentBroadcastChannelType0 @@ -104,11 +99,8 @@ class Team: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.team_slack_aliases_type_0_item import TeamSlackAliasesType0Item from ..models.team_alert_broadcast_channel_type_0 import TeamAlertBroadcastChannelType0 from ..models.team_incident_broadcast_channel_type_0 import TeamIncidentBroadcastChannelType0 - from ..models.team_slack_channels_type_0_item import TeamSlackChannelsType0Item - from ..models.team_properties_type_0_item import TeamPropertiesType0Item name = self.name 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 1cb7b019..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="TeamAlertBroadcastChannelType0") 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 4f17d9fc..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="TeamIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/team_list.py b/rootly_sdk/models/team_list.py index 842baf36..7980ecc0 100644 --- a/rootly_sdk/models/team_list.py +++ b/rootly_sdk/models/team_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class TeamList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.team_list_data_item import TeamListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/team_list_data_item.py b/rootly_sdk/models/team_list_data_item.py index d50369ac..b96b9d0e 100644 --- a/rootly_sdk/models/team_list_data_item.py +++ b/rootly_sdk/models/team_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.team_list_data_item_type import check_team_list_data_item_type -from ..models.team_list_data_item_type import TeamListDataItemType -from typing import cast +from ..models.team_list_data_item_type import TeamListDataItemType, check_team_list_data_item_type if TYPE_CHECKING: from ..models.team import Team @@ -34,7 +30,6 @@ class TeamListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.team import Team id = self.id diff --git a/rootly_sdk/models/team_properties_type_0_item.py b/rootly_sdk/models/team_properties_type_0_item.py index aa95a58b..c184a5a0 100644 --- a/rootly_sdk/models/team_properties_type_0_item.py +++ b/rootly_sdk/models/team_properties_type_0_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="TeamPropertiesType0Item") diff --git a/rootly_sdk/models/team_response.py b/rootly_sdk/models/team_response.py index 2c04653e..4055376a 100644 --- a/rootly_sdk/models/team_response.py +++ b/rootly_sdk/models/team_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.team_response_data import TeamResponseData @@ -32,8 +29,6 @@ class TeamResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.team_response_data import TeamResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/team_response_data.py b/rootly_sdk/models/team_response_data.py index 40e711be..16ecf771 100644 --- a/rootly_sdk/models/team_response_data.py +++ b/rootly_sdk/models/team_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.team_response_data_type import check_team_response_data_type -from ..models.team_response_data_type import TeamResponseDataType -from typing import cast +from ..models.team_response_data_type import TeamResponseDataType, check_team_response_data_type if TYPE_CHECKING: from ..models.team import Team @@ -34,7 +30,6 @@ class TeamResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.team import Team id = self.id 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 6c58d6a5..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="TeamSlackAliasesType0Item") 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 fe2cc24e..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="TeamSlackChannelsType0Item") diff --git a/rootly_sdk/models/tiptap_block_schema.py b/rootly_sdk/models/tiptap_block_schema.py index 99e97c11..4b4f48e3 100644 --- a/rootly_sdk/models/tiptap_block_schema.py +++ b/rootly_sdk/models/tiptap_block_schema.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.tiptap_block_schema_followup_component import TiptapBlockSchemaFollowupComponent from ..models.tiptap_block_schema_timeline_component import TiptapBlockSchemaTimelineComponent @@ -33,8 +30,6 @@ class TiptapBlockSchema: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.tiptap_block_schema_followup_component import TiptapBlockSchemaFollowupComponent - from ..models.tiptap_block_schema_timeline_component import TiptapBlockSchemaTimelineComponent followup_component: dict[str, Any] | Unset = UNSET if not isinstance(self.followup_component, Unset): diff --git a/rootly_sdk/models/tiptap_block_schema_followup_component.py b/rootly_sdk/models/tiptap_block_schema_followup_component.py index dc1758f7..8220706b 100644 --- a/rootly_sdk/models/tiptap_block_schema_followup_component.py +++ b/rootly_sdk/models/tiptap_block_schema_followup_component.py @@ -1,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - from ..models.tiptap_block_schema_followup_component_data_sort import ( + TiptapBlockSchemaFollowupComponentDataSort, check_tiptap_block_schema_followup_component_data_sort, ) -from ..models.tiptap_block_schema_followup_component_data_sort import TiptapBlockSchemaFollowupComponentDataSort from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="TiptapBlockSchemaFollowupComponent") diff --git a/rootly_sdk/models/tiptap_block_schema_timeline_component.py b/rootly_sdk/models/tiptap_block_schema_timeline_component.py index 38bd3ee2..a8ec7f99 100644 --- a/rootly_sdk/models/tiptap_block_schema_timeline_component.py +++ b/rootly_sdk/models/tiptap_block_schema_timeline_component.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="TiptapBlockSchemaTimelineComponent") diff --git a/rootly_sdk/models/trigger_workflow_task_params.py b/rootly_sdk/models/trigger_workflow_task_params.py index 1a6aa755..e80d9bed 100644 --- a/rootly_sdk/models/trigger_workflow_task_params.py +++ b/rootly_sdk/models/trigger_workflow_task_params.py @@ -1,23 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.trigger_workflow_task_params_attribute_to_query_by import ( + TriggerWorkflowTaskParamsAttributeToQueryBy, check_trigger_workflow_task_params_attribute_to_query_by, ) -from ..models.trigger_workflow_task_params_attribute_to_query_by import TriggerWorkflowTaskParamsAttributeToQueryBy -from ..models.trigger_workflow_task_params_kind import check_trigger_workflow_task_params_kind -from ..models.trigger_workflow_task_params_kind import TriggerWorkflowTaskParamsKind -from ..models.trigger_workflow_task_params_task_type import check_trigger_workflow_task_params_task_type -from ..models.trigger_workflow_task_params_task_type import TriggerWorkflowTaskParamsTaskType +from ..models.trigger_workflow_task_params_kind import ( + TriggerWorkflowTaskParamsKind, + check_trigger_workflow_task_params_kind, +) +from ..models.trigger_workflow_task_params_task_type import ( + TriggerWorkflowTaskParamsTaskType, + check_trigger_workflow_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.trigger_workflow_task_params_resource import TriggerWorkflowTaskParamsResource @@ -56,8 +57,6 @@ class TriggerWorkflowTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.trigger_workflow_task_params_workflow import TriggerWorkflowTaskParamsWorkflow - from ..models.trigger_workflow_task_params_resource import TriggerWorkflowTaskParamsResource kind: str = self.kind diff --git a/rootly_sdk/models/trigger_workflow_task_params_resource.py b/rootly_sdk/models/trigger_workflow_task_params_resource.py index b26b119e..79d16a80 100644 --- a/rootly_sdk/models/trigger_workflow_task_params_resource.py +++ b/rootly_sdk/models/trigger_workflow_task_params_resource.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="TriggerWorkflowTaskParamsResource") diff --git a/rootly_sdk/models/trigger_workflow_task_params_workflow.py b/rootly_sdk/models/trigger_workflow_task_params_workflow.py index 89c65e7a..c4ad90c9 100644 --- a/rootly_sdk/models/trigger_workflow_task_params_workflow.py +++ b/rootly_sdk/models/trigger_workflow_task_params_workflow.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="TriggerWorkflowTaskParamsWorkflow") diff --git a/rootly_sdk/models/tweet_twitter_message_task_params.py b/rootly_sdk/models/tweet_twitter_message_task_params.py index d55e66f1..9c9498a3 100644 --- a/rootly_sdk/models/tweet_twitter_message_task_params.py +++ b/rootly_sdk/models/tweet_twitter_message_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.tweet_twitter_message_task_params_task_type import ( + TweetTwitterMessageTaskParamsTaskType, + check_tweet_twitter_message_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.tweet_twitter_message_task_params_task_type import check_tweet_twitter_message_task_params_task_type -from ..models.tweet_twitter_message_task_params_task_type import TweetTwitterMessageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="TweetTwitterMessageTaskParams") diff --git a/rootly_sdk/models/unassign_role_from_user.py b/rootly_sdk/models/unassign_role_from_user.py index 6c2bc003..a24c2f9a 100644 --- a/rootly_sdk/models/unassign_role_from_user.py +++ b/rootly_sdk/models/unassign_role_from_user.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.unassign_role_from_user_data import UnassignRoleFromUserData @@ -28,7 +24,6 @@ class UnassignRoleFromUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.unassign_role_from_user_data import UnassignRoleFromUserData data = self.data.to_dict() diff --git a/rootly_sdk/models/unassign_role_from_user_data.py b/rootly_sdk/models/unassign_role_from_user_data.py index 9893a48c..5b70d1d0 100644 --- a/rootly_sdk/models/unassign_role_from_user_data.py +++ b/rootly_sdk/models/unassign_role_from_user_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.unassign_role_from_user_data_type import check_unassign_role_from_user_data_type -from ..models.unassign_role_from_user_data_type import UnassignRoleFromUserDataType -from typing import cast +from ..models.unassign_role_from_user_data_type import ( + UnassignRoleFromUserDataType, + check_unassign_role_from_user_data_type, +) if TYPE_CHECKING: from ..models.unassign_role_from_user_data_attributes import UnassignRoleFromUserDataAttributes @@ -32,7 +31,6 @@ class UnassignRoleFromUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.unassign_role_from_user_data_attributes import UnassignRoleFromUserDataAttributes type_: str = self.type_ 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 7d358aca..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UnassignRoleFromUserDataAttributes") diff --git a/rootly_sdk/models/update_action_item_task_params.py b/rootly_sdk/models/update_action_item_task_params.py index e1af1cd2..11036577 100644 --- a/rootly_sdk/models/update_action_item_task_params.py +++ b/rootly_sdk/models/update_action_item_task_params.py @@ -1,25 +1,28 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_action_item_task_params_attribute_to_query_by import ( + UpdateActionItemTaskParamsAttributeToQueryBy, check_update_action_item_task_params_attribute_to_query_by, ) -from ..models.update_action_item_task_params_attribute_to_query_by import UpdateActionItemTaskParamsAttributeToQueryBy -from ..models.update_action_item_task_params_priority import check_update_action_item_task_params_priority -from ..models.update_action_item_task_params_priority import UpdateActionItemTaskParamsPriority -from ..models.update_action_item_task_params_status import check_update_action_item_task_params_status -from ..models.update_action_item_task_params_status import UpdateActionItemTaskParamsStatus -from ..models.update_action_item_task_params_task_type import check_update_action_item_task_params_task_type -from ..models.update_action_item_task_params_task_type import UpdateActionItemTaskParamsTaskType +from ..models.update_action_item_task_params_priority import ( + UpdateActionItemTaskParamsPriority, + check_update_action_item_task_params_priority, +) +from ..models.update_action_item_task_params_status import ( + UpdateActionItemTaskParamsStatus, + check_update_action_item_task_params_status, +) +from ..models.update_action_item_task_params_task_type import ( + UpdateActionItemTaskParamsTaskType, + check_update_action_item_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_action_item_task_params_assigned_to_user import UpdateActionItemTaskParamsAssignedToUser @@ -64,7 +67,6 @@ class UpdateActionItemTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_action_item_task_params_assigned_to_user import UpdateActionItemTaskParamsAssignedToUser query_value = self.query_value 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 b46cd342..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateActionItemTaskParamsAssignedToUser") 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 620af109..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,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_airtable_table_record_task_params_task_type import ( + UpdateAirtableTableRecordTaskParamsTaskType, check_update_airtable_table_record_task_params_task_type, ) -from ..models.update_airtable_table_record_task_params_task_type import UpdateAirtableTableRecordTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateAirtableTableRecordTaskParams") diff --git a/rootly_sdk/models/update_alert.py b/rootly_sdk/models/update_alert.py index 2b3d748a..323f3c5c 100644 --- a/rootly_sdk/models/update_alert.py +++ b/rootly_sdk/models/update_alert.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_alert_data import UpdateAlertData @@ -28,7 +24,6 @@ class UpdateAlert: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_data import UpdateAlertData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_alert_data.py b/rootly_sdk/models/update_alert_data.py index 96dd137e..730a1655 100644 --- a/rootly_sdk/models/update_alert_data.py +++ b/rootly_sdk/models/update_alert_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alert_data_type import check_update_alert_data_type -from ..models.update_alert_data_type import UpdateAlertDataType -from typing import cast +from ..models.update_alert_data_type import UpdateAlertDataType, check_update_alert_data_type if TYPE_CHECKING: from ..models.update_alert_data_attributes import UpdateAlertDataAttributes @@ -32,7 +28,6 @@ class UpdateAlertData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_data_attributes import UpdateAlertDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_alert_data_attributes.py b/rootly_sdk/models/update_alert_data_attributes.py index 6127e155..0822a489 100644 --- a/rootly_sdk/models/update_alert_data_attributes.py +++ b/rootly_sdk/models/update_alert_data_attributes.py @@ -1,19 +1,17 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 +from dateutil.parser import isoparse -from ..models.update_alert_data_attributes_noise import check_update_alert_data_attributes_noise -from ..models.update_alert_data_attributes_noise import UpdateAlertDataAttributesNoise +from ..models.update_alert_data_attributes_noise import ( + UpdateAlertDataAttributesNoise, + check_update_alert_data_attributes_noise, +) from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime if TYPE_CHECKING: from ..models.update_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( @@ -72,11 +70,11 @@ class UpdateAlertDataAttributes: ) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_data_attributes_labels_item_type_0 import UpdateAlertDataAttributesLabelsItemType0 from ..models.update_alert_data_attributes_alert_field_values_attributes_item_type_0 import ( UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0, ) from ..models.update_alert_data_attributes_data_type_0 import UpdateAlertDataAttributesDataType0 + from ..models.update_alert_data_attributes_labels_item_type_0 import UpdateAlertDataAttributesLabelsItemType0 noise: str | Unset = UNSET if not isinstance(self.noise, Unset): 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 17137f2e..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateAlertDataAttributesAlertFieldValuesAttributesItemType0") 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 65e7a665..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateAlertDataAttributesDataType0") 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 18b6df24..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,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="UpdateAlertDataAttributesLabelsItemType0") diff --git a/rootly_sdk/models/update_alert_event.py b/rootly_sdk/models/update_alert_event.py index 9bf74c68..6e00bcc1 100644 --- a/rootly_sdk/models/update_alert_event.py +++ b/rootly_sdk/models/update_alert_event.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_alert_event_data import UpdateAlertEventData @@ -29,7 +25,6 @@ class UpdateAlertEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_event_data import UpdateAlertEventData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_alert_event_data.py b/rootly_sdk/models/update_alert_event_data.py index 374a3bee..dde651dc 100644 --- a/rootly_sdk/models/update_alert_event_data.py +++ b/rootly_sdk/models/update_alert_event_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alert_event_data_type import check_update_alert_event_data_type -from ..models.update_alert_event_data_type import UpdateAlertEventDataType -from typing import cast +from ..models.update_alert_event_data_type import UpdateAlertEventDataType, check_update_alert_event_data_type if TYPE_CHECKING: from ..models.update_alert_event_data_attributes import UpdateAlertEventDataAttributes @@ -32,7 +28,6 @@ class UpdateAlertEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_event_data_attributes import UpdateAlertEventDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_alert_event_data_attributes.py b/rootly_sdk/models/update_alert_event_data_attributes.py index 4f225a1f..82b7f634 100644 --- a/rootly_sdk/models/update_alert_event_data_attributes.py +++ b/rootly_sdk/models/update_alert_event_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateAlertEventDataAttributes") diff --git a/rootly_sdk/models/update_alert_field.py b/rootly_sdk/models/update_alert_field.py index c67ffd53..06649e62 100644 --- a/rootly_sdk/models/update_alert_field.py +++ b/rootly_sdk/models/update_alert_field.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_alert_field_data import UpdateAlertFieldData @@ -28,7 +24,6 @@ class UpdateAlertField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_field_data import UpdateAlertFieldData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_alert_field_data.py b/rootly_sdk/models/update_alert_field_data.py index ba0a1adf..e2ed53d9 100644 --- a/rootly_sdk/models/update_alert_field_data.py +++ b/rootly_sdk/models/update_alert_field_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alert_field_data_type import check_update_alert_field_data_type -from ..models.update_alert_field_data_type import UpdateAlertFieldDataType -from typing import cast +from ..models.update_alert_field_data_type import UpdateAlertFieldDataType, check_update_alert_field_data_type if TYPE_CHECKING: from ..models.update_alert_field_data_attributes import UpdateAlertFieldDataAttributes @@ -32,7 +28,6 @@ class UpdateAlertFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_field_data_attributes import UpdateAlertFieldDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_alert_field_data_attributes.py b/rootly_sdk/models/update_alert_field_data_attributes.py index 4bcafe22..67e5080a 100644 --- a/rootly_sdk/models/update_alert_field_data_attributes.py +++ b/rootly_sdk/models/update_alert_field_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateAlertFieldDataAttributes") diff --git a/rootly_sdk/models/update_alert_group.py b/rootly_sdk/models/update_alert_group.py index 8d3e766c..d37bfcee 100644 --- a/rootly_sdk/models/update_alert_group.py +++ b/rootly_sdk/models/update_alert_group.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_alert_group_data import UpdateAlertGroupData @@ -28,7 +24,6 @@ class UpdateAlertGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_group_data import UpdateAlertGroupData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_alert_group_data.py b/rootly_sdk/models/update_alert_group_data.py index 9e90db35..3e166626 100644 --- a/rootly_sdk/models/update_alert_group_data.py +++ b/rootly_sdk/models/update_alert_group_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alert_group_data_type import check_update_alert_group_data_type -from ..models.update_alert_group_data_type import UpdateAlertGroupDataType -from typing import cast +from ..models.update_alert_group_data_type import UpdateAlertGroupDataType, check_update_alert_group_data_type if TYPE_CHECKING: from ..models.update_alert_group_data_attributes import UpdateAlertGroupDataAttributes @@ -32,7 +28,6 @@ class UpdateAlertGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_group_data_attributes import UpdateAlertGroupDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_alert_group_data_attributes.py b/rootly_sdk/models/update_alert_group_data_attributes.py index 9414cac9..65cd73df 100644 --- a/rootly_sdk/models/update_alert_group_data_attributes.py +++ b/rootly_sdk/models/update_alert_group_data_attributes.py @@ -1,31 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_alert_group_data_attributes_condition_type import ( + UpdateAlertGroupDataAttributesConditionType, check_update_alert_group_data_attributes_condition_type, ) -from ..models.update_alert_group_data_attributes_condition_type import UpdateAlertGroupDataAttributesConditionType -from ..models.update_alert_group_data_attributes_group_by_alert_title import ( - check_update_alert_group_data_attributes_group_by_alert_title, -) from ..models.update_alert_group_data_attributes_group_by_alert_title import ( UpdateAlertGroupDataAttributesGroupByAlertTitle, -) -from ..models.update_alert_group_data_attributes_group_by_alert_urgency import ( - check_update_alert_group_data_attributes_group_by_alert_urgency, + check_update_alert_group_data_attributes_group_by_alert_title, ) from ..models.update_alert_group_data_attributes_group_by_alert_urgency import ( UpdateAlertGroupDataAttributesGroupByAlertUrgency, + check_update_alert_group_data_attributes_group_by_alert_urgency, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_alert_group_data_attributes_attributes_item import UpdateAlertGroupDataAttributesAttributesItem @@ -68,13 +60,6 @@ class UpdateAlertGroupDataAttributes: conditions: list[UpdateAlertGroupDataAttributesConditionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_group_data_attributes_targets_item import UpdateAlertGroupDataAttributesTargetsItem - from ..models.update_alert_group_data_attributes_conditions_item import ( - UpdateAlertGroupDataAttributesConditionsItem, - ) - from ..models.update_alert_group_data_attributes_attributes_item import ( - UpdateAlertGroupDataAttributesAttributesItem, - ) name = self.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 e1c49247..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateAlertGroupDataAttributesAttributesItem") 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 3bdd0c79..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,34 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alert_group_data_attributes_conditions_item_conditionable_type import ( - check_update_alert_group_data_attributes_conditions_item_conditionable_type, -) from ..models.update_alert_group_data_attributes_conditions_item_conditionable_type import ( UpdateAlertGroupDataAttributesConditionsItemConditionableType, -) -from ..models.update_alert_group_data_attributes_conditions_item_property_field_condition_type import ( - check_update_alert_group_data_attributes_conditions_item_property_field_condition_type, + check_update_alert_group_data_attributes_conditions_item_conditionable_type, ) from ..models.update_alert_group_data_attributes_conditions_item_property_field_condition_type import ( UpdateAlertGroupDataAttributesConditionsItemPropertyFieldConditionType, -) -from ..models.update_alert_group_data_attributes_conditions_item_property_field_type import ( - check_update_alert_group_data_attributes_conditions_item_property_field_type, + check_update_alert_group_data_attributes_conditions_item_property_field_condition_type, ) from ..models.update_alert_group_data_attributes_conditions_item_property_field_type import ( UpdateAlertGroupDataAttributesConditionsItemPropertyFieldType, + check_update_alert_group_data_attributes_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateAlertGroupDataAttributesConditionsItem") 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 8f7fcfab..19e5bad6 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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_alert_group_data_attributes_targets_item_target_type import ( - check_update_alert_group_data_attributes_targets_item_target_type, -) from ..models.update_alert_group_data_attributes_targets_item_target_type import ( UpdateAlertGroupDataAttributesTargetsItemTargetType, + check_update_alert_group_data_attributes_targets_item_target_type, ) -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="UpdateAlertGroupDataAttributesTargetsItem") diff --git a/rootly_sdk/models/update_alert_route.py b/rootly_sdk/models/update_alert_route.py index 47c696e6..61ae04b2 100644 --- a/rootly_sdk/models/update_alert_route.py +++ b/rootly_sdk/models/update_alert_route.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_alert_route_data import UpdateAlertRouteData @@ -28,7 +24,6 @@ class UpdateAlertRoute: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_route_data import UpdateAlertRouteData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_alert_route_data.py b/rootly_sdk/models/update_alert_route_data.py index a011a1df..562adaa1 100644 --- a/rootly_sdk/models/update_alert_route_data.py +++ b/rootly_sdk/models/update_alert_route_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alert_route_data_type import check_update_alert_route_data_type -from ..models.update_alert_route_data_type import UpdateAlertRouteDataType -from typing import cast +from ..models.update_alert_route_data_type import UpdateAlertRouteDataType, check_update_alert_route_data_type if TYPE_CHECKING: from ..models.update_alert_route_data_attributes import UpdateAlertRouteDataAttributes @@ -32,7 +28,6 @@ class UpdateAlertRouteData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_route_data_attributes import UpdateAlertRouteDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_alert_route_data_attributes.py b/rootly_sdk/models/update_alert_route_data_attributes.py index bdf21333..21b85825 100644 --- a/rootly_sdk/models/update_alert_route_data_attributes.py +++ b/rootly_sdk/models/update_alert_route_data_attributes.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - if TYPE_CHECKING: from ..models.update_alert_route_data_attributes_rules_item import UpdateAlertRouteDataAttributesRulesItem @@ -37,7 +33,6 @@ class UpdateAlertRouteDataAttributes: rules: list[UpdateAlertRouteDataAttributesRulesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_route_data_attributes_rules_item import UpdateAlertRouteDataAttributesRulesItem name = self.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 8e6c50b5..ec7a1935 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item import ( UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem, @@ -42,12 +39,6 @@ class UpdateAlertRouteDataAttributesRulesItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item import ( - UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem, - ) - from ..models.update_alert_route_data_attributes_rules_item_destinations_item import ( - UpdateAlertRouteDataAttributesRulesItemDestinationsItem, - ) name = self.name 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 e6778cc3..5128c9ce 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, @@ -33,9 +30,6 @@ class UpdateAlertRouteDataAttributesRulesItemConditionGroupsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item import ( - UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem, - ) conditions = [] for conditions_item_data in self.conditions: 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 41fd247d..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,35 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - -from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( - check_update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type, -) from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type import ( UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemConditionableType, -) -from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( - check_update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type, + check_update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_conditionable_type, ) from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type import ( UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldConditionType, -) -from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( - check_update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type, + check_update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_condition_type, ) from ..models.update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type import ( UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItemPropertyFieldType, + check_update_alert_route_data_attributes_rules_item_condition_groups_item_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="UpdateAlertRouteDataAttributesRulesItemConditionGroupsItemConditionsItem") 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 28ae7b7e..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_alert_route_data_attributes_rules_item_destinations_item_target_type import ( - check_update_alert_route_data_attributes_rules_item_destinations_item_target_type, -) from ..models.update_alert_route_data_attributes_rules_item_destinations_item_target_type import ( UpdateAlertRouteDataAttributesRulesItemDestinationsItemTargetType, + check_update_alert_route_data_attributes_rules_item_destinations_item_target_type, ) -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="UpdateAlertRouteDataAttributesRulesItemDestinationsItem") diff --git a/rootly_sdk/models/update_alert_routing_rule.py b/rootly_sdk/models/update_alert_routing_rule.py index 7151010c..9025c22f 100644 --- a/rootly_sdk/models/update_alert_routing_rule.py +++ b/rootly_sdk/models/update_alert_routing_rule.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_alert_routing_rule_data import UpdateAlertRoutingRuleData @@ -28,7 +24,6 @@ class UpdateAlertRoutingRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_routing_rule_data import UpdateAlertRoutingRuleData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_alert_routing_rule_data.py b/rootly_sdk/models/update_alert_routing_rule_data.py index 422c6c74..8b939ad3 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data.py +++ b/rootly_sdk/models/update_alert_routing_rule_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alert_routing_rule_data_type import check_update_alert_routing_rule_data_type -from ..models.update_alert_routing_rule_data_type import UpdateAlertRoutingRuleDataType -from typing import cast +from ..models.update_alert_routing_rule_data_type import ( + UpdateAlertRoutingRuleDataType, + check_update_alert_routing_rule_data_type, +) if TYPE_CHECKING: from ..models.update_alert_routing_rule_data_attributes import UpdateAlertRoutingRuleDataAttributes @@ -32,7 +31,6 @@ class UpdateAlertRoutingRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_routing_rule_data_attributes import UpdateAlertRoutingRuleDataAttributes type_: str = self.type_ 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 bbb92a18..f055cba6 100644 --- a/rootly_sdk/models/update_alert_routing_rule_data_attributes.py +++ b/rootly_sdk/models/update_alert_routing_rule_data_attributes.py @@ -1,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset -from ..models.update_alert_routing_rule_data_attributes_condition_type import ( - check_update_alert_routing_rule_data_attributes_condition_type, -) from ..models.update_alert_routing_rule_data_attributes_condition_type import ( UpdateAlertRoutingRuleDataAttributesConditionType, + check_update_alert_routing_rule_data_attributes_condition_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID if TYPE_CHECKING: from ..models.update_alert_routing_rule_data_attributes_conditions_item import ( @@ -55,12 +49,6 @@ class UpdateAlertRoutingRuleDataAttributes: destination: UpdateAlertRoutingRuleDataAttributesDestination | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_routing_rule_data_attributes_destination import ( - UpdateAlertRoutingRuleDataAttributesDestination, - ) - from ..models.update_alert_routing_rule_data_attributes_conditions_item import ( - UpdateAlertRoutingRuleDataAttributesConditionsItem, - ) name = self.name 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 25e3da13..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,29 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - -from ..models.update_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type import ( - check_update_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type, -) from ..models.update_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type import ( UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldConditionType, -) -from ..models.update_alert_routing_rule_data_attributes_conditions_item_property_field_type import ( - check_update_alert_routing_rule_data_attributes_conditions_item_property_field_type, + check_update_alert_routing_rule_data_attributes_conditions_item_property_field_condition_type, ) from ..models.update_alert_routing_rule_data_attributes_conditions_item_property_field_type import ( UpdateAlertRoutingRuleDataAttributesConditionsItemPropertyFieldType, + check_update_alert_routing_rule_data_attributes_conditions_item_property_field_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="UpdateAlertRoutingRuleDataAttributesConditionsItem") 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 dd93e520..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,23 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar +from uuid import UUID from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_alert_routing_rule_data_attributes_destination_target_type import ( - check_update_alert_routing_rule_data_attributes_destination_target_type, -) from ..models.update_alert_routing_rule_data_attributes_destination_target_type import ( UpdateAlertRoutingRuleDataAttributesDestinationTargetType, + check_update_alert_routing_rule_data_attributes_destination_target_type, ) from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="UpdateAlertRoutingRuleDataAttributesDestination") diff --git a/rootly_sdk/models/update_alert_urgency.py b/rootly_sdk/models/update_alert_urgency.py index 5366001a..61a7770d 100644 --- a/rootly_sdk/models/update_alert_urgency.py +++ b/rootly_sdk/models/update_alert_urgency.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_alert_urgency_data import UpdateAlertUrgencyData @@ -28,7 +24,6 @@ class UpdateAlertUrgency: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_urgency_data import UpdateAlertUrgencyData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_alert_urgency_data.py b/rootly_sdk/models/update_alert_urgency_data.py index ad05976a..73a3352e 100644 --- a/rootly_sdk/models/update_alert_urgency_data.py +++ b/rootly_sdk/models/update_alert_urgency_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alert_urgency_data_type import check_update_alert_urgency_data_type -from ..models.update_alert_urgency_data_type import UpdateAlertUrgencyDataType -from typing import cast +from ..models.update_alert_urgency_data_type import UpdateAlertUrgencyDataType, check_update_alert_urgency_data_type if TYPE_CHECKING: from ..models.update_alert_urgency_data_attributes import UpdateAlertUrgencyDataAttributes @@ -32,7 +28,6 @@ class UpdateAlertUrgencyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alert_urgency_data_attributes import UpdateAlertUrgencyDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_alert_urgency_data_attributes.py b/rootly_sdk/models/update_alert_urgency_data_attributes.py index 4d65f3af..0099ccef 100644 --- a/rootly_sdk/models/update_alert_urgency_data_attributes.py +++ b/rootly_sdk/models/update_alert_urgency_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateAlertUrgencyDataAttributes") diff --git a/rootly_sdk/models/update_alerts_source.py b/rootly_sdk/models/update_alerts_source.py index 9363143a..92d0852d 100644 --- a/rootly_sdk/models/update_alerts_source.py +++ b/rootly_sdk/models/update_alerts_source.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_alerts_source_data import UpdateAlertsSourceData @@ -28,7 +24,6 @@ class UpdateAlertsSource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alerts_source_data import UpdateAlertsSourceData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_alerts_source_data.py b/rootly_sdk/models/update_alerts_source_data.py index 4bdf9bfd..cdc6c508 100644 --- a/rootly_sdk/models/update_alerts_source_data.py +++ b/rootly_sdk/models/update_alerts_source_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alerts_source_data_type import check_update_alerts_source_data_type -from ..models.update_alerts_source_data_type import UpdateAlertsSourceDataType -from typing import cast +from ..models.update_alerts_source_data_type import UpdateAlertsSourceDataType, check_update_alerts_source_data_type if TYPE_CHECKING: from ..models.update_alerts_source_data_attributes import UpdateAlertsSourceDataAttributes @@ -32,7 +28,6 @@ class UpdateAlertsSourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alerts_source_data_attributes import UpdateAlertsSourceDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_alerts_source_data_attributes.py b/rootly_sdk/models/update_alerts_source_data_attributes.py index 37fb2983..9d4512ab 100644 --- a/rootly_sdk/models/update_alerts_source_data_attributes.py +++ b/rootly_sdk/models/update_alerts_source_data_attributes.py @@ -1,25 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alerts_source_data_attributes_deduplication_key_kind import ( - check_update_alerts_source_data_attributes_deduplication_key_kind, -) from ..models.update_alerts_source_data_attributes_deduplication_key_kind import ( UpdateAlertsSourceDataAttributesDeduplicationKeyKind, + check_update_alerts_source_data_attributes_deduplication_key_kind, ) from ..models.update_alerts_source_data_attributes_source_type import ( + UpdateAlertsSourceDataAttributesSourceType, check_update_alerts_source_data_attributes_source_type, ) -from ..models.update_alerts_source_data_attributes_source_type import UpdateAlertsSourceDataAttributesSourceType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_alerts_source_data_attributes_alert_source_fields_attributes_item import ( @@ -92,21 +86,15 @@ class UpdateAlertsSourceDataAttributes: ) def to_dict(self) -> dict[str, Any]: - from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0 import ( - UpdateAlertsSourceDataAttributesSourceableAttributesType0, - ) - from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item import ( - UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem, - ) from ..models.update_alerts_source_data_attributes_alert_template_attributes_type_0 import ( UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0, ) - from ..models.update_alerts_source_data_attributes_alert_source_fields_attributes_item import ( - UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem, - ) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0 import ( UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0, ) + from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0 import ( + UpdateAlertsSourceDataAttributesSourceableAttributesType0, + ) name = self.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 1e554c7b..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesAlertSourceFieldsAttributesItem") 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 01eda991..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,34 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type import ( - check_update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type, -) from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type import ( UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemConditionableType, -) -from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind import ( - check_update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind, + check_update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_conditionable_type, ) from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind import ( UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemKind, -) -from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator import ( - check_update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator, + check_update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_kind, ) from ..models.update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator import ( UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItemOperator, + check_update_alerts_source_data_attributes_alert_source_urgency_rules_attributes_item_operator, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesAlertSourceUrgencyRulesAttributesItem") 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 89cdd091..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesAlertTemplateAttributesType0") 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 8b8abb21..4a1700e5 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,33 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type import ( - check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type, -) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type import ( UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionType, -) -from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type import ( - check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type, + check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_condition_type, ) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type import ( UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierMatchableType, -) -from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind import ( - check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind, + check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_matchable_type, ) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind import ( UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0IdentifierReferenceKind, + check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_identifier_reference_kind, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item import ( @@ -78,9 +69,6 @@ class UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item import ( - UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem, - ) enabled = self.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 8d701ab3..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,34 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( - check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type, -) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type import ( UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemConditionableType, -) -from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( - check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind, + check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_conditionable_type, ) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind import ( UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemKind, -) -from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( - check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator, + check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_kind, ) from ..models.update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator import ( UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItemOperator, + check_update_alerts_source_data_attributes_resolution_rule_attributes_type_0_conditions_attributes_item_operator, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesResolutionRuleAttributesType0ConditionsAttributesItem") 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 644d4c85..29ebe687 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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item import ( UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem, @@ -44,9 +41,6 @@ class UpdateAlertsSourceDataAttributesSourceableAttributesType0: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item import ( - UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem, - ) auto_resolve = self.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 a2454226..f0794e79 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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( - check_update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field, -) from ..models.update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field import ( UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItemField, + check_update_alerts_source_data_attributes_sourceable_attributes_type_0_field_mappings_attributes_item_field, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateAlertsSourceDataAttributesSourceableAttributesType0FieldMappingsAttributesItem") diff --git a/rootly_sdk/models/update_api_key.py b/rootly_sdk/models/update_api_key.py index 1635a7b4..316cd68b 100644 --- a/rootly_sdk/models/update_api_key.py +++ b/rootly_sdk/models/update_api_key.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_api_key_data import UpdateApiKeyData @@ -28,7 +24,6 @@ class UpdateApiKey: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_api_key_data import UpdateApiKeyData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_api_key_data.py b/rootly_sdk/models/update_api_key_data.py index 8098db87..984040f9 100644 --- a/rootly_sdk/models/update_api_key_data.py +++ b/rootly_sdk/models/update_api_key_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_api_key_data_type import check_update_api_key_data_type -from ..models.update_api_key_data_type import UpdateApiKeyDataType -from typing import cast +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 @@ -32,7 +28,6 @@ class UpdateApiKeyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_api_key_data_attributes import UpdateApiKeyDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_api_key_data_attributes.py b/rootly_sdk/models/update_api_key_data_attributes.py index 7f82051d..a3739511 100644 --- a/rootly_sdk/models/update_api_key_data_attributes.py +++ b/rootly_sdk/models/update_api_key_data_attributes.py @@ -1,18 +1,13 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +from ..types import UNSET, Unset T = TypeVar("T", bound="UpdateApiKeyDataAttributes") diff --git a/rootly_sdk/models/update_asana_task_task_params.py b/rootly_sdk/models/update_asana_task_task_params.py index 2e980979..8d8ed46c 100644 --- a/rootly_sdk/models/update_asana_task_task_params.py +++ b/rootly_sdk/models/update_asana_task_task_params.py @@ -1,21 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_asana_task_task_params_dependency_direction import ( + UpdateAsanaTaskTaskParamsDependencyDirection, check_update_asana_task_task_params_dependency_direction, ) -from ..models.update_asana_task_task_params_dependency_direction import UpdateAsanaTaskTaskParamsDependencyDirection -from ..models.update_asana_task_task_params_task_type import check_update_asana_task_task_params_task_type -from ..models.update_asana_task_task_params_task_type import UpdateAsanaTaskTaskParamsTaskType +from ..models.update_asana_task_task_params_task_type import ( + UpdateAsanaTaskTaskParamsTaskType, + check_update_asana_task_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_asana_task_task_params_completion import UpdateAsanaTaskTaskParamsCompletion @@ -54,7 +53,6 @@ class UpdateAsanaTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_asana_task_task_params_completion import UpdateAsanaTaskTaskParamsCompletion task_id = self.task_id 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 a1eabbc0..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateAsanaTaskTaskParamsCompletion") diff --git a/rootly_sdk/models/update_attached_alerts_task_params.py b/rootly_sdk/models/update_attached_alerts_task_params.py index 9a5f96ea..eb67a79b 100644 --- a/rootly_sdk/models/update_attached_alerts_task_params.py +++ b/rootly_sdk/models/update_attached_alerts_task_params.py @@ -1,21 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_attached_alerts_task_params_status import ( + UpdateAttachedAlertsTaskParamsStatus, + check_update_attached_alerts_task_params_status, +) +from ..models.update_attached_alerts_task_params_task_type import ( + UpdateAttachedAlertsTaskParamsTaskType, + check_update_attached_alerts_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_attached_alerts_task_params_status import check_update_attached_alerts_task_params_status -from ..models.update_attached_alerts_task_params_status import UpdateAttachedAlertsTaskParamsStatus -from ..models.update_attached_alerts_task_params_task_type import check_update_attached_alerts_task_params_task_type -from ..models.update_attached_alerts_task_params_task_type import UpdateAttachedAlertsTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateAttachedAlertsTaskParams") diff --git a/rootly_sdk/models/update_authorization.py b/rootly_sdk/models/update_authorization.py index 35aa79fa..111de878 100644 --- a/rootly_sdk/models/update_authorization.py +++ b/rootly_sdk/models/update_authorization.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_authorization_data import UpdateAuthorizationData @@ -28,7 +24,6 @@ class UpdateAuthorization: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_authorization_data import UpdateAuthorizationData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_authorization_data.py b/rootly_sdk/models/update_authorization_data.py index 45ea5656..b69c00db 100644 --- a/rootly_sdk/models/update_authorization_data.py +++ b/rootly_sdk/models/update_authorization_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_authorization_data_type import check_update_authorization_data_type -from ..models.update_authorization_data_type import UpdateAuthorizationDataType -from typing import cast +from ..models.update_authorization_data_type import UpdateAuthorizationDataType, check_update_authorization_data_type if TYPE_CHECKING: from ..models.update_authorization_data_attributes import UpdateAuthorizationDataAttributes @@ -32,7 +28,6 @@ class UpdateAuthorizationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_authorization_data_attributes import UpdateAuthorizationDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_authorization_data_attributes.py b/rootly_sdk/models/update_authorization_data_attributes.py index e69c385f..a5e587cc 100644 --- a/rootly_sdk/models/update_authorization_data_attributes.py +++ b/rootly_sdk/models/update_authorization_data_attributes.py @@ -1,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset -from ..models.update_authorization_data_attributes_permissions_item import ( - check_update_authorization_data_attributes_permissions_item, -) from ..models.update_authorization_data_attributes_permissions_item import ( UpdateAuthorizationDataAttributesPermissionsItem, + check_update_authorization_data_attributes_permissions_item, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateAuthorizationDataAttributes") diff --git a/rootly_sdk/models/update_catalog.py b/rootly_sdk/models/update_catalog.py index 3eb05627..ce690f10 100644 --- a/rootly_sdk/models/update_catalog.py +++ b/rootly_sdk/models/update_catalog.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_catalog_data import UpdateCatalogData @@ -28,7 +24,6 @@ class UpdateCatalog: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_data import UpdateCatalogData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_catalog_checklist_template.py b/rootly_sdk/models/update_catalog_checklist_template.py index dd7df055..5867865e 100644 --- a/rootly_sdk/models/update_catalog_checklist_template.py +++ b/rootly_sdk/models/update_catalog_checklist_template.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_catalog_checklist_template_data import UpdateCatalogChecklistTemplateData @@ -28,7 +24,6 @@ class UpdateCatalogChecklistTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_checklist_template_data import UpdateCatalogChecklistTemplateData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_catalog_checklist_template_data.py b/rootly_sdk/models/update_catalog_checklist_template_data.py index 605a6964..a7ee5fc8 100644 --- a/rootly_sdk/models/update_catalog_checklist_template_data.py +++ b/rootly_sdk/models/update_catalog_checklist_template_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_catalog_checklist_template_data_type import check_update_catalog_checklist_template_data_type -from ..models.update_catalog_checklist_template_data_type import UpdateCatalogChecklistTemplateDataType -from typing import cast +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 @@ -32,9 +31,6 @@ class UpdateCatalogChecklistTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_checklist_template_data_attributes import ( - UpdateCatalogChecklistTemplateDataAttributes, - ) type_: str = self.type_ diff --git a/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py b/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py index 177af908..9e6825b4 100644 --- a/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py +++ b/rootly_sdk/models/update_catalog_checklist_template_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_catalog_checklist_template_data_attributes_builtin_field import ( UpdateCatalogChecklistTemplateDataAttributesBuiltinField, @@ -55,12 +51,6 @@ def to_dict(self) -> dict[str, Any]: 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, - ) name = self.name 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 index 11752596..7e061904 100644 --- 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 @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_catalog_checklist_template_data_attributes_builtin_field_field_source import ( - check_update_catalog_checklist_template_data_attributes_builtin_field_field_source, -) 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, ) -from typing import cast - T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributesBuiltinField") 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 index 71178d3c..7831a8c9 100644 --- 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 @@ -1,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_catalog_checklist_template_data_attributes_custom_field_field_source import ( - check_update_catalog_checklist_template_data_attributes_custom_field_field_source, -) 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 -from typing import cast - T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributesCustomField") 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 index 0e1b0433..d49718a9 100644 --- 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 @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_catalog_checklist_template_data_attributes_owners_type_0_item_type import ( - check_update_catalog_checklist_template_data_attributes_owners_type_0_item_type, -) 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, ) -from typing import cast - T = TypeVar("T", bound="UpdateCatalogChecklistTemplateDataAttributesOwnersType0Item") diff --git a/rootly_sdk/models/update_catalog_data.py b/rootly_sdk/models/update_catalog_data.py index ca75c49f..4cb95a7c 100644 --- a/rootly_sdk/models/update_catalog_data.py +++ b/rootly_sdk/models/update_catalog_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_catalog_data_type import check_update_catalog_data_type -from ..models.update_catalog_data_type import UpdateCatalogDataType -from typing import cast +from ..models.update_catalog_data_type import UpdateCatalogDataType, check_update_catalog_data_type if TYPE_CHECKING: from ..models.update_catalog_data_attributes import UpdateCatalogDataAttributes @@ -32,7 +28,6 @@ class UpdateCatalogData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_data_attributes import UpdateCatalogDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_catalog_data_attributes.py b/rootly_sdk/models/update_catalog_data_attributes.py index d2701736..c8e6bdc2 100644 --- a/rootly_sdk/models/update_catalog_data_attributes.py +++ b/rootly_sdk/models/update_catalog_data_attributes.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.update_catalog_data_attributes_icon import ( + UpdateCatalogDataAttributesIcon, + check_update_catalog_data_attributes_icon, +) from ..types import UNSET, Unset -from ..models.update_catalog_data_attributes_icon import check_update_catalog_data_attributes_icon -from ..models.update_catalog_data_attributes_icon import UpdateCatalogDataAttributesIcon -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateCatalogDataAttributes") diff --git a/rootly_sdk/models/update_catalog_entity.py b/rootly_sdk/models/update_catalog_entity.py index fde49c31..192874f3 100644 --- a/rootly_sdk/models/update_catalog_entity.py +++ b/rootly_sdk/models/update_catalog_entity.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_catalog_entity_data import UpdateCatalogEntityData @@ -28,7 +24,6 @@ class UpdateCatalogEntity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_entity_data import UpdateCatalogEntityData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_catalog_entity_data.py b/rootly_sdk/models/update_catalog_entity_data.py index f2560ba6..1e0c6e1d 100644 --- a/rootly_sdk/models/update_catalog_entity_data.py +++ b/rootly_sdk/models/update_catalog_entity_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_catalog_entity_data_type import check_update_catalog_entity_data_type -from ..models.update_catalog_entity_data_type import UpdateCatalogEntityDataType -from typing import cast +from ..models.update_catalog_entity_data_type import UpdateCatalogEntityDataType, check_update_catalog_entity_data_type if TYPE_CHECKING: from ..models.update_catalog_entity_data_attributes import UpdateCatalogEntityDataAttributes @@ -32,7 +28,6 @@ class UpdateCatalogEntityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_entity_data_attributes import UpdateCatalogEntityDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_catalog_entity_data_attributes.py b/rootly_sdk/models/update_catalog_entity_data_attributes.py index f169887b..d04a6a4c 100644 --- a/rootly_sdk/models/update_catalog_entity_data_attributes.py +++ b/rootly_sdk/models/update_catalog_entity_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_catalog_entity_data_attributes_properties_item import ( UpdateCatalogEntityDataAttributesPropertiesItem, @@ -42,9 +38,6 @@ class UpdateCatalogEntityDataAttributes: properties: list[UpdateCatalogEntityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_entity_data_attributes_properties_item import ( - UpdateCatalogEntityDataAttributesPropertiesItem, - ) name = self.name 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 index b660f162..06dcaffd 100644 --- a/rootly_sdk/models/update_catalog_entity_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_catalog_entity_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateCatalogEntityDataAttributesPropertiesItem") diff --git a/rootly_sdk/models/update_catalog_entity_property.py b/rootly_sdk/models/update_catalog_entity_property.py index b3a10ec5..9e9215a5 100644 --- a/rootly_sdk/models/update_catalog_entity_property.py +++ b/rootly_sdk/models/update_catalog_entity_property.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_catalog_entity_property_data import UpdateCatalogEntityPropertyData @@ -30,7 +26,6 @@ class UpdateCatalogEntityProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_entity_property_data import UpdateCatalogEntityPropertyData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_catalog_entity_property_data.py b/rootly_sdk/models/update_catalog_entity_property_data.py index 8cea01a1..d5d8a95a 100644 --- a/rootly_sdk/models/update_catalog_entity_property_data.py +++ b/rootly_sdk/models/update_catalog_entity_property_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_catalog_entity_property_data_type import check_update_catalog_entity_property_data_type -from ..models.update_catalog_entity_property_data_type import UpdateCatalogEntityPropertyDataType -from typing import cast +from ..models.update_catalog_entity_property_data_type import ( + UpdateCatalogEntityPropertyDataType, + check_update_catalog_entity_property_data_type, +) if TYPE_CHECKING: from ..models.update_catalog_entity_property_data_attributes import UpdateCatalogEntityPropertyDataAttributes @@ -32,7 +31,6 @@ class UpdateCatalogEntityPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_entity_property_data_attributes import UpdateCatalogEntityPropertyDataAttributes type_: str = self.type_ 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 53e8f038..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,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset from ..models.update_catalog_entity_property_data_attributes_key import ( + UpdateCatalogEntityPropertyDataAttributesKey, check_update_catalog_entity_property_data_attributes_key, ) -from ..models.update_catalog_entity_property_data_attributes_key import UpdateCatalogEntityPropertyDataAttributesKey from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateCatalogEntityPropertyDataAttributes") diff --git a/rootly_sdk/models/update_catalog_field.py b/rootly_sdk/models/update_catalog_field.py index 1cc84b4e..1c18e6d3 100644 --- a/rootly_sdk/models/update_catalog_field.py +++ b/rootly_sdk/models/update_catalog_field.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_catalog_field_data import UpdateCatalogFieldData @@ -28,7 +24,6 @@ class UpdateCatalogField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_field_data import UpdateCatalogFieldData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_catalog_field_data.py b/rootly_sdk/models/update_catalog_field_data.py index 36ce9586..aead4648 100644 --- a/rootly_sdk/models/update_catalog_field_data.py +++ b/rootly_sdk/models/update_catalog_field_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_catalog_field_data_type import check_update_catalog_field_data_type -from ..models.update_catalog_field_data_type import UpdateCatalogFieldDataType -from typing import cast +from ..models.update_catalog_field_data_type import UpdateCatalogFieldDataType, check_update_catalog_field_data_type if TYPE_CHECKING: from ..models.update_catalog_field_data_attributes import UpdateCatalogFieldDataAttributes @@ -32,7 +28,6 @@ class UpdateCatalogFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_field_data_attributes import UpdateCatalogFieldDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_catalog_field_data_attributes.py b/rootly_sdk/models/update_catalog_field_data_attributes.py index 2c02c101..743f9aaf 100644 --- a/rootly_sdk/models/update_catalog_field_data_attributes.py +++ b/rootly_sdk/models/update_catalog_field_data_attributes.py @@ -1,22 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_catalog_field_data_attributes_catalog_type import ( + UpdateCatalogFieldDataAttributesCatalogType, check_update_catalog_field_data_attributes_catalog_type, ) -from ..models.update_catalog_field_data_attributes_catalog_type import UpdateCatalogFieldDataAttributesCatalogType -from ..models.update_catalog_field_data_attributes_kind import check_update_catalog_field_data_attributes_kind -from ..models.update_catalog_field_data_attributes_kind import UpdateCatalogFieldDataAttributesKind +from ..models.update_catalog_field_data_attributes_kind import ( + UpdateCatalogFieldDataAttributesKind, + check_update_catalog_field_data_attributes_kind, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateCatalogFieldDataAttributes") diff --git a/rootly_sdk/models/update_catalog_property.py b/rootly_sdk/models/update_catalog_property.py index f3c0a31a..8b15c596 100644 --- a/rootly_sdk/models/update_catalog_property.py +++ b/rootly_sdk/models/update_catalog_property.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_catalog_property_data import UpdateCatalogPropertyData @@ -28,7 +24,6 @@ class UpdateCatalogProperty: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_property_data import UpdateCatalogPropertyData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_catalog_property_data.py b/rootly_sdk/models/update_catalog_property_data.py index 4562a0bf..2d7bf203 100644 --- a/rootly_sdk/models/update_catalog_property_data.py +++ b/rootly_sdk/models/update_catalog_property_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_catalog_property_data_type import check_update_catalog_property_data_type -from ..models.update_catalog_property_data_type import UpdateCatalogPropertyDataType -from typing import cast +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 @@ -32,7 +31,6 @@ class UpdateCatalogPropertyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_catalog_property_data_attributes import UpdateCatalogPropertyDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_catalog_property_data_attributes.py b/rootly_sdk/models/update_catalog_property_data_attributes.py index b58cb4fa..a5327c9d 100644 --- a/rootly_sdk/models/update_catalog_property_data_attributes.py +++ b/rootly_sdk/models/update_catalog_property_data_attributes.py @@ -1,22 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 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_catalog_type import UpdateCatalogPropertyDataAttributesCatalogType -from ..models.update_catalog_property_data_attributes_kind import check_update_catalog_property_data_attributes_kind -from ..models.update_catalog_property_data_attributes_kind import UpdateCatalogPropertyDataAttributesKind +from ..models.update_catalog_property_data_attributes_kind import ( + UpdateCatalogPropertyDataAttributesKind, + check_update_catalog_property_data_attributes_kind, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateCatalogPropertyDataAttributes") diff --git a/rootly_sdk/models/update_cause.py b/rootly_sdk/models/update_cause.py index e458bfa3..bcbc6c76 100644 --- a/rootly_sdk/models/update_cause.py +++ b/rootly_sdk/models/update_cause.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_cause_data import UpdateCauseData @@ -28,7 +24,6 @@ class UpdateCause: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_cause_data import UpdateCauseData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_cause_data.py b/rootly_sdk/models/update_cause_data.py index 91813417..4ee88f52 100644 --- a/rootly_sdk/models/update_cause_data.py +++ b/rootly_sdk/models/update_cause_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_cause_data_type import check_update_cause_data_type -from ..models.update_cause_data_type import UpdateCauseDataType -from typing import cast +from ..models.update_cause_data_type import UpdateCauseDataType, check_update_cause_data_type if TYPE_CHECKING: from ..models.update_cause_data_attributes import UpdateCauseDataAttributes @@ -32,7 +28,6 @@ class UpdateCauseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_cause_data_attributes import UpdateCauseDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_cause_data_attributes.py b/rootly_sdk/models/update_cause_data_attributes.py index 2adb7d43..b3bd138c 100644 --- a/rootly_sdk/models/update_cause_data_attributes.py +++ b/rootly_sdk/models/update_cause_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_cause_data_attributes_properties_item import UpdateCauseDataAttributesPropertiesItem @@ -34,7 +30,6 @@ class UpdateCauseDataAttributes: properties: list[UpdateCauseDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_cause_data_attributes_properties_item import UpdateCauseDataAttributesPropertiesItem name = self.name diff --git a/rootly_sdk/models/update_cause_data_attributes_properties_item.py b/rootly_sdk/models/update_cause_data_attributes_properties_item.py index 6b6770c3..f551eb85 100644 --- a/rootly_sdk/models/update_cause_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_cause_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateCauseDataAttributesPropertiesItem") diff --git a/rootly_sdk/models/update_clickup_task_task_params.py b/rootly_sdk/models/update_clickup_task_task_params.py index dfc9aa12..7be46a3a 100644 --- a/rootly_sdk/models/update_clickup_task_task_params.py +++ b/rootly_sdk/models/update_clickup_task_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_clickup_task_task_params_task_type import ( + UpdateClickupTaskTaskParamsTaskType, + check_update_clickup_task_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_clickup_task_task_params_task_type import check_update_clickup_task_task_params_task_type -from ..models.update_clickup_task_task_params_task_type import UpdateClickupTaskTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_clickup_task_task_params_priority import UpdateClickupTaskTaskParamsPriority @@ -49,7 +48,6 @@ class UpdateClickupTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_clickup_task_task_params_priority import UpdateClickupTaskTaskParamsPriority task_id = self.task_id 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 a54d24d5..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateClickupTaskTaskParamsPriority") diff --git a/rootly_sdk/models/update_coda_page_task_params.py b/rootly_sdk/models/update_coda_page_task_params.py index 8f11a877..cc57f6dc 100644 --- a/rootly_sdk/models/update_coda_page_task_params.py +++ b/rootly_sdk/models/update_coda_page_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_coda_page_task_params_task_type import ( + UpdateCodaPageTaskParamsTaskType, + check_update_coda_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_coda_page_task_params_task_type import check_update_coda_page_task_params_task_type -from ..models.update_coda_page_task_params_task_type import UpdateCodaPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_coda_page_task_params_template import UpdateCodaPageTaskParamsTemplate @@ -43,7 +42,6 @@ class UpdateCodaPageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_coda_page_task_params_template import UpdateCodaPageTaskParamsTemplate page_id = self.page_id 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 6e73f081..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateCodaPageTaskParamsTemplate") diff --git a/rootly_sdk/models/update_communications_group.py b/rootly_sdk/models/update_communications_group.py index 34f56e5f..f9a17ecf 100644 --- a/rootly_sdk/models/update_communications_group.py +++ b/rootly_sdk/models/update_communications_group.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_communications_group_data import UpdateCommunicationsGroupData @@ -28,7 +24,6 @@ class UpdateCommunicationsGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_group_data import UpdateCommunicationsGroupData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_communications_group_data.py b/rootly_sdk/models/update_communications_group_data.py index ccb93c5e..bc38f326 100644 --- a/rootly_sdk/models/update_communications_group_data.py +++ b/rootly_sdk/models/update_communications_group_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_communications_group_data_type import check_update_communications_group_data_type -from ..models.update_communications_group_data_type import UpdateCommunicationsGroupDataType -from typing import cast +from ..models.update_communications_group_data_type import ( + UpdateCommunicationsGroupDataType, + check_update_communications_group_data_type, +) if TYPE_CHECKING: from ..models.update_communications_group_data_attributes import UpdateCommunicationsGroupDataAttributes @@ -32,7 +31,6 @@ class UpdateCommunicationsGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_group_data_attributes import UpdateCommunicationsGroupDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_communications_group_data_attributes.py b/rootly_sdk/models/update_communications_group_data_attributes.py index 42f3ed25..a89a63de 100644 --- a/rootly_sdk/models/update_communications_group_data_attributes.py +++ b/rootly_sdk/models/update_communications_group_data_attributes.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_communications_group_data_attributes_condition_type import ( - check_update_communications_group_data_attributes_condition_type, -) from ..models.update_communications_group_data_attributes_condition_type import ( UpdateCommunicationsGroupDataAttributesConditionType, + check_update_communications_group_data_attributes_condition_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_communications_group_data_attributes_communication_external_group_members_type_0_item import ( @@ -67,12 +61,6 @@ class UpdateCommunicationsGroupDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_group_data_attributes_communication_group_conditions_type_0_item import ( - UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item, - ) - from ..models.update_communications_group_data_attributes_communication_external_group_members_type_0_item import ( - UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item, - ) name = self.name 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 96fc13cb..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateCommunicationsGroupDataAttributesCommunicationExternalGroupMembersType0Item") 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 1330661a..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type import ( - check_update_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type, -) from ..models.update_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type import ( UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0ItemPropertyType, + check_update_communications_group_data_attributes_communication_group_conditions_type_0_item_property_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateCommunicationsGroupDataAttributesCommunicationGroupConditionsType0Item") diff --git a/rootly_sdk/models/update_communications_stage.py b/rootly_sdk/models/update_communications_stage.py index ac791131..1a54ae26 100644 --- a/rootly_sdk/models/update_communications_stage.py +++ b/rootly_sdk/models/update_communications_stage.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_communications_stage_data import UpdateCommunicationsStageData @@ -28,7 +24,6 @@ class UpdateCommunicationsStage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_stage_data import UpdateCommunicationsStageData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_communications_stage_data.py b/rootly_sdk/models/update_communications_stage_data.py index 9b4760cb..119b57fb 100644 --- a/rootly_sdk/models/update_communications_stage_data.py +++ b/rootly_sdk/models/update_communications_stage_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_communications_stage_data_type import check_update_communications_stage_data_type -from ..models.update_communications_stage_data_type import UpdateCommunicationsStageDataType -from typing import cast +from ..models.update_communications_stage_data_type import ( + UpdateCommunicationsStageDataType, + check_update_communications_stage_data_type, +) if TYPE_CHECKING: from ..models.update_communications_stage_data_attributes import UpdateCommunicationsStageDataAttributes @@ -32,7 +31,6 @@ class UpdateCommunicationsStageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_stage_data_attributes import UpdateCommunicationsStageDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_communications_stage_data_attributes.py b/rootly_sdk/models/update_communications_stage_data_attributes.py index 6d628f7c..a0a443e5 100644 --- a/rootly_sdk/models/update_communications_stage_data_attributes.py +++ b/rootly_sdk/models/update_communications_stage_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateCommunicationsStageDataAttributes") diff --git a/rootly_sdk/models/update_communications_template.py b/rootly_sdk/models/update_communications_template.py index aca15ef7..6b584d62 100644 --- a/rootly_sdk/models/update_communications_template.py +++ b/rootly_sdk/models/update_communications_template.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_communications_template_data import UpdateCommunicationsTemplateData @@ -28,7 +24,6 @@ class UpdateCommunicationsTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_template_data import UpdateCommunicationsTemplateData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_communications_template_data.py b/rootly_sdk/models/update_communications_template_data.py index 7905ff44..98c2b295 100644 --- a/rootly_sdk/models/update_communications_template_data.py +++ b/rootly_sdk/models/update_communications_template_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_communications_template_data_type import check_update_communications_template_data_type -from ..models.update_communications_template_data_type import UpdateCommunicationsTemplateDataType -from typing import cast +from ..models.update_communications_template_data_type import ( + UpdateCommunicationsTemplateDataType, + check_update_communications_template_data_type, +) if TYPE_CHECKING: from ..models.update_communications_template_data_attributes import UpdateCommunicationsTemplateDataAttributes @@ -32,7 +31,6 @@ class UpdateCommunicationsTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_template_data_attributes import UpdateCommunicationsTemplateDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_communications_template_data_attributes.py b/rootly_sdk/models/update_communications_template_data_attributes.py index 2c7bcb02..51b6c959 100644 --- a/rootly_sdk/models/update_communications_template_data_attributes.py +++ b/rootly_sdk/models/update_communications_template_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_communications_template_data_attributes_communication_template_stages_attributes_type_0_item import ( UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item, @@ -42,9 +38,6 @@ class UpdateCommunicationsTemplateDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_template_data_attributes_communication_template_stages_attributes_type_0_item import ( - UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item, - ) name = self.name 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 0edef64a..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateCommunicationsTemplateDataAttributesCommunicationTemplateStagesAttributesType0Item") diff --git a/rootly_sdk/models/update_communications_type.py b/rootly_sdk/models/update_communications_type.py index 13806d4a..4417e08f 100644 --- a/rootly_sdk/models/update_communications_type.py +++ b/rootly_sdk/models/update_communications_type.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_communications_type_data import UpdateCommunicationsTypeData @@ -28,7 +24,6 @@ class UpdateCommunicationsType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_type_data import UpdateCommunicationsTypeData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_communications_type_data.py b/rootly_sdk/models/update_communications_type_data.py index 4f7d1a66..8550fb92 100644 --- a/rootly_sdk/models/update_communications_type_data.py +++ b/rootly_sdk/models/update_communications_type_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_communications_type_data_type import check_update_communications_type_data_type -from ..models.update_communications_type_data_type import UpdateCommunicationsTypeDataType -from typing import cast +from ..models.update_communications_type_data_type import ( + UpdateCommunicationsTypeDataType, + check_update_communications_type_data_type, +) if TYPE_CHECKING: from ..models.update_communications_type_data_attributes import UpdateCommunicationsTypeDataAttributes @@ -32,7 +31,6 @@ class UpdateCommunicationsTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_communications_type_data_attributes import UpdateCommunicationsTypeDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_communications_type_data_attributes.py b/rootly_sdk/models/update_communications_type_data_attributes.py index c6deb1e0..9b78ebed 100644 --- a/rootly_sdk/models/update_communications_type_data_attributes.py +++ b/rootly_sdk/models/update_communications_type_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateCommunicationsTypeDataAttributes") diff --git a/rootly_sdk/models/update_confluence_page_task_params.py b/rootly_sdk/models/update_confluence_page_task_params.py index b193e912..fe6ce985 100644 --- a/rootly_sdk/models/update_confluence_page_task_params.py +++ b/rootly_sdk/models/update_confluence_page_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_confluence_page_task_params_task_type import ( + UpdateConfluencePageTaskParamsTaskType, + check_update_confluence_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_confluence_page_task_params_task_type import check_update_confluence_page_task_params_task_type -from ..models.update_confluence_page_task_params_task_type import UpdateConfluencePageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_confluence_page_task_params_integration import UpdateConfluencePageTaskParamsIntegration from ..models.update_confluence_page_task_params_template import UpdateConfluencePageTaskParamsTemplate @@ -49,8 +48,6 @@ class UpdateConfluencePageTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_confluence_page_task_params_integration import UpdateConfluencePageTaskParamsIntegration - from ..models.update_confluence_page_task_params_template import UpdateConfluencePageTaskParamsTemplate file_id = self.file_id diff --git a/rootly_sdk/models/update_confluence_page_task_params_integration.py b/rootly_sdk/models/update_confluence_page_task_params_integration.py index 010854e1..a1f464df 100644 --- a/rootly_sdk/models/update_confluence_page_task_params_integration.py +++ b/rootly_sdk/models/update_confluence_page_task_params_integration.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateConfluencePageTaskParamsIntegration") 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 c4abde6f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateConfluencePageTaskParamsTemplate") diff --git a/rootly_sdk/models/update_custom_field.py b/rootly_sdk/models/update_custom_field.py index 96e4d3f2..5ed37956 100644 --- a/rootly_sdk/models/update_custom_field.py +++ b/rootly_sdk/models/update_custom_field.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_custom_field_data import UpdateCustomFieldData @@ -28,7 +24,6 @@ class UpdateCustomField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_custom_field_data import UpdateCustomFieldData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_custom_field_data.py b/rootly_sdk/models/update_custom_field_data.py index 51287219..414bc949 100644 --- a/rootly_sdk/models/update_custom_field_data.py +++ b/rootly_sdk/models/update_custom_field_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_custom_field_data_type import check_update_custom_field_data_type -from ..models.update_custom_field_data_type import UpdateCustomFieldDataType -from typing import cast +from ..models.update_custom_field_data_type import UpdateCustomFieldDataType, check_update_custom_field_data_type if TYPE_CHECKING: from ..models.update_custom_field_data_attributes import UpdateCustomFieldDataAttributes @@ -32,7 +28,6 @@ class UpdateCustomFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_custom_field_data_attributes import UpdateCustomFieldDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_custom_field_data_attributes.py b/rootly_sdk/models/update_custom_field_data_attributes.py index 5a9f8a6c..2eac8a3a 100644 --- a/rootly_sdk/models/update_custom_field_data_attributes.py +++ b/rootly_sdk/models/update_custom_field_data_attributes.py @@ -1,24 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_custom_field_data_attributes_required_type_0_item import ( + UpdateCustomFieldDataAttributesRequiredType0Item, check_update_custom_field_data_attributes_required_type_0_item, ) -from ..models.update_custom_field_data_attributes_required_type_0_item import ( - UpdateCustomFieldDataAttributesRequiredType0Item, +from ..models.update_custom_field_data_attributes_shown_item import ( + UpdateCustomFieldDataAttributesShownItem, + check_update_custom_field_data_attributes_shown_item, ) -from ..models.update_custom_field_data_attributes_shown_item import check_update_custom_field_data_attributes_shown_item -from ..models.update_custom_field_data_attributes_shown_item import UpdateCustomFieldDataAttributesShownItem from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateCustomFieldDataAttributes") diff --git a/rootly_sdk/models/update_custom_field_option.py b/rootly_sdk/models/update_custom_field_option.py index 76e6d0ad..52ad39dc 100644 --- a/rootly_sdk/models/update_custom_field_option.py +++ b/rootly_sdk/models/update_custom_field_option.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_custom_field_option_data import UpdateCustomFieldOptionData @@ -28,7 +24,6 @@ class UpdateCustomFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_custom_field_option_data import UpdateCustomFieldOptionData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_custom_field_option_data.py b/rootly_sdk/models/update_custom_field_option_data.py index 0629fd5f..7320f4a8 100644 --- a/rootly_sdk/models/update_custom_field_option_data.py +++ b/rootly_sdk/models/update_custom_field_option_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_custom_field_option_data_type import check_update_custom_field_option_data_type -from ..models.update_custom_field_option_data_type import UpdateCustomFieldOptionDataType -from typing import cast +from ..models.update_custom_field_option_data_type import ( + UpdateCustomFieldOptionDataType, + check_update_custom_field_option_data_type, +) if TYPE_CHECKING: from ..models.update_custom_field_option_data_attributes import UpdateCustomFieldOptionDataAttributes @@ -32,7 +31,6 @@ class UpdateCustomFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_custom_field_option_data_attributes import UpdateCustomFieldOptionDataAttributes type_: str = self.type_ 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 db254815..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateCustomFieldOptionDataAttributes") diff --git a/rootly_sdk/models/update_custom_form.py b/rootly_sdk/models/update_custom_form.py index d05ad115..406ac1e0 100644 --- a/rootly_sdk/models/update_custom_form.py +++ b/rootly_sdk/models/update_custom_form.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_custom_form_data import UpdateCustomFormData @@ -28,7 +24,6 @@ class UpdateCustomForm: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_custom_form_data import UpdateCustomFormData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_custom_form_data.py b/rootly_sdk/models/update_custom_form_data.py index 7193385c..73da6a83 100644 --- a/rootly_sdk/models/update_custom_form_data.py +++ b/rootly_sdk/models/update_custom_form_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_custom_form_data_type import check_update_custom_form_data_type -from ..models.update_custom_form_data_type import UpdateCustomFormDataType -from typing import cast +from ..models.update_custom_form_data_type import UpdateCustomFormDataType, check_update_custom_form_data_type if TYPE_CHECKING: from ..models.update_custom_form_data_attributes import UpdateCustomFormDataAttributes @@ -32,7 +28,6 @@ class UpdateCustomFormData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_custom_form_data_attributes import UpdateCustomFormDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_custom_form_data_attributes.py b/rootly_sdk/models/update_custom_form_data_attributes.py index 225400bc..72a3286c 100644 --- a/rootly_sdk/models/update_custom_form_data_attributes.py +++ b/rootly_sdk/models/update_custom_form_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateCustomFormDataAttributes") diff --git a/rootly_sdk/models/update_dashboard.py b/rootly_sdk/models/update_dashboard.py index a47a611b..1a115d37 100644 --- a/rootly_sdk/models/update_dashboard.py +++ b/rootly_sdk/models/update_dashboard.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_dashboard_data import UpdateDashboardData @@ -28,7 +24,6 @@ class UpdateDashboard: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_dashboard_data import UpdateDashboardData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_dashboard_data.py b/rootly_sdk/models/update_dashboard_data.py index c7ec0433..31bbc70c 100644 --- a/rootly_sdk/models/update_dashboard_data.py +++ b/rootly_sdk/models/update_dashboard_data.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_dashboard_data_type import UpdateDashboardDataType, check_update_dashboard_data_type from ..types import UNSET, Unset -from ..models.update_dashboard_data_type import check_update_dashboard_data_type -from ..models.update_dashboard_data_type import UpdateDashboardDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_dashboard_data_attributes import UpdateDashboardDataAttributes @@ -33,7 +29,6 @@ class UpdateDashboardData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_dashboard_data_attributes import UpdateDashboardDataAttributes type_: str | Unset = UNSET if not isinstance(self.type_, Unset): diff --git a/rootly_sdk/models/update_dashboard_data_attributes.py b/rootly_sdk/models/update_dashboard_data_attributes.py index 794d6f37..71ceb44b 100644 --- a/rootly_sdk/models/update_dashboard_data_attributes.py +++ b/rootly_sdk/models/update_dashboard_data_attributes.py @@ -1,23 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.update_dashboard_data_attributes_color import ( + UpdateDashboardDataAttributesColor, + check_update_dashboard_data_attributes_color, +) +from ..models.update_dashboard_data_attributes_owner import ( + UpdateDashboardDataAttributesOwner, + check_update_dashboard_data_attributes_owner, +) +from ..models.update_dashboard_data_attributes_period import ( + UpdateDashboardDataAttributesPeriod, + check_update_dashboard_data_attributes_period, +) from ..types import UNSET, Unset -from ..models.update_dashboard_data_attributes_color import check_update_dashboard_data_attributes_color -from ..models.update_dashboard_data_attributes_color import UpdateDashboardDataAttributesColor -from ..models.update_dashboard_data_attributes_owner import check_update_dashboard_data_attributes_owner -from ..models.update_dashboard_data_attributes_owner import UpdateDashboardDataAttributesOwner -from ..models.update_dashboard_data_attributes_period import check_update_dashboard_data_attributes_period -from ..models.update_dashboard_data_attributes_period import UpdateDashboardDataAttributesPeriod -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateDashboardDataAttributes") diff --git a/rootly_sdk/models/update_dashboard_panel.py b/rootly_sdk/models/update_dashboard_panel.py index 65137385..b02e34b4 100644 --- a/rootly_sdk/models/update_dashboard_panel.py +++ b/rootly_sdk/models/update_dashboard_panel.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_dashboard_panel_data import UpdateDashboardPanelData @@ -28,7 +24,6 @@ class UpdateDashboardPanel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_dashboard_panel_data import UpdateDashboardPanelData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_dashboard_panel_data.py b/rootly_sdk/models/update_dashboard_panel_data.py index 2f475b6f..340bba12 100644 --- a/rootly_sdk/models/update_dashboard_panel_data.py +++ b/rootly_sdk/models/update_dashboard_panel_data.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_dashboard_panel_data_type import ( + UpdateDashboardPanelDataType, + check_update_dashboard_panel_data_type, +) from ..types import UNSET, Unset -from ..models.update_dashboard_panel_data_type import check_update_dashboard_panel_data_type -from ..models.update_dashboard_panel_data_type import UpdateDashboardPanelDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes import UpdateDashboardPanelDataAttributes @@ -33,7 +32,6 @@ class UpdateDashboardPanelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_dashboard_panel_data_attributes import UpdateDashboardPanelDataAttributes type_: str | Unset = UNSET if not isinstance(self.type_, Unset): diff --git a/rootly_sdk/models/update_dashboard_panel_data_attributes.py b/rootly_sdk/models/update_dashboard_panel_data_attributes.py index 5d6e60a4..6025a60e 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes_params import UpdateDashboardPanelDataAttributesParams from ..models.update_dashboard_panel_data_attributes_position_type_0 import ( @@ -35,7 +31,6 @@ class UpdateDashboardPanelDataAttributes: position: None | Unset | UpdateDashboardPanelDataAttributesPositionType0 = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_dashboard_panel_data_attributes_params import UpdateDashboardPanelDataAttributesParams from ..models.update_dashboard_panel_data_attributes_position_type_0 import ( UpdateDashboardPanelDataAttributesPositionType0, ) 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 11117633..d67d451b 100644 --- a/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py +++ b/rootly_sdk/models/update_dashboard_panel_data_attributes_params.py @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_dashboard_panel_data_attributes_params_display import ( - check_update_dashboard_panel_data_attributes_params_display, -) from ..models.update_dashboard_panel_data_attributes_params_display import ( UpdateDashboardPanelDataAttributesParamsDisplay, + check_update_dashboard_panel_data_attributes_params_display, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes_params_datalabels import ( @@ -53,15 +48,6 @@ class UpdateDashboardPanelDataAttributesParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_dashboard_panel_data_attributes_params_legend import ( - UpdateDashboardPanelDataAttributesParamsLegend, - ) - from ..models.update_dashboard_panel_data_attributes_params_datalabels import ( - UpdateDashboardPanelDataAttributesParamsDatalabels, - ) - from ..models.update_dashboard_panel_data_attributes_params_datasets_item import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItem, - ) display: str | Unset = UNSET if not isinstance(self.display, Unset): 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 dcd843a5..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsDatalabels") 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 01068da5..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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_dashboard_panel_data_attributes_params_datasets_item_collection import ( - check_update_dashboard_panel_data_attributes_params_datasets_item_collection, -) from ..models.update_dashboard_panel_data_attributes_params_datasets_item_collection import ( UpdateDashboardPanelDataAttributesParamsDatasetsItemCollection, + check_update_dashboard_panel_data_attributes_params_datasets_item_collection, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0 import ( @@ -51,14 +46,11 @@ class UpdateDashboardPanelDataAttributesParamsDatasetsItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0 import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0, - ) from ..models.update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0 import ( UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0, ) - from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem, + from ..models.update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0 import ( + UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0, ) name: None | str | 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 4b696ba8..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation import ( - check_update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation, -) from ..models.update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation import ( UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0Operation, + check_update_dashboard_panel_data_attributes_params_datasets_item_aggregate_type_0_operation, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsDatasetsItemAggregateType0") 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 a4244375..bb4b5355 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,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation import ( - check_update_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation, -) from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation import ( UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemOperation, + check_update_dashboard_panel_data_attributes_params_datasets_item_filter_item_operation, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item import ( @@ -39,9 +34,6 @@ class UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item import ( - UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem, - ) operation: str | Unset = UNSET if not isinstance(self.operation, Unset): 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 fc2369f2..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition import ( - check_update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition, -) from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition import ( UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemCondition, -) -from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation import ( - check_update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation, + check_update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_condition, ) from ..models.update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation import ( UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItemOperation, + check_update_dashboard_panel_data_attributes_params_datasets_item_filter_item_rules_item_operation, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsDatasetsItemFilterItemRulesItem") 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 f4ad284e..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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key import ( - check_update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key, -) from ..models.update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key import ( UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0Key, + check_update_dashboard_panel_data_attributes_params_datasets_item_group_by_type_1_type_0_key, ) -from typing import cast - T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsDatasetsItemGroupByType1Type0") 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 95bb9449..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_dashboard_panel_data_attributes_params_legend_groups import ( - check_update_dashboard_panel_data_attributes_params_legend_groups, -) from ..models.update_dashboard_panel_data_attributes_params_legend_groups import ( UpdateDashboardPanelDataAttributesParamsLegendGroups, + check_update_dashboard_panel_data_attributes_params_legend_groups, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateDashboardPanelDataAttributesParamsLegend") 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 597728d6..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateDashboardPanelDataAttributesPositionType0") diff --git a/rootly_sdk/models/update_datadog_notebook_task_params.py b/rootly_sdk/models/update_datadog_notebook_task_params.py index 3445841f..267ccdbc 100644 --- a/rootly_sdk/models/update_datadog_notebook_task_params.py +++ b/rootly_sdk/models/update_datadog_notebook_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_datadog_notebook_task_params_kind import ( + UpdateDatadogNotebookTaskParamsKind, + check_update_datadog_notebook_task_params_kind, +) +from ..models.update_datadog_notebook_task_params_task_type import ( + UpdateDatadogNotebookTaskParamsTaskType, + check_update_datadog_notebook_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_datadog_notebook_task_params_kind import check_update_datadog_notebook_task_params_kind -from ..models.update_datadog_notebook_task_params_kind import UpdateDatadogNotebookTaskParamsKind -from ..models.update_datadog_notebook_task_params_task_type import check_update_datadog_notebook_task_params_task_type -from ..models.update_datadog_notebook_task_params_task_type import UpdateDatadogNotebookTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_datadog_notebook_task_params_template import UpdateDatadogNotebookTaskParamsTemplate @@ -45,7 +46,6 @@ class UpdateDatadogNotebookTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_datadog_notebook_task_params_template import UpdateDatadogNotebookTaskParamsTemplate file_id = self.file_id 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 cb4692e1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateDatadogNotebookTaskParamsTemplate") 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 70662aa8..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,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - from ..models.update_dropbox_paper_page_task_params_task_type import ( + UpdateDropboxPaperPageTaskParamsTaskType, check_update_dropbox_paper_page_task_params_task_type, ) -from ..models.update_dropbox_paper_page_task_params_task_type import UpdateDropboxPaperPageTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateDropboxPaperPageTaskParams") diff --git a/rootly_sdk/models/update_edge_connector.py b/rootly_sdk/models/update_edge_connector.py index 2c55e70d..34021a42 100644 --- a/rootly_sdk/models/update_edge_connector.py +++ b/rootly_sdk/models/update_edge_connector.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_edge_connector_edge_connector import UpdateEdgeConnectorEdgeConnector @@ -28,7 +24,6 @@ class UpdateEdgeConnector: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_edge_connector_edge_connector import UpdateEdgeConnectorEdgeConnector edge_connector = self.edge_connector.to_dict() diff --git a/rootly_sdk/models/update_edge_connector_action.py b/rootly_sdk/models/update_edge_connector_action.py index e2ecb725..d616265c 100644 --- a/rootly_sdk/models/update_edge_connector_action.py +++ b/rootly_sdk/models/update_edge_connector_action.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_edge_connector_action_action import UpdateEdgeConnectorActionAction @@ -28,7 +24,6 @@ class UpdateEdgeConnectorAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_edge_connector_action_action import UpdateEdgeConnectorActionAction action = self.action.to_dict() diff --git a/rootly_sdk/models/update_edge_connector_action_action.py b/rootly_sdk/models/update_edge_connector_action_action.py index 806fba3b..43276057 100644 --- a/rootly_sdk/models/update_edge_connector_action_action.py +++ b/rootly_sdk/models/update_edge_connector_action_action.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_edge_connector_action_action_action_type import ( + UpdateEdgeConnectorActionActionActionType, check_update_edge_connector_action_action_action_type, ) -from ..models.update_edge_connector_action_action_action_type import UpdateEdgeConnectorActionActionActionType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_edge_connector_action_action_metadata import UpdateEdgeConnectorActionActionMetadata @@ -37,7 +34,6 @@ class UpdateEdgeConnectorActionAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_edge_connector_action_action_metadata import UpdateEdgeConnectorActionActionMetadata name = self.name 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 3b389b13..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateEdgeConnectorActionActionMetadata") diff --git a/rootly_sdk/models/update_edge_connector_action_body.py b/rootly_sdk/models/update_edge_connector_action_body.py index ef8c819e..e6fff5ab 100644 --- a/rootly_sdk/models/update_edge_connector_action_body.py +++ b/rootly_sdk/models/update_edge_connector_action_body.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_edge_connector_action_body_action import UpdateEdgeConnectorActionBodyAction @@ -29,7 +26,6 @@ class UpdateEdgeConnectorActionBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_edge_connector_action_body_action import UpdateEdgeConnectorActionBodyAction action: dict[str, Any] | Unset = UNSET if not isinstance(self.action, Unset): 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 c5915c5d..e33acde0 100644 --- a/rootly_sdk/models/update_edge_connector_action_body_action.py +++ b/rootly_sdk/models/update_edge_connector_action_body_action.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_edge_connector_action_body_action_action_type import ( + UpdateEdgeConnectorActionBodyActionActionType, check_update_edge_connector_action_body_action_action_type, ) -from ..models.update_edge_connector_action_body_action_action_type import UpdateEdgeConnectorActionBodyActionActionType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_edge_connector_action_body_action_metadata import UpdateEdgeConnectorActionBodyActionMetadata @@ -37,9 +34,6 @@ class UpdateEdgeConnectorActionBodyAction: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_edge_connector_action_body_action_metadata import ( - UpdateEdgeConnectorActionBodyActionMetadata, - ) name = self.name 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 304b97d5..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateEdgeConnectorActionBodyActionMetadata") diff --git a/rootly_sdk/models/update_edge_connector_body.py b/rootly_sdk/models/update_edge_connector_body.py index dd466089..43596b1b 100644 --- a/rootly_sdk/models/update_edge_connector_body.py +++ b/rootly_sdk/models/update_edge_connector_body.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_edge_connector_body_data import UpdateEdgeConnectorBodyData @@ -29,7 +26,6 @@ class UpdateEdgeConnectorBody: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_edge_connector_body_data import UpdateEdgeConnectorBodyData data: dict[str, Any] | Unset = UNSET if not isinstance(self.data, Unset): diff --git a/rootly_sdk/models/update_edge_connector_body_data.py b/rootly_sdk/models/update_edge_connector_body_data.py index 46810046..22b5eb6c 100644 --- a/rootly_sdk/models/update_edge_connector_body_data.py +++ b/rootly_sdk/models/update_edge_connector_body_data.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_edge_connector_body_data_type import ( + UpdateEdgeConnectorBodyDataType, + check_update_edge_connector_body_data_type, +) from ..types import UNSET, Unset -from ..models.update_edge_connector_body_data_type import check_update_edge_connector_body_data_type -from ..models.update_edge_connector_body_data_type import UpdateEdgeConnectorBodyDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_edge_connector_body_data_attributes import UpdateEdgeConnectorBodyDataAttributes @@ -35,7 +34,6 @@ class UpdateEdgeConnectorBodyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_edge_connector_body_data_attributes import UpdateEdgeConnectorBodyDataAttributes type_: str | Unset = UNSET if not isinstance(self.type_, Unset): 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 c512b720..6324907b 100644 --- a/rootly_sdk/models/update_edge_connector_body_data_attributes.py +++ b/rootly_sdk/models/update_edge_connector_body_data_attributes.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_edge_connector_body_data_attributes_status import ( + UpdateEdgeConnectorBodyDataAttributesStatus, check_update_edge_connector_body_data_attributes_status, ) -from ..models.update_edge_connector_body_data_attributes_status import UpdateEdgeConnectorBodyDataAttributesStatus from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_edge_connector_body_data_attributes_filters import UpdateEdgeConnectorBodyDataAttributesFilters @@ -41,9 +38,6 @@ class UpdateEdgeConnectorBodyDataAttributes: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_edge_connector_body_data_attributes_filters import ( - UpdateEdgeConnectorBodyDataAttributesFilters, - ) name = self.name diff --git a/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py b/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py index 60999d87..c6da5ea2 100644 --- a/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py +++ b/rootly_sdk/models/update_edge_connector_body_data_attributes_filters.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateEdgeConnectorBodyDataAttributesFilters") diff --git a/rootly_sdk/models/update_edge_connector_edge_connector.py b/rootly_sdk/models/update_edge_connector_edge_connector.py index 56dd7606..a2accd57 100644 --- a/rootly_sdk/models/update_edge_connector_edge_connector.py +++ b/rootly_sdk/models/update_edge_connector_edge_connector.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_edge_connector_edge_connector_status import ( + UpdateEdgeConnectorEdgeConnectorStatus, + check_update_edge_connector_edge_connector_status, +) from ..types import UNSET, Unset -from ..models.update_edge_connector_edge_connector_status import check_update_edge_connector_edge_connector_status -from ..models.update_edge_connector_edge_connector_status import UpdateEdgeConnectorEdgeConnectorStatus -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateEdgeConnectorEdgeConnector") diff --git a/rootly_sdk/models/update_environment.py b/rootly_sdk/models/update_environment.py index 4d21f97d..4983b3f5 100644 --- a/rootly_sdk/models/update_environment.py +++ b/rootly_sdk/models/update_environment.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_environment_data import UpdateEnvironmentData @@ -28,7 +24,6 @@ class UpdateEnvironment: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_environment_data import UpdateEnvironmentData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_environment_data.py b/rootly_sdk/models/update_environment_data.py index c0c49295..340dd50b 100644 --- a/rootly_sdk/models/update_environment_data.py +++ b/rootly_sdk/models/update_environment_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_environment_data_type import check_update_environment_data_type -from ..models.update_environment_data_type import UpdateEnvironmentDataType -from typing import cast +from ..models.update_environment_data_type import UpdateEnvironmentDataType, check_update_environment_data_type if TYPE_CHECKING: from ..models.update_environment_data_attributes import UpdateEnvironmentDataAttributes @@ -32,7 +28,6 @@ class UpdateEnvironmentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_environment_data_attributes import UpdateEnvironmentDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_environment_data_attributes.py b/rootly_sdk/models/update_environment_data_attributes.py index 6deff54f..f7e478fd 100644 --- a/rootly_sdk/models/update_environment_data_attributes.py +++ b/rootly_sdk/models/update_environment_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_environment_data_attributes_properties_item import ( UpdateEnvironmentDataAttributesPropertiesItem, @@ -55,15 +51,6 @@ class UpdateEnvironmentDataAttributes: properties: list[UpdateEnvironmentDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_environment_data_attributes_slack_aliases_type_0_item import ( - UpdateEnvironmentDataAttributesSlackAliasesType0Item, - ) - from ..models.update_environment_data_attributes_properties_item import ( - UpdateEnvironmentDataAttributesPropertiesItem, - ) - from ..models.update_environment_data_attributes_slack_channels_type_0_item import ( - UpdateEnvironmentDataAttributesSlackChannelsType0Item, - ) name = self.name diff --git a/rootly_sdk/models/update_environment_data_attributes_properties_item.py b/rootly_sdk/models/update_environment_data_attributes_properties_item.py index 7a1c1e49..555c7a02 100644 --- a/rootly_sdk/models/update_environment_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_environment_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateEnvironmentDataAttributesPropertiesItem") 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 33abdeef..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateEnvironmentDataAttributesSlackAliasesType0Item") 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 451bfca0..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateEnvironmentDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_escalation_policy.py b/rootly_sdk/models/update_escalation_policy.py index a5709b16..9dc8393d 100644 --- a/rootly_sdk/models/update_escalation_policy.py +++ b/rootly_sdk/models/update_escalation_policy.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_escalation_policy_data import UpdateEscalationPolicyData @@ -28,7 +24,6 @@ class UpdateEscalationPolicy: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_data import UpdateEscalationPolicyData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_escalation_policy_data.py b/rootly_sdk/models/update_escalation_policy_data.py index 31accda4..68a98a8b 100644 --- a/rootly_sdk/models/update_escalation_policy_data.py +++ b/rootly_sdk/models/update_escalation_policy_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_data_type import check_update_escalation_policy_data_type -from ..models.update_escalation_policy_data_type import UpdateEscalationPolicyDataType -from typing import cast +from ..models.update_escalation_policy_data_type import ( + UpdateEscalationPolicyDataType, + check_update_escalation_policy_data_type, +) if TYPE_CHECKING: from ..models.update_escalation_policy_data_attributes import UpdateEscalationPolicyDataAttributes @@ -32,7 +31,6 @@ class UpdateEscalationPolicyData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_data_attributes import UpdateEscalationPolicyDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_escalation_policy_data_attributes.py b/rootly_sdk/models/update_escalation_policy_data_attributes.py index b7853ab4..9cf51994 100644 --- a/rootly_sdk/models/update_escalation_policy_data_attributes.py +++ b/rootly_sdk/models/update_escalation_policy_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_escalation_policy_data_attributes_business_hours_type_0 import ( UpdateEscalationPolicyDataAttributesBusinessHoursType0, 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 754d92bf..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item import ( - check_update_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item, -) from ..models.update_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item import ( UpdateEscalationPolicyDataAttributesBusinessHoursType0DaysType0Item, -) -from ..models.update_escalation_policy_data_attributes_business_hours_type_0_time_zone import ( - check_update_escalation_policy_data_attributes_business_hours_type_0_time_zone, + check_update_escalation_policy_data_attributes_business_hours_type_0_days_type_0_item, ) from ..models.update_escalation_policy_data_attributes_business_hours_type_0_time_zone import ( UpdateEscalationPolicyDataAttributesBusinessHoursType0TimeZone, + check_update_escalation_policy_data_attributes_business_hours_type_0_time_zone, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyDataAttributesBusinessHoursType0") diff --git a/rootly_sdk/models/update_escalation_policy_level.py b/rootly_sdk/models/update_escalation_policy_level.py index 8111cd86..dc0a48ed 100644 --- a/rootly_sdk/models/update_escalation_policy_level.py +++ b/rootly_sdk/models/update_escalation_policy_level.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_escalation_policy_level_data import UpdateEscalationPolicyLevelData @@ -28,7 +24,6 @@ class UpdateEscalationPolicyLevel: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_level_data import UpdateEscalationPolicyLevelData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_escalation_policy_level_data.py b/rootly_sdk/models/update_escalation_policy_level_data.py index 593fefce..f6369f8e 100644 --- a/rootly_sdk/models/update_escalation_policy_level_data.py +++ b/rootly_sdk/models/update_escalation_policy_level_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_level_data_type import check_update_escalation_policy_level_data_type -from ..models.update_escalation_policy_level_data_type import UpdateEscalationPolicyLevelDataType -from typing import cast +from ..models.update_escalation_policy_level_data_type import ( + UpdateEscalationPolicyLevelDataType, + check_update_escalation_policy_level_data_type, +) if TYPE_CHECKING: from ..models.update_escalation_policy_level_data_attributes import UpdateEscalationPolicyLevelDataAttributes @@ -32,7 +31,6 @@ class UpdateEscalationPolicyLevelData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_level_data_attributes import UpdateEscalationPolicyLevelDataAttributes type_: str = self.type_ 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 14aeaa5a..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,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy import ( - check_update_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy, -) from ..models.update_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy import ( UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationScheduleStrategy, -) -from ..models.update_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy import ( - check_update_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy, + check_update_escalation_policy_level_data_attributes_paging_strategy_configuration_schedule_strategy, ) from ..models.update_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy import ( UpdateEscalationPolicyLevelDataAttributesPagingStrategyConfigurationStrategy, + check_update_escalation_policy_level_data_attributes_paging_strategy_configuration_strategy, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0 import ( 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 4965f2ab..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,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members import ( - check_update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members, -) from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members import ( UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0TeamMembers, -) -from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type import ( - check_update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type, + check_update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_team_members, ) from ..models.update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type import ( UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0Type, + check_update_escalation_policy_level_data_attributes_notification_target_params_item_type_0_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyLevelDataAttributesNotificationTargetParamsItemType0") diff --git a/rootly_sdk/models/update_escalation_policy_path.py b/rootly_sdk/models/update_escalation_policy_path.py index d6d153ed..b489235a 100644 --- a/rootly_sdk/models/update_escalation_policy_path.py +++ b/rootly_sdk/models/update_escalation_policy_path.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_escalation_policy_path_data import UpdateEscalationPolicyPathData @@ -28,7 +24,6 @@ class UpdateEscalationPolicyPath: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_path_data import UpdateEscalationPolicyPathData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_escalation_policy_path_data.py b/rootly_sdk/models/update_escalation_policy_path_data.py index f769ed5c..99b43f08 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data.py +++ b/rootly_sdk/models/update_escalation_policy_path_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_type import check_update_escalation_policy_path_data_type -from ..models.update_escalation_policy_path_data_type import UpdateEscalationPolicyPathDataType -from typing import cast +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 @@ -32,7 +31,6 @@ class UpdateEscalationPolicyPathData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_path_data_attributes import UpdateEscalationPolicyPathDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes.py index 2fb0c0f2..a88712c9 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes.py @@ -1,45 +1,31 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.update_escalation_policy_path_data_attributes_after_deferral_behavior import ( - check_update_escalation_policy_path_data_attributes_after_deferral_behavior, -) from ..models.update_escalation_policy_path_data_attributes_after_deferral_behavior import ( UpdateEscalationPolicyPathDataAttributesAfterDeferralBehavior, -) -from ..models.update_escalation_policy_path_data_attributes_match_mode import ( - check_update_escalation_policy_path_data_attributes_match_mode, + check_update_escalation_policy_path_data_attributes_after_deferral_behavior, ) from ..models.update_escalation_policy_path_data_attributes_match_mode import ( UpdateEscalationPolicyPathDataAttributesMatchMode, -) -from ..models.update_escalation_policy_path_data_attributes_notification_type import ( - check_update_escalation_policy_path_data_attributes_notification_type, + check_update_escalation_policy_path_data_attributes_match_mode, ) from ..models.update_escalation_policy_path_data_attributes_notification_type import ( UpdateEscalationPolicyPathDataAttributesNotificationType, -) -from ..models.update_escalation_policy_path_data_attributes_path_type import ( - check_update_escalation_policy_path_data_attributes_path_type, + check_update_escalation_policy_path_data_attributes_notification_type, ) from ..models.update_escalation_policy_path_data_attributes_path_type import ( UpdateEscalationPolicyPathDataAttributesPathType, -) -from ..models.update_escalation_policy_path_data_attributes_time_restriction_time_zone import ( - check_update_escalation_policy_path_data_attributes_time_restriction_time_zone, + 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 -from typing import cast if TYPE_CHECKING: from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0 import ( @@ -216,59 +202,62 @@ class UpdateEscalationPolicyPathDataAttributes: time_restrictions: list[UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType0, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType6, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType1, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType2, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType3, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType4, ) - from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item import ( - UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType5, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType6, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType7, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0 import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType0, - ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType7, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType2, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3 import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType3, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType5, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7 import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType4, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1, + ) + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3 import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3, @@ -279,17 +268,8 @@ def to_dict(self) -> dict[str, Any]: from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5 import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5, ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2, - ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4, - ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType1, - ) - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1 import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1, + from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6 import ( + UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6, ) name = self.name diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py index c1720579..43536fa1 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_0.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType0RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_0_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType0") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py index c7a2bc53..67efc6ac 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_1.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType1RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_1_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType1") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py index 35c6c75a..a3f2a0e2 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_2.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_2_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType2Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_2_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType2RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_2_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType2") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py index 72744df7..d654ba4a 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_3.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_3_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType3Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_3_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType3RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_3_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType3") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py index d113c289..8e47f315 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_4.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType4RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_4_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType4") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py index e8c03d5a..34bfdabe 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5.py @@ -1,26 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType5RuleType, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone, + check_update_escalation_policy_path_data_attributes_rules_item_type_5_rule_type, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone import ( UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeZone, + check_update_escalation_policy_path_data_attributes_rules_item_type_5_time_zone, ) -from typing import cast if TYPE_CHECKING: from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( @@ -47,9 +40,6 @@ class UpdateEscalationPolicyPathDataAttributesRulesItemType5: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem, - ) rule_type: str = self.rule_type diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py index 1d5da25f..d79f3ac7 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_5_time_blocks_item.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType5TimeBlocksItem") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py index dc5b8aff..d543a1ff 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_6.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_6_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType6Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_6_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType6RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_6_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType6") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py index c2fd7d25..67122596 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_7.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_7_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType7Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_7_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType7RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_7_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType7") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py index a3416756..4e875168 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_0.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_0_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type0") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py index d9f86109..fefcf0cb 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_1.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_1_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type1") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py index d92fba48..5548d7ad 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_2.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_2_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type2") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py index 42a483a9..7c490b36 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_3.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_3_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type3") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py index 32a87b7a..9ea1d8cf 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_4.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_4_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type4") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py index a5cf0462..e8d1eb48 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5.py @@ -1,26 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5RuleType, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_rule_type, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeZone, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_zone, ) -from typing import cast if TYPE_CHECKING: from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item import ( @@ -49,9 +42,6 @@ class UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem, - ) rule_type: str = self.rule_type diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py index cf65ba41..b90ababd 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_5_time_blocks_item.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type5TimeBlocksItem") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py index 43d90766..5c3b2c9a 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_6.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_6_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type6") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py index c2e37693..b5143c9d 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_8_type_7.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_8_type_7_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType8Type7") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py index 209bfff5..3d985253 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_0.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_0_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type0") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py index 747fddd8..a54b05f8 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_1.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_1_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type1") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py index baa406ff..e630006f 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_2.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_2_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type2") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py index e3d46a03..74fc9476 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_3.py @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_3_rule_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type3") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py index 09c05f3a..d9250bc1 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_4.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_4_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type4") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py index 6e8afc00..6d07b9a8 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5.py @@ -1,26 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5RuleType, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_rule_type, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeZone, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_zone, ) -from typing import cast if TYPE_CHECKING: from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item import ( @@ -49,9 +42,6 @@ class UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item import ( - UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem, - ) rule_type: str = self.rule_type diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py index e9eca5ee..31a4c90f 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_5_time_blocks_item.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type5TimeBlocksItem") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py index 7bd8aa55..068ee32b 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_6.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_6_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type6") diff --git a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py index cea0c43e..006cb474 100644 --- a/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py +++ b/rootly_sdk/models/update_escalation_policy_path_data_attributes_rules_item_type_9_type_7.py @@ -1,27 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator, -) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7Operator, -) -from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type import ( - check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_operator, ) from ..models.update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type import ( UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7RuleType, + check_update_escalation_policy_path_data_attributes_rules_item_type_9_type_7_rule_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesRulesItemType9Type7") 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 index e6dcbedc..a53f78dd 100644 --- 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 @@ -1,28 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item_end_day import ( - check_update_escalation_policy_path_data_attributes_time_restrictions_item_end_day, -) from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item_end_day import ( UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItemEndDay, -) -from ..models.update_escalation_policy_path_data_attributes_time_restrictions_item_start_day import ( - check_update_escalation_policy_path_data_attributes_time_restrictions_item_start_day, + 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 -from typing import cast - T = TypeVar("T", bound="UpdateEscalationPolicyPathDataAttributesTimeRestrictionsItem") diff --git a/rootly_sdk/models/update_form_field.py b/rootly_sdk/models/update_form_field.py index a71e38b7..b525084e 100644 --- a/rootly_sdk/models/update_form_field.py +++ b/rootly_sdk/models/update_form_field.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_form_field_data import UpdateFormFieldData @@ -28,7 +24,6 @@ class UpdateFormField: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_data import UpdateFormFieldData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_form_field_data.py b/rootly_sdk/models/update_form_field_data.py index a72308ca..2a189305 100644 --- a/rootly_sdk/models/update_form_field_data.py +++ b/rootly_sdk/models/update_form_field_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_form_field_data_type import check_update_form_field_data_type -from ..models.update_form_field_data_type import UpdateFormFieldDataType -from typing import cast +from ..models.update_form_field_data_type import UpdateFormFieldDataType, check_update_form_field_data_type if TYPE_CHECKING: from ..models.update_form_field_data_attributes import UpdateFormFieldDataAttributes @@ -32,7 +28,6 @@ class UpdateFormFieldData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_data_attributes import UpdateFormFieldDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_form_field_data_attributes.py b/rootly_sdk/models/update_form_field_data_attributes.py index 76dc38e3..b35324bf 100644 --- a/rootly_sdk/models/update_form_field_data_attributes.py +++ b/rootly_sdk/models/update_form_field_data_attributes.py @@ -1,23 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.update_form_field_data_attributes_input_kind import ( + UpdateFormFieldDataAttributesInputKind, + check_update_form_field_data_attributes_input_kind, +) +from ..models.update_form_field_data_attributes_kind import ( + UpdateFormFieldDataAttributesKind, + check_update_form_field_data_attributes_kind, +) +from ..models.update_form_field_data_attributes_value_kind import ( + UpdateFormFieldDataAttributesValueKind, + check_update_form_field_data_attributes_value_kind, +) from ..types import UNSET, Unset -from ..models.update_form_field_data_attributes_input_kind import check_update_form_field_data_attributes_input_kind -from ..models.update_form_field_data_attributes_input_kind import UpdateFormFieldDataAttributesInputKind -from ..models.update_form_field_data_attributes_kind import check_update_form_field_data_attributes_kind -from ..models.update_form_field_data_attributes_kind import UpdateFormFieldDataAttributesKind -from ..models.update_form_field_data_attributes_value_kind import check_update_form_field_data_attributes_value_kind -from ..models.update_form_field_data_attributes_value_kind import UpdateFormFieldDataAttributesValueKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateFormFieldDataAttributes") diff --git a/rootly_sdk/models/update_form_field_option.py b/rootly_sdk/models/update_form_field_option.py index 5c05bf00..7fa663da 100644 --- a/rootly_sdk/models/update_form_field_option.py +++ b/rootly_sdk/models/update_form_field_option.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_form_field_option_data import UpdateFormFieldOptionData @@ -28,7 +24,6 @@ class UpdateFormFieldOption: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_option_data import UpdateFormFieldOptionData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_form_field_option_data.py b/rootly_sdk/models/update_form_field_option_data.py index 776c13b0..234bfe54 100644 --- a/rootly_sdk/models/update_form_field_option_data.py +++ b/rootly_sdk/models/update_form_field_option_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_form_field_option_data_type import check_update_form_field_option_data_type -from ..models.update_form_field_option_data_type import UpdateFormFieldOptionDataType -from typing import cast +from ..models.update_form_field_option_data_type import ( + UpdateFormFieldOptionDataType, + check_update_form_field_option_data_type, +) if TYPE_CHECKING: from ..models.update_form_field_option_data_attributes import UpdateFormFieldOptionDataAttributes @@ -32,7 +31,6 @@ class UpdateFormFieldOptionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_option_data_attributes import UpdateFormFieldOptionDataAttributes type_: str = self.type_ 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 ba35ebcd..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateFormFieldOptionDataAttributes") diff --git a/rootly_sdk/models/update_form_field_placement.py b/rootly_sdk/models/update_form_field_placement.py index e9f02cec..8d8e18d4 100644 --- a/rootly_sdk/models/update_form_field_placement.py +++ b/rootly_sdk/models/update_form_field_placement.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_form_field_placement_data import UpdateFormFieldPlacementData @@ -28,7 +24,6 @@ class UpdateFormFieldPlacement: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_placement_data import UpdateFormFieldPlacementData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_form_field_placement_condition.py b/rootly_sdk/models/update_form_field_placement_condition.py index 60d2e72e..60e1c0a5 100644 --- a/rootly_sdk/models/update_form_field_placement_condition.py +++ b/rootly_sdk/models/update_form_field_placement_condition.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_form_field_placement_condition_data import UpdateFormFieldPlacementConditionData @@ -28,7 +24,6 @@ class UpdateFormFieldPlacementCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_placement_condition_data import UpdateFormFieldPlacementConditionData data = self.data.to_dict() 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 61fb5877..28363a0c 100644 --- a/rootly_sdk/models/update_form_field_placement_condition_data.py +++ b/rootly_sdk/models/update_form_field_placement_condition_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_form_field_placement_condition_data_type import ( + UpdateFormFieldPlacementConditionDataType, check_update_form_field_placement_condition_data_type, ) -from ..models.update_form_field_placement_condition_data_type import UpdateFormFieldPlacementConditionDataType -from typing import cast if TYPE_CHECKING: from ..models.update_form_field_placement_condition_data_attributes import ( @@ -36,9 +33,6 @@ class UpdateFormFieldPlacementConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_placement_condition_data_attributes import ( - UpdateFormFieldPlacementConditionDataAttributes, - ) type_: str = self.type_ 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 4e45beab..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,28 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_form_field_placement_condition_data_attributes_comparison import ( - check_update_form_field_placement_condition_data_attributes_comparison, -) from ..models.update_form_field_placement_condition_data_attributes_comparison import ( UpdateFormFieldPlacementConditionDataAttributesComparison, -) -from ..models.update_form_field_placement_condition_data_attributes_conditioned import ( - check_update_form_field_placement_condition_data_attributes_conditioned, + check_update_form_field_placement_condition_data_attributes_comparison, ) from ..models.update_form_field_placement_condition_data_attributes_conditioned import ( UpdateFormFieldPlacementConditionDataAttributesConditioned, + check_update_form_field_placement_condition_data_attributes_conditioned, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateFormFieldPlacementConditionDataAttributes") diff --git a/rootly_sdk/models/update_form_field_placement_data.py b/rootly_sdk/models/update_form_field_placement_data.py index 6d8ae022..35393803 100644 --- a/rootly_sdk/models/update_form_field_placement_data.py +++ b/rootly_sdk/models/update_form_field_placement_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_form_field_placement_data_type import check_update_form_field_placement_data_type -from ..models.update_form_field_placement_data_type import UpdateFormFieldPlacementDataType -from typing import cast +from ..models.update_form_field_placement_data_type import ( + UpdateFormFieldPlacementDataType, + check_update_form_field_placement_data_type, +) if TYPE_CHECKING: from ..models.update_form_field_placement_data_attributes import UpdateFormFieldPlacementDataAttributes @@ -32,7 +31,6 @@ class UpdateFormFieldPlacementData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_placement_data_attributes import UpdateFormFieldPlacementDataAttributes type_: str = self.type_ 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 f47f8a67..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,28 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_form_field_placement_data_attributes_placement_operator import ( - check_update_form_field_placement_data_attributes_placement_operator, -) from ..models.update_form_field_placement_data_attributes_placement_operator import ( UpdateFormFieldPlacementDataAttributesPlacementOperator, -) -from ..models.update_form_field_placement_data_attributes_required_operator import ( - check_update_form_field_placement_data_attributes_required_operator, + check_update_form_field_placement_data_attributes_placement_operator, ) from ..models.update_form_field_placement_data_attributes_required_operator import ( UpdateFormFieldPlacementDataAttributesRequiredOperator, + check_update_form_field_placement_data_attributes_required_operator, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateFormFieldPlacementDataAttributes") diff --git a/rootly_sdk/models/update_form_field_position.py b/rootly_sdk/models/update_form_field_position.py index bd265731..b7f234f1 100644 --- a/rootly_sdk/models/update_form_field_position.py +++ b/rootly_sdk/models/update_form_field_position.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_form_field_position_data import UpdateFormFieldPositionData @@ -28,7 +24,6 @@ class UpdateFormFieldPosition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_position_data import UpdateFormFieldPositionData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_form_field_position_data.py b/rootly_sdk/models/update_form_field_position_data.py index 597cf803..3b9cc75c 100644 --- a/rootly_sdk/models/update_form_field_position_data.py +++ b/rootly_sdk/models/update_form_field_position_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_form_field_position_data_type import check_update_form_field_position_data_type -from ..models.update_form_field_position_data_type import UpdateFormFieldPositionDataType -from typing import cast +from ..models.update_form_field_position_data_type import ( + UpdateFormFieldPositionDataType, + check_update_form_field_position_data_type, +) if TYPE_CHECKING: from ..models.update_form_field_position_data_attributes import UpdateFormFieldPositionDataAttributes @@ -32,7 +31,6 @@ class UpdateFormFieldPositionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_field_position_data_attributes import UpdateFormFieldPositionDataAttributes type_: str = self.type_ 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 4f298997..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,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset from ..models.update_form_field_position_data_attributes_form import ( + UpdateFormFieldPositionDataAttributesForm, check_update_form_field_position_data_attributes_form, ) -from ..models.update_form_field_position_data_attributes_form import UpdateFormFieldPositionDataAttributesForm from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateFormFieldPositionDataAttributes") diff --git a/rootly_sdk/models/update_form_set.py b/rootly_sdk/models/update_form_set.py index 9e5312e9..5122ef01 100644 --- a/rootly_sdk/models/update_form_set.py +++ b/rootly_sdk/models/update_form_set.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_form_set_data import UpdateFormSetData @@ -28,7 +24,6 @@ class UpdateFormSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_set_data import UpdateFormSetData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_form_set_condition.py b/rootly_sdk/models/update_form_set_condition.py index 2a8e7f64..ccd4d7ee 100644 --- a/rootly_sdk/models/update_form_set_condition.py +++ b/rootly_sdk/models/update_form_set_condition.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_form_set_condition_data import UpdateFormSetConditionData @@ -28,7 +24,6 @@ class UpdateFormSetCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_set_condition_data import UpdateFormSetConditionData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_form_set_condition_data.py b/rootly_sdk/models/update_form_set_condition_data.py index 642ca9cf..83b587c0 100644 --- a/rootly_sdk/models/update_form_set_condition_data.py +++ b/rootly_sdk/models/update_form_set_condition_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_form_set_condition_data_type import check_update_form_set_condition_data_type -from ..models.update_form_set_condition_data_type import UpdateFormSetConditionDataType -from typing import cast +from ..models.update_form_set_condition_data_type import ( + UpdateFormSetConditionDataType, + check_update_form_set_condition_data_type, +) if TYPE_CHECKING: from ..models.update_form_set_condition_data_attributes import UpdateFormSetConditionDataAttributes @@ -32,7 +31,6 @@ class UpdateFormSetConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_set_condition_data_attributes import UpdateFormSetConditionDataAttributes type_: str = self.type_ 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 238649f8..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,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_form_set_condition_data_attributes_comparison import ( + UpdateFormSetConditionDataAttributesComparison, check_update_form_set_condition_data_attributes_comparison, ) -from ..models.update_form_set_condition_data_attributes_comparison import UpdateFormSetConditionDataAttributesComparison from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateFormSetConditionDataAttributes") diff --git a/rootly_sdk/models/update_form_set_data.py b/rootly_sdk/models/update_form_set_data.py index 386359bd..582152a4 100644 --- a/rootly_sdk/models/update_form_set_data.py +++ b/rootly_sdk/models/update_form_set_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_form_set_data_type import check_update_form_set_data_type -from ..models.update_form_set_data_type import UpdateFormSetDataType -from typing import cast +from ..models.update_form_set_data_type import UpdateFormSetDataType, check_update_form_set_data_type if TYPE_CHECKING: from ..models.update_form_set_data_attributes import UpdateFormSetDataAttributes @@ -32,7 +28,6 @@ class UpdateFormSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_form_set_data_attributes import UpdateFormSetDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_form_set_data_attributes.py b/rootly_sdk/models/update_form_set_data_attributes.py index a95b6b0b..4b67156e 100644 --- a/rootly_sdk/models/update_form_set_data_attributes.py +++ b/rootly_sdk/models/update_form_set_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateFormSetDataAttributes") diff --git a/rootly_sdk/models/update_functionality.py b/rootly_sdk/models/update_functionality.py index e89e6e64..556789c0 100644 --- a/rootly_sdk/models/update_functionality.py +++ b/rootly_sdk/models/update_functionality.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_functionality_data import UpdateFunctionalityData @@ -28,7 +24,6 @@ class UpdateFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_functionality_data import UpdateFunctionalityData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_functionality_data.py b/rootly_sdk/models/update_functionality_data.py index acb8e420..53e62f85 100644 --- a/rootly_sdk/models/update_functionality_data.py +++ b/rootly_sdk/models/update_functionality_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_functionality_data_type import check_update_functionality_data_type -from ..models.update_functionality_data_type import UpdateFunctionalityDataType -from typing import cast +from ..models.update_functionality_data_type import UpdateFunctionalityDataType, check_update_functionality_data_type if TYPE_CHECKING: from ..models.update_functionality_data_attributes import UpdateFunctionalityDataAttributes @@ -32,7 +28,6 @@ class UpdateFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_functionality_data_attributes import UpdateFunctionalityDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_functionality_data_attributes.py b/rootly_sdk/models/update_functionality_data_attributes.py index 837fefda..067bd483 100644 --- a/rootly_sdk/models/update_functionality_data_attributes.py +++ b/rootly_sdk/models/update_functionality_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_functionality_data_attributes_properties_item import ( UpdateFunctionalityDataAttributesPropertiesItem, @@ -80,15 +76,6 @@ class UpdateFunctionalityDataAttributes: properties: list[UpdateFunctionalityDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_functionality_data_attributes_slack_channels_type_0_item import ( - UpdateFunctionalityDataAttributesSlackChannelsType0Item, - ) - from ..models.update_functionality_data_attributes_properties_item import ( - UpdateFunctionalityDataAttributesPropertiesItem, - ) - from ..models.update_functionality_data_attributes_slack_aliases_type_0_item import ( - UpdateFunctionalityDataAttributesSlackAliasesType0Item, - ) name = self.name diff --git a/rootly_sdk/models/update_functionality_data_attributes_properties_item.py b/rootly_sdk/models/update_functionality_data_attributes_properties_item.py index abbef9f5..8d1806bc 100644 --- a/rootly_sdk/models/update_functionality_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_functionality_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateFunctionalityDataAttributesPropertiesItem") 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 acdb5715..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateFunctionalityDataAttributesSlackAliasesType0Item") 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 71b97555..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateFunctionalityDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_github_issue_task_params.py b/rootly_sdk/models/update_github_issue_task_params.py index 0f40b964..a6f28436 100644 --- a/rootly_sdk/models/update_github_issue_task_params.py +++ b/rootly_sdk/models/update_github_issue_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_github_issue_task_params_labels_mode import ( + UpdateGithubIssueTaskParamsLabelsMode, + check_update_github_issue_task_params_labels_mode, +) +from ..models.update_github_issue_task_params_task_type import ( + UpdateGithubIssueTaskParamsTaskType, + check_update_github_issue_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_github_issue_task_params_labels_mode import check_update_github_issue_task_params_labels_mode -from ..models.update_github_issue_task_params_labels_mode import UpdateGithubIssueTaskParamsLabelsMode -from ..models.update_github_issue_task_params_task_type import check_update_github_issue_task_params_task_type -from ..models.update_github_issue_task_params_task_type import UpdateGithubIssueTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_github_issue_task_params_completion import UpdateGithubIssueTaskParamsCompletion from ..models.update_github_issue_task_params_issue_type import UpdateGithubIssueTaskParamsIssueType @@ -57,10 +58,6 @@ class UpdateGithubIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_github_issue_task_params_labels_item import UpdateGithubIssueTaskParamsLabelsItem - from ..models.update_github_issue_task_params_issue_type import UpdateGithubIssueTaskParamsIssueType - from ..models.update_github_issue_task_params_repository import UpdateGithubIssueTaskParamsRepository - from ..models.update_github_issue_task_params_completion import UpdateGithubIssueTaskParamsCompletion issue_id = self.issue_id 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 3b039bb8..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateGithubIssueTaskParamsCompletion") 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 index 8dbffa9a..2699f2b5 100644 --- a/rootly_sdk/models/update_github_issue_task_params_issue_type.py +++ b/rootly_sdk/models/update_github_issue_task_params_issue_type.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateGithubIssueTaskParamsIssueType") 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 index c743d849..c905b808 100644 --- a/rootly_sdk/models/update_github_issue_task_params_labels_item.py +++ b/rootly_sdk/models/update_github_issue_task_params_labels_item.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateGithubIssueTaskParamsLabelsItem") diff --git a/rootly_sdk/models/update_github_issue_task_params_repository.py b/rootly_sdk/models/update_github_issue_task_params_repository.py index 31cd26f1..541866c5 100644 --- a/rootly_sdk/models/update_github_issue_task_params_repository.py +++ b/rootly_sdk/models/update_github_issue_task_params_repository.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateGithubIssueTaskParamsRepository") diff --git a/rootly_sdk/models/update_gitlab_issue_task_params.py b/rootly_sdk/models/update_gitlab_issue_task_params.py index 7dc923fe..c2fb8168 100644 --- a/rootly_sdk/models/update_gitlab_issue_task_params.py +++ b/rootly_sdk/models/update_gitlab_issue_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_gitlab_issue_task_params_issue_type import ( + UpdateGitlabIssueTaskParamsIssueType, + check_update_gitlab_issue_task_params_issue_type, +) +from ..models.update_gitlab_issue_task_params_task_type import ( + UpdateGitlabIssueTaskParamsTaskType, + check_update_gitlab_issue_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_gitlab_issue_task_params_issue_type import check_update_gitlab_issue_task_params_issue_type -from ..models.update_gitlab_issue_task_params_issue_type import UpdateGitlabIssueTaskParamsIssueType -from ..models.update_gitlab_issue_task_params_task_type import check_update_gitlab_issue_task_params_task_type -from ..models.update_gitlab_issue_task_params_task_type import UpdateGitlabIssueTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_gitlab_issue_task_params_completion import UpdateGitlabIssueTaskParamsCompletion @@ -47,7 +48,6 @@ class UpdateGitlabIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_gitlab_issue_task_params_completion import UpdateGitlabIssueTaskParamsCompletion issue_id = self.issue_id 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 672466c9..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateGitlabIssueTaskParamsCompletion") 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 dfad3ac2..8f019d13 100644 --- a/rootly_sdk/models/update_google_calendar_event_task_params.py +++ b/rootly_sdk/models/update_google_calendar_event_task_params.py @@ -1,25 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_google_calendar_event_task_params_conference_solution_key import ( - check_update_google_calendar_event_task_params_conference_solution_key, -) from ..models.update_google_calendar_event_task_params_conference_solution_key import ( UpdateGoogleCalendarEventTaskParamsConferenceSolutionKey, + check_update_google_calendar_event_task_params_conference_solution_key, ) from ..models.update_google_calendar_event_task_params_task_type import ( + UpdateGoogleCalendarEventTaskParamsTaskType, check_update_google_calendar_event_task_params_task_type, ) -from ..models.update_google_calendar_event_task_params_task_type import UpdateGoogleCalendarEventTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_google_calendar_event_task_params_post_to_slack_channels_item import ( @@ -74,9 +69,6 @@ class UpdateGoogleCalendarEventTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_google_calendar_event_task_params_post_to_slack_channels_item import ( - UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem, - ) event_id = self.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 a8717249..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateGoogleCalendarEventTaskParamsPostToSlackChannelsItem") diff --git a/rootly_sdk/models/update_google_chat_space_description_task_params.py b/rootly_sdk/models/update_google_chat_space_description_task_params.py index 25a773b5..bf018939 100644 --- a/rootly_sdk/models/update_google_chat_space_description_task_params.py +++ b/rootly_sdk/models/update_google_chat_space_description_task_params.py @@ -1,21 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_google_chat_space_description_task_params_task_type import ( - check_update_google_chat_space_description_task_params_task_type, -) from ..models.update_google_chat_space_description_task_params_task_type import ( UpdateGoogleChatSpaceDescriptionTaskParamsTaskType, + check_update_google_chat_space_description_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_google_chat_space_description_task_params_space import ( @@ -41,9 +36,6 @@ class UpdateGoogleChatSpaceDescriptionTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_google_chat_space_description_task_params_space import ( - UpdateGoogleChatSpaceDescriptionTaskParamsSpace, - ) space = self.space.to_dict() diff --git a/rootly_sdk/models/update_google_chat_space_description_task_params_space.py b/rootly_sdk/models/update_google_chat_space_description_task_params_space.py index 9cc0c3b4..42c6ff4f 100644 --- a/rootly_sdk/models/update_google_chat_space_description_task_params_space.py +++ b/rootly_sdk/models/update_google_chat_space_description_task_params_space.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateGoogleChatSpaceDescriptionTaskParamsSpace") 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 38a46427..80b0fe55 100644 --- a/rootly_sdk/models/update_google_docs_page_task_params.py +++ b/rootly_sdk/models/update_google_docs_page_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_google_docs_page_task_params_task_type import ( + UpdateGoogleDocsPageTaskParamsTaskType, + check_update_google_docs_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_google_docs_page_task_params_task_type import check_update_google_docs_page_task_params_task_type -from ..models.update_google_docs_page_task_params_task_type import UpdateGoogleDocsPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateGoogleDocsPageTaskParams") diff --git a/rootly_sdk/models/update_heartbeat.py b/rootly_sdk/models/update_heartbeat.py index 42d8e0b9..165a23ee 100644 --- a/rootly_sdk/models/update_heartbeat.py +++ b/rootly_sdk/models/update_heartbeat.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_heartbeat_data import UpdateHeartbeatData @@ -28,7 +24,6 @@ class UpdateHeartbeat: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_heartbeat_data import UpdateHeartbeatData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_heartbeat_data.py b/rootly_sdk/models/update_heartbeat_data.py index 9b4d3469..f068e428 100644 --- a/rootly_sdk/models/update_heartbeat_data.py +++ b/rootly_sdk/models/update_heartbeat_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_heartbeat_data_type import check_update_heartbeat_data_type -from ..models.update_heartbeat_data_type import UpdateHeartbeatDataType -from typing import cast +from ..models.update_heartbeat_data_type import UpdateHeartbeatDataType, check_update_heartbeat_data_type if TYPE_CHECKING: from ..models.update_heartbeat_data_attributes import UpdateHeartbeatDataAttributes @@ -32,7 +28,6 @@ class UpdateHeartbeatData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_heartbeat_data_attributes import UpdateHeartbeatDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_heartbeat_data_attributes.py b/rootly_sdk/models/update_heartbeat_data_attributes.py index fd6f6d8c..6b0b4180 100644 --- a/rootly_sdk/models/update_heartbeat_data_attributes.py +++ b/rootly_sdk/models/update_heartbeat_data_attributes.py @@ -1,24 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_heartbeat_data_attributes_interval_unit import check_update_heartbeat_data_attributes_interval_unit -from ..models.update_heartbeat_data_attributes_interval_unit import UpdateHeartbeatDataAttributesIntervalUnit -from ..models.update_heartbeat_data_attributes_notification_target_type import ( - check_update_heartbeat_data_attributes_notification_target_type, +from ..models.update_heartbeat_data_attributes_interval_unit import ( + UpdateHeartbeatDataAttributesIntervalUnit, + check_update_heartbeat_data_attributes_interval_unit, ) from ..models.update_heartbeat_data_attributes_notification_target_type import ( UpdateHeartbeatDataAttributesNotificationTargetType, + check_update_heartbeat_data_attributes_notification_target_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateHeartbeatDataAttributes") diff --git a/rootly_sdk/models/update_incident.py b/rootly_sdk/models/update_incident.py index b9de7c1c..7f3dc16e 100644 --- a/rootly_sdk/models/update_incident.py +++ b/rootly_sdk/models/update_incident.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_data import UpdateIncidentData @@ -28,7 +24,6 @@ class UpdateIncident: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_data import UpdateIncidentData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_action_item.py b/rootly_sdk/models/update_incident_action_item.py index fbde4edf..b2746244 100644 --- a/rootly_sdk/models/update_incident_action_item.py +++ b/rootly_sdk/models/update_incident_action_item.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_action_item_data import UpdateIncidentActionItemData @@ -28,7 +24,6 @@ class UpdateIncidentActionItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_action_item_data import UpdateIncidentActionItemData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_action_item_data.py b/rootly_sdk/models/update_incident_action_item_data.py index 478c6360..ca8096f5 100644 --- a/rootly_sdk/models/update_incident_action_item_data.py +++ b/rootly_sdk/models/update_incident_action_item_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_action_item_data_type import check_update_incident_action_item_data_type -from ..models.update_incident_action_item_data_type import UpdateIncidentActionItemDataType -from typing import cast +from ..models.update_incident_action_item_data_type import ( + UpdateIncidentActionItemDataType, + check_update_incident_action_item_data_type, +) if TYPE_CHECKING: from ..models.update_incident_action_item_data_attributes import UpdateIncidentActionItemDataAttributes @@ -32,7 +31,6 @@ class UpdateIncidentActionItemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_action_item_data_attributes import UpdateIncidentActionItemDataAttributes type_: str = self.type_ 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 8fd5e855..076174eb 100644 --- a/rootly_sdk/models/update_incident_action_item_data_attributes.py +++ b/rootly_sdk/models/update_incident_action_item_data_attributes.py @@ -1,27 +1,23 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_incident_action_item_data_attributes_kind import ( + UpdateIncidentActionItemDataAttributesKind, check_update_incident_action_item_data_attributes_kind, ) -from ..models.update_incident_action_item_data_attributes_kind import UpdateIncidentActionItemDataAttributesKind from ..models.update_incident_action_item_data_attributes_priority import ( + UpdateIncidentActionItemDataAttributesPriority, check_update_incident_action_item_data_attributes_priority, ) -from ..models.update_incident_action_item_data_attributes_priority import UpdateIncidentActionItemDataAttributesPriority from ..models.update_incident_action_item_data_attributes_status import ( + UpdateIncidentActionItemDataAttributesStatus, check_update_incident_action_item_data_attributes_status, ) -from ..models.update_incident_action_item_data_attributes_status import UpdateIncidentActionItemDataAttributesStatus from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_incident_action_item_data_attributes_form_field_selections_type_0_item import ( @@ -68,9 +64,6 @@ class UpdateIncidentActionItemDataAttributes: ) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_action_item_data_attributes_form_field_selections_type_0_item import ( - UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item, - ) summary = self.summary diff --git a/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py b/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py index 0f68505a..95df1e5a 100644 --- a/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py +++ b/rootly_sdk/models/update_incident_action_item_data_attributes_form_field_selections_type_0_item.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateIncidentActionItemDataAttributesFormFieldSelectionsType0Item") diff --git a/rootly_sdk/models/update_incident_custom_field_selection.py b/rootly_sdk/models/update_incident_custom_field_selection.py index 7843aaa1..9aa40a6f 100644 --- a/rootly_sdk/models/update_incident_custom_field_selection.py +++ b/rootly_sdk/models/update_incident_custom_field_selection.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_custom_field_selection_data import UpdateIncidentCustomFieldSelectionData @@ -28,7 +24,6 @@ class UpdateIncidentCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_custom_field_selection_data import UpdateIncidentCustomFieldSelectionData data = self.data.to_dict() 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 45e4a956..365c90ba 100644 --- a/rootly_sdk/models/update_incident_custom_field_selection_data.py +++ b/rootly_sdk/models/update_incident_custom_field_selection_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_incident_custom_field_selection_data_type import ( + UpdateIncidentCustomFieldSelectionDataType, check_update_incident_custom_field_selection_data_type, ) -from ..models.update_incident_custom_field_selection_data_type import UpdateIncidentCustomFieldSelectionDataType -from typing import cast if TYPE_CHECKING: from ..models.update_incident_custom_field_selection_data_attributes import ( @@ -36,9 +33,6 @@ class UpdateIncidentCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_custom_field_selection_data_attributes import ( - UpdateIncidentCustomFieldSelectionDataAttributes, - ) type_: str = self.type_ 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 351f054f..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,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateIncidentCustomFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/update_incident_data.py b/rootly_sdk/models/update_incident_data.py index f5c72674..79df36e1 100644 --- a/rootly_sdk/models/update_incident_data.py +++ b/rootly_sdk/models/update_incident_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_data_type import check_update_incident_data_type -from ..models.update_incident_data_type import UpdateIncidentDataType -from typing import cast +from ..models.update_incident_data_type import UpdateIncidentDataType, check_update_incident_data_type if TYPE_CHECKING: from ..models.update_incident_data_attributes import UpdateIncidentDataAttributes @@ -32,7 +28,6 @@ class UpdateIncidentData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_data_attributes import UpdateIncidentDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_incident_data_attributes.py b/rootly_sdk/models/update_incident_data_attributes.py index d97309c1..b92c2028 100644 --- a/rootly_sdk/models/update_incident_data_attributes.py +++ b/rootly_sdk/models/update_incident_data_attributes.py @@ -1,20 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.update_incident_data_attributes_kind import ( + UpdateIncidentDataAttributesKind, + check_update_incident_data_attributes_kind, +) +from ..models.update_incident_data_attributes_status import ( + UpdateIncidentDataAttributesStatus, + check_update_incident_data_attributes_status, +) from ..types import UNSET, Unset -from ..models.update_incident_data_attributes_kind import check_update_incident_data_attributes_kind -from ..models.update_incident_data_attributes_kind import UpdateIncidentDataAttributesKind -from ..models.update_incident_data_attributes_status import check_update_incident_data_attributes_status -from ..models.update_incident_data_attributes_status import UpdateIncidentDataAttributesStatus -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_data_attributes_labels_type_0 import UpdateIncidentDataAttributesLabelsType0 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 01f3f5d1..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateIncidentDataAttributesLabelsType0") diff --git a/rootly_sdk/models/update_incident_event.py b/rootly_sdk/models/update_incident_event.py index 46757822..4cb04a10 100644 --- a/rootly_sdk/models/update_incident_event.py +++ b/rootly_sdk/models/update_incident_event.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_event_data import UpdateIncidentEventData @@ -28,7 +24,6 @@ class UpdateIncidentEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_event_data import UpdateIncidentEventData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_event_data.py b/rootly_sdk/models/update_incident_event_data.py index bff767fa..ee5cbb73 100644 --- a/rootly_sdk/models/update_incident_event_data.py +++ b/rootly_sdk/models/update_incident_event_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_event_data_type import check_update_incident_event_data_type -from ..models.update_incident_event_data_type import UpdateIncidentEventDataType -from typing import cast +from ..models.update_incident_event_data_type import UpdateIncidentEventDataType, check_update_incident_event_data_type if TYPE_CHECKING: from ..models.update_incident_event_data_attributes import UpdateIncidentEventDataAttributes @@ -32,7 +28,6 @@ class UpdateIncidentEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_event_data_attributes import UpdateIncidentEventDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_incident_event_data_attributes.py b/rootly_sdk/models/update_incident_event_data_attributes.py index 6434ad59..1d966e3c 100644 --- a/rootly_sdk/models/update_incident_event_data_attributes.py +++ b/rootly_sdk/models/update_incident_event_data_attributes.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset from ..models.update_incident_event_data_attributes_visibility import ( + UpdateIncidentEventDataAttributesVisibility, check_update_incident_event_data_attributes_visibility, ) -from ..models.update_incident_event_data_attributes_visibility import UpdateIncidentEventDataAttributesVisibility from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateIncidentEventDataAttributes") diff --git a/rootly_sdk/models/update_incident_event_functionality.py b/rootly_sdk/models/update_incident_event_functionality.py index aa831e1e..b7d3a6e7 100644 --- a/rootly_sdk/models/update_incident_event_functionality.py +++ b/rootly_sdk/models/update_incident_event_functionality.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_event_functionality_data import UpdateIncidentEventFunctionalityData @@ -28,7 +24,6 @@ class UpdateIncidentEventFunctionality: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_event_functionality_data import UpdateIncidentEventFunctionalityData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_event_functionality_data.py b/rootly_sdk/models/update_incident_event_functionality_data.py index a3279389..db851cd6 100644 --- a/rootly_sdk/models/update_incident_event_functionality_data.py +++ b/rootly_sdk/models/update_incident_event_functionality_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_event_functionality_data_type import check_update_incident_event_functionality_data_type -from ..models.update_incident_event_functionality_data_type import UpdateIncidentEventFunctionalityDataType -from typing import cast +from ..models.update_incident_event_functionality_data_type import ( + UpdateIncidentEventFunctionalityDataType, + check_update_incident_event_functionality_data_type, +) if TYPE_CHECKING: from ..models.update_incident_event_functionality_data_attributes import ( @@ -34,9 +33,6 @@ class UpdateIncidentEventFunctionalityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_event_functionality_data_attributes import ( - UpdateIncidentEventFunctionalityDataAttributes, - ) type_: str = self.type_ 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 48f6f90f..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_incident_event_functionality_data_attributes_status import ( - check_update_incident_event_functionality_data_attributes_status, -) from ..models.update_incident_event_functionality_data_attributes_status import ( UpdateIncidentEventFunctionalityDataAttributesStatus, + check_update_incident_event_functionality_data_attributes_status, ) -from typing import cast - T = TypeVar("T", bound="UpdateIncidentEventFunctionalityDataAttributes") diff --git a/rootly_sdk/models/update_incident_event_service.py b/rootly_sdk/models/update_incident_event_service.py index 8797d4a8..89e922a7 100644 --- a/rootly_sdk/models/update_incident_event_service.py +++ b/rootly_sdk/models/update_incident_event_service.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_event_service_data import UpdateIncidentEventServiceData @@ -28,7 +24,6 @@ class UpdateIncidentEventService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_event_service_data import UpdateIncidentEventServiceData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_event_service_data.py b/rootly_sdk/models/update_incident_event_service_data.py index fa830597..df92c39e 100644 --- a/rootly_sdk/models/update_incident_event_service_data.py +++ b/rootly_sdk/models/update_incident_event_service_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_event_service_data_type import check_update_incident_event_service_data_type -from ..models.update_incident_event_service_data_type import UpdateIncidentEventServiceDataType -from typing import cast +from ..models.update_incident_event_service_data_type import ( + UpdateIncidentEventServiceDataType, + check_update_incident_event_service_data_type, +) if TYPE_CHECKING: from ..models.update_incident_event_service_data_attributes import UpdateIncidentEventServiceDataAttributes @@ -32,7 +31,6 @@ class UpdateIncidentEventServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_event_service_data_attributes import UpdateIncidentEventServiceDataAttributes type_: str = self.type_ 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 db2e3830..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,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset from ..models.update_incident_event_service_data_attributes_status import ( + UpdateIncidentEventServiceDataAttributesStatus, check_update_incident_event_service_data_attributes_status, ) -from ..models.update_incident_event_service_data_attributes_status import UpdateIncidentEventServiceDataAttributesStatus -from typing import cast - T = TypeVar("T", bound="UpdateIncidentEventServiceDataAttributes") diff --git a/rootly_sdk/models/update_incident_feedback.py b/rootly_sdk/models/update_incident_feedback.py index 2505c689..ed194100 100644 --- a/rootly_sdk/models/update_incident_feedback.py +++ b/rootly_sdk/models/update_incident_feedback.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_feedback_data import UpdateIncidentFeedbackData @@ -28,7 +24,6 @@ class UpdateIncidentFeedback: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_feedback_data import UpdateIncidentFeedbackData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_feedback_data.py b/rootly_sdk/models/update_incident_feedback_data.py index 52e43e9e..540185bc 100644 --- a/rootly_sdk/models/update_incident_feedback_data.py +++ b/rootly_sdk/models/update_incident_feedback_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_feedback_data_type import check_update_incident_feedback_data_type -from ..models.update_incident_feedback_data_type import UpdateIncidentFeedbackDataType -from typing import cast +from ..models.update_incident_feedback_data_type import ( + UpdateIncidentFeedbackDataType, + check_update_incident_feedback_data_type, +) if TYPE_CHECKING: from ..models.update_incident_feedback_data_attributes import UpdateIncidentFeedbackDataAttributes @@ -32,7 +31,6 @@ class UpdateIncidentFeedbackData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_feedback_data_attributes import UpdateIncidentFeedbackDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_incident_feedback_data_attributes.py b/rootly_sdk/models/update_incident_feedback_data_attributes.py index 594c8ea5..4d9558c6 100644 --- a/rootly_sdk/models/update_incident_feedback_data_attributes.py +++ b/rootly_sdk/models/update_incident_feedback_data_attributes.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset from ..models.update_incident_feedback_data_attributes_rating import ( + UpdateIncidentFeedbackDataAttributesRating, check_update_incident_feedback_data_attributes_rating, ) -from ..models.update_incident_feedback_data_attributes_rating import UpdateIncidentFeedbackDataAttributesRating from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateIncidentFeedbackDataAttributes") diff --git a/rootly_sdk/models/update_incident_form_field_selection.py b/rootly_sdk/models/update_incident_form_field_selection.py index 8708f9eb..c6ad6546 100644 --- a/rootly_sdk/models/update_incident_form_field_selection.py +++ b/rootly_sdk/models/update_incident_form_field_selection.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_form_field_selection_data import UpdateIncidentFormFieldSelectionData @@ -28,7 +24,6 @@ class UpdateIncidentFormFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_form_field_selection_data import UpdateIncidentFormFieldSelectionData data = self.data.to_dict() 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 35e70a04..0c574ed7 100644 --- a/rootly_sdk/models/update_incident_form_field_selection_data.py +++ b/rootly_sdk/models/update_incident_form_field_selection_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_form_field_selection_data_type import check_update_incident_form_field_selection_data_type -from ..models.update_incident_form_field_selection_data_type import UpdateIncidentFormFieldSelectionDataType -from typing import cast +from ..models.update_incident_form_field_selection_data_type import ( + UpdateIncidentFormFieldSelectionDataType, + check_update_incident_form_field_selection_data_type, +) if TYPE_CHECKING: from ..models.update_incident_form_field_selection_data_attributes import ( @@ -34,9 +33,6 @@ class UpdateIncidentFormFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_form_field_selection_data_attributes import ( - UpdateIncidentFormFieldSelectionDataAttributes, - ) type_: str = self.type_ 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 1ed7da7d..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,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateIncidentFormFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/update_incident_permission_set.py b/rootly_sdk/models/update_incident_permission_set.py index 5e516d90..0e8ae576 100644 --- a/rootly_sdk/models/update_incident_permission_set.py +++ b/rootly_sdk/models/update_incident_permission_set.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_permission_set_data import UpdateIncidentPermissionSetData @@ -28,7 +24,6 @@ class UpdateIncidentPermissionSet: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_permission_set_data import UpdateIncidentPermissionSetData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_permission_set_boolean.py b/rootly_sdk/models/update_incident_permission_set_boolean.py index d3f9b396..8f25c582 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_permission_set_boolean_data import UpdateIncidentPermissionSetBooleanData @@ -28,7 +24,6 @@ class UpdateIncidentPermissionSetBoolean: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_permission_set_boolean_data import UpdateIncidentPermissionSetBooleanData data = self.data.to_dict() 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 d76fed79..ea07346a 100644 --- a/rootly_sdk/models/update_incident_permission_set_boolean_data.py +++ b/rootly_sdk/models/update_incident_permission_set_boolean_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_incident_permission_set_boolean_data_type import ( + UpdateIncidentPermissionSetBooleanDataType, check_update_incident_permission_set_boolean_data_type, ) -from ..models.update_incident_permission_set_boolean_data_type import UpdateIncidentPermissionSetBooleanDataType -from typing import cast if TYPE_CHECKING: from ..models.update_incident_permission_set_boolean_data_attributes import ( @@ -36,9 +33,6 @@ class UpdateIncidentPermissionSetBooleanData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_permission_set_boolean_data_attributes import ( - UpdateIncidentPermissionSetBooleanDataAttributes, - ) type_: str = self.type_ 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 f626ca0a..56e4c01d 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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_permission_set_boolean_data_attributes_kind import ( - check_update_incident_permission_set_boolean_data_attributes_kind, -) from ..models.update_incident_permission_set_boolean_data_attributes_kind import ( UpdateIncidentPermissionSetBooleanDataAttributesKind, + check_update_incident_permission_set_boolean_data_attributes_kind, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_incident_permission_set_boolean_data_attributes_severity_params import ( @@ -42,9 +36,6 @@ class UpdateIncidentPermissionSetBooleanDataAttributes: severity_params: UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_permission_set_boolean_data_attributes_severity_params import ( - UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams, - ) kind: str | Unset = UNSET if not isinstance(self.kind, Unset): 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 b77f7687..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateIncidentPermissionSetBooleanDataAttributesSeverityParams") diff --git a/rootly_sdk/models/update_incident_permission_set_data.py b/rootly_sdk/models/update_incident_permission_set_data.py index 8e2ff7a1..df6b990a 100644 --- a/rootly_sdk/models/update_incident_permission_set_data.py +++ b/rootly_sdk/models/update_incident_permission_set_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_permission_set_data_type import check_update_incident_permission_set_data_type -from ..models.update_incident_permission_set_data_type import UpdateIncidentPermissionSetDataType -from typing import cast +from ..models.update_incident_permission_set_data_type import ( + UpdateIncidentPermissionSetDataType, + check_update_incident_permission_set_data_type, +) if TYPE_CHECKING: from ..models.update_incident_permission_set_data_attributes import UpdateIncidentPermissionSetDataAttributes @@ -32,7 +31,6 @@ class UpdateIncidentPermissionSetData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_permission_set_data_attributes import UpdateIncidentPermissionSetDataAttributes type_: str = self.type_ 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 7efe2fe2..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,28 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_permission_set_data_attributes_private_incident_permissions_item import ( - check_update_incident_permission_set_data_attributes_private_incident_permissions_item, -) from ..models.update_incident_permission_set_data_attributes_private_incident_permissions_item import ( UpdateIncidentPermissionSetDataAttributesPrivateIncidentPermissionsItem, -) -from ..models.update_incident_permission_set_data_attributes_public_incident_permissions_item import ( - check_update_incident_permission_set_data_attributes_public_incident_permissions_item, + check_update_incident_permission_set_data_attributes_private_incident_permissions_item, ) from ..models.update_incident_permission_set_data_attributes_public_incident_permissions_item import ( UpdateIncidentPermissionSetDataAttributesPublicIncidentPermissionsItem, + check_update_incident_permission_set_data_attributes_public_incident_permissions_item, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateIncidentPermissionSetDataAttributes") diff --git a/rootly_sdk/models/update_incident_permission_set_resource.py b/rootly_sdk/models/update_incident_permission_set_resource.py index 964d5745..954a62ce 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource.py +++ b/rootly_sdk/models/update_incident_permission_set_resource.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_permission_set_resource_data import UpdateIncidentPermissionSetResourceData @@ -28,7 +24,6 @@ class UpdateIncidentPermissionSetResource: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_permission_set_resource_data import UpdateIncidentPermissionSetResourceData data = self.data.to_dict() 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 78d0aa6b..083c9a1b 100644 --- a/rootly_sdk/models/update_incident_permission_set_resource_data.py +++ b/rootly_sdk/models/update_incident_permission_set_resource_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_incident_permission_set_resource_data_type import ( + UpdateIncidentPermissionSetResourceDataType, check_update_incident_permission_set_resource_data_type, ) -from ..models.update_incident_permission_set_resource_data_type import UpdateIncidentPermissionSetResourceDataType -from typing import cast if TYPE_CHECKING: from ..models.update_incident_permission_set_resource_data_attributes import ( @@ -36,9 +33,6 @@ class UpdateIncidentPermissionSetResourceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_permission_set_resource_data_attributes import ( - UpdateIncidentPermissionSetResourceDataAttributes, - ) type_: str = self.type_ 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 7b9021a3..4a4b6196 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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_permission_set_resource_data_attributes_kind import ( - check_update_incident_permission_set_resource_data_attributes_kind, -) from ..models.update_incident_permission_set_resource_data_attributes_kind import ( UpdateIncidentPermissionSetResourceDataAttributesKind, + check_update_incident_permission_set_resource_data_attributes_kind, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_incident_permission_set_resource_data_attributes_severity_params import ( @@ -44,9 +38,6 @@ class UpdateIncidentPermissionSetResourceDataAttributes: severity_params: UpdateIncidentPermissionSetResourceDataAttributesSeverityParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_permission_set_resource_data_attributes_severity_params import ( - UpdateIncidentPermissionSetResourceDataAttributesSeverityParams, - ) kind: str | Unset = UNSET if not isinstance(self.kind, Unset): 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 37b9b550..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,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateIncidentPermissionSetResourceDataAttributesSeverityParams") diff --git a/rootly_sdk/models/update_incident_post_mortem.py b/rootly_sdk/models/update_incident_post_mortem.py index 81fff518..e5b9b00c 100644 --- a/rootly_sdk/models/update_incident_post_mortem.py +++ b/rootly_sdk/models/update_incident_post_mortem.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_post_mortem_data import UpdateIncidentPostMortemData @@ -28,7 +24,6 @@ class UpdateIncidentPostMortem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_post_mortem_data import UpdateIncidentPostMortemData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_post_mortem_data.py b/rootly_sdk/models/update_incident_post_mortem_data.py index 88c9abdb..c37ff215 100644 --- a/rootly_sdk/models/update_incident_post_mortem_data.py +++ b/rootly_sdk/models/update_incident_post_mortem_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_post_mortem_data_type import check_update_incident_post_mortem_data_type -from ..models.update_incident_post_mortem_data_type import UpdateIncidentPostMortemDataType -from typing import cast +from ..models.update_incident_post_mortem_data_type import ( + UpdateIncidentPostMortemDataType, + check_update_incident_post_mortem_data_type, +) if TYPE_CHECKING: from ..models.update_incident_post_mortem_data_attributes import UpdateIncidentPostMortemDataAttributes @@ -32,7 +31,6 @@ class UpdateIncidentPostMortemData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_post_mortem_data_attributes import UpdateIncidentPostMortemDataAttributes type_: str = self.type_ 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 d1a7429d..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,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_incident_post_mortem_data_attributes_status import ( + UpdateIncidentPostMortemDataAttributesStatus, check_update_incident_post_mortem_data_attributes_status, ) -from ..models.update_incident_post_mortem_data_attributes_status import UpdateIncidentPostMortemDataAttributesStatus from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateIncidentPostMortemDataAttributes") diff --git a/rootly_sdk/models/update_incident_postmortem_task_params.py b/rootly_sdk/models/update_incident_postmortem_task_params.py index 0d787d0a..5a56484c 100644 --- a/rootly_sdk/models/update_incident_postmortem_task_params.py +++ b/rootly_sdk/models/update_incident_postmortem_task_params.py @@ -1,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_incident_postmortem_task_params_task_type import ( + UpdateIncidentPostmortemTaskParamsTaskType, check_update_incident_postmortem_task_params_task_type, ) -from ..models.update_incident_postmortem_task_params_task_type import UpdateIncidentPostmortemTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateIncidentPostmortemTaskParams") diff --git a/rootly_sdk/models/update_incident_retrospective_step.py b/rootly_sdk/models/update_incident_retrospective_step.py index f9e0ca59..568fd4f2 100644 --- a/rootly_sdk/models/update_incident_retrospective_step.py +++ b/rootly_sdk/models/update_incident_retrospective_step.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_retrospective_step_data import UpdateIncidentRetrospectiveStepData @@ -28,7 +24,6 @@ class UpdateIncidentRetrospectiveStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_retrospective_step_data import UpdateIncidentRetrospectiveStepData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_retrospective_step_data.py b/rootly_sdk/models/update_incident_retrospective_step_data.py index f5913c59..8a5b5a0e 100644 --- a/rootly_sdk/models/update_incident_retrospective_step_data.py +++ b/rootly_sdk/models/update_incident_retrospective_step_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_retrospective_step_data_type import check_update_incident_retrospective_step_data_type -from ..models.update_incident_retrospective_step_data_type import UpdateIncidentRetrospectiveStepDataType -from typing import cast +from ..models.update_incident_retrospective_step_data_type import ( + UpdateIncidentRetrospectiveStepDataType, + check_update_incident_retrospective_step_data_type, +) if TYPE_CHECKING: from ..models.update_incident_retrospective_step_data_attributes import ( @@ -34,9 +33,6 @@ class UpdateIncidentRetrospectiveStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_retrospective_step_data_attributes import ( - UpdateIncidentRetrospectiveStepDataAttributes, - ) type_: str = self.type_ 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 f8da9c7c..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,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.update_incident_retrospective_step_data_attributes_status import ( - check_update_incident_retrospective_step_data_attributes_status, -) from ..models.update_incident_retrospective_step_data_attributes_status import ( UpdateIncidentRetrospectiveStepDataAttributesStatus, + check_update_incident_retrospective_step_data_attributes_status, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateIncidentRetrospectiveStepDataAttributes") diff --git a/rootly_sdk/models/update_incident_role.py b/rootly_sdk/models/update_incident_role.py index 6e94fc70..aa1178fc 100644 --- a/rootly_sdk/models/update_incident_role.py +++ b/rootly_sdk/models/update_incident_role.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_role_data import UpdateIncidentRoleData @@ -28,7 +24,6 @@ class UpdateIncidentRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_role_data import UpdateIncidentRoleData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_role_data.py b/rootly_sdk/models/update_incident_role_data.py index 586a64b8..f5dc593f 100644 --- a/rootly_sdk/models/update_incident_role_data.py +++ b/rootly_sdk/models/update_incident_role_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_role_data_type import check_update_incident_role_data_type -from ..models.update_incident_role_data_type import UpdateIncidentRoleDataType -from typing import cast +from ..models.update_incident_role_data_type import UpdateIncidentRoleDataType, check_update_incident_role_data_type if TYPE_CHECKING: from ..models.update_incident_role_data_attributes import UpdateIncidentRoleDataAttributes @@ -32,7 +28,6 @@ class UpdateIncidentRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_role_data_attributes import UpdateIncidentRoleDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_incident_role_data_attributes.py b/rootly_sdk/models/update_incident_role_data_attributes.py index e9e09b8a..fdac0c55 100644 --- a/rootly_sdk/models/update_incident_role_data_attributes.py +++ b/rootly_sdk/models/update_incident_role_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateIncidentRoleDataAttributes") diff --git a/rootly_sdk/models/update_incident_role_task.py b/rootly_sdk/models/update_incident_role_task.py index 8726d317..75837e60 100644 --- a/rootly_sdk/models/update_incident_role_task.py +++ b/rootly_sdk/models/update_incident_role_task.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_role_task_data import UpdateIncidentRoleTaskData @@ -28,7 +24,6 @@ class UpdateIncidentRoleTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_role_task_data import UpdateIncidentRoleTaskData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_role_task_data.py b/rootly_sdk/models/update_incident_role_task_data.py index be66c068..8d6727b8 100644 --- a/rootly_sdk/models/update_incident_role_task_data.py +++ b/rootly_sdk/models/update_incident_role_task_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_role_task_data_type import check_update_incident_role_task_data_type -from ..models.update_incident_role_task_data_type import UpdateIncidentRoleTaskDataType -from typing import cast +from ..models.update_incident_role_task_data_type import ( + UpdateIncidentRoleTaskDataType, + check_update_incident_role_task_data_type, +) if TYPE_CHECKING: from ..models.update_incident_role_task_data_attributes import UpdateIncidentRoleTaskDataAttributes @@ -32,7 +31,6 @@ class UpdateIncidentRoleTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_role_task_data_attributes import UpdateIncidentRoleTaskDataAttributes type_: str = self.type_ 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 4d355785..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,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_incident_role_task_data_attributes_priority import ( + UpdateIncidentRoleTaskDataAttributesPriority, check_update_incident_role_task_data_attributes_priority, ) -from ..models.update_incident_role_task_data_attributes_priority import UpdateIncidentRoleTaskDataAttributesPriority from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateIncidentRoleTaskDataAttributes") diff --git a/rootly_sdk/models/update_incident_status_page_event.py b/rootly_sdk/models/update_incident_status_page_event.py index edfc77f2..e46300cd 100644 --- a/rootly_sdk/models/update_incident_status_page_event.py +++ b/rootly_sdk/models/update_incident_status_page_event.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_status_page_event_data import UpdateIncidentStatusPageEventData @@ -28,7 +24,6 @@ class UpdateIncidentStatusPageEvent: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_status_page_event_data import UpdateIncidentStatusPageEventData data = self.data.to_dict() 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 086df915..20277191 100644 --- a/rootly_sdk/models/update_incident_status_page_event_data.py +++ b/rootly_sdk/models/update_incident_status_page_event_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_status_page_event_data_type import check_update_incident_status_page_event_data_type -from ..models.update_incident_status_page_event_data_type import UpdateIncidentStatusPageEventDataType -from typing import cast +from ..models.update_incident_status_page_event_data_type import ( + UpdateIncidentStatusPageEventDataType, + check_update_incident_status_page_event_data_type, +) if TYPE_CHECKING: from ..models.update_incident_status_page_event_data_attributes import UpdateIncidentStatusPageEventDataAttributes @@ -32,9 +31,6 @@ class UpdateIncidentStatusPageEventData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_status_page_event_data_attributes import ( - UpdateIncidentStatusPageEventDataAttributes, - ) type_: str = self.type_ 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 5af13f9d..428524d0 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,24 +1,17 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 +from dateutil.parser import isoparse -from ..models.update_incident_status_page_event_data_attributes_status import ( - check_update_incident_status_page_event_data_attributes_status, -) from ..models.update_incident_status_page_event_data_attributes_status import ( UpdateIncidentStatusPageEventDataAttributesStatus, + check_update_incident_status_page_event_data_attributes_status, ) from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime - T = TypeVar("T", bound="UpdateIncidentStatusPageEventDataAttributes") 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 97056637..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_incident_status_timestamp_task_params_task_type import ( - check_update_incident_status_timestamp_task_params_task_type, -) from ..models.update_incident_status_timestamp_task_params_task_type import ( UpdateIncidentStatusTimestampTaskParamsTaskType, + check_update_incident_status_timestamp_task_params_task_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateIncidentStatusTimestampTaskParams") diff --git a/rootly_sdk/models/update_incident_sub_status.py b/rootly_sdk/models/update_incident_sub_status.py index b84d08a4..edbfd091 100644 --- a/rootly_sdk/models/update_incident_sub_status.py +++ b/rootly_sdk/models/update_incident_sub_status.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_sub_status_data import UpdateIncidentSubStatusData @@ -28,7 +24,6 @@ class UpdateIncidentSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_sub_status_data import UpdateIncidentSubStatusData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_sub_status_data.py b/rootly_sdk/models/update_incident_sub_status_data.py index 8332b0f9..cf6a906f 100644 --- a/rootly_sdk/models/update_incident_sub_status_data.py +++ b/rootly_sdk/models/update_incident_sub_status_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_sub_status_data_type import check_update_incident_sub_status_data_type -from ..models.update_incident_sub_status_data_type import UpdateIncidentSubStatusDataType -from typing import cast +from ..models.update_incident_sub_status_data_type import ( + UpdateIncidentSubStatusDataType, + check_update_incident_sub_status_data_type, +) if TYPE_CHECKING: from ..models.update_incident_sub_status_data_attributes import UpdateIncidentSubStatusDataAttributes @@ -32,7 +31,6 @@ class UpdateIncidentSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_sub_status_data_attributes import UpdateIncidentSubStatusDataAttributes type_: str = self.type_ 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 d7dbe507..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,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateIncidentSubStatusDataAttributes") diff --git a/rootly_sdk/models/update_incident_task_params.py b/rootly_sdk/models/update_incident_task_params.py index 01574232..e2d5cdc3 100644 --- a/rootly_sdk/models/update_incident_task_params.py +++ b/rootly_sdk/models/update_incident_task_params.py @@ -1,22 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_incident_task_params_attribute_to_query_by import ( + UpdateIncidentTaskParamsAttributeToQueryBy, check_update_incident_task_params_attribute_to_query_by, ) -from ..models.update_incident_task_params_attribute_to_query_by import UpdateIncidentTaskParamsAttributeToQueryBy -from ..models.update_incident_task_params_task_type import check_update_incident_task_params_task_type -from ..models.update_incident_task_params_task_type import UpdateIncidentTaskParamsTaskType +from ..models.update_incident_task_params_task_type import ( + UpdateIncidentTaskParamsTaskType, + check_update_incident_task_params_task_type, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateIncidentTaskParams") diff --git a/rootly_sdk/models/update_incident_type.py b/rootly_sdk/models/update_incident_type.py index 0d191adc..8438b01e 100644 --- a/rootly_sdk/models/update_incident_type.py +++ b/rootly_sdk/models/update_incident_type.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_type_data import UpdateIncidentTypeData @@ -28,7 +24,6 @@ class UpdateIncidentType: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_type_data import UpdateIncidentTypeData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_incident_type_data.py b/rootly_sdk/models/update_incident_type_data.py index 0449a838..5cde01d3 100644 --- a/rootly_sdk/models/update_incident_type_data.py +++ b/rootly_sdk/models/update_incident_type_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_incident_type_data_type import check_update_incident_type_data_type -from ..models.update_incident_type_data_type import UpdateIncidentTypeDataType -from typing import cast +from ..models.update_incident_type_data_type import UpdateIncidentTypeDataType, check_update_incident_type_data_type if TYPE_CHECKING: from ..models.update_incident_type_data_attributes import UpdateIncidentTypeDataAttributes @@ -32,7 +28,6 @@ class UpdateIncidentTypeData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_type_data_attributes import UpdateIncidentTypeDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_incident_type_data_attributes.py b/rootly_sdk/models/update_incident_type_data_attributes.py index 125e720b..20fabf5e 100644 --- a/rootly_sdk/models/update_incident_type_data_attributes.py +++ b/rootly_sdk/models/update_incident_type_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_incident_type_data_attributes_properties_item import ( UpdateIncidentTypeDataAttributesPropertiesItem, @@ -53,15 +49,6 @@ class UpdateIncidentTypeDataAttributes: properties: list[UpdateIncidentTypeDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_incident_type_data_attributes_properties_item import ( - UpdateIncidentTypeDataAttributesPropertiesItem, - ) - from ..models.update_incident_type_data_attributes_slack_channels_type_0_item import ( - UpdateIncidentTypeDataAttributesSlackChannelsType0Item, - ) - from ..models.update_incident_type_data_attributes_slack_aliases_type_0_item import ( - UpdateIncidentTypeDataAttributesSlackAliasesType0Item, - ) name = self.name 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 index 04c7de27..b4e47094 100644 --- a/rootly_sdk/models/update_incident_type_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_incident_type_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateIncidentTypeDataAttributesPropertiesItem") 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 c399bd68..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateIncidentTypeDataAttributesSlackAliasesType0Item") 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 deb0d3f6..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateIncidentTypeDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_jira_issue_task_params.py b/rootly_sdk/models/update_jira_issue_task_params.py index c71d7efe..e4ae6cf7 100644 --- a/rootly_sdk/models/update_jira_issue_task_params.py +++ b/rootly_sdk/models/update_jira_issue_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_jira_issue_task_params_task_type import ( + UpdateJiraIssueTaskParamsTaskType, + check_update_jira_issue_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_jira_issue_task_params_task_type import check_update_jira_issue_task_params_task_type -from ..models.update_jira_issue_task_params_task_type import UpdateJiraIssueTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_jira_issue_task_params_integration import UpdateJiraIssueTaskParamsIntegration from ..models.update_jira_issue_task_params_priority import UpdateJiraIssueTaskParamsPriority @@ -61,9 +60,6 @@ class UpdateJiraIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_jira_issue_task_params_priority import UpdateJiraIssueTaskParamsPriority - from ..models.update_jira_issue_task_params_integration import UpdateJiraIssueTaskParamsIntegration - from ..models.update_jira_issue_task_params_status import UpdateJiraIssueTaskParamsStatus issue_id = self.issue_id diff --git a/rootly_sdk/models/update_jira_issue_task_params_integration.py b/rootly_sdk/models/update_jira_issue_task_params_integration.py index dcaf9553..1e6f0b85 100644 --- a/rootly_sdk/models/update_jira_issue_task_params_integration.py +++ b/rootly_sdk/models/update_jira_issue_task_params_integration.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateJiraIssueTaskParamsIntegration") 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 95fef12b..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateJiraIssueTaskParamsPriority") 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 83aabcf1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateJiraIssueTaskParamsStatus") diff --git a/rootly_sdk/models/update_linear_issue_task_params.py b/rootly_sdk/models/update_linear_issue_task_params.py index 0e1c592b..555aca6c 100644 --- a/rootly_sdk/models/update_linear_issue_task_params.py +++ b/rootly_sdk/models/update_linear_issue_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_linear_issue_task_params_task_type import ( + UpdateLinearIssueTaskParamsTaskType, + check_update_linear_issue_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_linear_issue_task_params_task_type import check_update_linear_issue_task_params_task_type -from ..models.update_linear_issue_task_params_task_type import UpdateLinearIssueTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_linear_issue_task_params_labels_item import UpdateLinearIssueTaskParamsLabelsItem from ..models.update_linear_issue_task_params_priority import UpdateLinearIssueTaskParamsPriority @@ -53,9 +52,6 @@ class UpdateLinearIssueTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_linear_issue_task_params_project import UpdateLinearIssueTaskParamsProject - from ..models.update_linear_issue_task_params_labels_item import UpdateLinearIssueTaskParamsLabelsItem - from ..models.update_linear_issue_task_params_priority import UpdateLinearIssueTaskParamsPriority from ..models.update_linear_issue_task_params_state_type_0 import UpdateLinearIssueTaskParamsStateType0 issue_id = self.issue_id 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 bb0a462f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateLinearIssueTaskParamsLabelsItem") 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 33af3c6f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateLinearIssueTaskParamsPriority") 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 a01d8663..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateLinearIssueTaskParamsProject") 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 a8fab4e0..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateLinearIssueTaskParamsStateType0") diff --git a/rootly_sdk/models/update_live_call_router.py b/rootly_sdk/models/update_live_call_router.py index 27e80e32..d9316b3a 100644 --- a/rootly_sdk/models/update_live_call_router.py +++ b/rootly_sdk/models/update_live_call_router.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_live_call_router_data import UpdateLiveCallRouterData @@ -28,7 +24,6 @@ class UpdateLiveCallRouter: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_live_call_router_data import UpdateLiveCallRouterData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_live_call_router_data.py b/rootly_sdk/models/update_live_call_router_data.py index 13ff6714..648e051f 100644 --- a/rootly_sdk/models/update_live_call_router_data.py +++ b/rootly_sdk/models/update_live_call_router_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_live_call_router_data_type import check_update_live_call_router_data_type -from ..models.update_live_call_router_data_type import UpdateLiveCallRouterDataType -from typing import cast +from ..models.update_live_call_router_data_type import ( + UpdateLiveCallRouterDataType, + check_update_live_call_router_data_type, +) if TYPE_CHECKING: from ..models.update_live_call_router_data_attributes import UpdateLiveCallRouterDataAttributes @@ -32,7 +31,6 @@ class UpdateLiveCallRouterData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_live_call_router_data_attributes import UpdateLiveCallRouterDataAttributes type_: str = self.type_ 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 a93a5a63..c84e7ad7 100644 --- a/rootly_sdk/models/update_live_call_router_data_attributes.py +++ b/rootly_sdk/models/update_live_call_router_data_attributes.py @@ -1,31 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_live_call_router_data_attributes_country_code import ( + UpdateLiveCallRouterDataAttributesCountryCode, check_update_live_call_router_data_attributes_country_code, ) -from ..models.update_live_call_router_data_attributes_country_code import UpdateLiveCallRouterDataAttributesCountryCode -from ..models.update_live_call_router_data_attributes_kind import check_update_live_call_router_data_attributes_kind -from ..models.update_live_call_router_data_attributes_kind import UpdateLiveCallRouterDataAttributesKind +from ..models.update_live_call_router_data_attributes_kind import ( + UpdateLiveCallRouterDataAttributesKind, + check_update_live_call_router_data_attributes_kind, +) from ..models.update_live_call_router_data_attributes_phone_type import ( + UpdateLiveCallRouterDataAttributesPhoneType, check_update_live_call_router_data_attributes_phone_type, ) -from ..models.update_live_call_router_data_attributes_phone_type import UpdateLiveCallRouterDataAttributesPhoneType -from ..models.update_live_call_router_data_attributes_waiting_music_url import ( - check_update_live_call_router_data_attributes_waiting_music_url, -) from ..models.update_live_call_router_data_attributes_waiting_music_url import ( UpdateLiveCallRouterDataAttributesWaitingMusicUrl, + check_update_live_call_router_data_attributes_waiting_music_url, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_live_call_router_data_attributes_escalation_policy_trigger_params import ( @@ -97,12 +93,6 @@ class UpdateLiveCallRouterDataAttributes: escalation_policy_trigger_params: UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_live_call_router_data_attributes_escalation_policy_trigger_params import ( - UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams, - ) - from ..models.update_live_call_router_data_attributes_paging_targets_item import ( - UpdateLiveCallRouterDataAttributesPagingTargetsItem, - ) kind: str | Unset = UNSET if not isinstance(self.kind, Unset): 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 1abf0d5a..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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_live_call_router_data_attributes_escalation_policy_trigger_params_type import ( - check_update_live_call_router_data_attributes_escalation_policy_trigger_params_type, -) from ..models.update_live_call_router_data_attributes_escalation_policy_trigger_params_type import ( UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParamsType, + check_update_live_call_router_data_attributes_escalation_policy_trigger_params_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateLiveCallRouterDataAttributesEscalationPolicyTriggerParams") 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 bec0e409..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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_live_call_router_data_attributes_paging_targets_item_type import ( - check_update_live_call_router_data_attributes_paging_targets_item_type, -) from ..models.update_live_call_router_data_attributes_paging_targets_item_type import ( UpdateLiveCallRouterDataAttributesPagingTargetsItemType, + check_update_live_call_router_data_attributes_paging_targets_item_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateLiveCallRouterDataAttributesPagingTargetsItem") diff --git a/rootly_sdk/models/update_motion_task_task_params.py b/rootly_sdk/models/update_motion_task_task_params.py index 3aa5d60d..4ea29079 100644 --- a/rootly_sdk/models/update_motion_task_task_params.py +++ b/rootly_sdk/models/update_motion_task_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_motion_task_task_params_task_type import ( + UpdateMotionTaskTaskParamsTaskType, + check_update_motion_task_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_motion_task_task_params_task_type import check_update_motion_task_task_params_task_type -from ..models.update_motion_task_task_params_task_type import UpdateMotionTaskTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_motion_task_task_params_priority import UpdateMotionTaskTaskParamsPriority @@ -45,7 +44,6 @@ class UpdateMotionTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_motion_task_task_params_priority import UpdateMotionTaskTaskParamsPriority task_id = self.task_id 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 875cd54e..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateMotionTaskTaskParamsPriority") diff --git a/rootly_sdk/models/update_notion_page_task_params.py b/rootly_sdk/models/update_notion_page_task_params.py index bb3972ce..89bd9a23 100644 --- a/rootly_sdk/models/update_notion_page_task_params.py +++ b/rootly_sdk/models/update_notion_page_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_notion_page_task_params_task_type import ( + UpdateNotionPageTaskParamsTaskType, + check_update_notion_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_notion_page_task_params_task_type import check_update_notion_page_task_params_task_type -from ..models.update_notion_page_task_params_task_type import UpdateNotionPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateNotionPageTaskParams") diff --git a/rootly_sdk/models/update_on_call_pay_report.py b/rootly_sdk/models/update_on_call_pay_report.py index 07b9c41f..932f9471 100644 --- a/rootly_sdk/models/update_on_call_pay_report.py +++ b/rootly_sdk/models/update_on_call_pay_report.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_on_call_pay_report_data import UpdateOnCallPayReportData @@ -28,7 +24,6 @@ class UpdateOnCallPayReport: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_on_call_pay_report_data import UpdateOnCallPayReportData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_on_call_pay_report_data.py b/rootly_sdk/models/update_on_call_pay_report_data.py index 596abd2c..c25845dc 100644 --- a/rootly_sdk/models/update_on_call_pay_report_data.py +++ b/rootly_sdk/models/update_on_call_pay_report_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_on_call_pay_report_data_type import check_update_on_call_pay_report_data_type -from ..models.update_on_call_pay_report_data_type import UpdateOnCallPayReportDataType -from typing import cast +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 @@ -32,7 +31,6 @@ class UpdateOnCallPayReportData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_on_call_pay_report_data_attributes import UpdateOnCallPayReportDataAttributes type_: str = self.type_ 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 index 49371185..513508f2 100644 --- a/rootly_sdk/models/update_on_call_pay_report_data_attributes.py +++ b/rootly_sdk/models/update_on_call_pay_report_data_attributes.py @@ -1,18 +1,13 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +from ..types import UNSET, Unset T = TypeVar("T", bound="UpdateOnCallPayReportDataAttributes") diff --git a/rootly_sdk/models/update_on_call_role.py b/rootly_sdk/models/update_on_call_role.py index b15052dd..273c5735 100644 --- a/rootly_sdk/models/update_on_call_role.py +++ b/rootly_sdk/models/update_on_call_role.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_on_call_role_data import UpdateOnCallRoleData @@ -28,7 +24,6 @@ class UpdateOnCallRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_on_call_role_data import UpdateOnCallRoleData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_on_call_role_data.py b/rootly_sdk/models/update_on_call_role_data.py index d0ec4ae9..af8dd19a 100644 --- a/rootly_sdk/models/update_on_call_role_data.py +++ b/rootly_sdk/models/update_on_call_role_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_on_call_role_data_type import check_update_on_call_role_data_type -from ..models.update_on_call_role_data_type import UpdateOnCallRoleDataType -from typing import cast +from ..models.update_on_call_role_data_type import UpdateOnCallRoleDataType, check_update_on_call_role_data_type if TYPE_CHECKING: from ..models.update_on_call_role_data_attributes import UpdateOnCallRoleDataAttributes @@ -32,7 +28,6 @@ class UpdateOnCallRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_on_call_role_data_attributes import UpdateOnCallRoleDataAttributes type_: str = self.type_ 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 f64d03ca..bbeb6c0d 100644 --- a/rootly_sdk/models/update_on_call_role_data_attributes.py +++ b/rootly_sdk/models/update_on_call_role_data_attributes.py @@ -1,160 +1,107 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset -from ..models.update_on_call_role_data_attributes_alert_fields_permissions_item import ( - check_update_on_call_role_data_attributes_alert_fields_permissions_item, -) from ..models.update_on_call_role_data_attributes_alert_fields_permissions_item import ( UpdateOnCallRoleDataAttributesAlertFieldsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_alert_groups_permissions_item import ( - check_update_on_call_role_data_attributes_alert_groups_permissions_item, + check_update_on_call_role_data_attributes_alert_fields_permissions_item, ) from ..models.update_on_call_role_data_attributes_alert_groups_permissions_item import ( UpdateOnCallRoleDataAttributesAlertGroupsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_alert_routing_rules_permissions_item import ( - check_update_on_call_role_data_attributes_alert_routing_rules_permissions_item, + check_update_on_call_role_data_attributes_alert_groups_permissions_item, ) from ..models.update_on_call_role_data_attributes_alert_routing_rules_permissions_item import ( UpdateOnCallRoleDataAttributesAlertRoutingRulesPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_alert_sources_permissions_item import ( - check_update_on_call_role_data_attributes_alert_sources_permissions_item, + check_update_on_call_role_data_attributes_alert_routing_rules_permissions_item, ) from ..models.update_on_call_role_data_attributes_alert_sources_permissions_item import ( UpdateOnCallRoleDataAttributesAlertSourcesPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_alert_urgency_permissions_item import ( - check_update_on_call_role_data_attributes_alert_urgency_permissions_item, + check_update_on_call_role_data_attributes_alert_sources_permissions_item, ) from ..models.update_on_call_role_data_attributes_alert_urgency_permissions_item import ( UpdateOnCallRoleDataAttributesAlertUrgencyPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_alerts_permissions_item import ( - check_update_on_call_role_data_attributes_alerts_permissions_item, + check_update_on_call_role_data_attributes_alert_urgency_permissions_item, ) from ..models.update_on_call_role_data_attributes_alerts_permissions_item import ( UpdateOnCallRoleDataAttributesAlertsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_api_keys_permissions_item import ( - check_update_on_call_role_data_attributes_api_keys_permissions_item, + check_update_on_call_role_data_attributes_alerts_permissions_item, ) from ..models.update_on_call_role_data_attributes_api_keys_permissions_item import ( UpdateOnCallRoleDataAttributesApiKeysPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_audits_permissions_item import ( - check_update_on_call_role_data_attributes_audits_permissions_item, + check_update_on_call_role_data_attributes_api_keys_permissions_item, ) from ..models.update_on_call_role_data_attributes_audits_permissions_item import ( UpdateOnCallRoleDataAttributesAuditsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_catalogs_permissions_item import ( - check_update_on_call_role_data_attributes_catalogs_permissions_item, + check_update_on_call_role_data_attributes_audits_permissions_item, ) from ..models.update_on_call_role_data_attributes_catalogs_permissions_item import ( UpdateOnCallRoleDataAttributesCatalogsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_contacts_permissions_item import ( - check_update_on_call_role_data_attributes_contacts_permissions_item, + check_update_on_call_role_data_attributes_catalogs_permissions_item, ) from ..models.update_on_call_role_data_attributes_contacts_permissions_item import ( UpdateOnCallRoleDataAttributesContactsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_escalation_policies_permissions_item import ( - check_update_on_call_role_data_attributes_escalation_policies_permissions_item, + check_update_on_call_role_data_attributes_contacts_permissions_item, ) from ..models.update_on_call_role_data_attributes_escalation_policies_permissions_item import ( UpdateOnCallRoleDataAttributesEscalationPoliciesPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_functionalities_permissions_item import ( - check_update_on_call_role_data_attributes_functionalities_permissions_item, + check_update_on_call_role_data_attributes_escalation_policies_permissions_item, ) from ..models.update_on_call_role_data_attributes_functionalities_permissions_item import ( UpdateOnCallRoleDataAttributesFunctionalitiesPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_groups_permissions_item import ( - check_update_on_call_role_data_attributes_groups_permissions_item, + check_update_on_call_role_data_attributes_functionalities_permissions_item, ) from ..models.update_on_call_role_data_attributes_groups_permissions_item import ( UpdateOnCallRoleDataAttributesGroupsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_heartbeats_permissions_item import ( - check_update_on_call_role_data_attributes_heartbeats_permissions_item, + check_update_on_call_role_data_attributes_groups_permissions_item, ) from ..models.update_on_call_role_data_attributes_heartbeats_permissions_item import ( UpdateOnCallRoleDataAttributesHeartbeatsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_integrations_permissions_item import ( - check_update_on_call_role_data_attributes_integrations_permissions_item, + check_update_on_call_role_data_attributes_heartbeats_permissions_item, ) from ..models.update_on_call_role_data_attributes_integrations_permissions_item import ( UpdateOnCallRoleDataAttributesIntegrationsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_invitations_permissions_item import ( - check_update_on_call_role_data_attributes_invitations_permissions_item, + check_update_on_call_role_data_attributes_integrations_permissions_item, ) from ..models.update_on_call_role_data_attributes_invitations_permissions_item import ( UpdateOnCallRoleDataAttributesInvitationsPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_live_call_routing_permissions_item import ( - check_update_on_call_role_data_attributes_live_call_routing_permissions_item, + check_update_on_call_role_data_attributes_invitations_permissions_item, ) from ..models.update_on_call_role_data_attributes_live_call_routing_permissions_item import ( UpdateOnCallRoleDataAttributesLiveCallRoutingPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_on_call_readiness_report_permissions_item import ( - check_update_on_call_role_data_attributes_on_call_readiness_report_permissions_item, + check_update_on_call_role_data_attributes_live_call_routing_permissions_item, ) from ..models.update_on_call_role_data_attributes_on_call_readiness_report_permissions_item import ( UpdateOnCallRoleDataAttributesOnCallReadinessReportPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_on_call_roles_permissions_item import ( - check_update_on_call_role_data_attributes_on_call_roles_permissions_item, + check_update_on_call_role_data_attributes_on_call_readiness_report_permissions_item, ) from ..models.update_on_call_role_data_attributes_on_call_roles_permissions_item import ( UpdateOnCallRoleDataAttributesOnCallRolesPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_schedule_override_permissions_item import ( - check_update_on_call_role_data_attributes_schedule_override_permissions_item, + check_update_on_call_role_data_attributes_on_call_roles_permissions_item, ) from ..models.update_on_call_role_data_attributes_schedule_override_permissions_item import ( UpdateOnCallRoleDataAttributesScheduleOverridePermissionsItem, -) -from ..models.update_on_call_role_data_attributes_schedules_permissions_item import ( - check_update_on_call_role_data_attributes_schedules_permissions_item, + check_update_on_call_role_data_attributes_schedule_override_permissions_item, ) from ..models.update_on_call_role_data_attributes_schedules_permissions_item import ( UpdateOnCallRoleDataAttributesSchedulesPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_services_permissions_item import ( - check_update_on_call_role_data_attributes_services_permissions_item, + check_update_on_call_role_data_attributes_schedules_permissions_item, ) from ..models.update_on_call_role_data_attributes_services_permissions_item import ( UpdateOnCallRoleDataAttributesServicesPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_webhooks_permissions_item import ( - check_update_on_call_role_data_attributes_webhooks_permissions_item, + check_update_on_call_role_data_attributes_services_permissions_item, ) from ..models.update_on_call_role_data_attributes_webhooks_permissions_item import ( UpdateOnCallRoleDataAttributesWebhooksPermissionsItem, -) -from ..models.update_on_call_role_data_attributes_workflows_permissions_item import ( - check_update_on_call_role_data_attributes_workflows_permissions_item, + check_update_on_call_role_data_attributes_webhooks_permissions_item, ) from ..models.update_on_call_role_data_attributes_workflows_permissions_item import ( UpdateOnCallRoleDataAttributesWorkflowsPermissionsItem, + check_update_on_call_role_data_attributes_workflows_permissions_item, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateOnCallRoleDataAttributes") diff --git a/rootly_sdk/models/update_on_call_shadow.py b/rootly_sdk/models/update_on_call_shadow.py index 5b49b2c9..1c41656b 100644 --- a/rootly_sdk/models/update_on_call_shadow.py +++ b/rootly_sdk/models/update_on_call_shadow.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_on_call_shadow_data import UpdateOnCallShadowData @@ -28,7 +24,6 @@ class UpdateOnCallShadow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_on_call_shadow_data import UpdateOnCallShadowData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_on_call_shadow_data.py b/rootly_sdk/models/update_on_call_shadow_data.py index 78d2a837..b7feab90 100644 --- a/rootly_sdk/models/update_on_call_shadow_data.py +++ b/rootly_sdk/models/update_on_call_shadow_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_on_call_shadow_data_type import check_update_on_call_shadow_data_type -from ..models.update_on_call_shadow_data_type import UpdateOnCallShadowDataType -from typing import cast +from ..models.update_on_call_shadow_data_type import UpdateOnCallShadowDataType, check_update_on_call_shadow_data_type if TYPE_CHECKING: from ..models.update_on_call_shadow_data_attributes import UpdateOnCallShadowDataAttributes @@ -32,7 +28,6 @@ class UpdateOnCallShadowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_on_call_shadow_data_attributes import UpdateOnCallShadowDataAttributes type_: str = self.type_ 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 1db4a99a..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,24 +1,17 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field - -from ..types import UNSET, Unset +from dateutil.parser import isoparse -from ..models.update_on_call_shadow_data_attributes_shadowable_type import ( - check_update_on_call_shadow_data_attributes_shadowable_type, -) from ..models.update_on_call_shadow_data_attributes_shadowable_type import ( UpdateOnCallShadowDataAttributesShadowableType, + check_update_on_call_shadow_data_attributes_shadowable_type, ) from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime - T = TypeVar("T", bound="UpdateOnCallShadowDataAttributes") diff --git a/rootly_sdk/models/update_opsgenie_alert_task_params.py b/rootly_sdk/models/update_opsgenie_alert_task_params.py index db543c55..729d24ad 100644 --- a/rootly_sdk/models/update_opsgenie_alert_task_params.py +++ b/rootly_sdk/models/update_opsgenie_alert_task_params.py @@ -1,20 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_opsgenie_alert_task_params_priority import ( + UpdateOpsgenieAlertTaskParamsPriority, + check_update_opsgenie_alert_task_params_priority, +) +from ..models.update_opsgenie_alert_task_params_task_type import ( + UpdateOpsgenieAlertTaskParamsTaskType, + check_update_opsgenie_alert_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_opsgenie_alert_task_params_priority import check_update_opsgenie_alert_task_params_priority -from ..models.update_opsgenie_alert_task_params_priority import UpdateOpsgenieAlertTaskParamsPriority -from ..models.update_opsgenie_alert_task_params_task_type import check_update_opsgenie_alert_task_params_task_type -from ..models.update_opsgenie_alert_task_params_task_type import UpdateOpsgenieAlertTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_opsgenie_alert_task_params_completion import UpdateOpsgenieAlertTaskParamsCompletion @@ -44,7 +45,6 @@ class UpdateOpsgenieAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_opsgenie_alert_task_params_completion import UpdateOpsgenieAlertTaskParamsCompletion alert_id = self.alert_id 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 34368945..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateOpsgenieAlertTaskParamsCompletion") diff --git a/rootly_sdk/models/update_opsgenie_incident_task_params.py b/rootly_sdk/models/update_opsgenie_incident_task_params.py index 3ebc2f7e..46b0c6ef 100644 --- a/rootly_sdk/models/update_opsgenie_incident_task_params.py +++ b/rootly_sdk/models/update_opsgenie_incident_task_params.py @@ -1,23 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_opsgenie_incident_task_params_priority import ( + UpdateOpsgenieIncidentTaskParamsPriority, + check_update_opsgenie_incident_task_params_priority, +) +from ..models.update_opsgenie_incident_task_params_status import ( + UpdateOpsgenieIncidentTaskParamsStatus, + check_update_opsgenie_incident_task_params_status, +) +from ..models.update_opsgenie_incident_task_params_task_type import ( + UpdateOpsgenieIncidentTaskParamsTaskType, + check_update_opsgenie_incident_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_opsgenie_incident_task_params_priority import check_update_opsgenie_incident_task_params_priority -from ..models.update_opsgenie_incident_task_params_priority import UpdateOpsgenieIncidentTaskParamsPriority -from ..models.update_opsgenie_incident_task_params_status import check_update_opsgenie_incident_task_params_status -from ..models.update_opsgenie_incident_task_params_status import UpdateOpsgenieIncidentTaskParamsStatus -from ..models.update_opsgenie_incident_task_params_task_type import check_update_opsgenie_incident_task_params_task_type -from ..models.update_opsgenie_incident_task_params_task_type import UpdateOpsgenieIncidentTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateOpsgenieIncidentTaskParams") diff --git a/rootly_sdk/models/update_override_shift.py b/rootly_sdk/models/update_override_shift.py index db7114f8..236cf914 100644 --- a/rootly_sdk/models/update_override_shift.py +++ b/rootly_sdk/models/update_override_shift.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_override_shift_data import UpdateOverrideShiftData @@ -28,7 +24,6 @@ class UpdateOverrideShift: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_override_shift_data import UpdateOverrideShiftData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_override_shift_data.py b/rootly_sdk/models/update_override_shift_data.py index bb05b9cc..e44a0bd4 100644 --- a/rootly_sdk/models/update_override_shift_data.py +++ b/rootly_sdk/models/update_override_shift_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_override_shift_data_type import check_update_override_shift_data_type -from ..models.update_override_shift_data_type import UpdateOverrideShiftDataType -from typing import cast +from ..models.update_override_shift_data_type import UpdateOverrideShiftDataType, check_update_override_shift_data_type if TYPE_CHECKING: from ..models.update_override_shift_data_attributes import UpdateOverrideShiftDataAttributes @@ -32,7 +28,6 @@ class UpdateOverrideShiftData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_override_shift_data_attributes import UpdateOverrideShiftDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_override_shift_data_attributes.py b/rootly_sdk/models/update_override_shift_data_attributes.py index 9e44a80d..2a34c48e 100644 --- a/rootly_sdk/models/update_override_shift_data_attributes.py +++ b/rootly_sdk/models/update_override_shift_data_attributes.py @@ -1,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateOverrideShiftDataAttributes") diff --git a/rootly_sdk/models/update_pagerduty_incident_task_params.py b/rootly_sdk/models/update_pagerduty_incident_task_params.py index d5390326..3020e135 100644 --- a/rootly_sdk/models/update_pagerduty_incident_task_params.py +++ b/rootly_sdk/models/update_pagerduty_incident_task_params.py @@ -1,24 +1,24 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_pagerduty_incident_task_params_status import check_update_pagerduty_incident_task_params_status -from ..models.update_pagerduty_incident_task_params_status import UpdatePagerdutyIncidentTaskParamsStatus +from ..models.update_pagerduty_incident_task_params_status import ( + UpdatePagerdutyIncidentTaskParamsStatus, + check_update_pagerduty_incident_task_params_status, +) from ..models.update_pagerduty_incident_task_params_task_type import ( + UpdatePagerdutyIncidentTaskParamsTaskType, check_update_pagerduty_incident_task_params_task_type, ) -from ..models.update_pagerduty_incident_task_params_task_type import UpdatePagerdutyIncidentTaskParamsTaskType -from ..models.update_pagerduty_incident_task_params_urgency import check_update_pagerduty_incident_task_params_urgency -from ..models.update_pagerduty_incident_task_params_urgency import UpdatePagerdutyIncidentTaskParamsUrgency +from ..models.update_pagerduty_incident_task_params_urgency import ( + UpdatePagerdutyIncidentTaskParamsUrgency, + check_update_pagerduty_incident_task_params_urgency, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdatePagerdutyIncidentTaskParams") diff --git a/rootly_sdk/models/update_pagertree_alert_task_params.py b/rootly_sdk/models/update_pagertree_alert_task_params.py index 305ee046..6b7cebfb 100644 --- a/rootly_sdk/models/update_pagertree_alert_task_params.py +++ b/rootly_sdk/models/update_pagertree_alert_task_params.py @@ -1,22 +1,25 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_pagertree_alert_task_params_severity import ( + UpdatePagertreeAlertTaskParamsSeverity, + check_update_pagertree_alert_task_params_severity, +) +from ..models.update_pagertree_alert_task_params_task_type import ( + UpdatePagertreeAlertTaskParamsTaskType, + check_update_pagertree_alert_task_params_task_type, +) +from ..models.update_pagertree_alert_task_params_urgency import ( + UpdatePagertreeAlertTaskParamsUrgency, + check_update_pagertree_alert_task_params_urgency, +) from ..types import UNSET, Unset -from ..models.update_pagertree_alert_task_params_severity import check_update_pagertree_alert_task_params_severity -from ..models.update_pagertree_alert_task_params_severity import UpdatePagertreeAlertTaskParamsSeverity -from ..models.update_pagertree_alert_task_params_task_type import check_update_pagertree_alert_task_params_task_type -from ..models.update_pagertree_alert_task_params_task_type import UpdatePagertreeAlertTaskParamsTaskType -from ..models.update_pagertree_alert_task_params_urgency import check_update_pagertree_alert_task_params_urgency -from ..models.update_pagertree_alert_task_params_urgency import UpdatePagertreeAlertTaskParamsUrgency -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_pagertree_alert_task_params_teams_item import UpdatePagertreeAlertTaskParamsTeamsItem from ..models.update_pagertree_alert_task_params_users_item import UpdatePagertreeAlertTaskParamsUsersItem @@ -52,8 +55,6 @@ class UpdatePagertreeAlertTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_pagertree_alert_task_params_users_item import UpdatePagertreeAlertTaskParamsUsersItem - from ..models.update_pagertree_alert_task_params_teams_item import UpdatePagertreeAlertTaskParamsTeamsItem task_type: str | Unset = UNSET if not isinstance(self.task_type, 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 27684165..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdatePagertreeAlertTaskParamsTeamsItem") 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 1d5a6f47..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdatePagertreeAlertTaskParamsUsersItem") diff --git a/rootly_sdk/models/update_playbook.py b/rootly_sdk/models/update_playbook.py index 8f6f08ff..acd968f6 100644 --- a/rootly_sdk/models/update_playbook.py +++ b/rootly_sdk/models/update_playbook.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_playbook_data import UpdatePlaybookData @@ -28,7 +24,6 @@ class UpdatePlaybook: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_playbook_data import UpdatePlaybookData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_playbook_data.py b/rootly_sdk/models/update_playbook_data.py index fb67855e..9bd1cc08 100644 --- a/rootly_sdk/models/update_playbook_data.py +++ b/rootly_sdk/models/update_playbook_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_playbook_data_type import check_update_playbook_data_type -from ..models.update_playbook_data_type import UpdatePlaybookDataType -from typing import cast +from ..models.update_playbook_data_type import UpdatePlaybookDataType, check_update_playbook_data_type if TYPE_CHECKING: from ..models.update_playbook_data_attributes import UpdatePlaybookDataAttributes @@ -32,7 +28,6 @@ class UpdatePlaybookData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_playbook_data_attributes import UpdatePlaybookDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_playbook_data_attributes.py b/rootly_sdk/models/update_playbook_data_attributes.py index da878ec4..c98736b1 100644 --- a/rootly_sdk/models/update_playbook_data_attributes.py +++ b/rootly_sdk/models/update_playbook_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdatePlaybookDataAttributes") diff --git a/rootly_sdk/models/update_playbook_task.py b/rootly_sdk/models/update_playbook_task.py index 065793c1..d18a975b 100644 --- a/rootly_sdk/models/update_playbook_task.py +++ b/rootly_sdk/models/update_playbook_task.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_playbook_task_data import UpdatePlaybookTaskData @@ -28,7 +24,6 @@ class UpdatePlaybookTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_playbook_task_data import UpdatePlaybookTaskData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_playbook_task_data.py b/rootly_sdk/models/update_playbook_task_data.py index 9095ce48..fc0209c0 100644 --- a/rootly_sdk/models/update_playbook_task_data.py +++ b/rootly_sdk/models/update_playbook_task_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_playbook_task_data_type import check_update_playbook_task_data_type -from ..models.update_playbook_task_data_type import UpdatePlaybookTaskDataType -from typing import cast +from ..models.update_playbook_task_data_type import UpdatePlaybookTaskDataType, check_update_playbook_task_data_type if TYPE_CHECKING: from ..models.update_playbook_task_data_attributes import UpdatePlaybookTaskDataAttributes @@ -32,7 +28,6 @@ class UpdatePlaybookTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_playbook_task_data_attributes import UpdatePlaybookTaskDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_playbook_task_data_attributes.py b/rootly_sdk/models/update_playbook_task_data_attributes.py index 1746d621..a8ef0615 100644 --- a/rootly_sdk/models/update_playbook_task_data_attributes.py +++ b/rootly_sdk/models/update_playbook_task_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdatePlaybookTaskDataAttributes") diff --git a/rootly_sdk/models/update_post_mortem_template.py b/rootly_sdk/models/update_post_mortem_template.py index a5f7e33e..459111a4 100644 --- a/rootly_sdk/models/update_post_mortem_template.py +++ b/rootly_sdk/models/update_post_mortem_template.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_post_mortem_template_data import UpdatePostMortemTemplateData @@ -28,7 +24,6 @@ class UpdatePostMortemTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_post_mortem_template_data import UpdatePostMortemTemplateData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_post_mortem_template_data.py b/rootly_sdk/models/update_post_mortem_template_data.py index d0b1c593..6c4f98ce 100644 --- a/rootly_sdk/models/update_post_mortem_template_data.py +++ b/rootly_sdk/models/update_post_mortem_template_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_post_mortem_template_data_type import check_update_post_mortem_template_data_type -from ..models.update_post_mortem_template_data_type import UpdatePostMortemTemplateDataType -from typing import cast +from ..models.update_post_mortem_template_data_type import ( + UpdatePostMortemTemplateDataType, + check_update_post_mortem_template_data_type, +) if TYPE_CHECKING: from ..models.update_post_mortem_template_data_attributes import UpdatePostMortemTemplateDataAttributes @@ -32,7 +31,6 @@ class UpdatePostMortemTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_post_mortem_template_data_attributes import UpdatePostMortemTemplateDataAttributes type_: str = self.type_ 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 6826135d..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,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_post_mortem_template_data_attributes_format import ( + UpdatePostMortemTemplateDataAttributesFormat, check_update_post_mortem_template_data_attributes_format, ) -from ..models.update_post_mortem_template_data_attributes_format import UpdatePostMortemTemplateDataAttributesFormat from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdatePostMortemTemplateDataAttributes") diff --git a/rootly_sdk/models/update_pulse.py b/rootly_sdk/models/update_pulse.py index 0be44fdd..ce900954 100644 --- a/rootly_sdk/models/update_pulse.py +++ b/rootly_sdk/models/update_pulse.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_pulse_data import UpdatePulseData @@ -28,7 +24,6 @@ class UpdatePulse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_pulse_data import UpdatePulseData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_pulse_data.py b/rootly_sdk/models/update_pulse_data.py index 3c2856c8..651fb0dc 100644 --- a/rootly_sdk/models/update_pulse_data.py +++ b/rootly_sdk/models/update_pulse_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_pulse_data_type import check_update_pulse_data_type -from ..models.update_pulse_data_type import UpdatePulseDataType -from typing import cast +from ..models.update_pulse_data_type import UpdatePulseDataType, check_update_pulse_data_type if TYPE_CHECKING: from ..models.update_pulse_data_attributes import UpdatePulseDataAttributes @@ -32,7 +28,6 @@ class UpdatePulseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_pulse_data_attributes import UpdatePulseDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_pulse_data_attributes.py b/rootly_sdk/models/update_pulse_data_attributes.py index 14bbc007..0defb512 100644 --- a/rootly_sdk/models/update_pulse_data_attributes.py +++ b/rootly_sdk/models/update_pulse_data_attributes.py @@ -1,17 +1,13 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 +from dateutil.parser import isoparse from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime if TYPE_CHECKING: from ..models.update_pulse_data_attributes_data_type_0 import UpdatePulseDataAttributesDataType0 @@ -50,9 +46,9 @@ class UpdatePulseDataAttributes: data: None | Unset | UpdatePulseDataAttributesDataType0 = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_pulse_data_attributes_refs_item_type_0 import UpdatePulseDataAttributesRefsItemType0 - from ..models.update_pulse_data_attributes_labels_item_type_0 import UpdatePulseDataAttributesLabelsItemType0 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 | str | Unset if isinstance(self.source, 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 3191a013..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdatePulseDataAttributesDataType0") 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 c83732d6..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdatePulseDataAttributesLabelsItemType0") 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 4db34750..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdatePulseDataAttributesRefsItemType0") diff --git a/rootly_sdk/models/update_quip_page_task_params.py b/rootly_sdk/models/update_quip_page_task_params.py index 715c95cb..3de18173 100644 --- a/rootly_sdk/models/update_quip_page_task_params.py +++ b/rootly_sdk/models/update_quip_page_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_quip_page_task_params_task_type import ( + UpdateQuipPageTaskParamsTaskType, + check_update_quip_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_quip_page_task_params_task_type import check_update_quip_page_task_params_task_type -from ..models.update_quip_page_task_params_task_type import UpdateQuipPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateQuipPageTaskParams") diff --git a/rootly_sdk/models/update_retrospective_configuration.py b/rootly_sdk/models/update_retrospective_configuration.py index f17420b8..e4975c8a 100644 --- a/rootly_sdk/models/update_retrospective_configuration.py +++ b/rootly_sdk/models/update_retrospective_configuration.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_retrospective_configuration_data import UpdateRetrospectiveConfigurationData @@ -28,7 +24,6 @@ class UpdateRetrospectiveConfiguration: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_configuration_data import UpdateRetrospectiveConfigurationData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_retrospective_configuration_data.py b/rootly_sdk/models/update_retrospective_configuration_data.py index 77a06776..1d1cf126 100644 --- a/rootly_sdk/models/update_retrospective_configuration_data.py +++ b/rootly_sdk/models/update_retrospective_configuration_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_retrospective_configuration_data_type import check_update_retrospective_configuration_data_type -from ..models.update_retrospective_configuration_data_type import UpdateRetrospectiveConfigurationDataType -from typing import cast +from ..models.update_retrospective_configuration_data_type import ( + UpdateRetrospectiveConfigurationDataType, + check_update_retrospective_configuration_data_type, +) if TYPE_CHECKING: from ..models.update_retrospective_configuration_data_attributes import ( @@ -34,9 +33,6 @@ class UpdateRetrospectiveConfigurationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_configuration_data_attributes import ( - UpdateRetrospectiveConfigurationDataAttributes, - ) type_: str = self.type_ diff --git a/rootly_sdk/models/update_retrospective_configuration_data_attributes.py b/rootly_sdk/models/update_retrospective_configuration_data_attributes.py index c85cee40..969dbf0b 100644 --- a/rootly_sdk/models/update_retrospective_configuration_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_configuration_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateRetrospectiveConfigurationDataAttributes") diff --git a/rootly_sdk/models/update_retrospective_process.py b/rootly_sdk/models/update_retrospective_process.py index 94794a93..ca707e8e 100644 --- a/rootly_sdk/models/update_retrospective_process.py +++ b/rootly_sdk/models/update_retrospective_process.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_retrospective_process_data import UpdateRetrospectiveProcessData @@ -28,7 +24,6 @@ class UpdateRetrospectiveProcess: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_process_data import UpdateRetrospectiveProcessData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_retrospective_process_data.py b/rootly_sdk/models/update_retrospective_process_data.py index b5319fdb..e5a466bb 100644 --- a/rootly_sdk/models/update_retrospective_process_data.py +++ b/rootly_sdk/models/update_retrospective_process_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_retrospective_process_data_type import check_update_retrospective_process_data_type -from ..models.update_retrospective_process_data_type import UpdateRetrospectiveProcessDataType -from typing import cast +from ..models.update_retrospective_process_data_type import ( + UpdateRetrospectiveProcessDataType, + check_update_retrospective_process_data_type, +) if TYPE_CHECKING: from ..models.update_retrospective_process_data_attributes import UpdateRetrospectiveProcessDataAttributes @@ -32,7 +31,6 @@ class UpdateRetrospectiveProcessData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_process_data_attributes import UpdateRetrospectiveProcessDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_retrospective_process_data_attributes.py b/rootly_sdk/models/update_retrospective_process_data_attributes.py index 46cef4b9..2627b37f 100644 --- a/rootly_sdk/models/update_retrospective_process_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_process_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_0 import ( UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0, @@ -54,9 +50,6 @@ def to_dict(self) -> dict[str, Any]: from ..models.update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_1 import ( UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1, ) - from ..models.update_retrospective_process_data_attributes_retrospective_process_matching_criteria_type_2 import ( - UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2, - ) name = self.name 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 925c011a..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,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType0") 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 0273ee4c..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,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType1") 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 e81a1203..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,15 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - T = TypeVar("T", bound="UpdateRetrospectiveProcessDataAttributesRetrospectiveProcessMatchingCriteriaType2") diff --git a/rootly_sdk/models/update_retrospective_process_group.py b/rootly_sdk/models/update_retrospective_process_group.py index a3597f90..feef5994 100644 --- a/rootly_sdk/models/update_retrospective_process_group.py +++ b/rootly_sdk/models/update_retrospective_process_group.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_retrospective_process_group_data import UpdateRetrospectiveProcessGroupData @@ -28,7 +24,6 @@ class UpdateRetrospectiveProcessGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_process_group_data import UpdateRetrospectiveProcessGroupData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_retrospective_process_group_data.py b/rootly_sdk/models/update_retrospective_process_group_data.py index a2e38113..8230d21d 100644 --- a/rootly_sdk/models/update_retrospective_process_group_data.py +++ b/rootly_sdk/models/update_retrospective_process_group_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_retrospective_process_group_data_type import check_update_retrospective_process_group_data_type -from ..models.update_retrospective_process_group_data_type import UpdateRetrospectiveProcessGroupDataType -from typing import cast +from ..models.update_retrospective_process_group_data_type import ( + UpdateRetrospectiveProcessGroupDataType, + check_update_retrospective_process_group_data_type, +) if TYPE_CHECKING: from ..models.update_retrospective_process_group_data_attributes import ( @@ -34,9 +33,6 @@ class UpdateRetrospectiveProcessGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_process_group_data_attributes import ( - UpdateRetrospectiveProcessGroupDataAttributes, - ) type_: str = self.type_ 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 d795f342..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateRetrospectiveProcessGroupDataAttributes") diff --git a/rootly_sdk/models/update_retrospective_process_group_step.py b/rootly_sdk/models/update_retrospective_process_group_step.py index 5330933d..ef0b3d24 100644 --- a/rootly_sdk/models/update_retrospective_process_group_step.py +++ b/rootly_sdk/models/update_retrospective_process_group_step.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_retrospective_process_group_step_data import UpdateRetrospectiveProcessGroupStepData @@ -28,7 +24,6 @@ class UpdateRetrospectiveProcessGroupStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_process_group_step_data import UpdateRetrospectiveProcessGroupStepData data = self.data.to_dict() 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 260f3a63..40bd1a00 100644 --- a/rootly_sdk/models/update_retrospective_process_group_step_data.py +++ b/rootly_sdk/models/update_retrospective_process_group_step_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_retrospective_process_group_step_data_type import ( + UpdateRetrospectiveProcessGroupStepDataType, check_update_retrospective_process_group_step_data_type, ) -from ..models.update_retrospective_process_group_step_data_type import UpdateRetrospectiveProcessGroupStepDataType -from typing import cast if TYPE_CHECKING: from ..models.update_retrospective_process_group_step_data_attributes import ( @@ -36,9 +33,6 @@ class UpdateRetrospectiveProcessGroupStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_process_group_step_data_attributes import ( - UpdateRetrospectiveProcessGroupStepDataAttributes, - ) type_: str = self.type_ 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 f2fdd58c..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateRetrospectiveProcessGroupStepDataAttributes") diff --git a/rootly_sdk/models/update_retrospective_step.py b/rootly_sdk/models/update_retrospective_step.py index cf0d6e5e..e6088f73 100644 --- a/rootly_sdk/models/update_retrospective_step.py +++ b/rootly_sdk/models/update_retrospective_step.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_retrospective_step_data import UpdateRetrospectiveStepData @@ -28,7 +24,6 @@ class UpdateRetrospectiveStep: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_step_data import UpdateRetrospectiveStepData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_retrospective_step_data.py b/rootly_sdk/models/update_retrospective_step_data.py index 81146e50..7d559d60 100644 --- a/rootly_sdk/models/update_retrospective_step_data.py +++ b/rootly_sdk/models/update_retrospective_step_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_retrospective_step_data_type import check_update_retrospective_step_data_type -from ..models.update_retrospective_step_data_type import UpdateRetrospectiveStepDataType -from typing import cast +from ..models.update_retrospective_step_data_type import ( + UpdateRetrospectiveStepDataType, + check_update_retrospective_step_data_type, +) if TYPE_CHECKING: from ..models.update_retrospective_step_data_attributes import UpdateRetrospectiveStepDataAttributes @@ -32,7 +31,6 @@ class UpdateRetrospectiveStepData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_retrospective_step_data_attributes import UpdateRetrospectiveStepDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_retrospective_step_data_attributes.py b/rootly_sdk/models/update_retrospective_step_data_attributes.py index 8995f426..421a8240 100644 --- a/rootly_sdk/models/update_retrospective_step_data_attributes.py +++ b/rootly_sdk/models/update_retrospective_step_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateRetrospectiveStepDataAttributes") diff --git a/rootly_sdk/models/update_role.py b/rootly_sdk/models/update_role.py index 50d6825e..fa829337 100644 --- a/rootly_sdk/models/update_role.py +++ b/rootly_sdk/models/update_role.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_role_data import UpdateRoleData @@ -28,7 +24,6 @@ class UpdateRole: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_role_data import UpdateRoleData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_role_data.py b/rootly_sdk/models/update_role_data.py index d22dfc7d..0237e351 100644 --- a/rootly_sdk/models/update_role_data.py +++ b/rootly_sdk/models/update_role_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_role_data_type import check_update_role_data_type -from ..models.update_role_data_type import UpdateRoleDataType -from typing import cast +from ..models.update_role_data_type import UpdateRoleDataType, check_update_role_data_type if TYPE_CHECKING: from ..models.update_role_data_attributes import UpdateRoleDataAttributes @@ -32,7 +28,6 @@ class UpdateRoleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_role_data_attributes import UpdateRoleDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_role_data_attributes.py b/rootly_sdk/models/update_role_data_attributes.py index ee499bb3..07ecec3c 100644 --- a/rootly_sdk/models/update_role_data_attributes.py +++ b/rootly_sdk/models/update_role_data_attributes.py @@ -1,188 +1,135 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.update_role_data_attributes_api_keys_permissions_item import ( - check_update_role_data_attributes_api_keys_permissions_item, -) from ..models.update_role_data_attributes_api_keys_permissions_item import ( UpdateRoleDataAttributesApiKeysPermissionsItem, + check_update_role_data_attributes_api_keys_permissions_item, ) from ..models.update_role_data_attributes_audits_permissions_item import ( + UpdateRoleDataAttributesAuditsPermissionsItem, check_update_role_data_attributes_audits_permissions_item, ) -from ..models.update_role_data_attributes_audits_permissions_item import UpdateRoleDataAttributesAuditsPermissionsItem from ..models.update_role_data_attributes_billing_permissions_item import ( + UpdateRoleDataAttributesBillingPermissionsItem, check_update_role_data_attributes_billing_permissions_item, ) -from ..models.update_role_data_attributes_billing_permissions_item import UpdateRoleDataAttributesBillingPermissionsItem -from ..models.update_role_data_attributes_catalogs_permissions_item import ( - check_update_role_data_attributes_catalogs_permissions_item, -) from ..models.update_role_data_attributes_catalogs_permissions_item import ( UpdateRoleDataAttributesCatalogsPermissionsItem, -) -from ..models.update_role_data_attributes_communication_permissions_item import ( - check_update_role_data_attributes_communication_permissions_item, + check_update_role_data_attributes_catalogs_permissions_item, ) from ..models.update_role_data_attributes_communication_permissions_item import ( UpdateRoleDataAttributesCommunicationPermissionsItem, -) -from ..models.update_role_data_attributes_edge_connector_permissions_item import ( - check_update_role_data_attributes_edge_connector_permissions_item, + check_update_role_data_attributes_communication_permissions_item, ) from ..models.update_role_data_attributes_edge_connector_permissions_item import ( UpdateRoleDataAttributesEdgeConnectorPermissionsItem, -) -from ..models.update_role_data_attributes_environments_permissions_item import ( - check_update_role_data_attributes_environments_permissions_item, + check_update_role_data_attributes_edge_connector_permissions_item, ) from ..models.update_role_data_attributes_environments_permissions_item import ( UpdateRoleDataAttributesEnvironmentsPermissionsItem, -) -from ..models.update_role_data_attributes_form_fields_permissions_item import ( - check_update_role_data_attributes_form_fields_permissions_item, + check_update_role_data_attributes_environments_permissions_item, ) from ..models.update_role_data_attributes_form_fields_permissions_item import ( UpdateRoleDataAttributesFormFieldsPermissionsItem, -) -from ..models.update_role_data_attributes_functionalities_permissions_item import ( - check_update_role_data_attributes_functionalities_permissions_item, + check_update_role_data_attributes_form_fields_permissions_item, ) from ..models.update_role_data_attributes_functionalities_permissions_item import ( UpdateRoleDataAttributesFunctionalitiesPermissionsItem, + check_update_role_data_attributes_functionalities_permissions_item, ) from ..models.update_role_data_attributes_groups_permissions_item import ( + UpdateRoleDataAttributesGroupsPermissionsItem, check_update_role_data_attributes_groups_permissions_item, ) -from ..models.update_role_data_attributes_groups_permissions_item import UpdateRoleDataAttributesGroupsPermissionsItem -from ..models.update_role_data_attributes_incident_causes_permissions_item import ( - check_update_role_data_attributes_incident_causes_permissions_item, -) from ..models.update_role_data_attributes_incident_causes_permissions_item import ( UpdateRoleDataAttributesIncidentCausesPermissionsItem, -) -from ..models.update_role_data_attributes_incident_communication_permissions_item import ( - check_update_role_data_attributes_incident_communication_permissions_item, + check_update_role_data_attributes_incident_causes_permissions_item, ) from ..models.update_role_data_attributes_incident_communication_permissions_item import ( UpdateRoleDataAttributesIncidentCommunicationPermissionsItem, -) -from ..models.update_role_data_attributes_incident_feedbacks_permissions_item import ( - check_update_role_data_attributes_incident_feedbacks_permissions_item, + check_update_role_data_attributes_incident_communication_permissions_item, ) from ..models.update_role_data_attributes_incident_feedbacks_permissions_item import ( UpdateRoleDataAttributesIncidentFeedbacksPermissionsItem, -) -from ..models.update_role_data_attributes_incident_roles_permissions_item import ( - check_update_role_data_attributes_incident_roles_permissions_item, + check_update_role_data_attributes_incident_feedbacks_permissions_item, ) from ..models.update_role_data_attributes_incident_roles_permissions_item import ( UpdateRoleDataAttributesIncidentRolesPermissionsItem, -) -from ..models.update_role_data_attributes_incident_types_permissions_item import ( - check_update_role_data_attributes_incident_types_permissions_item, + check_update_role_data_attributes_incident_roles_permissions_item, ) from ..models.update_role_data_attributes_incident_types_permissions_item import ( UpdateRoleDataAttributesIncidentTypesPermissionsItem, -) -from ..models.update_role_data_attributes_incidents_permissions_item import ( - check_update_role_data_attributes_incidents_permissions_item, + check_update_role_data_attributes_incident_types_permissions_item, ) from ..models.update_role_data_attributes_incidents_permissions_item import ( UpdateRoleDataAttributesIncidentsPermissionsItem, -) -from ..models.update_role_data_attributes_integrations_permissions_item import ( - check_update_role_data_attributes_integrations_permissions_item, + check_update_role_data_attributes_incidents_permissions_item, ) from ..models.update_role_data_attributes_integrations_permissions_item import ( UpdateRoleDataAttributesIntegrationsPermissionsItem, -) -from ..models.update_role_data_attributes_invitations_permissions_item import ( - check_update_role_data_attributes_invitations_permissions_item, + check_update_role_data_attributes_integrations_permissions_item, ) from ..models.update_role_data_attributes_invitations_permissions_item import ( 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_paging_permissions_item import UpdateRoleDataAttributesPagingPermissionsItem -from ..models.update_role_data_attributes_playbooks_permissions_item import ( - check_update_role_data_attributes_playbooks_permissions_item, -) from ..models.update_role_data_attributes_playbooks_permissions_item import ( UpdateRoleDataAttributesPlaybooksPermissionsItem, -) -from ..models.update_role_data_attributes_private_incidents_permissions_item import ( - check_update_role_data_attributes_private_incidents_permissions_item, + check_update_role_data_attributes_playbooks_permissions_item, ) from ..models.update_role_data_attributes_private_incidents_permissions_item import ( UpdateRoleDataAttributesPrivateIncidentsPermissionsItem, -) -from ..models.update_role_data_attributes_retrospective_permissions_item import ( - check_update_role_data_attributes_retrospective_permissions_item, + check_update_role_data_attributes_private_incidents_permissions_item, ) from ..models.update_role_data_attributes_retrospective_permissions_item import ( UpdateRoleDataAttributesRetrospectivePermissionsItem, + check_update_role_data_attributes_retrospective_permissions_item, ) from ..models.update_role_data_attributes_roles_permissions_item import ( + UpdateRoleDataAttributesRolesPermissionsItem, check_update_role_data_attributes_roles_permissions_item, ) -from ..models.update_role_data_attributes_roles_permissions_item import UpdateRoleDataAttributesRolesPermissionsItem from ..models.update_role_data_attributes_secrets_permissions_item import ( + UpdateRoleDataAttributesSecretsPermissionsItem, check_update_role_data_attributes_secrets_permissions_item, ) -from ..models.update_role_data_attributes_secrets_permissions_item import UpdateRoleDataAttributesSecretsPermissionsItem -from ..models.update_role_data_attributes_services_permissions_item import ( - check_update_role_data_attributes_services_permissions_item, -) from ..models.update_role_data_attributes_services_permissions_item import ( UpdateRoleDataAttributesServicesPermissionsItem, -) -from ..models.update_role_data_attributes_severities_permissions_item import ( - check_update_role_data_attributes_severities_permissions_item, + check_update_role_data_attributes_services_permissions_item, ) from ..models.update_role_data_attributes_severities_permissions_item import ( 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_slas_permissions_item import UpdateRoleDataAttributesSlasPermissionsItem -from ..models.update_role_data_attributes_status_pages_permissions_item import ( - check_update_role_data_attributes_status_pages_permissions_item, -) from ..models.update_role_data_attributes_status_pages_permissions_item import ( UpdateRoleDataAttributesStatusPagesPermissionsItem, -) -from ..models.update_role_data_attributes_sub_statuses_permissions_item import ( - check_update_role_data_attributes_sub_statuses_permissions_item, + check_update_role_data_attributes_status_pages_permissions_item, ) from ..models.update_role_data_attributes_sub_statuses_permissions_item import ( UpdateRoleDataAttributesSubStatusesPermissionsItem, -) -from ..models.update_role_data_attributes_webhooks_permissions_item import ( - check_update_role_data_attributes_webhooks_permissions_item, + check_update_role_data_attributes_sub_statuses_permissions_item, ) from ..models.update_role_data_attributes_webhooks_permissions_item import ( UpdateRoleDataAttributesWebhooksPermissionsItem, -) -from ..models.update_role_data_attributes_workflows_permissions_item import ( - check_update_role_data_attributes_workflows_permissions_item, + check_update_role_data_attributes_webhooks_permissions_item, ) from ..models.update_role_data_attributes_workflows_permissions_item import ( UpdateRoleDataAttributesWorkflowsPermissionsItem, + check_update_role_data_attributes_workflows_permissions_item, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateRoleDataAttributes") diff --git a/rootly_sdk/models/update_schedule.py b/rootly_sdk/models/update_schedule.py index 5ff9ab85..ad2083f3 100644 --- a/rootly_sdk/models/update_schedule.py +++ b/rootly_sdk/models/update_schedule.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_schedule_data import UpdateScheduleData @@ -28,7 +24,6 @@ class UpdateSchedule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_data import UpdateScheduleData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_schedule_data.py b/rootly_sdk/models/update_schedule_data.py index 2294fb16..4cbf9034 100644 --- a/rootly_sdk/models/update_schedule_data.py +++ b/rootly_sdk/models/update_schedule_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_schedule_data_type import check_update_schedule_data_type -from ..models.update_schedule_data_type import UpdateScheduleDataType -from typing import cast +from ..models.update_schedule_data_type import UpdateScheduleDataType, check_update_schedule_data_type if TYPE_CHECKING: from ..models.update_schedule_data_attributes import UpdateScheduleDataAttributes @@ -32,7 +28,6 @@ class UpdateScheduleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_data_attributes import UpdateScheduleDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_schedule_data_attributes.py b/rootly_sdk/models/update_schedule_data_attributes.py index 62a8b8c9..a8609097 100644 --- a/rootly_sdk/models/update_schedule_data_attributes.py +++ b/rootly_sdk/models/update_schedule_data_attributes.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.update_schedule_data_attributes_shift_report_day_of_week import ( - check_update_schedule_data_attributes_shift_report_day_of_week, -) from ..models.update_schedule_data_attributes_shift_report_day_of_week import ( UpdateScheduleDataAttributesShiftReportDayOfWeek, + check_update_schedule_data_attributes_shift_report_day_of_week, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_schedule_data_attributes_slack_channel_type_0 import ( @@ -75,7 +69,6 @@ def to_dict(self) -> dict[str, Any]: from ..models.update_schedule_data_attributes_slack_channel_type_0 import ( UpdateScheduleDataAttributesSlackChannelType0, ) - from ..models.update_schedule_data_attributes_slack_user_group import UpdateScheduleDataAttributesSlackUserGroup name = self.name 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 7e1034c1..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateScheduleDataAttributesSlackChannelType0") 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 ac5a8033..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateScheduleDataAttributesSlackUserGroup") diff --git a/rootly_sdk/models/update_schedule_rotation.py b/rootly_sdk/models/update_schedule_rotation.py index a19277bf..70ac37af 100644 --- a/rootly_sdk/models/update_schedule_rotation.py +++ b/rootly_sdk/models/update_schedule_rotation.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_schedule_rotation_data import UpdateScheduleRotationData @@ -28,7 +24,6 @@ class UpdateScheduleRotation: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_rotation_data import UpdateScheduleRotationData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_schedule_rotation_active_day.py b/rootly_sdk/models/update_schedule_rotation_active_day.py index ca4d6788..397dded0 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_schedule_rotation_active_day_data import UpdateScheduleRotationActiveDayData @@ -28,7 +24,6 @@ class UpdateScheduleRotationActiveDay: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_rotation_active_day_data import UpdateScheduleRotationActiveDayData data = self.data.to_dict() 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 bc21c6d3..9ddf97ca 100644 --- a/rootly_sdk/models/update_schedule_rotation_active_day_data.py +++ b/rootly_sdk/models/update_schedule_rotation_active_day_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_schedule_rotation_active_day_data_type import check_update_schedule_rotation_active_day_data_type -from ..models.update_schedule_rotation_active_day_data_type import UpdateScheduleRotationActiveDayDataType -from typing import cast +from ..models.update_schedule_rotation_active_day_data_type import ( + UpdateScheduleRotationActiveDayDataType, + check_update_schedule_rotation_active_day_data_type, +) if TYPE_CHECKING: from ..models.update_schedule_rotation_active_day_data_attributes import ( @@ -34,9 +33,6 @@ class UpdateScheduleRotationActiveDayData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_rotation_active_day_data_attributes import ( - UpdateScheduleRotationActiveDayDataAttributes, - ) type_: str = self.type_ 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 d45585e9..b25922b5 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,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_schedule_rotation_active_day_data_attributes_day_name import ( - check_update_schedule_rotation_active_day_data_attributes_day_name, -) from ..models.update_schedule_rotation_active_day_data_attributes_day_name import ( UpdateScheduleRotationActiveDayDataAttributesDayName, + check_update_schedule_rotation_active_day_data_attributes_day_name, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_schedule_rotation_active_day_data_attributes_active_time_attributes_item import ( @@ -40,9 +34,6 @@ class UpdateScheduleRotationActiveDayDataAttributes: active_time_attributes: list[UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_rotation_active_day_data_attributes_active_time_attributes_item import ( - UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem, - ) day_name: str | Unset = UNSET if not isinstance(self.day_name, Unset): 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 3ff473f7..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateScheduleRotationActiveDayDataAttributesActiveTimeAttributesItem") diff --git a/rootly_sdk/models/update_schedule_rotation_data.py b/rootly_sdk/models/update_schedule_rotation_data.py index 629a61db..4cfacf30 100644 --- a/rootly_sdk/models/update_schedule_rotation_data.py +++ b/rootly_sdk/models/update_schedule_rotation_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_schedule_rotation_data_type import check_update_schedule_rotation_data_type -from ..models.update_schedule_rotation_data_type import UpdateScheduleRotationDataType -from typing import cast +from ..models.update_schedule_rotation_data_type import ( + UpdateScheduleRotationDataType, + check_update_schedule_rotation_data_type, +) if TYPE_CHECKING: from ..models.update_schedule_rotation_data_attributes import UpdateScheduleRotationDataAttributes @@ -32,7 +31,6 @@ class UpdateScheduleRotationData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_rotation_data_attributes import UpdateScheduleRotationDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_schedule_rotation_data_attributes.py b/rootly_sdk/models/update_schedule_rotation_data_attributes.py index fde3111e..dfa4b3af 100644 --- a/rootly_sdk/models/update_schedule_rotation_data_attributes.py +++ b/rootly_sdk/models/update_schedule_rotation_data_attributes.py @@ -1,29 +1,21 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 +from dateutil.parser import isoparse -from ..models.update_schedule_rotation_data_attributes_active_days_item import ( - check_update_schedule_rotation_data_attributes_active_days_item, -) from ..models.update_schedule_rotation_data_attributes_active_days_item import ( UpdateScheduleRotationDataAttributesActiveDaysItem, -) -from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_type import ( - check_update_schedule_rotation_data_attributes_schedule_rotationable_type, + check_update_schedule_rotation_data_attributes_active_days_item, ) from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_type import ( UpdateScheduleRotationDataAttributesScheduleRotationableType, + check_update_schedule_rotation_data_attributes_schedule_rotationable_type, ) from ..types import UNSET, Unset -from dateutil.parser import isoparse -from typing import cast -import datetime if TYPE_CHECKING: from ..models.update_schedule_rotation_data_attributes_active_time_attributes_item import ( @@ -98,20 +90,11 @@ class UpdateScheduleRotationDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item import ( - UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item, - ) - from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3 import ( - UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3, - ) - from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1 import ( - UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1, - ) from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_0 import ( UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0, ) - from ..models.update_schedule_rotation_data_attributes_active_time_attributes_item import ( - UpdateScheduleRotationDataAttributesActiveTimeAttributesItem, + from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1 import ( + UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1, ) from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2 import ( UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2, 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 cc8a3b51..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateScheduleRotationDataAttributesActiveTimeAttributesItem") 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 0c1c9d21..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,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type import ( - check_update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type, -) from ..models.update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type import ( UpdateScheduleRotationDataAttributesScheduleRotationMembersType0ItemMemberType, + check_update_schedule_rotation_data_attributes_schedule_rotation_members_type_0_item_member_type, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesScheduleRotationMembersType0Item") 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 fd0b0662..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,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType0") 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 354c6b92..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day import ( - check_update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day, -) from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day import ( UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1HandoffDay, + check_update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_1_handoff_day, ) -from typing import cast - T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType1") 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 4ca2bcec..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day import ( - check_update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day, -) from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day import ( UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2HandoffDay, + check_update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_2_handoff_day, ) -from typing import cast - T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType2") 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 b3f31cac..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,21 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit import ( - check_update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit, -) from ..models.update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit import ( UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3ShiftLengthUnit, + check_update_schedule_rotation_data_attributes_schedule_rotationable_attributes_type_3_shift_length_unit, ) -from typing import cast - T = TypeVar("T", bound="UpdateScheduleRotationDataAttributesScheduleRotationableAttributesType3") diff --git a/rootly_sdk/models/update_schedule_rotation_user.py b/rootly_sdk/models/update_schedule_rotation_user.py index 0f50730b..0750bafd 100644 --- a/rootly_sdk/models/update_schedule_rotation_user.py +++ b/rootly_sdk/models/update_schedule_rotation_user.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_schedule_rotation_user_data import UpdateScheduleRotationUserData @@ -28,7 +24,6 @@ class UpdateScheduleRotationUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_rotation_user_data import UpdateScheduleRotationUserData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_schedule_rotation_user_data.py b/rootly_sdk/models/update_schedule_rotation_user_data.py index 85b2a464..460b1e6e 100644 --- a/rootly_sdk/models/update_schedule_rotation_user_data.py +++ b/rootly_sdk/models/update_schedule_rotation_user_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_schedule_rotation_user_data_type import check_update_schedule_rotation_user_data_type -from ..models.update_schedule_rotation_user_data_type import UpdateScheduleRotationUserDataType -from typing import cast +from ..models.update_schedule_rotation_user_data_type import ( + UpdateScheduleRotationUserDataType, + check_update_schedule_rotation_user_data_type, +) if TYPE_CHECKING: from ..models.update_schedule_rotation_user_data_attributes import UpdateScheduleRotationUserDataAttributes @@ -32,7 +31,6 @@ class UpdateScheduleRotationUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_schedule_rotation_user_data_attributes import UpdateScheduleRotationUserDataAttributes type_: str = self.type_ 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 d7625184..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateScheduleRotationUserDataAttributes") diff --git a/rootly_sdk/models/update_secret.py b/rootly_sdk/models/update_secret.py index 668f30c5..09fb2dc2 100644 --- a/rootly_sdk/models/update_secret.py +++ b/rootly_sdk/models/update_secret.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_secret_data import UpdateSecretData @@ -28,7 +24,6 @@ class UpdateSecret: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_secret_data import UpdateSecretData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_secret_data.py b/rootly_sdk/models/update_secret_data.py index fe78c80a..ed599fda 100644 --- a/rootly_sdk/models/update_secret_data.py +++ b/rootly_sdk/models/update_secret_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_secret_data_type import check_update_secret_data_type -from ..models.update_secret_data_type import UpdateSecretDataType -from typing import cast +from ..models.update_secret_data_type import UpdateSecretDataType, check_update_secret_data_type if TYPE_CHECKING: from ..models.update_secret_data_attributes import UpdateSecretDataAttributes @@ -32,7 +28,6 @@ class UpdateSecretData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_secret_data_attributes import UpdateSecretDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_secret_data_attributes.py b/rootly_sdk/models/update_secret_data_attributes.py index b4098cba..9aaed46f 100644 --- a/rootly_sdk/models/update_secret_data_attributes.py +++ b/rootly_sdk/models/update_secret_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateSecretDataAttributes") diff --git a/rootly_sdk/models/update_service.py b/rootly_sdk/models/update_service.py index 9bd2dcdc..f5bf5217 100644 --- a/rootly_sdk/models/update_service.py +++ b/rootly_sdk/models/update_service.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_service_data import UpdateServiceData @@ -28,7 +24,6 @@ class UpdateService: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_service_data import UpdateServiceData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_service_data.py b/rootly_sdk/models/update_service_data.py index bdb47056..f37ffa9f 100644 --- a/rootly_sdk/models/update_service_data.py +++ b/rootly_sdk/models/update_service_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_service_data_type import check_update_service_data_type -from ..models.update_service_data_type import UpdateServiceDataType -from typing import cast +from ..models.update_service_data_type import UpdateServiceDataType, check_update_service_data_type if TYPE_CHECKING: from ..models.update_service_data_attributes import UpdateServiceDataAttributes @@ -32,7 +28,6 @@ class UpdateServiceData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_service_data_attributes import UpdateServiceDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_service_data_attributes.py b/rootly_sdk/models/update_service_data_attributes.py index 6455ab8a..2f07c2ad 100644 --- a/rootly_sdk/models/update_service_data_attributes.py +++ b/rootly_sdk/models/update_service_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_service_data_attributes_alert_broadcast_channel_type_0 import ( UpdateServiceDataAttributesAlertBroadcastChannelType0, @@ -108,18 +104,11 @@ class UpdateServiceDataAttributes: properties: list[UpdateServiceDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_service_data_attributes_properties_item import UpdateServiceDataAttributesPropertiesItem - from ..models.update_service_data_attributes_incident_broadcast_channel_type_0 import ( - UpdateServiceDataAttributesIncidentBroadcastChannelType0, - ) - from ..models.update_service_data_attributes_slack_channels_type_0_item import ( - UpdateServiceDataAttributesSlackChannelsType0Item, - ) from ..models.update_service_data_attributes_alert_broadcast_channel_type_0 import ( UpdateServiceDataAttributesAlertBroadcastChannelType0, ) - from ..models.update_service_data_attributes_slack_aliases_type_0_item import ( - UpdateServiceDataAttributesSlackAliasesType0Item, + from ..models.update_service_data_attributes_incident_broadcast_channel_type_0 import ( + UpdateServiceDataAttributesIncidentBroadcastChannelType0, ) name = self.name 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 26ec34d3..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateServiceDataAttributesAlertBroadcastChannelType0") 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 b378a36f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateServiceDataAttributesIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/update_service_data_attributes_properties_item.py b/rootly_sdk/models/update_service_data_attributes_properties_item.py index 0a0646e0..ed866804 100644 --- a/rootly_sdk/models/update_service_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_service_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateServiceDataAttributesPropertiesItem") 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 7791294a..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateServiceDataAttributesSlackAliasesType0Item") 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 d880c772..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateServiceDataAttributesSlackChannelsType0Item") 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 2949adbf..ac5e8b1a 100644 --- a/rootly_sdk/models/update_service_now_incident_task_params.py +++ b/rootly_sdk/models/update_service_now_incident_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_service_now_incident_task_params_task_type import ( + UpdateServiceNowIncidentTaskParamsTaskType, check_update_service_now_incident_task_params_task_type, ) -from ..models.update_service_now_incident_task_params_task_type import UpdateServiceNowIncidentTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_service_now_incident_task_params_completion import UpdateServiceNowIncidentTaskParamsCompletion @@ -47,10 +44,6 @@ class UpdateServiceNowIncidentTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_service_now_incident_task_params_priority import UpdateServiceNowIncidentTaskParamsPriority - from ..models.update_service_now_incident_task_params_completion import ( - UpdateServiceNowIncidentTaskParamsCompletion, - ) incident_id = self.incident_id 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 c5897ac4..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateServiceNowIncidentTaskParamsCompletion") 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 4c96ddb0..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateServiceNowIncidentTaskParamsPriority") diff --git a/rootly_sdk/models/update_severity.py b/rootly_sdk/models/update_severity.py index 8b59a68d..c4018f33 100644 --- a/rootly_sdk/models/update_severity.py +++ b/rootly_sdk/models/update_severity.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_severity_data import UpdateSeverityData @@ -28,7 +24,6 @@ class UpdateSeverity: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_severity_data import UpdateSeverityData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_severity_data.py b/rootly_sdk/models/update_severity_data.py index 38e70f4d..7e03bb83 100644 --- a/rootly_sdk/models/update_severity_data.py +++ b/rootly_sdk/models/update_severity_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_severity_data_type import check_update_severity_data_type -from ..models.update_severity_data_type import UpdateSeverityDataType -from typing import cast +from ..models.update_severity_data_type import UpdateSeverityDataType, check_update_severity_data_type if TYPE_CHECKING: from ..models.update_severity_data_attributes import UpdateSeverityDataAttributes @@ -32,7 +28,6 @@ class UpdateSeverityData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_severity_data_attributes import UpdateSeverityDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_severity_data_attributes.py b/rootly_sdk/models/update_severity_data_attributes.py index c42da7da..0cba8e42 100644 --- a/rootly_sdk/models/update_severity_data_attributes.py +++ b/rootly_sdk/models/update_severity_data_attributes.py @@ -1,18 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define -from attrs import field as _attrs_field +from ..models.update_severity_data_attributes_severity import ( + UpdateSeverityDataAttributesSeverity, + check_update_severity_data_attributes_severity, +) from ..types import UNSET, Unset -from ..models.update_severity_data_attributes_severity import check_update_severity_data_attributes_severity -from ..models.update_severity_data_attributes_severity import UpdateSeverityDataAttributesSeverity -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_severity_data_attributes_slack_aliases_type_0_item import ( UpdateSeverityDataAttributesSlackAliasesType0Item, @@ -51,12 +49,6 @@ class UpdateSeverityDataAttributes: slack_aliases: list[UpdateSeverityDataAttributesSlackAliasesType0Item] | None | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_severity_data_attributes_slack_channels_type_0_item import ( - UpdateSeverityDataAttributesSlackChannelsType0Item, - ) - from ..models.update_severity_data_attributes_slack_aliases_type_0_item import ( - UpdateSeverityDataAttributesSlackAliasesType0Item, - ) name = self.name 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 9218e845..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateSeverityDataAttributesSlackAliasesType0Item") 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 3e9f702c..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateSeverityDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_sharepoint_page_task_params.py b/rootly_sdk/models/update_sharepoint_page_task_params.py index 98a9bc69..c8af9115 100644 --- a/rootly_sdk/models/update_sharepoint_page_task_params.py +++ b/rootly_sdk/models/update_sharepoint_page_task_params.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_sharepoint_page_task_params_task_type import ( + UpdateSharepointPageTaskParamsTaskType, + check_update_sharepoint_page_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_sharepoint_page_task_params_task_type import check_update_sharepoint_page_task_params_task_type -from ..models.update_sharepoint_page_task_params_task_type import UpdateSharepointPageTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateSharepointPageTaskParams") diff --git a/rootly_sdk/models/update_shortcut_story_task_params.py b/rootly_sdk/models/update_shortcut_story_task_params.py index 7d7b2dfa..9064d34c 100644 --- a/rootly_sdk/models/update_shortcut_story_task_params.py +++ b/rootly_sdk/models/update_shortcut_story_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_shortcut_story_task_params_task_type import ( + UpdateShortcutStoryTaskParamsTaskType, + check_update_shortcut_story_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_shortcut_story_task_params_task_type import check_update_shortcut_story_task_params_task_type -from ..models.update_shortcut_story_task_params_task_type import UpdateShortcutStoryTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_shortcut_story_task_params_archivation import UpdateShortcutStoryTaskParamsArchivation @@ -43,7 +42,6 @@ class UpdateShortcutStoryTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_shortcut_story_task_params_archivation import UpdateShortcutStoryTaskParamsArchivation story_id = self.story_id 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 b1f27426..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateShortcutStoryTaskParamsArchivation") diff --git a/rootly_sdk/models/update_shortcut_task_task_params.py b/rootly_sdk/models/update_shortcut_task_task_params.py index 9be0217b..4d0d99c3 100644 --- a/rootly_sdk/models/update_shortcut_task_task_params.py +++ b/rootly_sdk/models/update_shortcut_task_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_shortcut_task_task_params_task_type import ( + UpdateShortcutTaskTaskParamsTaskType, + check_update_shortcut_task_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_shortcut_task_task_params_task_type import check_update_shortcut_task_task_params_task_type -from ..models.update_shortcut_task_task_params_task_type import UpdateShortcutTaskTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_shortcut_task_task_params_completion import UpdateShortcutTaskTaskParamsCompletion @@ -39,7 +38,6 @@ class UpdateShortcutTaskTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_shortcut_task_task_params_completion import UpdateShortcutTaskTaskParamsCompletion task_id = self.task_id 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 5e0efecd..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateShortcutTaskTaskParamsCompletion") diff --git a/rootly_sdk/models/update_sla.py b/rootly_sdk/models/update_sla.py index 43b647d2..37dabf11 100644 --- a/rootly_sdk/models/update_sla.py +++ b/rootly_sdk/models/update_sla.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_sla_data import UpdateSlaData @@ -28,7 +24,6 @@ class UpdateSla: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_sla_data import UpdateSlaData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_sla_data.py b/rootly_sdk/models/update_sla_data.py index cfff0390..d172f4f3 100644 --- a/rootly_sdk/models/update_sla_data.py +++ b/rootly_sdk/models/update_sla_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_sla_data_type import check_update_sla_data_type -from ..models.update_sla_data_type import UpdateSlaDataType -from typing import cast +from ..models.update_sla_data_type import UpdateSlaDataType, check_update_sla_data_type if TYPE_CHECKING: from ..models.update_sla_data_attributes import UpdateSlaDataAttributes @@ -32,7 +28,6 @@ class UpdateSlaData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_sla_data_attributes import UpdateSlaDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_sla_data_attributes.py b/rootly_sdk/models/update_sla_data_attributes.py index ed2952a8..76ae5a32 100644 --- a/rootly_sdk/models/update_sla_data_attributes.py +++ b/rootly_sdk/models/update_sla_data_attributes.py @@ -1,40 +1,32 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset 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_days import UpdateSlaDataAttributesAssignmentDeadlineDays -from ..models.update_sla_data_attributes_assignment_deadline_parent_status import ( - check_update_sla_data_attributes_assignment_deadline_parent_status, -) 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_days import UpdateSlaDataAttributesCompletionDeadlineDays -from ..models.update_sla_data_attributes_completion_deadline_parent_status import ( - check_update_sla_data_attributes_completion_deadline_parent_status, -) 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 ..models.update_sla_data_attributes_condition_match_type import UpdateSlaDataAttributesConditionMatchType from ..types import UNSET, Unset -from typing import cast -from uuid import UUID if TYPE_CHECKING: from ..models.update_sla_data_attributes_conditions_item import UpdateSlaDataAttributesConditionsItem @@ -97,10 +89,6 @@ class UpdateSlaDataAttributes: notification_configurations: list[UpdateSlaDataAttributesNotificationConfigurationsItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_sla_data_attributes_notification_configurations_item import ( - UpdateSlaDataAttributesNotificationConfigurationsItem, - ) - from ..models.update_sla_data_attributes_conditions_item import UpdateSlaDataAttributesConditionsItem name = self.name diff --git a/rootly_sdk/models/update_sla_data_attributes_conditions_item.py b/rootly_sdk/models/update_sla_data_attributes_conditions_item.py index f9d2f9c0..2b02950b 100644 --- a/rootly_sdk/models/update_sla_data_attributes_conditions_item.py +++ b/rootly_sdk/models/update_sla_data_attributes_conditions_item.py @@ -1,27 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 ..types import UNSET, Unset - -from ..models.update_sla_data_attributes_conditions_item_conditionable_type import ( - check_update_sla_data_attributes_conditions_item_conditionable_type, -) 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 ..models.update_sla_data_attributes_conditions_item_property import UpdateSlaDataAttributesConditionsItemProperty from ..types import UNSET, Unset -from typing import cast -from uuid import UUID - T = TypeVar("T", bound="UpdateSlaDataAttributesConditionsItem") 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 index 379eda25..d4296bf0 100644 --- a/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item.py +++ b/rootly_sdk/models/update_sla_data_attributes_notification_configurations_item.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_sla_data_attributes_notification_configurations_item_offset_type import ( - check_update_sla_data_attributes_notification_configurations_item_offset_type, -) from ..models.update_sla_data_attributes_notification_configurations_item_offset_type import ( UpdateSlaDataAttributesNotificationConfigurationsItemOffsetType, + check_update_sla_data_attributes_notification_configurations_item_offset_type, ) -from typing import cast - T = TypeVar("T", bound="UpdateSlaDataAttributesNotificationConfigurationsItem") 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 7da5ee62..bad81d39 100644 --- a/rootly_sdk/models/update_slack_channel_topic_task_params.py +++ b/rootly_sdk/models/update_slack_channel_topic_task_params.py @@ -1,19 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_slack_channel_topic_task_params_task_type import ( + UpdateSlackChannelTopicTaskParamsTaskType, check_update_slack_channel_topic_task_params_task_type, ) -from ..models.update_slack_channel_topic_task_params_task_type import UpdateSlackChannelTopicTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_slack_channel_topic_task_params_channel import UpdateSlackChannelTopicTaskParamsChannel @@ -37,7 +34,6 @@ class UpdateSlackChannelTopicTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_slack_channel_topic_task_params_channel import UpdateSlackChannelTopicTaskParamsChannel channel = self.channel.to_dict() 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 ae519e5f..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateSlackChannelTopicTaskParamsChannel") diff --git a/rootly_sdk/models/update_status_page.py b/rootly_sdk/models/update_status_page.py index cc7b2003..cd6792b0 100644 --- a/rootly_sdk/models/update_status_page.py +++ b/rootly_sdk/models/update_status_page.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_status_page_data import UpdateStatusPageData @@ -28,7 +24,6 @@ class UpdateStatusPage: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_status_page_data import UpdateStatusPageData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_status_page_data.py b/rootly_sdk/models/update_status_page_data.py index ba5dc7ac..ee8c76f2 100644 --- a/rootly_sdk/models/update_status_page_data.py +++ b/rootly_sdk/models/update_status_page_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_status_page_data_type import check_update_status_page_data_type -from ..models.update_status_page_data_type import UpdateStatusPageDataType -from typing import cast +from ..models.update_status_page_data_type import UpdateStatusPageDataType, check_update_status_page_data_type if TYPE_CHECKING: from ..models.update_status_page_data_attributes import UpdateStatusPageDataAttributes @@ -32,7 +28,6 @@ class UpdateStatusPageData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_status_page_data_attributes import UpdateStatusPageDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_status_page_data_attributes.py b/rootly_sdk/models/update_status_page_data_attributes.py index 267d3b7a..ee451103 100644 --- a/rootly_sdk/models/update_status_page_data_attributes.py +++ b/rootly_sdk/models/update_status_page_data_attributes.py @@ -1,40 +1,27 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_status_page_data_attributes_authentication_method import ( - check_update_status_page_data_attributes_authentication_method, -) from ..models.update_status_page_data_attributes_authentication_method import ( UpdateStatusPageDataAttributesAuthenticationMethod, -) -from ..models.update_status_page_data_attributes_saml_name_identifier_format import ( - check_update_status_page_data_attributes_saml_name_identifier_format, + check_update_status_page_data_attributes_authentication_method, ) from ..models.update_status_page_data_attributes_saml_name_identifier_format import ( UpdateStatusPageDataAttributesSamlNameIdentifierFormat, -) -from ..models.update_status_page_data_attributes_section_order_type_0_item import ( - check_update_status_page_data_attributes_section_order_type_0_item, + check_update_status_page_data_attributes_saml_name_identifier_format, ) from ..models.update_status_page_data_attributes_section_order_type_0_item import ( UpdateStatusPageDataAttributesSectionOrderType0Item, -) -from ..models.update_status_page_data_attributes_show_uptime_last_days import ( - check_update_status_page_data_attributes_show_uptime_last_days, + 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, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateStatusPageDataAttributes") diff --git a/rootly_sdk/models/update_status_page_template.py b/rootly_sdk/models/update_status_page_template.py index 7e1552da..e02434c5 100644 --- a/rootly_sdk/models/update_status_page_template.py +++ b/rootly_sdk/models/update_status_page_template.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_status_page_template_data import UpdateStatusPageTemplateData @@ -28,7 +24,6 @@ class UpdateStatusPageTemplate: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_status_page_template_data import UpdateStatusPageTemplateData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_status_page_template_data.py b/rootly_sdk/models/update_status_page_template_data.py index 781e717a..ac86327b 100644 --- a/rootly_sdk/models/update_status_page_template_data.py +++ b/rootly_sdk/models/update_status_page_template_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_status_page_template_data_type import check_update_status_page_template_data_type -from ..models.update_status_page_template_data_type import UpdateStatusPageTemplateDataType -from typing import cast +from ..models.update_status_page_template_data_type import ( + UpdateStatusPageTemplateDataType, + check_update_status_page_template_data_type, +) if TYPE_CHECKING: from ..models.update_status_page_template_data_attributes import UpdateStatusPageTemplateDataAttributes @@ -32,7 +31,6 @@ class UpdateStatusPageTemplateData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_status_page_template_data_attributes import UpdateStatusPageTemplateDataAttributes type_: str = self.type_ 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 8dddc507..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,26 +1,19 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_status_page_template_data_attributes_kind import ( + UpdateStatusPageTemplateDataAttributesKind, check_update_status_page_template_data_attributes_kind, ) -from ..models.update_status_page_template_data_attributes_kind import UpdateStatusPageTemplateDataAttributesKind -from ..models.update_status_page_template_data_attributes_update_status import ( - check_update_status_page_template_data_attributes_update_status, -) from ..models.update_status_page_template_data_attributes_update_status import ( UpdateStatusPageTemplateDataAttributesUpdateStatus, + check_update_status_page_template_data_attributes_update_status, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateStatusPageTemplateDataAttributes") diff --git a/rootly_sdk/models/update_status_task_params.py b/rootly_sdk/models/update_status_task_params.py index 2ae7471a..d623cf43 100644 --- a/rootly_sdk/models/update_status_task_params.py +++ b/rootly_sdk/models/update_status_task_params.py @@ -1,21 +1,21 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_status_task_params_status import ( + UpdateStatusTaskParamsStatus, + check_update_status_task_params_status, +) +from ..models.update_status_task_params_task_type import ( + UpdateStatusTaskParamsTaskType, + check_update_status_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_status_task_params_status import check_update_status_task_params_status -from ..models.update_status_task_params_status import UpdateStatusTaskParamsStatus -from ..models.update_status_task_params_task_type import check_update_status_task_params_task_type -from ..models.update_status_task_params_task_type import UpdateStatusTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateStatusTaskParams") diff --git a/rootly_sdk/models/update_sub_status.py b/rootly_sdk/models/update_sub_status.py index a44832e3..e5aa52fa 100644 --- a/rootly_sdk/models/update_sub_status.py +++ b/rootly_sdk/models/update_sub_status.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_sub_status_data import UpdateSubStatusData @@ -28,7 +24,6 @@ class UpdateSubStatus: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_sub_status_data import UpdateSubStatusData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_sub_status_data.py b/rootly_sdk/models/update_sub_status_data.py index 85eb1403..8216557b 100644 --- a/rootly_sdk/models/update_sub_status_data.py +++ b/rootly_sdk/models/update_sub_status_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_sub_status_data_type import check_update_sub_status_data_type -from ..models.update_sub_status_data_type import UpdateSubStatusDataType -from typing import cast +from ..models.update_sub_status_data_type import UpdateSubStatusDataType, check_update_sub_status_data_type if TYPE_CHECKING: from ..models.update_sub_status_data_attributes import UpdateSubStatusDataAttributes @@ -32,7 +28,6 @@ class UpdateSubStatusData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_sub_status_data_attributes import UpdateSubStatusDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_sub_status_data_attributes.py b/rootly_sdk/models/update_sub_status_data_attributes.py index 3eb37d81..06db078d 100644 --- a/rootly_sdk/models/update_sub_status_data_attributes.py +++ b/rootly_sdk/models/update_sub_status_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateSubStatusDataAttributes") diff --git a/rootly_sdk/models/update_team.py b/rootly_sdk/models/update_team.py index 6d640cfe..77cd58e9 100644 --- a/rootly_sdk/models/update_team.py +++ b/rootly_sdk/models/update_team.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_team_data import UpdateTeamData @@ -28,7 +24,6 @@ class UpdateTeam: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_team_data import UpdateTeamData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_team_data.py b/rootly_sdk/models/update_team_data.py index 0335a73b..52c08654 100644 --- a/rootly_sdk/models/update_team_data.py +++ b/rootly_sdk/models/update_team_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_team_data_type import check_update_team_data_type -from ..models.update_team_data_type import UpdateTeamDataType -from typing import cast +from ..models.update_team_data_type import UpdateTeamDataType, check_update_team_data_type if TYPE_CHECKING: from ..models.update_team_data_attributes import UpdateTeamDataAttributes @@ -32,7 +28,6 @@ class UpdateTeamData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_team_data_attributes import UpdateTeamDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_team_data_attributes.py b/rootly_sdk/models/update_team_data_attributes.py index ca5a21f5..46c7c643 100644 --- a/rootly_sdk/models/update_team_data_attributes.py +++ b/rootly_sdk/models/update_team_data_attributes.py @@ -1,19 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 from ..models.update_team_data_attributes_auto_add_members_scope import ( + UpdateTeamDataAttributesAutoAddMembersScope, check_update_team_data_attributes_auto_add_members_scope, ) -from ..models.update_team_data_attributes_auto_add_members_scope import UpdateTeamDataAttributesAutoAddMembersScope from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_team_data_attributes_alert_broadcast_channel_type_0 import ( @@ -104,19 +100,12 @@ class UpdateTeamDataAttributes: properties: list[UpdateTeamDataAttributesPropertiesItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_team_data_attributes_slack_aliases_type_0_item import ( - UpdateTeamDataAttributesSlackAliasesType0Item, - ) - from ..models.update_team_data_attributes_properties_item import UpdateTeamDataAttributesPropertiesItem from ..models.update_team_data_attributes_alert_broadcast_channel_type_0 import ( UpdateTeamDataAttributesAlertBroadcastChannelType0, ) from ..models.update_team_data_attributes_incident_broadcast_channel_type_0 import ( UpdateTeamDataAttributesIncidentBroadcastChannelType0, ) - from ..models.update_team_data_attributes_slack_channels_type_0_item import ( - UpdateTeamDataAttributesSlackChannelsType0Item, - ) name = self.name 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 000b0985..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateTeamDataAttributesAlertBroadcastChannelType0") 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 fda329f2..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateTeamDataAttributesIncidentBroadcastChannelType0") diff --git a/rootly_sdk/models/update_team_data_attributes_properties_item.py b/rootly_sdk/models/update_team_data_attributes_properties_item.py index 41d7d9a2..4a14f3eb 100644 --- a/rootly_sdk/models/update_team_data_attributes_properties_item.py +++ b/rootly_sdk/models/update_team_data_attributes_properties_item.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateTeamDataAttributesPropertiesItem") 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 fc5f1d03..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateTeamDataAttributesSlackAliasesType0Item") 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 1deea951..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,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateTeamDataAttributesSlackChannelsType0Item") diff --git a/rootly_sdk/models/update_trello_card_task_params.py b/rootly_sdk/models/update_trello_card_task_params.py index 645f89a2..ebb78f45 100644 --- a/rootly_sdk/models/update_trello_card_task_params.py +++ b/rootly_sdk/models/update_trello_card_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_trello_card_task_params_task_type import ( + UpdateTrelloCardTaskParamsTaskType, + check_update_trello_card_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_trello_card_task_params_task_type import check_update_trello_card_task_params_task_type -from ..models.update_trello_card_task_params_task_type import UpdateTrelloCardTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_trello_card_task_params_archivation import UpdateTrelloCardTaskParamsArchivation from ..models.update_trello_card_task_params_board import UpdateTrelloCardTaskParamsBoard @@ -50,10 +49,6 @@ class UpdateTrelloCardTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_trello_card_task_params_board import UpdateTrelloCardTaskParamsBoard - from ..models.update_trello_card_task_params_archivation import UpdateTrelloCardTaskParamsArchivation - from ..models.update_trello_card_task_params_labels_item import UpdateTrelloCardTaskParamsLabelsItem - from ..models.update_trello_card_task_params_list import UpdateTrelloCardTaskParamsList card_id = self.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 9cf8ac22..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateTrelloCardTaskParamsArchivation") 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 668b57b6..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateTrelloCardTaskParamsBoard") 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 3973345d..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateTrelloCardTaskParamsLabelsItem") 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 d7a3fb70..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateTrelloCardTaskParamsList") diff --git a/rootly_sdk/models/update_user.py b/rootly_sdk/models/update_user.py index a8b8a7a3..bfd07c3b 100644 --- a/rootly_sdk/models/update_user.py +++ b/rootly_sdk/models/update_user.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_user_data import UpdateUserData @@ -28,7 +24,6 @@ class UpdateUser: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_user_data import UpdateUserData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_user_data.py b/rootly_sdk/models/update_user_data.py index 5f60ef2e..a24938b0 100644 --- a/rootly_sdk/models/update_user_data.py +++ b/rootly_sdk/models/update_user_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_user_data_type import check_update_user_data_type -from ..models.update_user_data_type import UpdateUserDataType -from typing import cast +from ..models.update_user_data_type import UpdateUserDataType, check_update_user_data_type if TYPE_CHECKING: from ..models.update_user_data_attributes import UpdateUserDataAttributes @@ -32,7 +28,6 @@ class UpdateUserData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_user_data_attributes import UpdateUserDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_user_data_attributes.py b/rootly_sdk/models/update_user_data_attributes.py index dcd9171c..1ef584d0 100644 --- a/rootly_sdk/models/update_user_data_attributes.py +++ b/rootly_sdk/models/update_user_data_attributes.py @@ -1,17 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateUserDataAttributes") diff --git a/rootly_sdk/models/update_user_email_address.py b/rootly_sdk/models/update_user_email_address.py index d3abba4c..68b98497 100644 --- a/rootly_sdk/models/update_user_email_address.py +++ b/rootly_sdk/models/update_user_email_address.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_user_email_address_data import UpdateUserEmailAddressData @@ -28,7 +24,6 @@ class UpdateUserEmailAddress: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_user_email_address_data import UpdateUserEmailAddressData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_user_email_address_data.py b/rootly_sdk/models/update_user_email_address_data.py index 177c5a47..d94f4368 100644 --- a/rootly_sdk/models/update_user_email_address_data.py +++ b/rootly_sdk/models/update_user_email_address_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_user_email_address_data_type import check_update_user_email_address_data_type -from ..models.update_user_email_address_data_type import UpdateUserEmailAddressDataType -from typing import cast +from ..models.update_user_email_address_data_type import ( + UpdateUserEmailAddressDataType, + check_update_user_email_address_data_type, +) if TYPE_CHECKING: from ..models.update_user_email_address_data_attributes import UpdateUserEmailAddressDataAttributes @@ -32,7 +31,6 @@ class UpdateUserEmailAddressData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_user_email_address_data_attributes import UpdateUserEmailAddressDataAttributes type_: str = self.type_ 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 f3af0aa3..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateUserEmailAddressDataAttributes") diff --git a/rootly_sdk/models/update_user_notification_rule.py b/rootly_sdk/models/update_user_notification_rule.py index b1a5fd82..8550ba96 100644 --- a/rootly_sdk/models/update_user_notification_rule.py +++ b/rootly_sdk/models/update_user_notification_rule.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_user_notification_rule_data import UpdateUserNotificationRuleData @@ -28,7 +24,6 @@ class UpdateUserNotificationRule: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_user_notification_rule_data import UpdateUserNotificationRuleData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_user_notification_rule_data.py b/rootly_sdk/models/update_user_notification_rule_data.py index eae9cf8e..0c45fc09 100644 --- a/rootly_sdk/models/update_user_notification_rule_data.py +++ b/rootly_sdk/models/update_user_notification_rule_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_user_notification_rule_data_type import check_update_user_notification_rule_data_type -from ..models.update_user_notification_rule_data_type import UpdateUserNotificationRuleDataType -from typing import cast +from ..models.update_user_notification_rule_data_type import ( + UpdateUserNotificationRuleDataType, + check_update_user_notification_rule_data_type, +) if TYPE_CHECKING: from ..models.update_user_notification_rule_data_attributes import UpdateUserNotificationRuleDataAttributes @@ -32,7 +31,6 @@ class UpdateUserNotificationRuleData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_user_notification_rule_data_attributes import UpdateUserNotificationRuleDataAttributes type_: str = self.type_ 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 e6e2a91b..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,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.update_user_notification_rule_data_attributes_enabled_contact_types_item import ( - check_update_user_notification_rule_data_attributes_enabled_contact_types_item, -) from ..models.update_user_notification_rule_data_attributes_enabled_contact_types_item import ( UpdateUserNotificationRuleDataAttributesEnabledContactTypesItem, + check_update_user_notification_rule_data_attributes_enabled_contact_types_item, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateUserNotificationRuleDataAttributes") diff --git a/rootly_sdk/models/update_user_phone_number.py b/rootly_sdk/models/update_user_phone_number.py index ea8ba078..b6e60d61 100644 --- a/rootly_sdk/models/update_user_phone_number.py +++ b/rootly_sdk/models/update_user_phone_number.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_user_phone_number_data import UpdateUserPhoneNumberData @@ -28,7 +24,6 @@ class UpdateUserPhoneNumber: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_user_phone_number_data import UpdateUserPhoneNumberData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_user_phone_number_data.py b/rootly_sdk/models/update_user_phone_number_data.py index 8d03b313..10339845 100644 --- a/rootly_sdk/models/update_user_phone_number_data.py +++ b/rootly_sdk/models/update_user_phone_number_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_user_phone_number_data_type import check_update_user_phone_number_data_type -from ..models.update_user_phone_number_data_type import UpdateUserPhoneNumberDataType -from typing import cast +from ..models.update_user_phone_number_data_type import ( + UpdateUserPhoneNumberDataType, + check_update_user_phone_number_data_type, +) if TYPE_CHECKING: from ..models.update_user_phone_number_data_attributes import UpdateUserPhoneNumberDataAttributes @@ -32,7 +31,6 @@ class UpdateUserPhoneNumberData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_user_phone_number_data_attributes import UpdateUserPhoneNumberDataAttributes type_: str = self.type_ 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 2d909bc6..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,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define -from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateUserPhoneNumberDataAttributes") 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 e0ee1944..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,22 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field -from ..types import UNSET, Unset - -from ..models.update_victor_ops_incident_task_params_status import check_update_victor_ops_incident_task_params_status -from ..models.update_victor_ops_incident_task_params_status import UpdateVictorOpsIncidentTaskParamsStatus +from ..models.update_victor_ops_incident_task_params_status import ( + UpdateVictorOpsIncidentTaskParamsStatus, + check_update_victor_ops_incident_task_params_status, +) from ..models.update_victor_ops_incident_task_params_task_type import ( + UpdateVictorOpsIncidentTaskParamsTaskType, check_update_victor_ops_incident_task_params_task_type, ) -from ..models.update_victor_ops_incident_task_params_task_type import UpdateVictorOpsIncidentTaskParamsTaskType from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateVictorOpsIncidentTaskParams") diff --git a/rootly_sdk/models/update_webhooks_endpoint.py b/rootly_sdk/models/update_webhooks_endpoint.py index 61f7c804..a6e4f061 100644 --- a/rootly_sdk/models/update_webhooks_endpoint.py +++ b/rootly_sdk/models/update_webhooks_endpoint.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_webhooks_endpoint_data import UpdateWebhooksEndpointData @@ -28,7 +24,6 @@ class UpdateWebhooksEndpoint: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_webhooks_endpoint_data import UpdateWebhooksEndpointData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_webhooks_endpoint_data.py b/rootly_sdk/models/update_webhooks_endpoint_data.py index 4d149ee7..c206aef7 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_webhooks_endpoint_data_type import check_update_webhooks_endpoint_data_type -from ..models.update_webhooks_endpoint_data_type import UpdateWebhooksEndpointDataType -from typing import cast +from ..models.update_webhooks_endpoint_data_type import ( + UpdateWebhooksEndpointDataType, + check_update_webhooks_endpoint_data_type, +) if TYPE_CHECKING: from ..models.update_webhooks_endpoint_data_attributes import UpdateWebhooksEndpointDataAttributes @@ -32,7 +31,6 @@ class UpdateWebhooksEndpointData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_webhooks_endpoint_data_attributes import UpdateWebhooksEndpointDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py b/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py index af8a1f5b..b69e2934 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data_attributes.py @@ -1,21 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_webhooks_endpoint_data_attributes_event_types_item import ( - check_update_webhooks_endpoint_data_attributes_event_types_item, -) from ..models.update_webhooks_endpoint_data_attributes_event_types_item import ( UpdateWebhooksEndpointDataAttributesEventTypesItem, + check_update_webhooks_endpoint_data_attributes_event_types_item, ) from ..types import UNSET, Unset -from typing import cast if TYPE_CHECKING: from ..models.update_webhooks_endpoint_data_attributes_custom_headers_item import ( @@ -43,9 +37,6 @@ class UpdateWebhooksEndpointDataAttributes: custom_headers: list[UpdateWebhooksEndpointDataAttributesCustomHeadersItem] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.update_webhooks_endpoint_data_attributes_custom_headers_item import ( - UpdateWebhooksEndpointDataAttributesCustomHeadersItem, - ) name = self.name diff --git a/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py index f1304a84..e08d3e1f 100644 --- a/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py +++ b/rootly_sdk/models/update_webhooks_endpoint_data_attributes_custom_headers_item.py @@ -1,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UpdateWebhooksEndpointDataAttributesCustomHeadersItem") diff --git a/rootly_sdk/models/update_workflow.py b/rootly_sdk/models/update_workflow.py index 711e32fe..5364c155 100644 --- a/rootly_sdk/models/update_workflow.py +++ b/rootly_sdk/models/update_workflow.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_workflow_data import UpdateWorkflowData @@ -28,7 +24,6 @@ class UpdateWorkflow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_data import UpdateWorkflowData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition.py index 698d34c8..1433a89b 100644 --- a/rootly_sdk/models/update_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_workflow_action_item_form_field_condition_data import ( UpdateWorkflowActionItemFormFieldConditionData, @@ -30,9 +26,6 @@ class UpdateWorkflowActionItemFormFieldCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_action_item_form_field_condition_data import ( - UpdateWorkflowActionItemFormFieldConditionData, - ) data = self.data.to_dict() diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py index 2f9a609d..72950187 100644 --- a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_workflow_action_item_form_field_condition_data_type import ( - check_update_workflow_action_item_form_field_condition_data_type, -) from ..models.update_workflow_action_item_form_field_condition_data_type import ( UpdateWorkflowActionItemFormFieldConditionDataType, + check_update_workflow_action_item_form_field_condition_data_type, ) -from typing import cast if TYPE_CHECKING: from ..models.update_workflow_action_item_form_field_condition_data_attributes import ( @@ -38,9 +33,6 @@ class UpdateWorkflowActionItemFormFieldConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_action_item_form_field_condition_data_attributes import ( - UpdateWorkflowActionItemFormFieldConditionDataAttributes, - ) type_: str = self.type_ diff --git a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py index bfcd1d8d..c44ebd68 100644 --- a/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py +++ b/rootly_sdk/models/update_workflow_action_item_form_field_condition_data_attributes.py @@ -1,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.update_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( - check_update_workflow_action_item_form_field_condition_data_attributes_action_item_condition, -) from ..models.update_workflow_action_item_form_field_condition_data_attributes_action_item_condition import ( UpdateWorkflowActionItemFormFieldConditionDataAttributesActionItemCondition, + check_update_workflow_action_item_form_field_condition_data_attributes_action_item_condition, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateWorkflowActionItemFormFieldConditionDataAttributes") diff --git a/rootly_sdk/models/update_workflow_custom_field_selection.py b/rootly_sdk/models/update_workflow_custom_field_selection.py index 93001b45..638a1ec9 100644 --- a/rootly_sdk/models/update_workflow_custom_field_selection.py +++ b/rootly_sdk/models/update_workflow_custom_field_selection.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_workflow_custom_field_selection_data import UpdateWorkflowCustomFieldSelectionData @@ -28,7 +24,6 @@ class UpdateWorkflowCustomFieldSelection: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_custom_field_selection_data import UpdateWorkflowCustomFieldSelectionData data = self.data.to_dict() 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 e69a4222..e1ba2a31 100644 --- a/rootly_sdk/models/update_workflow_custom_field_selection_data.py +++ b/rootly_sdk/models/update_workflow_custom_field_selection_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.update_workflow_custom_field_selection_data_type import ( + UpdateWorkflowCustomFieldSelectionDataType, check_update_workflow_custom_field_selection_data_type, ) -from ..models.update_workflow_custom_field_selection_data_type import UpdateWorkflowCustomFieldSelectionDataType -from typing import cast if TYPE_CHECKING: from ..models.update_workflow_custom_field_selection_data_attributes import ( @@ -36,9 +33,6 @@ class UpdateWorkflowCustomFieldSelectionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_custom_field_selection_data_attributes import ( - UpdateWorkflowCustomFieldSelectionDataAttributes, - ) type_: str = self.type_ 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 caa873f4..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,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.update_workflow_custom_field_selection_data_attributes_incident_condition import ( - check_update_workflow_custom_field_selection_data_attributes_incident_condition, -) from ..models.update_workflow_custom_field_selection_data_attributes_incident_condition import ( UpdateWorkflowCustomFieldSelectionDataAttributesIncidentCondition, + check_update_workflow_custom_field_selection_data_attributes_incident_condition, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateWorkflowCustomFieldSelectionDataAttributes") diff --git a/rootly_sdk/models/update_workflow_data.py b/rootly_sdk/models/update_workflow_data.py index 3a549b27..2da420ed 100644 --- a/rootly_sdk/models/update_workflow_data.py +++ b/rootly_sdk/models/update_workflow_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_workflow_data_type import check_update_workflow_data_type -from ..models.update_workflow_data_type import UpdateWorkflowDataType -from typing import cast +from ..models.update_workflow_data_type import UpdateWorkflowDataType, check_update_workflow_data_type if TYPE_CHECKING: from ..models.update_workflow_data_attributes import UpdateWorkflowDataAttributes @@ -32,7 +28,6 @@ class UpdateWorkflowData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_data_attributes import UpdateWorkflowDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_workflow_data_attributes.py b/rootly_sdk/models/update_workflow_data_attributes.py index b21fdad1..be178cbf 100644 --- a/rootly_sdk/models/update_workflow_data_attributes.py +++ b/rootly_sdk/models/update_workflow_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.action_item_trigger_params import ActionItemTriggerParams from ..models.alert_trigger_params import AlertTriggerParams @@ -88,10 +84,9 @@ class UpdateWorkflowDataAttributes: sub_status_ids: list[str] | Unset = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.simple_trigger_params import SimpleTriggerParams - from ..models.incident_trigger_params import IncidentTriggerParams - from ..models.alert_trigger_params import AlertTriggerParams from ..models.action_item_trigger_params import ActionItemTriggerParams + from ..models.alert_trigger_params import AlertTriggerParams + from ..models.incident_trigger_params import IncidentTriggerParams from ..models.pulse_trigger_params import PulseTriggerParams name = self.name diff --git a/rootly_sdk/models/update_workflow_form_field_condition.py b/rootly_sdk/models/update_workflow_form_field_condition.py index 0e397e03..93eb741d 100644 --- a/rootly_sdk/models/update_workflow_form_field_condition.py +++ b/rootly_sdk/models/update_workflow_form_field_condition.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_workflow_form_field_condition_data import UpdateWorkflowFormFieldConditionData @@ -28,7 +24,6 @@ class UpdateWorkflowFormFieldCondition: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_form_field_condition_data import UpdateWorkflowFormFieldConditionData data = self.data.to_dict() 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 031618a9..e83fbb57 100644 --- a/rootly_sdk/models/update_workflow_form_field_condition_data.py +++ b/rootly_sdk/models/update_workflow_form_field_condition_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_workflow_form_field_condition_data_type import check_update_workflow_form_field_condition_data_type -from ..models.update_workflow_form_field_condition_data_type import UpdateWorkflowFormFieldConditionDataType -from typing import cast +from ..models.update_workflow_form_field_condition_data_type import ( + UpdateWorkflowFormFieldConditionDataType, + check_update_workflow_form_field_condition_data_type, +) if TYPE_CHECKING: from ..models.update_workflow_form_field_condition_data_attributes import ( @@ -34,9 +33,6 @@ class UpdateWorkflowFormFieldConditionData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_form_field_condition_data_attributes import ( - UpdateWorkflowFormFieldConditionDataAttributes, - ) type_: str = self.type_ 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 97d4be88..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,22 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..models.update_workflow_form_field_condition_data_attributes_incident_condition import ( - check_update_workflow_form_field_condition_data_attributes_incident_condition, -) from ..models.update_workflow_form_field_condition_data_attributes_incident_condition import ( UpdateWorkflowFormFieldConditionDataAttributesIncidentCondition, + check_update_workflow_form_field_condition_data_attributes_incident_condition, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UpdateWorkflowFormFieldConditionDataAttributes") diff --git a/rootly_sdk/models/update_workflow_group.py b/rootly_sdk/models/update_workflow_group.py index d586e78e..0f3e5d4f 100644 --- a/rootly_sdk/models/update_workflow_group.py +++ b/rootly_sdk/models/update_workflow_group.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_workflow_group_data import UpdateWorkflowGroupData @@ -28,7 +24,6 @@ class UpdateWorkflowGroup: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_group_data import UpdateWorkflowGroupData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_workflow_group_data.py b/rootly_sdk/models/update_workflow_group_data.py index 1f975baa..e5eda1a8 100644 --- a/rootly_sdk/models/update_workflow_group_data.py +++ b/rootly_sdk/models/update_workflow_group_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_workflow_group_data_type import check_update_workflow_group_data_type -from ..models.update_workflow_group_data_type import UpdateWorkflowGroupDataType -from typing import cast +from ..models.update_workflow_group_data_type import UpdateWorkflowGroupDataType, check_update_workflow_group_data_type if TYPE_CHECKING: from ..models.update_workflow_group_data_attributes import UpdateWorkflowGroupDataAttributes @@ -32,7 +28,6 @@ class UpdateWorkflowGroupData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_group_data_attributes import UpdateWorkflowGroupDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_workflow_group_data_attributes.py b/rootly_sdk/models/update_workflow_group_data_attributes.py index 9b9de082..b61fd078 100644 --- a/rootly_sdk/models/update_workflow_group_data_attributes.py +++ b/rootly_sdk/models/update_workflow_group_data_attributes.py @@ -1,19 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_workflow_group_data_attributes_kind import ( + UpdateWorkflowGroupDataAttributesKind, + check_update_workflow_group_data_attributes_kind, +) from ..types import UNSET, Unset -from ..models.update_workflow_group_data_attributes_kind import check_update_workflow_group_data_attributes_kind -from ..models.update_workflow_group_data_attributes_kind import UpdateWorkflowGroupDataAttributesKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UpdateWorkflowGroupDataAttributes") diff --git a/rootly_sdk/models/update_workflow_task.py b/rootly_sdk/models/update_workflow_task.py index 9cebb024..93fe2216 100644 --- a/rootly_sdk/models/update_workflow_task.py +++ b/rootly_sdk/models/update_workflow_task.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.update_workflow_task_data import UpdateWorkflowTaskData @@ -28,7 +24,6 @@ class UpdateWorkflowTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_task_data import UpdateWorkflowTaskData data = self.data.to_dict() diff --git a/rootly_sdk/models/update_workflow_task_data.py b/rootly_sdk/models/update_workflow_task_data.py index a0fb52fc..d2f7760b 100644 --- a/rootly_sdk/models/update_workflow_task_data.py +++ b/rootly_sdk/models/update_workflow_task_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.update_workflow_task_data_type import check_update_workflow_task_data_type -from ..models.update_workflow_task_data_type import UpdateWorkflowTaskDataType -from typing import cast +from ..models.update_workflow_task_data_type import UpdateWorkflowTaskDataType, check_update_workflow_task_data_type if TYPE_CHECKING: from ..models.update_workflow_task_data_attributes import UpdateWorkflowTaskDataAttributes @@ -32,7 +28,6 @@ class UpdateWorkflowTaskData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_workflow_task_data_attributes import UpdateWorkflowTaskDataAttributes type_: str = self.type_ diff --git a/rootly_sdk/models/update_workflow_task_data_attributes.py b/rootly_sdk/models/update_workflow_task_data_attributes.py index d3aafdcb..c7a0cbe9 100644 --- a/rootly_sdk/models/update_workflow_task_data_attributes.py +++ b/rootly_sdk/models/update_workflow_task_data_attributes.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams @@ -425,179 +421,178 @@ class UpdateWorkflowTaskDataAttributes: ) = UNSET def to_dict(self) -> dict[str, Any]: - from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 - from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams + from ..models.add_action_item_task_params import AddActionItemTaskParams + from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 - from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams - from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams - from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams - from ..models.create_notion_page_task_params import CreateNotionPageTaskParams - from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 - from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( - InviteToMicrosoftTeamsChannelRootlyTaskParams, - ) - from ..models.create_confluence_page_task_params import CreateConfluencePageTaskParams - from ..models.send_sms_task_params import SendSmsTaskParams - from ..models.call_people_task_params import CallPeopleTaskParams - from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams - from ..models.create_incident_task_params import CreateIncidentTaskParams - from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams - from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 - from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 - from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 - from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams - from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams - from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams + from ..models.add_role_task_params import AddRoleTaskParams from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 - from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams - from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams - from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams - from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams - from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams - from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams - from ..models.get_pulses_task_params import GetPulsesTaskParams - from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams - from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams - from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams - from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams - from ..models.publish_incident_task_params import PublishIncidentTaskParams - from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams - from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams - from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams - from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 - from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams - from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 + from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams - from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams - from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams - from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams + from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams - from ..models.update_incident_task_params import UpdateIncidentTaskParams - from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams - from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams - from ..models.get_alerts_task_params import GetAlertsTaskParams - from ..models.add_team_task_params import AddTeamTaskParams - from ..models.update_status_task_params import UpdateStatusTaskParams - from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams - from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 - from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 - from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 - from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams - from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams + from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( AttachRetrospectivePdfToJiraIssueTaskParams, ) - from ..models.redis_client_task_params import RedisClientTaskParams - from ..models.add_action_item_task_params import AddActionItemTaskParams - from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams - from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 - from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 + from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams + from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams + from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams + from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams + from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams + from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams + from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams + from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams + from ..models.create_coda_page_task_params import CreateCodaPageTaskParams + from ..models.create_confluence_page_task_params import CreateConfluencePageTaskParams + from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams + from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams + from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams + from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams + from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams + from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams + from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams + from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams - from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 - from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams - from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 - from ..models.http_client_task_params import HttpClientTaskParams - from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams from ..models.create_google_meeting_task_params import CreateGoogleMeetingTaskParams + from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams + from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams - from ..models.update_asana_task_task_params import UpdateAsanaTaskTaskParams - from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams + 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 + from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams + from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams + from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams + from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams + from ..models.create_motion_task_task_params import CreateMotionTaskTaskParams + from ..models.create_notion_page_task_params import CreateNotionPageTaskParams + from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams + from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams + from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams + from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams + from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams + from ..models.create_quip_page_task_params import CreateQuipPageTaskParams + from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams + from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 + from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams + from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams + from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams + from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams + from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams + from ..models.create_webex_meeting_task_params import CreateWebexMeetingTaskParams + from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams + from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams + from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams + from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 + from ..models.get_pulses_task_params import GetPulsesTaskParams + from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) + from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams + from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( InviteToSlackChannelPagerdutyTaskParamsType0, ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) + from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 - from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams + 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 from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( PageVictorOpsOnCallRespondersTaskParamsType0, ) - from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams - from ..models.create_coda_page_task_params import CreateCodaPageTaskParams from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( PageVictorOpsOnCallRespondersTaskParamsType1, ) - from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams - from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams - from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams - from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams - from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams - from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams - from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams - from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 - from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams - from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams - from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams - from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams - from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams - from ..models.create_motion_task_task_params import CreateMotionTaskTaskParams - from ..models.update_action_item_task_params import UpdateActionItemTaskParams from ..models.print_task_params import PrintTaskParams - from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 - from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams - from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams - from ..models.create_quip_page_task_params import CreateQuipPageTaskParams - from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams - from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams - from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams - from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams - from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams - from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams - from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( - InviteToSlackChannelPagerdutyTaskParamsType1, - ) - from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams - from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams - from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams - from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams - from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams - from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams - from ..models.create_webex_meeting_task_params import CreateWebexMeetingTaskParams - from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams - from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams - from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams - from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams - from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams - from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams + from ..models.publish_incident_task_params import PublishIncidentTaskParams + from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams - from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams - from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams - from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams - from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams - from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams - from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams - from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 - from ..models.add_role_task_params import AddRoleTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams - from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams - from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams - from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams + from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams + from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams + from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams - from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams - from ..models.snapshot_looker_look_task_params import SnapshotLookerLookTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 + from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 - from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams - from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams - from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams - from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams - from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams - from ..models.update_clickup_task_task_params import UpdateClickupTaskTaskParams - from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams - from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 - from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 + from ..models.send_sms_task_params import SendSmsTaskParams + from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams + from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams + from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams + from ..models.snapshot_looker_look_task_params import SnapshotLookerLookTaskParams + from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams + from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams + from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams + from ..models.update_action_item_task_params import UpdateActionItemTaskParams from ..models.update_airtable_table_record_task_params import UpdateAirtableTableRecordTaskParams - from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 - from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams - from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams - from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 - from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams + from ..models.update_asana_task_task_params import UpdateAsanaTaskTaskParams + from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams + from ..models.update_clickup_task_task_params import UpdateClickupTaskTaskParams + from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams + from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams + from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams + from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams + from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams - from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams + from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams + from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams + from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams + from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams + from ..models.update_incident_task_params import UpdateIncidentTaskParams + from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams + from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams + from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams + from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams + from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams from ..models.update_opsgenie_incident_task_params import UpdateOpsgenieIncidentTaskParams - from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams - from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams - from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams - from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams - from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams + from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams + from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams + from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams + from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams + from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams + from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams + from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams + from ..models.update_status_task_params import UpdateStatusTaskParams + from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams + from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams + from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams name = self.name diff --git a/rootly_sdk/models/update_zendesk_ticket_task_params.py b/rootly_sdk/models/update_zendesk_ticket_task_params.py index afc27b6e..1791e774 100644 --- a/rootly_sdk/models/update_zendesk_ticket_task_params.py +++ b/rootly_sdk/models/update_zendesk_ticket_task_params.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.update_zendesk_ticket_task_params_task_type import ( + UpdateZendeskTicketTaskParamsTaskType, + check_update_zendesk_ticket_task_params_task_type, +) from ..types import UNSET, Unset -from ..models.update_zendesk_ticket_task_params_task_type import check_update_zendesk_ticket_task_params_task_type -from ..models.update_zendesk_ticket_task_params_task_type import UpdateZendeskTicketTaskParamsTaskType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.update_zendesk_ticket_task_params_completion import UpdateZendeskTicketTaskParamsCompletion from ..models.update_zendesk_ticket_task_params_priority import UpdateZendeskTicketTaskParamsPriority @@ -48,8 +47,6 @@ class UpdateZendeskTicketTaskParams: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.update_zendesk_ticket_task_params_priority import UpdateZendeskTicketTaskParamsPriority - from ..models.update_zendesk_ticket_task_params_completion import UpdateZendeskTicketTaskParamsCompletion ticket_id = self.ticket_id 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 8ae1a50d..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateZendeskTicketTaskParamsCompletion") 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 769735f2..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,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UpdateZendeskTicketTaskParamsPriority") diff --git a/rootly_sdk/models/uptime_chart_response.py b/rootly_sdk/models/uptime_chart_response.py index 74d844be..0662c7d6 100644 --- a/rootly_sdk/models/uptime_chart_response.py +++ b/rootly_sdk/models/uptime_chart_response.py @@ -1,15 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - if TYPE_CHECKING: from ..models.uptime_chart_response_data import UptimeChartResponseData @@ -28,7 +24,6 @@ class UptimeChartResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.uptime_chart_response_data import UptimeChartResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/uptime_chart_response_data.py b/rootly_sdk/models/uptime_chart_response_data.py index c11272b3..72ef2ae1 100644 --- a/rootly_sdk/models/uptime_chart_response_data.py +++ b/rootly_sdk/models/uptime_chart_response_data.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="UptimeChartResponseData") diff --git a/rootly_sdk/models/user.py b/rootly_sdk/models/user.py index 06793cb0..3604e323 100644 --- a/rootly_sdk/models/user.py +++ b/rootly_sdk/models/user.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="User") diff --git a/rootly_sdk/models/user_email_address.py b/rootly_sdk/models/user_email_address.py index 9224f225..2f901d3e 100644 --- a/rootly_sdk/models/user_email_address.py +++ b/rootly_sdk/models/user_email_address.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field from ..types import UNSET, Unset -from ..types import UNSET, Unset - - T = TypeVar("T", bound="UserEmailAddress") diff --git a/rootly_sdk/models/user_email_address_list.py b/rootly_sdk/models/user_email_address_list.py index aa69f694..c66109e3 100644 --- a/rootly_sdk/models/user_email_address_list.py +++ b/rootly_sdk/models/user_email_address_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class UserEmailAddressList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.user_email_address_list_data_item import UserEmailAddressListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 bcd72515..2e958798 100644 --- a/rootly_sdk/models/user_email_address_list_data_item.py +++ b/rootly_sdk/models/user_email_address_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.user_email_address_list_data_item_type import check_user_email_address_list_data_item_type -from ..models.user_email_address_list_data_item_type import UserEmailAddressListDataItemType -from typing import cast +from ..models.user_email_address_list_data_item_type import ( + UserEmailAddressListDataItemType, + check_user_email_address_list_data_item_type, +) if TYPE_CHECKING: from ..models.user_email_address import UserEmailAddress @@ -34,7 +33,6 @@ class UserEmailAddressListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_email_address import UserEmailAddress id = self.id diff --git a/rootly_sdk/models/user_email_address_response.py b/rootly_sdk/models/user_email_address_response.py index 152600d9..78fed502 100644 --- a/rootly_sdk/models/user_email_address_response.py +++ b/rootly_sdk/models/user_email_address_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_email_address_response_data import UserEmailAddressResponseData @@ -32,8 +29,6 @@ class UserEmailAddressResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_email_address_response_data import UserEmailAddressResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/user_email_address_response_data.py b/rootly_sdk/models/user_email_address_response_data.py index 3a1ccc6a..8d79cd83 100644 --- a/rootly_sdk/models/user_email_address_response_data.py +++ b/rootly_sdk/models/user_email_address_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.user_email_address_response_data_type import check_user_email_address_response_data_type -from ..models.user_email_address_response_data_type import UserEmailAddressResponseDataType -from typing import cast +from ..models.user_email_address_response_data_type import ( + UserEmailAddressResponseDataType, + check_user_email_address_response_data_type, +) if TYPE_CHECKING: from ..models.user_email_address import UserEmailAddress @@ -34,7 +33,6 @@ class UserEmailAddressResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_email_address import UserEmailAddress id = self.id diff --git a/rootly_sdk/models/user_flat_response.py b/rootly_sdk/models/user_flat_response.py index 60527b84..ed5c61d3 100644 --- a/rootly_sdk/models/user_flat_response.py +++ b/rootly_sdk/models/user_flat_response.py @@ -1,17 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="UserFlatResponse") diff --git a/rootly_sdk/models/user_list.py b/rootly_sdk/models/user_list.py index 37a8d303..45656060 100644 --- a/rootly_sdk/models/user_list.py +++ b/rootly_sdk/models/user_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class UserList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_list_data_item import UserListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/user_list_data_item.py b/rootly_sdk/models/user_list_data_item.py index ec5e9c12..96f8c048 100644 --- a/rootly_sdk/models/user_list_data_item.py +++ b/rootly_sdk/models/user_list_data_item.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.user_list_data_item_type import UserListDataItemType, check_user_list_data_item_type from ..types import UNSET, Unset -from ..models.user_list_data_item_type import check_user_list_data_item_type -from ..models.user_list_data_item_type import UserListDataItemType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.user import User from ..models.user_relationships import UserRelationships @@ -38,8 +34,6 @@ class UserListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user import User - from ..models.user_relationships import UserRelationships id = self.id diff --git a/rootly_sdk/models/user_notification_rule.py b/rootly_sdk/models/user_notification_rule.py index d01c29ca..a1ece08a 100644 --- a/rootly_sdk/models/user_notification_rule.py +++ b/rootly_sdk/models/user_notification_rule.py @@ -1,22 +1,20 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.user_notification_rule_enabled_contact_types_item import ( + UserNotificationRuleEnabledContactTypesItem, check_user_notification_rule_enabled_contact_types_item, ) -from ..models.user_notification_rule_enabled_contact_types_item import UserNotificationRuleEnabledContactTypesItem -from ..models.user_notification_rule_notification_type import check_user_notification_rule_notification_type -from ..models.user_notification_rule_notification_type import UserNotificationRuleNotificationType +from ..models.user_notification_rule_notification_type import ( + UserNotificationRuleNotificationType, + check_user_notification_rule_notification_type, +) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="UserNotificationRule") diff --git a/rootly_sdk/models/user_notification_rule_list.py b/rootly_sdk/models/user_notification_rule_list.py index 38de810e..5d45a1b1 100644 --- a/rootly_sdk/models/user_notification_rule_list.py +++ b/rootly_sdk/models/user_notification_rule_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class UserNotificationRuleList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.user_notification_rule_list_data_item import UserNotificationRuleListDataItem data = [] for data_item_data in self.data: 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 de311eda..a31d183a 100644 --- a/rootly_sdk/models/user_notification_rule_list_data_item.py +++ b/rootly_sdk/models/user_notification_rule_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.user_notification_rule_list_data_item_type import check_user_notification_rule_list_data_item_type -from ..models.user_notification_rule_list_data_item_type import UserNotificationRuleListDataItemType -from typing import cast +from ..models.user_notification_rule_list_data_item_type import ( + UserNotificationRuleListDataItemType, + check_user_notification_rule_list_data_item_type, +) if TYPE_CHECKING: from ..models.user_notification_rule import UserNotificationRule @@ -34,7 +33,6 @@ class UserNotificationRuleListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_notification_rule import UserNotificationRule id = self.id diff --git a/rootly_sdk/models/user_notification_rule_response.py b/rootly_sdk/models/user_notification_rule_response.py index 71b555a7..d84b742e 100644 --- a/rootly_sdk/models/user_notification_rule_response.py +++ b/rootly_sdk/models/user_notification_rule_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_notification_rule_response_data import UserNotificationRuleResponseData @@ -32,8 +29,6 @@ class UserNotificationRuleResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.user_notification_rule_response_data import UserNotificationRuleResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/user_notification_rule_response_data.py b/rootly_sdk/models/user_notification_rule_response_data.py index 66ca8f5d..76739bf0 100644 --- a/rootly_sdk/models/user_notification_rule_response_data.py +++ b/rootly_sdk/models/user_notification_rule_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.user_notification_rule_response_data_type import check_user_notification_rule_response_data_type -from ..models.user_notification_rule_response_data_type import UserNotificationRuleResponseDataType -from typing import cast +from ..models.user_notification_rule_response_data_type import ( + UserNotificationRuleResponseDataType, + check_user_notification_rule_response_data_type, +) if TYPE_CHECKING: from ..models.user_notification_rule import UserNotificationRule @@ -34,7 +33,6 @@ class UserNotificationRuleResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_notification_rule import UserNotificationRule id = self.id diff --git a/rootly_sdk/models/user_phone_number.py b/rootly_sdk/models/user_phone_number.py index 8399edcd..56225020 100644 --- a/rootly_sdk/models/user_phone_number.py +++ b/rootly_sdk/models/user_phone_number.py @@ -1,18 +1,14 @@ from __future__ import annotations +import datetime from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..types import UNSET, Unset from dateutil.parser import isoparse -from typing import cast -import datetime +from ..types import UNSET, Unset T = TypeVar("T", bound="UserPhoneNumber") diff --git a/rootly_sdk/models/user_phone_number_list.py b/rootly_sdk/models/user_phone_number_list.py index eca2c698..862069a5 100644 --- a/rootly_sdk/models/user_phone_number_list.py +++ b/rootly_sdk/models/user_phone_number_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class UserPhoneNumberList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.user_phone_number_list_data_item import UserPhoneNumberListDataItem data = [] for data_item_data in self.data: 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 d7268540..5fec150d 100644 --- a/rootly_sdk/models/user_phone_number_list_data_item.py +++ b/rootly_sdk/models/user_phone_number_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.user_phone_number_list_data_item_type import check_user_phone_number_list_data_item_type -from ..models.user_phone_number_list_data_item_type import UserPhoneNumberListDataItemType -from typing import cast +from ..models.user_phone_number_list_data_item_type import ( + UserPhoneNumberListDataItemType, + check_user_phone_number_list_data_item_type, +) if TYPE_CHECKING: from ..models.user_phone_number import UserPhoneNumber @@ -34,7 +33,6 @@ class UserPhoneNumberListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_phone_number import UserPhoneNumber id = self.id diff --git a/rootly_sdk/models/user_phone_number_response.py b/rootly_sdk/models/user_phone_number_response.py index 3d8a6005..e4451cf2 100644 --- a/rootly_sdk/models/user_phone_number_response.py +++ b/rootly_sdk/models/user_phone_number_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_phone_number_response_data import UserPhoneNumberResponseData @@ -32,8 +29,6 @@ class UserPhoneNumberResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.user_phone_number_response_data import UserPhoneNumberResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/user_phone_number_response_data.py b/rootly_sdk/models/user_phone_number_response_data.py index 9fce3e7c..e8a248ba 100644 --- a/rootly_sdk/models/user_phone_number_response_data.py +++ b/rootly_sdk/models/user_phone_number_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.user_phone_number_response_data_type import check_user_phone_number_response_data_type -from ..models.user_phone_number_response_data_type import UserPhoneNumberResponseDataType -from typing import cast +from ..models.user_phone_number_response_data_type import ( + UserPhoneNumberResponseDataType, + check_user_phone_number_response_data_type, +) if TYPE_CHECKING: from ..models.user_phone_number import UserPhoneNumber @@ -34,7 +33,6 @@ class UserPhoneNumberResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_phone_number import UserPhoneNumber id = self.id diff --git a/rootly_sdk/models/user_relationships.py b/rootly_sdk/models/user_relationships.py index 9f06f02e..1b6cfd67 100644 --- a/rootly_sdk/models/user_relationships.py +++ b/rootly_sdk/models/user_relationships.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.on_call_role_relationship import OnCallRoleRelationship from ..models.role_relationship import RoleRelationship @@ -32,8 +29,6 @@ class UserRelationships: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.role_relationship import RoleRelationship - from ..models.on_call_role_relationship import OnCallRoleRelationship role: dict[str, Any] | Unset = UNSET if not isinstance(self.role, Unset): diff --git a/rootly_sdk/models/user_response.py b/rootly_sdk/models/user_response.py index a82ccf83..e0c5a147 100644 --- a/rootly_sdk/models/user_response.py +++ b/rootly_sdk/models/user_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.user_response_data import UserResponseData @@ -32,8 +29,6 @@ class UserResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user_response_data import UserResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/user_response_data.py b/rootly_sdk/models/user_response_data.py index 954fd971..483c1d26 100644 --- a/rootly_sdk/models/user_response_data.py +++ b/rootly_sdk/models/user_response_data.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.user_response_data_type import UserResponseDataType, check_user_response_data_type from ..types import UNSET, Unset -from ..models.user_response_data_type import check_user_response_data_type -from ..models.user_response_data_type import UserResponseDataType -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.user import User from ..models.user_relationships import UserRelationships @@ -38,8 +34,6 @@ class UserResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.user import User - from ..models.user_relationships import UserRelationships id = self.id diff --git a/rootly_sdk/models/verify_phone_number_request.py b/rootly_sdk/models/verify_phone_number_request.py index a7741c4a..0a2aa912 100644 --- a/rootly_sdk/models/verify_phone_number_request.py +++ b/rootly_sdk/models/verify_phone_number_request.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="VerifyPhoneNumberRequest") diff --git a/rootly_sdk/models/webhooks_delivery.py b/rootly_sdk/models/webhooks_delivery.py index c50affa8..82c25bb5 100644 --- a/rootly_sdk/models/webhooks_delivery.py +++ b/rootly_sdk/models/webhooks_delivery.py @@ -1,16 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from typing import cast - - T = TypeVar("T", bound="WebhooksDelivery") diff --git a/rootly_sdk/models/webhooks_delivery_list.py b/rootly_sdk/models/webhooks_delivery_list.py index 668663bb..a059491e 100644 --- a/rootly_sdk/models/webhooks_delivery_list.py +++ b/rootly_sdk/models/webhooks_delivery_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class WebhooksDeliveryList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.webhooks_delivery_list_data_item import WebhooksDeliveryListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/webhooks_delivery_list_data_item.py b/rootly_sdk/models/webhooks_delivery_list_data_item.py index 08adcc91..0cbb26a3 100644 --- a/rootly_sdk/models/webhooks_delivery_list_data_item.py +++ b/rootly_sdk/models/webhooks_delivery_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.webhooks_delivery_list_data_item_type import check_webhooks_delivery_list_data_item_type -from ..models.webhooks_delivery_list_data_item_type import WebhooksDeliveryListDataItemType -from typing import cast +from ..models.webhooks_delivery_list_data_item_type import ( + WebhooksDeliveryListDataItemType, + check_webhooks_delivery_list_data_item_type, +) if TYPE_CHECKING: from ..models.webhooks_delivery import WebhooksDelivery @@ -34,7 +33,6 @@ class WebhooksDeliveryListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.webhooks_delivery import WebhooksDelivery id = self.id diff --git a/rootly_sdk/models/webhooks_delivery_response.py b/rootly_sdk/models/webhooks_delivery_response.py index e68eb958..f75bc185 100644 --- a/rootly_sdk/models/webhooks_delivery_response.py +++ b/rootly_sdk/models/webhooks_delivery_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_delivery_response_data import WebhooksDeliveryResponseData @@ -32,8 +29,6 @@ class WebhooksDeliveryResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.webhooks_delivery_response_data import WebhooksDeliveryResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/webhooks_delivery_response_data.py b/rootly_sdk/models/webhooks_delivery_response_data.py index 83dc1413..d4c4ca28 100644 --- a/rootly_sdk/models/webhooks_delivery_response_data.py +++ b/rootly_sdk/models/webhooks_delivery_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.webhooks_delivery_response_data_type import check_webhooks_delivery_response_data_type -from ..models.webhooks_delivery_response_data_type import WebhooksDeliveryResponseDataType -from typing import cast +from ..models.webhooks_delivery_response_data_type import ( + WebhooksDeliveryResponseDataType, + check_webhooks_delivery_response_data_type, +) if TYPE_CHECKING: from ..models.webhooks_delivery import WebhooksDelivery @@ -34,7 +33,6 @@ class WebhooksDeliveryResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.webhooks_delivery import WebhooksDelivery id = self.id diff --git a/rootly_sdk/models/webhooks_endpoint.py b/rootly_sdk/models/webhooks_endpoint.py index 1d6765a1..54589ce4 100644 --- a/rootly_sdk/models/webhooks_endpoint.py +++ b/rootly_sdk/models/webhooks_endpoint.py @@ -1,18 +1,17 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.webhooks_endpoint_event_types_item import ( + WebhooksEndpointEventTypesItem, + check_webhooks_endpoint_event_types_item, +) from ..types import UNSET, Unset -from ..models.webhooks_endpoint_event_types_item import check_webhooks_endpoint_event_types_item -from ..models.webhooks_endpoint_event_types_item import WebhooksEndpointEventTypesItem -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.webhooks_endpoint_custom_headers_item import WebhooksEndpointCustomHeadersItem @@ -48,7 +47,6 @@ class WebhooksEndpoint: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.webhooks_endpoint_custom_headers_item import WebhooksEndpointCustomHeadersItem name = self.name diff --git a/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py b/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py index 77a650ae..4dc7a532 100644 --- a/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py +++ b/rootly_sdk/models/webhooks_endpoint_custom_headers_item.py @@ -1,13 +1,9 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="WebhooksEndpointCustomHeadersItem") diff --git a/rootly_sdk/models/webhooks_endpoint_list.py b/rootly_sdk/models/webhooks_endpoint_list.py index 09d13852..7948809d 100644 --- a/rootly_sdk/models/webhooks_endpoint_list.py +++ b/rootly_sdk/models/webhooks_endpoint_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class WebhooksEndpointList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.webhooks_endpoint_list_data_item import WebhooksEndpointListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/webhooks_endpoint_list_data_item.py b/rootly_sdk/models/webhooks_endpoint_list_data_item.py index bef7fe31..c3c181eb 100644 --- a/rootly_sdk/models/webhooks_endpoint_list_data_item.py +++ b/rootly_sdk/models/webhooks_endpoint_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.webhooks_endpoint_list_data_item_type import check_webhooks_endpoint_list_data_item_type -from ..models.webhooks_endpoint_list_data_item_type import WebhooksEndpointListDataItemType -from typing import cast +from ..models.webhooks_endpoint_list_data_item_type import ( + WebhooksEndpointListDataItemType, + check_webhooks_endpoint_list_data_item_type, +) if TYPE_CHECKING: from ..models.webhooks_endpoint import WebhooksEndpoint @@ -34,7 +33,6 @@ class WebhooksEndpointListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.webhooks_endpoint import WebhooksEndpoint id = self.id diff --git a/rootly_sdk/models/webhooks_endpoint_response.py b/rootly_sdk/models/webhooks_endpoint_response.py index 969da164..0b880393 100644 --- a/rootly_sdk/models/webhooks_endpoint_response.py +++ b/rootly_sdk/models/webhooks_endpoint_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.webhooks_endpoint_response_data import WebhooksEndpointResponseData @@ -32,8 +29,6 @@ class WebhooksEndpointResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.webhooks_endpoint_response_data import WebhooksEndpointResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/webhooks_endpoint_response_data.py b/rootly_sdk/models/webhooks_endpoint_response_data.py index c2190882..d3e2828f 100644 --- a/rootly_sdk/models/webhooks_endpoint_response_data.py +++ b/rootly_sdk/models/webhooks_endpoint_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.webhooks_endpoint_response_data_type import check_webhooks_endpoint_response_data_type -from ..models.webhooks_endpoint_response_data_type import WebhooksEndpointResponseDataType -from typing import cast +from ..models.webhooks_endpoint_response_data_type import ( + WebhooksEndpointResponseDataType, + check_webhooks_endpoint_response_data_type, +) if TYPE_CHECKING: from ..models.webhooks_endpoint import WebhooksEndpoint @@ -34,7 +33,6 @@ class WebhooksEndpointResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.webhooks_endpoint import WebhooksEndpoint id = self.id diff --git a/rootly_sdk/models/workflow.py b/rootly_sdk/models/workflow.py index df6c0b7b..ee3acbe6 100644 --- a/rootly_sdk/models/workflow.py +++ b/rootly_sdk/models/workflow.py @@ -1,18 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.workflow_repeat_on_type_0_item import WorkflowRepeatOnType0Item, check_workflow_repeat_on_type_0_item from ..types import UNSET, Unset -from ..models.workflow_repeat_on_type_0_item import check_workflow_repeat_on_type_0_item -from ..models.workflow_repeat_on_type_0_item import WorkflowRepeatOnType0Item -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.action_item_trigger_params import ActionItemTriggerParams from ..models.alert_trigger_params import AlertTriggerParams @@ -99,11 +95,10 @@ class Workflow: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.pulse_trigger_params import PulseTriggerParams - from ..models.simple_trigger_params import SimpleTriggerParams - from ..models.incident_trigger_params import IncidentTriggerParams - from ..models.alert_trigger_params import AlertTriggerParams from ..models.action_item_trigger_params import ActionItemTriggerParams + from ..models.alert_trigger_params import AlertTriggerParams + from ..models.incident_trigger_params import IncidentTriggerParams + from ..models.pulse_trigger_params import PulseTriggerParams name = self.name diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition.py b/rootly_sdk/models/workflow_action_item_form_field_condition.py index 646b4432..511e7fa5 100644 --- a/rootly_sdk/models/workflow_action_item_form_field_condition.py +++ b/rootly_sdk/models/workflow_action_item_form_field_condition.py @@ -1,22 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_action_item_form_field_condition_action_item_condition import ( - check_workflow_action_item_form_field_condition_action_item_condition, -) from ..models.workflow_action_item_form_field_condition_action_item_condition import ( WorkflowActionItemFormFieldConditionActionItemCondition, + check_workflow_action_item_form_field_condition_action_item_condition, ) from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="WorkflowActionItemFormFieldCondition") diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_list.py b/rootly_sdk/models/workflow_action_item_form_field_condition_list.py index 8e28f729..b855ca58 100644 --- a/rootly_sdk/models/workflow_action_item_form_field_condition_list.py +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -40,12 +37,6 @@ class WorkflowActionItemFormFieldConditionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.workflow_action_item_form_field_condition_list_data_item import ( - WorkflowActionItemFormFieldConditionListDataItem, - ) - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py index 5e243144..0196c392 100644 --- a/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_list_data_item.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_action_item_form_field_condition_list_data_item_type import ( - check_workflow_action_item_form_field_condition_list_data_item_type, -) from ..models.workflow_action_item_form_field_condition_list_data_item_type import ( WorkflowActionItemFormFieldConditionListDataItemType, + check_workflow_action_item_form_field_condition_list_data_item_type, ) -from typing import cast if TYPE_CHECKING: from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition @@ -38,7 +33,6 @@ class WorkflowActionItemFormFieldConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition id = self.id diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_response.py b/rootly_sdk/models/workflow_action_item_form_field_condition_response.py index ebb6f3cb..d5a6bc3c 100644 --- a/rootly_sdk/models/workflow_action_item_form_field_condition_response.py +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_action_item_form_field_condition_response_data import ( @@ -34,10 +31,6 @@ class WorkflowActionItemFormFieldConditionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_action_item_form_field_condition_response_data import ( - WorkflowActionItemFormFieldConditionResponseData, - ) - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py index f39cb608..ba8b9202 100644 --- a/rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py +++ b/rootly_sdk/models/workflow_action_item_form_field_condition_response_data.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_action_item_form_field_condition_response_data_type import ( - check_workflow_action_item_form_field_condition_response_data_type, -) from ..models.workflow_action_item_form_field_condition_response_data_type import ( WorkflowActionItemFormFieldConditionResponseDataType, + check_workflow_action_item_form_field_condition_response_data_type, ) -from typing import cast if TYPE_CHECKING: from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition @@ -38,7 +33,6 @@ class WorkflowActionItemFormFieldConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_action_item_form_field_condition import WorkflowActionItemFormFieldCondition id = self.id diff --git a/rootly_sdk/models/workflow_custom_field_selection.py b/rootly_sdk/models/workflow_custom_field_selection.py index e9231887..aa0bec5c 100644 --- a/rootly_sdk/models/workflow_custom_field_selection.py +++ b/rootly_sdk/models/workflow_custom_field_selection.py @@ -1,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.workflow_custom_field_selection_incident_condition import ( + WorkflowCustomFieldSelectionIncidentCondition, check_workflow_custom_field_selection_incident_condition, ) -from ..models.workflow_custom_field_selection_incident_condition import WorkflowCustomFieldSelectionIncidentCondition from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="WorkflowCustomFieldSelection") diff --git a/rootly_sdk/models/workflow_custom_field_selection_list.py b/rootly_sdk/models/workflow_custom_field_selection_list.py index 2bca17d2..c4c1b992 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_list.py +++ b/rootly_sdk/models/workflow_custom_field_selection_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class WorkflowCustomFieldSelectionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.workflow_custom_field_selection_list_data_item import WorkflowCustomFieldSelectionListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 d4a6032d..3c0c25c7 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,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.workflow_custom_field_selection_list_data_item_type import ( + WorkflowCustomFieldSelectionListDataItemType, check_workflow_custom_field_selection_list_data_item_type, ) -from ..models.workflow_custom_field_selection_list_data_item_type import WorkflowCustomFieldSelectionListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.workflow_custom_field_selection import WorkflowCustomFieldSelection @@ -36,7 +33,6 @@ class WorkflowCustomFieldSelectionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_custom_field_selection import WorkflowCustomFieldSelection id = self.id diff --git a/rootly_sdk/models/workflow_custom_field_selection_response.py b/rootly_sdk/models/workflow_custom_field_selection_response.py index b2ebe06b..359a6902 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_response.py +++ b/rootly_sdk/models/workflow_custom_field_selection_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_custom_field_selection_response_data import WorkflowCustomFieldSelectionResponseData @@ -32,8 +29,6 @@ class WorkflowCustomFieldSelectionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_custom_field_selection_response_data import WorkflowCustomFieldSelectionResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() 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 347e9877..a6358569 100644 --- a/rootly_sdk/models/workflow_custom_field_selection_response_data.py +++ b/rootly_sdk/models/workflow_custom_field_selection_response_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.workflow_custom_field_selection_response_data_type import ( + WorkflowCustomFieldSelectionResponseDataType, check_workflow_custom_field_selection_response_data_type, ) -from ..models.workflow_custom_field_selection_response_data_type import WorkflowCustomFieldSelectionResponseDataType -from typing import cast if TYPE_CHECKING: from ..models.workflow_custom_field_selection import WorkflowCustomFieldSelection @@ -36,7 +33,6 @@ class WorkflowCustomFieldSelectionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_custom_field_selection import WorkflowCustomFieldSelection id = self.id diff --git a/rootly_sdk/models/workflow_form_field_condition.py b/rootly_sdk/models/workflow_form_field_condition.py index d6e8ce6f..f3d3ed95 100644 --- a/rootly_sdk/models/workflow_form_field_condition.py +++ b/rootly_sdk/models/workflow_form_field_condition.py @@ -1,20 +1,16 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.workflow_form_field_condition_incident_condition import ( + WorkflowFormFieldConditionIncidentCondition, check_workflow_form_field_condition_incident_condition, ) -from ..models.workflow_form_field_condition_incident_condition import WorkflowFormFieldConditionIncidentCondition from ..types import UNSET, Unset -from typing import cast - T = TypeVar("T", bound="WorkflowFormFieldCondition") diff --git a/rootly_sdk/models/workflow_form_field_condition_list.py b/rootly_sdk/models/workflow_form_field_condition_list.py index ab079922..dfbfcc0d 100644 --- a/rootly_sdk/models/workflow_form_field_condition_list.py +++ b/rootly_sdk/models/workflow_form_field_condition_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class WorkflowFormFieldConditionList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_form_field_condition_list_data_item import WorkflowFormFieldConditionListDataItem - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: 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 43e4bc70..3faa4ee9 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,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.workflow_form_field_condition_list_data_item_type import ( + WorkflowFormFieldConditionListDataItemType, check_workflow_form_field_condition_list_data_item_type, ) -from ..models.workflow_form_field_condition_list_data_item_type import WorkflowFormFieldConditionListDataItemType -from typing import cast if TYPE_CHECKING: from ..models.workflow_form_field_condition import WorkflowFormFieldCondition @@ -36,7 +33,6 @@ class WorkflowFormFieldConditionListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_form_field_condition import WorkflowFormFieldCondition id = self.id diff --git a/rootly_sdk/models/workflow_form_field_condition_response.py b/rootly_sdk/models/workflow_form_field_condition_response.py index 55cc9265..a9ea7141 100644 --- a/rootly_sdk/models/workflow_form_field_condition_response.py +++ b/rootly_sdk/models/workflow_form_field_condition_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_form_field_condition_response_data import WorkflowFormFieldConditionResponseData @@ -32,8 +29,6 @@ class WorkflowFormFieldConditionResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.workflow_form_field_condition_response_data import WorkflowFormFieldConditionResponseData data = self.data.to_dict() 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 126255e8..e38e325b 100644 --- a/rootly_sdk/models/workflow_form_field_condition_response_data.py +++ b/rootly_sdk/models/workflow_form_field_condition_response_data.py @@ -1,18 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - from ..models.workflow_form_field_condition_response_data_type import ( + WorkflowFormFieldConditionResponseDataType, check_workflow_form_field_condition_response_data_type, ) -from ..models.workflow_form_field_condition_response_data_type import WorkflowFormFieldConditionResponseDataType -from typing import cast if TYPE_CHECKING: from ..models.workflow_form_field_condition import WorkflowFormFieldCondition @@ -36,7 +33,6 @@ class WorkflowFormFieldConditionResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_form_field_condition import WorkflowFormFieldCondition id = self.id diff --git a/rootly_sdk/models/workflow_group.py b/rootly_sdk/models/workflow_group.py index 3edb2276..1563246a 100644 --- a/rootly_sdk/models/workflow_group.py +++ b/rootly_sdk/models/workflow_group.py @@ -1,19 +1,14 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.workflow_group_kind import WorkflowGroupKind, check_workflow_group_kind from ..types import UNSET, Unset -from ..models.workflow_group_kind import check_workflow_group_kind -from ..models.workflow_group_kind import WorkflowGroupKind -from ..types import UNSET, Unset -from typing import cast - - T = TypeVar("T", bound="WorkflowGroup") diff --git a/rootly_sdk/models/workflow_group_list.py b/rootly_sdk/models/workflow_group_list.py index b51273a8..31743ee5 100644 --- a/rootly_sdk/models/workflow_group_list.py +++ b/rootly_sdk/models/workflow_group_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class WorkflowGroupList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.workflow_group_list_data_item import WorkflowGroupListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/workflow_group_list_data_item.py b/rootly_sdk/models/workflow_group_list_data_item.py index 15802e54..039a54f5 100644 --- a/rootly_sdk/models/workflow_group_list_data_item.py +++ b/rootly_sdk/models/workflow_group_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_group_list_data_item_type import check_workflow_group_list_data_item_type -from ..models.workflow_group_list_data_item_type import WorkflowGroupListDataItemType -from typing import cast +from ..models.workflow_group_list_data_item_type import ( + WorkflowGroupListDataItemType, + check_workflow_group_list_data_item_type, +) if TYPE_CHECKING: from ..models.workflow_group import WorkflowGroup @@ -34,7 +33,6 @@ class WorkflowGroupListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_group import WorkflowGroup id = self.id diff --git a/rootly_sdk/models/workflow_group_response.py b/rootly_sdk/models/workflow_group_response.py index bcabe4ff..d2bd3bec 100644 --- a/rootly_sdk/models/workflow_group_response.py +++ b/rootly_sdk/models/workflow_group_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_group_response_data import WorkflowGroupResponseData @@ -32,8 +29,6 @@ class WorkflowGroupResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_group_response_data import WorkflowGroupResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/workflow_group_response_data.py b/rootly_sdk/models/workflow_group_response_data.py index 0bcc17a5..f637b6cd 100644 --- a/rootly_sdk/models/workflow_group_response_data.py +++ b/rootly_sdk/models/workflow_group_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_group_response_data_type import check_workflow_group_response_data_type -from ..models.workflow_group_response_data_type import WorkflowGroupResponseDataType -from typing import cast +from ..models.workflow_group_response_data_type import ( + WorkflowGroupResponseDataType, + check_workflow_group_response_data_type, +) if TYPE_CHECKING: from ..models.workflow_group import WorkflowGroup @@ -34,7 +33,6 @@ class WorkflowGroupResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_group import WorkflowGroup id = self.id diff --git a/rootly_sdk/models/workflow_list.py b/rootly_sdk/models/workflow_list.py index 8aacd40e..b74bb15d 100644 --- a/rootly_sdk/models/workflow_list.py +++ b/rootly_sdk/models/workflow_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class WorkflowList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.workflow_list_data_item import WorkflowListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/workflow_list_data_item.py b/rootly_sdk/models/workflow_list_data_item.py index 8f73f302..713a974e 100644 --- a/rootly_sdk/models/workflow_list_data_item.py +++ b/rootly_sdk/models/workflow_list_data_item.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_list_data_item_type import check_workflow_list_data_item_type -from ..models.workflow_list_data_item_type import WorkflowListDataItemType -from typing import cast +from ..models.workflow_list_data_item_type import WorkflowListDataItemType, check_workflow_list_data_item_type if TYPE_CHECKING: from ..models.workflow import Workflow @@ -34,7 +30,6 @@ class WorkflowListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow import Workflow id = self.id diff --git a/rootly_sdk/models/workflow_response.py b/rootly_sdk/models/workflow_response.py index 81db1e52..48ad6d5a 100644 --- a/rootly_sdk/models/workflow_response.py +++ b/rootly_sdk/models/workflow_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_response_data import WorkflowResponseData @@ -32,8 +29,6 @@ class WorkflowResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_response_data import WorkflowResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/workflow_response_data.py b/rootly_sdk/models/workflow_response_data.py index c100c697..708d02d4 100644 --- a/rootly_sdk/models/workflow_response_data.py +++ b/rootly_sdk/models/workflow_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_response_data_type import check_workflow_response_data_type -from ..models.workflow_response_data_type import WorkflowResponseDataType -from typing import cast +from ..models.workflow_response_data_type import WorkflowResponseDataType, check_workflow_response_data_type if TYPE_CHECKING: from ..models.workflow import Workflow @@ -34,7 +30,6 @@ class WorkflowResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow import Workflow id = self.id diff --git a/rootly_sdk/models/workflow_run.py b/rootly_sdk/models/workflow_run.py index ad0f2ed1..1953ec09 100644 --- a/rootly_sdk/models/workflow_run.py +++ b/rootly_sdk/models/workflow_run.py @@ -1,20 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +from typing import TYPE_CHECKING, Any, TypeVar, cast from attrs import define as _attrs_define from attrs import field as _attrs_field +from ..models.workflow_run_status import WorkflowRunStatus, check_workflow_run_status +from ..models.workflow_run_triggered_by import WorkflowRunTriggeredBy, check_workflow_run_triggered_by from ..types import UNSET, Unset -from ..models.workflow_run_status import check_workflow_run_status -from ..models.workflow_run_status import WorkflowRunStatus -from ..models.workflow_run_triggered_by import check_workflow_run_triggered_by -from ..models.workflow_run_triggered_by import WorkflowRunTriggeredBy -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.workflow_run_context import WorkflowRunContext @@ -59,7 +54,6 @@ class WorkflowRun: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_run_context import WorkflowRunContext workflow_id = self.workflow_id diff --git a/rootly_sdk/models/workflow_run_context.py b/rootly_sdk/models/workflow_run_context.py index af0d9d77..ecd3107f 100644 --- a/rootly_sdk/models/workflow_run_context.py +++ b/rootly_sdk/models/workflow_run_context.py @@ -1,14 +1,11 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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="WorkflowRunContext") diff --git a/rootly_sdk/models/workflow_run_response.py b/rootly_sdk/models/workflow_run_response.py index fc9d8199..54aa6066 100644 --- a/rootly_sdk/models/workflow_run_response.py +++ b/rootly_sdk/models/workflow_run_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_run_response_data import WorkflowRunResponseData @@ -32,8 +29,6 @@ class WorkflowRunResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.workflow_run_response_data import WorkflowRunResponseData data = self.data.to_dict() diff --git a/rootly_sdk/models/workflow_run_response_data.py b/rootly_sdk/models/workflow_run_response_data.py index e553b5a8..a40ae7da 100644 --- a/rootly_sdk/models/workflow_run_response_data.py +++ b/rootly_sdk/models/workflow_run_response_data.py @@ -1,16 +1,12 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_run_response_data_type import check_workflow_run_response_data_type -from ..models.workflow_run_response_data_type import WorkflowRunResponseDataType -from typing import cast +from ..models.workflow_run_response_data_type import WorkflowRunResponseDataType, check_workflow_run_response_data_type if TYPE_CHECKING: from ..models.workflow_run import WorkflowRun @@ -34,7 +30,6 @@ class WorkflowRunResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_run import WorkflowRun id = self.id diff --git a/rootly_sdk/models/workflow_runs_list.py b/rootly_sdk/models/workflow_runs_list.py index 72f0e8f4..578c499e 100644 --- a/rootly_sdk/models/workflow_runs_list.py +++ b/rootly_sdk/models/workflow_runs_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class WorkflowRunsList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.workflow_runs_list_data_item import WorkflowRunsListDataItem - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/workflow_runs_list_data_item.py b/rootly_sdk/models/workflow_runs_list_data_item.py index 7f907712..503f7ea4 100644 --- a/rootly_sdk/models/workflow_runs_list_data_item.py +++ b/rootly_sdk/models/workflow_runs_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_runs_list_data_item_type import check_workflow_runs_list_data_item_type -from ..models.workflow_runs_list_data_item_type import WorkflowRunsListDataItemType -from typing import cast +from ..models.workflow_runs_list_data_item_type import ( + WorkflowRunsListDataItemType, + check_workflow_runs_list_data_item_type, +) if TYPE_CHECKING: from ..models.workflow_run import WorkflowRun @@ -34,7 +33,6 @@ class WorkflowRunsListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_run import WorkflowRun id = self.id diff --git a/rootly_sdk/models/workflow_task.py b/rootly_sdk/models/workflow_task.py index e0ffb31a..09603629 100644 --- a/rootly_sdk/models/workflow_task.py +++ b/rootly_sdk/models/workflow_task.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.add_action_item_task_params import AddActionItemTaskParams from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams @@ -431,179 +428,178 @@ class WorkflowTask: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 - from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams + from ..models.add_action_item_task_params import AddActionItemTaskParams + from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams + from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 from ..models.add_microsoft_teams_tab_task_params_type_1 import AddMicrosoftTeamsTabTaskParamsType1 - from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams - from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams - from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams - from ..models.create_notion_page_task_params import CreateNotionPageTaskParams - from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 - from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( - InviteToMicrosoftTeamsChannelRootlyTaskParams, - ) - from ..models.create_confluence_page_task_params import CreateConfluencePageTaskParams - from ..models.send_sms_task_params import SendSmsTaskParams - from ..models.call_people_task_params import CallPeopleTaskParams - from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams - from ..models.create_incident_task_params import CreateIncidentTaskParams - from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams - from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 - from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 - from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 - from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams - from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams - from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams + from ..models.add_role_task_params import AddRoleTaskParams from ..models.add_slack_bookmark_task_params_type_0 import AddSlackBookmarkTaskParamsType0 - from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams - from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams - from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams - from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams - from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams - from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams - from ..models.get_pulses_task_params import GetPulsesTaskParams - from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams - from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams - from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams - from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams - from ..models.publish_incident_task_params import PublishIncidentTaskParams - from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams - from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams - from ..models.page_rootly_on_call_responders_task_params import PageRootlyOnCallRespondersTaskParams - from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 - from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams - from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams + from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 + from ..models.add_team_task_params import AddTeamTaskParams from ..models.add_to_timeline_task_params import AddToTimelineTaskParams - from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams - from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams - from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams + from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams from ..models.archive_slack_channels_task_params import ArchiveSlackChannelsTaskParams - from ..models.update_incident_task_params import UpdateIncidentTaskParams - from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams - from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams - from ..models.get_alerts_task_params import GetAlertsTaskParams - from ..models.add_team_task_params import AddTeamTaskParams - from ..models.update_status_task_params import UpdateStatusTaskParams - from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams - from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 - from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 - from ..models.add_slack_bookmark_task_params_type_1 import AddSlackBookmarkTaskParamsType1 - from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams - from ..models.create_anthropic_chat_completion_task_params import CreateAnthropicChatCompletionTaskParams + from ..models.attach_datadog_dashboards_task_params import AttachDatadogDashboardsTaskParams from ..models.attach_retrospective_pdf_to_jira_issue_task_params import ( AttachRetrospectivePdfToJiraIssueTaskParams, ) - from ..models.redis_client_task_params import RedisClientTaskParams - from ..models.add_action_item_task_params import AddActionItemTaskParams - from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.auto_assign_role_opsgenie_task_params import AutoAssignRoleOpsgenieTaskParams - from ..models.add_microsoft_teams_tab_task_params_type_0 import AddMicrosoftTeamsTabTaskParamsType0 - from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 + from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 + from ..models.auto_assign_role_pagerduty_task_params_type_1 import AutoAssignRolePagerdutyTaskParamsType1 + from ..models.auto_assign_role_rootly_task_params import AutoAssignRoleRootlyTaskParams + from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams + from ..models.call_people_task_params import CallPeopleTaskParams + from ..models.change_google_chat_space_privacy_task_params import ChangeGoogleChatSpacePrivacyTaskParams + from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams + from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams + from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams + from ..models.create_asana_task_task_params import CreateAsanaTaskTaskParams + from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams + from ..models.create_coda_page_task_params import CreateCodaPageTaskParams + from ..models.create_confluence_page_task_params import CreateConfluencePageTaskParams + from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams + from ..models.create_dropbox_paper_page_task_params import CreateDropboxPaperPageTaskParams + from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams + from ..models.create_gitlab_issue_task_params import CreateGitlabIssueTaskParams + from ..models.create_go_to_meeting_task_params import CreateGoToMeetingTaskParams + from ..models.create_google_calendar_event_task_params import CreateGoogleCalendarEventTaskParams + from ..models.create_google_chat_space_task_params import CreateGoogleChatSpaceTaskParams + from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams + from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams from ..models.create_google_gemini_chat_completion_task_params import CreateGoogleGeminiChatCompletionTaskParams - from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 - from ..models.add_microsoft_teams_chat_tab_task_params import AddMicrosoftTeamsChatTabTaskParams - from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 - from ..models.http_client_task_params import HttpClientTaskParams - from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams from ..models.create_google_meeting_task_params import CreateGoogleMeetingTaskParams + from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams + from ..models.create_incident_task_params import CreateIncidentTaskParams from ..models.create_jira_issue_task_params import CreateJiraIssueTaskParams - from ..models.update_asana_task_task_params import UpdateAsanaTaskTaskParams - from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams + 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 + from ..models.create_microsoft_teams_channel_task_params import CreateMicrosoftTeamsChannelTaskParams + from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams + from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams + from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams + from ..models.create_motion_task_task_params import CreateMotionTaskTaskParams + from ..models.create_notion_page_task_params import CreateNotionPageTaskParams + from ..models.create_openai_chat_completion_task_params import CreateOpenaiChatCompletionTaskParams + from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams + from ..models.create_outlook_event_task_params import CreateOutlookEventTaskParams + from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams + from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams + from ..models.create_quip_page_task_params import CreateQuipPageTaskParams + from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams + from ..models.create_sharepoint_page_task_params import CreateSharepointPageTaskParams + from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 + from ..models.create_shortcut_story_task_params_type_1 import CreateShortcutStoryTaskParamsType1 + from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams + from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams + from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams + from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams + from ..models.create_watsonx_chat_completion_task_params import CreateWatsonxChatCompletionTaskParams + from ..models.create_webex_meeting_task_params import CreateWebexMeetingTaskParams + from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams + from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams + from ..models.create_zoom_meeting_task_params import CreateZoomMeetingTaskParams + from ..models.get_alerts_task_params import GetAlertsTaskParams + from ..models.get_github_commits_task_params_type_0 import GetGithubCommitsTaskParamsType0 + from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 + from ..models.get_gitlab_commits_task_params_type_0 import GetGitlabCommitsTaskParamsType0 + from ..models.get_gitlab_commits_task_params_type_1 import GetGitlabCommitsTaskParamsType1 + from ..models.get_pulses_task_params import GetPulsesTaskParams + from ..models.http_client_task_params import HttpClientTaskParams + from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams + from ..models.invite_to_microsoft_teams_channel_rootly_task_params import ( + InviteToMicrosoftTeamsChannelRootlyTaskParams, + ) + from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams + from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams from ..models.invite_to_slack_channel_pagerduty_task_params_type_0 import ( InviteToSlackChannelPagerdutyTaskParamsType0, ) + from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( + InviteToSlackChannelPagerdutyTaskParamsType1, + ) + from ..models.invite_to_slack_channel_rootly_task_params import InviteToSlackChannelRootlyTaskParams + from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 + from ..models.invite_to_slack_channel_task_params_type_1 import InviteToSlackChannelTaskParamsType1 from ..models.invite_to_slack_channel_task_params_type_2 import InviteToSlackChannelTaskParamsType2 - from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams + 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 from ..models.page_victor_ops_on_call_responders_task_params_type_0 import ( PageVictorOpsOnCallRespondersTaskParamsType0, ) - from ..models.create_jsmops_alert_task_params import CreateJsmopsAlertTaskParams - from ..models.create_coda_page_task_params import CreateCodaPageTaskParams from ..models.page_victor_ops_on_call_responders_task_params_type_1 import ( PageVictorOpsOnCallRespondersTaskParamsType1, ) - from ..models.create_linear_issue_comment_task_params import CreateLinearIssueCommentTaskParams - from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams - from ..models.invite_to_google_chat_space_task_params import InviteToGoogleChatSpaceTaskParams - from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams - from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams - from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams - from ..models.create_asana_subtask_task_params import CreateAsanaSubtaskTaskParams - from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 - from ..models.invite_to_microsoft_teams_channel_task_params import InviteToMicrosoftTeamsChannelTaskParams - from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams - from ..models.create_zendesk_ticket_task_params import CreateZendeskTicketTaskParams - from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams - from ..models.create_airtable_table_record_task_params import CreateAirtableTableRecordTaskParams - from ..models.create_motion_task_task_params import CreateMotionTaskTaskParams - from ..models.update_action_item_task_params import UpdateActionItemTaskParams from ..models.print_task_params import PrintTaskParams - from ..models.invite_to_slack_channel_task_params_type_0 import InviteToSlackChannelTaskParamsType0 - from ..models.create_datadog_notebook_task_params import CreateDatadogNotebookTaskParams - from ..models.page_jsmops_on_call_responders_task_params import PageJsmopsOnCallRespondersTaskParams - from ..models.create_quip_page_task_params import CreateQuipPageTaskParams - from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams - from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams - from ..models.archive_microsoft_teams_channels_task_params import ArchiveMicrosoftTeamsChannelsTaskParams - from ..models.create_service_now_incident_task_params import CreateServiceNowIncidentTaskParams - from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams - from ..models.create_linear_issue_task_params import CreateLinearIssueTaskParams - from ..models.invite_to_slack_channel_pagerduty_task_params_type_1 import ( - InviteToSlackChannelPagerdutyTaskParamsType1, - ) - from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams - from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams - from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams - from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams - from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams - from ..models.archive_google_chat_spaces_task_params import ArchiveGoogleChatSpacesTaskParams - from ..models.create_webex_meeting_task_params import CreateWebexMeetingTaskParams - from ..models.create_microsoft_teams_meeting_task_params import CreateMicrosoftTeamsMeetingTaskParams - from ..models.auto_assign_role_victor_ops_task_params import AutoAssignRoleVictorOpsTaskParams - from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams - from ..models.create_pagerduty_status_update_task_params import CreatePagerdutyStatusUpdateTaskParams - from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams - from ..models.create_trello_card_task_params import CreateTrelloCardTaskParams + from ..models.publish_incident_task_params import PublishIncidentTaskParams + from ..models.redis_client_task_params import RedisClientTaskParams from ..models.remove_google_docs_permissions_task_params import RemoveGoogleDocsPermissionsTaskParams - from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams - from ..models.create_linear_subtask_issue_task_params import CreateLinearSubtaskIssueTaskParams - from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams - from ..models.create_slack_channel_task_params import CreateSlackChannelTaskParams - from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams - from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams - from ..models.auto_assign_role_pagerduty_task_params_type_0 import AutoAssignRolePagerdutyTaskParamsType0 - from ..models.add_role_task_params import AddRoleTaskParams + from ..models.rename_google_chat_space_task_params import RenameGoogleChatSpaceTaskParams from ..models.rename_microsoft_teams_channel_task_params import RenameMicrosoftTeamsChannelTaskParams - from ..models.create_github_issue_task_params import CreateGithubIssueTaskParams - from ..models.create_clickup_task_task_params import CreateClickupTaskTaskParams - from ..models.page_opsgenie_on_call_responders_task_params import PageOpsgenieOnCallRespondersTaskParams + from ..models.rename_slack_channel_task_params import RenameSlackChannelTaskParams + from ..models.run_command_heroku_task_params import RunCommandHerokuTaskParams + from ..models.send_dashboard_report_task_params import SendDashboardReportTaskParams from ..models.send_email_task_params import SendEmailTaskParams - from ..models.create_shortcut_task_task_params import CreateShortcutTaskTaskParams - from ..models.snapshot_looker_look_task_params import SnapshotLookerLookTaskParams + from ..models.send_google_chat_attachments_task_params import SendGoogleChatAttachmentsTaskParams + from ..models.send_google_chat_message_task_params import SendGoogleChatMessageTaskParams + from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 + from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams + from ..models.send_microsoft_teams_message_task_params_type_0 import SendMicrosoftTeamsMessageTaskParamsType0 from ..models.send_slack_blocks_task_params_type_0 import SendSlackBlocksTaskParamsType0 - from ..models.create_sub_incident_task_params import CreateSubIncidentTaskParams - from ..models.create_microsoft_teams_chat_task_params import CreateMicrosoftTeamsChatTaskParams - from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams - from ..models.change_slack_channel_privacy_task_params import ChangeSlackChannelPrivacyTaskParams - from ..models.create_opsgenie_alert_task_params import CreateOpsgenieAlertTaskParams - from ..models.update_clickup_task_task_params import UpdateClickupTaskTaskParams - from ..models.create_mistral_chat_completion_task_params import CreateMistralChatCompletionTaskParams - from ..models.create_shortcut_story_task_params_type_0 import CreateShortcutStoryTaskParamsType0 - from ..models.invite_to_slack_channel_opsgenie_task_params import InviteToSlackChannelOpsgenieTaskParams + from ..models.send_slack_blocks_task_params_type_1 import SendSlackBlocksTaskParamsType1 + from ..models.send_slack_blocks_task_params_type_2 import SendSlackBlocksTaskParamsType2 + from ..models.send_slack_message_task_params_type_0 import SendSlackMessageTaskParamsType0 + from ..models.send_slack_message_task_params_type_1 import SendSlackMessageTaskParamsType1 + from ..models.send_slack_message_task_params_type_2 import SendSlackMessageTaskParamsType2 + from ..models.send_sms_task_params import SendSmsTaskParams + from ..models.send_whatsapp_message_task_params import SendWhatsappMessageTaskParams + from ..models.snapshot_datadog_graph_task_params import SnapshotDatadogGraphTaskParams + from ..models.snapshot_grafana_dashboard_task_params import SnapshotGrafanaDashboardTaskParams + from ..models.snapshot_looker_look_task_params import SnapshotLookerLookTaskParams + from ..models.snapshot_new_relic_graph_task_params import SnapshotNewRelicGraphTaskParams + from ..models.trigger_workflow_task_params import TriggerWorkflowTaskParams + from ..models.tweet_twitter_message_task_params import TweetTwitterMessageTaskParams + from ..models.update_action_item_task_params import UpdateActionItemTaskParams from ..models.update_airtable_table_record_task_params import UpdateAirtableTableRecordTaskParams - from ..models.get_github_commits_task_params_type_1 import GetGithubCommitsTaskParamsType1 - from ..models.create_pagertree_alert_task_params import CreatePagertreeAlertTaskParams - from ..models.page_pagerduty_on_call_responders_task_params import PagePagerdutyOnCallRespondersTaskParams - from ..models.send_microsoft_teams_blocks_task_params_type_0 import SendMicrosoftTeamsBlocksTaskParamsType0 - from ..models.create_zendesk_jira_link_task_params import CreateZendeskJiraLinkTaskParams + from ..models.update_asana_task_task_params import UpdateAsanaTaskTaskParams + from ..models.update_attached_alerts_task_params import UpdateAttachedAlertsTaskParams + from ..models.update_clickup_task_task_params import UpdateClickupTaskTaskParams + from ..models.update_coda_page_task_params import UpdateCodaPageTaskParams + from ..models.update_confluence_page_task_params import UpdateConfluencePageTaskParams + from ..models.update_datadog_notebook_task_params import UpdateDatadogNotebookTaskParams + from ..models.update_dropbox_paper_page_task_params import UpdateDropboxPaperPageTaskParams + from ..models.update_github_issue_task_params import UpdateGithubIssueTaskParams from ..models.update_gitlab_issue_task_params import UpdateGitlabIssueTaskParams - from ..models.create_incident_postmortem_task_params import CreateIncidentPostmortemTaskParams + from ..models.update_google_calendar_event_task_params import UpdateGoogleCalendarEventTaskParams + from ..models.update_google_chat_space_description_task_params import UpdateGoogleChatSpaceDescriptionTaskParams + from ..models.update_google_docs_page_task_params import UpdateGoogleDocsPageTaskParams + from ..models.update_incident_postmortem_task_params import UpdateIncidentPostmortemTaskParams + from ..models.update_incident_status_timestamp_task_params import UpdateIncidentStatusTimestampTaskParams + from ..models.update_incident_task_params import UpdateIncidentTaskParams + from ..models.update_jira_issue_task_params import UpdateJiraIssueTaskParams + from ..models.update_linear_issue_task_params import UpdateLinearIssueTaskParams + from ..models.update_motion_task_task_params import UpdateMotionTaskTaskParams + from ..models.update_notion_page_task_params import UpdateNotionPageTaskParams + from ..models.update_opsgenie_alert_task_params import UpdateOpsgenieAlertTaskParams from ..models.update_opsgenie_incident_task_params import UpdateOpsgenieIncidentTaskParams - from ..models.create_jira_subtask_task_params import CreateJiraSubtaskTaskParams - from ..models.send_microsoft_teams_chat_message_task_params import SendMicrosoftTeamsChatMessageTaskParams - from ..models.create_google_docs_permissions_task_params import CreateGoogleDocsPermissionsTaskParams - from ..models.create_google_docs_page_task_params import CreateGoogleDocsPageTaskParams - from ..models.invite_to_slack_channel_victor_ops_task_params import InviteToSlackChannelVictorOpsTaskParams + from ..models.update_pagerduty_incident_task_params import UpdatePagerdutyIncidentTaskParams + from ..models.update_pagertree_alert_task_params import UpdatePagertreeAlertTaskParams + from ..models.update_quip_page_task_params import UpdateQuipPageTaskParams + from ..models.update_service_now_incident_task_params import UpdateServiceNowIncidentTaskParams + from ..models.update_sharepoint_page_task_params import UpdateSharepointPageTaskParams + from ..models.update_shortcut_story_task_params import UpdateShortcutStoryTaskParams + from ..models.update_shortcut_task_task_params import UpdateShortcutTaskTaskParams + from ..models.update_slack_channel_topic_task_params import UpdateSlackChannelTopicTaskParams + from ..models.update_status_task_params import UpdateStatusTaskParams + from ..models.update_trello_card_task_params import UpdateTrelloCardTaskParams + from ..models.update_victor_ops_incident_task_params import UpdateVictorOpsIncidentTaskParams + from ..models.update_zendesk_ticket_task_params import UpdateZendeskTicketTaskParams workflow_id = self.workflow_id diff --git a/rootly_sdk/models/workflow_task_list.py b/rootly_sdk/models/workflow_task_list.py index 7d5d591d..147ac020 100644 --- a/rootly_sdk/models/workflow_task_list.py +++ b/rootly_sdk/models/workflow_task_list.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.links import Links @@ -38,10 +35,6 @@ class WorkflowTaskList: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.meta import Meta - from ..models.jsonapi_included_resource import JsonapiIncludedResource - from ..models.links import Links - from ..models.workflow_task_list_data_item import WorkflowTaskListDataItem data = [] for data_item_data in self.data: diff --git a/rootly_sdk/models/workflow_task_list_data_item.py b/rootly_sdk/models/workflow_task_list_data_item.py index dc207323..9e144806 100644 --- a/rootly_sdk/models/workflow_task_list_data_item.py +++ b/rootly_sdk/models/workflow_task_list_data_item.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_task_list_data_item_type import check_workflow_task_list_data_item_type -from ..models.workflow_task_list_data_item_type import WorkflowTaskListDataItemType -from typing import cast +from ..models.workflow_task_list_data_item_type import ( + WorkflowTaskListDataItemType, + check_workflow_task_list_data_item_type, +) if TYPE_CHECKING: from ..models.workflow_task import WorkflowTask @@ -34,7 +33,6 @@ class WorkflowTaskListDataItem: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_task import WorkflowTask id = self.id diff --git a/rootly_sdk/models/workflow_task_response.py b/rootly_sdk/models/workflow_task_response.py index fba2feaa..26b15a77 100644 --- a/rootly_sdk/models/workflow_task_response.py +++ b/rootly_sdk/models/workflow_task_response.py @@ -1,16 +1,13 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 -from ..types import UNSET, Unset -from typing import cast - if TYPE_CHECKING: from ..models.jsonapi_included_resource import JsonapiIncludedResource from ..models.workflow_task_response_data import WorkflowTaskResponseData @@ -32,8 +29,6 @@ class WorkflowTaskResponse: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_task_response_data import WorkflowTaskResponseData - from ..models.jsonapi_included_resource import JsonapiIncludedResource data = self.data.to_dict() diff --git a/rootly_sdk/models/workflow_task_response_data.py b/rootly_sdk/models/workflow_task_response_data.py index dad8b8ae..eb7f6834 100644 --- a/rootly_sdk/models/workflow_task_response_data.py +++ b/rootly_sdk/models/workflow_task_response_data.py @@ -1,16 +1,15 @@ from __future__ import annotations from collections.abc import Mapping -from typing import Any, TypeVar, BinaryIO, TextIO, TYPE_CHECKING, Generator +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 - -from ..models.workflow_task_response_data_type import check_workflow_task_response_data_type -from ..models.workflow_task_response_data_type import WorkflowTaskResponseDataType -from typing import cast +from ..models.workflow_task_response_data_type import ( + WorkflowTaskResponseDataType, + check_workflow_task_response_data_type, +) if TYPE_CHECKING: from ..models.workflow_task import WorkflowTask @@ -34,7 +33,6 @@ class WorkflowTaskResponseData: additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> dict[str, Any]: - from ..models.workflow_task import WorkflowTask id = self.id diff --git a/rootly_sdk/types.py b/rootly_sdk/types.py index f74db0ad..b9fb2f7e 100644 --- a/rootly_sdk/types.py +++ b/rootly_sdk/types.py @@ -2,7 +2,7 @@ from collections.abc import Mapping, MutableMapping from http import HTTPStatus -from typing import BinaryIO, Generic, TypeVar, Literal, IO +from typing import IO, BinaryIO, Generic, Literal, TypeVar from attrs import define From 1297c5df1bb95eaf38d16fc11340f27ac5ae76ad Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Mon, 20 Jul 2026 20:10:43 -0700 Subject: [PATCH 5/6] Add ruff check --fix step to Makefile regenerate target --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 69ce471e..94d22b41 100644 --- a/Makefile +++ b/Makefile @@ -41,8 +41,10 @@ regenerate: --config tools/config.yaml @echo "Applying nullable enum fix..." @python tools/fix_nullable_enums.py + @echo "Fixing lint errors..." + @ruff check --fix rootly_sdk/ @echo "Formatting patched files..." - @ruff format rootly_sdk/models/ + @ruff format rootly_sdk/ test: python -c "import rootly_sdk; print('SDK imports successfully')" From 063b4850b765eed25a8eca8f2a3d42ed854e73a6 Mon Sep 17 00:00:00 2001 From: Quentin Rousseau Date: Mon, 20 Jul 2026 20:12:01 -0700 Subject: [PATCH 6/6] Fix ruff formatting for entire rootly_sdk/ directory Previous commit only formatted models/ subdirectory, missing api/, client.py, errors.py, and types.py. --- rootly_sdk/__init__.py | 2 +- rootly_sdk/api/__init__.py | 2 +- rootly_sdk/api/ai_chat/__init__.py | 2 +- rootly_sdk/api/ai_chat/create_ai_chat.py | 87 +- .../api/ai_chat/delete_ai_chat_session.py | 31 +- .../ai_chat/list_ai_chat_session_messages.py | 87 +- rootly_sdk/api/ai_chat/stream_ai_chat.py | 39 +- rootly_sdk/api/alert_events/__init__.py | 2 +- .../api/alert_events/create_alert_event.py | 82 +- .../api/alert_events/delete_alert_event.py | 61 +- .../api/alert_events/get_alert_event.py | 71 +- .../api/alert_events/list_alert_events.py | 103 +- .../alert_events/list_alert_events_feed.py | 139 +- .../api/alert_events/update_alert_event.py | 82 +- rootly_sdk/api/alert_fields/__init__.py | 2 +- .../api/alert_fields/create_alert_field.py | 69 +- .../api/alert_fields/delete_alert_field.py | 73 +- .../api/alert_fields/get_alert_field.py | 71 +- .../api/alert_fields/list_alert_fields.py | 203 ++- .../api/alert_fields/update_alert_field.py | 81 +- rootly_sdk/api/alert_groups/__init__.py | 2 +- .../api/alert_groups/create_alert_group.py | 69 +- .../api/alert_groups/delete_alert_group.py | 71 +- .../api/alert_groups/get_alert_group.py | 71 +- .../api/alert_groups/list_alert_groups.py | 123 +- .../api/alert_groups/update_alert_group.py | 81 +- rootly_sdk/api/alert_routes/__init__.py | 2 +- .../api/alert_routes/create_alert_route.py | 69 +- .../api/alert_routes/delete_alert_route.py | 75 +- .../api/alert_routes/get_alert_route.py | 73 +- .../api/alert_routes/list_alert_routes.py | 165 +- .../api/alert_routes/patch_alert_route.py | 85 +- .../api/alert_routes/update_alert_route.py | 83 +- .../api/alert_routing_rules/__init__.py | 2 +- .../create_alert_routing_rule.py | 69 +- .../delete_alert_routing_rule.py | 71 +- .../get_alert_routing_rule.py | 71 +- .../list_alert_routing_rules.py | 199 ++- .../update_alert_routing_rule.py | 81 +- rootly_sdk/api/alert_sources/__init__.py | 2 +- .../api/alert_sources/create_alerts_source.py | 69 +- .../api/alert_sources/delete_alerts_source.py | 71 +- .../api/alert_sources/get_alerts_source.py | 71 +- .../api/alert_sources/list_alerts_sources.py | 123 +- .../api/alert_sources/update_alerts_source.py | 81 +- rootly_sdk/api/alert_urgencies/__init__.py | 2 +- .../alert_urgencies/create_alert_urgency.py | 69 +- .../alert_urgencies/delete_alert_urgency.py | 71 +- .../api/alert_urgencies/get_alert_urgency.py | 71 +- .../alert_urgencies/list_alert_urgencies.py | 163 +- .../alert_urgencies/update_alert_urgency.py | 81 +- rootly_sdk/api/alerts/__init__.py | 2 +- rootly_sdk/api/alerts/acknowledge_alert.py | 73 +- rootly_sdk/api/alerts/attach_alert.py | 77 +- rootly_sdk/api/alerts/create_alert.py | 69 +- rootly_sdk/api/alerts/escalate_alert.py | 86 +- rootly_sdk/api/alerts/get_alert.py | 81 +- rootly_sdk/api/alerts/get_receipt.py | 61 +- rootly_sdk/api/alerts/list_alerts.py | 451 +++--- rootly_sdk/api/alerts/list_incident_alerts.py | 71 +- rootly_sdk/api/alerts/resolve_alert.py | 82 +- rootly_sdk/api/alerts/snooze_alert.py | 85 +- rootly_sdk/api/alerts/update_alert.py | 82 +- rootly_sdk/api/api_keys/__init__.py | 2 +- rootly_sdk/api/api_keys/create_api_key.py | 69 +- rootly_sdk/api/api_keys/delete_api_key.py | 71 +- rootly_sdk/api/api_keys/get_api_key.py | 81 +- rootly_sdk/api/api_keys/list_api_keys.py | 253 ++- rootly_sdk/api/api_keys/rotate_api_key.py | 82 +- rootly_sdk/api/api_keys/update_api_key.py | 81 +- rootly_sdk/api/audits/__init__.py | 2 +- rootly_sdk/api/audits/list_audits.py | 275 ++-- rootly_sdk/api/authorizations/__init__.py | 2 +- .../authorizations/create_authorization.py | 67 +- .../authorizations/delete_authorization.py | 71 +- .../api/authorizations/get_authorization.py | 71 +- .../api/authorizations/list_authorizations.py | 147 +- .../authorizations/update_authorization.py | 81 +- .../catalog_checklist_templates/__init__.py | 2 +- .../create_catalog_checklist_template.py | 69 +- .../delete_catalog_checklist_template.py | 71 +- .../get_catalog_checklist_template.py | 71 +- .../list_catalog_checklist_templates.py | 155 +- .../trigger_catalog_checklist_template.py | 61 +- .../update_catalog_checklist_template.py | 81 +- rootly_sdk/api/catalog_entities/__init__.py | 2 +- .../bulk_delete_catalog_entities.py | 88 +- .../bulk_upsert_catalog_entities.py | 86 +- .../catalog_entities/create_catalog_entity.py | 83 +- .../catalog_entities/delete_catalog_entity.py | 71 +- .../catalog_entities/get_catalog_entity.py | 81 +- .../catalog_entities/list_catalog_entities.py | 271 ++-- .../catalog_entities/update_catalog_entity.py | 81 +- .../api/catalog_entity_checklists/__init__.py | 2 +- .../get_catalog_entity_checklist.py | 71 +- .../list_catalog_entity_checklists.py | 139 +- .../api/catalog_entity_properties/__init__.py | 2 +- .../create_catalog_entity_property.py | 83 +- .../delete_catalog_entity_property.py | 71 +- .../get_catalog_entity_property.py | 81 +- .../list_catalog_entity_properties.py | 151 +- .../update_catalog_entity_property.py | 81 +- rootly_sdk/api/catalog_properties/__init__.py | 2 +- .../create_catalog_property.py | 35 +- .../delete_catalog_property.py | 31 +- .../get_catalog_property.py | 31 +- .../list_catalog_properties.py | 31 +- .../update_catalog_property.py | 35 +- rootly_sdk/api/catalogs/__init__.py | 2 +- rootly_sdk/api/catalogs/create_catalog.py | 69 +- rootly_sdk/api/catalogs/delete_catalog.py | 71 +- rootly_sdk/api/catalogs/get_catalog.py | 71 +- rootly_sdk/api/catalogs/list_catalogs.py | 251 ++- rootly_sdk/api/catalogs/update_catalog.py | 81 +- rootly_sdk/api/causes/__init__.py | 2 +- rootly_sdk/api/causes/create_cause.py | 69 +- .../causes/create_cause_catalog_property.py | 69 +- rootly_sdk/api/causes/delete_cause.py | 71 +- rootly_sdk/api/causes/get_cause.py | 71 +- .../causes/list_cause_catalog_properties.py | 139 +- rootly_sdk/api/causes/list_causes.py | 195 ++- rootly_sdk/api/causes/update_cause.py | 81 +- .../api/communications_groups/__init__.py | 2 +- .../create_communications_group.py | 67 +- .../delete_communications_group.py | 61 +- .../get_communications_group.py | 71 +- .../list_communications_groups.py | 163 +- .../update_communications_group.py | 81 +- .../api/communications_stages/__init__.py | 2 +- .../create_communications_stage.py | 69 +- .../delete_communications_stage.py | 61 +- .../get_communications_stage.py | 71 +- .../list_communications_stages.py | 139 +- .../update_communications_stage.py | 81 +- .../api/communications_templates/__init__.py | 2 +- .../create_communications_template.py | 67 +- .../delete_communications_template.py | 61 +- .../get_communications_template.py | 71 +- .../list_communications_templates.py | 147 +- .../update_communications_template.py | 81 +- .../api/communications_types/__init__.py | 2 +- .../create_communications_type.py | 67 +- .../delete_communications_type.py | 61 +- .../get_communications_type.py | 71 +- .../list_communications_types.py | 139 +- .../update_communications_type.py | 81 +- rootly_sdk/api/custom_forms/__init__.py | 2 +- .../api/custom_forms/create_custom_form.py | 69 +- .../api/custom_forms/delete_custom_form.py | 71 +- .../api/custom_forms/get_custom_form.py | 71 +- .../api/custom_forms/list_custom_forms.py | 149 +- .../api/custom_forms/update_custom_form.py | 81 +- rootly_sdk/api/dashboard_panels/__init__.py | 2 +- .../create_dashboard_panel.py | 81 +- .../delete_dashboard_panel.py | 65 +- .../duplicate_dashboard_panel.py | 71 +- .../dashboard_panels/get_dashboard_panel.py | 91 +- .../dashboard_panels/list_dashboard_panels.py | 87 +- .../update_dashboard_panel.py | 75 +- rootly_sdk/api/dashboards/__init__.py | 2 +- rootly_sdk/api/dashboards/create_dashboard.py | 69 +- rootly_sdk/api/dashboards/delete_dashboard.py | 71 +- .../api/dashboards/duplicate_dashboard.py | 71 +- rootly_sdk/api/dashboards/get_dashboard.py | 81 +- rootly_sdk/api/dashboards/list_dashboards.py | 75 +- .../api/dashboards/set_default_dashboard.py | 71 +- rootly_sdk/api/dashboards/update_dashboard.py | 81 +- .../__init__.py | 2 +- .../create_custom_field_option.py | 83 +- .../delete_custom_field_option.py | 71 +- .../get_custom_field_option.py | 71 +- .../list_custom_field_options.py | 107 +- .../update_custom_field_option.py | 81 +- .../api/deprecated_custom_fields/__init__.py | 2 +- .../create_custom_field.py | 69 +- .../delete_custom_field.py | 71 +- .../get_custom_field.py | 81 +- .../list_custom_fields.py | 275 ++-- .../update_custom_field.py | 81 +- .../__init__.py | 2 +- .../create_incident_custom_field_selection.py | 83 +- .../delete_incident_custom_field_selection.py | 71 +- .../get_incident_custom_field_selection.py | 71 +- .../list_incident_custom_field_selections.py | 95 +- .../update_incident_custom_field_selection.py | 81 +- .../__init__.py | 2 +- .../create_workflow_custom_field_selection.py | 81 +- .../delete_workflow_custom_field_selection.py | 71 +- .../get_workflow_custom_field_selection.py | 71 +- .../list_workflow_custom_field_selections.py | 95 +- .../update_workflow_custom_field_selection.py | 81 +- .../api/edge_connector_actions/__init__.py | 2 +- .../create_edge_connector_action.py | 36 +- .../delete_edge_connector_action.py | 36 +- .../get_edge_connector_action.py | 36 +- .../list_edge_connector_actions.py | 31 +- .../update_edge_connector_action.py | 41 +- rootly_sdk/api/edge_connectors/__init__.py | 2 +- .../edge_connectors/create_edge_connector.py | 28 +- .../edge_connectors/delete_edge_connector.py | 31 +- .../api/edge_connectors/get_edge_connector.py | 31 +- .../edge_connectors/list_edge_connectors.py | 39 +- .../edge_connectors/update_edge_connector.py | 36 +- rootly_sdk/api/environments/__init__.py | 2 +- .../environments/bulk_delete_environments.py | 74 +- .../environments/bulk_upsert_environments.py | 72 +- .../api/environments/create_environment.py | 69 +- .../create_environment_catalog_property.py | 69 +- .../api/environments/delete_environment.py | 71 +- .../api/environments/get_environment.py | 71 +- .../list_environment_catalog_properties.py | 139 +- .../api/environments/list_environments.py | 243 ++- .../api/environments/update_environment.py | 81 +- rootly_sdk/api/escalation_levels/__init__.py | 2 +- .../delete_escalation_level.py | 71 +- .../escalation_levels/get_escalation_level.py | 71 +- .../update_escalation_level.py | 81 +- .../api/escalation_levels_path/__init__.py | 2 +- .../create_escalation_level_paths.py | 83 +- .../list_escalation_levels_paths.py | 95 +- .../escalation_levels_policies/__init__.py | 2 +- .../create_escalation_level.py | 83 +- .../list_escalation_levels.py | 95 +- rootly_sdk/api/escalation_paths/__init__.py | 2 +- .../create_escalation_path.py | 83 +- .../delete_escalation_path.py | 71 +- .../escalation_paths/get_escalation_path.py | 81 +- .../escalation_paths/list_escalation_paths.py | 103 +- .../update_escalation_path.py | 81 +- .../api/escalation_policies/__init__.py | 2 +- .../create_escalation_policy.py | 69 +- .../delete_escalation_policy.py | 71 +- .../get_escalation_policy.py | 81 +- .../list_escalation_policies.py | 199 ++- .../update_escalation_policy.py | 81 +- rootly_sdk/api/form_field_options/__init__.py | 2 +- .../create_form_field_option.py | 83 +- .../delete_form_field_option.py | 71 +- .../get_form_field_option.py | 71 +- .../list_form_field_options.py | 103 +- .../update_form_field_option.py | 81 +- .../__init__.py | 2 +- .../create_form_field_placement_condition.py | 83 +- .../delete_form_field_placement_condition.py | 71 +- .../get_form_field_placement_condition.py | 71 +- .../list_form_field_placement_conditions.py | 103 +- .../update_form_field_placement_condition.py | 81 +- .../api/form_field_placements/__init__.py | 2 +- .../create_form_field_placement.py | 83 +- .../delete_form_field_placement.py | 71 +- .../get_form_field_placement.py | 71 +- .../list_form_field_placements.py | 99 +- .../update_form_field_placement.py | 83 +- .../api/form_field_positions/__init__.py | 2 +- .../create_form_field_position.py | 83 +- .../delete_form_field_position.py | 71 +- .../get_form_field_position.py | 71 +- .../list_form_field_positions.py | 99 +- .../update_form_field_position.py | 83 +- rootly_sdk/api/form_fields/__init__.py | 2 +- .../api/form_fields/create_form_field.py | 69 +- .../api/form_fields/delete_form_field.py | 71 +- rootly_sdk/api/form_fields/get_form_field.py | 81 +- .../api/form_fields/list_form_fields.py | 275 ++-- .../api/form_fields/update_form_field.py | 81 +- .../api/form_set_conditions/__init__.py | 2 +- .../create_form_set_condition.py | 83 +- .../delete_form_set_condition.py | 71 +- .../get_form_set_condition.py | 71 +- .../list_form_set_conditions.py | 99 +- .../update_form_set_condition.py | 81 +- rootly_sdk/api/form_sets/__init__.py | 2 +- rootly_sdk/api/form_sets/create_form_set.py | 69 +- rootly_sdk/api/form_sets/delete_form_set.py | 71 +- rootly_sdk/api/form_sets/get_form_set.py | 71 +- rootly_sdk/api/form_sets/list_form_sets.py | 123 +- rootly_sdk/api/form_sets/update_form_set.py | 81 +- rootly_sdk/api/functionalities/__init__.py | 2 +- .../bulk_delete_functionalities.py | 74 +- .../bulk_upsert_functionalities.py | 72 +- .../functionalities/create_functionality.py | 69 +- .../create_functionality_catalog_property.py | 69 +- .../functionalities/delete_functionality.py | 71 +- .../api/functionalities/get_functionality.py | 71 +- .../get_functionality_incidents_chart.py | 81 +- .../get_functionality_uptime_chart.py | 81 +- .../functionalities/list_functionalities.py | 235 ++- .../list_functionality_catalog_properties.py | 139 +- .../functionalities/update_functionality.py | 81 +- rootly_sdk/api/heartbeats/__init__.py | 2 +- rootly_sdk/api/heartbeats/create_heartbeat.py | 69 +- rootly_sdk/api/heartbeats/delete_heartbeat.py | 71 +- rootly_sdk/api/heartbeats/get_heartbeat.py | 71 +- rootly_sdk/api/heartbeats/list_heartbeats.py | 131 +- rootly_sdk/api/heartbeats/ping_heartbeat.py | 61 +- rootly_sdk/api/heartbeats/update_heartbeat.py | 83 +- .../api/incident_action_items/__init__.py | 2 +- .../create_incident_action_item.py | 83 +- .../delete_incident_action_item.py | 71 +- .../get_incident_action_items.py | 71 +- .../list_all_incident_action_items.py | 343 ++--- .../list_incident_action_items.py | 91 +- .../update_incident_action_item.py | 81 +- .../__init__.py | 2 +- .../create_incident_event_functionality.py | 83 +- .../delete_incident_event_functionality.py | 71 +- .../get_incident_event_functionalities.py | 71 +- .../list_incident_event_functionalities.py | 95 +- .../update_incident_event_functionality.py | 81 +- .../api/incident_event_services/__init__.py | 2 +- .../create_incident_event_service.py | 83 +- .../delete_incident_event_service.py | 71 +- .../get_incident_event_services.py | 71 +- .../list_incident_event_services.py | 95 +- .../update_incident_event_service.py | 81 +- rootly_sdk/api/incident_events/__init__.py | 2 +- .../incident_events/create_incident_event.py | 83 +- .../incident_events/delete_incident_event.py | 71 +- .../incident_events/get_incident_events.py | 71 +- .../incident_events/list_incident_events.py | 87 +- .../incident_events/update_incident_event.py | 81 +- rootly_sdk/api/incident_feedbacks/__init__.py | 2 +- .../create_incident_feedback.py | 83 +- .../get_incident_feedbacks.py | 71 +- .../list_incident_feedbacks.py | 91 +- .../update_incident_feedback.py | 81 +- .../__init__.py | 2 +- .../create_incident_form_field_selection.py | 83 +- .../delete_incident_form_field_selection.py | 71 +- .../get_incident_form_field_selection.py | 71 +- .../list_incident_form_field_selections.py | 95 +- .../update_incident_form_field_selection.py | 81 +- .../__init__.py | 2 +- .../create_incident_permission_set_boolean.py | 83 +- .../delete_incident_permission_set_boolean.py | 71 +- .../get_incident_permission_set_boolean.py | 71 +- .../list_incident_permission_set_booleans.py | 143 +- .../update_incident_permission_set_boolean.py | 81 +- .../__init__.py | 2 +- ...create_incident_permission_set_resource.py | 83 +- ...delete_incident_permission_set_resource.py | 71 +- .../get_incident_permission_set_resource.py | 71 +- .../list_incident_permission_set_resources.py | 143 +- ...update_incident_permission_set_resource.py | 81 +- .../api/incident_permission_sets/__init__.py | 2 +- .../create_incident_permission_set.py | 69 +- .../delete_incident_permission_set.py | 71 +- .../get_incident_permission_set.py | 71 +- .../list_incident_permission_sets.py | 147 +- .../update_incident_permission_set.py | 81 +- .../incident_retrospective_steps/__init__.py | 2 +- .../get_incident_retrospective_step.py | 71 +- .../update_incident_retrospective_step.py | 81 +- .../api/incident_retrospectives/__init__.py | 2 +- .../list_incident_post_mortems.py | 351 ++--- .../list_incident_postmortem.py | 71 +- .../update_incident_postmortem.py | 81 +- .../api/incident_role_tasks/__init__.py | 2 +- .../create_incident_role_task.py | 83 +- .../delete_incident_role_task.py | 71 +- .../get_incident_role_task.py | 71 +- .../list_incident_role_tasks.py | 91 +- .../update_incident_role_task.py | 81 +- rootly_sdk/api/incident_roles/__init__.py | 2 +- .../incident_roles/create_incident_role.py | 69 +- .../incident_roles/delete_incident_role.py | 71 +- .../api/incident_roles/get_incident_role.py | 71 +- .../api/incident_roles/list_incident_roles.py | 235 ++- .../incident_roles/update_incident_role.py | 81 +- .../incident_status_page_events/__init__.py | 2 +- .../create_incident_status_page.py | 83 +- .../delete_incident_status_page.py | 71 +- .../get_incident_status_pages.py | 71 +- .../list_incident_status_pages.py | 95 +- .../update_incident_status_page.py | 81 +- .../api/incident_sub_statuses/__init__.py | 2 +- .../create_incident_sub_status.py | 81 +- .../delete_incident_sub_status.py | 71 +- .../get_incident_sub_status.py | 79 +- .../list_incident_sub_statuses.py | 139 +- .../update_incident_sub_status.py | 79 +- rootly_sdk/api/incident_types/__init__.py | 2 +- .../incident_types/create_incident_type.py | 69 +- .../create_incident_type_catalog_property.py | 69 +- .../incident_types/delete_incident_type.py | 71 +- .../api/incident_types/get_incident_type.py | 71 +- .../list_incident_type_catalog_properties.py | 139 +- .../api/incident_types/list_incident_types.py | 235 ++- .../incident_types/update_incident_type.py | 81 +- rootly_sdk/api/incidents/__init__.py | 2 +- .../incidents/add_subscribers_to_incident.py | 81 +- .../api/incidents/assign_user_to_incident.py | 81 +- rootly_sdk/api/incidents/cancel_incident.py | 81 +- rootly_sdk/api/incidents/create_incident.py | 69 +- rootly_sdk/api/incidents/delete_incident.py | 71 +- .../incidents/detach_from_parent_incident.py | 71 +- rootly_sdk/api/incidents/get_incident.py | 81 +- rootly_sdk/api/incidents/list_incidents.py | 1365 ++++++++--------- .../incidents/mark_as_duplicate_incident.py | 81 +- rootly_sdk/api/incidents/mitigate_incident.py | 81 +- .../remove_assigned_user_from_incident.py | 81 +- .../remove_subscribers_to_incident.py | 81 +- rootly_sdk/api/incidents/resolve_incident.py | 81 +- rootly_sdk/api/incidents/restart_incident.py | 81 +- rootly_sdk/api/incidents/triage_incident.py | 81 +- .../incidents/unmark_as_duplicate_incident.py | 71 +- rootly_sdk/api/incidents/update_incident.py | 81 +- rootly_sdk/api/ip_ranges/__init__.py | 2 +- rootly_sdk/api/ip_ranges/get_ip_ranges.py | 62 +- rootly_sdk/api/live_call_routers/__init__.py | 2 +- .../create_live_call_router.py | 69 +- .../delete_live_call_router.py | 71 +- .../generate_phone_number_live_call_router.py | 67 +- .../live_call_routers/get_live_call_router.py | 71 +- .../list_live_call_routers.py | 139 +- .../update_live_call_router.py | 81 +- rootly_sdk/api/meeting_recordings/__init__.py | 2 +- .../create_meeting_recording.py | 79 +- .../delete_meeting_recording.py | 69 +- .../delete_meeting_recording_video.py | 69 +- .../delete_standalone_meeting_recording.py | 31 +- .../get_meeting_recording.py | 79 +- .../import_meeting_recording.py | 80 +- .../leave_meeting_recording.py | 69 +- .../list_all_meeting_recordings.py | 79 +- .../list_meeting_recordings.py | 87 +- .../pause_meeting_recording.py | 69 +- .../resume_meeting_recording.py | 69 +- .../start_recording_session.py | 66 +- .../stop_meeting_recording.py | 69 +- .../api/on_call_pay_reports/__init__.py | 2 +- .../create_on_call_pay_report.py | 69 +- .../get_on_call_pay_report.py | 81 +- .../list_on_call_pay_reports.py | 115 +- .../regenerate_on_call_pay_report.py | 71 +- .../update_on_call_pay_report.py | 83 +- rootly_sdk/api/on_call_roles/__init__.py | 2 +- .../api/on_call_roles/create_on_call_role.py | 69 +- .../api/on_call_roles/delete_on_call_role.py | 71 +- .../api/on_call_roles/get_on_call_role.py | 71 +- .../api/on_call_roles/list_on_call_roles.py | 139 +- .../api/on_call_roles/update_on_call_role.py | 81 +- rootly_sdk/api/on_call_shadows/__init__.py | 2 +- .../on_call_shadows/create_on_call_shadow.py | 83 +- .../api/on_call_shadows/get_on_call_shadow.py | 71 +- .../on_call_shadows/list_on_call_shadows.py | 87 +- .../on_call_shadows/update_on_call_shadow.py | 81 +- rootly_sdk/api/on_calls/__init__.py | 2 +- rootly_sdk/api/on_calls/list_oncalls.py | 151 +- rootly_sdk/api/override_shifts/__init__.py | 2 +- .../override_shifts/create_override_shift.py | 85 +- .../override_shifts/delete_on_call_shadow.py | 73 +- .../override_shifts/delete_override_shift.py | 71 +- .../api/override_shifts/get_override_shift.py | 71 +- .../override_shifts/list_override_shifts.py | 87 +- .../override_shifts/update_override_shift.py | 81 +- rootly_sdk/api/playbook_tasks/__init__.py | 2 +- .../playbook_tasks/create_playbook_task.py | 83 +- .../playbook_tasks/delete_playbook_task.py | 71 +- .../api/playbook_tasks/get_playbook_task.py | 71 +- .../api/playbook_tasks/list_playbook_tasks.py | 87 +- .../playbook_tasks/update_playbook_task.py | 81 +- rootly_sdk/api/playbooks/__init__.py | 2 +- rootly_sdk/api/playbooks/create_playbook.py | 69 +- rootly_sdk/api/playbooks/delete_playbook.py | 71 +- rootly_sdk/api/playbooks/get_playbook.py | 81 +- rootly_sdk/api/playbooks/list_playbooks.py | 75 +- rootly_sdk/api/playbooks/update_playbook.py | 81 +- rootly_sdk/api/pulses/__init__.py | 2 +- rootly_sdk/api/pulses/create_pulse.py | 69 +- rootly_sdk/api/pulses/get_pulse.py | 71 +- rootly_sdk/api/pulses/list_pulses.py | 371 +++-- rootly_sdk/api/pulses/update_pulse.py | 81 +- .../retrospective_configurations/__init__.py | 2 +- .../get_retrospective_configuration.py | 81 +- .../list_retrospective_configurations.py | 91 +- .../update_retrospective_configuration.py | 81 +- .../__init__.py | 2 +- ...create_retrospective_process_group_step.py | 81 +- ...delete_retrospective_process_group_step.py | 71 +- .../get_retrospective_process_group_step.py | 69 +- .../list_retrospective_process_group_steps.py | 135 +- ...update_retrospective_process_group_step.py | 79 +- .../retrospective_process_groups/__init__.py | 2 +- .../create_retrospective_process_group.py | 81 +- .../delete_retrospective_process_group.py | 71 +- .../get_retrospective_process_group.py | 79 +- .../list_retrospective_process_groups.py | 143 +- .../update_retrospective_process_group.py | 79 +- .../api/retrospective_processes/__init__.py | 2 +- .../create_retrospective_process.py | 69 +- .../delete_retrospective_process.py | 71 +- .../get_retrospective_process.py | 81 +- .../list_retrospective_processes.py | 83 +- .../update_retrospective_process.py | 81 +- .../api/retrospective_steps/__init__.py | 2 +- .../create_retrospective_step.py | 83 +- .../delete_retrospective_step.py | 71 +- .../get_retrospective_step.py | 71 +- .../list_retrospective_steps.py | 99 +- .../update_retrospective_step.py | 81 +- .../api/retrospective_templates/__init__.py | 2 +- .../create_postmortem_template.py | 69 +- .../delete_postmortem_template.py | 71 +- .../get_postmortem_template.py | 71 +- .../list_postmortem_templates.py | 79 +- .../update_postmortem_template.py | 81 +- rootly_sdk/api/roles/__init__.py | 2 +- rootly_sdk/api/roles/create_role.py | 69 +- rootly_sdk/api/roles/delete_role.py | 71 +- rootly_sdk/api/roles/get_role.py | 71 +- rootly_sdk/api/roles/list_roles.py | 139 +- rootly_sdk/api/roles/update_role.py | 81 +- .../schedule_rotation_active_days/__init__.py | 2 +- .../create_schedule_rotation_active_day.py | 83 +- .../delete_schedule_rotation_active_day.py | 71 +- .../get_schedule_rotation_active_day.py | 71 +- .../list_schedule_rotation_active_days.py | 95 +- .../update_schedule_rotation_active_day.py | 81 +- .../api/schedule_rotation_users/__init__.py | 2 +- .../create_schedule_rotation_user.py | 83 +- .../delete_schedule_rotation_user.py | 71 +- .../get_schedule_rotation_user.py | 71 +- .../list_schedule_rotation_users.py | 95 +- .../update_schedule_rotation_user.py | 81 +- rootly_sdk/api/schedule_rotations/__init__.py | 2 +- .../create_schedule_rotation.py | 83 +- .../delete_schedule_rotation.py | 71 +- .../get_schedule_rotation.py | 71 +- .../list_schedule_rotations.py | 99 +- .../update_schedule_rotation.py | 81 +- rootly_sdk/api/schedules/__init__.py | 2 +- rootly_sdk/api/schedules/create_schedule.py | 69 +- rootly_sdk/api/schedules/delete_schedule.py | 71 +- rootly_sdk/api/schedules/get_schedule.py | 71 +- rootly_sdk/api/schedules/list_schedules.py | 155 +- rootly_sdk/api/schedules/update_schedule.py | 81 +- rootly_sdk/api/secrets/__init__.py | 2 +- rootly_sdk/api/secrets/create_secret.py | 69 +- rootly_sdk/api/secrets/delete_secret.py | 71 +- rootly_sdk/api/secrets/get_secret.py | 71 +- rootly_sdk/api/secrets/list_secrets.py | 75 +- rootly_sdk/api/secrets/update_secret.py | 81 +- rootly_sdk/api/services/__init__.py | 2 +- .../api/services/bulk_delete_services.py | 74 +- .../api/services/bulk_upsert_services.py | 72 +- rootly_sdk/api/services/create_service.py | 69 +- .../create_service_catalog_property.py | 69 +- rootly_sdk/api/services/delete_service.py | 71 +- rootly_sdk/api/services/get_service.py | 71 +- .../services/get_service_incidents_chart.py | 81 +- .../api/services/get_service_uptime_chart.py | 81 +- .../list_service_catalog_properties.py | 139 +- rootly_sdk/api/services/list_services.py | 315 ++-- rootly_sdk/api/services/update_service.py | 81 +- rootly_sdk/api/severities/__init__.py | 2 +- rootly_sdk/api/severities/create_severity.py | 69 +- rootly_sdk/api/severities/delete_severity.py | 71 +- rootly_sdk/api/severities/get_severity.py | 71 +- rootly_sdk/api/severities/list_severities.py | 283 ++-- rootly_sdk/api/severities/update_severity.py | 81 +- .../api/shift_coverage_requests/__init__.py | 2 +- .../create_shift_coverage_request.py | 81 +- .../delete_shift_coverage_request.py | 69 +- .../get_shift_coverage_request.py | 69 +- .../list_shift_coverage_requests.py | 69 +- rootly_sdk/api/shifts/__init__.py | 2 +- rootly_sdk/api/shifts/get_schedule_shifts.py | 85 +- rootly_sdk/api/shifts/list_shifts.py | 115 +- rootly_sdk/api/sl_as/__init__.py | 2 +- rootly_sdk/api/sl_as/create_sla.py | 69 +- rootly_sdk/api/sl_as/delete_sla.py | 71 +- rootly_sdk/api/sl_as/get_sla.py | 71 +- rootly_sdk/api/sl_as/list_sl_as.py | 195 ++- rootly_sdk/api/sl_as/update_sla.py | 81 +- .../api/status_page_templates/__init__.py | 2 +- .../create_status_page_template.py | 83 +- .../delete_status_page_template.py | 71 +- .../get_status_page_template.py | 71 +- .../list_status_page_templates.py | 91 +- .../update_status_page_template.py | 81 +- rootly_sdk/api/status_pages/__init__.py | 2 +- .../api/status_pages/create_status_page.py | 69 +- .../api/status_pages/delete_status_page.py | 71 +- .../api/status_pages/get_status_page.py | 71 +- .../api/status_pages/list_status_pages.py | 203 ++- .../api/status_pages/update_status_page.py | 83 +- rootly_sdk/api/statuses/__init__.py | 2 +- rootly_sdk/api/statuses/get_status.py | 71 +- rootly_sdk/api/statuses/list_statuses.py | 141 +- rootly_sdk/api/sub_statuses/__init__.py | 2 +- .../api/sub_statuses/create_sub_status.py | 69 +- .../api/sub_statuses/delete_sub_status.py | 71 +- rootly_sdk/api/sub_statuses/get_sub_status.py | 71 +- .../api/sub_statuses/list_sub_statuses.py | 131 +- .../api/sub_statuses/update_sub_status.py | 81 +- rootly_sdk/api/teams/__init__.py | 2 +- rootly_sdk/api/teams/bulk_delete_groups.py | 74 +- rootly_sdk/api/teams/bulk_upsert_groups.py | 72 +- .../teams/create_group_catalog_property.py | 69 +- rootly_sdk/api/teams/create_team.py | 69 +- rootly_sdk/api/teams/delete_team.py | 71 +- rootly_sdk/api/teams/get_team.py | 81 +- .../api/teams/get_team_incidents_chart.py | 81 +- .../teams/list_group_catalog_properties.py | 139 +- rootly_sdk/api/teams/list_teams.py | 355 ++--- rootly_sdk/api/teams/update_team.py | 81 +- .../api/user_email_addresses/__init__.py | 2 +- .../create_user_email_address.py | 85 +- .../delete_user_email_address.py | 73 +- .../get_user_email_addresses.py | 73 +- .../resend_user_email_address_verification.py | 73 +- .../show_user_email_address.py | 73 +- .../update_user_email_address.py | 85 +- .../verify_user_email_address.py | 83 +- .../api/user_notification_rules/__init__.py | 2 +- .../create_user_notification_rule.py | 83 +- .../delete_user_notification_rule.py | 71 +- .../get_user_notification_rule.py | 71 +- .../list_user_notification_rules.py | 103 +- .../update_user_notification_rule.py | 81 +- rootly_sdk/api/user_phone_numbers/__init__.py | 2 +- .../create_user_phone_number.py | 85 +- .../delete_user_phone_number.py | 75 +- .../get_user_phone_numbers.py | 73 +- .../show_user_phone_number.py | 73 +- .../update_user_phone_number.py | 85 +- rootly_sdk/api/users/__init__.py | 2 +- rootly_sdk/api/users/delete_user.py | 71 +- rootly_sdk/api/users/get_current_user.py | 72 +- rootly_sdk/api/users/get_user.py | 81 +- rootly_sdk/api/users/list_users.py | 137 +- rootly_sdk/api/users/update_user.py | 82 +- .../api/webhooks_deliveries/__init__.py | 2 +- .../deliver_webhooks_delivery.py | 69 +- .../get_webhooks_delivery.py | 71 +- .../list_webhooks_deliveries.py | 91 +- rootly_sdk/api/webhooks_endpoints/__init__.py | 2 +- .../create_webhooks_endpoint.py | 69 +- .../delete_webhooks_endpoint.py | 71 +- .../get_webhooks_endpoint.py | 71 +- .../list_webhooks_endpoints.py | 95 +- .../update_webhooks_endpoint.py | 81 +- .../__init__.py | 2 +- ...rkflow_action_item_form_field_condition.py | 83 +- ...rkflow_action_item_form_field_condition.py | 71 +- ...rkflow_action_item_form_field_condition.py | 71 +- ...kflow_action_item_form_field_conditions.py | 95 +- ...rkflow_action_item_form_field_condition.py | 81 +- .../__init__.py | 2 +- .../create_workflow_form_field_condition.py | 81 +- .../delete_workflow_form_field_condition.py | 71 +- .../get_workflow_form_field_condition.py | 71 +- .../list_workflow_form_field_conditions.py | 95 +- .../update_workflow_form_field_condition.py | 81 +- rootly_sdk/api/workflow_groups/__init__.py | 2 +- .../workflow_groups/create_workflow_group.py | 69 +- .../workflow_groups/delete_workflow_group.py | 71 +- .../api/workflow_groups/get_workflow_group.py | 71 +- .../workflow_groups/list_workflow_groups.py | 123 +- .../workflow_groups/update_workflow_group.py | 81 +- rootly_sdk/api/workflow_runs/__init__.py | 2 +- .../api/workflow_runs/create_workflow_run.py | 83 +- .../api/workflow_runs/list_workflow_runs.py | 119 +- rootly_sdk/api/workflow_tasks/__init__.py | 2 +- .../workflow_tasks/create_workflow_task.py | 81 +- .../workflow_tasks/delete_workflow_task.py | 71 +- .../api/workflow_tasks/get_workflow_task.py | 71 +- .../api/workflow_tasks/list_workflow_tasks.py | 175 +-- .../workflow_tasks/update_workflow_task.py | 81 +- rootly_sdk/api/workflows/__init__.py | 2 +- rootly_sdk/api/workflows/create_workflow.py | 69 +- rootly_sdk/api/workflows/delete_workflow.py | 71 +- rootly_sdk/api/workflows/get_workflow.py | 81 +- rootly_sdk/api/workflows/list_workflows.py | 203 ++- rootly_sdk/api/workflows/update_workflow.py | 83 +- rootly_sdk/client.py | 2 +- rootly_sdk/errors.py | 4 +- rootly_sdk/types.py | 9 +- 679 files changed, 21086 insertions(+), 30158 deletions(-) diff --git a/rootly_sdk/__init__.py b/rootly_sdk/__init__.py index a01e77a4..99630356 100644 --- a/rootly_sdk/__init__.py +++ b/rootly_sdk/__init__.py @@ -1,5 +1,5 @@ +"""A client library for accessing Rootly API v1""" -""" A client library for accessing Rootly API v1 """ from .client import AuthenticatedClient, Client __all__ = ( diff --git a/rootly_sdk/api/__init__.py b/rootly_sdk/api/__init__.py index dc035f4c..81f9fa24 100644 --- a/rootly_sdk/api/__init__.py +++ b/rootly_sdk/api/__init__.py @@ -1 +1 @@ -""" Contains methods for accessing the API """ +"""Contains methods for accessing the API""" diff --git a/rootly_sdk/api/ai_chat/__init__.py b/rootly_sdk/api/ai_chat/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/ai_chat/__init__.py +++ b/rootly_sdk/api/ai_chat/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/ai_chat/create_ai_chat.py b/rootly_sdk/api/ai_chat/create_ai_chat.py index c31dd130..a1b78093 100644 --- a/rootly_sdk/api/ai_chat/create_ai_chat.py +++ b/rootly_sdk/api/ai_chat/create_ai_chat.py @@ -16,11 +16,7 @@ def _get_kwargs( session_id: UUID | Unset = UNSET, incident_id: UUID | Unset = UNSET, alert_id: UUID | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -41,27 +37,21 @@ def _get_kwargs( json_alert_id = str(alert_id) params["alert_id"] = json_alert_id - 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/ai/chat", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AiChatResponse | Any | None: if response.status_code == 200: response_200 = AiChatResponse.from_dict(response.json()) - - return response_200 if response.status_code == 403: @@ -78,7 +68,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AiChatResponse | Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiChatResponse | Any]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -94,9 +86,8 @@ def sync_detailed( session_id: UUID | Unset = UNSET, incident_id: UUID | Unset = UNSET, alert_id: UUID | Unset = UNSET, - ) -> Response[AiChatResponse | Any]: - """ Send AI chat message + """Send AI chat message Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API @@ -114,15 +105,13 @@ def sync_detailed( Returns: Response[AiChatResponse | Any] - """ - + """ kwargs = _get_kwargs( message=message, -session_id=session_id, -incident_id=incident_id, -alert_id=alert_id, - + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, ) response = client.get_httpx_client().request( @@ -131,6 +120,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -138,9 +128,8 @@ def sync( session_id: UUID | Unset = UNSET, incident_id: UUID | Unset = UNSET, alert_id: UUID | Unset = UNSET, - ) -> AiChatResponse | Any | None: - """ Send AI chat message + """Send AI chat message Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API @@ -158,18 +147,17 @@ def sync( Returns: AiChatResponse | Any - """ - + """ return sync_detailed( client=client, -message=message, -session_id=session_id, -incident_id=incident_id, -alert_id=alert_id, - + message=message, + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -177,9 +165,8 @@ async def asyncio_detailed( session_id: UUID | Unset = UNSET, incident_id: UUID | Unset = UNSET, alert_id: UUID | Unset = UNSET, - ) -> Response[AiChatResponse | Any]: - """ Send AI chat message + """Send AI chat message Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API @@ -197,23 +184,20 @@ async def asyncio_detailed( Returns: Response[AiChatResponse | Any] - """ - + """ kwargs = _get_kwargs( message=message, -session_id=session_id, -incident_id=incident_id, -alert_id=alert_id, - + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -221,9 +205,8 @@ async def asyncio( session_id: UUID | Unset = UNSET, incident_id: UUID | Unset = UNSET, alert_id: UUID | Unset = UNSET, - ) -> AiChatResponse | Any | None: - """ Send AI chat message + """Send AI chat message Send a message to the AI assistant and receive a synchronous reply. Optionally bind the conversation to an incident or alert for context-aware responses. Requires `ai.chat:write` OAuth scope or an API @@ -241,14 +224,14 @@ async def asyncio( Returns: AiChatResponse | Any - """ - - - return (await asyncio_detailed( - client=client, -message=message, -session_id=session_id, -incident_id=incident_id, -alert_id=alert_id, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + message=message, + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, + ) + ).parsed diff --git a/rootly_sdk/api/ai_chat/delete_ai_chat_session.py b/rootly_sdk/api/ai_chat/delete_ai_chat_session.py index d2019326..810d9b1e 100644 --- a/rootly_sdk/api/ai_chat/delete_ai_chat_session.py +++ b/rootly_sdk/api/ai_chat/delete_ai_chat_session.py @@ -12,24 +12,18 @@ def _get_kwargs( id: UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/ai/chat/sessions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/ai/chat/sessions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 204: return None @@ -56,9 +50,8 @@ def sync_detailed( id: UUID, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete AI chat session + """Delete AI chat session Permanently deletes an AI chat session and all its messages. Requires `ai.chat:write` OAuth scope or an API key. @@ -72,12 +65,10 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -91,9 +82,8 @@ async def asyncio_detailed( id: UUID, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete AI chat session + """Delete AI chat session Permanently deletes an AI chat session and all its messages. Requires `ai.chat:write` OAuth scope or an API key. @@ -107,17 +97,12 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - diff --git a/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py b/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py index fd939f80..8f13b2d4 100644 --- a/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py +++ b/rootly_sdk/api/ai_chat/list_ai_chat_session_messages.py @@ -16,11 +16,7 @@ def _get_kwargs( *, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -28,27 +24,25 @@ def _get_kwargs( 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/ai/chat/sessions/{session_id}/messages".format(session_id=quote(str(session_id), safe=""),), + "url": "/v1/ai/chat/sessions/{session_id}/messages".format( + session_id=quote(str(session_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AiChatSessionMessageList | Any | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AiChatSessionMessageList | Any | None: if response.status_code == 200: response_200 = AiChatSessionMessageList.from_dict(response.json()) - - return response_200 if response.status_code == 404: @@ -61,7 +55,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AiChatSessionMessageList | Any]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AiChatSessionMessageList | Any]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +72,8 @@ def sync_detailed( client: AuthenticatedClient, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[AiChatSessionMessageList | Any]: - """ List AI chat session messages + """List AI chat session messages Returns the user and assistant message history for a session, paginated and chronologically ordered. Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. @@ -94,14 +89,12 @@ def sync_detailed( Returns: Response[AiChatSessionMessageList | Any] - """ - + """ kwargs = _get_kwargs( session_id=session_id, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,15 +103,15 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( session_id: UUID, *, client: AuthenticatedClient, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> AiChatSessionMessageList | Any | None: - """ List AI chat session messages + """List AI chat session messages Returns the user and assistant message history for a session, paginated and chronologically ordered. Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. @@ -134,26 +127,24 @@ def sync( Returns: AiChatSessionMessageList | Any - """ - + """ return sync_detailed( session_id=session_id, -client=client, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( session_id: UUID, *, client: AuthenticatedClient, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[AiChatSessionMessageList | Any]: - """ List AI chat session messages + """List AI chat session messages Returns the user and assistant message history for a session, paginated and chronologically ordered. Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. @@ -169,31 +160,27 @@ async def asyncio_detailed( Returns: Response[AiChatSessionMessageList | Any] - """ - + """ kwargs = _get_kwargs( session_id=session_id, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( session_id: UUID, *, client: AuthenticatedClient, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> AiChatSessionMessageList | Any | None: - """ List AI chat session messages + """List AI chat session messages Returns the user and assistant message history for a session, paginated and chronologically ordered. Internal tool messages are filtered out. Requires `ai.chat:read` OAuth scope or an API key. @@ -209,13 +196,13 @@ async def asyncio( Returns: AiChatSessionMessageList | Any - """ - - - return (await asyncio_detailed( - session_id=session_id, -client=client, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + session_id=session_id, + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/ai_chat/stream_ai_chat.py b/rootly_sdk/api/ai_chat/stream_ai_chat.py index d49aab5b..db3d600b 100644 --- a/rootly_sdk/api/ai_chat/stream_ai_chat.py +++ b/rootly_sdk/api/ai_chat/stream_ai_chat.py @@ -15,11 +15,7 @@ def _get_kwargs( session_id: UUID | Unset = UNSET, incident_id: UUID | Unset = UNSET, alert_id: UUID | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -40,21 +36,17 @@ def _get_kwargs( json_alert_id = str(alert_id) params["alert_id"] = json_alert_id - 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/ai/chat/stream", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 200: return None @@ -84,9 +76,8 @@ def sync_detailed( session_id: UUID | Unset = UNSET, incident_id: UUID | Unset = UNSET, alert_id: UUID | Unset = UNSET, - ) -> Response[Any]: - """ Stream AI chat response (SSE) + """Stream AI chat response (SSE) Send a message and receive the AI response as a Server-Sent Events stream. Optionally bind to an incident or alert for context. Events: `session_id` (initial), `text` (content chunks), @@ -105,15 +96,13 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( message=message, -session_id=session_id, -incident_id=incident_id, -alert_id=alert_id, - + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, ) response = client.get_httpx_client().request( @@ -130,9 +119,8 @@ async def asyncio_detailed( session_id: UUID | Unset = UNSET, incident_id: UUID | Unset = UNSET, alert_id: UUID | Unset = UNSET, - ) -> Response[Any]: - """ Stream AI chat response (SSE) + """Stream AI chat response (SSE) Send a message and receive the AI response as a Server-Sent Events stream. Optionally bind to an incident or alert for context. Events: `session_id` (initial), `text` (content chunks), @@ -151,20 +139,15 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( message=message, -session_id=session_id, -incident_id=incident_id, -alert_id=alert_id, - + session_id=session_id, + incident_id=incident_id, + alert_id=alert_id, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - diff --git a/rootly_sdk/api/alert_events/__init__.py b/rootly_sdk/api/alert_events/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/alert_events/__init__.py +++ b/rootly_sdk/api/alert_events/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/alert_events/create_alert_event.py b/rootly_sdk/api/alert_events/create_alert_event.py index d2d67105..1ba1d753 100644 --- a/rootly_sdk/api/alert_events/create_alert_event.py +++ b/rootly_sdk/api/alert_events/create_alert_event.py @@ -16,45 +16,36 @@ def _get_kwargs( alert_id: str, *, body: NewAlertEvent | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/alerts/{alert_id}/events".format(alert_id=quote(str(alert_id), safe=""),), + "url": "/v1/alerts/{alert_id}/events".format( + alert_id=quote(str(alert_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) -> AlertEventResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertEventResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertEventResponse.from_dict(response.json()) - - return response_201 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -63,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertEventResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertEventResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -77,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertEvent | Unset = UNSET, - ) -> Response[AlertEventResponse | ErrorsList]: - """ Create alert event + """Create alert event Creates a new alert event @@ -93,13 +85,11 @@ def sync_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( alert_id=alert_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -108,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( alert_id: str, *, client: AuthenticatedClient, body: NewAlertEvent | Unset = UNSET, - ) -> AlertEventResponse | ErrorsList | None: - """ Create alert event + """Create alert event Creates a new alert event @@ -129,24 +119,22 @@ def sync( Returns: AlertEventResponse | ErrorsList - """ - + """ return sync_detailed( alert_id=alert_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( alert_id: str, *, client: AuthenticatedClient, body: NewAlertEvent | Unset = UNSET, - ) -> Response[AlertEventResponse | ErrorsList]: - """ Create alert event + """Create alert event Creates a new alert event @@ -160,29 +148,25 @@ async def asyncio_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( alert_id=alert_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( alert_id: str, *, client: AuthenticatedClient, body: NewAlertEvent | Unset = UNSET, - ) -> AlertEventResponse | ErrorsList | None: - """ Create alert event + """Create alert event Creates a new alert event @@ -196,12 +180,12 @@ async def asyncio( Returns: AlertEventResponse | ErrorsList - """ - - - return (await asyncio_detailed( - alert_id=alert_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + alert_id=alert_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_events/delete_alert_event.py b/rootly_sdk/api/alert_events/delete_alert_event.py index 96b38b6f..fa37ebdf 100644 --- a/rootly_sdk/api/alert_events/delete_alert_event.py +++ b/rootly_sdk/api/alert_events/delete_alert_event.py @@ -12,24 +12,18 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_events/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_events/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -38,8 +32,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) - - return response_404 if client.raise_on_unexpected_status: @@ -61,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Delete alert event + """Delete alert event Deletes a specific alert event. Only alert events with kind 'note' (user-created notes) can be deleted. System-generated events are immutable to maintain audit trail integrity. @@ -77,12 +68,10 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -91,13 +80,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Delete alert event + """Delete alert event Deletes a specific alert event. Only alert events with kind 'note' (user-created notes) can be deleted. System-generated events are immutable to maintain audit trail integrity. @@ -111,22 +100,20 @@ def sync( Returns: Any | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Delete alert event + """Delete alert event Deletes a specific alert event. Only alert events with kind 'note' (user-created notes) can be deleted. System-generated events are immutable to maintain audit trail integrity. @@ -140,27 +127,23 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Delete alert event + """Delete alert event Deletes a specific alert event. Only alert events with kind 'note' (user-created notes) can be deleted. System-generated events are immutable to maintain audit trail integrity. @@ -174,11 +157,11 @@ async def asyncio( Returns: Any | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_events/get_alert_event.py b/rootly_sdk/api/alert_events/get_alert_event.py index 2a2f79a8..0c7b7f99 100644 --- a/rootly_sdk/api/alert_events/get_alert_event.py +++ b/rootly_sdk/api/alert_events/get_alert_event.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_events/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_events/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertEventResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertEventResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertEventResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertEventResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertEventResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertEventResponse | ErrorsList]: - """ Retrieve alert event + """Retrieve alert event Retrieves a specific alert_event by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> AlertEventResponse | ErrorsList | None: - """ Retrieve alert event + """Retrieve alert event Retrieves a specific alert_event by id @@ -113,22 +104,20 @@ def sync( Returns: AlertEventResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertEventResponse | ErrorsList]: - """ Retrieve alert event + """Retrieve alert event Retrieves a specific alert_event by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> AlertEventResponse | ErrorsList | None: - """ Retrieve alert event + """Retrieve alert event Retrieves a specific alert_event by id @@ -174,11 +159,11 @@ async def asyncio( Returns: AlertEventResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_events/list_alert_events.py b/rootly_sdk/api/alert_events/list_alert_events.py index 08440ae8..cdbb09b0 100644 --- a/rootly_sdk/api/alert_events/list_alert_events.py +++ b/rootly_sdk/api/alert_events/list_alert_events.py @@ -18,11 +18,7 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -36,27 +32,23 @@ def _get_kwargs( params["filter[action]"] = filteraction - 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/alerts/{alert_id}/events".format(alert_id=quote(str(alert_id), safe=""),), + "url": "/v1/alerts/{alert_id}/events".format( + alert_id=quote(str(alert_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertEventList | None: if response.status_code == 200: response_200 = AlertEventList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -83,9 +75,8 @@ def sync_detailed( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, - ) -> Response[AlertEventList]: - """ List alert events + """List alert events List alert_events @@ -103,17 +94,15 @@ def sync_detailed( Returns: Response[AlertEventList] - """ - + """ kwargs = _get_kwargs( alert_id=alert_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filteraction=filteraction, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filteraction=filteraction, ) response = client.get_httpx_client().request( @@ -122,6 +111,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( alert_id: str, *, @@ -131,9 +121,8 @@ def sync( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, - ) -> AlertEventList | None: - """ List alert events + """List alert events List alert_events @@ -151,20 +140,19 @@ def sync( Returns: AlertEventList - """ - + """ return sync_detailed( alert_id=alert_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filteraction=filteraction, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filteraction=filteraction, ).parsed + async def asyncio_detailed( alert_id: str, *, @@ -174,9 +162,8 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, - ) -> Response[AlertEventList]: - """ List alert events + """List alert events List alert_events @@ -194,25 +181,22 @@ async def asyncio_detailed( Returns: Response[AlertEventList] - """ - + """ kwargs = _get_kwargs( alert_id=alert_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filteraction=filteraction, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filteraction=filteraction, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( alert_id: str, *, @@ -222,9 +206,8 @@ async def asyncio( pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, filteraction: str | Unset = UNSET, - ) -> AlertEventList | None: - """ List alert events + """List alert events List alert_events @@ -242,16 +225,16 @@ async def asyncio( Returns: AlertEventList - """ - - - return (await asyncio_detailed( - alert_id=alert_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filteraction=filteraction, - - )).parsed + """ + + return ( + await asyncio_detailed( + alert_id=alert_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filteraction=filteraction, + ) + ).parsed diff --git a/rootly_sdk/api/alert_events/list_alert_events_feed.py b/rootly_sdk/api/alert_events/list_alert_events_feed.py index 9127eac0..b9a7a95a 100644 --- a/rootly_sdk/api/alert_events/list_alert_events_feed.py +++ b/rootly_sdk/api/alert_events/list_alert_events_feed.py @@ -29,11 +29,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -71,27 +67,21 @@ def _get_kwargs( 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/alert_events", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertEventFeedList | None: if response.status_code == 200: response_200 = AlertEventFeedList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -123,9 +113,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[AlertEventFeedList]: - """ List alert events across alerts + """List alert events across alerts Returns a flat list of alert events across all alerts the requester can access. Designed for periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to @@ -150,22 +139,20 @@ def sync_detailed( Returns: Response[AlertEventFeedList] - """ - + """ kwargs = _get_kwargs( include=include, -pagesize=pagesize, -pageafter=pageafter, -sort=sort, -filterkind=filterkind, -filteraction=filteraction, -filteralert_id=filteralert_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + pagesize=pagesize, + pageafter=pageafter, + sort=sort, + filterkind=filterkind, + filteraction=filteraction, + filteralert_id=filteralert_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ) response = client.get_httpx_client().request( @@ -174,6 +161,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -188,9 +176,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> AlertEventFeedList | None: - """ List alert events across alerts + """List alert events across alerts Returns a flat list of alert events across all alerts the requester can access. Designed for periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to @@ -215,25 +202,24 @@ def sync( Returns: AlertEventFeedList - """ - + """ return sync_detailed( client=client, -include=include, -pagesize=pagesize, -pageafter=pageafter, -sort=sort, -filterkind=filterkind, -filteraction=filteraction, -filteralert_id=filteralert_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + pagesize=pagesize, + pageafter=pageafter, + sort=sort, + filterkind=filterkind, + filteraction=filteraction, + filteralert_id=filteralert_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -248,9 +234,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[AlertEventFeedList]: - """ List alert events across alerts + """List alert events across alerts Returns a flat list of alert events across all alerts the requester can access. Designed for periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to @@ -275,30 +260,27 @@ async def asyncio_detailed( Returns: Response[AlertEventFeedList] - """ - + """ kwargs = _get_kwargs( include=include, -pagesize=pagesize, -pageafter=pageafter, -sort=sort, -filterkind=filterkind, -filteraction=filteraction, -filteralert_id=filteralert_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + pagesize=pagesize, + pageafter=pageafter, + sort=sort, + filterkind=filterkind, + filteraction=filteraction, + filteralert_id=filteralert_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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -313,9 +295,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> AlertEventFeedList | None: - """ List alert events across alerts + """List alert events across alerts Returns a flat list of alert events across all alerts the requester can access. Designed for periodic polling: use `page[after]` with the `next_cursor` returned in the previous response to @@ -340,21 +321,21 @@ async def asyncio( Returns: AlertEventFeedList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagesize=pagesize, -pageafter=pageafter, -sort=sort, -filterkind=filterkind, -filteraction=filteraction, -filteralert_id=filteralert_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagesize=pagesize, + pageafter=pageafter, + sort=sort, + filterkind=filterkind, + filteraction=filteraction, + filteralert_id=filteralert_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/alert_events/update_alert_event.py b/rootly_sdk/api/alert_events/update_alert_event.py index 13f20b50..ef172e7d 100644 --- a/rootly_sdk/api/alert_events/update_alert_event.py +++ b/rootly_sdk/api/alert_events/update_alert_event.py @@ -16,45 +16,36 @@ def _get_kwargs( id: str, *, body: UpdateAlertEvent | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/alert_events/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_events/{id}".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) -> AlertEventResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertEventResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertEventResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -63,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertEventResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertEventResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -77,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertEvent | Unset = UNSET, - ) -> Response[AlertEventResponse | ErrorsList]: - """ Update alert event + """Update alert event Updates a specific alert event. Only alert events with kind 'note' (user-created notes) can be updated. System-generated events are immutable to maintain audit trail integrity. @@ -95,13 +87,11 @@ def sync_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -110,14 +100,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlertEvent | Unset = UNSET, - ) -> AlertEventResponse | ErrorsList | None: - """ Update alert event + """Update alert event Updates a specific alert event. Only alert events with kind 'note' (user-created notes) can be updated. System-generated events are immutable to maintain audit trail integrity. @@ -133,24 +123,22 @@ def sync( Returns: AlertEventResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlertEvent | Unset = UNSET, - ) -> Response[AlertEventResponse | ErrorsList]: - """ Update alert event + """Update alert event Updates a specific alert event. Only alert events with kind 'note' (user-created notes) can be updated. System-generated events are immutable to maintain audit trail integrity. @@ -166,29 +154,25 @@ async def asyncio_detailed( Returns: Response[AlertEventResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlertEvent | Unset = UNSET, - ) -> AlertEventResponse | ErrorsList | None: - """ Update alert event + """Update alert event Updates a specific alert event. Only alert events with kind 'note' (user-created notes) can be updated. System-generated events are immutable to maintain audit trail integrity. @@ -204,12 +188,12 @@ async def asyncio( Returns: AlertEventResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_fields/__init__.py b/rootly_sdk/api/alert_fields/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/alert_fields/__init__.py +++ b/rootly_sdk/api/alert_fields/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/alert_fields/create_alert_field.py b/rootly_sdk/api/alert_fields/create_alert_field.py index 0afb68c7..7d0b7150 100644 --- a/rootly_sdk/api/alert_fields/create_alert_field.py +++ b/rootly_sdk/api/alert_fields/create_alert_field.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewAlertField, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_fields", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> AlertFieldResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertFieldResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertFieldResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertFieldResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertField, - ) -> Response[AlertFieldResponse | ErrorsList]: - """ Creates an alert field + """Creates an alert field Creates a new alert field from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewAlertField, - ) -> AlertFieldResponse | ErrorsList | None: - """ Creates an alert field + """Creates an alert field Creates a new alert field from provided data @@ -127,22 +114,20 @@ def sync( Returns: AlertFieldResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertField, - ) -> Response[AlertFieldResponse | ErrorsList]: - """ Creates an alert field + """Creates an alert field Creates a new alert field from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewAlertField, - ) -> AlertFieldResponse | ErrorsList | None: - """ Creates an alert field + """Creates an alert field Creates a new alert field from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: AlertFieldResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_fields/delete_alert_field.py b/rootly_sdk/api/alert_fields/delete_alert_field.py index 9a5d8078..0b0984e0 100644 --- a/rootly_sdk/api/alert_fields/delete_alert_field.py +++ b/rootly_sdk/api/alert_fields/delete_alert_field.py @@ -14,44 +14,34 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_fields/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_fields/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertFieldResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertFieldResponse.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: @@ -60,7 +50,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertFieldResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,9 +65,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertFieldResponse | ErrorsList]: - """ Delete an alert field + """Delete an alert field Delete a specific alert field by id @@ -88,12 +79,10 @@ def sync_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -102,13 +91,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertFieldResponse | ErrorsList | None: - """ Delete an alert field + """Delete an alert field Delete a specific alert field by id @@ -121,22 +110,20 @@ def sync( Returns: AlertFieldResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertFieldResponse | ErrorsList]: - """ Delete an alert field + """Delete an alert field Delete a specific alert field by id @@ -149,27 +136,23 @@ async def asyncio_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertFieldResponse | ErrorsList | None: - """ Delete an alert field + """Delete an alert field Delete a specific alert field by id @@ -182,11 +165,11 @@ async def asyncio( Returns: AlertFieldResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_fields/get_alert_field.py b/rootly_sdk/api/alert_fields/get_alert_field.py index 5ead69b3..10e2a4c9 100644 --- a/rootly_sdk/api/alert_fields/get_alert_field.py +++ b/rootly_sdk/api/alert_fields/get_alert_field.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_fields/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_fields/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertFieldResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertFieldResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertFieldResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertFieldResponse | ErrorsList]: - """ Retrieves an alert field + """Retrieves an alert field Retrieves a specific alert field by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertFieldResponse | ErrorsList | None: - """ Retrieves an alert field + """Retrieves an alert field Retrieves a specific alert field by id @@ -114,22 +105,20 @@ def sync( Returns: AlertFieldResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertFieldResponse | ErrorsList]: - """ Retrieves an alert field + """Retrieves an alert field Retrieves a specific alert field by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertFieldResponse | ErrorsList | None: - """ Retrieves an alert field + """Retrieves an alert field Retrieves a specific alert field by id @@ -175,11 +160,11 @@ async def asyncio( Returns: AlertFieldResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_fields/list_alert_fields.py b/rootly_sdk/api/alert_fields/list_alert_fields.py index f8afb411..3215ff00 100644 --- a/rootly_sdk/api/alert_fields/list_alert_fields.py +++ b/rootly_sdk/api/alert_fields/list_alert_fields.py @@ -30,11 +30,7 @@ def _get_kwargs( filterkindin: str | Unset = UNSET, filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -76,27 +72,21 @@ def _get_kwargs( 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/alert_fields", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertFieldList | None: if response.status_code == 200: response_200 = AlertFieldList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -136,9 +126,8 @@ def sync_detailed( filterkindin: str | Unset = UNSET, filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertFieldList]: - """ List alert fields + """List alert fields List alert fields @@ -169,30 +158,28 @@ def sync_detailed( Returns: Response[AlertFieldList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -201,6 +188,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -223,9 +211,8 @@ def sync( filterkindin: str | Unset = UNSET, filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertFieldList | None: - """ List alert fields + """List alert fields List alert fields @@ -256,33 +243,32 @@ def sync( Returns: AlertFieldList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -305,9 +291,8 @@ async def asyncio_detailed( filterkindin: str | Unset = UNSET, filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertFieldList]: - """ List alert fields + """List alert fields List alert fields @@ -338,38 +323,35 @@ async def asyncio_detailed( Returns: Response[AlertFieldList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -392,9 +374,8 @@ async def asyncio( filterkindin: str | Unset = UNSET, filterkindnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertFieldList | None: - """ List alert fields + """List alert fields List alert fields @@ -425,29 +406,29 @@ async def asyncio( Returns: AlertFieldList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/alert_fields/update_alert_field.py b/rootly_sdk/api/alert_fields/update_alert_field.py index 203b50a6..a65a1e6f 100644 --- a/rootly_sdk/api/alert_fields/update_alert_field.py +++ b/rootly_sdk/api/alert_fields/update_alert_field.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateAlertField, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_fields/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_fields/{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) -> AlertFieldResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertFieldResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertFieldResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertField, - ) -> Response[AlertFieldResponse | ErrorsList]: - """ Update an alert field + """Update an alert field Update a specific alert field by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, - ) -> AlertFieldResponse | ErrorsList | None: - """ Update an alert field + """Update an alert field Update a specific alert field by id @@ -128,24 +119,22 @@ def sync( Returns: AlertFieldResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, - ) -> Response[AlertFieldResponse | ErrorsList]: - """ Update an alert field + """Update an alert field Update a specific alert field by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[AlertFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertField, - ) -> AlertFieldResponse | ErrorsList | None: - """ Update an alert field + """Update an alert field Update a specific alert field by id @@ -195,12 +180,12 @@ async def asyncio( Returns: AlertFieldResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_groups/__init__.py b/rootly_sdk/api/alert_groups/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/alert_groups/__init__.py +++ b/rootly_sdk/api/alert_groups/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/alert_groups/create_alert_group.py b/rootly_sdk/api/alert_groups/create_alert_group.py index 6a285f02..fc100c79 100644 --- a/rootly_sdk/api/alert_groups/create_alert_group.py +++ b/rootly_sdk/api/alert_groups/create_alert_group.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewAlertGroup, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_groups", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> AlertGroupResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertGroupResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertGroupResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertGroupResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertGroup, - ) -> Response[AlertGroupResponse | ErrorsList]: - """ Creates an alert group + """Creates an alert group Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -96,12 +85,10 @@ def sync_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -110,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewAlertGroup, - ) -> AlertGroupResponse | ErrorsList | None: - """ Creates an alert group + """Creates an alert group Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -131,22 +118,20 @@ def sync( Returns: AlertGroupResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertGroup, - ) -> Response[AlertGroupResponse | ErrorsList]: - """ Creates an alert group + """Creates an alert group Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -161,27 +146,23 @@ async def asyncio_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewAlertGroup, - ) -> AlertGroupResponse | ErrorsList | None: - """ Creates an alert group + """Creates an alert group Creates a new alert group. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -196,11 +177,11 @@ async def asyncio( Returns: AlertGroupResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_groups/delete_alert_group.py b/rootly_sdk/api/alert_groups/delete_alert_group.py index 2ac858f4..e23900a9 100644 --- a/rootly_sdk/api/alert_groups/delete_alert_group.py +++ b/rootly_sdk/api/alert_groups/delete_alert_group.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_groups/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertGroupResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertGroupResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertGroupResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertGroupResponse | ErrorsList]: - """ Delete an alert group + """Delete an alert group Delete a specific alert group by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertGroupResponse | ErrorsList | None: - """ Delete an alert group + """Delete an alert group Delete a specific alert group by id @@ -114,22 +105,20 @@ def sync( Returns: AlertGroupResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertGroupResponse | ErrorsList]: - """ Delete an alert group + """Delete an alert group Delete a specific alert group by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertGroupResponse | ErrorsList | None: - """ Delete an alert group + """Delete an alert group Delete a specific alert group by id @@ -175,11 +160,11 @@ async def asyncio( Returns: AlertGroupResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_groups/get_alert_group.py b/rootly_sdk/api/alert_groups/get_alert_group.py index 7b7b5b88..67e96c43 100644 --- a/rootly_sdk/api/alert_groups/get_alert_group.py +++ b/rootly_sdk/api/alert_groups/get_alert_group.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_groups/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertGroupResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertGroupResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertGroupResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertGroupResponse | ErrorsList]: - """ Retrieves an alert group + """Retrieves an alert group Retrieves a specific alert group by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertGroupResponse | ErrorsList | None: - """ Retrieves an alert group + """Retrieves an alert group Retrieves a specific alert group by id @@ -114,22 +105,20 @@ def sync( Returns: AlertGroupResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertGroupResponse | ErrorsList]: - """ Retrieves an alert group + """Retrieves an alert group Retrieves a specific alert group by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertGroupResponse | ErrorsList | None: - """ Retrieves an alert group + """Retrieves an alert group Retrieves a specific alert group by id @@ -175,11 +160,11 @@ async def asyncio( Returns: AlertGroupResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_groups/list_alert_groups.py b/rootly_sdk/api/alert_groups/list_alert_groups.py index c7b54dec..a7d416e0 100644 --- a/rootly_sdk/api/alert_groups/list_alert_groups.py +++ b/rootly_sdk/api/alert_groups/list_alert_groups.py @@ -20,11 +20,7 @@ def _get_kwargs( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -46,27 +42,21 @@ def _get_kwargs( params["filter[name][not_in]"] = filternamenot_in - 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/alert_groups", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertGroupList | None: if response.status_code == 200: response_200 = AlertGroupList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -96,9 +86,8 @@ def sync_detailed( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> Response[AlertGroupList]: - """ List alert groups + """List alert groups List alert groups @@ -119,20 +108,18 @@ def sync_detailed( Returns: Response[AlertGroupList] - """ - + """ kwargs = _get_kwargs( include=include, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) response = client.get_httpx_client().request( @@ -141,6 +128,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -153,9 +141,8 @@ def sync( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> AlertGroupList | None: - """ List alert groups + """List alert groups List alert groups @@ -176,23 +163,22 @@ def sync( Returns: AlertGroupList - """ - + """ return sync_detailed( client=client, -include=include, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - + include=include, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -205,9 +191,8 @@ async def asyncio_detailed( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> Response[AlertGroupList]: - """ List alert groups + """List alert groups List alert groups @@ -228,28 +213,25 @@ async def asyncio_detailed( Returns: Response[AlertGroupList] - """ - + """ kwargs = _get_kwargs( include=include, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -262,9 +244,8 @@ async def asyncio( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> AlertGroupList | None: - """ List alert groups + """List alert groups List alert groups @@ -285,19 +266,19 @@ async def asyncio( Returns: AlertGroupList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + ) + ).parsed diff --git a/rootly_sdk/api/alert_groups/update_alert_group.py b/rootly_sdk/api/alert_groups/update_alert_group.py index 371f311c..34654d17 100644 --- a/rootly_sdk/api/alert_groups/update_alert_group.py +++ b/rootly_sdk/api/alert_groups/update_alert_group.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateAlertGroup, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/alert_groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_groups/{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) -> AlertGroupResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertGroupResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertGroupResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertGroup, - ) -> Response[AlertGroupResponse | ErrorsList]: - """ Update an alert group + """Update an alert group Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -94,13 +87,11 @@ def sync_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -109,14 +100,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, - ) -> AlertGroupResponse | ErrorsList | None: - """ Update an alert group + """Update an alert group Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -132,24 +123,22 @@ def sync( Returns: AlertGroupResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, - ) -> Response[AlertGroupResponse | ErrorsList]: - """ Update an alert group + """Update an alert group Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -165,29 +154,25 @@ async def asyncio_detailed( Returns: Response[AlertGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertGroup, - ) -> AlertGroupResponse | ErrorsList | None: - """ Update an alert group + """Update an alert group Update a specific alert group by id. **Note**: For enhanced functionality and future compatibility, consider using the advanced alert grouping with `conditions` field instead of the legacy @@ -203,12 +188,12 @@ async def asyncio( Returns: AlertGroupResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_routes/__init__.py b/rootly_sdk/api/alert_routes/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/alert_routes/__init__.py +++ b/rootly_sdk/api/alert_routes/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/alert_routes/create_alert_route.py b/rootly_sdk/api/alert_routes/create_alert_route.py index cbfeb2a8..26d162de 100644 --- a/rootly_sdk/api/alert_routes/create_alert_route.py +++ b/rootly_sdk/api/alert_routes/create_alert_route.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewAlertRoute, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_routes", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> AlertRouteResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertRouteResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertRouteResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRouteResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertRoute, - ) -> Response[AlertRouteResponse | ErrorsList]: - """ Creates an alert route + """Creates an alert route Creates a new alert route from provided data. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly @@ -108,12 +97,10 @@ def sync_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -122,13 +109,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewAlertRoute, - ) -> AlertRouteResponse | ErrorsList | None: - """ Creates an alert route + """Creates an alert route Creates a new alert route from provided data. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly @@ -155,22 +142,20 @@ def sync( Returns: AlertRouteResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertRoute, - ) -> Response[AlertRouteResponse | ErrorsList]: - """ Creates an alert route + """Creates an alert route Creates a new alert route from provided data. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly @@ -197,27 +182,23 @@ async def asyncio_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewAlertRoute, - ) -> AlertRouteResponse | ErrorsList | None: - """ Creates an alert route + """Creates an alert route Creates a new alert route from provided data. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly @@ -244,11 +225,11 @@ async def asyncio( Returns: AlertRouteResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_routes/delete_alert_route.py b/rootly_sdk/api/alert_routes/delete_alert_route.py index 67e6e8ee..013c2d58 100644 --- a/rootly_sdk/api/alert_routes/delete_alert_route.py +++ b/rootly_sdk/api/alert_routes/delete_alert_route.py @@ -13,51 +13,39 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_routes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_routes/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DeleteAlertRouteResponse200 | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DeleteAlertRouteResponse200 | ErrorsList | None: if response.status_code == 200: response_200 = DeleteAlertRouteResponse200.from_dict(response.json()) - - 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DeleteAlertRouteResponse200 | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DeleteAlertRouteResponse200 | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[DeleteAlertRouteResponse200 | ErrorsList]: - """ Delete an alert route + """Delete an alert route Delete a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -96,12 +85,10 @@ def sync_detailed( Returns: Response[DeleteAlertRouteResponse200 | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -110,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> DeleteAlertRouteResponse200 | ErrorsList | None: - """ Delete an alert route + """Delete an alert route Delete a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -131,22 +118,20 @@ def sync( Returns: DeleteAlertRouteResponse200 | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[DeleteAlertRouteResponse200 | ErrorsList]: - """ Delete an alert route + """Delete an alert route Delete a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -161,27 +146,23 @@ async def asyncio_detailed( Returns: Response[DeleteAlertRouteResponse200 | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> DeleteAlertRouteResponse200 | ErrorsList | None: - """ Delete an alert route + """Delete an alert route Delete a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -196,11 +177,11 @@ async def asyncio( Returns: DeleteAlertRouteResponse200 | ErrorsList - """ + """ - - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_routes/get_alert_route.py b/rootly_sdk/api/alert_routes/get_alert_route.py index 157a2e36..72f3fec8 100644 --- a/rootly_sdk/api/alert_routes/get_alert_route.py +++ b/rootly_sdk/api/alert_routes/get_alert_route.py @@ -13,44 +13,34 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_routes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_routes/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRouteResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertRouteResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRouteResponse.from_dict(response.json()) - - 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: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRouteResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertRouteResponse | ErrorsList]: - """ Get an alert route + """Get an alert route Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -96,12 +87,10 @@ def sync_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -110,13 +99,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> AlertRouteResponse | ErrorsList | None: - """ Get an alert route + """Get an alert route Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -138,22 +127,20 @@ def sync( Returns: AlertRouteResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertRouteResponse | ErrorsList]: - """ Get an alert route + """Get an alert route Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -175,27 +162,23 @@ async def asyncio_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> AlertRouteResponse | ErrorsList | None: - """ Get an alert route + """Get an alert route Get a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -217,11 +200,11 @@ async def asyncio( Returns: AlertRouteResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_routes/list_alert_routes.py b/rootly_sdk/api/alert_routes/list_alert_routes.py index bab73ec6..45ccfeeb 100644 --- a/rootly_sdk/api/alert_routes/list_alert_routes.py +++ b/rootly_sdk/api/alert_routes/list_alert_routes.py @@ -25,11 +25,7 @@ def _get_kwargs( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -59,34 +55,28 @@ def _get_kwargs( 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/alert_routes", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRouteList | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertRouteList | ErrorsList | None: if response.status_code == 200: response_200 = AlertRouteList.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: @@ -95,7 +85,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteList | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRouteList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -120,9 +112,8 @@ def sync_detailed( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertRouteList | ErrorsList]: - """ List alert routes + """List alert routes List all alert routes for the current team with filtering and pagination. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, @@ -149,24 +140,22 @@ def sync_detailed( Returns: Response[AlertRouteList | ErrorsList] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -175,6 +164,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -191,9 +181,8 @@ def sync( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertRouteList | ErrorsList | None: - """ List alert routes + """List alert routes List all alert routes for the current team with filtering and pagination. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, @@ -220,27 +209,26 @@ def sync( Returns: AlertRouteList | ErrorsList - """ - + """ return sync_detailed( client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -257,9 +245,8 @@ async def asyncio_detailed( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertRouteList | ErrorsList]: - """ List alert routes + """List alert routes List all alert routes for the current team with filtering and pagination. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, @@ -286,32 +273,29 @@ async def asyncio_detailed( Returns: Response[AlertRouteList | ErrorsList] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -328,9 +312,8 @@ async def asyncio( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertRouteList | ErrorsList | None: - """ List alert routes + """List alert routes List all alert routes for the current team with filtering and pagination. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, @@ -357,23 +340,23 @@ async def asyncio( Returns: AlertRouteList | ErrorsList - """ - - - return (await asyncio_detailed( - client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/alert_routes/patch_alert_route.py b/rootly_sdk/api/alert_routes/patch_alert_route.py index 6746940f..a8c0c4a9 100644 --- a/rootly_sdk/api/alert_routes/patch_alert_route.py +++ b/rootly_sdk/api/alert_routes/patch_alert_route.py @@ -16,57 +16,45 @@ def _get_kwargs( id: str, *, body: PatchAlertRoute, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/alert_routes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_routes/{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) -> AlertRouteResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertRouteResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRouteResponse.from_dict(response.json()) - - 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -75,7 +63,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRouteResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,9 +79,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: PatchAlertRoute, - ) -> Response[AlertRouteResponse | ErrorsList]: - """ Update an alert route + """Update an alert route Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -106,13 +95,11 @@ def sync_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -121,14 +108,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: PatchAlertRoute, - ) -> AlertRouteResponse | ErrorsList | None: - """ Update an alert route + """Update an alert route Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -143,24 +130,22 @@ def sync( Returns: AlertRouteResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: PatchAlertRoute, - ) -> Response[AlertRouteResponse | ErrorsList]: - """ Update an alert route + """Update an alert route Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -175,29 +160,25 @@ async def asyncio_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: PatchAlertRoute, - ) -> AlertRouteResponse | ErrorsList | None: - """ Update an alert route + """Update an alert route Updates an alert route. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer support.** @@ -212,12 +193,12 @@ async def asyncio( Returns: AlertRouteResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_routes/update_alert_route.py b/rootly_sdk/api/alert_routes/update_alert_route.py index 2f5c2d03..5a47cf35 100644 --- a/rootly_sdk/api/alert_routes/update_alert_route.py +++ b/rootly_sdk/api/alert_routes/update_alert_route.py @@ -16,50 +16,40 @@ def _get_kwargs( id: str, *, body: UpdateAlertRoute, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_routes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_routes/{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) -> AlertRouteResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertRouteResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRouteResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRouteResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRouteResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertRoute, - ) -> Response[AlertRouteResponse | ErrorsList]: - """ Update an alert route + """Update an alert route Update a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -112,13 +103,11 @@ def sync_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -127,14 +116,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlertRoute, - ) -> AlertRouteResponse | ErrorsList | None: - """ Update an alert route + """Update an alert route Update a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -162,24 +151,22 @@ def sync( Returns: AlertRouteResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlertRoute, - ) -> Response[AlertRouteResponse | ErrorsList]: - """ Update an alert route + """Update an alert route Update a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -207,29 +194,25 @@ async def asyncio_detailed( Returns: Response[AlertRouteResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlertRoute, - ) -> AlertRouteResponse | ErrorsList | None: - """ Update an alert route + """Update an alert route Update a specific alert route by id. **Note: This endpoint requires access to Advanced Alert Routing. If you're unsure whether you have access to this feature, please contact Rootly customer @@ -257,12 +240,12 @@ async def asyncio( Returns: AlertRouteResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_routing_rules/__init__.py b/rootly_sdk/api/alert_routing_rules/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/alert_routing_rules/__init__.py +++ b/rootly_sdk/api/alert_routing_rules/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 7ab8e49e..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 @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewAlertRoutingRule, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_routing_rules", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> AlertRoutingRuleResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertRoutingRuleResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertRoutingRuleResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRoutingRuleResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertRoutingRule, - ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """ Creates an alert routing rule + """Creates an alert routing rule Creates a new alert routing rule from provided data. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether @@ -96,12 +85,10 @@ def sync_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -110,13 +97,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewAlertRoutingRule, - ) -> AlertRoutingRuleResponse | ErrorsList | None: - """ Creates an alert routing rule + """Creates an alert routing rule Creates a new alert routing rule from provided data. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether @@ -131,22 +118,20 @@ def sync( Returns: AlertRoutingRuleResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertRoutingRule, - ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """ Creates an alert routing rule + """Creates an alert routing rule Creates a new alert routing rule from provided data. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether @@ -161,27 +146,23 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewAlertRoutingRule, - ) -> AlertRoutingRuleResponse | ErrorsList | None: - """ Creates an alert routing rule + """Creates an alert routing rule Creates a new alert routing rule from provided data. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether @@ -196,11 +177,11 @@ async def asyncio( Returns: AlertRoutingRuleResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed 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 7edbd0b3..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 @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_routing_rules/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_routing_rules/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRoutingRuleResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertRoutingRuleResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRoutingRuleResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRoutingRuleResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """ Delete an alert routing rule + """Delete an alert routing rule Delete a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -83,12 +76,10 @@ def sync_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -97,13 +88,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertRoutingRuleResponse | ErrorsList | None: - """ Delete an alert routing rule + """Delete an alert routing rule Delete a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -118,22 +109,20 @@ def sync( Returns: AlertRoutingRuleResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """ Delete an alert routing rule + """Delete an alert routing rule Delete a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -148,27 +137,23 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertRoutingRuleResponse | ErrorsList | None: - """ Delete an alert routing rule + """Delete an alert routing rule Delete a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -183,11 +168,11 @@ async def asyncio( Returns: AlertRoutingRuleResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 afea89e6..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 @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_routing_rules/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_routing_rules/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRoutingRuleResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertRoutingRuleResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRoutingRuleResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRoutingRuleResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """ Retrieves an alert routing rule + """Retrieves an alert routing rule Retrieves a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are @@ -83,12 +76,10 @@ def sync_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -97,13 +88,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertRoutingRuleResponse | ErrorsList | None: - """ Retrieves an alert routing rule + """Retrieves an alert routing rule Retrieves a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are @@ -118,22 +109,20 @@ def sync( Returns: AlertRoutingRuleResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """ Retrieves an alert routing rule + """Retrieves an alert routing rule Retrieves a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are @@ -148,27 +137,23 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> AlertRoutingRuleResponse | ErrorsList | None: - """ Retrieves an alert routing rule + """Retrieves an alert routing rule Retrieves a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are @@ -183,11 +168,11 @@ async def asyncio( Returns: AlertRoutingRuleResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 2273903c..19c93281 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 @@ -29,11 +29,7 @@ def _get_kwargs( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -73,27 +69,21 @@ def _get_kwargs( 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/alert_routing_rules", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertRoutingRuleList | None: if response.status_code == 200: response_200 = AlertRoutingRuleList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -102,7 +92,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRoutingRuleList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -132,9 +124,8 @@ def sync_detailed( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertRoutingRuleList]: - """ List alert routing rules + """List alert routing rules List alert routing rules. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an advanced user, @@ -166,29 +157,27 @@ def sync_detailed( Returns: Response[AlertRoutingRuleList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -197,6 +186,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -218,9 +208,8 @@ def sync( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertRoutingRuleList | None: - """ List alert routing rules + """List alert routing rules List alert routing rules. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an advanced user, @@ -252,32 +241,31 @@ def sync( Returns: AlertRoutingRuleList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -299,9 +287,8 @@ async def asyncio_detailed( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertRoutingRuleList]: - """ List alert routing rules + """List alert routing rules List alert routing rules. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an advanced user, @@ -333,37 +320,34 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -385,9 +369,8 @@ async def asyncio( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertRoutingRuleList | None: - """ List alert routing rules + """List alert routing rules List alert routing rules. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an advanced user, @@ -419,28 +402,28 @@ async def asyncio( Returns: AlertRoutingRuleList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, + ) + ).parsed 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 b891fb8f..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 @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateAlertRoutingRule, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_routing_rules/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_routing_rules/{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) -> AlertRoutingRuleResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertRoutingRuleResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertRoutingRuleResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertRoutingRuleResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertRoutingRuleResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, - ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """ Update an alert routing rule + """Update an alert routing rule Update a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -94,13 +87,11 @@ def sync_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -109,14 +100,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, - ) -> AlertRoutingRuleResponse | ErrorsList | None: - """ Update an alert routing rule + """Update an alert routing rule Update a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -132,24 +123,22 @@ def sync( Returns: AlertRoutingRuleResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, - ) -> Response[AlertRoutingRuleResponse | ErrorsList]: - """ Update an alert routing rule + """Update an alert routing rule Update a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -165,29 +154,25 @@ async def asyncio_detailed( Returns: Response[AlertRoutingRuleResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateAlertRoutingRule, - ) -> AlertRoutingRuleResponse | ErrorsList | None: - """ Update an alert routing rule + """Update an alert routing rule Update a specific alert routing rule by id. **Note: If you are an advanced alert routing user, you should use the Alert Routes endpoint instead of this endpoint. If you don't know whether you are an @@ -203,12 +188,12 @@ async def asyncio( Returns: AlertRoutingRuleResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_sources/__init__.py b/rootly_sdk/api/alert_sources/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/alert_sources/__init__.py +++ b/rootly_sdk/api/alert_sources/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/alert_sources/create_alerts_source.py b/rootly_sdk/api/alert_sources/create_alerts_source.py index 76064272..893eb998 100644 --- a/rootly_sdk/api/alert_sources/create_alerts_source.py +++ b/rootly_sdk/api/alert_sources/create_alerts_source.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewAlertsSource, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_sources", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> AlertsSourceResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertsSourceResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertsSourceResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertsSourceResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertsSourceResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertsSource, - ) -> Response[AlertsSourceResponse | ErrorsList]: - """ Creates an alert source + """Creates an alert source Creates a new alert source from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewAlertsSource, - ) -> AlertsSourceResponse | ErrorsList | None: - """ Creates an alert source + """Creates an alert source Creates a new alert source from provided data @@ -127,22 +114,20 @@ def sync( Returns: AlertsSourceResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertsSource, - ) -> Response[AlertsSourceResponse | ErrorsList]: - """ Creates an alert source + """Creates an alert source Creates a new alert source from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewAlertsSource, - ) -> AlertsSourceResponse | ErrorsList | None: - """ Creates an alert source + """Creates an alert source Creates a new alert source from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: AlertsSourceResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_sources/delete_alerts_source.py b/rootly_sdk/api/alert_sources/delete_alerts_source.py index 3be391aa..24e0748d 100644 --- a/rootly_sdk/api/alert_sources/delete_alerts_source.py +++ b/rootly_sdk/api/alert_sources/delete_alerts_source.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_sources/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_sources/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertsSourceResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertsSourceResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertsSourceResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertsSourceResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertsSourceResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertsSourceResponse | ErrorsList]: - """ Delete an alert source + """Delete an alert source Delete a specific alert source by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> AlertsSourceResponse | ErrorsList | None: - """ Delete an alert source + """Delete an alert source Delete a specific alert source by id @@ -113,22 +104,20 @@ def sync( Returns: AlertsSourceResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertsSourceResponse | ErrorsList]: - """ Delete an alert source + """Delete an alert source Delete a specific alert source by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> AlertsSourceResponse | ErrorsList | None: - """ Delete an alert source + """Delete an alert source Delete a specific alert source by id @@ -174,11 +159,11 @@ async def asyncio( Returns: AlertsSourceResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_sources/get_alerts_source.py b/rootly_sdk/api/alert_sources/get_alerts_source.py index d1576942..e3617a5a 100644 --- a/rootly_sdk/api/alert_sources/get_alerts_source.py +++ b/rootly_sdk/api/alert_sources/get_alerts_source.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_sources/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_sources/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertsSourceResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertsSourceResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertsSourceResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertsSourceResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertsSourceResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertsSourceResponse | ErrorsList]: - """ Retrieves an alert source + """Retrieves an alert source Retrieves a specific alert source by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> AlertsSourceResponse | ErrorsList | None: - """ Retrieves an alert source + """Retrieves an alert source Retrieves a specific alert source by id @@ -113,22 +104,20 @@ def sync( Returns: AlertsSourceResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertsSourceResponse | ErrorsList]: - """ Retrieves an alert source + """Retrieves an alert source Retrieves a specific alert source by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> AlertsSourceResponse | ErrorsList | None: - """ Retrieves an alert source + """Retrieves an alert source Retrieves a specific alert source by id @@ -174,11 +159,11 @@ async def asyncio( Returns: AlertsSourceResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_sources/list_alerts_sources.py b/rootly_sdk/api/alert_sources/list_alerts_sources.py index b5df41c2..39744362 100644 --- a/rootly_sdk/api/alert_sources/list_alerts_sources.py +++ b/rootly_sdk/api/alert_sources/list_alerts_sources.py @@ -20,11 +20,7 @@ def _get_kwargs( filtername: str | Unset = UNSET, filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -46,27 +42,21 @@ def _get_kwargs( 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/alert_sources", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertsSourceList | None: if response.status_code == 200: response_200 = AlertsSourceList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -96,9 +86,8 @@ def sync_detailed( filtername: str | Unset = UNSET, filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertsSourceList]: - """ List alert sources + """List alert sources List alert sources @@ -119,20 +108,18 @@ def sync_detailed( Returns: Response[AlertsSourceList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterstatuses=filterstatuses, -filtersource_types=filtersource_types, -filtername=filtername, -filterenabled=filterenabled, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterstatuses=filterstatuses, + filtersource_types=filtersource_types, + filtername=filtername, + filterenabled=filterenabled, + sort=sort, ) response = client.get_httpx_client().request( @@ -141,6 +128,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -153,9 +141,8 @@ def sync( filtername: str | Unset = UNSET, filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertsSourceList | None: - """ List alert sources + """List alert sources List alert sources @@ -176,23 +163,22 @@ def sync( Returns: AlertsSourceList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterstatuses=filterstatuses, -filtersource_types=filtersource_types, -filtername=filtername, -filterenabled=filterenabled, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterstatuses=filterstatuses, + filtersource_types=filtersource_types, + filtername=filtername, + filterenabled=filterenabled, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -205,9 +191,8 @@ async def asyncio_detailed( filtername: str | Unset = UNSET, filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertsSourceList]: - """ List alert sources + """List alert sources List alert sources @@ -228,28 +213,25 @@ async def asyncio_detailed( Returns: Response[AlertsSourceList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterstatuses=filterstatuses, -filtersource_types=filtersource_types, -filtername=filtername, -filterenabled=filterenabled, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterstatuses=filterstatuses, + filtersource_types=filtersource_types, + filtername=filtername, + filterenabled=filterenabled, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -262,9 +244,8 @@ async def asyncio( filtername: str | Unset = UNSET, filterenabled: bool | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertsSourceList | None: - """ List alert sources + """List alert sources List alert sources @@ -285,19 +266,19 @@ async def asyncio( Returns: AlertsSourceList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterstatuses=filterstatuses, -filtersource_types=filtersource_types, -filtername=filtername, -filterenabled=filterenabled, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterstatuses=filterstatuses, + filtersource_types=filtersource_types, + filtername=filtername, + filterenabled=filterenabled, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/alert_sources/update_alerts_source.py b/rootly_sdk/api/alert_sources/update_alerts_source.py index 4c791f51..32c1f348 100644 --- a/rootly_sdk/api/alert_sources/update_alerts_source.py +++ b/rootly_sdk/api/alert_sources/update_alerts_source.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateAlertsSource, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_sources/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_sources/{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) -> AlertsSourceResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertsSourceResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertsSourceResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertsSourceResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertsSourceResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertsSource, - ) -> Response[AlertsSourceResponse | ErrorsList]: - """ Update an alert source + """Update an alert source Update a specific alert source by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlertsSource, - ) -> AlertsSourceResponse | ErrorsList | None: - """ Update an alert source + """Update an alert source Update a specific alert source by id @@ -127,24 +118,22 @@ def sync( Returns: AlertsSourceResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlertsSource, - ) -> Response[AlertsSourceResponse | ErrorsList]: - """ Update an alert source + """Update an alert source Update a specific alert source by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[AlertsSourceResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlertsSource, - ) -> AlertsSourceResponse | ErrorsList | None: - """ Update an alert source + """Update an alert source Update a specific alert source by id @@ -194,12 +179,12 @@ async def asyncio( Returns: AlertsSourceResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_urgencies/__init__.py b/rootly_sdk/api/alert_urgencies/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/alert_urgencies/__init__.py +++ b/rootly_sdk/api/alert_urgencies/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/alert_urgencies/create_alert_urgency.py b/rootly_sdk/api/alert_urgencies/create_alert_urgency.py index e9913a33..d44f0d38 100644 --- a/rootly_sdk/api/alert_urgencies/create_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/create_alert_urgency.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewAlertUrgency, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alert_urgencies", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> AlertUrgencyResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertUrgencyResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertUrgencyResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertUrgencyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertUrgencyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlertUrgency, - ) -> Response[AlertUrgencyResponse | ErrorsList]: - """ Creates an alert urgency + """Creates an alert urgency Creates a new alert urgency from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewAlertUrgency, - ) -> AlertUrgencyResponse | ErrorsList | None: - """ Creates an alert urgency + """Creates an alert urgency Creates a new alert urgency from provided data @@ -127,22 +114,20 @@ def sync( Returns: AlertUrgencyResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlertUrgency, - ) -> Response[AlertUrgencyResponse | ErrorsList]: - """ Creates an alert urgency + """Creates an alert urgency Creates a new alert urgency from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewAlertUrgency, - ) -> AlertUrgencyResponse | ErrorsList | None: - """ Creates an alert urgency + """Creates an alert urgency Creates a new alert urgency from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: AlertUrgencyResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py b/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py index 98ebce8f..46ed88c4 100644 --- a/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/delete_alert_urgency.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/alert_urgencies/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_urgencies/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertUrgencyResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertUrgencyResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertUrgencyResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertUrgencyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertUrgencyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertUrgencyResponse | ErrorsList]: - """ Delete an alert urgency + """Delete an alert urgency Delete a specific alert urgency by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> AlertUrgencyResponse | ErrorsList | None: - """ Delete an alert urgency + """Delete an alert urgency Delete a specific alert urgency by id @@ -113,22 +104,20 @@ def sync( Returns: AlertUrgencyResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertUrgencyResponse | ErrorsList]: - """ Delete an alert urgency + """Delete an alert urgency Delete a specific alert urgency by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> AlertUrgencyResponse | ErrorsList | None: - """ Delete an alert urgency + """Delete an alert urgency Delete a specific alert urgency by id @@ -174,11 +159,11 @@ async def asyncio( Returns: AlertUrgencyResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_urgencies/get_alert_urgency.py b/rootly_sdk/api/alert_urgencies/get_alert_urgency.py index 6e401e67..947f8dd9 100644 --- a/rootly_sdk/api/alert_urgencies/get_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/get_alert_urgency.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alert_urgencies/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_urgencies/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertUrgencyResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertUrgencyResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertUrgencyResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertUrgencyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertUrgencyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertUrgencyResponse | ErrorsList]: - """ Retrieves an alert urgency + """Retrieves an alert urgency Retrieves a specific alert urgency by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> AlertUrgencyResponse | ErrorsList | None: - """ Retrieves an alert urgency + """Retrieves an alert urgency Retrieves a specific alert urgency by id @@ -113,22 +104,20 @@ def sync( Returns: AlertUrgencyResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertUrgencyResponse | ErrorsList]: - """ Retrieves an alert urgency + """Retrieves an alert urgency Retrieves a specific alert urgency by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> AlertUrgencyResponse | ErrorsList | None: - """ Retrieves an alert urgency + """Retrieves an alert urgency Retrieves a specific alert urgency by id @@ -174,11 +159,11 @@ async def asyncio( Returns: AlertUrgencyResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py index cfb0dd28..a4455d0f 100644 --- a/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py +++ b/rootly_sdk/api/alert_urgencies/list_alert_urgencies.py @@ -25,11 +25,7 @@ def _get_kwargs( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -61,27 +57,21 @@ def _get_kwargs( 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/alert_urgencies", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertUrgencyList | None: if response.status_code == 200: response_200 = AlertUrgencyList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -116,9 +106,8 @@ def sync_detailed( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertUrgencyList]: - """ List alert urgencies + """List alert urgencies List alert urgencies @@ -144,25 +133,23 @@ def sync_detailed( Returns: Response[AlertUrgencyList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -171,6 +158,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -188,9 +176,8 @@ def sync( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertUrgencyList | None: - """ List alert urgencies + """List alert urgencies List alert urgencies @@ -216,28 +203,27 @@ def sync( Returns: AlertUrgencyList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -255,9 +241,8 @@ async def asyncio_detailed( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AlertUrgencyList]: - """ List alert urgencies + """List alert urgencies List alert urgencies @@ -283,33 +268,30 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -327,9 +309,8 @@ async def asyncio( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AlertUrgencyList | None: - """ List alert urgencies + """List alert urgencies List alert urgencies @@ -355,24 +336,24 @@ async def asyncio( Returns: AlertUrgencyList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/alert_urgencies/update_alert_urgency.py b/rootly_sdk/api/alert_urgencies/update_alert_urgency.py index 0be9e405..2bef0a08 100644 --- a/rootly_sdk/api/alert_urgencies/update_alert_urgency.py +++ b/rootly_sdk/api/alert_urgencies/update_alert_urgency.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateAlertUrgency, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/alert_urgencies/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alert_urgencies/{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) -> AlertUrgencyResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertUrgencyResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertUrgencyResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertUrgencyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertUrgencyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlertUrgency, - ) -> Response[AlertUrgencyResponse | ErrorsList]: - """ Update an alert urgency + """Update an alert urgency Update a specific alert urgency by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlertUrgency, - ) -> AlertUrgencyResponse | ErrorsList | None: - """ Update an alert urgency + """Update an alert urgency Update a specific alert urgency by id @@ -127,24 +118,22 @@ def sync( Returns: AlertUrgencyResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlertUrgency, - ) -> Response[AlertUrgencyResponse | ErrorsList]: - """ Update an alert urgency + """Update an alert urgency Update a specific alert urgency by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[AlertUrgencyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlertUrgency, - ) -> AlertUrgencyResponse | ErrorsList | None: - """ Update an alert urgency + """Update an alert urgency Update a specific alert urgency by id @@ -194,12 +179,12 @@ async def asyncio( Returns: AlertUrgencyResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/__init__.py b/rootly_sdk/api/alerts/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/alerts/__init__.py +++ b/rootly_sdk/api/alerts/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/alerts/acknowledge_alert.py b/rootly_sdk/api/alerts/acknowledge_alert.py index b6f75d32..be8c6611 100644 --- a/rootly_sdk/api/alerts/acknowledge_alert.py +++ b/rootly_sdk/api/alerts/acknowledge_alert.py @@ -13,44 +13,34 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/alerts/{id}/acknowledge".format(id=quote(str(id), safe=""),), + "url": "/v1/alerts/{id}/acknowledge".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.from_dict(response.json()) - - return response_200 if response.status_code == 400: response_400 = ErrorsList.from_dict(response.json()) - - return response_400 if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) - - return response_404 if client.raise_on_unexpected_status: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertResponse | ErrorsList]: - """ Acknowledges an alert + """Acknowledges an alert Acknowledges a specific alert by id @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> AlertResponse | ErrorsList | None: - """ Acknowledges an alert + """Acknowledges an alert Acknowledges a specific alert by id @@ -120,22 +109,20 @@ def sync( Returns: AlertResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AlertResponse | ErrorsList]: - """ Acknowledges an alert + """Acknowledges an alert Acknowledges a specific alert by id @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> AlertResponse | ErrorsList | None: - """ Acknowledges an alert + """Acknowledges an alert Acknowledges a specific alert by id @@ -181,11 +164,11 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/attach_alert.py b/rootly_sdk/api/alerts/attach_alert.py index 23e93486..3f0911e6 100644 --- a/rootly_sdk/api/alerts/attach_alert.py +++ b/rootly_sdk/api/alerts/attach_alert.py @@ -16,43 +16,33 @@ def _get_kwargs( incident_id: str, *, body: AttachAlert, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/alerts".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/alerts".format( + incident_id=quote(str(incident_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) -> AlertList | ErrorsList | None: if response.status_code == 200: response_200 = AlertList.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: @@ -61,7 +51,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertList | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +67,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: AttachAlert, - ) -> Response[AlertList | ErrorsList]: - """ Attach alerts to an incident + """Attach alerts to an incident Attach alerts to an incident from provided data @@ -91,13 +82,11 @@ def sync_detailed( Returns: Response[AlertList | ErrorsList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +95,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, body: AttachAlert, - ) -> AlertList | ErrorsList | None: - """ Attach alerts to an incident + """Attach alerts to an incident Attach alerts to an incident from provided data @@ -127,24 +116,22 @@ def sync( Returns: AlertList | ErrorsList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: AttachAlert, - ) -> Response[AlertList | ErrorsList]: - """ Attach alerts to an incident + """Attach alerts to an incident Attach alerts to an incident from provided data @@ -158,29 +145,25 @@ async def asyncio_detailed( Returns: Response[AlertList | ErrorsList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: AttachAlert, - ) -> AlertList | ErrorsList | None: - """ Attach alerts to an incident + """Attach alerts to an incident Attach alerts to an incident from provided data @@ -194,12 +177,12 @@ async def asyncio( Returns: AlertList | ErrorsList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/create_alert.py b/rootly_sdk/api/alerts/create_alert.py index 75adf61e..e7ef6e59 100644 --- a/rootly_sdk/api/alerts/create_alert.py +++ b/rootly_sdk/api/alerts/create_alert.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewAlert, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/alerts", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> AlertResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertResponse | ErrorsList | None: if response.status_code == 201: response_201 = AlertResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAlert, - ) -> Response[AlertResponse | ErrorsList]: - """ Creates an alert + """Creates an alert Creates a new alert from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewAlert, - ) -> AlertResponse | ErrorsList | None: - """ Creates an alert + """Creates an alert Creates a new alert from provided data @@ -127,22 +114,20 @@ def sync( Returns: AlertResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAlert, - ) -> Response[AlertResponse | ErrorsList]: - """ Creates an alert + """Creates an alert Creates a new alert from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewAlert, - ) -> AlertResponse | ErrorsList | None: - """ Creates an alert + """Creates an alert Creates a new alert from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/escalate_alert.py b/rootly_sdk/api/alerts/escalate_alert.py index 1bdf4924..c4a33380 100644 --- a/rootly_sdk/api/alerts/escalate_alert.py +++ b/rootly_sdk/api/alerts/escalate_alert.py @@ -16,59 +16,46 @@ def _get_kwargs( id: str, *, body: EscalateAlert | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/alerts/{id}/escalate".format(id=quote(str(id), safe=""),), + "url": "/v1/alerts/{id}/escalate".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) -> AlertResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.from_dict(response.json()) - - return response_200 if response.status_code == 400: response_400 = ErrorsList.from_dict(response.json()) - - return response_400 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: @@ -77,7 +64,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -91,9 +80,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: EscalateAlert | Unset = UNSET, - ) -> Response[AlertResponse | ErrorsList]: - """ Escalates an alert + """Escalates an alert Escalates a specific alert to the next or specified level in its escalation policy @@ -107,13 +95,11 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -122,14 +108,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: EscalateAlert | Unset = UNSET, - ) -> AlertResponse | ErrorsList | None: - """ Escalates an alert + """Escalates an alert Escalates a specific alert to the next or specified level in its escalation policy @@ -143,24 +129,22 @@ def sync( Returns: AlertResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: EscalateAlert | Unset = UNSET, - ) -> Response[AlertResponse | ErrorsList]: - """ Escalates an alert + """Escalates an alert Escalates a specific alert to the next or specified level in its escalation policy @@ -174,29 +158,25 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: EscalateAlert | Unset = UNSET, - ) -> AlertResponse | ErrorsList | None: - """ Escalates an alert + """Escalates an alert Escalates a specific alert to the next or specified level in its escalation policy @@ -210,12 +190,12 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/get_alert.py b/rootly_sdk/api/alerts/get_alert.py index d83391c9..20a1c7fd 100644 --- a/rootly_sdk/api/alerts/get_alert.py +++ b/rootly_sdk/api/alerts/get_alert.py @@ -16,11 +16,7 @@ def _get_kwargs( id: str, *, include: GetAlertInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,34 +26,30 @@ def _get_kwargs( params["include"] = json_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/alerts/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alerts/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.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: @@ -66,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetAlertInclude | Unset = UNSET, - ) -> Response[AlertResponse | ErrorsList]: - """ Retrieves an alert + """Retrieves an alert Retrieves a specific alert by id @@ -96,13 +89,11 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -111,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetAlertInclude | Unset = UNSET, - ) -> AlertResponse | ErrorsList | None: - """ Retrieves an alert + """Retrieves an alert Retrieves a specific alert by id @@ -132,24 +123,22 @@ def sync( Returns: AlertResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetAlertInclude | Unset = UNSET, - ) -> Response[AlertResponse | ErrorsList]: - """ Retrieves an alert + """Retrieves an alert Retrieves a specific alert by id @@ -163,29 +152,25 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetAlertInclude | Unset = UNSET, - ) -> AlertResponse | ErrorsList | None: - """ Retrieves an alert + """Retrieves an alert Retrieves a specific alert by id @@ -199,12 +184,12 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/get_receipt.py b/rootly_sdk/api/alerts/get_receipt.py index 6eaddc87..0cd00675 100644 --- a/rootly_sdk/api/alerts/get_receipt.py +++ b/rootly_sdk/api/alerts/get_receipt.py @@ -12,30 +12,22 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/alerts/receipts/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alerts/receipts/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | Receipt | None: if response.status_code == 200: response_200 = Receipt.from_dict(response.json()) - - return response_200 if response.status_code == 404: @@ -61,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | Receipt]: - """ Get a receipt + """Get a receipt Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) failure reason and referenced resource. @@ -77,12 +68,10 @@ def sync_detailed( Returns: Response[Any | Receipt] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -91,13 +80,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | Receipt | None: - """ Get a receipt + """Get a receipt Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) failure reason and referenced resource. @@ -111,22 +100,20 @@ def sync( Returns: Any | Receipt - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | Receipt]: - """ Get a receipt + """Get a receipt Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) failure reason and referenced resource. @@ -140,27 +127,23 @@ async def asyncio_detailed( Returns: Response[Any | Receipt] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | Receipt | None: - """ Get a receipt + """Get a receipt Retrieve the delivery receipt for a notification by ID, including its state and (when applicable) failure reason and referenced resource. @@ -174,11 +157,11 @@ async def asyncio( Returns: Any | Receipt - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/list_alerts.py b/rootly_sdk/api/alerts/list_alerts.py index 98228ad8..6e36af8d 100644 --- a/rootly_sdk/api/alerts/list_alerts.py +++ b/rootly_sdk/api/alerts/list_alerts.py @@ -62,11 +62,7 @@ def _get_kwargs( pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -174,27 +170,21 @@ def _get_kwargs( 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/alerts", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertList | None: if response.status_code == 200: response_200 = AlertList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -265,9 +255,8 @@ def sync_detailed( pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[AlertList]: - """ List alerts + """List alerts List alerts @@ -329,61 +318,59 @@ def sync_detailed( Returns: Response[AlertList] - """ - + """ kwargs = _get_kwargs( include=include, -filterstatus=filterstatus, -filtersource=filtersource, -filterservices=filterservices, -filterenvironments=filterenvironments, -filtergroups=filtergroups, -filterlabels=filterlabels, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterended_atgt=filterended_atgt, -filterended_atgte=filterended_atgte, -filterended_atlt=filterended_atlt, -filterended_atlte=filterended_atlte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterupdated_atgt=filterupdated_atgt, -filterupdated_atgte=filterupdated_atgte, -filterupdated_atlt=filterupdated_atlt, -filterupdated_atlte=filterupdated_atlte, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filtergroupseq=filtergroupseq, -filtergroupsnot_eq=filtergroupsnot_eq, -filtergroupsin=filtergroupsin, -filtergroupsnot_in=filtergroupsnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -pageafter=pageafter, -pagenumber=pagenumber, -pagesize=pagesize, - + filterstatus=filterstatus, + filtersource=filtersource, + filterservices=filterservices, + filterenvironments=filterenvironments, + filtergroups=filtergroups, + filterlabels=filterlabels, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterended_atgt=filterended_atgt, + filterended_atgte=filterended_atgte, + filterended_atlt=filterended_atlt, + filterended_atlte=filterended_atlte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filtergroupseq=filtergroupseq, + filtergroupsnot_eq=filtergroupsnot_eq, + filtergroupsin=filtergroupsin, + filtergroupsnot_in=filtergroupsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + pageafter=pageafter, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -392,6 +379,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -445,9 +433,8 @@ def sync( pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> AlertList | None: - """ List alerts + """List alerts List alerts @@ -509,64 +496,63 @@ def sync( Returns: AlertList - """ - + """ return sync_detailed( client=client, -include=include, -filterstatus=filterstatus, -filtersource=filtersource, -filterservices=filterservices, -filterenvironments=filterenvironments, -filtergroups=filtergroups, -filterlabels=filterlabels, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterended_atgt=filterended_atgt, -filterended_atgte=filterended_atgte, -filterended_atlt=filterended_atlt, -filterended_atlte=filterended_atlte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterupdated_atgt=filterupdated_atgt, -filterupdated_atgte=filterupdated_atgte, -filterupdated_atlt=filterupdated_atlt, -filterupdated_atlte=filterupdated_atlte, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filtergroupseq=filtergroupseq, -filtergroupsnot_eq=filtergroupsnot_eq, -filtergroupsin=filtergroupsin, -filtergroupsnot_in=filtergroupsnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -pageafter=pageafter, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + filterstatus=filterstatus, + filtersource=filtersource, + filterservices=filterservices, + filterenvironments=filterenvironments, + filtergroups=filtergroups, + filterlabels=filterlabels, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterended_atgt=filterended_atgt, + filterended_atgte=filterended_atgte, + filterended_atlt=filterended_atlt, + filterended_atlte=filterended_atlte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filtergroupseq=filtergroupseq, + filtergroupsnot_eq=filtergroupsnot_eq, + filtergroupsin=filtergroupsin, + filtergroupsnot_in=filtergroupsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + pageafter=pageafter, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -620,9 +606,8 @@ async def asyncio_detailed( pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[AlertList]: - """ List alerts + """List alerts List alerts @@ -684,69 +669,66 @@ async def asyncio_detailed( Returns: Response[AlertList] - """ - + """ kwargs = _get_kwargs( include=include, -filterstatus=filterstatus, -filtersource=filtersource, -filterservices=filterservices, -filterenvironments=filterenvironments, -filtergroups=filtergroups, -filterlabels=filterlabels, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterended_atgt=filterended_atgt, -filterended_atgte=filterended_atgte, -filterended_atlt=filterended_atlt, -filterended_atlte=filterended_atlte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterupdated_atgt=filterupdated_atgt, -filterupdated_atgte=filterupdated_atgte, -filterupdated_atlt=filterupdated_atlt, -filterupdated_atlte=filterupdated_atlte, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filtergroupseq=filtergroupseq, -filtergroupsnot_eq=filtergroupsnot_eq, -filtergroupsin=filtergroupsin, -filtergroupsnot_in=filtergroupsnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -pageafter=pageafter, -pagenumber=pagenumber, -pagesize=pagesize, - + filterstatus=filterstatus, + filtersource=filtersource, + filterservices=filterservices, + filterenvironments=filterenvironments, + filtergroups=filtergroups, + filterlabels=filterlabels, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterended_atgt=filterended_atgt, + filterended_atgte=filterended_atgte, + filterended_atlt=filterended_atlt, + filterended_atlte=filterended_atlte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filtergroupseq=filtergroupseq, + filtergroupsnot_eq=filtergroupsnot_eq, + filtergroupsin=filtergroupsin, + filtergroupsnot_in=filtergroupsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + pageafter=pageafter, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -800,9 +782,8 @@ async def asyncio( pageafter: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> AlertList | None: - """ List alerts + """List alerts List alerts @@ -864,60 +845,60 @@ async def asyncio( Returns: AlertList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -filterstatus=filterstatus, -filtersource=filtersource, -filterservices=filterservices, -filterenvironments=filterenvironments, -filtergroups=filtergroups, -filterlabels=filterlabels, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterended_atgt=filterended_atgt, -filterended_atgte=filterended_atgte, -filterended_atlt=filterended_atlt, -filterended_atlte=filterended_atlte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterupdated_atgt=filterupdated_atgt, -filterupdated_atgte=filterupdated_atgte, -filterupdated_atlt=filterupdated_atlt, -filterupdated_atlte=filterupdated_atlte, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filtergroupseq=filtergroupseq, -filtergroupsnot_eq=filtergroupsnot_eq, -filtergroupsin=filtergroupsin, -filtergroupsnot_in=filtergroupsnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -pageafter=pageafter, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + filterstatus=filterstatus, + filtersource=filtersource, + filterservices=filterservices, + filterenvironments=filterenvironments, + filtergroups=filtergroups, + filterlabels=filterlabels, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterended_atgt=filterended_atgt, + filterended_atgte=filterended_atgte, + filterended_atlt=filterended_atlt, + filterended_atlte=filterended_atlte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filtergroupseq=filtergroupseq, + filtergroupsnot_eq=filtergroupsnot_eq, + filtergroupsin=filtergroupsin, + filtergroupsnot_in=filtergroupsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + pageafter=pageafter, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/list_incident_alerts.py b/rootly_sdk/api/alerts/list_incident_alerts.py index ef39a459..4358b186 100644 --- a/rootly_sdk/api/alerts/list_incident_alerts.py +++ b/rootly_sdk/api/alerts/list_incident_alerts.py @@ -15,11 +15,7 @@ def _get_kwargs( incident_id: str, *, include: ListIncidentAlertsInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -29,27 +25,23 @@ def _get_kwargs( params["include"] = json_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/incidents/{incident_id}/alerts".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/alerts".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AlertList | None: if response.status_code == 200: response_200 = AlertList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -72,9 +64,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: ListIncidentAlertsInclude | Unset = UNSET, - ) -> Response[AlertList]: - """ List Incident alerts + """List Incident alerts List incident alerts @@ -88,13 +79,11 @@ def sync_detailed( Returns: Response[AlertList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -103,14 +92,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, include: ListIncidentAlertsInclude | Unset = UNSET, - ) -> AlertList | None: - """ List Incident alerts + """List Incident alerts List incident alerts @@ -124,24 +113,22 @@ def sync( Returns: AlertList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, include: ListIncidentAlertsInclude | Unset = UNSET, - ) -> Response[AlertList]: - """ List Incident alerts + """List Incident alerts List incident alerts @@ -155,29 +142,25 @@ async def asyncio_detailed( Returns: Response[AlertList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, include: ListIncidentAlertsInclude | Unset = UNSET, - ) -> AlertList | None: - """ List Incident alerts + """List Incident alerts List incident alerts @@ -191,12 +174,12 @@ async def asyncio( Returns: AlertList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/resolve_alert.py b/rootly_sdk/api/alerts/resolve_alert.py index 8c3b142e..66ec0165 100644 --- a/rootly_sdk/api/alerts/resolve_alert.py +++ b/rootly_sdk/api/alerts/resolve_alert.py @@ -16,45 +16,36 @@ def _get_kwargs( id: str, *, body: ResolveAlert | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/alerts/{id}/resolve".format(id=quote(str(id), safe=""),), + "url": "/v1/alerts/{id}/resolve".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) -> AlertResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.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: @@ -63,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -77,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: ResolveAlert | Unset = UNSET, - ) -> Response[AlertResponse | ErrorsList]: - """ Resolves an alert + """Resolves an alert Resolves a specific alert by id @@ -93,13 +85,11 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -108,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: ResolveAlert | Unset = UNSET, - ) -> AlertResponse | ErrorsList | None: - """ Resolves an alert + """Resolves an alert Resolves a specific alert by id @@ -129,24 +119,22 @@ def sync( Returns: AlertResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: ResolveAlert | Unset = UNSET, - ) -> Response[AlertResponse | ErrorsList]: - """ Resolves an alert + """Resolves an alert Resolves a specific alert by id @@ -160,29 +148,25 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: ResolveAlert | Unset = UNSET, - ) -> AlertResponse | ErrorsList | None: - """ Resolves an alert + """Resolves an alert Resolves a specific alert by id @@ -196,12 +180,12 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/snooze_alert.py b/rootly_sdk/api/alerts/snooze_alert.py index 8b4308be..cf592ccd 100644 --- a/rootly_sdk/api/alerts/snooze_alert.py +++ b/rootly_sdk/api/alerts/snooze_alert.py @@ -16,57 +16,45 @@ def _get_kwargs( id: str, *, body: SnoozeAlert, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/alerts/{id}/snooze".format(id=quote(str(id), safe=""),), + "url": "/v1/alerts/{id}/snooze".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) -> AlertResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.from_dict(response.json()) - - return response_200 if response.status_code == 400: response_400 = ErrorsList.from_dict(response.json()) - - return response_400 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: @@ -75,7 +63,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,9 +79,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: SnoozeAlert, - ) -> Response[AlertResponse | ErrorsList]: - """ Snoozes an alert + """Snoozes an alert Snoozes a specific alert by id, extending the acknowledgment timeout @@ -105,13 +94,11 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -120,14 +107,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: SnoozeAlert, - ) -> AlertResponse | ErrorsList | None: - """ Snoozes an alert + """Snoozes an alert Snoozes a specific alert by id, extending the acknowledgment timeout @@ -141,24 +128,22 @@ def sync( Returns: AlertResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: SnoozeAlert, - ) -> Response[AlertResponse | ErrorsList]: - """ Snoozes an alert + """Snoozes an alert Snoozes a specific alert by id, extending the acknowledgment timeout @@ -172,29 +157,25 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: SnoozeAlert, - ) -> AlertResponse | ErrorsList | None: - """ Snoozes an alert + """Snoozes an alert Snoozes a specific alert by id, extending the acknowledgment timeout @@ -208,12 +189,12 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/alerts/update_alert.py b/rootly_sdk/api/alerts/update_alert.py index e5533ed5..5a60b818 100644 --- a/rootly_sdk/api/alerts/update_alert.py +++ b/rootly_sdk/api/alerts/update_alert.py @@ -16,45 +16,36 @@ def _get_kwargs( id: str, *, body: UpdateAlert | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/alerts/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/alerts/{id}".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) -> AlertResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AlertResponse | ErrorsList | None: if response.status_code == 200: response_200 = AlertResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -63,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AlertResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AlertResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -77,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAlert | Unset = UNSET, - ) -> Response[AlertResponse | ErrorsList]: - """ Update alert + """Update alert Updates an alert @@ -93,13 +85,11 @@ def sync_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -108,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateAlert | Unset = UNSET, - ) -> AlertResponse | ErrorsList | None: - """ Update alert + """Update alert Updates an alert @@ -129,24 +119,22 @@ def sync( Returns: AlertResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAlert | Unset = UNSET, - ) -> Response[AlertResponse | ErrorsList]: - """ Update alert + """Update alert Updates an alert @@ -160,29 +148,25 @@ async def asyncio_detailed( Returns: Response[AlertResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAlert | Unset = UNSET, - ) -> AlertResponse | ErrorsList | None: - """ Update alert + """Update alert Updates an alert @@ -196,12 +180,12 @@ async def asyncio( Returns: AlertResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/api_keys/__init__.py b/rootly_sdk/api/api_keys/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/api_keys/__init__.py +++ b/rootly_sdk/api/api_keys/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/api_keys/create_api_key.py b/rootly_sdk/api/api_keys/create_api_key.py index 070ac9c1..6573821d 100644 --- a/rootly_sdk/api/api_keys/create_api_key.py +++ b/rootly_sdk/api/api_keys/create_api_key.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewApiKey, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/api_keys", @@ -30,34 +24,28 @@ def _get_kwargs( _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: +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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyWithTokenResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyWithTokenResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewApiKey, - ) -> Response[ApiKeyWithTokenResponse | ErrorsList]: - """ Creates an API key + """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. @@ -105,12 +94,10 @@ def sync_detailed( Returns: Response[ApiKeyWithTokenResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -119,13 +106,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewApiKey, - ) -> ApiKeyWithTokenResponse | ErrorsList | None: - """ Creates an API key + """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. @@ -149,22 +136,20 @@ def sync( Returns: ApiKeyWithTokenResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewApiKey, - ) -> Response[ApiKeyWithTokenResponse | ErrorsList]: - """ Creates an API key + """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. @@ -188,27 +173,23 @@ async def asyncio_detailed( Returns: Response[ApiKeyWithTokenResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 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. @@ -232,11 +213,11 @@ async def asyncio( Returns: ApiKeyWithTokenResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + 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 index 3dfa371c..948015a0 100644 --- a/rootly_sdk/api/api_keys/delete_api_key.py +++ b/rootly_sdk/api/api_keys/delete_api_key.py @@ -14,37 +14,29 @@ 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=""),), + "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: +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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: UUID, *, client: AuthenticatedClient, - ) -> Response[ApiKeyResponse | ErrorsList]: - """ Revoke an API key + """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. @@ -85,12 +78,10 @@ def sync_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -99,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: UUID, *, client: AuthenticatedClient, - ) -> ApiKeyResponse | ErrorsList | None: - """ Revoke an API key + """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. @@ -122,22 +113,20 @@ def sync( Returns: ApiKeyResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: UUID, *, client: AuthenticatedClient, - ) -> Response[ApiKeyResponse | ErrorsList]: - """ Revoke an API key + """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. @@ -154,27 +143,23 @@ async def asyncio_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 Revoke an API key. The key is immediately invalidated and can no longer be used for authentication. This action cannot be undone. @@ -191,11 +176,11 @@ async def asyncio( Returns: ApiKeyResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + 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 index 32d73750..6ba239a8 100644 --- a/rootly_sdk/api/api_keys/get_api_key.py +++ b/rootly_sdk/api/api_keys/get_api_key.py @@ -16,44 +16,36 @@ 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=""),), + "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: +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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, - ) -> Response[ApiKeyResponse | ErrorsList]: - """ Retrieves an API key + """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. @@ -93,13 +86,11 @@ def sync_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -108,14 +99,14 @@ def sync_detailed( 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 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. @@ -130,24 +121,22 @@ def sync( Returns: ApiKeyResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + 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 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. @@ -162,29 +151,25 @@ async def asyncio_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 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. @@ -199,12 +184,12 @@ async def asyncio( Returns: ApiKeyResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + 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 index 8400a46a..6f057d91 100644 --- a/rootly_sdk/api/api_keys/list_api_keys.py +++ b/rootly_sdk/api/api_keys/list_api_keys.py @@ -36,11 +36,7 @@ def _get_kwargs( filterlast_used_atlt: str | Unset = UNSET, filterlast_used_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -92,34 +88,28 @@ def _get_kwargs( 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: +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: @@ -128,7 +118,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyList | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -164,9 +156,8 @@ def sync_detailed( 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 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. @@ -218,35 +209,33 @@ def sync_detailed( 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, - + 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( @@ -255,6 +244,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -282,9 +272,8 @@ def sync( 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 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. @@ -336,38 +325,37 @@ def sync( 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, - + 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, @@ -395,9 +383,8 @@ async def asyncio_detailed( 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 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. @@ -449,43 +436,40 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -513,9 +497,8 @@ async def asyncio( 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 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. @@ -567,34 +550,34 @@ async def asyncio( 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 + """ + + 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 index d9b92406..9bdb2773 100644 --- a/rootly_sdk/api/api_keys/rotate_api_key.py +++ b/rootly_sdk/api/api_keys/rotate_api_key.py @@ -16,45 +16,36 @@ 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=""),), + "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: +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: @@ -63,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyWithTokenResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyWithTokenResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -77,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: RotateApiKey | Unset = UNSET, - ) -> Response[ApiKeyWithTokenResponse | ErrorsList]: - """ Rotate an API key + """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. @@ -112,13 +104,11 @@ def sync_detailed( Returns: Response[ApiKeyWithTokenResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -127,14 +117,14 @@ def sync_detailed( 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 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. @@ -167,24 +157,22 @@ def sync( Returns: ApiKeyWithTokenResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + 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 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. @@ -217,29 +205,25 @@ async def asyncio_detailed( Returns: Response[ApiKeyWithTokenResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 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. @@ -272,12 +256,12 @@ async def asyncio( Returns: ApiKeyWithTokenResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + 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 index 245fed2f..94cebad5 100644 --- a/rootly_sdk/api/api_keys/update_api_key.py +++ b/rootly_sdk/api/api_keys/update_api_key.py @@ -17,43 +17,35 @@ 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=""),), + "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: +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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ApiKeyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ApiKeyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateApiKey, - ) -> Response[ApiKeyResponse | ErrorsList]: - """ Update an API key + """Update an API key Update an API key's mutable attributes: `name`, `description`, and `expires_at`. @@ -98,13 +91,11 @@ def sync_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +104,14 @@ def sync_detailed( 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 Update an API key's mutable attributes: `name`, `description`, and `expires_at`. @@ -140,24 +131,22 @@ def sync( Returns: ApiKeyResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + 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 Update an API key's mutable attributes: `name`, `description`, and `expires_at`. @@ -177,29 +166,25 @@ async def asyncio_detailed( Returns: Response[ApiKeyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 Update an API key's mutable attributes: `name`, `description`, and `expires_at`. @@ -219,12 +204,12 @@ async def asyncio( Returns: ApiKeyResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/audits/__init__.py b/rootly_sdk/api/audits/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/audits/__init__.py +++ b/rootly_sdk/api/audits/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/audits/list_audits.py b/rootly_sdk/api/audits/list_audits.py index 37bbb958..fce7f754 100644 --- a/rootly_sdk/api/audits/list_audits.py +++ b/rootly_sdk/api/audits/list_audits.py @@ -39,11 +39,7 @@ def _get_kwargs( filteritem_typein: str | Unset = UNSET, filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -103,27 +99,21 @@ def _get_kwargs( 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/audits", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuditsList | None: if response.status_code == 200: response_200 = AuditsList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -172,9 +162,8 @@ def sync_detailed( filteritem_typein: str | Unset = UNSET, filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AuditsList]: - """ List audits + """List audits List audits @@ -214,39 +203,37 @@ def sync_detailed( Returns: Response[AuditsList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filteruser_id=filteruser_id, -filterapi_key_id=filterapi_key_id, -filtersource=filtersource, -filteritem_type=filteritem_type, -filteruser_ideq=filteruser_ideq, -filteruser_idnot_eq=filteruser_idnot_eq, -filteruser_idin=filteruser_idin, -filteruser_idnot_in=filteruser_idnot_in, -filterapi_key_ideq=filterapi_key_ideq, -filterapi_key_idnot_eq=filterapi_key_idnot_eq, -filterapi_key_idin=filterapi_key_idin, -filterapi_key_idnot_in=filterapi_key_idnot_in, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filteritem_typeeq=filteritem_typeeq, -filteritem_typenot_eq=filteritem_typenot_eq, -filteritem_typein=filteritem_typein, -filteritem_typenot_in=filteritem_typenot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filteruser_id=filteruser_id, + filterapi_key_id=filterapi_key_id, + filtersource=filtersource, + filteritem_type=filteritem_type, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterapi_key_ideq=filterapi_key_ideq, + filterapi_key_idnot_eq=filterapi_key_idnot_eq, + filterapi_key_idin=filterapi_key_idin, + filterapi_key_idnot_in=filterapi_key_idnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filteritem_typeeq=filteritem_typeeq, + filteritem_typenot_eq=filteritem_typenot_eq, + filteritem_typein=filteritem_typein, + filteritem_typenot_in=filteritem_typenot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -255,6 +242,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -286,9 +274,8 @@ def sync( filteritem_typein: str | Unset = UNSET, filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AuditsList | None: - """ List audits + """List audits List audits @@ -328,42 +315,41 @@ def sync( Returns: AuditsList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filteruser_id=filteruser_id, -filterapi_key_id=filterapi_key_id, -filtersource=filtersource, -filteritem_type=filteritem_type, -filteruser_ideq=filteruser_ideq, -filteruser_idnot_eq=filteruser_idnot_eq, -filteruser_idin=filteruser_idin, -filteruser_idnot_in=filteruser_idnot_in, -filterapi_key_ideq=filterapi_key_ideq, -filterapi_key_idnot_eq=filterapi_key_idnot_eq, -filterapi_key_idin=filterapi_key_idin, -filterapi_key_idnot_in=filterapi_key_idnot_in, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filteritem_typeeq=filteritem_typeeq, -filteritem_typenot_eq=filteritem_typenot_eq, -filteritem_typein=filteritem_typein, -filteritem_typenot_in=filteritem_typenot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filteruser_id=filteruser_id, + filterapi_key_id=filterapi_key_id, + filtersource=filtersource, + filteritem_type=filteritem_type, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterapi_key_ideq=filterapi_key_ideq, + filterapi_key_idnot_eq=filterapi_key_idnot_eq, + filterapi_key_idin=filterapi_key_idin, + filterapi_key_idnot_in=filterapi_key_idnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filteritem_typeeq=filteritem_typeeq, + filteritem_typenot_eq=filteritem_typenot_eq, + filteritem_typein=filteritem_typein, + filteritem_typenot_in=filteritem_typenot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -395,9 +381,8 @@ async def asyncio_detailed( filteritem_typein: str | Unset = UNSET, filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AuditsList]: - """ List audits + """List audits List audits @@ -437,47 +422,44 @@ async def asyncio_detailed( Returns: Response[AuditsList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filteruser_id=filteruser_id, -filterapi_key_id=filterapi_key_id, -filtersource=filtersource, -filteritem_type=filteritem_type, -filteruser_ideq=filteruser_ideq, -filteruser_idnot_eq=filteruser_idnot_eq, -filteruser_idin=filteruser_idin, -filteruser_idnot_in=filteruser_idnot_in, -filterapi_key_ideq=filterapi_key_ideq, -filterapi_key_idnot_eq=filterapi_key_idnot_eq, -filterapi_key_idin=filterapi_key_idin, -filterapi_key_idnot_in=filterapi_key_idnot_in, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filteritem_typeeq=filteritem_typeeq, -filteritem_typenot_eq=filteritem_typenot_eq, -filteritem_typein=filteritem_typein, -filteritem_typenot_in=filteritem_typenot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filteruser_id=filteruser_id, + filterapi_key_id=filterapi_key_id, + filtersource=filtersource, + filteritem_type=filteritem_type, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterapi_key_ideq=filterapi_key_ideq, + filterapi_key_idnot_eq=filterapi_key_idnot_eq, + filterapi_key_idin=filterapi_key_idin, + filterapi_key_idnot_in=filterapi_key_idnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filteritem_typeeq=filteritem_typeeq, + filteritem_typenot_eq=filteritem_typenot_eq, + filteritem_typein=filteritem_typein, + filteritem_typenot_in=filteritem_typenot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -509,9 +491,8 @@ async def asyncio( filteritem_typein: str | Unset = UNSET, filteritem_typenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AuditsList | None: - """ List audits + """List audits List audits @@ -551,38 +532,38 @@ async def asyncio( Returns: AuditsList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filteruser_id=filteruser_id, -filterapi_key_id=filterapi_key_id, -filtersource=filtersource, -filteritem_type=filteritem_type, -filteruser_ideq=filteruser_ideq, -filteruser_idnot_eq=filteruser_idnot_eq, -filteruser_idin=filteruser_idin, -filteruser_idnot_in=filteruser_idnot_in, -filterapi_key_ideq=filterapi_key_ideq, -filterapi_key_idnot_eq=filterapi_key_idnot_eq, -filterapi_key_idin=filterapi_key_idin, -filterapi_key_idnot_in=filterapi_key_idnot_in, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filteritem_typeeq=filteritem_typeeq, -filteritem_typenot_eq=filteritem_typenot_eq, -filteritem_typein=filteritem_typein, -filteritem_typenot_in=filteritem_typenot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filteruser_id=filteruser_id, + filterapi_key_id=filterapi_key_id, + filtersource=filtersource, + filteritem_type=filteritem_type, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterapi_key_ideq=filterapi_key_ideq, + filterapi_key_idnot_eq=filterapi_key_idnot_eq, + filterapi_key_idin=filterapi_key_idin, + filterapi_key_idnot_in=filterapi_key_idnot_in, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filteritem_typeeq=filteritem_typeeq, + filteritem_typenot_eq=filteritem_typenot_eq, + filteritem_typein=filteritem_typein, + filteritem_typenot_in=filteritem_typenot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/authorizations/__init__.py b/rootly_sdk/api/authorizations/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/authorizations/__init__.py +++ b/rootly_sdk/api/authorizations/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/authorizations/create_authorization.py b/rootly_sdk/api/authorizations/create_authorization.py index 2124f479..2d0bfee5 100644 --- a/rootly_sdk/api/authorizations/create_authorization.py +++ b/rootly_sdk/api/authorizations/create_authorization.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewAuthorization, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/authorizations", @@ -30,27 +24,23 @@ def _get_kwargs( _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) -> AuthorizationResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AuthorizationResponse | ErrorsList | None: if response.status_code == 201: response_201 = AuthorizationResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AuthorizationResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AuthorizationResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewAuthorization, - ) -> Response[AuthorizationResponse | ErrorsList]: - """ Creates an authorization + """Creates an authorization Creates a new authorization from provided data @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewAuthorization, - ) -> AuthorizationResponse | ErrorsList | None: - """ Creates an authorization + """Creates an authorization Creates a new authorization from provided data @@ -120,22 +109,20 @@ def sync( Returns: AuthorizationResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewAuthorization, - ) -> Response[AuthorizationResponse | ErrorsList]: - """ Creates an authorization + """Creates an authorization Creates a new authorization from provided data @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewAuthorization, - ) -> AuthorizationResponse | ErrorsList | None: - """ Creates an authorization + """Creates an authorization Creates a new authorization from provided data @@ -181,11 +164,11 @@ async def asyncio( Returns: AuthorizationResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/authorizations/delete_authorization.py b/rootly_sdk/api/authorizations/delete_authorization.py index 6e474920..9fed121b 100644 --- a/rootly_sdk/api/authorizations/delete_authorization.py +++ b/rootly_sdk/api/authorizations/delete_authorization.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/authorizations/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/authorizations/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuthorizationResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AuthorizationResponse | ErrorsList | None: if response.status_code == 200: response_200 = AuthorizationResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AuthorizationResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AuthorizationResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AuthorizationResponse | ErrorsList]: - """ Delete an authorization + """Delete an authorization Delete a specific authorization by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> AuthorizationResponse | ErrorsList | None: - """ Delete an authorization + """Delete an authorization Delete a specific authorization by id @@ -113,22 +104,20 @@ def sync( Returns: AuthorizationResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AuthorizationResponse | ErrorsList]: - """ Delete an authorization + """Delete an authorization Delete a specific authorization by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> AuthorizationResponse | ErrorsList | None: - """ Delete an authorization + """Delete an authorization Delete a specific authorization by id @@ -174,11 +159,11 @@ async def asyncio( Returns: AuthorizationResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/authorizations/get_authorization.py b/rootly_sdk/api/authorizations/get_authorization.py index a4540024..c58b0704 100644 --- a/rootly_sdk/api/authorizations/get_authorization.py +++ b/rootly_sdk/api/authorizations/get_authorization.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/authorizations/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/authorizations/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuthorizationResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AuthorizationResponse | ErrorsList | None: if response.status_code == 200: response_200 = AuthorizationResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AuthorizationResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AuthorizationResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AuthorizationResponse | ErrorsList]: - """ Retrieves an authorization + """Retrieves an authorization Retrieves a specific authorization by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> AuthorizationResponse | ErrorsList | None: - """ Retrieves an authorization + """Retrieves an authorization Retrieves a specific authorization by id @@ -113,22 +104,20 @@ def sync( Returns: AuthorizationResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[AuthorizationResponse | ErrorsList]: - """ Retrieves an authorization + """Retrieves an authorization Retrieves a specific authorization by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> AuthorizationResponse | ErrorsList | None: - """ Retrieves an authorization + """Retrieves an authorization Retrieves a specific authorization by id @@ -174,11 +159,11 @@ async def asyncio( Returns: AuthorizationResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/authorizations/list_authorizations.py b/rootly_sdk/api/authorizations/list_authorizations.py index c35da175..46d7343d 100644 --- a/rootly_sdk/api/authorizations/list_authorizations.py +++ b/rootly_sdk/api/authorizations/list_authorizations.py @@ -23,11 +23,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -55,27 +51,21 @@ def _get_kwargs( 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/authorizations", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> AuthorizationList | None: if response.status_code == 200: response_200 = AuthorizationList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -108,9 +98,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AuthorizationList]: - """ List authorizations + """List authorizations List authorizations @@ -134,23 +123,21 @@ def sync_detailed( Returns: Response[AuthorizationList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterauthorizable_id=filterauthorizable_id, -filterauthorizable_type=filterauthorizable_type, -filtergrantee_id=filtergrantee_id, -filtergrantee_type=filtergrantee_type, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filterauthorizable_id=filterauthorizable_id, + filterauthorizable_type=filterauthorizable_type, + filtergrantee_id=filtergrantee_id, + filtergrantee_type=filtergrantee_type, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -159,6 +146,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -174,9 +162,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AuthorizationList | None: - """ List authorizations + """List authorizations List authorizations @@ -200,26 +187,25 @@ def sync( Returns: AuthorizationList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterauthorizable_id=filterauthorizable_id, -filterauthorizable_type=filterauthorizable_type, -filtergrantee_id=filtergrantee_id, -filtergrantee_type=filtergrantee_type, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterauthorizable_id=filterauthorizable_id, + filterauthorizable_type=filterauthorizable_type, + filtergrantee_id=filtergrantee_id, + filtergrantee_type=filtergrantee_type, + 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, @@ -235,9 +221,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[AuthorizationList]: - """ List authorizations + """List authorizations List authorizations @@ -261,31 +246,28 @@ async def asyncio_detailed( Returns: Response[AuthorizationList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterauthorizable_id=filterauthorizable_id, -filterauthorizable_type=filterauthorizable_type, -filtergrantee_id=filtergrantee_id, -filtergrantee_type=filtergrantee_type, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filterauthorizable_id=filterauthorizable_id, + filterauthorizable_type=filterauthorizable_type, + filtergrantee_id=filtergrantee_id, + filtergrantee_type=filtergrantee_type, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -301,9 +283,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> AuthorizationList | None: - """ List authorizations + """List authorizations List authorizations @@ -327,22 +308,22 @@ async def asyncio( Returns: AuthorizationList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterauthorizable_id=filterauthorizable_id, -filterauthorizable_type=filterauthorizable_type, -filtergrantee_id=filtergrantee_id, -filtergrantee_type=filtergrantee_type, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterauthorizable_id=filterauthorizable_id, + filterauthorizable_type=filterauthorizable_type, + filtergrantee_id=filtergrantee_id, + filtergrantee_type=filtergrantee_type, + 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/authorizations/update_authorization.py b/rootly_sdk/api/authorizations/update_authorization.py index 721e1791..958e25ad 100644 --- a/rootly_sdk/api/authorizations/update_authorization.py +++ b/rootly_sdk/api/authorizations/update_authorization.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateAuthorization, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/authorizations/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/authorizations/{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) -> AuthorizationResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> AuthorizationResponse | ErrorsList | None: if response.status_code == 200: response_200 = AuthorizationResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[AuthorizationResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[AuthorizationResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateAuthorization, - ) -> Response[AuthorizationResponse | ErrorsList]: - """ Update an authorization + """Update an authorization Update a specific authorization by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateAuthorization, - ) -> AuthorizationResponse | ErrorsList | None: - """ Update an authorization + """Update an authorization Update a specific authorization by id @@ -127,24 +118,22 @@ def sync( Returns: AuthorizationResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateAuthorization, - ) -> Response[AuthorizationResponse | ErrorsList]: - """ Update an authorization + """Update an authorization Update a specific authorization by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[AuthorizationResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateAuthorization, - ) -> AuthorizationResponse | ErrorsList | None: - """ Update an authorization + """Update an authorization Update a specific authorization by id @@ -194,12 +179,12 @@ async def asyncio( Returns: AuthorizationResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_checklist_templates/__init__.py b/rootly_sdk/api/catalog_checklist_templates/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/catalog_checklist_templates/__init__.py +++ b/rootly_sdk/api/catalog_checklist_templates/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""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 index 09182771..a0c9a8cf 100644 --- a/rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/create_catalog_checklist_template.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCatalogChecklistTemplate, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/catalog_checklist_templates", @@ -30,34 +24,28 @@ def _get_kwargs( _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: +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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogChecklistTemplate, - ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """ Creates a catalog checklist template + """Creates a catalog checklist template Creates a new catalog checklist template @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCatalogChecklistTemplate, - ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """ Creates a catalog checklist template + """Creates a catalog checklist template Creates a new catalog checklist template @@ -127,22 +114,20 @@ def sync( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogChecklistTemplate, - ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """ Creates a catalog checklist template + """Creates a catalog checklist template Creates a new catalog checklist template @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 catalog checklist template Creates a new catalog checklist template @@ -188,11 +169,11 @@ async def asyncio( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + 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 index c56b2e31..e96022f3 100644 --- a/rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/delete_catalog_checklist_template.py @@ -14,37 +14,29 @@ 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=""),), + "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: +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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """ Delete a catalog checklist template + """Delete a catalog checklist template Delete a specific catalog checklist template by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """ Delete a catalog checklist template + """Delete a catalog checklist template Delete a specific catalog checklist template by id @@ -114,22 +105,20 @@ def sync( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """ Delete a catalog checklist template + """Delete a catalog checklist template Delete a specific catalog checklist template by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 catalog checklist template Delete a specific catalog checklist template by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + 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 index abf533da..baaac4c8 100644 --- a/rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/get_catalog_checklist_template.py @@ -14,37 +14,29 @@ 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=""),), + "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: +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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """ Retrieves a catalog checklist template + """Retrieves a catalog checklist template Retrieves a specific catalog checklist template by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """ Retrieves a catalog checklist template + """Retrieves a catalog checklist template Retrieves a specific catalog checklist template by id @@ -114,22 +105,20 @@ def sync( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """ Retrieves a catalog checklist template + """Retrieves a catalog checklist template Retrieves a specific catalog checklist template by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 catalog checklist template Retrieves a specific catalog checklist template by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + 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 index d3ef10b2..4b04ef57 100644 --- a/rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py +++ b/rootly_sdk/api/catalog_checklist_templates/list_catalog_checklist_templates.py @@ -29,11 +29,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -69,27 +65,23 @@ def _get_kwargs( 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: +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: @@ -98,7 +90,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogChecklistTemplateList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -122,9 +116,8 @@ def sync_detailed( 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 List catalog checklist templates @@ -148,23 +141,21 @@ def sync_detailed( 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, - + 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( @@ -173,6 +164,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -188,9 +180,8 @@ def sync( 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 List catalog checklist templates @@ -214,26 +205,25 @@ def sync( 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, - + 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, @@ -249,9 +239,8 @@ async def asyncio_detailed( 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 List catalog checklist templates @@ -275,31 +264,28 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -315,9 +301,8 @@ async def asyncio( 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 List catalog checklist templates @@ -341,22 +326,22 @@ async def asyncio( 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 + """ + + 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 index 12e6da00..03363ecf 100644 --- a/rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/trigger_catalog_checklist_template.py @@ -13,24 +13,18 @@ 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=""),), + "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) @@ -39,8 +33,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) - - return response_404 if client.raise_on_unexpected_status: @@ -62,9 +54,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Trigger an audit for a catalog checklist template + """Trigger an audit for a catalog checklist template Triggers an audit for all applicable entities of the checklist template @@ -77,12 +68,10 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -91,13 +80,13 @@ def sync_detailed( 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 + """Trigger an audit for a catalog checklist template Triggers an audit for all applicable entities of the checklist template @@ -110,22 +99,20 @@ def sync( Returns: Any | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Trigger an audit for a catalog checklist template + """Trigger an audit for a catalog checklist template Triggers an audit for all applicable entities of the checklist template @@ -138,27 +125,23 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 + """Trigger an audit for a catalog checklist template Triggers an audit for all applicable entities of the checklist template @@ -171,11 +154,11 @@ async def asyncio( Returns: Any | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py b/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py index 4acfb724..180d4b3c 100644 --- a/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py +++ b/rootly_sdk/api/catalog_checklist_templates/update_catalog_checklist_template.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateCatalogChecklistTemplate, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/catalog_checklist_templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalog_checklist_templates/{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) -> CatalogChecklistTemplateResponse | ErrorsList | None: +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 == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalogChecklistTemplate, - ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """ Update a catalog checklist template + """Update a catalog checklist template Update a specific catalog checklist template by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogChecklistTemplate, - ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """ Update a catalog checklist template + """Update a catalog checklist template Update a specific catalog checklist template by id @@ -128,24 +119,22 @@ def sync( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogChecklistTemplate, - ) -> Response[CatalogChecklistTemplateResponse | ErrorsList]: - """ Update a catalog checklist template + """Update a catalog checklist template Update a specific catalog checklist template by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[CatalogChecklistTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogChecklistTemplate, - ) -> CatalogChecklistTemplateResponse | ErrorsList | None: - """ Update a catalog checklist template + """Update a catalog checklist template Update a specific catalog checklist template by id @@ -195,12 +180,12 @@ async def asyncio( Returns: CatalogChecklistTemplateResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entities/__init__.py b/rootly_sdk/api/catalog_entities/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/catalog_entities/__init__.py +++ b/rootly_sdk/api/catalog_entities/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py b/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py index cba292fd..2e7b988d 100644 --- a/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py +++ b/rootly_sdk/api/catalog_entities/bulk_delete_catalog_entities.py @@ -17,59 +17,48 @@ def _get_kwargs( catalog_id: str, *, body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/catalogs/{catalog_id}/entities/bulk_delete".format(catalog_id=quote(str(catalog_id), safe=""),), + "url": "/v1/catalogs/{catalog_id}/entities/bulk_delete".format( + catalog_id=quote(str(catalog_id), safe=""), + ), } - if isinstance(body, BulkDestroyCatalogEntitiesType0): _kwargs["json"] = body.to_dict() else: _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) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: if response.status_code == 200: response_200 = BulkDestroyCatalogEntitiesResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyCatalogEntitiesResponse | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -77,8 +66,6 @@ def _parse_response_422(data: object) -> BulkDestroyCatalogEntitiesResponse | Er raise TypeError() response_422_type_1 = BulkDestroyCatalogEntitiesResponse.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -91,7 +78,9 @@ def _parse_response_422(data: object) -> BulkDestroyCatalogEntitiesResponse | Er return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -105,9 +94,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, - ) -> Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList]: - """ Bulk delete Catalog Entities + """Bulk delete Catalog Entities Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -124,13 +112,11 @@ def sync_detailed( Returns: Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -139,14 +125,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( catalog_id: str, *, client: AuthenticatedClient, body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, - ) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Catalog Entities + """Bulk delete Catalog Entities Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -163,24 +149,22 @@ def sync( Returns: BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList - """ - + """ return sync_detailed( catalog_id=catalog_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( catalog_id: str, *, client: AuthenticatedClient, body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, - ) -> Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList]: - """ Bulk delete Catalog Entities + """Bulk delete Catalog Entities Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -197,29 +181,25 @@ async def asyncio_detailed( Returns: Response[BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( catalog_id: str, *, client: AuthenticatedClient, body: BulkDestroyCatalogEntitiesType0 | BulkDestroyCatalogEntitiesType1, - ) -> BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Catalog Entities + """Bulk delete Catalog Entities Delete catalog entities by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -236,12 +216,12 @@ async def asyncio( Returns: BulkDestroyCatalogEntitiesResponse | BulkDestroyCatalogEntitiesResponse | ErrorsList | ErrorsList - """ - - - return (await asyncio_detailed( - catalog_id=catalog_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + catalog_id=catalog_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py b/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py index 1f6d39da..586bef40 100644 --- a/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py +++ b/rootly_sdk/api/catalog_entities/bulk_upsert_catalog_entities.py @@ -17,54 +17,45 @@ def _get_kwargs( catalog_id: str, *, body: BulkUpsertCatalogEntities, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/catalogs/{catalog_id}/entities/bulk_upsert".format(catalog_id=quote(str(catalog_id), safe=""),), + "url": "/v1/catalogs/{catalog_id}/entities/bulk_upsert".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) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: if response.status_code == 200: response_200 = BulkUpsertCatalogEntitiesResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertCatalogEntitiesError | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -72,8 +63,6 @@ def _parse_response_422(data: object) -> BulkUpsertCatalogEntitiesError | Errors raise TypeError() response_422_type_1 = BulkUpsertCatalogEntitiesError.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -86,7 +75,9 @@ def _parse_response_422(data: object) -> BulkUpsertCatalogEntitiesError | Errors return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -100,9 +91,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkUpsertCatalogEntities, - ) -> Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList]: - """ Bulk upsert Catalog Entities + """Bulk upsert Catalog Entities Create or update multiple catalog entities by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. @@ -117,13 +107,11 @@ def sync_detailed( Returns: Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -132,14 +120,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( catalog_id: str, *, client: AuthenticatedClient, body: BulkUpsertCatalogEntities, - ) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: - """ Bulk upsert Catalog Entities + """Bulk upsert Catalog Entities Create or update multiple catalog entities by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. @@ -154,24 +142,22 @@ def sync( Returns: BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList - """ - + """ return sync_detailed( catalog_id=catalog_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( catalog_id: str, *, client: AuthenticatedClient, body: BulkUpsertCatalogEntities, - ) -> Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList]: - """ Bulk upsert Catalog Entities + """Bulk upsert Catalog Entities Create or update multiple catalog entities by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. @@ -186,29 +172,25 @@ async def asyncio_detailed( Returns: Response[BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( catalog_id: str, *, client: AuthenticatedClient, body: BulkUpsertCatalogEntities, - ) -> BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList | None: - """ Bulk upsert Catalog Entities + """Bulk upsert Catalog Entities Create or update multiple catalog entities by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. @@ -223,12 +205,12 @@ async def asyncio( Returns: BulkUpsertCatalogEntitiesError | ErrorsList | BulkUpsertCatalogEntitiesResponse | ErrorsList - """ - - - return (await asyncio_detailed( - catalog_id=catalog_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + catalog_id=catalog_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entities/create_catalog_entity.py b/rootly_sdk/api/catalog_entities/create_catalog_entity.py index 39972f31..37fa998e 100644 --- a/rootly_sdk/api/catalog_entities/create_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/create_catalog_entity.py @@ -16,50 +16,40 @@ def _get_kwargs( catalog_id: str, *, body: NewCatalogEntity, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/catalogs/{catalog_id}/entities".format(catalog_id=quote(str(catalog_id), safe=""),), + "url": "/v1/catalogs/{catalog_id}/entities".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) -> CatalogEntityResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityResponse | ErrorsList | None: if response.status_code == 201: response_201 = CatalogEntityResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogEntity, - ) -> Response[CatalogEntityResponse | ErrorsList]: - """ Creates a Catalog Entity + """Creates a Catalog Entity Creates a new Catalog Entity from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( catalog_id: str, *, client: AuthenticatedClient, body: NewCatalogEntity, - ) -> CatalogEntityResponse | ErrorsList | None: - """ Creates a Catalog Entity + """Creates a Catalog Entity Creates a new Catalog Entity from provided data @@ -134,24 +123,22 @@ def sync( Returns: CatalogEntityResponse | ErrorsList - """ - + """ return sync_detailed( catalog_id=catalog_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( catalog_id: str, *, client: AuthenticatedClient, body: NewCatalogEntity, - ) -> Response[CatalogEntityResponse | ErrorsList]: - """ Creates a Catalog Entity + """Creates a Catalog Entity Creates a new Catalog Entity from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( catalog_id: str, *, client: AuthenticatedClient, body: NewCatalogEntity, - ) -> CatalogEntityResponse | ErrorsList | None: - """ Creates a Catalog Entity + """Creates a Catalog Entity Creates a new Catalog Entity from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: CatalogEntityResponse | ErrorsList - """ - - - return (await asyncio_detailed( - catalog_id=catalog_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + catalog_id=catalog_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entities/delete_catalog_entity.py b/rootly_sdk/api/catalog_entities/delete_catalog_entity.py index 1dd320b6..f256d19c 100644 --- a/rootly_sdk/api/catalog_entities/delete_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/delete_catalog_entity.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/catalog_entities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalog_entities/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogEntityResponse | ErrorsList]: - """ Delete a Catalog Entity + """Delete a Catalog Entity Delete a specific Catalog Entity by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> CatalogEntityResponse | ErrorsList | None: - """ Delete a Catalog Entity + """Delete a Catalog Entity Delete a specific Catalog Entity by id @@ -114,22 +105,20 @@ def sync( Returns: CatalogEntityResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogEntityResponse | ErrorsList]: - """ Delete a Catalog Entity + """Delete a Catalog Entity Delete a specific Catalog Entity by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> CatalogEntityResponse | ErrorsList | None: - """ Delete a Catalog Entity + """Delete a Catalog Entity Delete a specific Catalog Entity by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CatalogEntityResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entities/get_catalog_entity.py b/rootly_sdk/api/catalog_entities/get_catalog_entity.py index a2dac23e..a2b59694 100644 --- a/rootly_sdk/api/catalog_entities/get_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/get_catalog_entity.py @@ -17,11 +17,7 @@ def _get_kwargs( id: str | UUID, *, include: GetCatalogEntityInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -31,34 +27,30 @@ def _get_kwargs( params["include"] = json_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/catalog_entities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalog_entities/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityResponse.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: @@ -67,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,9 +75,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetCatalogEntityInclude | Unset = UNSET, - ) -> Response[CatalogEntityResponse | ErrorsList]: - """ Retrieves a Catalog Entity + """Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id @@ -97,13 +90,11 @@ def sync_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -112,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetCatalogEntityInclude | Unset = UNSET, - ) -> CatalogEntityResponse | ErrorsList | None: - """ Retrieves a Catalog Entity + """Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id @@ -133,24 +124,22 @@ def sync( Returns: CatalogEntityResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetCatalogEntityInclude | Unset = UNSET, - ) -> Response[CatalogEntityResponse | ErrorsList]: - """ Retrieves a Catalog Entity + """Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id @@ -164,29 +153,25 @@ async def asyncio_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetCatalogEntityInclude | Unset = UNSET, - ) -> CatalogEntityResponse | ErrorsList | None: - """ Retrieves a Catalog Entity + """Retrieves a Catalog Entity Retrieves a specific Catalog Entity by id @@ -200,12 +185,12 @@ async def asyncio( Returns: CatalogEntityResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entities/list_catalog_entities.py b/rootly_sdk/api/catalog_entities/list_catalog_entities.py index 2a1921ad..82ca16de 100644 --- a/rootly_sdk/api/catalog_entities/list_catalog_entities.py +++ b/rootly_sdk/api/catalog_entities/list_catalog_entities.py @@ -41,11 +41,7 @@ def _get_kwargs( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -109,27 +105,23 @@ def _get_kwargs( params["filter[managed_by][not_in]"] = filtermanaged_bynot_in - 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/catalogs/{catalog_id}/entities".format(catalog_id=quote(str(catalog_id), safe=""),), + "url": "/v1/catalogs/{catalog_id}/entities".format( + catalog_id=quote(str(catalog_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityList | None: if response.status_code == 200: response_200 = CatalogEntityList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -177,9 +169,8 @@ def sync_detailed( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> Response[CatalogEntityList]: - """ List Catalog Entities + """List Catalog Entities List Catalog Entities @@ -218,38 +209,36 @@ def sync_detailed( Returns: Response[CatalogEntityList] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filterexternal_id=filterexternal_id, -filtermanaged_by=filtermanaged_by, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtermanaged_byeq=filtermanaged_byeq, -filtermanaged_bynot_eq=filtermanaged_bynot_eq, -filtermanaged_byin=filtermanaged_byin, -filtermanaged_bynot_in=filtermanaged_bynot_in, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) response = client.get_httpx_client().request( @@ -258,6 +247,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( catalog_id: str, *, @@ -288,9 +278,8 @@ def sync( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> CatalogEntityList | None: - """ List Catalog Entities + """List Catalog Entities List Catalog Entities @@ -329,41 +318,40 @@ def sync( Returns: CatalogEntityList - """ - + """ return sync_detailed( catalog_id=catalog_id, -client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filterexternal_id=filterexternal_id, -filtermanaged_by=filtermanaged_by, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtermanaged_byeq=filtermanaged_byeq, -filtermanaged_bynot_eq=filtermanaged_bynot_eq, -filtermanaged_byin=filtermanaged_byin, -filtermanaged_bynot_in=filtermanaged_bynot_in, - + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ).parsed + async def asyncio_detailed( catalog_id: str, *, @@ -394,9 +382,8 @@ async def asyncio_detailed( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> Response[CatalogEntityList]: - """ List Catalog Entities + """List Catalog Entities List Catalog Entities @@ -435,46 +422,43 @@ async def asyncio_detailed( Returns: Response[CatalogEntityList] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filterexternal_id=filterexternal_id, -filtermanaged_by=filtermanaged_by, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtermanaged_byeq=filtermanaged_byeq, -filtermanaged_bynot_eq=filtermanaged_bynot_eq, -filtermanaged_byin=filtermanaged_byin, -filtermanaged_bynot_in=filtermanaged_bynot_in, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( catalog_id: str, *, @@ -505,9 +489,8 @@ async def asyncio( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> CatalogEntityList | None: - """ List Catalog Entities + """List Catalog Entities List Catalog Entities @@ -546,37 +529,37 @@ async def asyncio( Returns: CatalogEntityList - """ - - - return (await asyncio_detailed( - catalog_id=catalog_id, -client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filterexternal_id=filterexternal_id, -filtermanaged_by=filtermanaged_by, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtermanaged_byeq=filtermanaged_byeq, -filtermanaged_bynot_eq=filtermanaged_bynot_eq, -filtermanaged_byin=filtermanaged_byin, -filtermanaged_bynot_in=filtermanaged_bynot_in, - - )).parsed + """ + + return ( + await asyncio_detailed( + catalog_id=catalog_id, + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entities/update_catalog_entity.py b/rootly_sdk/api/catalog_entities/update_catalog_entity.py index 9655ee84..6613d141 100644 --- a/rootly_sdk/api/catalog_entities/update_catalog_entity.py +++ b/rootly_sdk/api/catalog_entities/update_catalog_entity.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateCatalogEntity, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/catalog_entities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalog_entities/{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) -> CatalogEntityResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalogEntity, - ) -> Response[CatalogEntityResponse | ErrorsList]: - """ Update a Catalog Entity + """Update a Catalog Entity Update a specific Catalog Entity by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, - ) -> CatalogEntityResponse | ErrorsList | None: - """ Update a Catalog Entity + """Update a Catalog Entity Update a specific Catalog Entity by id @@ -128,24 +119,22 @@ def sync( Returns: CatalogEntityResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, - ) -> Response[CatalogEntityResponse | ErrorsList]: - """ Update a Catalog Entity + """Update a Catalog Entity Update a specific Catalog Entity by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[CatalogEntityResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalogEntity, - ) -> CatalogEntityResponse | ErrorsList | None: - """ Update a Catalog Entity + """Update a Catalog Entity Update a specific Catalog Entity by id @@ -195,12 +180,12 @@ async def asyncio( Returns: CatalogEntityResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_entity_checklists/__init__.py b/rootly_sdk/api/catalog_entity_checklists/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/catalog_entity_checklists/__init__.py +++ b/rootly_sdk/api/catalog_entity_checklists/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""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 index a1752bb5..b1dacf13 100644 --- a/rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py +++ b/rootly_sdk/api/catalog_entity_checklists/get_catalog_entity_checklist.py @@ -14,37 +14,29 @@ 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=""),), + "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: +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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityChecklistResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityChecklistResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogEntityChecklistResponse | ErrorsList]: - """ Retrieves a catalog entity checklist + """Retrieves a catalog entity checklist Retrieves a specific catalog entity checklist by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CatalogEntityChecklistResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: UUID, *, client: AuthenticatedClient, - ) -> CatalogEntityChecklistResponse | ErrorsList | None: - """ Retrieves a catalog entity checklist + """Retrieves a catalog entity checklist Retrieves a specific catalog entity checklist by id @@ -114,22 +105,20 @@ def sync( Returns: CatalogEntityChecklistResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogEntityChecklistResponse | ErrorsList]: - """ Retrieves a catalog entity checklist + """Retrieves a catalog entity checklist Retrieves a specific catalog entity checklist by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CatalogEntityChecklistResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 catalog entity checklist Retrieves a specific catalog entity checklist by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CatalogEntityChecklistResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + 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 index 28612b3a..63fefcf6 100644 --- a/rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py +++ b/rootly_sdk/api/catalog_entity_checklists/list_catalog_entity_checklists.py @@ -21,11 +21,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -49,27 +45,23 @@ def _get_kwargs( 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: +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: @@ -78,7 +70,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityChecklistList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityChecklistList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -100,9 +94,8 @@ def sync_detailed( 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 List catalog entity checklists @@ -124,21 +117,19 @@ def sync_detailed( 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, - + 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( @@ -147,6 +138,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -160,9 +152,8 @@ def sync( 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 List catalog entity checklists @@ -184,24 +175,23 @@ def sync( 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, - + 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, @@ -215,9 +205,8 @@ async def asyncio_detailed( 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 List catalog entity checklists @@ -239,29 +228,26 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -275,9 +261,8 @@ async def asyncio( 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 List catalog entity checklists @@ -299,20 +284,20 @@ async def asyncio( 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 + """ + + 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/__init__.py b/rootly_sdk/api/catalog_entity_properties/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/catalog_entity_properties/__init__.py +++ b/rootly_sdk/api/catalog_entity_properties/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 90ea7e96..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 @@ -16,50 +16,40 @@ def _get_kwargs( catalog_entity_id: str, *, body: NewCatalogEntityProperty, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/catalog_entities/{catalog_entity_id}/properties".format(catalog_entity_id=quote(str(catalog_entity_id), safe=""),), + "url": "/v1/catalog_entities/{catalog_entity_id}/properties".format( + catalog_entity_id=quote(str(catalog_entity_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) -> CatalogEntityPropertyResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityPropertyResponse | ErrorsList | None: if response.status_code == 201: response_201 = CatalogEntityPropertyResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogEntityProperty, - ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """ Creates a Catalog Entity Property + """Creates a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -104,13 +95,11 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( catalog_entity_id=catalog_entity_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -119,14 +108,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( catalog_entity_id: str, *, client: AuthenticatedClient, body: NewCatalogEntityProperty, - ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """ Creates a Catalog Entity Property + """Creates a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -146,24 +135,22 @@ def sync( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - + """ return sync_detailed( catalog_entity_id=catalog_entity_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( catalog_entity_id: str, *, client: AuthenticatedClient, body: NewCatalogEntityProperty, - ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """ Creates a Catalog Entity Property + """Creates a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -183,29 +170,25 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( catalog_entity_id=catalog_entity_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( catalog_entity_id: str, *, client: AuthenticatedClient, body: NewCatalogEntityProperty, - ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """ Creates a Catalog Entity Property + """Creates a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -225,12 +208,12 @@ async def asyncio( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - - - return (await asyncio_detailed( - catalog_entity_id=catalog_entity_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + catalog_entity_id=catalog_entity_id, + client=client, + body=body, + ) + ).parsed 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 f79e2f05..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/catalog_entity_properties/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalog_entity_properties/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityPropertyResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityPropertyResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityPropertyResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """ Delete a Catalog Entity Property + """Delete a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -84,12 +77,10 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -98,13 +89,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """ Delete a Catalog Entity Property + """Delete a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -121,22 +112,20 @@ def sync( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """ Delete a Catalog Entity Property + """Delete a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -153,27 +142,23 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """ Delete a Catalog Entity Property + """Delete a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -190,11 +175,11 @@ async def asyncio( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 25ab0fbf..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 @@ -18,11 +18,7 @@ def _get_kwargs( id: str, *, include: GetCatalogEntityPropertyInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -32,34 +28,30 @@ def _get_kwargs( params["include"] = json_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/catalog_entity_properties/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalog_entity_properties/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityPropertyResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityPropertyResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityPropertyResponse.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: @@ -68,7 +60,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +76,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetCatalogEntityPropertyInclude | Unset = UNSET, - ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """ Retrieves a Catalog Entity Property + """Retrieves a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -102,13 +95,11 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -117,14 +108,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetCatalogEntityPropertyInclude | Unset = UNSET, - ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """ Retrieves a Catalog Entity Property + """Retrieves a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -142,24 +133,22 @@ def sync( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetCatalogEntityPropertyInclude | Unset = UNSET, - ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """ Retrieves a Catalog Entity Property + """Retrieves a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -177,29 +166,25 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetCatalogEntityPropertyInclude | Unset = UNSET, - ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """ Retrieves a Catalog Entity Property + """Retrieves a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -217,12 +202,12 @@ async def asyncio( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed 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 d12f5faa..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 @@ -29,11 +29,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -65,27 +61,25 @@ def _get_kwargs( 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_entities/{catalog_entity_id}/properties".format(catalog_entity_id=quote(str(catalog_entity_id), safe=""),), + "url": "/v1/catalog_entities/{catalog_entity_id}/properties".format( + catalog_entity_id=quote(str(catalog_entity_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogEntityPropertyList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityPropertyList | None: if response.status_code == 200: response_200 = CatalogEntityPropertyList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -94,7 +88,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityPropertyList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -117,9 +113,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogEntityPropertyList]: - """ List catalog properties + """List catalog properties **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -146,22 +141,20 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyList] - """ - + """ kwargs = _get_kwargs( catalog_entity_id=catalog_entity_id, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtercatalog_field_id=filtercatalog_field_id, -filterkey=filterkey, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtercatalog_field_id=filtercatalog_field_id, + filterkey=filterkey, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ) response = client.get_httpx_client().request( @@ -170,6 +163,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( catalog_entity_id: str, *, @@ -184,9 +178,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogEntityPropertyList | None: - """ List catalog properties + """List catalog properties **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -213,25 +206,24 @@ def sync( Returns: CatalogEntityPropertyList - """ - + """ return sync_detailed( catalog_entity_id=catalog_entity_id, -client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtercatalog_field_id=filtercatalog_field_id, -filterkey=filterkey, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtercatalog_field_id=filtercatalog_field_id, + filterkey=filterkey, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ).parsed + async def asyncio_detailed( catalog_entity_id: str, *, @@ -246,9 +238,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogEntityPropertyList]: - """ List catalog properties + """List catalog properties **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -275,30 +266,27 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyList] - """ - + """ kwargs = _get_kwargs( catalog_entity_id=catalog_entity_id, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtercatalog_field_id=filtercatalog_field_id, -filterkey=filterkey, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtercatalog_field_id=filtercatalog_field_id, + filterkey=filterkey, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( catalog_entity_id: str, *, @@ -313,9 +301,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogEntityPropertyList | None: - """ List catalog properties + """List catalog properties **Deprecated:** This endpoint is deprecated, please use `include=fields` on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) to @@ -342,21 +329,21 @@ async def asyncio( Returns: CatalogEntityPropertyList - """ - - - return (await asyncio_detailed( - catalog_entity_id=catalog_entity_id, -client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtercatalog_field_id=filtercatalog_field_id, -filterkey=filterkey, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - - )).parsed + """ + + return ( + await asyncio_detailed( + catalog_entity_id=catalog_entity_id, + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtercatalog_field_id=filtercatalog_field_id, + filterkey=filterkey, + 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/update_catalog_entity_property.py b/rootly_sdk/api/catalog_entity_properties/update_catalog_entity_property.py index bdc5e05f..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateCatalogEntityProperty, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/catalog_entity_properties/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalog_entity_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) -> CatalogEntityPropertyResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogEntityPropertyResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogEntityPropertyResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogEntityPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogEntityPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalogEntityProperty, - ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """ Update a Catalog Entity Property + """Update a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -98,13 +91,11 @@ def sync_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +104,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateCatalogEntityProperty, - ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """ Update a Catalog Entity Property + """Update a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -141,24 +132,22 @@ def sync( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCatalogEntityProperty, - ) -> Response[CatalogEntityPropertyResponse | ErrorsList]: - """ Update a Catalog Entity Property + """Update a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -179,29 +168,25 @@ async def asyncio_detailed( Returns: Response[CatalogEntityPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCatalogEntityProperty, - ) -> CatalogEntityPropertyResponse | ErrorsList | None: - """ Update a Catalog Entity Property + """Update a Catalog Entity Property **Deprecated:** This endpoint is deprecated, please use the `fields` attribute on catalog entities or native catalog endpoints (teams, services, functionalities, incident_types, causes, environments) @@ -222,12 +207,12 @@ async def asyncio( Returns: CatalogEntityPropertyResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalog_properties/__init__.py b/rootly_sdk/api/catalog_properties/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/catalog_properties/__init__.py +++ b/rootly_sdk/api/catalog_properties/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""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 index e90cdab5..ce8b71c5 100644 --- a/rootly_sdk/api/catalog_properties/create_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/create_catalog_property.py @@ -14,30 +14,24 @@ 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=""),), + "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 @@ -62,9 +56,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogField, - ) -> Response[Any]: - """ Creates a Catalog Property (alias for field) + """Creates a Catalog Property (alias for field) Creates a new Catalog Property - returns catalog_properties type @@ -78,13 +71,11 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -99,9 +90,8 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogField, - ) -> Response[Any]: - """ Creates a Catalog Property (alias for field) + """Creates a Catalog Property (alias for field) Creates a new Catalog Property - returns catalog_properties type @@ -115,18 +105,13 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 index 3f7ebf30..b08c47da 100644 --- a/rootly_sdk/api/catalog_properties/delete_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/delete_catalog_property.py @@ -11,24 +11,18 @@ 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=""),), + "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 @@ -52,9 +46,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete a catalog_property + """Delete a catalog_property Delete a specific catalog_property by id - returns catalog_properties type @@ -67,12 +60,10 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -86,9 +77,8 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete a catalog_property + """Delete a catalog_property Delete a specific catalog_property by id - returns catalog_properties type @@ -101,17 +91,12 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 index b7af15a3..e42871f8 100644 --- a/rootly_sdk/api/catalog_properties/get_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/get_catalog_property.py @@ -11,24 +11,18 @@ 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=""),), + "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 @@ -52,9 +46,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Retrieves a Catalog Property (alias for field) + """Retrieves a Catalog Property (alias for field) Retrieves a specific Catalog Property by id - returns catalog_properties type @@ -67,12 +60,10 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -86,9 +77,8 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Retrieves a Catalog Property (alias for field) + """Retrieves a Catalog Property (alias for field) Retrieves a specific Catalog Property by id - returns catalog_properties type @@ -101,17 +91,12 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 index c09d0358..4d717126 100644 --- a/rootly_sdk/api/catalog_properties/list_catalog_properties.py +++ b/rootly_sdk/api/catalog_properties/list_catalog_properties.py @@ -11,24 +11,18 @@ 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=""),), + "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 @@ -52,9 +46,8 @@ def sync_detailed( catalog_id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ List Catalog Properties (alias for fields) + """List Catalog Properties (alias for fields) List Catalog Properties - returns catalog_properties type @@ -67,12 +60,10 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, - ) response = client.get_httpx_client().request( @@ -86,9 +77,8 @@ async def asyncio_detailed( catalog_id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ List Catalog Properties (alias for fields) + """List Catalog Properties (alias for fields) List Catalog Properties - returns catalog_properties type @@ -101,17 +91,12 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( catalog_id=catalog_id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 index deed713b..2847e350 100644 --- a/rootly_sdk/api/catalog_properties/update_catalog_property.py +++ b/rootly_sdk/api/catalog_properties/update_catalog_property.py @@ -14,30 +14,24 @@ 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=""),), + "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 @@ -62,9 +56,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalogField, - ) -> Response[Any]: - """ Update a catalog_property (alias for field) + """Update a catalog_property (alias for field) Update a specific catalog_property by id - returns catalog_properties type @@ -78,13 +71,11 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -99,9 +90,8 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateCatalogField, - ) -> Response[Any]: - """ Update a catalog_property (alias for field) + """Update a catalog_property (alias for field) Update a specific catalog_property by id - returns catalog_properties type @@ -115,18 +105,13 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - diff --git a/rootly_sdk/api/catalogs/__init__.py b/rootly_sdk/api/catalogs/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/catalogs/__init__.py +++ b/rootly_sdk/api/catalogs/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/catalogs/create_catalog.py b/rootly_sdk/api/catalogs/create_catalog.py index 26a5a1b5..736014b9 100644 --- a/rootly_sdk/api/catalogs/create_catalog.py +++ b/rootly_sdk/api/catalogs/create_catalog.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCatalog, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/catalogs", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> CatalogResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogResponse | ErrorsList | None: if response.status_code == 201: response_201 = CatalogResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalog, - ) -> Response[CatalogResponse | ErrorsList]: - """ Creates a catalog + """Creates a catalog Creates a new catalog from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCatalog, - ) -> CatalogResponse | ErrorsList | None: - """ Creates a catalog + """Creates a catalog Creates a new catalog from provided data @@ -127,22 +114,20 @@ def sync( Returns: CatalogResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalog, - ) -> Response[CatalogResponse | ErrorsList]: - """ Creates a catalog + """Creates a catalog Creates a new catalog from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewCatalog, - ) -> CatalogResponse | ErrorsList | None: - """ Creates a catalog + """Creates a catalog Creates a new catalog from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CatalogResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/catalogs/delete_catalog.py b/rootly_sdk/api/catalogs/delete_catalog.py index 42d16208..eeebd62e 100644 --- a/rootly_sdk/api/catalogs/delete_catalog.py +++ b/rootly_sdk/api/catalogs/delete_catalog.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/catalogs/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalogs/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogResponse | ErrorsList]: - """ Delete a catalog + """Delete a catalog Delete a specific catalog by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> CatalogResponse | ErrorsList | None: - """ Delete a catalog + """Delete a catalog Delete a specific catalog by id @@ -114,22 +105,20 @@ def sync( Returns: CatalogResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogResponse | ErrorsList]: - """ Delete a catalog + """Delete a catalog Delete a specific catalog by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> CatalogResponse | ErrorsList | None: - """ Delete a catalog + """Delete a catalog Delete a specific catalog by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CatalogResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/catalogs/get_catalog.py b/rootly_sdk/api/catalogs/get_catalog.py index feb8cb96..146cb1a4 100644 --- a/rootly_sdk/api/catalogs/get_catalog.py +++ b/rootly_sdk/api/catalogs/get_catalog.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/catalogs/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalogs/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogResponse | ErrorsList]: - """ Retrieves a catalog + """Retrieves a catalog Retrieves a specific catalog by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> CatalogResponse | ErrorsList | None: - """ Retrieves a catalog + """Retrieves a catalog Retrieves a specific catalog by id @@ -114,22 +105,20 @@ def sync( Returns: CatalogResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CatalogResponse | ErrorsList]: - """ Retrieves a catalog + """Retrieves a catalog Retrieves a specific catalog by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> CatalogResponse | ErrorsList | None: - """ Retrieves a catalog + """Retrieves a catalog Retrieves a specific catalog by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CatalogResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/catalogs/list_catalogs.py b/rootly_sdk/api/catalogs/list_catalogs.py index cec3d713..47f483e2 100644 --- a/rootly_sdk/api/catalogs/list_catalogs.py +++ b/rootly_sdk/api/catalogs/list_catalogs.py @@ -38,11 +38,7 @@ def _get_kwargs( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -104,27 +100,21 @@ def _get_kwargs( params["filter[managed_by][not_in]"] = filtermanaged_bynot_in - 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/catalogs", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CatalogList | None: if response.status_code == 200: response_200 = CatalogList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -170,9 +160,8 @@ def sync_detailed( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> Response[CatalogList]: - """ List catalogs + """List catalogs List catalogs @@ -209,36 +198,34 @@ def sync_detailed( Returns: Response[CatalogList] - """ - + """ kwargs = _get_kwargs( include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterexternal_id=filterexternal_id, -filtermanaged_by=filtermanaged_by, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtermanaged_byeq=filtermanaged_byeq, -filtermanaged_bynot_eq=filtermanaged_bynot_eq, -filtermanaged_byin=filtermanaged_byin, -filtermanaged_bynot_in=filtermanaged_bynot_in, - + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) response = client.get_httpx_client().request( @@ -247,6 +234,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -275,9 +263,8 @@ def sync( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> CatalogList | None: - """ List catalogs + """List catalogs List catalogs @@ -314,39 +301,38 @@ def sync( Returns: CatalogList - """ - + """ return sync_detailed( client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterexternal_id=filterexternal_id, -filtermanaged_by=filtermanaged_by, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtermanaged_byeq=filtermanaged_byeq, -filtermanaged_bynot_eq=filtermanaged_bynot_eq, -filtermanaged_byin=filtermanaged_byin, -filtermanaged_bynot_in=filtermanaged_bynot_in, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -375,9 +361,8 @@ async def asyncio_detailed( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> Response[CatalogList]: - """ List catalogs + """List catalogs List catalogs @@ -414,44 +399,41 @@ async def asyncio_detailed( Returns: Response[CatalogList] - """ - + """ kwargs = _get_kwargs( include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterexternal_id=filterexternal_id, -filtermanaged_by=filtermanaged_by, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtermanaged_byeq=filtermanaged_byeq, -filtermanaged_bynot_eq=filtermanaged_bynot_eq, -filtermanaged_byin=filtermanaged_byin, -filtermanaged_bynot_in=filtermanaged_bynot_in, - + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -480,9 +462,8 @@ async def asyncio( filtermanaged_bynot_eq: str | Unset = UNSET, filtermanaged_byin: str | Unset = UNSET, filtermanaged_bynot_in: str | Unset = UNSET, - ) -> CatalogList | None: - """ List catalogs + """List catalogs List catalogs @@ -519,35 +500,35 @@ async def asyncio( Returns: CatalogList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterexternal_id=filterexternal_id, -filtermanaged_by=filtermanaged_by, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtermanaged_byeq=filtermanaged_byeq, -filtermanaged_bynot_eq=filtermanaged_bynot_eq, -filtermanaged_byin=filtermanaged_byin, -filtermanaged_bynot_in=filtermanaged_bynot_in, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterexternal_id=filterexternal_id, + filtermanaged_by=filtermanaged_by, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtermanaged_byeq=filtermanaged_byeq, + filtermanaged_bynot_eq=filtermanaged_bynot_eq, + filtermanaged_byin=filtermanaged_byin, + filtermanaged_bynot_in=filtermanaged_bynot_in, + ) + ).parsed diff --git a/rootly_sdk/api/catalogs/update_catalog.py b/rootly_sdk/api/catalogs/update_catalog.py index dce674bf..47da6eea 100644 --- a/rootly_sdk/api/catalogs/update_catalog.py +++ b/rootly_sdk/api/catalogs/update_catalog.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateCatalog, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/catalogs/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/catalogs/{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) -> CatalogResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CatalogResponse | ErrorsList | None: if response.status_code == 200: response_200 = CatalogResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCatalog, - ) -> Response[CatalogResponse | ErrorsList]: - """ Update a catalog + """Update a catalog Update a specific catalog by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, - ) -> CatalogResponse | ErrorsList | None: - """ Update a catalog + """Update a catalog Update a specific catalog by id @@ -128,24 +119,22 @@ def sync( Returns: CatalogResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, - ) -> Response[CatalogResponse | ErrorsList]: - """ Update a catalog + """Update a catalog Update a specific catalog by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[CatalogResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCatalog, - ) -> CatalogResponse | ErrorsList | None: - """ Update a catalog + """Update a catalog Update a specific catalog by id @@ -195,12 +180,12 @@ async def asyncio( Returns: CatalogResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/causes/__init__.py b/rootly_sdk/api/causes/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/causes/__init__.py +++ b/rootly_sdk/api/causes/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/causes/create_cause.py b/rootly_sdk/api/causes/create_cause.py index 8bd51ac3..c1e704a0 100644 --- a/rootly_sdk/api/causes/create_cause.py +++ b/rootly_sdk/api/causes/create_cause.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCause, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/causes", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> CauseResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CauseResponse | ErrorsList | None: if response.status_code == 201: response_201 = CauseResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CauseResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CauseResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCause, - ) -> Response[CauseResponse | ErrorsList]: - """ Creates a cause + """Creates a cause Creates a new cause from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CauseResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCause, - ) -> CauseResponse | ErrorsList | None: - """ Creates a cause + """Creates a cause Creates a new cause from provided data @@ -127,22 +114,20 @@ def sync( Returns: CauseResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCause, - ) -> Response[CauseResponse | ErrorsList]: - """ Creates a cause + """Creates a cause Creates a new cause from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CauseResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewCause, - ) -> CauseResponse | ErrorsList | None: - """ Creates a cause + """Creates a cause Creates a new cause from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CauseResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/causes/create_cause_catalog_property.py b/rootly_sdk/api/causes/create_cause_catalog_property.py index 7cd1946d..6e2bf436 100644 --- a/rootly_sdk/api/causes/create_cause_catalog_property.py +++ b/rootly_sdk/api/causes/create_cause_catalog_property.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCatalogProperty, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/causes/properties", @@ -30,34 +24,28 @@ def _get_kwargs( _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: +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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> CatalogPropertyResponse | ErrorsList | None: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -127,22 +114,20 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/causes/delete_cause.py b/rootly_sdk/api/causes/delete_cause.py index 88f1748e..3edaf3a4 100644 --- a/rootly_sdk/api/causes/delete_cause.py +++ b/rootly_sdk/api/causes/delete_cause.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/causes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/causes/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CauseResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CauseResponse | ErrorsList | None: if response.status_code == 200: response_200 = CauseResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CauseResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CauseResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CauseResponse | ErrorsList]: - """ Delete a cause + """Delete a cause Delete a specific cause by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CauseResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> CauseResponse | ErrorsList | None: - """ Delete a cause + """Delete a cause Delete a specific cause by id @@ -114,22 +105,20 @@ def sync( Returns: CauseResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CauseResponse | ErrorsList]: - """ Delete a cause + """Delete a cause Delete a specific cause by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CauseResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> CauseResponse | ErrorsList | None: - """ Delete a cause + """Delete a cause Delete a specific cause by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CauseResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/causes/get_cause.py b/rootly_sdk/api/causes/get_cause.py index 15e506a5..e8c8bff7 100644 --- a/rootly_sdk/api/causes/get_cause.py +++ b/rootly_sdk/api/causes/get_cause.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/causes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/causes/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CauseResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CauseResponse | ErrorsList | None: if response.status_code == 200: response_200 = CauseResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CauseResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CauseResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CauseResponse | ErrorsList]: - """ Retrieves a cause + """Retrieves a cause Retrieves a specific cause by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CauseResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> CauseResponse | ErrorsList | None: - """ Retrieves a cause + """Retrieves a cause Retrieves a specific cause by id @@ -114,22 +105,20 @@ def sync( Returns: CauseResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CauseResponse | ErrorsList]: - """ Retrieves a cause + """Retrieves a cause Retrieves a specific cause by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CauseResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> CauseResponse | ErrorsList | None: - """ Retrieves a cause + """Retrieves a cause Retrieves a specific cause by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CauseResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/causes/list_cause_catalog_properties.py b/rootly_sdk/api/causes/list_cause_catalog_properties.py index 8dc26366..56923dc0 100644 --- a/rootly_sdk/api/causes/list_cause_catalog_properties.py +++ b/rootly_sdk/api/causes/list_cause_catalog_properties.py @@ -28,11 +28,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -66,27 +62,21 @@ def _get_kwargs( 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: @@ -118,9 +108,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Cause Catalog Properties @@ -143,22 +132,20 @@ def sync_detailed( 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, - + 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( @@ -167,6 +154,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -181,9 +169,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Cause Catalog Properties @@ -206,25 +193,24 @@ def sync( 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, - + 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, @@ -239,9 +225,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Cause Catalog Properties @@ -264,30 +249,27 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -302,9 +284,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Cause Catalog Properties @@ -327,21 +308,21 @@ async def asyncio( 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 + """ + + 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 4cc79768..183d88e9 100644 --- a/rootly_sdk/api/causes/list_causes.py +++ b/rootly_sdk/api/causes/list_causes.py @@ -29,11 +29,7 @@ def _get_kwargs( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -73,27 +69,21 @@ def _get_kwargs( params["filter[name][not_in]"] = filternamenot_in - 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", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CauseList | None: if response.status_code == 200: response_200 = CauseList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -132,9 +122,8 @@ def sync_detailed( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> Response[CauseList]: - """ List causes + """List causes List causes @@ -164,29 +153,27 @@ def sync_detailed( Returns: Response[CauseList] - """ - + """ kwargs = _get_kwargs( include=include, -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, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - + 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, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) response = client.get_httpx_client().request( @@ -195,6 +182,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -216,9 +204,8 @@ def sync( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> CauseList | None: - """ List causes + """List causes List causes @@ -248,32 +235,31 @@ def sync( Returns: CauseList - """ - + """ return sync_detailed( client=client, -include=include, -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, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - + include=include, + 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, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -295,9 +281,8 @@ async def asyncio_detailed( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> Response[CauseList]: - """ List causes + """List causes List causes @@ -327,37 +312,34 @@ async def asyncio_detailed( Returns: Response[CauseList] - """ - + """ kwargs = _get_kwargs( include=include, -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, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - + 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, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -379,9 +361,8 @@ async def asyncio( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> CauseList | None: - """ List causes + """List causes List causes @@ -411,28 +392,28 @@ async def asyncio( Returns: CauseList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -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, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + 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, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + ) + ).parsed diff --git a/rootly_sdk/api/causes/update_cause.py b/rootly_sdk/api/causes/update_cause.py index f94fbb81..46e11dce 100644 --- a/rootly_sdk/api/causes/update_cause.py +++ b/rootly_sdk/api/causes/update_cause.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateCause, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/causes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/causes/{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) -> CauseResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CauseResponse | ErrorsList | None: if response.status_code == 200: response_200 = CauseResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CauseResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CauseResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCause, - ) -> Response[CauseResponse | ErrorsList]: - """ Update a cause + """Update a cause Update a specific cause by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[CauseResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, - ) -> CauseResponse | ErrorsList | None: - """ Update a cause + """Update a cause Update a specific cause by id @@ -128,24 +119,22 @@ def sync( Returns: CauseResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, - ) -> Response[CauseResponse | ErrorsList]: - """ Update a cause + """Update a cause Update a specific cause by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[CauseResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCause, - ) -> CauseResponse | ErrorsList | None: - """ Update a cause + """Update a cause Update a specific cause by id @@ -195,12 +180,12 @@ async def asyncio( Returns: CauseResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/communications_groups/__init__.py b/rootly_sdk/api/communications_groups/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/communications_groups/__init__.py +++ b/rootly_sdk/api/communications_groups/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/communications_groups/create_communications_group.py b/rootly_sdk/api/communications_groups/create_communications_group.py index 9629965a..84fa7b89 100644 --- a/rootly_sdk/api/communications_groups/create_communications_group.py +++ b/rootly_sdk/api/communications_groups/create_communications_group.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCommunicationsGroup, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/communications/groups", @@ -30,27 +24,23 @@ def _get_kwargs( _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) -> CommunicationsGroupResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsGroupResponse | ErrorsList | None: if response.status_code == 201: response_201 = CommunicationsGroupResponse.from_dict(response.json()) - - return response_201 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsGroupResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCommunicationsGroup, - ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """ Creates a communications group + """Creates a communications group Creates a new communications group from provided data @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCommunicationsGroup, - ) -> CommunicationsGroupResponse | ErrorsList | None: - """ Creates a communications group + """Creates a communications group Creates a new communications group from provided data @@ -120,22 +109,20 @@ def sync( Returns: CommunicationsGroupResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCommunicationsGroup, - ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """ Creates a communications group + """Creates a communications group Creates a new communications group from provided data @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewCommunicationsGroup, - ) -> CommunicationsGroupResponse | ErrorsList | None: - """ Creates a communications group + """Creates a communications group Creates a new communications group from provided data @@ -181,11 +164,11 @@ async def asyncio( Returns: CommunicationsGroupResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/communications_groups/delete_communications_group.py b/rootly_sdk/api/communications_groups/delete_communications_group.py index e92f8e0b..7bb4306a 100644 --- a/rootly_sdk/api/communications_groups/delete_communications_group.py +++ b/rootly_sdk/api/communications_groups/delete_communications_group.py @@ -12,24 +12,18 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/communications/groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/groups/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -38,8 +32,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) - - return response_404 if client.raise_on_unexpected_status: @@ -61,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Deletes a communications group + """Deletes a communications group Deletes a communications group @@ -76,12 +67,10 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -90,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Deletes a communications group + """Deletes a communications group Deletes a communications group @@ -109,22 +98,20 @@ def sync( Returns: Any | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Deletes a communications group + """Deletes a communications group Deletes a communications group @@ -137,27 +124,23 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Deletes a communications group + """Deletes a communications group Deletes a communications group @@ -170,11 +153,11 @@ async def asyncio( Returns: Any | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/communications_groups/get_communications_group.py b/rootly_sdk/api/communications_groups/get_communications_group.py index b9d0ffe3..9c1e74ef 100644 --- a/rootly_sdk/api/communications_groups/get_communications_group.py +++ b/rootly_sdk/api/communications_groups/get_communications_group.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/communications/groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/groups/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsGroupResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsGroupResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsGroupResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """ Shows a communications group + """Shows a communications group Shows details of a communications group @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> CommunicationsGroupResponse | ErrorsList | None: - """ Shows a communications group + """Shows a communications group Shows details of a communications group @@ -113,22 +104,20 @@ def sync( Returns: CommunicationsGroupResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """ Shows a communications group + """Shows a communications group Shows details of a communications group @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> CommunicationsGroupResponse | ErrorsList | None: - """ Shows a communications group + """Shows a communications group Shows details of a communications group @@ -174,11 +159,11 @@ async def asyncio( Returns: CommunicationsGroupResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/communications_groups/list_communications_groups.py b/rootly_sdk/api/communications_groups/list_communications_groups.py index 297d0da7..880eea27 100644 --- a/rootly_sdk/api/communications_groups/list_communications_groups.py +++ b/rootly_sdk/api/communications_groups/list_communications_groups.py @@ -24,11 +24,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -58,27 +54,23 @@ def _get_kwargs( 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/communications/groups", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsGroupsResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsGroupsResponse | None: if response.status_code == 200: response_200 = CommunicationsGroupsResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -87,7 +79,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsGroupsResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsGroupsResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -112,9 +106,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CommunicationsGroupsResponse]: - """ Lists communications groups + """Lists communications groups Lists communications groups @@ -139,24 +132,22 @@ def sync_detailed( Returns: Response[CommunicationsGroupsResponse] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filteris_private=filteris_private, -filtercommunication_type_id=filtercommunication_type_id, -filtercondition_type=filtercondition_type, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filteris_private=filteris_private, + filtercommunication_type_id=filtercommunication_type_id, + filtercondition_type=filtercondition_type, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -165,6 +156,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -181,9 +173,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CommunicationsGroupsResponse | None: - """ Lists communications groups + """Lists communications groups Lists communications groups @@ -208,27 +199,26 @@ def sync( Returns: CommunicationsGroupsResponse - """ - + """ return sync_detailed( client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filteris_private=filteris_private, -filtercommunication_type_id=filtercommunication_type_id, -filtercondition_type=filtercondition_type, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filteris_private=filteris_private, + filtercommunication_type_id=filtercommunication_type_id, + filtercondition_type=filtercondition_type, + 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, @@ -245,9 +235,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CommunicationsGroupsResponse]: - """ Lists communications groups + """Lists communications groups Lists communications groups @@ -272,32 +261,29 @@ async def asyncio_detailed( Returns: Response[CommunicationsGroupsResponse] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filteris_private=filteris_private, -filtercommunication_type_id=filtercommunication_type_id, -filtercondition_type=filtercondition_type, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filteris_private=filteris_private, + filtercommunication_type_id=filtercommunication_type_id, + filtercondition_type=filtercondition_type, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -314,9 +300,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CommunicationsGroupsResponse | None: - """ Lists communications groups + """Lists communications groups Lists communications groups @@ -341,23 +326,23 @@ async def asyncio( Returns: CommunicationsGroupsResponse - """ - - - return (await asyncio_detailed( - client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filteris_private=filteris_private, -filtercommunication_type_id=filtercommunication_type_id, -filtercondition_type=filtercondition_type, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filteris_private=filteris_private, + filtercommunication_type_id=filtercommunication_type_id, + filtercondition_type=filtercondition_type, + 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/communications_groups/update_communications_group.py b/rootly_sdk/api/communications_groups/update_communications_group.py index 623953cc..56751baf 100644 --- a/rootly_sdk/api/communications_groups/update_communications_group.py +++ b/rootly_sdk/api/communications_groups/update_communications_group.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateCommunicationsGroup, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/communications/groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/groups/{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) -> CommunicationsGroupResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsGroupResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsGroupResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsGroupResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsGroupResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCommunicationsGroup, - ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """ Updates a communications group + """Updates a communications group Updates a communications group @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsGroup, - ) -> CommunicationsGroupResponse | ErrorsList | None: - """ Updates a communications group + """Updates a communications group Updates a communications group @@ -127,24 +118,22 @@ def sync( Returns: CommunicationsGroupResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsGroup, - ) -> Response[CommunicationsGroupResponse | ErrorsList]: - """ Updates a communications group + """Updates a communications group Updates a communications group @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[CommunicationsGroupResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsGroup, - ) -> CommunicationsGroupResponse | ErrorsList | None: - """ Updates a communications group + """Updates a communications group Updates a communications group @@ -194,12 +179,12 @@ async def asyncio( Returns: CommunicationsGroupResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/communications_stages/__init__.py b/rootly_sdk/api/communications_stages/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/communications_stages/__init__.py +++ b/rootly_sdk/api/communications_stages/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/communications_stages/create_communications_stage.py b/rootly_sdk/api/communications_stages/create_communications_stage.py index 463eb0f6..9e90afde 100644 --- a/rootly_sdk/api/communications_stages/create_communications_stage.py +++ b/rootly_sdk/api/communications_stages/create_communications_stage.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCommunicationsStage, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/communications/stages", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> CommunicationsStageResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsStageResponse | ErrorsList | None: if response.status_code == 201: response_201 = CommunicationsStageResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsStageResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsStageResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCommunicationsStage, - ) -> Response[CommunicationsStageResponse | ErrorsList]: - """ Creates a communications stage + """Creates a communications stage Creates a new communications stage from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCommunicationsStage, - ) -> CommunicationsStageResponse | ErrorsList | None: - """ Creates a communications stage + """Creates a communications stage Creates a new communications stage from provided data @@ -127,22 +114,20 @@ def sync( Returns: CommunicationsStageResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCommunicationsStage, - ) -> Response[CommunicationsStageResponse | ErrorsList]: - """ Creates a communications stage + """Creates a communications stage Creates a new communications stage from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewCommunicationsStage, - ) -> CommunicationsStageResponse | ErrorsList | None: - """ Creates a communications stage + """Creates a communications stage Creates a new communications stage from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CommunicationsStageResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/communications_stages/delete_communications_stage.py b/rootly_sdk/api/communications_stages/delete_communications_stage.py index f59bcae0..b5921be8 100644 --- a/rootly_sdk/api/communications_stages/delete_communications_stage.py +++ b/rootly_sdk/api/communications_stages/delete_communications_stage.py @@ -12,24 +12,18 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/communications/stages/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/stages/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -38,8 +32,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) - - return response_404 if client.raise_on_unexpected_status: @@ -61,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Deletes a communications stage + """Deletes a communications stage Deletes a communications stage @@ -76,12 +67,10 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -90,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Deletes a communications stage + """Deletes a communications stage Deletes a communications stage @@ -109,22 +98,20 @@ def sync( Returns: Any | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Deletes a communications stage + """Deletes a communications stage Deletes a communications stage @@ -137,27 +124,23 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Deletes a communications stage + """Deletes a communications stage Deletes a communications stage @@ -170,11 +153,11 @@ async def asyncio( Returns: Any | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/communications_stages/get_communications_stage.py b/rootly_sdk/api/communications_stages/get_communications_stage.py index d8688d4d..477e0d9a 100644 --- a/rootly_sdk/api/communications_stages/get_communications_stage.py +++ b/rootly_sdk/api/communications_stages/get_communications_stage.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/communications/stages/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/stages/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsStageResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsStageResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsStageResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsStageResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsStageResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CommunicationsStageResponse | ErrorsList]: - """ Shows a communications stage + """Shows a communications stage Shows details of a communications stage @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> CommunicationsStageResponse | ErrorsList | None: - """ Shows a communications stage + """Shows a communications stage Shows details of a communications stage @@ -113,22 +104,20 @@ def sync( Returns: CommunicationsStageResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CommunicationsStageResponse | ErrorsList]: - """ Shows a communications stage + """Shows a communications stage Shows details of a communications stage @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> CommunicationsStageResponse | ErrorsList | None: - """ Shows a communications stage + """Shows a communications stage Shows details of a communications stage @@ -174,11 +159,11 @@ async def asyncio( Returns: CommunicationsStageResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/communications_stages/list_communications_stages.py b/rootly_sdk/api/communications_stages/list_communications_stages.py index 7f718a58..174a6873 100644 --- a/rootly_sdk/api/communications_stages/list_communications_stages.py +++ b/rootly_sdk/api/communications_stages/list_communications_stages.py @@ -21,11 +21,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -49,27 +45,23 @@ def _get_kwargs( 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/communications/stages", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsStagesResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsStagesResponse | None: if response.status_code == 200: response_200 = CommunicationsStagesResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -78,7 +70,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsStagesResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsStagesResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -100,9 +94,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CommunicationsStagesResponse]: - """ Lists communications stages + """Lists communications stages Lists communications stages @@ -124,21 +117,19 @@ def sync_detailed( Returns: Response[CommunicationsStagesResponse] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -147,6 +138,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -160,9 +152,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CommunicationsStagesResponse | None: - """ Lists communications stages + """Lists communications stages Lists communications stages @@ -184,24 +175,23 @@ def sync( Returns: CommunicationsStagesResponse - """ - + """ return sync_detailed( client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + 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, @@ -215,9 +205,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CommunicationsStagesResponse]: - """ Lists communications stages + """Lists communications stages Lists communications stages @@ -239,29 +228,26 @@ async def asyncio_detailed( Returns: Response[CommunicationsStagesResponse] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -275,9 +261,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CommunicationsStagesResponse | None: - """ Lists communications stages + """Lists communications stages Lists communications stages @@ -299,20 +284,20 @@ async def asyncio( Returns: CommunicationsStagesResponse - """ - - - return (await asyncio_detailed( - client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + 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/communications_stages/update_communications_stage.py b/rootly_sdk/api/communications_stages/update_communications_stage.py index 0c3a4dc2..13ed4698 100644 --- a/rootly_sdk/api/communications_stages/update_communications_stage.py +++ b/rootly_sdk/api/communications_stages/update_communications_stage.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateCommunicationsStage, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/communications/stages/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/stages/{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) -> CommunicationsStageResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsStageResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsStageResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsStageResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsStageResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCommunicationsStage, - ) -> Response[CommunicationsStageResponse | ErrorsList]: - """ Updates a communications stage + """Updates a communications stage Updates a communications stage @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsStage, - ) -> CommunicationsStageResponse | ErrorsList | None: - """ Updates a communications stage + """Updates a communications stage Updates a communications stage @@ -127,24 +118,22 @@ def sync( Returns: CommunicationsStageResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsStage, - ) -> Response[CommunicationsStageResponse | ErrorsList]: - """ Updates a communications stage + """Updates a communications stage Updates a communications stage @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[CommunicationsStageResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsStage, - ) -> CommunicationsStageResponse | ErrorsList | None: - """ Updates a communications stage + """Updates a communications stage Updates a communications stage @@ -194,12 +179,12 @@ async def asyncio( Returns: CommunicationsStageResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/communications_templates/__init__.py b/rootly_sdk/api/communications_templates/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/communications_templates/__init__.py +++ b/rootly_sdk/api/communications_templates/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/communications_templates/create_communications_template.py b/rootly_sdk/api/communications_templates/create_communications_template.py index 2759048a..5c62ff97 100644 --- a/rootly_sdk/api/communications_templates/create_communications_template.py +++ b/rootly_sdk/api/communications_templates/create_communications_template.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCommunicationsTemplate, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/communications/templates", @@ -30,27 +24,23 @@ def _get_kwargs( _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) -> CommunicationsTemplateResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsTemplateResponse | ErrorsList | None: if response.status_code == 201: response_201 = CommunicationsTemplateResponse.from_dict(response.json()) - - return response_201 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTemplateResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCommunicationsTemplate, - ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """ Creates a communications template + """Creates a communications template Creates a new communications template from provided data @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCommunicationsTemplate, - ) -> CommunicationsTemplateResponse | ErrorsList | None: - """ Creates a communications template + """Creates a communications template Creates a new communications template from provided data @@ -120,22 +109,20 @@ def sync( Returns: CommunicationsTemplateResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCommunicationsTemplate, - ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """ Creates a communications template + """Creates a communications template Creates a new communications template from provided data @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewCommunicationsTemplate, - ) -> CommunicationsTemplateResponse | ErrorsList | None: - """ Creates a communications template + """Creates a communications template Creates a new communications template from provided data @@ -181,11 +164,11 @@ async def asyncio( Returns: CommunicationsTemplateResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/communications_templates/delete_communications_template.py b/rootly_sdk/api/communications_templates/delete_communications_template.py index 5ee1cf24..5750a7a4 100644 --- a/rootly_sdk/api/communications_templates/delete_communications_template.py +++ b/rootly_sdk/api/communications_templates/delete_communications_template.py @@ -12,24 +12,18 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/communications/templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/templates/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -38,8 +32,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) - - return response_404 if client.raise_on_unexpected_status: @@ -61,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Deletes a communications template + """Deletes a communications template Deletes a communications template @@ -76,12 +67,10 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -90,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Deletes a communications template + """Deletes a communications template Deletes a communications template @@ -109,22 +98,20 @@ def sync( Returns: Any | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Deletes a communications template + """Deletes a communications template Deletes a communications template @@ -137,27 +124,23 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Deletes a communications template + """Deletes a communications template Deletes a communications template @@ -170,11 +153,11 @@ async def asyncio( Returns: Any | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/communications_templates/get_communications_template.py b/rootly_sdk/api/communications_templates/get_communications_template.py index 829d51bb..84eda309 100644 --- a/rootly_sdk/api/communications_templates/get_communications_template.py +++ b/rootly_sdk/api/communications_templates/get_communications_template.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/communications/templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/templates/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTemplateResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsTemplateResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsTemplateResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTemplateResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """ Shows a communications template + """Shows a communications template Shows details of a communications template @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> CommunicationsTemplateResponse | ErrorsList | None: - """ Shows a communications template + """Shows a communications template Shows details of a communications template @@ -113,22 +104,20 @@ def sync( Returns: CommunicationsTemplateResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """ Shows a communications template + """Shows a communications template Shows details of a communications template @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> CommunicationsTemplateResponse | ErrorsList | None: - """ Shows a communications template + """Shows a communications template Shows details of a communications template @@ -174,11 +159,11 @@ async def asyncio( Returns: CommunicationsTemplateResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/communications_templates/list_communications_templates.py b/rootly_sdk/api/communications_templates/list_communications_templates.py index 568a1f25..8d3f4fb0 100644 --- a/rootly_sdk/api/communications_templates/list_communications_templates.py +++ b/rootly_sdk/api/communications_templates/list_communications_templates.py @@ -22,11 +22,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -52,27 +48,23 @@ def _get_kwargs( 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/communications/templates", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTemplatesResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsTemplatesResponse | None: if response.status_code == 200: response_200 = CommunicationsTemplatesResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -81,7 +73,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTemplatesResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsTemplatesResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -104,9 +98,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CommunicationsTemplatesResponse]: - """ Lists communications templates + """Lists communications templates Lists communications templates @@ -129,22 +122,20 @@ def sync_detailed( Returns: Response[CommunicationsTemplatesResponse] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercommunication_type_id=filtercommunication_type_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercommunication_type_id=filtercommunication_type_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -153,6 +144,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -167,9 +159,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CommunicationsTemplatesResponse | None: - """ Lists communications templates + """Lists communications templates Lists communications templates @@ -192,25 +183,24 @@ def sync( Returns: CommunicationsTemplatesResponse - """ - + """ return sync_detailed( client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercommunication_type_id=filtercommunication_type_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercommunication_type_id=filtercommunication_type_id, + 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, @@ -225,9 +215,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CommunicationsTemplatesResponse]: - """ Lists communications templates + """Lists communications templates Lists communications templates @@ -250,30 +239,27 @@ async def asyncio_detailed( Returns: Response[CommunicationsTemplatesResponse] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercommunication_type_id=filtercommunication_type_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercommunication_type_id=filtercommunication_type_id, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -288,9 +274,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CommunicationsTemplatesResponse | None: - """ Lists communications templates + """Lists communications templates Lists communications templates @@ -313,21 +298,21 @@ async def asyncio( Returns: CommunicationsTemplatesResponse - """ - - - return (await asyncio_detailed( - client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercommunication_type_id=filtercommunication_type_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercommunication_type_id=filtercommunication_type_id, + 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/communications_templates/update_communications_template.py b/rootly_sdk/api/communications_templates/update_communications_template.py index 850b4735..d3b3b5a0 100644 --- a/rootly_sdk/api/communications_templates/update_communications_template.py +++ b/rootly_sdk/api/communications_templates/update_communications_template.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateCommunicationsTemplate, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/communications/templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/templates/{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) -> CommunicationsTemplateResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsTemplateResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsTemplateResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTemplateResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsTemplateResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCommunicationsTemplate, - ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """ Updates a communications template + """Updates a communications template Updates a communications template @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsTemplate, - ) -> CommunicationsTemplateResponse | ErrorsList | None: - """ Updates a communications template + """Updates a communications template Updates a communications template @@ -127,24 +118,22 @@ def sync( Returns: CommunicationsTemplateResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsTemplate, - ) -> Response[CommunicationsTemplateResponse | ErrorsList]: - """ Updates a communications template + """Updates a communications template Updates a communications template @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[CommunicationsTemplateResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsTemplate, - ) -> CommunicationsTemplateResponse | ErrorsList | None: - """ Updates a communications template + """Updates a communications template Updates a communications template @@ -194,12 +179,12 @@ async def asyncio( Returns: CommunicationsTemplateResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/communications_types/__init__.py b/rootly_sdk/api/communications_types/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/communications_types/__init__.py +++ b/rootly_sdk/api/communications_types/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/communications_types/create_communications_type.py b/rootly_sdk/api/communications_types/create_communications_type.py index 112b6b79..873b6e89 100644 --- a/rootly_sdk/api/communications_types/create_communications_type.py +++ b/rootly_sdk/api/communications_types/create_communications_type.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCommunicationsType, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/communications/types", @@ -30,27 +24,23 @@ def _get_kwargs( _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) -> CommunicationsTypeResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsTypeResponse | ErrorsList | None: if response.status_code == 201: response_201 = CommunicationsTypeResponse.from_dict(response.json()) - - return response_201 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTypeResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsTypeResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCommunicationsType, - ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """ Creates a communications type + """Creates a communications type Creates a new communications type from provided data @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCommunicationsType, - ) -> CommunicationsTypeResponse | ErrorsList | None: - """ Creates a communications type + """Creates a communications type Creates a new communications type from provided data @@ -120,22 +109,20 @@ def sync( Returns: CommunicationsTypeResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCommunicationsType, - ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """ Creates a communications type + """Creates a communications type Creates a new communications type from provided data @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewCommunicationsType, - ) -> CommunicationsTypeResponse | ErrorsList | None: - """ Creates a communications type + """Creates a communications type Creates a new communications type from provided data @@ -181,11 +164,11 @@ async def asyncio( Returns: CommunicationsTypeResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/communications_types/delete_communications_type.py b/rootly_sdk/api/communications_types/delete_communications_type.py index cffb4cd5..c14a941b 100644 --- a/rootly_sdk/api/communications_types/delete_communications_type.py +++ b/rootly_sdk/api/communications_types/delete_communications_type.py @@ -12,24 +12,18 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/communications/types/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/types/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 200: response_200 = cast(Any, None) @@ -38,8 +32,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) - - return response_404 if client.raise_on_unexpected_status: @@ -61,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Deletes a communications type + """Deletes a communications type Deletes a communications type @@ -76,12 +67,10 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -90,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Deletes a communications type + """Deletes a communications type Deletes a communications type @@ -109,22 +98,20 @@ def sync( Returns: Any | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Deletes a communications type + """Deletes a communications type Deletes a communications type @@ -137,27 +124,23 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Deletes a communications type + """Deletes a communications type Deletes a communications type @@ -170,11 +153,11 @@ async def asyncio( Returns: Any | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/communications_types/get_communications_type.py b/rootly_sdk/api/communications_types/get_communications_type.py index ec64c460..1326081e 100644 --- a/rootly_sdk/api/communications_types/get_communications_type.py +++ b/rootly_sdk/api/communications_types/get_communications_type.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/communications/types/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/types/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTypeResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsTypeResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsTypeResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTypeResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsTypeResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """ Shows a communications type + """Shows a communications type Shows details of a communications type @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> CommunicationsTypeResponse | ErrorsList | None: - """ Shows a communications type + """Shows a communications type Shows details of a communications type @@ -113,22 +104,20 @@ def sync( Returns: CommunicationsTypeResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """ Shows a communications type + """Shows a communications type Shows details of a communications type @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> CommunicationsTypeResponse | ErrorsList | None: - """ Shows a communications type + """Shows a communications type Shows details of a communications type @@ -174,11 +159,11 @@ async def asyncio( Returns: CommunicationsTypeResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/communications_types/list_communications_types.py b/rootly_sdk/api/communications_types/list_communications_types.py index af9a4f39..fdbac8ae 100644 --- a/rootly_sdk/api/communications_types/list_communications_types.py +++ b/rootly_sdk/api/communications_types/list_communications_types.py @@ -21,11 +21,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -49,27 +45,23 @@ def _get_kwargs( 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/communications/types", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CommunicationsTypesResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsTypesResponse | None: if response.status_code == 200: response_200 = CommunicationsTypesResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -78,7 +70,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTypesResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsTypesResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -100,9 +94,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CommunicationsTypesResponse]: - """ Lists communications types + """Lists communications types Lists communications types @@ -124,21 +117,19 @@ def sync_detailed( Returns: Response[CommunicationsTypesResponse] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -147,6 +138,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -160,9 +152,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CommunicationsTypesResponse | None: - """ Lists communications types + """Lists communications types Lists communications types @@ -184,24 +175,23 @@ def sync( Returns: CommunicationsTypesResponse - """ - + """ return sync_detailed( client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + 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, @@ -215,9 +205,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CommunicationsTypesResponse]: - """ Lists communications types + """Lists communications types Lists communications types @@ -239,29 +228,26 @@ async def asyncio_detailed( Returns: Response[CommunicationsTypesResponse] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -275,9 +261,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CommunicationsTypesResponse | None: - """ Lists communications types + """Lists communications types Lists communications types @@ -299,20 +284,20 @@ async def asyncio( Returns: CommunicationsTypesResponse - """ - - - return (await asyncio_detailed( - client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + 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/communications_types/update_communications_type.py b/rootly_sdk/api/communications_types/update_communications_type.py index 06eb7292..7e463b14 100644 --- a/rootly_sdk/api/communications_types/update_communications_type.py +++ b/rootly_sdk/api/communications_types/update_communications_type.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateCommunicationsType, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/communications/types/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/communications/types/{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) -> CommunicationsTypeResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CommunicationsTypeResponse | ErrorsList | None: if response.status_code == 200: response_200 = CommunicationsTypeResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CommunicationsTypeResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CommunicationsTypeResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCommunicationsType, - ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """ Updates a communications type + """Updates a communications type Updates a communications type @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsType, - ) -> CommunicationsTypeResponse | ErrorsList | None: - """ Updates a communications type + """Updates a communications type Updates a communications type @@ -127,24 +118,22 @@ def sync( Returns: CommunicationsTypeResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsType, - ) -> Response[CommunicationsTypeResponse | ErrorsList]: - """ Updates a communications type + """Updates a communications type Updates a communications type @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[CommunicationsTypeResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCommunicationsType, - ) -> CommunicationsTypeResponse | ErrorsList | None: - """ Updates a communications type + """Updates a communications type Updates a communications type @@ -194,12 +179,12 @@ async def asyncio( Returns: CommunicationsTypeResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/custom_forms/__init__.py b/rootly_sdk/api/custom_forms/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/custom_forms/__init__.py +++ b/rootly_sdk/api/custom_forms/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/custom_forms/create_custom_form.py b/rootly_sdk/api/custom_forms/create_custom_form.py index 9f1c4f37..3ce9ad7d 100644 --- a/rootly_sdk/api/custom_forms/create_custom_form.py +++ b/rootly_sdk/api/custom_forms/create_custom_form.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCustomForm, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/custom_forms", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> CustomFormResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFormResponse | ErrorsList | None: if response.status_code == 201: response_201 = CustomFormResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFormResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCustomForm, - ) -> Response[CustomFormResponse | ErrorsList]: - """ Creates a custom form + """Creates a custom form Creates a new custom form from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCustomForm, - ) -> CustomFormResponse | ErrorsList | None: - """ Creates a custom form + """Creates a custom form Creates a new custom form from provided data @@ -127,22 +114,20 @@ def sync( Returns: CustomFormResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCustomForm, - ) -> Response[CustomFormResponse | ErrorsList]: - """ Creates a custom form + """Creates a custom form Creates a new custom form from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewCustomForm, - ) -> CustomFormResponse | ErrorsList | None: - """ Creates a custom form + """Creates a custom form Creates a new custom form from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CustomFormResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/custom_forms/delete_custom_form.py b/rootly_sdk/api/custom_forms/delete_custom_form.py index 63a8365e..596f17a9 100644 --- a/rootly_sdk/api/custom_forms/delete_custom_form.py +++ b/rootly_sdk/api/custom_forms/delete_custom_form.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/custom_forms/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/custom_forms/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFormResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFormResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFormResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFormResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CustomFormResponse | ErrorsList]: - """ Delete a custom form + """Delete a custom form Delete a specific custom form by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> CustomFormResponse | ErrorsList | None: - """ Delete a custom form + """Delete a custom form Delete a specific custom form by id @@ -114,22 +105,20 @@ def sync( Returns: CustomFormResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CustomFormResponse | ErrorsList]: - """ Delete a custom form + """Delete a custom form Delete a specific custom form by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> CustomFormResponse | ErrorsList | None: - """ Delete a custom form + """Delete a custom form Delete a specific custom form by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CustomFormResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/custom_forms/get_custom_form.py b/rootly_sdk/api/custom_forms/get_custom_form.py index 54ea3a00..bddf53a7 100644 --- a/rootly_sdk/api/custom_forms/get_custom_form.py +++ b/rootly_sdk/api/custom_forms/get_custom_form.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/custom_forms/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/custom_forms/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFormResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFormResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFormResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFormResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CustomFormResponse | ErrorsList]: - """ Retrieves a custom form + """Retrieves a custom form Retrieves a specific custom form by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> CustomFormResponse | ErrorsList | None: - """ Retrieves a custom form + """Retrieves a custom form Retrieves a specific custom form by id @@ -114,22 +105,20 @@ def sync( Returns: CustomFormResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[CustomFormResponse | ErrorsList]: - """ Retrieves a custom form + """Retrieves a custom form Retrieves a specific custom form by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> CustomFormResponse | ErrorsList | None: - """ Retrieves a custom form + """Retrieves a custom form Retrieves a specific custom form by id @@ -175,11 +160,11 @@ async def asyncio( Returns: CustomFormResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/custom_forms/list_custom_forms.py b/rootly_sdk/api/custom_forms/list_custom_forms.py index 6b89d4e5..0308a583 100644 --- a/rootly_sdk/api/custom_forms/list_custom_forms.py +++ b/rootly_sdk/api/custom_forms/list_custom_forms.py @@ -23,11 +23,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -53,34 +49,28 @@ def _get_kwargs( 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/custom_forms", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFormList | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFormList | ErrorsList | None: if response.status_code == 200: response_200 = CustomFormList.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: @@ -89,7 +79,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormList | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFormList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -112,9 +104,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CustomFormList | ErrorsList]: - """ List custom forms + """List custom forms List custom forms @@ -137,22 +128,20 @@ def sync_detailed( Returns: Response[CustomFormList | ErrorsList] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercommand=filtercommand, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercommand=filtercommand, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -161,6 +150,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -175,9 +165,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CustomFormList | ErrorsList | None: - """ List custom forms + """List custom forms List custom forms @@ -200,25 +189,24 @@ def sync( Returns: CustomFormList | ErrorsList - """ - + """ return sync_detailed( client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercommand=filtercommand, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercommand=filtercommand, + 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, @@ -233,9 +221,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[CustomFormList | ErrorsList]: - """ List custom forms + """List custom forms List custom forms @@ -258,30 +245,27 @@ async def asyncio_detailed( Returns: Response[CustomFormList | ErrorsList] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercommand=filtercommand, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercommand=filtercommand, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -296,9 +280,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> CustomFormList | ErrorsList | None: - """ List custom forms + """List custom forms List custom forms @@ -321,21 +304,21 @@ async def asyncio( Returns: CustomFormList | ErrorsList - """ - - - return (await asyncio_detailed( - client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercommand=filtercommand, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercommand=filtercommand, + 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/custom_forms/update_custom_form.py b/rootly_sdk/api/custom_forms/update_custom_form.py index f185e7b9..1b640d81 100644 --- a/rootly_sdk/api/custom_forms/update_custom_form.py +++ b/rootly_sdk/api/custom_forms/update_custom_form.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateCustomForm, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/custom_forms/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/custom_forms/{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) -> CustomFormResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFormResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFormResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFormResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFormResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCustomForm, - ) -> Response[CustomFormResponse | ErrorsList]: - """ Update a custom form + """Update a custom form Update a specific custom form by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, - ) -> CustomFormResponse | ErrorsList | None: - """ Update a custom form + """Update a custom form Update a specific custom form by id @@ -128,24 +119,22 @@ def sync( Returns: CustomFormResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, - ) -> Response[CustomFormResponse | ErrorsList]: - """ Update a custom form + """Update a custom form Update a specific custom form by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[CustomFormResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateCustomForm, - ) -> CustomFormResponse | ErrorsList | None: - """ Update a custom form + """Update a custom form Update a specific custom form by id @@ -195,12 +180,12 @@ async def asyncio( Returns: CustomFormResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/dashboard_panels/__init__.py b/rootly_sdk/api/dashboard_panels/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/dashboard_panels/__init__.py +++ b/rootly_sdk/api/dashboard_panels/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py index 6ddbc4fc..89a6b704 100644 --- a/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/create_dashboard_panel.py @@ -16,43 +16,35 @@ def _get_kwargs( dashboard_id: str, *, body: NewDashboardPanel, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/dashboards/{dashboard_id}/panels".format(dashboard_id=quote(str(dashboard_id), safe=""),), + "url": "/v1/dashboards/{dashboard_id}/panels".format( + dashboard_id=quote(str(dashboard_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) -> DashboardPanelResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DashboardPanelResponse | ErrorsList | None: if response.status_code == 201: response_201 = DashboardPanelResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardPanelResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewDashboardPanel, - ) -> Response[DashboardPanelResponse | ErrorsList]: - """ Creates a dashboard panel + """Creates a dashboard panel Creates a new dashboard panel from provided data @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[DashboardPanelResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( dashboard_id=dashboard_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( dashboard_id: str, *, client: AuthenticatedClient, body: NewDashboardPanel, - ) -> DashboardPanelResponse | ErrorsList | None: - """ Creates a dashboard panel + """Creates a dashboard panel Creates a new dashboard panel from provided data @@ -127,24 +118,22 @@ def sync( Returns: DashboardPanelResponse | ErrorsList - """ - + """ return sync_detailed( dashboard_id=dashboard_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( dashboard_id: str, *, client: AuthenticatedClient, body: NewDashboardPanel, - ) -> Response[DashboardPanelResponse | ErrorsList]: - """ Creates a dashboard panel + """Creates a dashboard panel Creates a new dashboard panel from provided data @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( dashboard_id=dashboard_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( dashboard_id: str, *, client: AuthenticatedClient, body: NewDashboardPanel, - ) -> DashboardPanelResponse | ErrorsList | None: - """ Creates a dashboard panel + """Creates a dashboard panel Creates a new dashboard panel from provided data @@ -194,12 +179,12 @@ async def asyncio( Returns: DashboardPanelResponse | ErrorsList - """ - - - return (await asyncio_detailed( - dashboard_id=dashboard_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + dashboard_id=dashboard_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py index afb70631..d630d717 100644 --- a/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/delete_dashboard_panel.py @@ -12,30 +12,22 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/dashboard_panels/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/dashboard_panels/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardPanelResponse | None: if response.status_code == 200: response_200 = DashboardPanelResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -44,7 +36,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardPanelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -57,9 +51,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[DashboardPanelResponse]: - """ Delete a dashboard panel + """Delete a dashboard panel Delete a specific dashboard panel by id @@ -72,12 +65,10 @@ def sync_detailed( Returns: Response[DashboardPanelResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -86,13 +77,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> DashboardPanelResponse | None: - """ Delete a dashboard panel + """Delete a dashboard panel Delete a specific dashboard panel by id @@ -105,22 +96,20 @@ def sync( Returns: DashboardPanelResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[DashboardPanelResponse]: - """ Delete a dashboard panel + """Delete a dashboard panel Delete a specific dashboard panel by id @@ -133,27 +122,23 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> DashboardPanelResponse | None: - """ Delete a dashboard panel + """Delete a dashboard panel Delete a specific dashboard panel by id @@ -166,11 +151,11 @@ async def asyncio( Returns: DashboardPanelResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py index 8d28108d..825e1ab8 100644 --- a/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/duplicate_dashboard_panel.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/dashboard_panels/{id}/duplicate".format(id=quote(str(id), safe=""),), + "url": "/v1/dashboard_panels/{id}/duplicate".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardPanelResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DashboardPanelResponse | ErrorsList | None: if response.status_code == 201: response_201 = DashboardPanelResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardPanelResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[DashboardPanelResponse | ErrorsList]: - """ Duplicates a dashboard panel + """Duplicates a dashboard panel Duplicates a dashboard panel @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[DashboardPanelResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> DashboardPanelResponse | ErrorsList | None: - """ Duplicates a dashboard panel + """Duplicates a dashboard panel Duplicates a dashboard panel @@ -113,22 +104,20 @@ def sync( Returns: DashboardPanelResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[DashboardPanelResponse | ErrorsList]: - """ Duplicates a dashboard panel + """Duplicates a dashboard panel Duplicates a dashboard panel @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> DashboardPanelResponse | ErrorsList | None: - """ Duplicates a dashboard panel + """Duplicates a dashboard panel Duplicates a dashboard panel @@ -174,11 +159,11 @@ async def asyncio( Returns: DashboardPanelResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py index c39fd56e..9bee49b7 100644 --- a/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/get_dashboard_panel.py @@ -16,11 +16,7 @@ def _get_kwargs( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( params["time_zone"] = time_zone - 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/dashboard_panels/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/dashboard_panels/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardPanelResponse | None: if response.status_code == 200: response_200 = DashboardPanelResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +51,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardPanelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, - ) -> Response[DashboardPanelResponse]: - """ Retrieves a dashboard panel + """Retrieves a dashboard panel Retrieves a specific dashboard panel by id @@ -93,15 +86,13 @@ def sync_detailed( Returns: Response[DashboardPanelResponse] - """ - + """ kwargs = _get_kwargs( id=id, -range_=range_, -period=period, -time_zone=time_zone, - + range_=range_, + period=period, + time_zone=time_zone, ) response = client.get_httpx_client().request( @@ -110,6 +101,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, @@ -117,9 +109,8 @@ def sync( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, - ) -> DashboardPanelResponse | None: - """ Retrieves a dashboard panel + """Retrieves a dashboard panel Retrieves a specific dashboard panel by id @@ -135,18 +126,17 @@ def sync( Returns: DashboardPanelResponse - """ - + """ return sync_detailed( id=id, -client=client, -range_=range_, -period=period, -time_zone=time_zone, - + client=client, + range_=range_, + period=period, + time_zone=time_zone, ).parsed + async def asyncio_detailed( id: str, *, @@ -154,9 +144,8 @@ async def asyncio_detailed( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, - ) -> Response[DashboardPanelResponse]: - """ Retrieves a dashboard panel + """Retrieves a dashboard panel Retrieves a specific dashboard panel by id @@ -172,23 +161,20 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse] - """ - + """ kwargs = _get_kwargs( id=id, -range_=range_, -period=period, -time_zone=time_zone, - + range_=range_, + period=period, + time_zone=time_zone, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, @@ -196,9 +182,8 @@ async def asyncio( range_: str | Unset = UNSET, period: str | Unset = UNSET, time_zone: str | Unset = UNSET, - ) -> DashboardPanelResponse | None: - """ Retrieves a dashboard panel + """Retrieves a dashboard panel Retrieves a specific dashboard panel by id @@ -214,14 +199,14 @@ async def asyncio( Returns: DashboardPanelResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -range_=range_, -period=period, -time_zone=time_zone, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + range_=range_, + period=period, + time_zone=time_zone, + ) + ).parsed diff --git a/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py b/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py index a6551476..d807646c 100644 --- a/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py +++ b/rootly_sdk/api/dashboard_panels/list_dashboard_panels.py @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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/dashboards/{dashboard_id}/panels".format(dashboard_id=quote(str(dashboard_id), safe=""),), + "url": "/v1/dashboards/{dashboard_id}/panels".format( + dashboard_id=quote(str(dashboard_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardPanelList | None: if response.status_code == 200: response_200 = DashboardPanelList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -75,9 +67,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[DashboardPanelList]: - """ List dashboard panels + """List dashboard panels List dashboard panels @@ -93,15 +84,13 @@ def sync_detailed( Returns: Response[DashboardPanelList] - """ - + """ kwargs = _get_kwargs( dashboard_id=dashboard_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +99,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( dashboard_id: str, *, @@ -117,9 +107,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> DashboardPanelList | None: - """ List dashboard panels + """List dashboard panels List dashboard panels @@ -135,18 +124,17 @@ def sync( Returns: DashboardPanelList - """ - + """ return sync_detailed( dashboard_id=dashboard_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( dashboard_id: str, *, @@ -154,9 +142,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[DashboardPanelList]: - """ List dashboard panels + """List dashboard panels List dashboard panels @@ -172,23 +159,20 @@ async def asyncio_detailed( Returns: Response[DashboardPanelList] - """ - + """ kwargs = _get_kwargs( dashboard_id=dashboard_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( dashboard_id: str, *, @@ -196,9 +180,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> DashboardPanelList | None: - """ List dashboard panels + """List dashboard panels List dashboard panels @@ -214,14 +197,14 @@ async def asyncio( Returns: DashboardPanelList - """ - - - return (await asyncio_detailed( - dashboard_id=dashboard_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + dashboard_id=dashboard_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py b/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py index dc059c1a..8c15920b 100644 --- a/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py +++ b/rootly_sdk/api/dashboard_panels/update_dashboard_panel.py @@ -15,36 +15,28 @@ def _get_kwargs( id: str, *, body: UpdateDashboardPanel, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/dashboard_panels/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/dashboard_panels/{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) -> DashboardPanelResponse | None: if response.status_code == 200: response_200 = DashboardPanelResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardPanelResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardPanelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,9 +61,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateDashboardPanel, - ) -> Response[DashboardPanelResponse]: - """ Update a dashboard panel + """Update a dashboard panel Update a specific dashboard panel by id @@ -83,13 +76,11 @@ def sync_detailed( Returns: Response[DashboardPanelResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -98,14 +89,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateDashboardPanel, - ) -> DashboardPanelResponse | None: - """ Update a dashboard panel + """Update a dashboard panel Update a specific dashboard panel by id @@ -119,24 +110,22 @@ def sync( Returns: DashboardPanelResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateDashboardPanel, - ) -> Response[DashboardPanelResponse]: - """ Update a dashboard panel + """Update a dashboard panel Update a specific dashboard panel by id @@ -150,29 +139,25 @@ async def asyncio_detailed( Returns: Response[DashboardPanelResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateDashboardPanel, - ) -> DashboardPanelResponse | None: - """ Update a dashboard panel + """Update a dashboard panel Update a specific dashboard panel by id @@ -186,12 +171,12 @@ async def asyncio( Returns: DashboardPanelResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/dashboards/__init__.py b/rootly_sdk/api/dashboards/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/dashboards/__init__.py +++ b/rootly_sdk/api/dashboards/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/dashboards/create_dashboard.py b/rootly_sdk/api/dashboards/create_dashboard.py index 256b02ba..32bb4589 100644 --- a/rootly_sdk/api/dashboards/create_dashboard.py +++ b/rootly_sdk/api/dashboards/create_dashboard.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewDashboard, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/dashboards", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> DashboardResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DashboardResponse | ErrorsList | None: if response.status_code == 201: response_201 = DashboardResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewDashboard, - ) -> Response[DashboardResponse | ErrorsList]: - """ Creates a dashboard + """Creates a dashboard Creates a new dashboard from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewDashboard, - ) -> DashboardResponse | ErrorsList | None: - """ Creates a dashboard + """Creates a dashboard Creates a new dashboard from provided data @@ -127,22 +114,20 @@ def sync( Returns: DashboardResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewDashboard, - ) -> Response[DashboardResponse | ErrorsList]: - """ Creates a dashboard + """Creates a dashboard Creates a new dashboard from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewDashboard, - ) -> DashboardResponse | ErrorsList | None: - """ Creates a dashboard + """Creates a dashboard Creates a new dashboard from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/dashboards/delete_dashboard.py b/rootly_sdk/api/dashboards/delete_dashboard.py index f8ae2854..e16a82d5 100644 --- a/rootly_sdk/api/dashboards/delete_dashboard.py +++ b/rootly_sdk/api/dashboards/delete_dashboard.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/dashboards/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/dashboards/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DashboardResponse | ErrorsList | None: if response.status_code == 200: response_200 = DashboardResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[DashboardResponse | ErrorsList]: - """ Delete a dashboard + """Delete a dashboard Delete a specific dashboard by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> DashboardResponse | ErrorsList | None: - """ Delete a dashboard + """Delete a dashboard Delete a specific dashboard by id @@ -114,22 +105,20 @@ def sync( Returns: DashboardResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[DashboardResponse | ErrorsList]: - """ Delete a dashboard + """Delete a dashboard Delete a specific dashboard by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> DashboardResponse | ErrorsList | None: - """ Delete a dashboard + """Delete a dashboard Delete a specific dashboard by id @@ -175,11 +160,11 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/dashboards/duplicate_dashboard.py b/rootly_sdk/api/dashboards/duplicate_dashboard.py index 105e99a1..2c874a17 100644 --- a/rootly_sdk/api/dashboards/duplicate_dashboard.py +++ b/rootly_sdk/api/dashboards/duplicate_dashboard.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/dashboards/{id}/duplicate".format(id=quote(str(id), safe=""),), + "url": "/v1/dashboards/{id}/duplicate".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DashboardResponse | ErrorsList | None: if response.status_code == 201: response_201 = DashboardResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[DashboardResponse | ErrorsList]: - """ Duplicates a dashboard + """Duplicates a dashboard Duplicates a dashboard @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> DashboardResponse | ErrorsList | None: - """ Duplicates a dashboard + """Duplicates a dashboard Duplicates a dashboard @@ -114,22 +105,20 @@ def sync( Returns: DashboardResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[DashboardResponse | ErrorsList]: - """ Duplicates a dashboard + """Duplicates a dashboard Duplicates a dashboard @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> DashboardResponse | ErrorsList | None: - """ Duplicates a dashboard + """Duplicates a dashboard Duplicates a dashboard @@ -175,11 +160,11 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/dashboards/get_dashboard.py b/rootly_sdk/api/dashboards/get_dashboard.py index 4e8c87fb..f20260b3 100644 --- a/rootly_sdk/api/dashboards/get_dashboard.py +++ b/rootly_sdk/api/dashboards/get_dashboard.py @@ -17,11 +17,7 @@ def _get_kwargs( id: str | UUID, *, include: GetDashboardInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -31,34 +27,30 @@ def _get_kwargs( params["include"] = json_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/dashboards/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/dashboards/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DashboardResponse | ErrorsList | None: if response.status_code == 200: response_200 = DashboardResponse.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: @@ -67,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,9 +75,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetDashboardInclude | Unset = UNSET, - ) -> Response[DashboardResponse | ErrorsList]: - """ Retrieves a dashboard + """Retrieves a dashboard Retrieves a specific dashboard by id @@ -97,13 +90,11 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -112,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetDashboardInclude | Unset = UNSET, - ) -> DashboardResponse | ErrorsList | None: - """ Retrieves a dashboard + """Retrieves a dashboard Retrieves a specific dashboard by id @@ -133,24 +124,22 @@ def sync( Returns: DashboardResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetDashboardInclude | Unset = UNSET, - ) -> Response[DashboardResponse | ErrorsList]: - """ Retrieves a dashboard + """Retrieves a dashboard Retrieves a specific dashboard by id @@ -164,29 +153,25 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetDashboardInclude | Unset = UNSET, - ) -> DashboardResponse | ErrorsList | None: - """ Retrieves a dashboard + """Retrieves a dashboard Retrieves a specific dashboard by id @@ -200,12 +185,12 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/dashboards/list_dashboards.py b/rootly_sdk/api/dashboards/list_dashboards.py index fbcd4f49..c0c41cd8 100644 --- a/rootly_sdk/api/dashboards/list_dashboards.py +++ b/rootly_sdk/api/dashboards/list_dashboards.py @@ -15,11 +15,7 @@ def _get_kwargs( include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,27 +29,21 @@ def _get_kwargs( 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/dashboards", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardList | None: if response.status_code == 200: response_200 = DashboardList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -77,9 +67,8 @@ def sync_detailed( include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[DashboardList]: - """ List dashboards + """List dashboards List dashboards @@ -94,14 +83,12 @@ def sync_detailed( Returns: Response[DashboardList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,15 +97,15 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> DashboardList | None: - """ List dashboards + """List dashboards List dashboards @@ -133,26 +120,24 @@ def sync( Returns: DashboardList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[DashboardList]: - """ List dashboards + """List dashboards List dashboards @@ -167,31 +152,27 @@ async def asyncio_detailed( Returns: Response[DashboardList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, include: ListDashboardsInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> DashboardList | None: - """ List dashboards + """List dashboards List dashboards @@ -206,13 +187,13 @@ async def asyncio( Returns: DashboardList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/dashboards/set_default_dashboard.py b/rootly_sdk/api/dashboards/set_default_dashboard.py index dc305a04..7cf3246d 100644 --- a/rootly_sdk/api/dashboards/set_default_dashboard.py +++ b/rootly_sdk/api/dashboards/set_default_dashboard.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/dashboards/{id}/set_default".format(id=quote(str(id), safe=""),), + "url": "/v1/dashboards/{id}/set_default".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> DashboardResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DashboardResponse | ErrorsList | None: if response.status_code == 200: response_200 = DashboardResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[DashboardResponse | ErrorsList]: - """ Sets dashboard to user default + """Sets dashboard to user default Sets dashboard to user default @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> DashboardResponse | ErrorsList | None: - """ Sets dashboard to user default + """Sets dashboard to user default Sets dashboard to user default @@ -114,22 +105,20 @@ def sync( Returns: DashboardResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[DashboardResponse | ErrorsList]: - """ Sets dashboard to user default + """Sets dashboard to user default Sets dashboard to user default @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> DashboardResponse | ErrorsList | None: - """ Sets dashboard to user default + """Sets dashboard to user default Sets dashboard to user default @@ -175,11 +160,11 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/dashboards/update_dashboard.py b/rootly_sdk/api/dashboards/update_dashboard.py index f82bc9a7..56ac6566 100644 --- a/rootly_sdk/api/dashboards/update_dashboard.py +++ b/rootly_sdk/api/dashboards/update_dashboard.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateDashboard, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/dashboards/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/dashboards/{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) -> DashboardResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> DashboardResponse | ErrorsList | None: if response.status_code == 200: response_200 = DashboardResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[DashboardResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[DashboardResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateDashboard, - ) -> Response[DashboardResponse | ErrorsList]: - """ Update a dashboard + """Update a dashboard Update a specific dashboard by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, - ) -> DashboardResponse | ErrorsList | None: - """ Update a dashboard + """Update a dashboard Update a specific dashboard by id @@ -128,24 +119,22 @@ def sync( Returns: DashboardResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, - ) -> Response[DashboardResponse | ErrorsList]: - """ Update a dashboard + """Update a dashboard Update a specific dashboard by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[DashboardResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateDashboard, - ) -> DashboardResponse | ErrorsList | None: - """ Update a dashboard + """Update a dashboard Update a specific dashboard by id @@ -195,12 +180,12 @@ async def asyncio( Returns: DashboardResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/deprecated_custom_field_options/__init__.py b/rootly_sdk/api/deprecated_custom_field_options/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/deprecated_custom_field_options/__init__.py +++ b/rootly_sdk/api/deprecated_custom_field_options/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 a0392f32..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 @@ -16,50 +16,40 @@ def _get_kwargs( custom_field_id: str, *, body: NewCustomFieldOption, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/custom_fields/{custom_field_id}/options".format(custom_field_id=quote(str(custom_field_id), safe=""),), + "url": "/v1/custom_fields/{custom_field_id}/options".format( + custom_field_id=quote(str(custom_field_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) -> CustomFieldOptionResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFieldOptionResponse | ErrorsList | None: if response.status_code == 201: response_201 = CustomFieldOptionResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFieldOptionResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCustomFieldOption, - ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """ [DEPRECATED] Creates a custom field option + """[DEPRECATED] Creates a custom field option [DEPRECATED] Use form field endpoints instead. Creates a new custom field option from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( custom_field_id=custom_field_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( custom_field_id: str, *, client: AuthenticatedClient, body: NewCustomFieldOption, - ) -> CustomFieldOptionResponse | ErrorsList | None: - """ [DEPRECATED] Creates a custom field option + """[DEPRECATED] Creates a custom field option [DEPRECATED] Use form field endpoints instead. Creates a new custom field option from provided data @@ -134,24 +123,22 @@ def sync( Returns: CustomFieldOptionResponse | ErrorsList - """ - + """ return sync_detailed( custom_field_id=custom_field_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( custom_field_id: str, *, client: AuthenticatedClient, body: NewCustomFieldOption, - ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """ [DEPRECATED] Creates a custom field option + """[DEPRECATED] Creates a custom field option [DEPRECATED] Use form field endpoints instead. Creates a new custom field option from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( custom_field_id=custom_field_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( custom_field_id: str, *, client: AuthenticatedClient, body: NewCustomFieldOption, - ) -> CustomFieldOptionResponse | ErrorsList | None: - """ [DEPRECATED] Creates a custom field option + """[DEPRECATED] Creates a custom field option [DEPRECATED] Use form field endpoints instead. Creates a new custom field option from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: CustomFieldOptionResponse | ErrorsList - """ - - - return (await asyncio_detailed( - custom_field_id=custom_field_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + custom_field_id=custom_field_id, + client=client, + body=body, + ) + ).parsed 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 9c656bd4..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/custom_field_options/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/custom_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldOptionResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFieldOptionResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldOptionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFieldOptionResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """ [DEPRECATED] Delete a custom field option + """[DEPRECATED] Delete a custom field option [DEPRECATED] Use form field endpoints instead. Delete a specific Custom Field Option by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> CustomFieldOptionResponse | ErrorsList | None: - """ [DEPRECATED] Delete a custom field option + """[DEPRECATED] Delete a custom field option [DEPRECATED] Use form field endpoints instead. Delete a specific Custom Field Option by id @@ -113,22 +104,20 @@ def sync( Returns: CustomFieldOptionResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """ [DEPRECATED] Delete a custom field option + """[DEPRECATED] Delete a custom field option [DEPRECATED] Use form field endpoints instead. Delete a specific Custom Field Option by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> CustomFieldOptionResponse | ErrorsList | None: - """ [DEPRECATED] Delete a custom field option + """[DEPRECATED] Delete a custom field option [DEPRECATED] Use form field endpoints instead. Delete a specific Custom Field Option by id @@ -174,11 +159,11 @@ async def asyncio( Returns: CustomFieldOptionResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 71501ee7..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/custom_field_options/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/custom_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldOptionResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFieldOptionResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldOptionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFieldOptionResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """ [DEPRECATED] Retrieves a custom field option + """[DEPRECATED] Retrieves a custom field option [DEPRECATED] Use form field endpoints instead. Retrieves a specific custom field option by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> CustomFieldOptionResponse | ErrorsList | None: - """ [DEPRECATED] Retrieves a custom field option + """[DEPRECATED] Retrieves a custom field option [DEPRECATED] Use form field endpoints instead. Retrieves a specific custom field option by id @@ -113,22 +104,20 @@ def sync( Returns: CustomFieldOptionResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """ [DEPRECATED] Retrieves a custom field option + """[DEPRECATED] Retrieves a custom field option [DEPRECATED] Use form field endpoints instead. Retrieves a specific custom field option by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> CustomFieldOptionResponse | ErrorsList | None: - """ [DEPRECATED] Retrieves a custom field option + """[DEPRECATED] Retrieves a custom field option [DEPRECATED] Use form field endpoints instead. Retrieves a specific custom field option by id @@ -174,11 +159,11 @@ async def asyncio( Returns: CustomFieldOptionResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 6b28217c..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 @@ -18,11 +18,7 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -36,27 +32,23 @@ def _get_kwargs( params["filter[color]"] = filtercolor - 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/custom_fields/{custom_field_id}/options".format(custom_field_id=quote(str(custom_field_id), safe=""),), + "url": "/v1/custom_fields/{custom_field_id}/options".format( + custom_field_id=quote(str(custom_field_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldOptionList | None: if response.status_code == 200: response_200 = CustomFieldOptionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -65,7 +57,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFieldOptionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -83,9 +77,8 @@ def sync_detailed( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> Response[CustomFieldOptionList]: - """ [DEPRECATED] List custom field options + """[DEPRECATED] List custom field options [DEPRECATED] Use form field endpoints instead. List custom field options @@ -103,17 +96,15 @@ def sync_detailed( Returns: Response[CustomFieldOptionList] - """ - + """ kwargs = _get_kwargs( custom_field_id=custom_field_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtervalue=filtervalue, -filtercolor=filtercolor, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtervalue=filtervalue, + filtercolor=filtercolor, ) response = client.get_httpx_client().request( @@ -122,6 +113,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( custom_field_id: str, *, @@ -131,9 +123,8 @@ def sync( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> CustomFieldOptionList | None: - """ [DEPRECATED] List custom field options + """[DEPRECATED] List custom field options [DEPRECATED] Use form field endpoints instead. List custom field options @@ -151,20 +142,19 @@ def sync( Returns: CustomFieldOptionList - """ - + """ return sync_detailed( custom_field_id=custom_field_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtervalue=filtervalue, -filtercolor=filtercolor, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtervalue=filtervalue, + filtercolor=filtercolor, ).parsed + async def asyncio_detailed( custom_field_id: str, *, @@ -174,9 +164,8 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> Response[CustomFieldOptionList]: - """ [DEPRECATED] List custom field options + """[DEPRECATED] List custom field options [DEPRECATED] Use form field endpoints instead. List custom field options @@ -194,25 +183,22 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionList] - """ - + """ kwargs = _get_kwargs( custom_field_id=custom_field_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtervalue=filtervalue, -filtercolor=filtercolor, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtervalue=filtervalue, + filtercolor=filtercolor, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( custom_field_id: str, *, @@ -222,9 +208,8 @@ async def asyncio( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> CustomFieldOptionList | None: - """ [DEPRECATED] List custom field options + """[DEPRECATED] List custom field options [DEPRECATED] Use form field endpoints instead. List custom field options @@ -242,16 +227,16 @@ async def asyncio( Returns: CustomFieldOptionList - """ - - - return (await asyncio_detailed( - custom_field_id=custom_field_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtervalue=filtervalue, -filtercolor=filtercolor, - - )).parsed + """ + + return ( + await asyncio_detailed( + custom_field_id=custom_field_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtervalue=filtervalue, + filtercolor=filtercolor, + ) + ).parsed 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 acb2c0a0..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateCustomFieldOption, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/custom_field_options/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/custom_field_options/{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) -> CustomFieldOptionResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFieldOptionResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldOptionResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldOptionResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFieldOptionResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCustomFieldOption, - ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """ [DEPRECATED] Update a custom field option + """[DEPRECATED] Update a custom field option [DEPRECATED] Use form field endpoints instead. Update a specific custom field option by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateCustomFieldOption, - ) -> CustomFieldOptionResponse | ErrorsList | None: - """ [DEPRECATED] Update a custom field option + """[DEPRECATED] Update a custom field option [DEPRECATED] Use form field endpoints instead. Update a specific custom field option by id @@ -127,24 +118,22 @@ def sync( Returns: CustomFieldOptionResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCustomFieldOption, - ) -> Response[CustomFieldOptionResponse | ErrorsList]: - """ [DEPRECATED] Update a custom field option + """[DEPRECATED] Update a custom field option [DEPRECATED] Use form field endpoints instead. Update a specific custom field option by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[CustomFieldOptionResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCustomFieldOption, - ) -> CustomFieldOptionResponse | ErrorsList | None: - """ [DEPRECATED] Update a custom field option + """[DEPRECATED] Update a custom field option [DEPRECATED] Use form field endpoints instead. Update a specific custom field option by id @@ -194,12 +179,12 @@ async def asyncio( Returns: CustomFieldOptionResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/deprecated_custom_fields/__init__.py b/rootly_sdk/api/deprecated_custom_fields/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/deprecated_custom_fields/__init__.py +++ b/rootly_sdk/api/deprecated_custom_fields/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 482ca452..d4ca5660 100644 --- a/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/create_custom_field.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCustomField, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/custom_fields", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> CustomFieldResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFieldResponse | ErrorsList | None: if response.status_code == 201: response_201 = CustomFieldResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCustomField, - ) -> Response[CustomFieldResponse | ErrorsList]: - """ [DEPRECATED] Creates a Custom Field + """[DEPRECATED] Creates a Custom Field [DEPRECATED] Use form field endpoints instead. Creates a new custom field from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCustomField, - ) -> CustomFieldResponse | ErrorsList | None: - """ [DEPRECATED] Creates a Custom Field + """[DEPRECATED] Creates a Custom Field [DEPRECATED] Use form field endpoints instead. Creates a new custom field from provided data @@ -127,22 +114,20 @@ def sync( Returns: CustomFieldResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCustomField, - ) -> Response[CustomFieldResponse | ErrorsList]: - """ [DEPRECATED] Creates a Custom Field + """[DEPRECATED] Creates a Custom Field [DEPRECATED] Use form field endpoints instead. Creates a new custom field from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewCustomField, - ) -> CustomFieldResponse | ErrorsList | None: - """ [DEPRECATED] Creates a Custom Field + """[DEPRECATED] Creates a Custom Field [DEPRECATED] Use form field endpoints instead. Creates a new custom field from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CustomFieldResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed 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 50ad8c96..9fa62894 100644 --- a/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/delete_custom_field.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/custom_fields/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/custom_fields/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CustomFieldResponse | ErrorsList]: - """ [DEPRECATED] Delete a Custom Field + """[DEPRECATED] Delete a Custom Field [DEPRECATED] Use form field endpoints instead. Delete a specific custom field by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> CustomFieldResponse | ErrorsList | None: - """ [DEPRECATED] Delete a Custom Field + """[DEPRECATED] Delete a Custom Field [DEPRECATED] Use form field endpoints instead. Delete a specific custom field by id @@ -113,22 +104,20 @@ def sync( Returns: CustomFieldResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[CustomFieldResponse | ErrorsList]: - """ [DEPRECATED] Delete a Custom Field + """[DEPRECATED] Delete a Custom Field [DEPRECATED] Use form field endpoints instead. Delete a specific custom field by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> CustomFieldResponse | ErrorsList | None: - """ [DEPRECATED] Delete a Custom Field + """[DEPRECATED] Delete a Custom Field [DEPRECATED] Use form field endpoints instead. Delete a specific custom field by id @@ -174,11 +159,11 @@ async def asyncio( Returns: CustomFieldResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 e8ad6044..3ee224fc 100644 --- a/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/get_custom_field.py @@ -16,11 +16,7 @@ def _get_kwargs( id: str, *, include: GetCustomFieldInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,34 +26,30 @@ def _get_kwargs( params["include"] = json_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/custom_fields/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/custom_fields/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldResponse.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: @@ -66,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetCustomFieldInclude | Unset = UNSET, - ) -> Response[CustomFieldResponse | ErrorsList]: - """ [DEPRECATED] Retrieves a Custom Field + """[DEPRECATED] Retrieves a Custom Field Retrieves a specific custom_field by id @@ -96,13 +89,11 @@ def sync_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -111,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetCustomFieldInclude | Unset = UNSET, - ) -> CustomFieldResponse | ErrorsList | None: - """ [DEPRECATED] Retrieves a Custom Field + """[DEPRECATED] Retrieves a Custom Field Retrieves a specific custom_field by id @@ -132,24 +123,22 @@ def sync( Returns: CustomFieldResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetCustomFieldInclude | Unset = UNSET, - ) -> Response[CustomFieldResponse | ErrorsList]: - """ [DEPRECATED] Retrieves a Custom Field + """[DEPRECATED] Retrieves a Custom Field Retrieves a specific custom_field by id @@ -163,29 +152,25 @@ async def asyncio_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetCustomFieldInclude | Unset = UNSET, - ) -> CustomFieldResponse | ErrorsList | None: - """ [DEPRECATED] Retrieves a Custom Field + """[DEPRECATED] Retrieves a Custom Field Retrieves a specific custom_field by id @@ -199,12 +184,12 @@ async def asyncio( Returns: CustomFieldResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed 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 d68db25c..3d059a21 100644 --- a/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py +++ b/rootly_sdk/api/deprecated_custom_fields/list_custom_fields.py @@ -41,11 +41,7 @@ def _get_kwargs( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -113,27 +109,21 @@ def _get_kwargs( params["filter[enabled][not_in]"] = filterenablednot_in - 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/custom_fields", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> CustomFieldList | None: if response.status_code == 200: response_200 = CustomFieldList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -182,9 +172,8 @@ def sync_detailed( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> Response[CustomFieldList]: - """ [DEPRECATED] List Custom Fields + """[DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields @@ -224,39 +213,37 @@ def sync_detailed( Returns: Response[CustomFieldList] - """ - + """ kwargs = _get_kwargs( include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filterlabel=filterlabel, -filterkind=filterkind, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filterlabeleq=filterlabeleq, -filterlabelnot_eq=filterlabelnot_eq, -filterlabelin=filterlabelin, -filterlabelnot_in=filterlabelnot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, - + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filterlabel=filterlabel, + filterkind=filterkind, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filterlabeleq=filterlabeleq, + filterlabelnot_eq=filterlabelnot_eq, + filterlabelin=filterlabelin, + filterlabelnot_in=filterlabelnot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) response = client.get_httpx_client().request( @@ -265,6 +252,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -296,9 +284,8 @@ def sync( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> CustomFieldList | None: - """ [DEPRECATED] List Custom Fields + """[DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields @@ -338,42 +325,41 @@ def sync( Returns: CustomFieldList - """ - + """ return sync_detailed( client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filterlabel=filterlabel, -filterkind=filterkind, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filterlabeleq=filterlabeleq, -filterlabelnot_eq=filterlabelnot_eq, -filterlabelin=filterlabelin, -filterlabelnot_in=filterlabelnot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filterlabel=filterlabel, + filterkind=filterkind, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filterlabeleq=filterlabeleq, + filterlabelnot_eq=filterlabelnot_eq, + filterlabelin=filterlabelin, + filterlabelnot_in=filterlabelnot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -405,9 +391,8 @@ async def asyncio_detailed( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> Response[CustomFieldList]: - """ [DEPRECATED] List Custom Fields + """[DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields @@ -447,47 +432,44 @@ async def asyncio_detailed( Returns: Response[CustomFieldList] - """ - + """ kwargs = _get_kwargs( include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filterlabel=filterlabel, -filterkind=filterkind, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filterlabeleq=filterlabeleq, -filterlabelnot_eq=filterlabelnot_eq, -filterlabelin=filterlabelin, -filterlabelnot_in=filterlabelnot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, - + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filterlabel=filterlabel, + filterkind=filterkind, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filterlabeleq=filterlabeleq, + filterlabelnot_eq=filterlabelnot_eq, + filterlabelin=filterlabelin, + filterlabelnot_in=filterlabelnot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -519,9 +501,8 @@ async def asyncio( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> CustomFieldList | None: - """ [DEPRECATED] List Custom Fields + """[DEPRECATED] List Custom Fields [DEPRECATED] Use form field endpoints instead. List Custom fields @@ -561,38 +542,38 @@ async def asyncio( Returns: CustomFieldList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filterlabel=filterlabel, -filterkind=filterkind, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filterlabeleq=filterlabeleq, -filterlabelnot_eq=filterlabelnot_eq, -filterlabelin=filterlabelin, -filterlabelnot_in=filterlabelnot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filterlabel=filterlabel, + filterkind=filterkind, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filterlabeleq=filterlabeleq, + filterlabelnot_eq=filterlabelnot_eq, + filterlabelin=filterlabelin, + filterlabelnot_in=filterlabelnot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, + ) + ).parsed 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 0ba56758..6c03fcb7 100644 --- a/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py +++ b/rootly_sdk/api/deprecated_custom_fields/update_custom_field.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateCustomField, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/custom_fields/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/custom_fields/{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) -> CustomFieldResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> CustomFieldResponse | ErrorsList | None: if response.status_code == 200: response_200 = CustomFieldResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CustomFieldResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CustomFieldResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateCustomField, - ) -> Response[CustomFieldResponse | ErrorsList]: - """ [DEPRECATED] Update a Custom Field + """[DEPRECATED] Update a Custom Field [DEPRECATED] Use form field endpoints instead. Update a specific custom field by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateCustomField, - ) -> CustomFieldResponse | ErrorsList | None: - """ [DEPRECATED] Update a Custom Field + """[DEPRECATED] Update a Custom Field [DEPRECATED] Use form field endpoints instead. Update a specific custom field by id @@ -127,24 +118,22 @@ def sync( Returns: CustomFieldResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateCustomField, - ) -> Response[CustomFieldResponse | ErrorsList]: - """ [DEPRECATED] Update a Custom Field + """[DEPRECATED] Update a Custom Field [DEPRECATED] Use form field endpoints instead. Update a specific custom field by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[CustomFieldResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateCustomField, - ) -> CustomFieldResponse | ErrorsList | None: - """ [DEPRECATED] Update a Custom Field + """[DEPRECATED] Update a Custom Field [DEPRECATED] Use form field endpoints instead. Update a specific custom field by id @@ -194,12 +179,12 @@ async def asyncio( Returns: CustomFieldResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/deprecated_incident_custom_field_selections/__init__.py b/rootly_sdk/api/deprecated_incident_custom_field_selections/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/deprecated_incident_custom_field_selections/__init__.py +++ b/rootly_sdk/api/deprecated_incident_custom_field_selections/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 06ebac6a..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 @@ -16,50 +16,40 @@ def _get_kwargs( incident_id: str, *, body: NewIncidentCustomFieldSelection, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/custom_field_selections".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/custom_field_selections".format( + incident_id=quote(str(incident_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 | IncidentCustomFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: if response.status_code == 201: response_201 = IncidentCustomFieldSelectionResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentCustomFieldSelection, - ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """ [DEPRECATED] Creates an incident custom field selection + """[DEPRECATED] Creates an incident custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new incident custom field selection from provided data @@ -99,13 +90,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -114,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentCustomFieldSelection, - ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """ [DEPRECATED] Creates an incident custom field selection + """[DEPRECATED] Creates an incident custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new incident custom field selection from provided data @@ -136,24 +125,22 @@ def sync( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentCustomFieldSelection, - ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """ [DEPRECATED] Creates an incident custom field selection + """[DEPRECATED] Creates an incident custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new incident custom field selection from provided data @@ -168,29 +155,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentCustomFieldSelection, - ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """ [DEPRECATED] Creates an incident custom field selection + """[DEPRECATED] Creates an incident custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new incident custom field selection from provided data @@ -205,12 +188,12 @@ async def asyncio( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed 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 0cd1f383..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentCustomFieldSelectionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """ [DEPRECATED] Delete an incident custom field selection + """[DEPRECATED] Delete an incident custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific incident custom field selection by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """ [DEPRECATED] Delete an incident custom field selection + """[DEPRECATED] Delete an incident custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific incident custom field selection by id @@ -115,22 +106,20 @@ def sync( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """ [DEPRECATED] Delete an incident custom field selection + """[DEPRECATED] Delete an incident custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific incident custom field selection by id @@ -144,27 +133,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """ [DEPRECATED] Delete an incident custom field selection + """[DEPRECATED] Delete an incident custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific incident custom field selection by id @@ -178,11 +163,11 @@ async def asyncio( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 dd0ec92c..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentCustomFieldSelectionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """ [DEPRECATED] Retrieves an incident custom field selection + """[DEPRECATED] Retrieves an incident custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific incident custom field selection by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """ [DEPRECATED] Retrieves an incident custom field selection + """[DEPRECATED] Retrieves an incident custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific incident custom field selection by id @@ -115,22 +106,20 @@ def sync( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """ [DEPRECATED] Retrieves an incident custom field selection + """[DEPRECATED] Retrieves an incident custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific incident custom field selection by id @@ -144,27 +133,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """ [DEPRECATED] Retrieves an incident custom field selection + """[DEPRECATED] Retrieves an incident custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific incident custom field selection by id @@ -178,11 +163,11 @@ async def asyncio( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 da27f5c7..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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}/custom_field_selections".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/custom_field_selections".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentCustomFieldSelectionList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentCustomFieldSelectionList | None: if response.status_code == 200: response_200 = IncidentCustomFieldSelectionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentCustomFieldSelectionList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentCustomFieldSelectionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentCustomFieldSelectionList]: - """ [DEPRECATED] List incident custom field selections + """[DEPRECATED] List incident custom field selections [DEPRECATED] Use form field endpoints instead. List incident custom field selections @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[IncidentCustomFieldSelectionList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentCustomFieldSelectionList | None: - """ [DEPRECATED] List incident custom field selections + """[DEPRECATED] List incident custom field selections [DEPRECATED] Use form field endpoints instead. List incident custom field selections @@ -135,18 +128,17 @@ def sync( Returns: IncidentCustomFieldSelectionList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( incident_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentCustomFieldSelectionList]: - """ [DEPRECATED] List incident custom field selections + """[DEPRECATED] List incident custom field selections [DEPRECATED] Use form field endpoints instead. List incident custom field selections @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[IncidentCustomFieldSelectionList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentCustomFieldSelectionList | None: - """ [DEPRECATED] List incident custom field selections + """[DEPRECATED] List incident custom field selections [DEPRECATED] Use form field endpoints instead. List incident custom field selections @@ -214,14 +201,14 @@ async def asyncio( Returns: IncidentCustomFieldSelectionList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 4e4b366f..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentCustomFieldSelection, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_custom_field_selections/{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 | IncidentCustomFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentCustomFieldSelectionResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentCustomFieldSelection, - ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """ [DEPRECATED] Update an incident custom field selection + """[DEPRECATED] Update an incident custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific incident custom field selection by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentCustomFieldSelection, - ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """ [DEPRECATED] Update an incident custom field selection + """[DEPRECATED] Update an incident custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific incident custom field selection by id @@ -129,24 +120,22 @@ def sync( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentCustomFieldSelection, - ) -> Response[ErrorsList | IncidentCustomFieldSelectionResponse]: - """ [DEPRECATED] Update an incident custom field selection + """[DEPRECATED] Update an incident custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific incident custom field selection by id @@ -161,29 +150,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentCustomFieldSelection, - ) -> ErrorsList | IncidentCustomFieldSelectionResponse | None: - """ [DEPRECATED] Update an incident custom field selection + """[DEPRECATED] Update an incident custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific incident custom field selection by id @@ -198,12 +183,12 @@ async def asyncio( Returns: ErrorsList | IncidentCustomFieldSelectionResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/deprecated_workflow_custom_field_selections/__init__.py b/rootly_sdk/api/deprecated_workflow_custom_field_selections/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/deprecated_workflow_custom_field_selections/__init__.py +++ b/rootly_sdk/api/deprecated_workflow_custom_field_selections/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 9075f7fa..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 @@ -16,43 +16,35 @@ def _get_kwargs( workflow_id: str, *, body: NewWorkflowCustomFieldSelection, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/workflows/{workflow_id}/custom_field_selections".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/custom_field_selections".format( + workflow_id=quote(str(workflow_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 | WorkflowCustomFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: if response.status_code == 201: response_201 = WorkflowCustomFieldSelectionResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowCustomFieldSelection, - ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """ [DEPRECATED] Creates a workflow custom field selection + """[DEPRECATED] Creates a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new workflow custom field selection from provided data @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowCustomFieldSelection, - ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """ [DEPRECATED] Creates a workflow custom field selection + """[DEPRECATED] Creates a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new workflow custom field selection from provided data @@ -129,24 +120,22 @@ def sync( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowCustomFieldSelection, - ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """ [DEPRECATED] Creates a workflow custom field selection + """[DEPRECATED] Creates a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new workflow custom field selection from provided data @@ -161,29 +150,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowCustomFieldSelection, - ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """ [DEPRECATED] Creates a workflow custom field selection + """[DEPRECATED] Creates a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Creates a new workflow custom field selection from provided data @@ -198,12 +183,12 @@ async def asyncio( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ) + ).parsed 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 e52d22d9..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflow_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = WorkflowCustomFieldSelectionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """ [DEPRECATED] Delete a workflow custom field selection + """[DEPRECATED] Delete a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific workflow custom field selection by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """ [DEPRECATED] Delete a workflow custom field selection + """[DEPRECATED] Delete a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific workflow custom field selection by id @@ -115,22 +106,20 @@ def sync( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """ [DEPRECATED] Delete a workflow custom field selection + """[DEPRECATED] Delete a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific workflow custom field selection by id @@ -144,27 +133,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """ [DEPRECATED] Delete a workflow custom field selection + """[DEPRECATED] Delete a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Delete a specific workflow custom field selection by id @@ -178,11 +163,11 @@ async def asyncio( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 3d0c44d3..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/workflow_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_custom_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = WorkflowCustomFieldSelectionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """ [DEPRECATED] Retrieves a workflow custom field selection + """[DEPRECATED] Retrieves a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific workflow custom field selection by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """ [DEPRECATED] Retrieves a workflow custom field selection + """[DEPRECATED] Retrieves a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific workflow custom field selection by id @@ -115,22 +106,20 @@ def sync( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """ [DEPRECATED] Retrieves a workflow custom field selection + """[DEPRECATED] Retrieves a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific workflow custom field selection by id @@ -144,27 +133,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """ [DEPRECATED] Retrieves a workflow custom field selection + """[DEPRECATED] Retrieves a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Retrieves a specific workflow custom field selection by id @@ -178,11 +163,11 @@ async def asyncio( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 c176ca23..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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/workflows/{workflow_id}/custom_field_selections".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/custom_field_selections".format( + workflow_id=quote(str(workflow_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowCustomFieldSelectionList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> WorkflowCustomFieldSelectionList | None: if response.status_code == 200: response_200 = WorkflowCustomFieldSelectionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WorkflowCustomFieldSelectionList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[WorkflowCustomFieldSelectionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[WorkflowCustomFieldSelectionList]: - """ [DEPRECATED] List workflow custom field selections + """[DEPRECATED] List workflow custom field selections [DEPRECATED] Use form field endpoints instead. List workflow custom field selections @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[WorkflowCustomFieldSelectionList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> WorkflowCustomFieldSelectionList | None: - """ [DEPRECATED] List workflow custom field selections + """[DEPRECATED] List workflow custom field selections [DEPRECATED] Use form field endpoints instead. List workflow custom field selections @@ -135,18 +128,17 @@ def sync( Returns: WorkflowCustomFieldSelectionList - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( workflow_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[WorkflowCustomFieldSelectionList]: - """ [DEPRECATED] List workflow custom field selections + """[DEPRECATED] List workflow custom field selections [DEPRECATED] Use form field endpoints instead. List workflow custom field selections @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[WorkflowCustomFieldSelectionList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> WorkflowCustomFieldSelectionList | None: - """ [DEPRECATED] List workflow custom field selections + """[DEPRECATED] List workflow custom field selections [DEPRECATED] Use form field endpoints instead. List workflow custom field selections @@ -214,14 +201,14 @@ async def asyncio( Returns: WorkflowCustomFieldSelectionList - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 9121d12e..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateWorkflowCustomFieldSelection, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflow_custom_field_selections/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_custom_field_selections/{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 | WorkflowCustomFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: if response.status_code == 200: response_200 = WorkflowCustomFieldSelectionResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflowCustomFieldSelection, - ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """ [DEPRECATED] Update a workflow custom field selection + """[DEPRECATED] Update a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific workflow custom field selection by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowCustomFieldSelection, - ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """ [DEPRECATED] Update a workflow custom field selection + """[DEPRECATED] Update a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific workflow custom field selection by id @@ -129,24 +120,22 @@ def sync( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowCustomFieldSelection, - ) -> Response[ErrorsList | WorkflowCustomFieldSelectionResponse]: - """ [DEPRECATED] Update a workflow custom field selection + """[DEPRECATED] Update a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific workflow custom field selection by id @@ -161,29 +150,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowCustomFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowCustomFieldSelection, - ) -> ErrorsList | WorkflowCustomFieldSelectionResponse | None: - """ [DEPRECATED] Update a workflow custom field selection + """[DEPRECATED] Update a workflow custom field selection [DEPRECATED] Use form field endpoints instead. Update a specific workflow custom field selection by id @@ -198,12 +183,12 @@ async def asyncio( Returns: ErrorsList | WorkflowCustomFieldSelectionResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/edge_connector_actions/__init__.py b/rootly_sdk/api/edge_connector_actions/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/edge_connector_actions/__init__.py +++ b/rootly_sdk/api/edge_connector_actions/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 0857f020..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 @@ -14,32 +14,25 @@ def _get_kwargs( edge_connector_id: str, *, body: CreateEdgeConnectorActionBody | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/edge_connectors/{edge_connector_id}/actions".format(edge_connector_id=quote(str(edge_connector_id), safe=""),), + "url": "/v1/edge_connectors/{edge_connector_id}/actions".format( + edge_connector_id=quote(str(edge_connector_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) -> Any | None: if response.status_code == 201: return None @@ -67,9 +60,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateEdgeConnectorActionBody | Unset = UNSET, - ) -> Response[Any]: - """ Create edge connector action + """Create edge connector action Args: edge_connector_id (str): @@ -81,13 +73,11 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -102,9 +92,8 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateEdgeConnectorActionBody | Unset = UNSET, - ) -> Response[Any]: - """ Create edge connector action + """Create edge connector action Args: edge_connector_id (str): @@ -116,18 +105,13 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - 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 5ee851ad..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 @@ -13,24 +13,19 @@ def _get_kwargs( edge_connector_id: str, id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format(edge_connector_id=quote(str(edge_connector_id), safe=""),id=quote(str(id), safe=""),), + "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 - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 200: return None @@ -55,9 +50,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete edge connector action + """Delete edge connector action Args: edge_connector_id (str): @@ -69,13 +63,11 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, -id=id, - + id=id, ) response = client.get_httpx_client().request( @@ -90,9 +82,8 @@ async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete edge connector action + """Delete edge connector action Args: edge_connector_id (str): @@ -104,18 +95,13 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, -id=id, - + id=id, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - 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 7a6bb8de..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 @@ -13,24 +13,19 @@ def _get_kwargs( edge_connector_id: str, id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format(edge_connector_id=quote(str(edge_connector_id), safe=""),id=quote(str(id), safe=""),), + "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 - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 200: return None @@ -58,9 +53,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Show edge connector action + """Show edge connector action Args: edge_connector_id (str): @@ -72,13 +66,11 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, -id=id, - + id=id, ) response = client.get_httpx_client().request( @@ -93,9 +85,8 @@ async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Show edge connector action + """Show edge connector action Args: edge_connector_id (str): @@ -107,18 +98,13 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, -id=id, - + id=id, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - 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 ad1634f3..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 @@ -11,24 +11,18 @@ def _get_kwargs( edge_connector_id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/edge_connectors/{edge_connector_id}/actions".format(edge_connector_id=quote(str(edge_connector_id), safe=""),), + "url": "/v1/edge_connectors/{edge_connector_id}/actions".format( + edge_connector_id=quote(str(edge_connector_id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 200: return None @@ -55,9 +49,8 @@ def sync_detailed( edge_connector_id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ List edge connector actions + """List edge connector actions Args: edge_connector_id (str): @@ -68,12 +61,10 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - ) response = client.get_httpx_client().request( @@ -87,9 +78,8 @@ async def asyncio_detailed( edge_connector_id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ List edge connector actions + """List edge connector actions Args: edge_connector_id (str): @@ -100,17 +90,12 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - 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 ea9f2b21..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 @@ -16,32 +16,26 @@ def _get_kwargs( id: str | UUID, *, body: UpdateEdgeConnectorActionBody | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format(edge_connector_id=quote(str(edge_connector_id), safe=""),id=quote(str(id), safe=""),), + "url": "/v1/edge_connectors/{edge_connector_id}/actions/{id}".format( + edge_connector_id=quote(str(edge_connector_id), safe=""), + 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) -> Any | None: if response.status_code == 200: return None @@ -67,9 +61,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEdgeConnectorActionBody | Unset = UNSET, - ) -> Response[Any]: - """ Update edge connector action + """Update edge connector action Args: edge_connector_id (str): @@ -82,14 +75,12 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, -id=id, -body=body, - + id=id, + body=body, ) response = client.get_httpx_client().request( @@ -105,9 +96,8 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateEdgeConnectorActionBody | Unset = UNSET, - ) -> Response[Any]: - """ Update edge connector action + """Update edge connector action Args: edge_connector_id (str): @@ -120,19 +110,14 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( edge_connector_id=edge_connector_id, -id=id, -body=body, - + id=id, + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - diff --git a/rootly_sdk/api/edge_connectors/__init__.py b/rootly_sdk/api/edge_connectors/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/edge_connectors/__init__.py +++ b/rootly_sdk/api/edge_connectors/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/edge_connectors/create_edge_connector.py b/rootly_sdk/api/edge_connectors/create_edge_connector.py index 5b966f4f..4fd4237e 100644 --- a/rootly_sdk/api/edge_connectors/create_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/create_edge_connector.py @@ -12,32 +12,23 @@ def _get_kwargs( *, body: CreateEdgeConnectorBody | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/edge_connectors", } - 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) -> Any | None: if response.status_code == 201: return None @@ -64,9 +55,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: CreateEdgeConnectorBody | Unset = UNSET, - ) -> Response[Any]: - """ Create edge connector + """Create edge connector Args: body (CreateEdgeConnectorBody | Unset): @@ -77,12 +67,10 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -96,9 +84,8 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: CreateEdgeConnectorBody | Unset = UNSET, - ) -> Response[Any]: - """ Create edge connector + """Create edge connector Args: body (CreateEdgeConnectorBody | Unset): @@ -109,17 +96,12 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - diff --git a/rootly_sdk/api/edge_connectors/delete_edge_connector.py b/rootly_sdk/api/edge_connectors/delete_edge_connector.py index 9e530be1..a289f349 100644 --- a/rootly_sdk/api/edge_connectors/delete_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/delete_edge_connector.py @@ -11,24 +11,18 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/edge_connectors/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/edge_connectors/{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 @@ -52,9 +46,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete edge connector + """Delete edge connector Args: id (str): @@ -65,12 +58,10 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -84,9 +75,8 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete edge connector + """Delete edge connector Args: id (str): @@ -97,17 +87,12 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - diff --git a/rootly_sdk/api/edge_connectors/get_edge_connector.py b/rootly_sdk/api/edge_connectors/get_edge_connector.py index 25c22904..ce73bfe0 100644 --- a/rootly_sdk/api/edge_connectors/get_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/get_edge_connector.py @@ -11,24 +11,18 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/edge_connectors/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/edge_connectors/{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 @@ -55,9 +49,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Show edge connector + """Show edge connector Args: id (str): @@ -68,12 +61,10 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -87,9 +78,8 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Show edge connector + """Show edge connector Args: id (str): @@ -100,17 +90,12 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - diff --git a/rootly_sdk/api/edge_connectors/list_edge_connectors.py b/rootly_sdk/api/edge_connectors/list_edge_connectors.py index 058206c6..e24a0844 100644 --- a/rootly_sdk/api/edge_connectors/list_edge_connectors.py +++ b/rootly_sdk/api/edge_connectors/list_edge_connectors.py @@ -14,11 +14,7 @@ def _get_kwargs( per_page: int | Unset = UNSET, status: str | Unset = UNSET, name: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,21 +26,17 @@ def _get_kwargs( params["name"] = name - 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/edge_connectors", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 200: return None @@ -71,9 +63,8 @@ def sync_detailed( per_page: int | Unset = UNSET, status: str | Unset = UNSET, name: str | Unset = UNSET, - ) -> Response[Any]: - """ List edge connectors + """List edge connectors Args: page (int | Unset): @@ -87,15 +78,13 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( page=page, -per_page=per_page, -status=status, -name=name, - + per_page=per_page, + status=status, + name=name, ) response = client.get_httpx_client().request( @@ -112,9 +101,8 @@ async def asyncio_detailed( per_page: int | Unset = UNSET, status: str | Unset = UNSET, name: str | Unset = UNSET, - ) -> Response[Any]: - """ List edge connectors + """List edge connectors Args: page (int | Unset): @@ -128,20 +116,15 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( page=page, -per_page=per_page, -status=status, -name=name, - + per_page=per_page, + status=status, + name=name, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - diff --git a/rootly_sdk/api/edge_connectors/update_edge_connector.py b/rootly_sdk/api/edge_connectors/update_edge_connector.py index 6860a289..df27a0bb 100644 --- a/rootly_sdk/api/edge_connectors/update_edge_connector.py +++ b/rootly_sdk/api/edge_connectors/update_edge_connector.py @@ -14,32 +14,25 @@ def _get_kwargs( id: str, *, body: UpdateEdgeConnectorBody | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "patch", - "url": "/v1/edge_connectors/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/edge_connectors/{id}".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) -> Any | None: if response.status_code == 200: return None @@ -67,9 +60,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEdgeConnectorBody | Unset = UNSET, - ) -> Response[Any]: - """ Update edge connector + """Update edge connector Args: id (str): @@ -81,13 +73,11 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -102,9 +92,8 @@ async def asyncio_detailed( *, client: AuthenticatedClient, body: UpdateEdgeConnectorBody | Unset = UNSET, - ) -> Response[Any]: - """ Update edge connector + """Update edge connector Args: id (str): @@ -116,18 +105,13 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) - diff --git a/rootly_sdk/api/environments/__init__.py b/rootly_sdk/api/environments/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/environments/__init__.py +++ b/rootly_sdk/api/environments/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/environments/bulk_delete_environments.py b/rootly_sdk/api/environments/bulk_delete_environments.py index 8ad388d8..7a889981 100644 --- a/rootly_sdk/api/environments/bulk_delete_environments.py +++ b/rootly_sdk/api/environments/bulk_delete_environments.py @@ -15,59 +15,46 @@ def _get_kwargs( *, body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/environments/bulk_delete", } - if isinstance(body, BulkDestroyEnvironmentsType0): _kwargs["json"] = body.to_dict() else: _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) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: if response.status_code == 200: response_200 = BulkDestroyEnvironmentsResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyEnvironmentsResponse | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -75,8 +62,6 @@ def _parse_response_422(data: object) -> BulkDestroyEnvironmentsResponse | Error raise TypeError() response_422_type_1 = BulkDestroyEnvironmentsResponse.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -89,7 +74,9 @@ def _parse_response_422(data: object) -> BulkDestroyEnvironmentsResponse | Error return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -102,9 +89,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, - ) -> Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList]: - """ Bulk delete Environments + """Bulk delete Environments Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -120,12 +106,10 @@ def sync_detailed( Returns: Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -134,13 +118,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, - ) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Environments + """Bulk delete Environments Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -156,22 +140,20 @@ def sync( Returns: BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, - ) -> Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList]: - """ Bulk delete Environments + """Bulk delete Environments Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -187,27 +169,23 @@ async def asyncio_detailed( Returns: Response[BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: BulkDestroyEnvironmentsType0 | BulkDestroyEnvironmentsType1, - ) -> BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Environments + """Bulk delete Environments Delete environments by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -223,11 +201,11 @@ async def asyncio( Returns: BulkDestroyEnvironmentsResponse | BulkDestroyEnvironmentsResponse | ErrorsList | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/environments/bulk_upsert_environments.py b/rootly_sdk/api/environments/bulk_upsert_environments.py index 7453ece4..32b2cd6c 100644 --- a/rootly_sdk/api/environments/bulk_upsert_environments.py +++ b/rootly_sdk/api/environments/bulk_upsert_environments.py @@ -15,15 +15,9 @@ def _get_kwargs( *, body: BulkUpsertEnvironments, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/environments/bulk_upsert", @@ -31,38 +25,33 @@ def _get_kwargs( _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) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: if response.status_code == 200: response_200 = BulkUpsertEnvironmentsResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertEnvironmentsError | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -70,8 +59,6 @@ def _parse_response_422(data: object) -> BulkUpsertEnvironmentsError | ErrorsLis raise TypeError() response_422_type_1 = BulkUpsertEnvironmentsError.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -84,7 +71,9 @@ def _parse_response_422(data: object) -> BulkUpsertEnvironmentsError | ErrorsLis return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -97,9 +86,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkUpsertEnvironments, - ) -> Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList]: - """ Bulk upsert Environments + """Bulk upsert Environments Create or update multiple environments by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -116,12 +104,10 @@ def sync_detailed( Returns: Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -130,13 +116,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: BulkUpsertEnvironments, - ) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: - """ Bulk upsert Environments + """Bulk upsert Environments Create or update multiple environments by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -153,22 +139,20 @@ def sync( Returns: BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: BulkUpsertEnvironments, - ) -> Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList]: - """ Bulk upsert Environments + """Bulk upsert Environments Create or update multiple environments by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -185,27 +169,23 @@ async def asyncio_detailed( Returns: Response[BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: BulkUpsertEnvironments, - ) -> BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList | None: - """ Bulk upsert Environments + """Bulk upsert Environments Create or update multiple environments by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -222,11 +202,11 @@ async def asyncio( Returns: BulkUpsertEnvironmentsError | ErrorsList | BulkUpsertEnvironmentsResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/environments/create_environment.py b/rootly_sdk/api/environments/create_environment.py index a055ac76..a12a138c 100644 --- a/rootly_sdk/api/environments/create_environment.py +++ b/rootly_sdk/api/environments/create_environment.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewEnvironment, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/environments", @@ -30,34 +24,28 @@ def _get_kwargs( _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) -> EnvironmentResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EnvironmentResponse | ErrorsList | None: if response.status_code == 201: response_201 = EnvironmentResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EnvironmentResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EnvironmentResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEnvironment, - ) -> Response[EnvironmentResponse | ErrorsList]: - """ Creates an environment + """Creates an environment Creates a new environment from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewEnvironment, - ) -> EnvironmentResponse | ErrorsList | None: - """ Creates an environment + """Creates an environment Creates a new environment from provided data @@ -127,22 +114,20 @@ def sync( Returns: EnvironmentResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewEnvironment, - ) -> Response[EnvironmentResponse | ErrorsList]: - """ Creates an environment + """Creates an environment Creates a new environment from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewEnvironment, - ) -> EnvironmentResponse | ErrorsList | None: - """ Creates an environment + """Creates an environment Creates a new environment from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: EnvironmentResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/environments/create_environment_catalog_property.py b/rootly_sdk/api/environments/create_environment_catalog_property.py index 6b420a6d..d3a415ba 100644 --- a/rootly_sdk/api/environments/create_environment_catalog_property.py +++ b/rootly_sdk/api/environments/create_environment_catalog_property.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCatalogProperty, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/environments/properties", @@ -30,34 +24,28 @@ def _get_kwargs( _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: +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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> CatalogPropertyResponse | ErrorsList | None: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -127,22 +114,20 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/environments/delete_environment.py b/rootly_sdk/api/environments/delete_environment.py index 81b32be0..48221a57 100644 --- a/rootly_sdk/api/environments/delete_environment.py +++ b/rootly_sdk/api/environments/delete_environment.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/environments/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/environments/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EnvironmentResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EnvironmentResponse | ErrorsList | None: if response.status_code == 200: response_200 = EnvironmentResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EnvironmentResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EnvironmentResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[EnvironmentResponse | ErrorsList]: - """ Delete an environment + """Delete an environment Delete a specific environment by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> EnvironmentResponse | ErrorsList | None: - """ Delete an environment + """Delete an environment Delete a specific environment by id @@ -114,22 +105,20 @@ def sync( Returns: EnvironmentResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[EnvironmentResponse | ErrorsList]: - """ Delete an environment + """Delete an environment Delete a specific environment by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> EnvironmentResponse | ErrorsList | None: - """ Delete an environment + """Delete an environment Delete a specific environment by id @@ -175,11 +160,11 @@ async def asyncio( Returns: EnvironmentResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/environments/get_environment.py b/rootly_sdk/api/environments/get_environment.py index f2380678..2fb16213 100644 --- a/rootly_sdk/api/environments/get_environment.py +++ b/rootly_sdk/api/environments/get_environment.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/environments/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/environments/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EnvironmentResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EnvironmentResponse | ErrorsList | None: if response.status_code == 200: response_200 = EnvironmentResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EnvironmentResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EnvironmentResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[EnvironmentResponse | ErrorsList]: - """ Retrieves an environment + """Retrieves an environment Retrieves a specific environment by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> EnvironmentResponse | ErrorsList | None: - """ Retrieves an environment + """Retrieves an environment Retrieves a specific environment by id @@ -114,22 +105,20 @@ def sync( Returns: EnvironmentResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[EnvironmentResponse | ErrorsList]: - """ Retrieves an environment + """Retrieves an environment Retrieves a specific environment by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> EnvironmentResponse | ErrorsList | None: - """ Retrieves an environment + """Retrieves an environment Retrieves a specific environment by id @@ -175,11 +160,11 @@ async def asyncio( Returns: EnvironmentResponse | ErrorsList - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/environments/list_environment_catalog_properties.py b/rootly_sdk/api/environments/list_environment_catalog_properties.py index ea219c9c..cb526165 100644 --- a/rootly_sdk/api/environments/list_environment_catalog_properties.py +++ b/rootly_sdk/api/environments/list_environment_catalog_properties.py @@ -28,11 +28,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -66,27 +62,21 @@ def _get_kwargs( 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: @@ -118,9 +108,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Environment Catalog Properties @@ -143,22 +132,20 @@ def sync_detailed( 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, - + 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( @@ -167,6 +154,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -181,9 +169,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Environment Catalog Properties @@ -206,25 +193,24 @@ def sync( 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, - + 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, @@ -239,9 +225,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Environment Catalog Properties @@ -264,30 +249,27 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -302,9 +284,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Environment Catalog Properties @@ -327,21 +308,21 @@ async def asyncio( 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 + """ + + 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 3aa67e79..20855cd6 100644 --- a/rootly_sdk/api/environments/list_environments.py +++ b/rootly_sdk/api/environments/list_environments.py @@ -35,11 +35,7 @@ def _get_kwargs( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -91,27 +87,21 @@ def _get_kwargs( 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/environments", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EnvironmentList | None: if response.status_code == 200: response_200 = EnvironmentList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -156,9 +146,8 @@ def sync_detailed( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[EnvironmentList]: - """ List environments + """List environments List environments @@ -194,35 +183,33 @@ def sync_detailed( Returns: Response[EnvironmentList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -231,6 +218,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -258,9 +246,8 @@ def sync( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> EnvironmentList | None: - """ List environments + """List environments List environments @@ -296,38 +283,37 @@ def sync( Returns: EnvironmentList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -355,9 +341,8 @@ async def asyncio_detailed( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[EnvironmentList]: - """ List environments + """List environments List environments @@ -393,43 +378,40 @@ async def asyncio_detailed( Returns: Response[EnvironmentList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -457,9 +439,8 @@ async def asyncio( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> EnvironmentList | None: - """ List environments + """List environments List environments @@ -495,34 +476,34 @@ async def asyncio( Returns: EnvironmentList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/environments/update_environment.py b/rootly_sdk/api/environments/update_environment.py index c34ccb7c..6e9348d0 100644 --- a/rootly_sdk/api/environments/update_environment.py +++ b/rootly_sdk/api/environments/update_environment.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateEnvironment, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/environments/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/environments/{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) -> EnvironmentResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EnvironmentResponse | ErrorsList | None: if response.status_code == 200: response_200 = EnvironmentResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EnvironmentResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EnvironmentResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEnvironment, - ) -> Response[EnvironmentResponse | ErrorsList]: - """ Update an environment + """Update an environment Update a specific environment by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, - ) -> EnvironmentResponse | ErrorsList | None: - """ Update an environment + """Update an environment Update a specific environment by id @@ -128,24 +119,22 @@ def sync( Returns: EnvironmentResponse | ErrorsList - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, - ) -> Response[EnvironmentResponse | ErrorsList]: - """ Update an environment + """Update an environment Update a specific environment by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[EnvironmentResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateEnvironment, - ) -> EnvironmentResponse | ErrorsList | None: - """ Update an environment + """Update an environment Update a specific environment by id @@ -195,12 +180,12 @@ async def asyncio( Returns: EnvironmentResponse | ErrorsList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_levels/__init__.py b/rootly_sdk/api/escalation_levels/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/escalation_levels/__init__.py +++ b/rootly_sdk/api/escalation_levels/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/escalation_levels/delete_escalation_level.py b/rootly_sdk/api/escalation_levels/delete_escalation_level.py index 9d6b518d..957eb67f 100644 --- a/rootly_sdk/api/escalation_levels/delete_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/delete_escalation_level.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/escalation_levels/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/escalation_levels/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyLevelResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 200: response_200 = EscalationPolicyLevelResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Delete an escalation level + """Delete an escalation level Delete a specific escalation level by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Delete an escalation level + """Delete an escalation level Delete a specific escalation level by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Delete an escalation level + """Delete an escalation level Delete a specific escalation level by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Delete an escalation level + """Delete an escalation level Delete a specific escalation level by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_levels/get_escalation_level.py b/rootly_sdk/api/escalation_levels/get_escalation_level.py index ff0c8732..b8da372a 100644 --- a/rootly_sdk/api/escalation_levels/get_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/get_escalation_level.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/escalation_levels/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/escalation_levels/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyLevelResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 200: response_200 = EscalationPolicyLevelResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Retrieves an escalation level + """Retrieves an escalation level Retrieves a specific escalation level by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Retrieves an escalation level + """Retrieves an escalation level Retrieves a specific escalation level by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Retrieves an escalation level + """Retrieves an escalation level Retrieves a specific escalation level by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Retrieves an escalation level + """Retrieves an escalation level Retrieves a specific escalation level by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_levels/update_escalation_level.py b/rootly_sdk/api/escalation_levels/update_escalation_level.py index a6b541fa..880d0415 100644 --- a/rootly_sdk/api/escalation_levels/update_escalation_level.py +++ b/rootly_sdk/api/escalation_levels/update_escalation_level.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateEscalationPolicyLevel, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/escalation_levels/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/escalation_levels/{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 | EscalationPolicyLevelResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 200: response_200 = EscalationPolicyLevelResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEscalationPolicyLevel, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Update an escalation level + """Update an escalation level Update a specific escalation level by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyLevel, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Update an escalation level + """Update an escalation level Update a specific escalation level by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyLevel, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Update an escalation level + """Update an escalation level Update a specific escalation level by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyLevel, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Update an escalation level + """Update an escalation level Update a specific escalation level by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_levels_path/__init__.py b/rootly_sdk/api/escalation_levels_path/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/escalation_levels_path/__init__.py +++ b/rootly_sdk/api/escalation_levels_path/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 2a5e8c97..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 @@ -16,50 +16,40 @@ def _get_kwargs( escalation_policy_path_id: str, *, body: NewEscalationPolicyLevel, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/escalation_paths/{escalation_policy_path_id}/escalation_levels".format(escalation_policy_path_id=quote(str(escalation_policy_path_id), safe=""),), + "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() - headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyLevelResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 201: response_201 = EscalationPolicyLevelResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Creates an escalation level for an Escalation Path + """Creates an escalation level for an Escalation Path Creates a new escalation level from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( escalation_policy_path_id=escalation_policy_path_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( escalation_policy_path_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Creates an escalation level for an Escalation Path + """Creates an escalation level for an Escalation Path Creates a new escalation level from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - + """ return sync_detailed( escalation_policy_path_id=escalation_policy_path_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( escalation_policy_path_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Creates an escalation level for an Escalation Path + """Creates an escalation level for an Escalation Path Creates a new escalation level from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( escalation_policy_path_id=escalation_policy_path_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( escalation_policy_path_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Creates an escalation level for an Escalation Path + """Creates an escalation level for an Escalation Path Creates a new escalation level from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - - - return (await asyncio_detailed( - escalation_policy_path_id=escalation_policy_path_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + escalation_policy_path_id=escalation_policy_path_id, + client=client, + body=body, + ) + ).parsed 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 3795fa16..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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/escalation_paths/{escalation_policy_path_id}/escalation_levels".format(escalation_policy_path_id=quote(str(escalation_policy_path_id), safe=""),), + "url": "/v1/escalation_paths/{escalation_policy_path_id}/escalation_levels".format( + escalation_policy_path_id=quote(str(escalation_policy_path_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EscalationPolicyLevelList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EscalationPolicyLevelList | None: if response.status_code == 200: response_200 = EscalationPolicyLevelList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EscalationPolicyLevelList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EscalationPolicyLevelList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[EscalationPolicyLevelList]: - """ List escalation levels for an Escalation Path + """List escalation levels for an Escalation Path List escalation levels @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[EscalationPolicyLevelList] - """ - + """ kwargs = _get_kwargs( escalation_policy_path_id=escalation_policy_path_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( escalation_policy_path_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> EscalationPolicyLevelList | None: - """ List escalation levels for an Escalation Path + """List escalation levels for an Escalation Path List escalation levels @@ -135,18 +128,17 @@ def sync( Returns: EscalationPolicyLevelList - """ - + """ return sync_detailed( escalation_policy_path_id=escalation_policy_path_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( escalation_policy_path_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[EscalationPolicyLevelList]: - """ List escalation levels for an Escalation Path + """List escalation levels for an Escalation Path List escalation levels @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[EscalationPolicyLevelList] - """ - + """ kwargs = _get_kwargs( escalation_policy_path_id=escalation_policy_path_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( escalation_policy_path_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> EscalationPolicyLevelList | None: - """ List escalation levels for an Escalation Path + """List escalation levels for an Escalation Path List escalation levels @@ -214,14 +201,14 @@ async def asyncio( Returns: EscalationPolicyLevelList - """ - - - return (await asyncio_detailed( - escalation_policy_path_id=escalation_policy_path_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + escalation_policy_path_id=escalation_policy_path_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_levels_policies/__init__.py b/rootly_sdk/api/escalation_levels_policies/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/escalation_levels_policies/__init__.py +++ b/rootly_sdk/api/escalation_levels_policies/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 51335743..4132bf34 100644 --- a/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py +++ b/rootly_sdk/api/escalation_levels_policies/create_escalation_level.py @@ -16,50 +16,40 @@ def _get_kwargs( escalation_policy_id: str, *, body: NewEscalationPolicyLevel, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_levels".format(escalation_policy_id=quote(str(escalation_policy_id), safe=""),), + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_levels".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 | EscalationPolicyLevelResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyLevelResponse | None: if response.status_code == 201: response_201 = EscalationPolicyLevelResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyLevelResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyLevelResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Creates an escalation level for an Escalation Policy + """Creates an escalation level for an Escalation Policy Creates a new escalation level from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( escalation_policy_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Creates an escalation level for an Escalation Policy + """Creates an escalation level for an Escalation Policy Creates a new escalation level from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - + """ return sync_detailed( escalation_policy_id=escalation_policy_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( escalation_policy_id: str, *, client: AuthenticatedClient, body: NewEscalationPolicyLevel, - ) -> Response[ErrorsList | EscalationPolicyLevelResponse]: - """ Creates an escalation level for an Escalation Policy + """Creates an escalation level for an Escalation Policy Creates a new escalation level from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyLevelResponse] - """ - + """ kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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: NewEscalationPolicyLevel, - ) -> ErrorsList | EscalationPolicyLevelResponse | None: - """ Creates an escalation level for an Escalation Policy + """Creates an escalation level for an Escalation Policy Creates a new escalation level from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyLevelResponse - """ - - - return (await asyncio_detailed( - escalation_policy_id=escalation_policy_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + escalation_policy_id=escalation_policy_id, + client=client, + body=body, + ) + ).parsed 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 7704c3a1..b6baf965 100644 --- a/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py +++ b/rootly_sdk/api/escalation_levels_policies/list_escalation_levels.py @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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/escalation_policies/{escalation_policy_id}/escalation_levels".format(escalation_policy_id=quote(str(escalation_policy_id), safe=""),), + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_levels".format( + escalation_policy_id=quote(str(escalation_policy_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EscalationPolicyLevelList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EscalationPolicyLevelList | None: if response.status_code == 200: response_200 = EscalationPolicyLevelList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EscalationPolicyLevelList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EscalationPolicyLevelList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[EscalationPolicyLevelList]: - """ List escalation levels for an Escalation Policy + """List escalation levels for an Escalation Policy List escalation levels @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[EscalationPolicyLevelList] - """ - + """ kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( escalation_policy_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> EscalationPolicyLevelList | None: - """ List escalation levels for an Escalation Policy + """List escalation levels for an Escalation Policy List escalation levels @@ -135,18 +128,17 @@ def sync( Returns: EscalationPolicyLevelList - """ - + """ return sync_detailed( escalation_policy_id=escalation_policy_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( escalation_policy_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[EscalationPolicyLevelList]: - """ List escalation levels for an Escalation Policy + """List escalation levels for an Escalation Policy List escalation levels @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[EscalationPolicyLevelList] - """ - + """ kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( escalation_policy_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> EscalationPolicyLevelList | None: - """ List escalation levels for an Escalation Policy + """List escalation levels for an Escalation Policy List escalation levels @@ -214,14 +201,14 @@ async def asyncio( Returns: EscalationPolicyLevelList - """ - - - return (await asyncio_detailed( - escalation_policy_id=escalation_policy_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + escalation_policy_id=escalation_policy_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_paths/__init__.py b/rootly_sdk/api/escalation_paths/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/escalation_paths/__init__.py +++ b/rootly_sdk/api/escalation_paths/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/escalation_paths/create_escalation_path.py b/rootly_sdk/api/escalation_paths/create_escalation_path.py index ad603591..169f479f 100644 --- a/rootly_sdk/api/escalation_paths/create_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/create_escalation_path.py @@ -16,50 +16,40 @@ 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=""),), + "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: +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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyPathResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyPathResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicyPath, - ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """ Creates an escalation path + """Creates an escalation path Creates a new escalation path from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ - + """ kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( 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 an escalation path Creates a new escalation path from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | EscalationPolicyPathResponse - """ - + """ return sync_detailed( escalation_policy_id=escalation_policy_id, -client=client, -body=body, - + 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 an escalation path Creates a new escalation path from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ - + """ kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 an escalation path Creates a new escalation path from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyPathResponse - """ - - - return (await asyncio_detailed( - escalation_policy_id=escalation_policy_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + escalation_policy_id=escalation_policy_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_paths/delete_escalation_path.py b/rootly_sdk/api/escalation_paths/delete_escalation_path.py index d184347e..8162cca8 100644 --- a/rootly_sdk/api/escalation_paths/delete_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/delete_escalation_path.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/escalation_paths/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/escalation_paths/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyPathResponse | None: +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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyPathResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyPathResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """ Delete an escalation path + """Delete an escalation path Delete a specific escalation path by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | EscalationPolicyPathResponse | None: - """ Delete an escalation path + """Delete an escalation path Delete a specific escalation path by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | EscalationPolicyPathResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """ Delete an escalation path + """Delete an escalation path Delete a specific escalation path by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | EscalationPolicyPathResponse | None: - """ Delete an escalation path + """Delete an escalation path Delete a specific escalation path by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyPathResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_paths/get_escalation_path.py b/rootly_sdk/api/escalation_paths/get_escalation_path.py index 6868f03a..1735ff2f 100644 --- a/rootly_sdk/api/escalation_paths/get_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/get_escalation_path.py @@ -16,11 +16,7 @@ def _get_kwargs( id: str, *, include: GetEscalationPathInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,34 +26,30 @@ def _get_kwargs( params["include"] = json_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/escalation_paths/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/escalation_paths/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyPathResponse | None: +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: @@ -66,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyPathResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyPathResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetEscalationPathInclude | Unset = UNSET, - ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """ Retrieves an escalation path + """Retrieves an escalation path Retrieves a specific escalation path by id @@ -96,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -111,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetEscalationPathInclude | Unset = UNSET, - ) -> ErrorsList | EscalationPolicyPathResponse | None: - """ Retrieves an escalation path + """Retrieves an escalation path Retrieves a specific escalation path by id @@ -132,24 +123,22 @@ def sync( Returns: ErrorsList | EscalationPolicyPathResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetEscalationPathInclude | Unset = UNSET, - ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """ Retrieves an escalation path + """Retrieves an escalation path Retrieves a specific escalation path by id @@ -163,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetEscalationPathInclude | Unset = UNSET, - ) -> ErrorsList | EscalationPolicyPathResponse | None: - """ Retrieves an escalation path + """Retrieves an escalation path Retrieves a specific escalation path by id @@ -199,12 +184,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyPathResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_paths/list_escalation_paths.py b/rootly_sdk/api/escalation_paths/list_escalation_paths.py index 653a486e..43a4fcd8 100644 --- a/rootly_sdk/api/escalation_paths/list_escalation_paths.py +++ b/rootly_sdk/api/escalation_paths/list_escalation_paths.py @@ -21,11 +21,7 @@ def _get_kwargs( filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -45,27 +41,25 @@ def _get_kwargs( 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/escalation_policies/{escalation_policy_id}/escalation_paths".format(escalation_policy_id=quote(str(escalation_policy_id), safe=""),), + "url": "/v1/escalation_policies/{escalation_policy_id}/escalation_paths".format( + escalation_policy_id=quote(str(escalation_policy_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EscalationPolicyPathList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> EscalationPolicyPathList | None: if response.status_code == 200: response_200 = EscalationPolicyPathList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -74,7 +68,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EscalationPolicyPathList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EscalationPolicyPathList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -91,9 +87,8 @@ def sync_detailed( filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[EscalationPolicyPathList]: - """ List escalation paths + """List escalation paths List escalation paths @@ -110,16 +105,14 @@ def sync_detailed( Returns: Response[EscalationPolicyPathList] - """ - + """ kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, -include=include, -filterpath_type=filterpath_type, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + filterpath_type=filterpath_type, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -128,6 +121,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( escalation_policy_id: str, *, @@ -136,9 +130,8 @@ def sync( filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> EscalationPolicyPathList | None: - """ List escalation paths + """List escalation paths List escalation paths @@ -155,19 +148,18 @@ def sync( Returns: EscalationPolicyPathList - """ - + """ return sync_detailed( escalation_policy_id=escalation_policy_id, -client=client, -include=include, -filterpath_type=filterpath_type, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + filterpath_type=filterpath_type, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( escalation_policy_id: str, *, @@ -176,9 +168,8 @@ async def asyncio_detailed( filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[EscalationPolicyPathList]: - """ List escalation paths + """List escalation paths List escalation paths @@ -195,24 +186,21 @@ async def asyncio_detailed( Returns: Response[EscalationPolicyPathList] - """ - + """ kwargs = _get_kwargs( escalation_policy_id=escalation_policy_id, -include=include, -filterpath_type=filterpath_type, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + filterpath_type=filterpath_type, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( escalation_policy_id: str, *, @@ -221,9 +209,8 @@ async def asyncio( filterpath_type: ListEscalationPathsFilterpathType | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> EscalationPolicyPathList | None: - """ List escalation paths + """List escalation paths List escalation paths @@ -240,15 +227,15 @@ async def asyncio( Returns: EscalationPolicyPathList - """ - - - return (await asyncio_detailed( - escalation_policy_id=escalation_policy_id, -client=client, -include=include, -filterpath_type=filterpath_type, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + escalation_policy_id=escalation_policy_id, + client=client, + include=include, + filterpath_type=filterpath_type, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_paths/update_escalation_path.py b/rootly_sdk/api/escalation_paths/update_escalation_path.py index fa218ee5..ccbf345f 100644 --- a/rootly_sdk/api/escalation_paths/update_escalation_path.py +++ b/rootly_sdk/api/escalation_paths/update_escalation_path.py @@ -16,43 +16,35 @@ 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=""),), + "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: +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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyPathResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyPathResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEscalationPolicyPath, - ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """ Update an escalation path + """Update an escalation path Update a specific escalation path by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyPath, - ) -> ErrorsList | EscalationPolicyPathResponse | None: - """ Update an escalation path + """Update an escalation path Update a specific escalation path by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | EscalationPolicyPathResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicyPath, - ) -> Response[ErrorsList | EscalationPolicyPathResponse]: - """ Update an escalation path + """Update an escalation path Update a specific escalation path by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyPathResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 an escalation path Update a specific escalation path by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyPathResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_policies/__init__.py b/rootly_sdk/api/escalation_policies/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/escalation_policies/__init__.py +++ b/rootly_sdk/api/escalation_policies/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/escalation_policies/create_escalation_policy.py b/rootly_sdk/api/escalation_policies/create_escalation_policy.py index b2648b67..714b4503 100644 --- a/rootly_sdk/api/escalation_policies/create_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/create_escalation_policy.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewEscalationPolicy, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/escalation_policies", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | EscalationPolicyResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyResponse | None: if response.status_code == 201: response_201 = EscalationPolicyResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicy, - ) -> Response[ErrorsList | EscalationPolicyResponse]: - """ Creates an escalation policy + """Creates an escalation policy Creates a new escalation policy from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewEscalationPolicy, - ) -> ErrorsList | EscalationPolicyResponse | None: - """ Creates an escalation policy + """Creates an escalation policy Creates a new escalation policy from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | EscalationPolicyResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewEscalationPolicy, - ) -> Response[ErrorsList | EscalationPolicyResponse]: - """ Creates an escalation policy + """Creates an escalation policy Creates a new escalation policy from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewEscalationPolicy, - ) -> ErrorsList | EscalationPolicyResponse | None: - """ Creates an escalation policy + """Creates an escalation policy Creates a new escalation policy from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_policies/delete_escalation_policy.py b/rootly_sdk/api/escalation_policies/delete_escalation_policy.py index cb378563..2c40b934 100644 --- a/rootly_sdk/api/escalation_policies/delete_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/delete_escalation_policy.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/escalation_policies/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/escalation_policies/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyResponse | None: if response.status_code == 200: response_200 = EscalationPolicyResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | EscalationPolicyResponse]: - """ Delete an escalation policy + """Delete an escalation policy Delete a specific escalation policy by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | EscalationPolicyResponse | None: - """ Delete an escalation policy + """Delete an escalation policy Delete a specific escalation policy by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | EscalationPolicyResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | EscalationPolicyResponse]: - """ Delete an escalation policy + """Delete an escalation policy Delete a specific escalation policy by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | EscalationPolicyResponse | None: - """ Delete an escalation policy + """Delete an escalation policy Delete a specific escalation policy by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_policies/get_escalation_policy.py b/rootly_sdk/api/escalation_policies/get_escalation_policy.py index 96cd17f6..e17a0ca0 100644 --- a/rootly_sdk/api/escalation_policies/get_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/get_escalation_policy.py @@ -16,11 +16,7 @@ def _get_kwargs( id: str, *, include: GetEscalationPolicyInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,34 +26,30 @@ def _get_kwargs( params["include"] = json_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/escalation_policies/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/escalation_policies/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | EscalationPolicyResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyResponse | None: if response.status_code == 200: response_200 = EscalationPolicyResponse.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: @@ -66,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetEscalationPolicyInclude | Unset = UNSET, - ) -> Response[ErrorsList | EscalationPolicyResponse]: - """ Retrieves an escalation policy + """Retrieves an escalation policy Retrieves a specific escalation policy by id @@ -96,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -111,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetEscalationPolicyInclude | Unset = UNSET, - ) -> ErrorsList | EscalationPolicyResponse | None: - """ Retrieves an escalation policy + """Retrieves an escalation policy Retrieves a specific escalation policy by id @@ -132,24 +123,22 @@ def sync( Returns: ErrorsList | EscalationPolicyResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetEscalationPolicyInclude | Unset = UNSET, - ) -> Response[ErrorsList | EscalationPolicyResponse]: - """ Retrieves an escalation policy + """Retrieves an escalation policy Retrieves a specific escalation policy by id @@ -163,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetEscalationPolicyInclude | Unset = UNSET, - ) -> ErrorsList | EscalationPolicyResponse | None: - """ Retrieves an escalation policy + """Retrieves an escalation policy Retrieves a specific escalation policy by id @@ -199,12 +184,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_policies/list_escalation_policies.py b/rootly_sdk/api/escalation_policies/list_escalation_policies.py index 4cd13ec4..28e01db1 100644 --- a/rootly_sdk/api/escalation_policies/list_escalation_policies.py +++ b/rootly_sdk/api/escalation_policies/list_escalation_policies.py @@ -32,11 +32,7 @@ def _get_kwargs( filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -80,27 +76,21 @@ def _get_kwargs( 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/escalation_policies", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> EscalationPolicyList | None: if response.status_code == 200: response_200 = EscalationPolicyList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -109,7 +99,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[EscalationPolicyList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[EscalationPolicyList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -139,9 +131,8 @@ def sync_detailed( filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[EscalationPolicyList]: - """ List escalation policies + """List escalation policies List escalation policies @@ -171,29 +162,27 @@ def sync_detailed( Returns: Response[EscalationPolicyList] - """ - + """ kwargs = _get_kwargs( include=include, -filtersearch=filtersearch, -filtername=filtername, -filterteam_ids=filterteam_ids, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterteam_idseq=filterteam_idseq, -filterteam_idsnot_eq=filterteam_idsnot_eq, -filterteam_idsin=filterteam_idsin, -filterteam_idsnot_in=filterteam_idsnot_in, -pagenumber=pagenumber, -pagesize=pagesize, - + filtersearch=filtersearch, + filtername=filtername, + filterteam_ids=filterteam_ids, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -202,6 +191,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -223,9 +213,8 @@ def sync( filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> EscalationPolicyList | None: - """ List escalation policies + """List escalation policies List escalation policies @@ -255,32 +244,31 @@ def sync( Returns: EscalationPolicyList - """ - + """ return sync_detailed( client=client, -include=include, -filtersearch=filtersearch, -filtername=filtername, -filterteam_ids=filterteam_ids, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterteam_idseq=filterteam_idseq, -filterteam_idsnot_eq=filterteam_idsnot_eq, -filterteam_idsin=filterteam_idsin, -filterteam_idsnot_in=filterteam_idsnot_in, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + filtersearch=filtersearch, + filtername=filtername, + filterteam_ids=filterteam_ids, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -302,9 +290,8 @@ async def asyncio_detailed( filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[EscalationPolicyList]: - """ List escalation policies + """List escalation policies List escalation policies @@ -334,37 +321,34 @@ async def asyncio_detailed( Returns: Response[EscalationPolicyList] - """ - + """ kwargs = _get_kwargs( include=include, -filtersearch=filtersearch, -filtername=filtername, -filterteam_ids=filterteam_ids, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterteam_idseq=filterteam_idseq, -filterteam_idsnot_eq=filterteam_idsnot_eq, -filterteam_idsin=filterteam_idsin, -filterteam_idsnot_in=filterteam_idsnot_in, -pagenumber=pagenumber, -pagesize=pagesize, - + filtersearch=filtersearch, + filtername=filtername, + filterteam_ids=filterteam_ids, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -386,9 +370,8 @@ async def asyncio( filterteam_idsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> EscalationPolicyList | None: - """ List escalation policies + """List escalation policies List escalation policies @@ -418,28 +401,28 @@ async def asyncio( Returns: EscalationPolicyList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -filtersearch=filtersearch, -filtername=filtername, -filterteam_ids=filterteam_ids, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterteam_idseq=filterteam_idseq, -filterteam_idsnot_eq=filterteam_idsnot_eq, -filterteam_idsin=filterteam_idsin, -filterteam_idsnot_in=filterteam_idsnot_in, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + filtersearch=filtersearch, + filtername=filtername, + filterteam_ids=filterteam_ids, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/escalation_policies/update_escalation_policy.py b/rootly_sdk/api/escalation_policies/update_escalation_policy.py index 3396f93f..d779d41b 100644 --- a/rootly_sdk/api/escalation_policies/update_escalation_policy.py +++ b/rootly_sdk/api/escalation_policies/update_escalation_policy.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateEscalationPolicy, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/escalation_policies/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/escalation_policies/{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 | EscalationPolicyResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | EscalationPolicyResponse | None: if response.status_code == 200: response_200 = EscalationPolicyResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | EscalationPolicyResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | EscalationPolicyResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateEscalationPolicy, - ) -> Response[ErrorsList | EscalationPolicyResponse]: - """ Update an escalation policy + """Update an escalation policy Update a specific escalation policy by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicy, - ) -> ErrorsList | EscalationPolicyResponse | None: - """ Update an escalation policy + """Update an escalation policy Update a specific escalation policy by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | EscalationPolicyResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicy, - ) -> Response[ErrorsList | EscalationPolicyResponse]: - """ Update an escalation policy + """Update an escalation policy Update a specific escalation policy by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | EscalationPolicyResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateEscalationPolicy, - ) -> ErrorsList | EscalationPolicyResponse | None: - """ Update an escalation policy + """Update an escalation policy Update a specific escalation policy by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | EscalationPolicyResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/form_field_options/__init__.py b/rootly_sdk/api/form_field_options/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/form_field_options/__init__.py +++ b/rootly_sdk/api/form_field_options/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 3ec080b6..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 @@ -16,50 +16,40 @@ def _get_kwargs( form_field_id: str, *, body: NewFormFieldOption, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_fields/{form_field_id}/options".format(form_field_id=quote(str(form_field_id), safe=""),), + "url": "/v1/form_fields/{form_field_id}/options".format( + form_field_id=quote(str(form_field_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 | FormFieldOptionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldOptionResponse | None: if response.status_code == 201: response_201 = FormFieldOptionResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldOptionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldOptionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormFieldOption, - ) -> Response[ErrorsList | FormFieldOptionResponse]: - """ Creates FormField Options + """Creates FormField Options Creates a new form_field_option from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldOption, - ) -> ErrorsList | FormFieldOptionResponse | None: - """ Creates FormField Options + """Creates FormField Options Creates a new form_field_option from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | FormFieldOptionResponse - """ - + """ return sync_detailed( form_field_id=form_field_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldOption, - ) -> Response[ErrorsList | FormFieldOptionResponse]: - """ Creates FormField Options + """Creates FormField Options Creates a new form_field_option from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldOption, - ) -> ErrorsList | FormFieldOptionResponse | None: - """ Creates FormField Options + """Creates FormField Options Creates a new form_field_option from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | FormFieldOptionResponse - """ - - - return (await asyncio_detailed( - form_field_id=form_field_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_field_id=form_field_id, + client=client, + body=body, + ) + ).parsed 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 44d1ea06..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_field_options/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldOptionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldOptionResponse | None: if response.status_code == 200: response_200 = FormFieldOptionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldOptionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldOptionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldOptionResponse]: - """ Delete FormField Options + """Delete FormField Options Delete a specific form_field_option by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldOptionResponse | None: - """ Delete FormField Options + """Delete FormField Options Delete a specific form_field_option by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormFieldOptionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldOptionResponse]: - """ Delete FormField Options + """Delete FormField Options Delete a specific form_field_option by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldOptionResponse | None: - """ Delete FormField Options + """Delete FormField Options Delete a specific form_field_option by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormFieldOptionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 067eef00..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_field_options/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_options/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldOptionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldOptionResponse | None: if response.status_code == 200: response_200 = FormFieldOptionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldOptionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldOptionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldOptionResponse]: - """ Retrieves FormField Options + """Retrieves FormField Options Retrieves a specific form_field_option by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldOptionResponse | None: - """ Retrieves FormField Options + """Retrieves FormField Options Retrieves a specific form_field_option by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormFieldOptionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldOptionResponse]: - """ Retrieves FormField Options + """Retrieves FormField Options Retrieves a specific form_field_option by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldOptionResponse | None: - """ Retrieves FormField Options + """Retrieves FormField Options Retrieves a specific form_field_option by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormFieldOptionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 b47d4564..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 @@ -18,11 +18,7 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -36,27 +32,23 @@ def _get_kwargs( params["filter[color]"] = filtercolor - 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/form_fields/{form_field_id}/options".format(form_field_id=quote(str(form_field_id), safe=""),), + "url": "/v1/form_fields/{form_field_id}/options".format( + form_field_id=quote(str(form_field_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldOptionList | None: if response.status_code == 200: response_200 = FormFieldOptionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -83,9 +75,8 @@ def sync_detailed( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> Response[FormFieldOptionList]: - """ List FormField Options + """List FormField Options List form_field_options @@ -103,17 +94,15 @@ def sync_detailed( Returns: Response[FormFieldOptionList] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtervalue=filtervalue, -filtercolor=filtercolor, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtervalue=filtervalue, + filtercolor=filtercolor, ) response = client.get_httpx_client().request( @@ -122,6 +111,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_field_id: str, *, @@ -131,9 +121,8 @@ def sync( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> FormFieldOptionList | None: - """ List FormField Options + """List FormField Options List form_field_options @@ -151,20 +140,19 @@ def sync( Returns: FormFieldOptionList - """ - + """ return sync_detailed( form_field_id=form_field_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtervalue=filtervalue, -filtercolor=filtercolor, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtervalue=filtervalue, + filtercolor=filtercolor, ).parsed + async def asyncio_detailed( form_field_id: str, *, @@ -174,9 +162,8 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> Response[FormFieldOptionList]: - """ List FormField Options + """List FormField Options List form_field_options @@ -194,25 +181,22 @@ async def asyncio_detailed( Returns: Response[FormFieldOptionList] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtervalue=filtervalue, -filtercolor=filtercolor, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtervalue=filtervalue, + filtercolor=filtercolor, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_field_id: str, *, @@ -222,9 +206,8 @@ async def asyncio( pagesize: int | Unset = UNSET, filtervalue: str | Unset = UNSET, filtercolor: str | Unset = UNSET, - ) -> FormFieldOptionList | None: - """ List FormField Options + """List FormField Options List form_field_options @@ -242,16 +225,16 @@ async def asyncio( Returns: FormFieldOptionList - """ - - - return (await asyncio_detailed( - form_field_id=form_field_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtervalue=filtervalue, -filtercolor=filtercolor, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_field_id=form_field_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtervalue=filtervalue, + filtercolor=filtercolor, + ) + ).parsed 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 98c87a45..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateFormFieldOption, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_field_options/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_options/{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 | FormFieldOptionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldOptionResponse | None: if response.status_code == 200: response_200 = FormFieldOptionResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldOptionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldOptionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormFieldOption, - ) -> Response[ErrorsList | FormFieldOptionResponse]: - """ Update FormField Options + """Update FormField Options Update a specific form_field_option by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldOption, - ) -> ErrorsList | FormFieldOptionResponse | None: - """ Update FormField Options + """Update FormField Options Update a specific form_field_option by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | FormFieldOptionResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldOption, - ) -> Response[ErrorsList | FormFieldOptionResponse]: - """ Update FormField Options + """Update FormField Options Update a specific form_field_option by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldOptionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldOption, - ) -> ErrorsList | FormFieldOptionResponse | None: - """ Update FormField Options + """Update FormField Options Update a specific form_field_option by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | FormFieldOptionResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/form_field_placement_conditions/__init__.py b/rootly_sdk/api/form_field_placement_conditions/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/form_field_placement_conditions/__init__.py +++ b/rootly_sdk/api/form_field_placement_conditions/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 99083139..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 @@ -16,50 +16,40 @@ def _get_kwargs( form_field_placement_id: str, *, body: NewFormFieldPlacementCondition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_field_placements/{form_field_placement_id}/conditions".format(form_field_placement_id=quote(str(form_field_placement_id), safe=""),), + "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() - headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPlacementConditionResponse | None: if response.status_code == 201: response_201 = FormFieldPlacementConditionResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormFieldPlacementCondition, - ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """ Creates a Form Set Condition + """Creates a Form Set Condition Creates a new form_field_placement_condition from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ - + """ kwargs = _get_kwargs( form_field_placement_id=form_field_placement_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_field_placement_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacementCondition, - ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """ Creates a Form Set Condition + """Creates a Form Set Condition Creates a new form_field_placement_condition from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - + """ return sync_detailed( form_field_placement_id=form_field_placement_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( form_field_placement_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacementCondition, - ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """ Creates a Form Set Condition + """Creates a Form Set Condition Creates a new form_field_placement_condition from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ - + """ kwargs = _get_kwargs( form_field_placement_id=form_field_placement_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_field_placement_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacementCondition, - ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """ Creates a Form Set Condition + """Creates a Form Set Condition Creates a new form_field_placement_condition from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - - - return (await asyncio_detailed( - form_field_placement_id=form_field_placement_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_field_placement_id=form_field_placement_id, + client=client, + body=body, + ) + ).parsed 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 45357b5f..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_field_placement_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_placement_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPlacementConditionResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementConditionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """ Delete a Form Set Condition + """Delete a Form Set Condition Delete a specific form_field_placement_condition by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """ Delete a Form Set Condition + """Delete a Form Set Condition Delete a specific form_field_placement_condition by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """ Delete a Form Set Condition + """Delete a Form Set Condition Delete a specific form_field_placement_condition by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """ Delete a Form Set Condition + """Delete a Form Set Condition Delete a specific form_field_placement_condition by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 c3c810a1..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_field_placement_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_placement_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPlacementConditionResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementConditionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """ Retrieves a Form Set Condition + """Retrieves a Form Set Condition Retrieves a specific form_field_placement_condition by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """ Retrieves a Form Set Condition + """Retrieves a Form Set Condition Retrieves a specific form_field_placement_condition by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """ Retrieves a Form Set Condition + """Retrieves a Form Set Condition Retrieves a specific form_field_placement_condition by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """ Retrieves a Form Set Condition + """Retrieves a Form Set Condition Retrieves a specific form_field_placement_condition by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 a0b1ba35..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 @@ -17,11 +17,7 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,27 +29,25 @@ def _get_kwargs( params["filter[form_field_id]"] = filterform_field_id - 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/form_field_placements/{form_field_placement_id}/conditions".format(form_field_placement_id=quote(str(form_field_placement_id), safe=""),), + "url": "/v1/form_field_placements/{form_field_placement_id}/conditions".format( + form_field_placement_id=quote(str(form_field_placement_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldPlacementConditionList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> FormFieldPlacementConditionList | None: if response.status_code == 200: response_200 = FormFieldPlacementConditionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -62,7 +56,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[FormFieldPlacementConditionList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[FormFieldPlacementConditionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +75,8 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> Response[FormFieldPlacementConditionList]: - """ List Form Set Conditions + """List Form Set Conditions List form_field_placement_conditions @@ -98,16 +93,14 @@ def sync_detailed( Returns: Response[FormFieldPlacementConditionList] - """ - + """ kwargs = _get_kwargs( form_field_placement_id=form_field_placement_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, ) response = client.get_httpx_client().request( @@ -116,6 +109,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_field_placement_id: str, *, @@ -124,9 +118,8 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> FormFieldPlacementConditionList | None: - """ List Form Set Conditions + """List Form Set Conditions List form_field_placement_conditions @@ -143,19 +136,18 @@ def sync( Returns: FormFieldPlacementConditionList - """ - + """ return sync_detailed( form_field_placement_id=form_field_placement_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, ).parsed + async def asyncio_detailed( form_field_placement_id: str, *, @@ -164,9 +156,8 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> Response[FormFieldPlacementConditionList]: - """ List Form Set Conditions + """List Form Set Conditions List form_field_placement_conditions @@ -183,24 +174,21 @@ async def asyncio_detailed( Returns: Response[FormFieldPlacementConditionList] - """ - + """ kwargs = _get_kwargs( form_field_placement_id=form_field_placement_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_field_placement_id: str, *, @@ -209,9 +197,8 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> FormFieldPlacementConditionList | None: - """ List Form Set Conditions + """List Form Set Conditions List form_field_placement_conditions @@ -228,15 +215,15 @@ async def asyncio( Returns: FormFieldPlacementConditionList - """ - - - return (await asyncio_detailed( - form_field_placement_id=form_field_placement_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_field_placement_id=form_field_placement_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, + ) + ).parsed 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 247a37f6..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateFormFieldPlacementCondition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_field_placement_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_placement_conditions/{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 | FormFieldPlacementConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPlacementConditionResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementConditionResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormFieldPlacementCondition, - ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """ Update a Form Set Condition + """Update a Form Set Condition Update a specific form_field_placement_condition by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacementCondition, - ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """ Update a Form Set Condition + """Update a Form Set Condition Update a specific form_field_placement_condition by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacementCondition, - ) -> Response[ErrorsList | FormFieldPlacementConditionResponse]: - """ Update a Form Set Condition + """Update a Form Set Condition Update a specific form_field_placement_condition by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacementCondition, - ) -> ErrorsList | FormFieldPlacementConditionResponse | None: - """ Update a Form Set Condition + """Update a Form Set Condition Update a specific form_field_placement_condition by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementConditionResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/form_field_placements/__init__.py b/rootly_sdk/api/form_field_placements/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/form_field_placements/__init__.py +++ b/rootly_sdk/api/form_field_placements/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 08a7cb58..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 @@ -16,50 +16,40 @@ def _get_kwargs( form_field_id: str, *, body: NewFormFieldPlacement, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_fields/{form_field_id}/placements".format(form_field_id=quote(str(form_field_id), safe=""),), + "url": "/v1/form_fields/{form_field_id}/placements".format( + form_field_id=quote(str(form_field_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 | FormFieldPlacementResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPlacementResponse | None: if response.status_code == 201: response_201 = FormFieldPlacementResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPlacementResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormFieldPlacement, - ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """ Creates a Form Field Placement + """Creates a Form Field Placement Creates a new form_field_placement from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacement, - ) -> ErrorsList | FormFieldPlacementResponse | None: - """ Creates a Form Field Placement + """Creates a Form Field Placement Creates a new form_field_placement from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | FormFieldPlacementResponse - """ - + """ return sync_detailed( form_field_id=form_field_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacement, - ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """ Creates a Form Field Placement + """Creates a Form Field Placement Creates a new form_field_placement from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPlacement, - ) -> ErrorsList | FormFieldPlacementResponse | None: - """ Creates a Form Field Placement + """Creates a Form Field Placement Creates a new form_field_placement from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementResponse - """ - - - return (await asyncio_detailed( - form_field_id=form_field_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_field_id=form_field_id, + client=client, + body=body, + ) + ).parsed 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 a2452047..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_field_placements/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_placements/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPlacementResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPlacementResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """ Delete a Form Field Placement + """Delete a Form Field Placement Delete a specific form_field_placement by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPlacementResponse | None: - """ Delete a Form Field Placement + """Delete a Form Field Placement Delete a specific form_field_placement by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormFieldPlacementResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """ Delete a Form Field Placement + """Delete a Form Field Placement Delete a specific form_field_placement by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPlacementResponse | None: - """ Delete a Form Field Placement + """Delete a Form Field Placement Delete a specific form_field_placement by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 c7059936..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_field_placements/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_placements/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPlacementResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPlacementResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPlacementResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """ Retrieves a Form Field Placement + """Retrieves a Form Field Placement Retrieves a specific form_field_placement by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPlacementResponse | None: - """ Retrieves a Form Field Placement + """Retrieves a Form Field Placement Retrieves a specific form_field_placement by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormFieldPlacementResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """ Retrieves a Form Field Placement + """Retrieves a Form Field Placement Retrieves a specific form_field_placement by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPlacementResponse | None: - """ Retrieves a Form Field Placement + """Retrieves a Form Field Placement Retrieves a specific form_field_placement by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 89415a1e..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 @@ -17,11 +17,7 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,27 +29,23 @@ def _get_kwargs( params["filter[form_field_id]"] = filterform_field_id - 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/form_fields/{form_field_id}/placements".format(form_field_id=quote(str(form_field_id), safe=""),), + "url": "/v1/form_fields/{form_field_id}/placements".format( + form_field_id=quote(str(form_field_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldPlacementList | None: if response.status_code == 200: response_200 = FormFieldPlacementList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[FormFieldPlacementList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[FormFieldPlacementList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +73,8 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> Response[FormFieldPlacementList]: - """ List Form Field Placements + """List Form Field Placements List form_field_placements @@ -98,16 +91,14 @@ def sync_detailed( Returns: Response[FormFieldPlacementList] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, ) response = client.get_httpx_client().request( @@ -116,6 +107,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_field_id: str, *, @@ -124,9 +116,8 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> FormFieldPlacementList | None: - """ List Form Field Placements + """List Form Field Placements List form_field_placements @@ -143,19 +134,18 @@ def sync( Returns: FormFieldPlacementList - """ - + """ return sync_detailed( form_field_id=form_field_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, ).parsed + async def asyncio_detailed( form_field_id: str, *, @@ -164,9 +154,8 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> Response[FormFieldPlacementList]: - """ List Form Field Placements + """List Form Field Placements List form_field_placements @@ -183,24 +172,21 @@ async def asyncio_detailed( Returns: Response[FormFieldPlacementList] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_field_id: str, *, @@ -209,9 +195,8 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> FormFieldPlacementList | None: - """ List Form Field Placements + """List Form Field Placements List form_field_placements @@ -228,15 +213,15 @@ async def asyncio( Returns: FormFieldPlacementList - """ - - - return (await asyncio_detailed( - form_field_id=form_field_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_field_id=form_field_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, + ) + ).parsed 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 800c761c..47e84275 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 @@ -16,50 +16,40 @@ def _get_kwargs( id: str, *, body: UpdateFormFieldPlacement, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_field_placements/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_placements/{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 | FormFieldPlacementResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPlacementResponse | None: if response.status_code == 200: response_200 = FormFieldPlacementResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPlacementResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPlacementResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormFieldPlacement, - ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """ Update a Form Field Placement + """Update a Form Field Placement Update a specific form_field_placement by id @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacement, - ) -> ErrorsList | FormFieldPlacementResponse | None: - """ Update a Form Field Placement + """Update a Form Field Placement Update a specific form_field_placement by id @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | FormFieldPlacementResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacement, - ) -> Response[ErrorsList | FormFieldPlacementResponse]: - """ Update a Form Field Placement + """Update a Form Field Placement Update a specific form_field_placement by id @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPlacementResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPlacement, - ) -> ErrorsList | FormFieldPlacementResponse | None: - """ Update a Form Field Placement + """Update a Form Field Placement Update a specific form_field_placement by id @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPlacementResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/form_field_positions/__init__.py b/rootly_sdk/api/form_field_positions/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/form_field_positions/__init__.py +++ b/rootly_sdk/api/form_field_positions/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 25b50d6f..baa834ef 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 @@ -16,50 +16,40 @@ def _get_kwargs( form_field_id: str, *, body: NewFormFieldPosition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_fields/{form_field_id}/positions".format(form_field_id=quote(str(form_field_id), safe=""),), + "url": "/v1/form_fields/{form_field_id}/positions".format( + form_field_id=quote(str(form_field_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 | FormFieldPositionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPositionResponse | None: if response.status_code == 201: response_201 = FormFieldPositionResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPositionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPositionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormFieldPosition, - ) -> Response[ErrorsList | FormFieldPositionResponse]: - """ Creates FormField Positions + """Creates FormField Positions Creates a new form field_position from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPosition, - ) -> ErrorsList | FormFieldPositionResponse | None: - """ Creates FormField Positions + """Creates FormField Positions Creates a new form field_position from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | FormFieldPositionResponse - """ - + """ return sync_detailed( form_field_id=form_field_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPosition, - ) -> Response[ErrorsList | FormFieldPositionResponse]: - """ Creates FormField Positions + """Creates FormField Positions Creates a new form field_position from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_field_id: str, *, client: AuthenticatedClient, body: NewFormFieldPosition, - ) -> ErrorsList | FormFieldPositionResponse | None: - """ Creates FormField Positions + """Creates FormField Positions Creates a new form field_position from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPositionResponse - """ - - - return (await asyncio_detailed( - form_field_id=form_field_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_field_id=form_field_id, + client=client, + body=body, + ) + ).parsed 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 44d97159..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_field_positions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_positions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPositionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPositionResponse | None: if response.status_code == 200: response_200 = FormFieldPositionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPositionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPositionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPositionResponse]: - """ Delete a FormFieldPosition + """Delete a FormFieldPosition Delete a specific form_field position by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPositionResponse | None: - """ Delete a FormFieldPosition + """Delete a FormFieldPosition Delete a specific form_field position by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormFieldPositionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPositionResponse]: - """ Delete a FormFieldPosition + """Delete a FormFieldPosition Delete a specific form_field position by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPositionResponse | None: - """ Delete a FormFieldPosition + """Delete a FormFieldPosition Delete a specific form_field position by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPositionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 9b7084ba..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_field_positions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_positions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldPositionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPositionResponse | None: if response.status_code == 200: response_200 = FormFieldPositionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPositionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPositionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPositionResponse]: - """ Retrieves a FormFieldPosition + """Retrieves a FormFieldPosition Retrieves a specific form field_position by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPositionResponse | None: - """ Retrieves a FormFieldPosition + """Retrieves a FormFieldPosition Retrieves a specific form field_position by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormFieldPositionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldPositionResponse]: - """ Retrieves a FormFieldPosition + """Retrieves a FormFieldPosition Retrieves a specific form field_position by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldPositionResponse | None: - """ Retrieves a FormFieldPosition + """Retrieves a FormFieldPosition Retrieves a specific form field_position by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormFieldPositionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 01c985f4..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 @@ -17,11 +17,7 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,27 +29,23 @@ def _get_kwargs( params["filter[form]"] = filterform - 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/form_fields/{form_field_id}/positions".format(form_field_id=quote(str(form_field_id), safe=""),), + "url": "/v1/form_fields/{form_field_id}/positions".format( + form_field_id=quote(str(form_field_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldPositionList | None: if response.status_code == 200: response_200 = FormFieldPositionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[FormFieldPositionList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[FormFieldPositionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +73,8 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, - ) -> Response[FormFieldPositionList]: - """ List FormField Position + """List FormField Position List form field positions @@ -98,16 +91,14 @@ def sync_detailed( Returns: Response[FormFieldPositionList] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform=filterform, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform=filterform, ) response = client.get_httpx_client().request( @@ -116,6 +107,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_field_id: str, *, @@ -124,9 +116,8 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, - ) -> FormFieldPositionList | None: - """ List FormField Position + """List FormField Position List form field positions @@ -143,19 +134,18 @@ def sync( Returns: FormFieldPositionList - """ - + """ return sync_detailed( form_field_id=form_field_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform=filterform, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform=filterform, ).parsed + async def asyncio_detailed( form_field_id: str, *, @@ -164,9 +154,8 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, - ) -> Response[FormFieldPositionList]: - """ List FormField Position + """List FormField Position List form field positions @@ -183,24 +172,21 @@ async def asyncio_detailed( Returns: Response[FormFieldPositionList] - """ - + """ kwargs = _get_kwargs( form_field_id=form_field_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform=filterform, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform=filterform, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_field_id: str, *, @@ -209,9 +195,8 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform: str | Unset = UNSET, - ) -> FormFieldPositionList | None: - """ List FormField Position + """List FormField Position List form field positions @@ -228,15 +213,15 @@ async def asyncio( Returns: FormFieldPositionList - """ - - - return (await asyncio_detailed( - form_field_id=form_field_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform=filterform, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_field_id=form_field_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform=filterform, + ) + ).parsed 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 f78b8675..71c94ee0 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 @@ -16,50 +16,40 @@ def _get_kwargs( id: str, *, body: UpdateFormFieldPosition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_field_positions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_field_positions/{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 | FormFieldPositionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldPositionResponse | None: if response.status_code == 200: response_200 = FormFieldPositionResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldPositionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldPositionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormFieldPosition, - ) -> Response[ErrorsList | FormFieldPositionResponse]: - """ Update a FormFieldPosition + """Update a FormFieldPosition Update a specific form_field position by id @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPosition, - ) -> ErrorsList | FormFieldPositionResponse | None: - """ Update a FormFieldPosition + """Update a FormFieldPosition Update a specific form_field position by id @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | FormFieldPositionResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPosition, - ) -> Response[ErrorsList | FormFieldPositionResponse]: - """ Update a FormFieldPosition + """Update a FormFieldPosition Update a specific form_field position by id @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldPositionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormFieldPosition, - ) -> ErrorsList | FormFieldPositionResponse | None: - """ Update a FormFieldPosition + """Update a FormFieldPosition Update a specific form_field position by id @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | FormFieldPositionResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/form_fields/__init__.py b/rootly_sdk/api/form_fields/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/form_fields/__init__.py +++ b/rootly_sdk/api/form_fields/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/form_fields/create_form_field.py b/rootly_sdk/api/form_fields/create_form_field.py index 69e99997..c2069472 100644 --- a/rootly_sdk/api/form_fields/create_form_field.py +++ b/rootly_sdk/api/form_fields/create_form_field.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewFormField, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/form_fields", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | FormFieldResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldResponse | None: if response.status_code == 201: response_201 = FormFieldResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormField, - ) -> Response[ErrorsList | FormFieldResponse]: - """ Creates a Form Field + """Creates a Form Field Creates a new form_field from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewFormField, - ) -> ErrorsList | FormFieldResponse | None: - """ Creates a Form Field + """Creates a Form Field Creates a new form_field from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | FormFieldResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewFormField, - ) -> Response[ErrorsList | FormFieldResponse]: - """ Creates a Form Field + """Creates a Form Field Creates a new form_field from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewFormField, - ) -> ErrorsList | FormFieldResponse | None: - """ Creates a Form Field + """Creates a Form Field Creates a new form_field from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | FormFieldResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/form_fields/delete_form_field.py b/rootly_sdk/api/form_fields/delete_form_field.py index 315b6642..40362583 100644 --- a/rootly_sdk/api/form_fields/delete_form_field.py +++ b/rootly_sdk/api/form_fields/delete_form_field.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_fields/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_fields/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldResponse | None: if response.status_code == 200: response_200 = FormFieldResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldResponse]: - """ Delete a Form Field + """Delete a Form Field Delete a specific form_field by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldResponse | None: - """ Delete a Form Field + """Delete a Form Field Delete a specific form_field by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | FormFieldResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormFieldResponse]: - """ Delete a Form Field + """Delete a Form Field Delete a specific form_field by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FormFieldResponse | None: - """ Delete a Form Field + """Delete a Form Field Delete a specific form_field by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | FormFieldResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/form_fields/get_form_field.py b/rootly_sdk/api/form_fields/get_form_field.py index 745bd269..b6fcd5f0 100644 --- a/rootly_sdk/api/form_fields/get_form_field.py +++ b/rootly_sdk/api/form_fields/get_form_field.py @@ -17,11 +17,7 @@ def _get_kwargs( id: str | UUID, *, include: GetFormFieldInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -31,34 +27,30 @@ def _get_kwargs( params["include"] = json_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/form_fields/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_fields/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormFieldResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldResponse | None: if response.status_code == 200: response_200 = FormFieldResponse.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: @@ -67,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,9 +75,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetFormFieldInclude | Unset = UNSET, - ) -> Response[ErrorsList | FormFieldResponse]: - """ Retrieves a Form Field + """Retrieves a Form Field Retrieves a specific form_field by id @@ -97,13 +90,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -112,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetFormFieldInclude | Unset = UNSET, - ) -> ErrorsList | FormFieldResponse | None: - """ Retrieves a Form Field + """Retrieves a Form Field Retrieves a specific form_field by id @@ -133,24 +124,22 @@ def sync( Returns: ErrorsList | FormFieldResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetFormFieldInclude | Unset = UNSET, - ) -> Response[ErrorsList | FormFieldResponse]: - """ Retrieves a Form Field + """Retrieves a Form Field Retrieves a specific form_field by id @@ -164,29 +153,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetFormFieldInclude | Unset = UNSET, - ) -> ErrorsList | FormFieldResponse | None: - """ Retrieves a Form Field + """Retrieves a Form Field Retrieves a specific form_field by id @@ -200,12 +185,12 @@ async def asyncio( Returns: ErrorsList | FormFieldResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/form_fields/list_form_fields.py b/rootly_sdk/api/form_fields/list_form_fields.py index ea75ba3b..737edc91 100644 --- a/rootly_sdk/api/form_fields/list_form_fields.py +++ b/rootly_sdk/api/form_fields/list_form_fields.py @@ -40,11 +40,7 @@ def _get_kwargs( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -108,27 +104,21 @@ def _get_kwargs( params["filter[enabled][not_in]"] = filterenablednot_in - 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/form_fields", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormFieldList | None: if response.status_code == 200: response_200 = FormFieldList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -177,9 +167,8 @@ def sync_detailed( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> Response[FormFieldList]: - """ List Form Fields + """List Form Fields List form_fields @@ -219,39 +208,37 @@ def sync_detailed( Returns: Response[FormFieldList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterkind=filterkind, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) response = client.get_httpx_client().request( @@ -260,6 +247,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -291,9 +279,8 @@ def sync( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> FormFieldList | None: - """ List Form Fields + """List Form Fields List form_fields @@ -333,42 +320,41 @@ def sync( Returns: FormFieldList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterkind=filterkind, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -400,9 +386,8 @@ async def asyncio_detailed( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> Response[FormFieldList]: - """ List Form Fields + """List Form Fields List form_fields @@ -442,47 +427,44 @@ async def asyncio_detailed( Returns: Response[FormFieldList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterkind=filterkind, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -514,9 +496,8 @@ async def asyncio( filterenablednot_eq: str | Unset = UNSET, filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, - ) -> FormFieldList | None: - """ List Form Fields + """List Form Fields List form_fields @@ -556,38 +537,38 @@ async def asyncio( Returns: FormFieldList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterkind=filterkind, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterkind=filterkind, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, + ) + ).parsed diff --git a/rootly_sdk/api/form_fields/update_form_field.py b/rootly_sdk/api/form_fields/update_form_field.py index 124f68dc..2aa102db 100644 --- a/rootly_sdk/api/form_fields/update_form_field.py +++ b/rootly_sdk/api/form_fields/update_form_field.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateFormField, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_fields/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_fields/{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 | FormFieldResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormFieldResponse | None: if response.status_code == 200: response_200 = FormFieldResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormFieldResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormFieldResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormField, - ) -> Response[ErrorsList | FormFieldResponse]: - """ Update a Form Field + """Update a Form Field Update a specific form_field by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, - ) -> ErrorsList | FormFieldResponse | None: - """ Update a Form Field + """Update a Form Field Update a specific form_field by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | FormFieldResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, - ) -> Response[ErrorsList | FormFieldResponse]: - """ Update a Form Field + """Update a Form Field Update a specific form_field by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormFieldResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormField, - ) -> ErrorsList | FormFieldResponse | None: - """ Update a Form Field + """Update a Form Field Update a specific form_field by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | FormFieldResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/form_set_conditions/__init__.py b/rootly_sdk/api/form_set_conditions/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/form_set_conditions/__init__.py +++ b/rootly_sdk/api/form_set_conditions/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 adacbacf..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 @@ -16,50 +16,40 @@ def _get_kwargs( form_set_id: str, *, body: NewFormSetCondition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/form_sets/{form_set_id}/conditions".format(form_set_id=quote(str(form_set_id), safe=""),), + "url": "/v1/form_sets/{form_set_id}/conditions".format( + form_set_id=quote(str(form_set_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 | FormSetConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormSetConditionResponse | None: if response.status_code == 201: response_201 = FormSetConditionResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormSetConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormSetCondition, - ) -> Response[ErrorsList | FormSetConditionResponse]: - """ Creates a Form Set Condition + """Creates a Form Set Condition Creates a new form_set_condition from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ - + """ kwargs = _get_kwargs( form_set_id=form_set_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_set_id: str, *, client: AuthenticatedClient, body: NewFormSetCondition, - ) -> ErrorsList | FormSetConditionResponse | None: - """ Creates a Form Set Condition + """Creates a Form Set Condition Creates a new form_set_condition from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | FormSetConditionResponse - """ - + """ return sync_detailed( form_set_id=form_set_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( form_set_id: str, *, client: AuthenticatedClient, body: NewFormSetCondition, - ) -> Response[ErrorsList | FormSetConditionResponse]: - """ Creates a Form Set Condition + """Creates a Form Set Condition Creates a new form_set_condition from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ - + """ kwargs = _get_kwargs( form_set_id=form_set_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_set_id: str, *, client: AuthenticatedClient, body: NewFormSetCondition, - ) -> ErrorsList | FormSetConditionResponse | None: - """ Creates a Form Set Condition + """Creates a Form Set Condition Creates a new form_set_condition from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | FormSetConditionResponse - """ - - - return (await asyncio_detailed( - form_set_id=form_set_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_set_id=form_set_id, + client=client, + body=body, + ) + ).parsed 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 b91f0b81..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_set_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_set_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormSetConditionResponse | None: if response.status_code == 200: response_200 = FormSetConditionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormSetConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormSetConditionResponse]: - """ Delete a Form Set Condition + """Delete a Form Set Condition Delete a specific form_set_condition by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormSetConditionResponse | None: - """ Delete a Form Set Condition + """Delete a Form Set Condition Delete a specific form_set_condition by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormSetConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormSetConditionResponse]: - """ Delete a Form Set Condition + """Delete a Form Set Condition Delete a specific form_set_condition by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormSetConditionResponse | None: - """ Delete a Form Set Condition + """Delete a Form Set Condition Delete a specific form_set_condition by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormSetConditionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 ad6e2cf1..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_set_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_set_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormSetConditionResponse | None: if response.status_code == 200: response_200 = FormSetConditionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormSetConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormSetConditionResponse]: - """ Retrieves a Form Set Condition + """Retrieves a Form Set Condition Retrieves a specific form_set_condition by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormSetConditionResponse | None: - """ Retrieves a Form Set Condition + """Retrieves a Form Set Condition Retrieves a specific form_set_condition by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | FormSetConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormSetConditionResponse]: - """ Retrieves a Form Set Condition + """Retrieves a Form Set Condition Retrieves a specific form_set_condition by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | FormSetConditionResponse | None: - """ Retrieves a Form Set Condition + """Retrieves a Form Set Condition Retrieves a specific form_set_condition by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | FormSetConditionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 e0314f3b..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 @@ -17,11 +17,7 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,27 +29,23 @@ def _get_kwargs( params["filter[form_field_id]"] = filterform_field_id - 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/form_sets/{form_set_id}/conditions".format(form_set_id=quote(str(form_set_id), safe=""),), + "url": "/v1/form_sets/{form_set_id}/conditions".format( + form_set_id=quote(str(form_set_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormSetConditionList | None: if response.status_code == 200: response_200 = FormSetConditionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[FormSetConditionList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[FormSetConditionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +73,8 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> Response[FormSetConditionList]: - """ List Form Set Conditions + """List Form Set Conditions List form_set_conditions @@ -98,16 +91,14 @@ def sync_detailed( Returns: Response[FormSetConditionList] - """ - + """ kwargs = _get_kwargs( form_set_id=form_set_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, ) response = client.get_httpx_client().request( @@ -116,6 +107,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( form_set_id: str, *, @@ -124,9 +116,8 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> FormSetConditionList | None: - """ List Form Set Conditions + """List Form Set Conditions List form_set_conditions @@ -143,19 +134,18 @@ def sync( Returns: FormSetConditionList - """ - + """ return sync_detailed( form_set_id=form_set_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, ).parsed + async def asyncio_detailed( form_set_id: str, *, @@ -164,9 +154,8 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> Response[FormSetConditionList]: - """ List Form Set Conditions + """List Form Set Conditions List form_set_conditions @@ -183,24 +172,21 @@ async def asyncio_detailed( Returns: Response[FormSetConditionList] - """ - + """ kwargs = _get_kwargs( form_set_id=form_set_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( form_set_id: str, *, @@ -209,9 +195,8 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterform_field_id: str | Unset = UNSET, - ) -> FormSetConditionList | None: - """ List Form Set Conditions + """List Form Set Conditions List form_set_conditions @@ -228,15 +213,15 @@ async def asyncio( Returns: FormSetConditionList - """ - - - return (await asyncio_detailed( - form_set_id=form_set_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterform_field_id=filterform_field_id, - - )).parsed + """ + + return ( + await asyncio_detailed( + form_set_id=form_set_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterform_field_id=filterform_field_id, + ) + ).parsed 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 69b13d56..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateFormSetCondition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_set_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_set_conditions/{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 | FormSetConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormSetConditionResponse | None: if response.status_code == 200: response_200 = FormSetConditionResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormSetConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormSetCondition, - ) -> Response[ErrorsList | FormSetConditionResponse]: - """ Update a Form Set Condition + """Update a Form Set Condition Update a specific form_set_condition by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateFormSetCondition, - ) -> ErrorsList | FormSetConditionResponse | None: - """ Update a Form Set Condition + """Update a Form Set Condition Update a specific form_set_condition by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | FormSetConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateFormSetCondition, - ) -> Response[ErrorsList | FormSetConditionResponse]: - """ Update a Form Set Condition + """Update a Form Set Condition Update a specific form_set_condition by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateFormSetCondition, - ) -> ErrorsList | FormSetConditionResponse | None: - """ Update a Form Set Condition + """Update a Form Set Condition Update a specific form_set_condition by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | FormSetConditionResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/form_sets/__init__.py b/rootly_sdk/api/form_sets/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/form_sets/__init__.py +++ b/rootly_sdk/api/form_sets/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/form_sets/create_form_set.py b/rootly_sdk/api/form_sets/create_form_set.py index 39a33616..b1132cef 100644 --- a/rootly_sdk/api/form_sets/create_form_set.py +++ b/rootly_sdk/api/form_sets/create_form_set.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewFormSet, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/form_sets", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | FormSetResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormSetResponse | None: if response.status_code == 201: response_201 = FormSetResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFormSet, - ) -> Response[ErrorsList | FormSetResponse]: - """ Creates a Form Set + """Creates a Form Set Creates a new form_set from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewFormSet, - ) -> ErrorsList | FormSetResponse | None: - """ Creates a Form Set + """Creates a Form Set Creates a new form_set from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | FormSetResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewFormSet, - ) -> Response[ErrorsList | FormSetResponse]: - """ Creates a Form Set + """Creates a Form Set Creates a new form_set from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewFormSet, - ) -> ErrorsList | FormSetResponse | None: - """ Creates a Form Set + """Creates a Form Set Creates a new form_set from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | FormSetResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/form_sets/delete_form_set.py b/rootly_sdk/api/form_sets/delete_form_set.py index 6340ae9e..8f5e77e5 100644 --- a/rootly_sdk/api/form_sets/delete_form_set.py +++ b/rootly_sdk/api/form_sets/delete_form_set.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/form_sets/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_sets/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormSetResponse | None: if response.status_code == 200: response_200 = FormSetResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormSetResponse]: - """ Delete a Form Set + """Delete a Form Set Delete a specific form_set by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FormSetResponse | None: - """ Delete a Form Set + """Delete a Form Set Delete a specific form_set by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | FormSetResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormSetResponse]: - """ Delete a Form Set + """Delete a Form Set Delete a specific form_set by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FormSetResponse | None: - """ Delete a Form Set + """Delete a Form Set Delete a specific form_set by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | FormSetResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/form_sets/get_form_set.py b/rootly_sdk/api/form_sets/get_form_set.py index 0fc9f094..6028ddb4 100644 --- a/rootly_sdk/api/form_sets/get_form_set.py +++ b/rootly_sdk/api/form_sets/get_form_set.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/form_sets/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_sets/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FormSetResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormSetResponse | None: if response.status_code == 200: response_200 = FormSetResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormSetResponse]: - """ Retrieves a Form Set + """Retrieves a Form Set Retrieves a specific form_set by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FormSetResponse | None: - """ Retrieves a Form Set + """Retrieves a Form Set Retrieves a specific form_set by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | FormSetResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FormSetResponse]: - """ Retrieves a Form Set + """Retrieves a Form Set Retrieves a specific form_set by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FormSetResponse | None: - """ Retrieves a Form Set + """Retrieves a Form Set Retrieves a specific form_set by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | FormSetResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/form_sets/list_form_sets.py b/rootly_sdk/api/form_sets/list_form_sets.py index caa91fc0..794d9d24 100644 --- a/rootly_sdk/api/form_sets/list_form_sets.py +++ b/rootly_sdk/api/form_sets/list_form_sets.py @@ -20,11 +20,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -46,27 +42,21 @@ def _get_kwargs( 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/form_sets", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FormSetList | None: if response.status_code == 200: response_200 = FormSetList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -96,9 +86,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[FormSetList]: - """ List Form Sets + """List Form Sets List form_sets @@ -119,20 +108,18 @@ def sync_detailed( Returns: Response[FormSetList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filteris_default=filteris_default, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filteris_default=filteris_default, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ) response = client.get_httpx_client().request( @@ -141,6 +128,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -153,9 +141,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> FormSetList | None: - """ List Form Sets + """List Form Sets List form_sets @@ -176,23 +163,22 @@ def sync( Returns: FormSetList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filteris_default=filteris_default, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filteris_default=filteris_default, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -205,9 +191,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[FormSetList]: - """ List Form Sets + """List Form Sets List form_sets @@ -228,28 +213,25 @@ async def asyncio_detailed( Returns: Response[FormSetList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filteris_default=filteris_default, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filteris_default=filteris_default, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -262,9 +244,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> FormSetList | None: - """ List Form Sets + """List Form Sets List form_sets @@ -285,19 +266,19 @@ async def asyncio( Returns: FormSetList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filteris_default=filteris_default, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filteris_default=filteris_default, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/form_sets/update_form_set.py b/rootly_sdk/api/form_sets/update_form_set.py index e5c379c1..1fd4b788 100644 --- a/rootly_sdk/api/form_sets/update_form_set.py +++ b/rootly_sdk/api/form_sets/update_form_set.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateFormSet, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/form_sets/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/form_sets/{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 | FormSetResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FormSetResponse | None: if response.status_code == 200: response_200 = FormSetResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FormSetResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FormSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFormSet, - ) -> Response[ErrorsList | FormSetResponse]: - """ Update a Form Set + """Update a Form Set Update a specific form_set by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, - ) -> ErrorsList | FormSetResponse | None: - """ Update a Form Set + """Update a Form Set Update a specific form_set by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | FormSetResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, - ) -> Response[ErrorsList | FormSetResponse]: - """ Update a Form Set + """Update a Form Set Update a specific form_set by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FormSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFormSet, - ) -> ErrorsList | FormSetResponse | None: - """ Update a Form Set + """Update a Form Set Update a specific form_set by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | FormSetResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/__init__.py b/rootly_sdk/api/functionalities/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/functionalities/__init__.py +++ b/rootly_sdk/api/functionalities/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/functionalities/bulk_delete_functionalities.py b/rootly_sdk/api/functionalities/bulk_delete_functionalities.py index a2a728e3..9889d1b6 100644 --- a/rootly_sdk/api/functionalities/bulk_delete_functionalities.py +++ b/rootly_sdk/api/functionalities/bulk_delete_functionalities.py @@ -15,59 +15,46 @@ def _get_kwargs( *, body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/functionalities/bulk_delete", } - if isinstance(body, BulkDestroyFunctionalitiesType0): _kwargs["json"] = body.to_dict() else: _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) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: if response.status_code == 200: response_200 = BulkDestroyFunctionalitiesResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyFunctionalitiesResponse | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -75,8 +62,6 @@ def _parse_response_422(data: object) -> BulkDestroyFunctionalitiesResponse | Er raise TypeError() response_422_type_1 = BulkDestroyFunctionalitiesResponse.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -89,7 +74,9 @@ def _parse_response_422(data: object) -> BulkDestroyFunctionalitiesResponse | Er return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -102,9 +89,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, - ) -> Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList]: - """ Bulk delete Functionalities + """Bulk delete Functionalities Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -120,12 +106,10 @@ def sync_detailed( Returns: Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -134,13 +118,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, - ) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Functionalities + """Bulk delete Functionalities Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -156,22 +140,20 @@ def sync( Returns: BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, - ) -> Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList]: - """ Bulk delete Functionalities + """Bulk delete Functionalities Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -187,27 +169,23 @@ async def asyncio_detailed( Returns: Response[BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: BulkDestroyFunctionalitiesType0 | BulkDestroyFunctionalitiesType1, - ) -> BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Functionalities + """Bulk delete Functionalities Delete functionalities by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -223,11 +201,11 @@ async def asyncio( Returns: BulkDestroyFunctionalitiesResponse | BulkDestroyFunctionalitiesResponse | ErrorsList | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py b/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py index 4235138c..f2e88ac0 100644 --- a/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py +++ b/rootly_sdk/api/functionalities/bulk_upsert_functionalities.py @@ -15,15 +15,9 @@ def _get_kwargs( *, body: BulkUpsertFunctionalities, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/functionalities/bulk_upsert", @@ -31,38 +25,33 @@ def _get_kwargs( _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) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: if response.status_code == 200: response_200 = BulkUpsertFunctionalitiesResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertFunctionalitiesError | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -70,8 +59,6 @@ def _parse_response_422(data: object) -> BulkUpsertFunctionalitiesError | Errors raise TypeError() response_422_type_1 = BulkUpsertFunctionalitiesError.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -84,7 +71,9 @@ def _parse_response_422(data: object) -> BulkUpsertFunctionalitiesError | Errors return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -97,9 +86,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkUpsertFunctionalities, - ) -> Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList]: - """ Bulk upsert Functionalities + """Bulk upsert Functionalities Create or update multiple functionalities by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -116,12 +104,10 @@ def sync_detailed( Returns: Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -130,13 +116,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: BulkUpsertFunctionalities, - ) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: - """ Bulk upsert Functionalities + """Bulk upsert Functionalities Create or update multiple functionalities by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -153,22 +139,20 @@ def sync( Returns: BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: BulkUpsertFunctionalities, - ) -> Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList]: - """ Bulk upsert Functionalities + """Bulk upsert Functionalities Create or update multiple functionalities by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -185,27 +169,23 @@ async def asyncio_detailed( Returns: Response[BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: BulkUpsertFunctionalities, - ) -> BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList | None: - """ Bulk upsert Functionalities + """Bulk upsert Functionalities Create or update multiple functionalities by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -222,11 +202,11 @@ async def asyncio( Returns: BulkUpsertFunctionalitiesError | ErrorsList | BulkUpsertFunctionalitiesResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/create_functionality.py b/rootly_sdk/api/functionalities/create_functionality.py index b79e4306..1f7ef099 100644 --- a/rootly_sdk/api/functionalities/create_functionality.py +++ b/rootly_sdk/api/functionalities/create_functionality.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewFunctionality, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/functionalities", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | FunctionalityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FunctionalityResponse | None: if response.status_code == 201: response_201 = FunctionalityResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FunctionalityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewFunctionality, - ) -> Response[ErrorsList | FunctionalityResponse]: - """ Creates a functionality + """Creates a functionality Creates a new functionality from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewFunctionality, - ) -> ErrorsList | FunctionalityResponse | None: - """ Creates a functionality + """Creates a functionality Creates a new functionality from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | FunctionalityResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewFunctionality, - ) -> Response[ErrorsList | FunctionalityResponse]: - """ Creates a functionality + """Creates a functionality Creates a new functionality from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewFunctionality, - ) -> ErrorsList | FunctionalityResponse | None: - """ Creates a functionality + """Creates a functionality Creates a new functionality from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | FunctionalityResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/create_functionality_catalog_property.py b/rootly_sdk/api/functionalities/create_functionality_catalog_property.py index a9ad8a31..ffaecab2 100644 --- a/rootly_sdk/api/functionalities/create_functionality_catalog_property.py +++ b/rootly_sdk/api/functionalities/create_functionality_catalog_property.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCatalogProperty, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/functionalities/properties", @@ -30,34 +24,28 @@ def _get_kwargs( _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: +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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> CatalogPropertyResponse | ErrorsList | None: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -127,22 +114,20 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + 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 9058b807..fe3cb866 100644 --- a/rootly_sdk/api/functionalities/delete_functionality.py +++ b/rootly_sdk/api/functionalities/delete_functionality.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/functionalities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FunctionalityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FunctionalityResponse | None: if response.status_code == 200: response_200 = FunctionalityResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FunctionalityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FunctionalityResponse]: - """ Delete a functionality + """Delete a functionality Delete a specific functionality by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FunctionalityResponse | None: - """ Delete a functionality + """Delete a functionality Delete a specific functionality by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | FunctionalityResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FunctionalityResponse]: - """ Delete a functionality + """Delete a functionality Delete a specific functionality by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FunctionalityResponse | None: - """ Delete a functionality + """Delete a functionality Delete a specific functionality by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | FunctionalityResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/get_functionality.py b/rootly_sdk/api/functionalities/get_functionality.py index 8a1ff0ad..746c5e60 100644 --- a/rootly_sdk/api/functionalities/get_functionality.py +++ b/rootly_sdk/api/functionalities/get_functionality.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/functionalities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | FunctionalityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FunctionalityResponse | None: if response.status_code == 200: response_200 = FunctionalityResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FunctionalityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FunctionalityResponse]: - """ Retrieves a functionality + """Retrieves a functionality Retrieves a specific functionality by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FunctionalityResponse | None: - """ Retrieves a functionality + """Retrieves a functionality Retrieves a specific functionality by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | FunctionalityResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | FunctionalityResponse]: - """ Retrieves a functionality + """Retrieves a functionality Retrieves a specific functionality by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | FunctionalityResponse | None: - """ Retrieves a functionality + """Retrieves a functionality Retrieves a specific functionality by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | FunctionalityResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py b/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py index cacf84e4..0ebccfaf 100644 --- a/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py +++ b/rootly_sdk/api/functionalities/get_functionality_incidents_chart.py @@ -16,44 +16,36 @@ def _get_kwargs( id: str | UUID, *, period: str, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} params["period"] = period - 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/{id}/incidents_chart".format(id=quote(str(id), safe=""),), + "url": "/v1/functionalities/{id}/incidents_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentsChartResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentsChartResponse | None: if response.status_code == 200: response_200 = IncidentsChartResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentsChartResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentsChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, period: str, - ) -> Response[ErrorsList | IncidentsChartResponse]: - """ Get functionality incidents chart + """Get functionality incidents chart Get functionality incidents chart @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, period: str, - ) -> ErrorsList | IncidentsChartResponse | None: - """ Get functionality incidents chart + """Get functionality incidents chart Get functionality incidents chart @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentsChartResponse - """ - + """ return sync_detailed( id=id, -client=client, -period=period, - + client=client, + period=period, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, period: str, - ) -> Response[ErrorsList | IncidentsChartResponse]: - """ Get functionality incidents chart + """Get functionality incidents chart Get functionality incidents chart @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, period: str, - ) -> ErrorsList | IncidentsChartResponse | None: - """ Get functionality incidents chart + """Get functionality incidents chart Get functionality incidents chart @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentsChartResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -period=period, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + period=period, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py b/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py index a4f724f0..6fa744af 100644 --- a/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py +++ b/rootly_sdk/api/functionalities/get_functionality_uptime_chart.py @@ -16,44 +16,36 @@ def _get_kwargs( id: str | UUID, *, period: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} params["period"] = period - 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/{id}/uptime_chart".format(id=quote(str(id), safe=""),), + "url": "/v1/functionalities/{id}/uptime_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UptimeChartResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UptimeChartResponse | None: if response.status_code == 200: response_200 = UptimeChartResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UptimeChartResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UptimeChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, period: str | Unset = UNSET, - ) -> Response[ErrorsList | UptimeChartResponse]: - """ Get functionality uptime chart + """Get functionality uptime chart Get functionality uptime chart @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | UptimeChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, - ) -> ErrorsList | UptimeChartResponse | None: - """ Get functionality uptime chart + """Get functionality uptime chart Get functionality uptime chart @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | UptimeChartResponse - """ - + """ return sync_detailed( id=id, -client=client, -period=period, - + client=client, + period=period, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, - ) -> Response[ErrorsList | UptimeChartResponse]: - """ Get functionality uptime chart + """Get functionality uptime chart Get functionality uptime chart @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UptimeChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, - ) -> ErrorsList | UptimeChartResponse | None: - """ Get functionality uptime chart + """Get functionality uptime chart Get functionality uptime chart @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | UptimeChartResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -period=period, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + period=period, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/list_functionalities.py b/rootly_sdk/api/functionalities/list_functionalities.py index 26824d9d..d00ffd21 100644 --- a/rootly_sdk/api/functionalities/list_functionalities.py +++ b/rootly_sdk/api/functionalities/list_functionalities.py @@ -34,11 +34,7 @@ def _get_kwargs( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -88,27 +84,21 @@ def _get_kwargs( 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/functionalities", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> FunctionalityList | None: if response.status_code == 200: response_200 = FunctionalityList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -152,9 +142,8 @@ def sync_detailed( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[FunctionalityList]: - """ List functionalities + """List functionalities List functionalities @@ -189,34 +178,32 @@ def sync_detailed( Returns: Response[FunctionalityList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -225,6 +212,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -251,9 +239,8 @@ def sync( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> FunctionalityList | None: - """ List functionalities + """List functionalities List functionalities @@ -288,37 +275,36 @@ def sync( Returns: FunctionalityList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -345,9 +331,8 @@ async def asyncio_detailed( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[FunctionalityList]: - """ List functionalities + """List functionalities List functionalities @@ -382,42 +367,39 @@ async def asyncio_detailed( Returns: Response[FunctionalityList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -444,9 +426,8 @@ async def asyncio( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> FunctionalityList | None: - """ List functionalities + """List functionalities List functionalities @@ -481,33 +462,33 @@ async def asyncio( Returns: FunctionalityList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py b/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py index d777a756..80b13adb 100644 --- a/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py +++ b/rootly_sdk/api/functionalities/list_functionality_catalog_properties.py @@ -28,11 +28,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -66,27 +62,21 @@ def _get_kwargs( 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: @@ -118,9 +108,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Functionality Catalog Properties @@ -143,22 +132,20 @@ def sync_detailed( 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, - + 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( @@ -167,6 +154,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -181,9 +169,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Functionality Catalog Properties @@ -206,25 +193,24 @@ def sync( 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, - + 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, @@ -239,9 +225,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Functionality Catalog Properties @@ -264,30 +249,27 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -302,9 +284,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Functionality Catalog Properties @@ -327,21 +308,21 @@ async def asyncio( 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 + """ + + 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 10a0e0fb..5098e9df 100644 --- a/rootly_sdk/api/functionalities/update_functionality.py +++ b/rootly_sdk/api/functionalities/update_functionality.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateFunctionality, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/functionalities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/functionalities/{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 | FunctionalityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | FunctionalityResponse | None: if response.status_code == 200: response_200 = FunctionalityResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | FunctionalityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | FunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateFunctionality, - ) -> Response[ErrorsList | FunctionalityResponse]: - """ Update a functionality + """Update a functionality Update a specific functionality by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, - ) -> ErrorsList | FunctionalityResponse | None: - """ Update a functionality + """Update a functionality Update a specific functionality by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | FunctionalityResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, - ) -> Response[ErrorsList | FunctionalityResponse]: - """ Update a functionality + """Update a functionality Update a specific functionality by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | FunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateFunctionality, - ) -> ErrorsList | FunctionalityResponse | None: - """ Update a functionality + """Update a functionality Update a specific functionality by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | FunctionalityResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/heartbeats/__init__.py b/rootly_sdk/api/heartbeats/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/heartbeats/__init__.py +++ b/rootly_sdk/api/heartbeats/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/heartbeats/create_heartbeat.py b/rootly_sdk/api/heartbeats/create_heartbeat.py index 131c0c47..c03eed95 100644 --- a/rootly_sdk/api/heartbeats/create_heartbeat.py +++ b/rootly_sdk/api/heartbeats/create_heartbeat.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewHeartbeat, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/heartbeats", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | HeartbeatResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | HeartbeatResponse | None: if response.status_code == 201: response_201 = HeartbeatResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | HeartbeatResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | HeartbeatResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewHeartbeat, - ) -> Response[ErrorsList | HeartbeatResponse]: - """ Creates a heartbeat + """Creates a heartbeat Creates a new heartbeat from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewHeartbeat, - ) -> ErrorsList | HeartbeatResponse | None: - """ Creates a heartbeat + """Creates a heartbeat Creates a new heartbeat from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | HeartbeatResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewHeartbeat, - ) -> Response[ErrorsList | HeartbeatResponse]: - """ Creates a heartbeat + """Creates a heartbeat Creates a new heartbeat from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewHeartbeat, - ) -> ErrorsList | HeartbeatResponse | None: - """ Creates a heartbeat + """Creates a heartbeat Creates a new heartbeat from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | HeartbeatResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/heartbeats/delete_heartbeat.py b/rootly_sdk/api/heartbeats/delete_heartbeat.py index d0e074a6..674106f9 100644 --- a/rootly_sdk/api/heartbeats/delete_heartbeat.py +++ b/rootly_sdk/api/heartbeats/delete_heartbeat.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/heartbeats/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/heartbeats/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | HeartbeatResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | HeartbeatResponse | None: if response.status_code == 200: response_200 = HeartbeatResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | HeartbeatResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | HeartbeatResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | HeartbeatResponse]: - """ Delete a heartbeat + """Delete a heartbeat Delete a specific heartbeat by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | HeartbeatResponse | None: - """ Delete a heartbeat + """Delete a heartbeat Delete a specific heartbeat by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | HeartbeatResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | HeartbeatResponse]: - """ Delete a heartbeat + """Delete a heartbeat Delete a specific heartbeat by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | HeartbeatResponse | None: - """ Delete a heartbeat + """Delete a heartbeat Delete a specific heartbeat by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | HeartbeatResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/heartbeats/get_heartbeat.py b/rootly_sdk/api/heartbeats/get_heartbeat.py index 71815aa4..8ab9ac45 100644 --- a/rootly_sdk/api/heartbeats/get_heartbeat.py +++ b/rootly_sdk/api/heartbeats/get_heartbeat.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/heartbeats/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/heartbeats/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | HeartbeatResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | HeartbeatResponse | None: if response.status_code == 200: response_200 = HeartbeatResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | HeartbeatResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | HeartbeatResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | HeartbeatResponse]: - """ Retrieves a heartbeat + """Retrieves a heartbeat Retrieves a specific heartbeat by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | HeartbeatResponse | None: - """ Retrieves a heartbeat + """Retrieves a heartbeat Retrieves a specific heartbeat by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | HeartbeatResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | HeartbeatResponse]: - """ Retrieves a heartbeat + """Retrieves a heartbeat Retrieves a specific heartbeat by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | HeartbeatResponse | None: - """ Retrieves a heartbeat + """Retrieves a heartbeat Retrieves a specific heartbeat by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | HeartbeatResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/heartbeats/list_heartbeats.py b/rootly_sdk/api/heartbeats/list_heartbeats.py index 7541ab51..19af7d67 100644 --- a/rootly_sdk/api/heartbeats/list_heartbeats.py +++ b/rootly_sdk/api/heartbeats/list_heartbeats.py @@ -21,11 +21,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -49,27 +45,21 @@ def _get_kwargs( 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/heartbeats", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> HeartbeatList | None: if response.status_code == 200: response_200 = HeartbeatList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -100,9 +90,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[HeartbeatList]: - """ List heartbeats + """List heartbeats List heartbeats @@ -124,21 +113,19 @@ def sync_detailed( Returns: Response[HeartbeatList] - """ - + """ kwargs = _get_kwargs( include=include, -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, - + 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, ) response = client.get_httpx_client().request( @@ -147,6 +134,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -160,9 +148,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> HeartbeatList | None: - """ List heartbeats + """List heartbeats List heartbeats @@ -184,24 +171,23 @@ def sync( Returns: HeartbeatList - """ - + """ return sync_detailed( client=client, -include=include, -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, - + include=include, + 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, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -215,9 +201,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[HeartbeatList]: - """ List heartbeats + """List heartbeats List heartbeats @@ -239,29 +224,26 @@ async def asyncio_detailed( Returns: Response[HeartbeatList] - """ - + """ kwargs = _get_kwargs( include=include, -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, - + 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, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -275,9 +257,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> HeartbeatList | None: - """ List heartbeats + """List heartbeats List heartbeats @@ -299,20 +280,20 @@ async def asyncio( Returns: HeartbeatList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -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, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + 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, + ) + ).parsed diff --git a/rootly_sdk/api/heartbeats/ping_heartbeat.py b/rootly_sdk/api/heartbeats/ping_heartbeat.py index 73ecf716..786ca9cc 100644 --- a/rootly_sdk/api/heartbeats/ping_heartbeat.py +++ b/rootly_sdk/api/heartbeats/ping_heartbeat.py @@ -12,24 +12,18 @@ def _get_kwargs( heartbeat_id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/heartbeats/{heartbeat_id}/ping".format(heartbeat_id=quote(str(heartbeat_id), safe=""),), + "url": "/v1/heartbeats/{heartbeat_id}/ping".format( + heartbeat_id=quote(str(heartbeat_id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | ErrorsList | None: if response.status_code == 204: response_204 = cast(Any, None) @@ -38,8 +32,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) - - return response_404 if client.raise_on_unexpected_status: @@ -61,9 +53,8 @@ def sync_detailed( heartbeat_id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Ping a heartbeat + """Ping a heartbeat Ping a specific heartbeat by id @@ -76,12 +67,10 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( heartbeat_id=heartbeat_id, - ) response = client.get_httpx_client().request( @@ -90,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( heartbeat_id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Ping a heartbeat + """Ping a heartbeat Ping a specific heartbeat by id @@ -109,22 +98,20 @@ def sync( Returns: Any | ErrorsList - """ - + """ return sync_detailed( heartbeat_id=heartbeat_id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( heartbeat_id: str, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList]: - """ Ping a heartbeat + """Ping a heartbeat Ping a specific heartbeat by id @@ -137,27 +124,23 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( heartbeat_id=heartbeat_id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( heartbeat_id: str, *, client: AuthenticatedClient, - ) -> Any | ErrorsList | None: - """ Ping a heartbeat + """Ping a heartbeat Ping a specific heartbeat by id @@ -170,11 +153,11 @@ async def asyncio( Returns: Any | ErrorsList - """ - + """ - return (await asyncio_detailed( - heartbeat_id=heartbeat_id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + heartbeat_id=heartbeat_id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/heartbeats/update_heartbeat.py b/rootly_sdk/api/heartbeats/update_heartbeat.py index 4678ad52..533b0dfb 100644 --- a/rootly_sdk/api/heartbeats/update_heartbeat.py +++ b/rootly_sdk/api/heartbeats/update_heartbeat.py @@ -17,50 +17,40 @@ def _get_kwargs( id: str | UUID, *, body: UpdateHeartbeat, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/heartbeats/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/heartbeats/{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 | HeartbeatResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | HeartbeatResponse | None: if response.status_code == 200: response_200 = HeartbeatResponse.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: @@ -69,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | HeartbeatResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | HeartbeatResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -83,9 +75,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateHeartbeat, - ) -> Response[ErrorsList | HeartbeatResponse]: - """ Update a heartbeat + """Update a heartbeat Update a specific heartbeat by id @@ -99,13 +90,11 @@ def sync_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -114,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, - ) -> ErrorsList | HeartbeatResponse | None: - """ Update a heartbeat + """Update a heartbeat Update a specific heartbeat by id @@ -135,24 +124,22 @@ def sync( Returns: ErrorsList | HeartbeatResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, - ) -> Response[ErrorsList | HeartbeatResponse]: - """ Update a heartbeat + """Update a heartbeat Update a specific heartbeat by id @@ -166,29 +153,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | HeartbeatResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateHeartbeat, - ) -> ErrorsList | HeartbeatResponse | None: - """ Update a heartbeat + """Update a heartbeat Update a specific heartbeat by id @@ -202,12 +185,12 @@ async def asyncio( Returns: ErrorsList | HeartbeatResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_action_items/__init__.py b/rootly_sdk/api/incident_action_items/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_action_items/__init__.py +++ b/rootly_sdk/api/incident_action_items/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 7c803ea2..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 @@ -16,50 +16,40 @@ def _get_kwargs( incident_id: str, *, body: NewIncidentActionItem, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/action_items".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/action_items".format( + incident_id=quote(str(incident_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 | IncidentActionItemResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentActionItemResponse | None: if response.status_code == 201: response_201 = IncidentActionItemResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentActionItemResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentActionItemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentActionItem, - ) -> Response[ErrorsList | IncidentActionItemResponse]: - """ Creates an incident action item + """Creates an incident action item Creates a new action item from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentActionItem, - ) -> ErrorsList | IncidentActionItemResponse | None: - """ Creates an incident action item + """Creates an incident action item Creates a new action item from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentActionItemResponse - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentActionItem, - ) -> Response[ErrorsList | IncidentActionItemResponse]: - """ Creates an incident action item + """Creates an incident action item Creates a new action item from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentActionItem, - ) -> ErrorsList | IncidentActionItemResponse | None: - """ Creates an incident action item + """Creates an incident action item Creates a new action item from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentActionItemResponse - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed 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 a0531432..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/action_items/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/action_items/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentActionItemResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentActionItemResponse | None: if response.status_code == 200: response_200 = IncidentActionItemResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentActionItemResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentActionItemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentActionItemResponse]: - """ Delete an incident action item + """Delete an incident action item Delete a specific incident action item by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentActionItemResponse | None: - """ Delete an incident action item + """Delete an incident action item Delete a specific incident action item by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentActionItemResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentActionItemResponse]: - """ Delete an incident action item + """Delete an incident action item Delete a specific incident action item by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentActionItemResponse | None: - """ Delete an incident action item + """Delete an incident action item Delete a specific incident action item by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentActionItemResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 89e216d2..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/action_items/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/action_items/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentActionItemResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentActionItemResponse | None: if response.status_code == 200: response_200 = IncidentActionItemResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentActionItemResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentActionItemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentActionItemResponse]: - """ Retrieves an incident action item + """Retrieves an incident action item Retrieves a specific incident_action_item by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentActionItemResponse | None: - """ Retrieves an incident action item + """Retrieves an incident action item Retrieves a specific incident_action_item by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentActionItemResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentActionItemResponse]: - """ Retrieves an incident action item + """Retrieves an incident action item Retrieves a specific incident_action_item by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentActionItemResponse | None: - """ Retrieves an incident action item + """Retrieves an incident action item Retrieves a specific incident_action_item by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentActionItemResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 b49a37a6..9fdcf45a 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 @@ -47,11 +47,7 @@ def _get_kwargs( filterincident_statusin: str | Unset = UNSET, filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -127,27 +123,21 @@ def _get_kwargs( 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/action_items", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentActionItemList | None: if response.status_code == 200: response_200 = IncidentActionItemList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -156,7 +146,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentActionItemList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentActionItemList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -204,9 +196,8 @@ def sync_detailed( filterincident_statusin: str | Unset = UNSET, filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentActionItemList]: - """ List all action items for an organization + """List all action items for an organization List all action items for an organization @@ -254,47 +245,45 @@ def sync_detailed( Returns: Response[IncidentActionItemList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filterpriority=filterpriority, -filterstatus=filterstatus, -filterincident_status=filterincident_status, -filterincident_created_atgt=filterincident_created_atgt, -filterincident_created_atgte=filterincident_created_atgte, -filterincident_created_atlt=filterincident_created_atlt, -filterincident_created_atlte=filterincident_created_atlte, -filterdue_dategt=filterdue_dategt, -filterdue_dategte=filterdue_dategte, -filterdue_datelt=filterdue_datelt, -filterdue_datelte=filterdue_datelte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterpriorityeq=filterpriorityeq, -filterprioritynot_eq=filterprioritynot_eq, -filterpriorityin=filterpriorityin, -filterprioritynot_in=filterprioritynot_in, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filterincident_statuseq=filterincident_statuseq, -filterincident_statusnot_eq=filterincident_statusnot_eq, -filterincident_statusin=filterincident_statusin, -filterincident_statusnot_in=filterincident_statusnot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filterpriority=filterpriority, + filterstatus=filterstatus, + filterincident_status=filterincident_status, + filterincident_created_atgt=filterincident_created_atgt, + filterincident_created_atgte=filterincident_created_atgte, + filterincident_created_atlt=filterincident_created_atlt, + filterincident_created_atlte=filterincident_created_atlte, + filterdue_dategt=filterdue_dategt, + filterdue_dategte=filterdue_dategte, + filterdue_datelt=filterdue_datelt, + filterdue_datelte=filterdue_datelte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterpriorityeq=filterpriorityeq, + filterprioritynot_eq=filterprioritynot_eq, + filterpriorityin=filterpriorityin, + filterprioritynot_in=filterprioritynot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterincident_statuseq=filterincident_statuseq, + filterincident_statusnot_eq=filterincident_statusnot_eq, + filterincident_statusin=filterincident_statusin, + filterincident_statusnot_in=filterincident_statusnot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -303,6 +292,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -342,9 +332,8 @@ def sync( filterincident_statusin: str | Unset = UNSET, filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentActionItemList | None: - """ List all action items for an organization + """List all action items for an organization List all action items for an organization @@ -392,50 +381,49 @@ def sync( Returns: IncidentActionItemList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filterpriority=filterpriority, -filterstatus=filterstatus, -filterincident_status=filterincident_status, -filterincident_created_atgt=filterincident_created_atgt, -filterincident_created_atgte=filterincident_created_atgte, -filterincident_created_atlt=filterincident_created_atlt, -filterincident_created_atlte=filterincident_created_atlte, -filterdue_dategt=filterdue_dategt, -filterdue_dategte=filterdue_dategte, -filterdue_datelt=filterdue_datelt, -filterdue_datelte=filterdue_datelte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterpriorityeq=filterpriorityeq, -filterprioritynot_eq=filterprioritynot_eq, -filterpriorityin=filterpriorityin, -filterprioritynot_in=filterprioritynot_in, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filterincident_statuseq=filterincident_statuseq, -filterincident_statusnot_eq=filterincident_statusnot_eq, -filterincident_statusin=filterincident_statusin, -filterincident_statusnot_in=filterincident_statusnot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filterpriority=filterpriority, + filterstatus=filterstatus, + filterincident_status=filterincident_status, + filterincident_created_atgt=filterincident_created_atgt, + filterincident_created_atgte=filterincident_created_atgte, + filterincident_created_atlt=filterincident_created_atlt, + filterincident_created_atlte=filterincident_created_atlte, + filterdue_dategt=filterdue_dategt, + filterdue_dategte=filterdue_dategte, + filterdue_datelt=filterdue_datelt, + filterdue_datelte=filterdue_datelte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterpriorityeq=filterpriorityeq, + filterprioritynot_eq=filterprioritynot_eq, + filterpriorityin=filterpriorityin, + filterprioritynot_in=filterprioritynot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterincident_statuseq=filterincident_statuseq, + filterincident_statusnot_eq=filterincident_statusnot_eq, + filterincident_statusin=filterincident_statusin, + filterincident_statusnot_in=filterincident_statusnot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -475,9 +463,8 @@ async def asyncio_detailed( filterincident_statusin: str | Unset = UNSET, filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentActionItemList]: - """ List all action items for an organization + """List all action items for an organization List all action items for an organization @@ -525,55 +512,52 @@ async def asyncio_detailed( Returns: Response[IncidentActionItemList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filterpriority=filterpriority, -filterstatus=filterstatus, -filterincident_status=filterincident_status, -filterincident_created_atgt=filterincident_created_atgt, -filterincident_created_atgte=filterincident_created_atgte, -filterincident_created_atlt=filterincident_created_atlt, -filterincident_created_atlte=filterincident_created_atlte, -filterdue_dategt=filterdue_dategt, -filterdue_dategte=filterdue_dategte, -filterdue_datelt=filterdue_datelt, -filterdue_datelte=filterdue_datelte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterpriorityeq=filterpriorityeq, -filterprioritynot_eq=filterprioritynot_eq, -filterpriorityin=filterpriorityin, -filterprioritynot_in=filterprioritynot_in, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filterincident_statuseq=filterincident_statuseq, -filterincident_statusnot_eq=filterincident_statusnot_eq, -filterincident_statusin=filterincident_statusin, -filterincident_statusnot_in=filterincident_statusnot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filterpriority=filterpriority, + filterstatus=filterstatus, + filterincident_status=filterincident_status, + filterincident_created_atgt=filterincident_created_atgt, + filterincident_created_atgte=filterincident_created_atgte, + filterincident_created_atlt=filterincident_created_atlt, + filterincident_created_atlte=filterincident_created_atlte, + filterdue_dategt=filterdue_dategt, + filterdue_dategte=filterdue_dategte, + filterdue_datelt=filterdue_datelt, + filterdue_datelte=filterdue_datelte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterpriorityeq=filterpriorityeq, + filterprioritynot_eq=filterprioritynot_eq, + filterpriorityin=filterpriorityin, + filterprioritynot_in=filterprioritynot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterincident_statuseq=filterincident_statuseq, + filterincident_statusnot_eq=filterincident_statusnot_eq, + filterincident_statusin=filterincident_statusin, + filterincident_statusnot_in=filterincident_statusnot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -613,9 +597,8 @@ async def asyncio( filterincident_statusin: str | Unset = UNSET, filterincident_statusnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentActionItemList | None: - """ List all action items for an organization + """List all action items for an organization List all action items for an organization @@ -663,46 +646,46 @@ async def asyncio( Returns: IncidentActionItemList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filterpriority=filterpriority, -filterstatus=filterstatus, -filterincident_status=filterincident_status, -filterincident_created_atgt=filterincident_created_atgt, -filterincident_created_atgte=filterincident_created_atgte, -filterincident_created_atlt=filterincident_created_atlt, -filterincident_created_atlte=filterincident_created_atlte, -filterdue_dategt=filterdue_dategt, -filterdue_dategte=filterdue_dategte, -filterdue_datelt=filterdue_datelt, -filterdue_datelte=filterdue_datelte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterpriorityeq=filterpriorityeq, -filterprioritynot_eq=filterprioritynot_eq, -filterpriorityin=filterpriorityin, -filterprioritynot_in=filterprioritynot_in, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filterincident_statuseq=filterincident_statuseq, -filterincident_statusnot_eq=filterincident_statusnot_eq, -filterincident_statusin=filterincident_statusin, -filterincident_statusnot_in=filterincident_statusnot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filterpriority=filterpriority, + filterstatus=filterstatus, + filterincident_status=filterincident_status, + filterincident_created_atgt=filterincident_created_atgt, + filterincident_created_atgte=filterincident_created_atgte, + filterincident_created_atlt=filterincident_created_atlt, + filterincident_created_atlte=filterincident_created_atlte, + filterdue_dategt=filterdue_dategt, + filterdue_dategte=filterdue_dategte, + filterdue_datelt=filterdue_datelt, + filterdue_datelte=filterdue_datelte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterpriorityeq=filterpriorityeq, + filterprioritynot_eq=filterprioritynot_eq, + filterpriorityin=filterpriorityin, + filterprioritynot_in=filterprioritynot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterincident_statuseq=filterincident_statuseq, + filterincident_statusnot_eq=filterincident_statusnot_eq, + filterincident_statusin=filterincident_statusin, + filterincident_statusnot_in=filterincident_statusnot_in, + sort=sort, + ) + ).parsed 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 2225114c..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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}/action_items".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/action_items".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentActionItemList | None: if response.status_code == 200: response_200 = IncidentActionItemList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +51,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentActionItemList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentActionItemList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentActionItemList]: - """ List incident action items + """List incident action items List incident action items @@ -93,15 +86,13 @@ def sync_detailed( Returns: Response[IncidentActionItemList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +101,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, @@ -117,9 +109,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentActionItemList | None: - """ List incident action items + """List incident action items List incident action items @@ -135,18 +126,17 @@ def sync( Returns: IncidentActionItemList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( incident_id: str, *, @@ -154,9 +144,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentActionItemList]: - """ List incident action items + """List incident action items List incident action items @@ -172,23 +161,20 @@ async def asyncio_detailed( Returns: Response[IncidentActionItemList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, @@ -196,9 +182,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentActionItemList | None: - """ List incident action items + """List incident action items List incident action items @@ -214,14 +199,14 @@ async def asyncio( Returns: IncidentActionItemList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 fa9e5b6c..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentActionItem, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/action_items/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/action_items/{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 | IncidentActionItemResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentActionItemResponse | None: if response.status_code == 200: response_200 = IncidentActionItemResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentActionItemResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentActionItemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentActionItem, - ) -> Response[ErrorsList | IncidentActionItemResponse]: - """ Update an incident action item + """Update an incident action item Update a specific incident action item by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentActionItem, - ) -> ErrorsList | IncidentActionItemResponse | None: - """ Update an incident action item + """Update an incident action item Update a specific incident action item by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentActionItemResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentActionItem, - ) -> Response[ErrorsList | IncidentActionItemResponse]: - """ Update an incident action item + """Update an incident action item Update a specific incident action item by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentActionItemResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentActionItem, - ) -> ErrorsList | IncidentActionItemResponse | None: - """ Update an incident action item + """Update an incident action item Update a specific incident action item by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentActionItemResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_event_functionalities/__init__.py b/rootly_sdk/api/incident_event_functionalities/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_event_functionalities/__init__.py +++ b/rootly_sdk/api/incident_event_functionalities/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 0ee3636d..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 @@ -16,50 +16,40 @@ def _get_kwargs( incident_event_id: str, *, body: NewIncidentEventFunctionality, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/events/{incident_event_id}/functionalities".format(incident_event_id=quote(str(incident_event_id), safe=""),), + "url": "/v1/events/{incident_event_id}/functionalities".format( + incident_event_id=quote(str(incident_event_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 | IncidentEventFunctionalityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventFunctionalityResponse | None: if response.status_code == 201: response_201 = IncidentEventFunctionalityResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentEventFunctionality, - ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """ Creates an incident event functionality + """Creates an incident event functionality Creates a new event functionality from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ - + """ kwargs = _get_kwargs( incident_event_id=incident_event_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventFunctionality, - ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """ Creates an incident event functionality + """Creates an incident event functionality Creates a new event functionality from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - + """ return sync_detailed( incident_event_id=incident_event_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventFunctionality, - ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """ Creates an incident event functionality + """Creates an incident event functionality Creates a new event functionality from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ - + """ kwargs = _get_kwargs( incident_event_id=incident_event_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventFunctionality, - ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """ Creates an incident event functionality + """Creates an incident event functionality Creates a new event functionality from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - - - return (await asyncio_detailed( - incident_event_id=incident_event_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_event_id=incident_event_id, + client=client, + body=body, + ) + ).parsed 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 cd943b9a..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_event_functionalities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_event_functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventFunctionalityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventFunctionalityResponse | None: if response.status_code == 200: response_200 = IncidentEventFunctionalityResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """ Delete an incident event functionality + """Delete an incident event functionality Delete a specific incident event functionality by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """ Delete an incident event functionality + """Delete an incident event functionality Delete a specific incident event functionality by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """ Delete an incident event functionality + """Delete an incident event functionality Delete a specific incident event functionality by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """ Delete an incident event functionality + """Delete an incident event functionality Delete a specific incident event functionality by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 df4477cd..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_event_functionalities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_event_functionalities/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventFunctionalityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventFunctionalityResponse | None: if response.status_code == 200: response_200 = IncidentEventFunctionalityResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """ Retrieves an incident event functionality + """Retrieves an incident event functionality Retrieves a specific incident_event_functionality by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """ Retrieves an incident event functionality + """Retrieves an incident event functionality Retrieves a specific incident_event_functionality by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """ Retrieves an incident event functionality + """Retrieves an incident event functionality Retrieves a specific incident_event_functionality by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """ Retrieves an incident event functionality + """Retrieves an incident event functionality Retrieves a specific incident_event_functionality by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 27262b17..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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/events/{incident_event_id}/functionalities".format(incident_event_id=quote(str(incident_event_id), safe=""),), + "url": "/v1/events/{incident_event_id}/functionalities".format( + incident_event_id=quote(str(incident_event_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentEventFunctionalityList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentEventFunctionalityList | None: if response.status_code == 200: response_200 = IncidentEventFunctionalityList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentEventFunctionalityList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentEventFunctionalityList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentEventFunctionalityList]: - """ List incident event functionalities + """List incident event functionalities List incident event functionalities @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[IncidentEventFunctionalityList] - """ - + """ kwargs = _get_kwargs( incident_event_id=incident_event_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_event_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentEventFunctionalityList | None: - """ List incident event functionalities + """List incident event functionalities List incident event functionalities @@ -135,18 +128,17 @@ def sync( Returns: IncidentEventFunctionalityList - """ - + """ return sync_detailed( incident_event_id=incident_event_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( incident_event_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentEventFunctionalityList]: - """ List incident event functionalities + """List incident event functionalities List incident event functionalities @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[IncidentEventFunctionalityList] - """ - + """ kwargs = _get_kwargs( incident_event_id=incident_event_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_event_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentEventFunctionalityList | None: - """ List incident event functionalities + """List incident event functionalities List incident event functionalities @@ -214,14 +201,14 @@ async def asyncio( Returns: IncidentEventFunctionalityList - """ - - - return (await asyncio_detailed( - incident_event_id=incident_event_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_event_id=incident_event_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 a9aa0308..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentEventFunctionality, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_event_functionalities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_event_functionalities/{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 | IncidentEventFunctionalityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventFunctionalityResponse | None: if response.status_code == 200: response_200 = IncidentEventFunctionalityResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentEventFunctionality, - ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """ Update an incident event + """Update an incident event Update a specific incident event functionality by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventFunctionality, - ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """ Update an incident event + """Update an incident event Update a specific incident event functionality by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventFunctionality, - ) -> Response[ErrorsList | IncidentEventFunctionalityResponse]: - """ Update an incident event + """Update an incident event Update a specific incident event functionality by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventFunctionalityResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventFunctionality, - ) -> ErrorsList | IncidentEventFunctionalityResponse | None: - """ Update an incident event + """Update an incident event Update a specific incident event functionality by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventFunctionalityResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_event_services/__init__.py b/rootly_sdk/api/incident_event_services/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_event_services/__init__.py +++ b/rootly_sdk/api/incident_event_services/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 30d48d80..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 @@ -16,50 +16,40 @@ def _get_kwargs( incident_event_id: str, *, body: NewIncidentEventService, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/events/{incident_event_id}/services".format(incident_event_id=quote(str(incident_event_id), safe=""),), + "url": "/v1/events/{incident_event_id}/services".format( + incident_event_id=quote(str(incident_event_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 | IncidentEventServiceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventServiceResponse | None: if response.status_code == 201: response_201 = IncidentEventServiceResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventServiceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentEventService, - ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """ Creates an incident event service + """Creates an incident event service Creates a new event service from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ - + """ kwargs = _get_kwargs( incident_event_id=incident_event_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventService, - ) -> ErrorsList | IncidentEventServiceResponse | None: - """ Creates an incident event service + """Creates an incident event service Creates a new event service from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentEventServiceResponse - """ - + """ return sync_detailed( incident_event_id=incident_event_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventService, - ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """ Creates an incident event service + """Creates an incident event service Creates a new event service from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ - + """ kwargs = _get_kwargs( incident_event_id=incident_event_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_event_id: str, *, client: AuthenticatedClient, body: NewIncidentEventService, - ) -> ErrorsList | IncidentEventServiceResponse | None: - """ Creates an incident event service + """Creates an incident event service Creates a new event service from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventServiceResponse - """ - - - return (await asyncio_detailed( - incident_event_id=incident_event_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_event_id=incident_event_id, + client=client, + body=body, + ) + ).parsed 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 dc764c79..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_event_services/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_event_services/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventServiceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventServiceResponse | None: if response.status_code == 200: response_200 = IncidentEventServiceResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventServiceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """ Delete an incident event functionalitu + """Delete an incident event functionalitu Delete a specific incident event service by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventServiceResponse | None: - """ Delete an incident event functionalitu + """Delete an incident event functionalitu Delete a specific incident event service by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentEventServiceResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """ Delete an incident event functionalitu + """Delete an incident event functionalitu Delete a specific incident event service by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventServiceResponse | None: - """ Delete an incident event functionalitu + """Delete an incident event functionalitu Delete a specific incident event service by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventServiceResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 a2e1c94c..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_event_services/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_event_services/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventServiceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventServiceResponse | None: if response.status_code == 200: response_200 = IncidentEventServiceResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventServiceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """ Retrieves an incident event service + """Retrieves an incident event service Retrieves a specific incident_event_service by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventServiceResponse | None: - """ Retrieves an incident event service + """Retrieves an incident event service Retrieves a specific incident_event_service by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentEventServiceResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """ Retrieves an incident event service + """Retrieves an incident event service Retrieves a specific incident_event_service by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventServiceResponse | None: - """ Retrieves an incident event service + """Retrieves an incident event service Retrieves a specific incident_event_service by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventServiceResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 897be651..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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/events/{incident_event_id}/services".format(incident_event_id=quote(str(incident_event_id), safe=""),), + "url": "/v1/events/{incident_event_id}/services".format( + incident_event_id=quote(str(incident_event_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentEventServiceList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentEventServiceList | None: if response.status_code == 200: response_200 = IncidentEventServiceList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentEventServiceList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentEventServiceList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentEventServiceList]: - """ List incident event services + """List incident event services List incident event services @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[IncidentEventServiceList] - """ - + """ kwargs = _get_kwargs( incident_event_id=incident_event_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_event_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentEventServiceList | None: - """ List incident event services + """List incident event services List incident event services @@ -135,18 +128,17 @@ def sync( Returns: IncidentEventServiceList - """ - + """ return sync_detailed( incident_event_id=incident_event_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( incident_event_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentEventServiceList]: - """ List incident event services + """List incident event services List incident event services @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[IncidentEventServiceList] - """ - + """ kwargs = _get_kwargs( incident_event_id=incident_event_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_event_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentEventServiceList | None: - """ List incident event services + """List incident event services List incident event services @@ -214,14 +201,14 @@ async def asyncio( Returns: IncidentEventServiceList - """ - - - return (await asyncio_detailed( - incident_event_id=incident_event_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_event_id=incident_event_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 9fcc8ac2..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentEventService, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_event_services/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_event_services/{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 | IncidentEventServiceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventServiceResponse | None: if response.status_code == 200: response_200 = IncidentEventServiceResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventServiceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentEventService, - ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """ Update an incident event + """Update an incident event Update a specific incident event service by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventService, - ) -> ErrorsList | IncidentEventServiceResponse | None: - """ Update an incident event + """Update an incident event Update a specific incident event service by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentEventServiceResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventService, - ) -> Response[ErrorsList | IncidentEventServiceResponse]: - """ Update an incident event + """Update an incident event Update a specific incident event service by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEventService, - ) -> ErrorsList | IncidentEventServiceResponse | None: - """ Update an incident event + """Update an incident event Update a specific incident event service by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventServiceResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_events/__init__.py b/rootly_sdk/api/incident_events/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_events/__init__.py +++ b/rootly_sdk/api/incident_events/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/incident_events/create_incident_event.py b/rootly_sdk/api/incident_events/create_incident_event.py index 975fdd15..443576f9 100644 --- a/rootly_sdk/api/incident_events/create_incident_event.py +++ b/rootly_sdk/api/incident_events/create_incident_event.py @@ -16,50 +16,40 @@ def _get_kwargs( incident_id: str, *, body: NewIncidentEvent, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/events".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/events".format( + incident_id=quote(str(incident_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 | IncidentEventResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventResponse | None: if response.status_code == 201: response_201 = IncidentEventResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentEvent, - ) -> Response[ErrorsList | IncidentEventResponse]: - """ Creates an incident event + """Creates an incident event Creates a new event from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentEvent, - ) -> ErrorsList | IncidentEventResponse | None: - """ Creates an incident event + """Creates an incident event Creates a new event from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentEventResponse - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentEvent, - ) -> Response[ErrorsList | IncidentEventResponse]: - """ Creates an incident event + """Creates an incident event Creates a new event from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentEvent, - ) -> ErrorsList | IncidentEventResponse | None: - """ Creates an incident event + """Creates an incident event Creates a new event from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventResponse - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_events/delete_incident_event.py b/rootly_sdk/api/incident_events/delete_incident_event.py index dde09ce7..906602f5 100644 --- a/rootly_sdk/api/incident_events/delete_incident_event.py +++ b/rootly_sdk/api/incident_events/delete_incident_event.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/events/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/events/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventResponse | None: if response.status_code == 200: response_200 = IncidentEventResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventResponse]: - """ Delete an incident event + """Delete an incident event Delete a specific incident event by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventResponse | None: - """ Delete an incident event + """Delete an incident event Delete a specific incident event by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentEventResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventResponse]: - """ Delete an incident event + """Delete an incident event Delete a specific incident event by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventResponse | None: - """ Delete an incident event + """Delete an incident event Delete a specific incident event by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incident_events/get_incident_events.py b/rootly_sdk/api/incident_events/get_incident_events.py index 74935cfe..092a2816 100644 --- a/rootly_sdk/api/incident_events/get_incident_events.py +++ b/rootly_sdk/api/incident_events/get_incident_events.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/events/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/events/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentEventResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventResponse | None: if response.status_code == 200: response_200 = IncidentEventResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventResponse]: - """ Retrieves an incident event + """Retrieves an incident event Retrieves a specific incident_event by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventResponse | None: - """ Retrieves an incident event + """Retrieves an incident event Retrieves a specific incident_event by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentEventResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentEventResponse]: - """ Retrieves an incident event + """Retrieves an incident event Retrieves a specific incident_event by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentEventResponse | None: - """ Retrieves an incident event + """Retrieves an incident event Retrieves a specific incident_event by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentEventResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incident_events/list_incident_events.py b/rootly_sdk/api/incident_events/list_incident_events.py index e4a68f31..ddd02177 100644 --- a/rootly_sdk/api/incident_events/list_incident_events.py +++ b/rootly_sdk/api/incident_events/list_incident_events.py @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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}/events".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/events".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentEventList | None: if response.status_code == 200: response_200 = IncidentEventList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -75,9 +67,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentEventList]: - """ List incident events + """List incident events List incident events @@ -93,15 +84,13 @@ def sync_detailed( Returns: Response[IncidentEventList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +99,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, @@ -117,9 +107,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentEventList | None: - """ List incident events + """List incident events List incident events @@ -135,18 +124,17 @@ def sync( Returns: IncidentEventList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( incident_id: str, *, @@ -154,9 +142,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentEventList]: - """ List incident events + """List incident events List incident events @@ -172,23 +159,20 @@ async def asyncio_detailed( Returns: Response[IncidentEventList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, @@ -196,9 +180,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentEventList | None: - """ List incident events + """List incident events List incident events @@ -214,14 +197,14 @@ async def asyncio( Returns: IncidentEventList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/incident_events/update_incident_event.py b/rootly_sdk/api/incident_events/update_incident_event.py index 1469142f..6e364970 100644 --- a/rootly_sdk/api/incident_events/update_incident_event.py +++ b/rootly_sdk/api/incident_events/update_incident_event.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentEvent, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/events/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/events/{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 | IncidentEventResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentEventResponse | None: if response.status_code == 200: response_200 = IncidentEventResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentEventResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentEvent, - ) -> Response[ErrorsList | IncidentEventResponse]: - """ Update an incident event + """Update an incident event Update a specific incident event by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEvent, - ) -> ErrorsList | IncidentEventResponse | None: - """ Update an incident event + """Update an incident event Update a specific incident event by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentEventResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEvent, - ) -> Response[ErrorsList | IncidentEventResponse]: - """ Update an incident event + """Update an incident event Update a specific incident event by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentEvent, - ) -> ErrorsList | IncidentEventResponse | None: - """ Update an incident event + """Update an incident event Update a specific incident event by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentEventResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_feedbacks/__init__.py b/rootly_sdk/api/incident_feedbacks/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_feedbacks/__init__.py +++ b/rootly_sdk/api/incident_feedbacks/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py b/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py index 6e9c12a1..3a29fbc2 100644 --- a/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py +++ b/rootly_sdk/api/incident_feedbacks/create_incident_feedback.py @@ -16,50 +16,40 @@ def _get_kwargs( incident_id: str, *, body: NewIncidentFeedback, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/feedbacks".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/feedbacks".format( + incident_id=quote(str(incident_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 | IncidentFeedbackResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentFeedbackResponse | None: if response.status_code == 201: response_201 = IncidentFeedbackResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFeedbackResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentFeedbackResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentFeedback, - ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """ Creates an incident feedback + """Creates an incident feedback Creates a new feedback from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFeedback, - ) -> ErrorsList | IncidentFeedbackResponse | None: - """ Creates an incident feedback + """Creates an incident feedback Creates a new feedback from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentFeedbackResponse - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFeedback, - ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """ Creates an incident feedback + """Creates an incident feedback Creates a new feedback from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFeedback, - ) -> ErrorsList | IncidentFeedbackResponse | None: - """ Creates an incident feedback + """Creates an incident feedback Creates a new feedback from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentFeedbackResponse - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py b/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py index 17d06d9f..6c834602 100644 --- a/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py +++ b/rootly_sdk/api/incident_feedbacks/get_incident_feedbacks.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/feedbacks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/feedbacks/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFeedbackResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentFeedbackResponse | None: if response.status_code == 200: response_200 = IncidentFeedbackResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFeedbackResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentFeedbackResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """ Retrieves an incident feedback + """Retrieves an incident feedback Retrieves a specific incident_feedback by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentFeedbackResponse | None: - """ Retrieves an incident feedback + """Retrieves an incident feedback Retrieves a specific incident_feedback by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentFeedbackResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """ Retrieves an incident feedback + """Retrieves an incident feedback Retrieves a specific incident_feedback by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentFeedbackResponse | None: - """ Retrieves an incident feedback + """Retrieves an incident feedback Retrieves a specific incident_feedback by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentFeedbackResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py b/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py index 8a51aa0e..e9606100 100644 --- a/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py +++ b/rootly_sdk/api/incident_feedbacks/list_incident_feedbacks.py @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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}/feedbacks".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/feedbacks".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentFeedbackList | None: if response.status_code == 200: response_200 = IncidentFeedbackList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +51,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentFeedbackList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentFeedbackList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentFeedbackList]: - """ List incident feedbacks + """List incident feedbacks List incident feedbacks @@ -93,15 +86,13 @@ def sync_detailed( Returns: Response[IncidentFeedbackList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +101,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, @@ -117,9 +109,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentFeedbackList | None: - """ List incident feedbacks + """List incident feedbacks List incident feedbacks @@ -135,18 +126,17 @@ def sync( Returns: IncidentFeedbackList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( incident_id: str, *, @@ -154,9 +144,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentFeedbackList]: - """ List incident feedbacks + """List incident feedbacks List incident feedbacks @@ -172,23 +161,20 @@ async def asyncio_detailed( Returns: Response[IncidentFeedbackList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, @@ -196,9 +182,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentFeedbackList | None: - """ List incident feedbacks + """List incident feedbacks List incident feedbacks @@ -214,14 +199,14 @@ async def asyncio( Returns: IncidentFeedbackList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py b/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py index 9d4f16fc..95e97705 100644 --- a/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py +++ b/rootly_sdk/api/incident_feedbacks/update_incident_feedback.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentFeedback, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/feedbacks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/feedbacks/{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 | IncidentFeedbackResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentFeedbackResponse | None: if response.status_code == 200: response_200 = IncidentFeedbackResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFeedbackResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentFeedbackResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentFeedback, - ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """ Update an incident feedback + """Update an incident feedback Update a specific incident feedback by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFeedback, - ) -> ErrorsList | IncidentFeedbackResponse | None: - """ Update an incident feedback + """Update an incident feedback Update a specific incident feedback by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentFeedbackResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFeedback, - ) -> Response[ErrorsList | IncidentFeedbackResponse]: - """ Update an incident feedback + """Update an incident feedback Update a specific incident feedback by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFeedbackResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFeedback, - ) -> ErrorsList | IncidentFeedbackResponse | None: - """ Update an incident feedback + """Update an incident feedback Update a specific incident feedback by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentFeedbackResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_form_field_selections/__init__.py b/rootly_sdk/api/incident_form_field_selections/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_form_field_selections/__init__.py +++ b/rootly_sdk/api/incident_form_field_selections/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 5c3a915c..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 @@ -16,50 +16,40 @@ def _get_kwargs( incident_id: str, *, body: NewIncidentFormFieldSelection, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/form_field_selections".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/form_field_selections".format( + incident_id=quote(str(incident_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 | IncidentFormFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentFormFieldSelectionResponse | None: if response.status_code == 201: response_201 = IncidentFormFieldSelectionResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentFormFieldSelection, - ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """ Creates an incident form field selection + """Creates an incident form field selection Creates a new incident form field selection from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFormFieldSelection, - ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """ Creates an incident form field selection + """Creates an incident form field selection Creates a new incident form field selection from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFormFieldSelection, - ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """ Creates an incident form field selection + """Creates an incident form field selection Creates a new incident form field selection from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentFormFieldSelection, - ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """ Creates an incident form field selection + """Creates an incident form field selection Creates a new incident form field selection from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed 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 fe1cb4e3..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_form_field_selections/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_form_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFormFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentFormFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentFormFieldSelectionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """ Delete an incident form field selection + """Delete an incident form field selection Delete a specific incident form field selection by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """ Delete an incident form field selection + """Delete an incident form field selection Delete a specific incident form field selection by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """ Delete an incident form field selection + """Delete an incident form field selection Delete a specific incident form field selection by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """ Delete an incident form field selection + """Delete an incident form field selection Delete a specific incident form field selection by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 ca1a4a9f..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_form_field_selections/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_form_field_selections/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentFormFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentFormFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentFormFieldSelectionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """ Retrieves an incident form field selection + """Retrieves an incident form field selection Retrieves a specific incident form field selection by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """ Retrieves an incident form field selection + """Retrieves an incident form field selection Retrieves a specific incident form field selection by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """ Retrieves an incident form field selection + """Retrieves an incident form field selection Retrieves a specific incident form field selection by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """ Retrieves an incident form field selection + """Retrieves an incident form field selection Retrieves a specific incident form field selection by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 17c20f24..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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}/form_field_selections".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/form_field_selections".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentFormFieldSelectionList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentFormFieldSelectionList | None: if response.status_code == 200: response_200 = IncidentFormFieldSelectionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentFormFieldSelectionList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentFormFieldSelectionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentFormFieldSelectionList]: - """ List incident form field selections + """List incident form field selections List incident form field selections @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[IncidentFormFieldSelectionList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentFormFieldSelectionList | None: - """ List incident form field selections + """List incident form field selections List incident form field selections @@ -135,18 +128,17 @@ def sync( Returns: IncidentFormFieldSelectionList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( incident_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentFormFieldSelectionList]: - """ List incident form field selections + """List incident form field selections List incident form field selections @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[IncidentFormFieldSelectionList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentFormFieldSelectionList | None: - """ List incident form field selections + """List incident form field selections List incident form field selections @@ -214,14 +201,14 @@ async def asyncio( Returns: IncidentFormFieldSelectionList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 aba618af..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentFormFieldSelection, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_form_field_selections/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_form_field_selections/{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 | IncidentFormFieldSelectionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentFormFieldSelectionResponse | None: if response.status_code == 200: response_200 = IncidentFormFieldSelectionResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentFormFieldSelection, - ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """ Update an incident form field selection + """Update an incident form field selection Update a specific incident form field selection by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFormFieldSelection, - ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """ Update an incident form field selection + """Update an incident form field selection Update a specific incident form field selection by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFormFieldSelection, - ) -> Response[ErrorsList | IncidentFormFieldSelectionResponse]: - """ Update an incident form field selection + """Update an incident form field selection Update a specific incident form field selection by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentFormFieldSelectionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentFormFieldSelection, - ) -> ErrorsList | IncidentFormFieldSelectionResponse | None: - """ Update an incident form field selection + """Update an incident form field selection Update a specific incident form field selection by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentFormFieldSelectionResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_permission_set_booleans/__init__.py b/rootly_sdk/api/incident_permission_set_booleans/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_permission_set_booleans/__init__.py +++ b/rootly_sdk/api/incident_permission_set_booleans/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 607f7298..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 @@ -16,50 +16,40 @@ def _get_kwargs( incident_permission_set_id: str, *, body: NewIncidentPermissionSetBoolean, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incident_permission_sets/{incident_permission_set_id}/booleans".format(incident_permission_set_id=quote(str(incident_permission_set_id), safe=""),), + "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() - headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: if response.status_code == 201: response_201 = IncidentPermissionSetBooleanResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentPermissionSetBoolean, - ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """ Creates an incident_permission_set_boolean + """Creates an incident_permission_set_boolean Creates a new incident_permission_set_boolean from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ - + """ kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetBoolean, - ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """ Creates an incident_permission_set_boolean + """Creates an incident_permission_set_boolean Creates a new incident_permission_set_boolean from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - + """ return sync_detailed( incident_permission_set_id=incident_permission_set_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetBoolean, - ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """ Creates an incident_permission_set_boolean + """Creates an incident_permission_set_boolean Creates a new incident_permission_set_boolean from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ - + """ kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetBoolean, - ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """ Creates an incident_permission_set_boolean + """Creates an incident_permission_set_boolean Creates a new incident_permission_set_boolean from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - - - return (await asyncio_detailed( - incident_permission_set_id=incident_permission_set_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_permission_set_id=incident_permission_set_id, + client=client, + body=body, + ) + ).parsed 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 e598c884..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_permission_set_booleans/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_permission_set_booleans/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetBooleanResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """ Delete an incident_permission_set_boolean + """Delete an incident_permission_set_boolean Delete a specific incident_permission_set_boolean by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """ Delete an incident_permission_set_boolean + """Delete an incident_permission_set_boolean Delete a specific incident_permission_set_boolean by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """ Delete an incident_permission_set_boolean + """Delete an incident_permission_set_boolean Delete a specific incident_permission_set_boolean by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """ Delete an incident_permission_set_boolean + """Delete an incident_permission_set_boolean Delete a specific incident_permission_set_boolean by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 aa80c007..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_permission_set_booleans/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_permission_set_booleans/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetBooleanResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """ Retrieves an incident_permission_set_boolean + """Retrieves an incident_permission_set_boolean Retrieves a specific incident_permission_set_boolean by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """ Retrieves an incident_permission_set_boolean + """Retrieves an incident_permission_set_boolean Retrieves a specific incident_permission_set_boolean by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """ Retrieves an incident_permission_set_boolean + """Retrieves an incident_permission_set_boolean Retrieves a specific incident_permission_set_boolean by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """ Retrieves an incident_permission_set_boolean + """Retrieves an incident_permission_set_boolean Retrieves a specific incident_permission_set_boolean by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 6eff6afd..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 @@ -22,11 +22,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -48,27 +44,25 @@ def _get_kwargs( 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/incident_permission_sets/{incident_permission_set_id}/booleans".format(incident_permission_set_id=quote(str(incident_permission_set_id), safe=""),), + "url": "/v1/incident_permission_sets/{incident_permission_set_id}/booleans".format( + incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentPermissionSetBooleanList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentPermissionSetBooleanList | None: if response.status_code == 200: response_200 = IncidentPermissionSetBooleanList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -77,7 +71,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentPermissionSetBooleanList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentPermissionSetBooleanList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -99,9 +95,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentPermissionSetBooleanList]: - """ List incident_permission_set_booleans + """List incident_permission_set_booleans List incident_permission_set_booleans @@ -123,21 +118,19 @@ def sync_detailed( Returns: Response[IncidentPermissionSetBooleanList] - """ - + """ kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -146,6 +139,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_permission_set_id: str, *, @@ -159,9 +153,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentPermissionSetBooleanList | None: - """ List incident_permission_set_booleans + """List incident_permission_set_booleans List incident_permission_set_booleans @@ -183,24 +176,23 @@ def sync( Returns: IncidentPermissionSetBooleanList - """ - + """ return sync_detailed( incident_permission_set_id=incident_permission_set_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ).parsed + async def asyncio_detailed( incident_permission_set_id: str, *, @@ -214,9 +206,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentPermissionSetBooleanList]: - """ List incident_permission_set_booleans + """List incident_permission_set_booleans List incident_permission_set_booleans @@ -238,29 +229,26 @@ async def asyncio_detailed( Returns: Response[IncidentPermissionSetBooleanList] - """ - + """ kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_permission_set_id: str, *, @@ -274,9 +262,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentPermissionSetBooleanList | None: - """ List incident_permission_set_booleans + """List incident_permission_set_booleans List incident_permission_set_booleans @@ -298,20 +285,20 @@ async def asyncio( Returns: IncidentPermissionSetBooleanList - """ - - - return (await asyncio_detailed( - incident_permission_set_id=incident_permission_set_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_permission_set_id=incident_permission_set_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + 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/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 17dbb2cb..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentPermissionSetBoolean, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_permission_set_booleans/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_permission_set_booleans/{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 | IncidentPermissionSetBooleanResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetBooleanResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetBoolean, - ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """ Update an incident_permission_set_boolean + """Update an incident_permission_set_boolean Update a specific incident_permission_set_boolean by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetBoolean, - ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """ Update an incident_permission_set_boolean + """Update an incident_permission_set_boolean Update a specific incident_permission_set_boolean by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetBoolean, - ) -> Response[ErrorsList | IncidentPermissionSetBooleanResponse]: - """ Update an incident_permission_set_boolean + """Update an incident_permission_set_boolean Update a specific incident_permission_set_boolean by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetBooleanResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetBoolean, - ) -> ErrorsList | IncidentPermissionSetBooleanResponse | None: - """ Update an incident_permission_set_boolean + """Update an incident_permission_set_boolean Update a specific incident_permission_set_boolean by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetBooleanResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_permission_set_resources/__init__.py b/rootly_sdk/api/incident_permission_set_resources/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_permission_set_resources/__init__.py +++ b/rootly_sdk/api/incident_permission_set_resources/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 e45f7c5a..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 @@ -16,50 +16,40 @@ def _get_kwargs( incident_permission_set_id: str, *, body: NewIncidentPermissionSetResource, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incident_permission_sets/{incident_permission_set_id}/resources".format(incident_permission_set_id=quote(str(incident_permission_set_id), safe=""),), + "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() - headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResourceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetResourceResponse | None: if response.status_code == 201: response_201 = IncidentPermissionSetResourceResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentPermissionSetResource, - ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """ Creates an incident_permission_set_resource + """Creates an incident_permission_set_resource Creates a new incident_permission_set_resource from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ - + """ kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetResource, - ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """ Creates an incident_permission_set_resource + """Creates an incident_permission_set_resource Creates a new incident_permission_set_resource from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - + """ return sync_detailed( incident_permission_set_id=incident_permission_set_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetResource, - ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """ Creates an incident_permission_set_resource + """Creates an incident_permission_set_resource Creates a new incident_permission_set_resource from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ - + """ kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_permission_set_id: str, *, client: AuthenticatedClient, body: NewIncidentPermissionSetResource, - ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """ Creates an incident_permission_set_resource + """Creates an incident_permission_set_resource Creates a new incident_permission_set_resource from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - - - return (await asyncio_detailed( - incident_permission_set_id=incident_permission_set_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_permission_set_id=incident_permission_set_id, + client=client, + body=body, + ) + ).parsed 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 aca0ab84..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_permission_set_resources/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_permission_set_resources/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResourceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetResourceResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResourceResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """ Delete an incident_permission_set_resource + """Delete an incident_permission_set_resource Delete a specific incident_permission_set_resource by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """ Delete an incident_permission_set_resource + """Delete an incident_permission_set_resource Delete a specific incident_permission_set_resource by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """ Delete an incident_permission_set_resource + """Delete an incident_permission_set_resource Delete a specific incident_permission_set_resource by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """ Delete an incident_permission_set_resource + """Delete an incident_permission_set_resource Delete a specific incident_permission_set_resource by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 fe7af8bf..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_permission_set_resources/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_permission_set_resources/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResourceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetResourceResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResourceResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """ Retrieves an incident_permission_set_resource + """Retrieves an incident_permission_set_resource Retrieves a specific incident_permission_set_resource by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """ Retrieves an incident_permission_set_resource + """Retrieves an incident_permission_set_resource Retrieves a specific incident_permission_set_resource by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """ Retrieves an incident_permission_set_resource + """Retrieves an incident_permission_set_resource Retrieves a specific incident_permission_set_resource by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """ Retrieves an incident_permission_set_resource + """Retrieves an incident_permission_set_resource Retrieves a specific incident_permission_set_resource by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 0168fe14..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 @@ -22,11 +22,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -48,27 +44,25 @@ def _get_kwargs( 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/incident_permission_sets/{incident_permission_set_id}/resources".format(incident_permission_set_id=quote(str(incident_permission_set_id), safe=""),), + "url": "/v1/incident_permission_sets/{incident_permission_set_id}/resources".format( + incident_permission_set_id=quote(str(incident_permission_set_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentPermissionSetResourceList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentPermissionSetResourceList | None: if response.status_code == 200: response_200 = IncidentPermissionSetResourceList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -77,7 +71,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentPermissionSetResourceList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentPermissionSetResourceList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -99,9 +95,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentPermissionSetResourceList]: - """ List incident_permission_set_resources + """List incident_permission_set_resources List incident_permission_set_resources @@ -123,21 +118,19 @@ def sync_detailed( Returns: Response[IncidentPermissionSetResourceList] - """ - + """ kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -146,6 +139,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_permission_set_id: str, *, @@ -159,9 +153,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentPermissionSetResourceList | None: - """ List incident_permission_set_resources + """List incident_permission_set_resources List incident_permission_set_resources @@ -183,24 +176,23 @@ def sync( Returns: IncidentPermissionSetResourceList - """ - + """ return sync_detailed( incident_permission_set_id=incident_permission_set_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ).parsed + async def asyncio_detailed( incident_permission_set_id: str, *, @@ -214,9 +206,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentPermissionSetResourceList]: - """ List incident_permission_set_resources + """List incident_permission_set_resources List incident_permission_set_resources @@ -238,29 +229,26 @@ async def asyncio_detailed( Returns: Response[IncidentPermissionSetResourceList] - """ - + """ kwargs = _get_kwargs( incident_permission_set_id=incident_permission_set_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_permission_set_id: str, *, @@ -274,9 +262,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentPermissionSetResourceList | None: - """ List incident_permission_set_resources + """List incident_permission_set_resources List incident_permission_set_resources @@ -298,20 +285,20 @@ async def asyncio( Returns: IncidentPermissionSetResourceList - """ - - - return (await asyncio_detailed( - incident_permission_set_id=incident_permission_set_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_permission_set_id=incident_permission_set_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + 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/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 eecff994..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentPermissionSetResource, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_permission_set_resources/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_permission_set_resources/{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 | IncidentPermissionSetResourceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetResourceResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResourceResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetResource, - ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """ Update an incident_permission_set_resource + """Update an incident_permission_set_resource Update a specific incident_permission_set_resource by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetResource, - ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """ Update an incident_permission_set_resource + """Update an incident_permission_set_resource Update a specific incident_permission_set_resource by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetResource, - ) -> Response[ErrorsList | IncidentPermissionSetResourceResponse]: - """ Update an incident_permission_set_resource + """Update an incident_permission_set_resource Update a specific incident_permission_set_resource by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResourceResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSetResource, - ) -> ErrorsList | IncidentPermissionSetResourceResponse | None: - """ Update an incident_permission_set_resource + """Update an incident_permission_set_resource Update a specific incident_permission_set_resource by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResourceResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_permission_sets/__init__.py b/rootly_sdk/api/incident_permission_sets/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_permission_sets/__init__.py +++ b/rootly_sdk/api/incident_permission_sets/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 89ebb0de..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 @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewIncidentPermissionSet, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incident_permission_sets", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | IncidentPermissionSetResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetResponse | None: if response.status_code == 201: response_201 = IncidentPermissionSetResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentPermissionSet, - ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """ Creates an incident_permission_set + """Creates an incident_permission_set Creates a new incident_permission_set from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewIncidentPermissionSet, - ) -> ErrorsList | IncidentPermissionSetResponse | None: - """ Creates an incident_permission_set + """Creates an incident_permission_set Creates a new incident_permission_set from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewIncidentPermissionSet, - ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """ Creates an incident_permission_set + """Creates an incident_permission_set Creates a new incident_permission_set from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewIncidentPermissionSet, - ) -> ErrorsList | IncidentPermissionSetResponse | None: - """ Creates an incident_permission_set + """Creates an incident_permission_set Creates a new incident_permission_set from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed 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 296efca0..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 @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_permission_sets/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_permission_sets/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """ Delete an incident_permission_set + """Delete an incident_permission_set Delete a specific incident_permission_set by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetResponse | None: - """ Delete an incident_permission_set + """Delete an incident_permission_set Delete a specific incident_permission_set by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """ Delete an incident_permission_set + """Delete an incident_permission_set Delete a specific incident_permission_set by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetResponse | None: - """ Delete an incident_permission_set + """Delete an incident_permission_set Delete a specific incident_permission_set by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 39700ce7..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 @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_permission_sets/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_permission_sets/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPermissionSetResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """ Retrieves an incident_permission_set + """Retrieves an incident_permission_set Retrieves a specific incident_permission_set by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetResponse | None: - """ Retrieves an incident_permission_set + """Retrieves an incident_permission_set Retrieves a specific incident_permission_set by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """ Retrieves an incident_permission_set + """Retrieves an incident_permission_set Retrieves a specific incident_permission_set by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPermissionSetResponse | None: - """ Retrieves an incident_permission_set + """Retrieves an incident_permission_set Retrieves a specific incident_permission_set by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 a1683617..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 @@ -22,11 +22,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -52,27 +48,23 @@ def _get_kwargs( 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/incident_permission_sets", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentPermissionSetList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentPermissionSetList | None: if response.status_code == 200: response_200 = IncidentPermissionSetList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -81,7 +73,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentPermissionSetList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentPermissionSetList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -104,9 +98,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentPermissionSetList]: - """ List incident_permission_sets + """List incident_permission_sets List incident_permission_sets @@ -129,22 +122,20 @@ def sync_detailed( Returns: Response[IncidentPermissionSetList] - """ - + """ kwargs = _get_kwargs( include=include, -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, - + 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( @@ -153,6 +144,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -167,9 +159,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentPermissionSetList | None: - """ List incident_permission_sets + """List incident_permission_sets List incident_permission_sets @@ -192,25 +183,24 @@ def sync( Returns: IncidentPermissionSetList - """ - + """ return sync_detailed( client=client, -include=include, -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, - + include=include, + 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, @@ -225,9 +215,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentPermissionSetList]: - """ List incident_permission_sets + """List incident_permission_sets List incident_permission_sets @@ -250,30 +239,27 @@ async def asyncio_detailed( Returns: Response[IncidentPermissionSetList] - """ - + """ kwargs = _get_kwargs( include=include, -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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -288,9 +274,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentPermissionSetList | None: - """ List incident_permission_sets + """List incident_permission_sets List incident_permission_sets @@ -313,21 +298,21 @@ async def asyncio( Returns: IncidentPermissionSetList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -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 + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + 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/incident_permission_sets/update_incident_permission_set.py b/rootly_sdk/api/incident_permission_sets/update_incident_permission_set.py index 339db3e5..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 @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateIncidentPermissionSet, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_permission_sets/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_permission_sets/{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 | IncidentPermissionSetResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPermissionSetResponse | None: if response.status_code == 200: response_200 = IncidentPermissionSetResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPermissionSetResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPermissionSetResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, - ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """ Update an incident_permission_set + """Update an incident_permission_set Update a specific incident_permission_set by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, - ) -> ErrorsList | IncidentPermissionSetResponse | None: - """ Update an incident_permission_set + """Update an incident_permission_set Update a specific incident_permission_set by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentPermissionSetResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, - ) -> Response[ErrorsList | IncidentPermissionSetResponse]: - """ Update an incident_permission_set + """Update an incident_permission_set Update a specific incident_permission_set by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPermissionSetResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPermissionSet, - ) -> ErrorsList | IncidentPermissionSetResponse | None: - """ Update an incident_permission_set + """Update an incident_permission_set Update a specific incident_permission_set by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentPermissionSetResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_retrospective_steps/__init__.py b/rootly_sdk/api/incident_retrospective_steps/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_retrospective_steps/__init__.py +++ b/rootly_sdk/api/incident_retrospective_steps/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 603a5c40..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_retrospective_steps/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_retrospective_steps/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRetrospectiveStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRetrospectiveStepResponse | None: if response.status_code == 200: response_200 = IncidentRetrospectiveStepResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: - """ Retrieves an incident retrospective step + """Retrieves an incident retrospective step Retrieves a specific incident retrospective step by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRetrospectiveStepResponse | None: - """ Retrieves an incident retrospective step + """Retrieves an incident retrospective step Retrieves a specific incident retrospective step by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentRetrospectiveStepResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: - """ Retrieves an incident retrospective step + """Retrieves an incident retrospective step Retrieves a specific incident retrospective step by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRetrospectiveStepResponse | None: - """ Retrieves an incident retrospective step + """Retrieves an incident retrospective step Retrieves a specific incident retrospective step by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentRetrospectiveStepResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 1d483eba..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentRetrospectiveStep, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_retrospective_steps/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_retrospective_steps/{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 | IncidentRetrospectiveStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRetrospectiveStepResponse | None: if response.status_code == 200: response_200 = IncidentRetrospectiveStepResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentRetrospectiveStep, - ) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: - """ Update an incident retrospective step + """Update an incident retrospective step Update a specific incident retrospective step by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRetrospectiveStep, - ) -> ErrorsList | IncidentRetrospectiveStepResponse | None: - """ Update an incident retrospective step + """Update an incident retrospective step Update a specific incident retrospective step by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentRetrospectiveStepResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRetrospectiveStep, - ) -> Response[ErrorsList | IncidentRetrospectiveStepResponse]: - """ Update an incident retrospective step + """Update an incident retrospective step Update a specific incident retrospective step by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRetrospectiveStep, - ) -> ErrorsList | IncidentRetrospectiveStepResponse | None: - """ Update an incident retrospective step + """Update an incident retrospective step Update a specific incident retrospective step by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentRetrospectiveStepResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_retrospectives/__init__.py b/rootly_sdk/api/incident_retrospectives/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_retrospectives/__init__.py +++ b/rootly_sdk/api/incident_retrospectives/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 034a4883..1c183c5c 100644 --- a/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py +++ b/rootly_sdk/api/incident_retrospectives/list_incident_post_mortems.py @@ -48,11 +48,7 @@ def _get_kwargs( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -130,27 +126,21 @@ def _get_kwargs( 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/post_mortems", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentPostMortemList | None: if response.status_code == 200: response_200 = IncidentPostMortemList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -159,7 +149,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentPostMortemList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentPostMortemList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -208,9 +200,8 @@ def sync_detailed( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentPostMortemList]: - """ List incident retrospectives + """List incident retrospectives List incident retrospectives @@ -259,48 +250,46 @@ def sync_detailed( Returns: Response[IncidentPostMortemList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterstatus=filterstatus, -filterseverity=filterseverity, -filtertype=filtertype, -filteruser_id=filteruser_id, -filtertypes=filtertypes, -filtertype_ids=filtertype_ids, -filterenvironments=filterenvironments, -filterenvironment_ids=filterenvironment_ids, -filterfunctionalities=filterfunctionalities, -filterfunctionality_ids=filterfunctionality_ids, -filterservices=filterservices, -filterservice_ids=filterservice_ids, -filterteams=filterteams, -filterteam_ids=filterteam_ids, -filtercauses=filtercauses, -filtercause_ids=filtercause_ids, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filtermitigated_atgt=filtermitigated_atgt, -filtermitigated_atgte=filtermitigated_atgte, -filtermitigated_atlt=filtermitigated_atlt, -filtermitigated_atlte=filtermitigated_atlte, -filterresolved_atgt=filterresolved_atgt, -filterresolved_atgte=filterresolved_atgte, -filterresolved_atlt=filterresolved_atlt, -filterresolved_atlte=filterresolved_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterstatus=filterstatus, + filterseverity=filterseverity, + filtertype=filtertype, + filteruser_id=filteruser_id, + filtertypes=filtertypes, + filtertype_ids=filtertype_ids, + filterenvironments=filterenvironments, + filterenvironment_ids=filterenvironment_ids, + filterfunctionalities=filterfunctionalities, + filterfunctionality_ids=filterfunctionality_ids, + filterservices=filterservices, + filterservice_ids=filterservice_ids, + filterteams=filterteams, + filterteam_ids=filterteam_ids, + filtercauses=filtercauses, + filtercause_ids=filtercause_ids, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filtermitigated_atgt=filtermitigated_atgt, + filtermitigated_atgte=filtermitigated_atgte, + filtermitigated_atlt=filtermitigated_atlt, + filtermitigated_atlte=filtermitigated_atlte, + filterresolved_atgt=filterresolved_atgt, + filterresolved_atgte=filterresolved_atgte, + filterresolved_atlt=filterresolved_atlt, + filterresolved_atlte=filterresolved_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -309,6 +298,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -349,9 +339,8 @@ def sync( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentPostMortemList | None: - """ List incident retrospectives + """List incident retrospectives List incident retrospectives @@ -400,51 +389,50 @@ def sync( Returns: IncidentPostMortemList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterstatus=filterstatus, -filterseverity=filterseverity, -filtertype=filtertype, -filteruser_id=filteruser_id, -filtertypes=filtertypes, -filtertype_ids=filtertype_ids, -filterenvironments=filterenvironments, -filterenvironment_ids=filterenvironment_ids, -filterfunctionalities=filterfunctionalities, -filterfunctionality_ids=filterfunctionality_ids, -filterservices=filterservices, -filterservice_ids=filterservice_ids, -filterteams=filterteams, -filterteam_ids=filterteam_ids, -filtercauses=filtercauses, -filtercause_ids=filtercause_ids, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filtermitigated_atgt=filtermitigated_atgt, -filtermitigated_atgte=filtermitigated_atgte, -filtermitigated_atlt=filtermitigated_atlt, -filtermitigated_atlte=filtermitigated_atlte, -filterresolved_atgt=filterresolved_atgt, -filterresolved_atgte=filterresolved_atgte, -filterresolved_atlt=filterresolved_atlt, -filterresolved_atlte=filterresolved_atlte, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterstatus=filterstatus, + filterseverity=filterseverity, + filtertype=filtertype, + filteruser_id=filteruser_id, + filtertypes=filtertypes, + filtertype_ids=filtertype_ids, + filterenvironments=filterenvironments, + filterenvironment_ids=filterenvironment_ids, + filterfunctionalities=filterfunctionalities, + filterfunctionality_ids=filterfunctionality_ids, + filterservices=filterservices, + filterservice_ids=filterservice_ids, + filterteams=filterteams, + filterteam_ids=filterteam_ids, + filtercauses=filtercauses, + filtercause_ids=filtercause_ids, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filtermitigated_atgt=filtermitigated_atgt, + filtermitigated_atgte=filtermitigated_atgte, + filtermitigated_atlt=filtermitigated_atlt, + filtermitigated_atlte=filtermitigated_atlte, + filterresolved_atgt=filterresolved_atgt, + filterresolved_atgte=filterresolved_atgte, + filterresolved_atlt=filterresolved_atlt, + filterresolved_atlte=filterresolved_atlte, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -485,9 +473,8 @@ async def asyncio_detailed( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentPostMortemList]: - """ List incident retrospectives + """List incident retrospectives List incident retrospectives @@ -536,56 +523,53 @@ async def asyncio_detailed( Returns: Response[IncidentPostMortemList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterstatus=filterstatus, -filterseverity=filterseverity, -filtertype=filtertype, -filteruser_id=filteruser_id, -filtertypes=filtertypes, -filtertype_ids=filtertype_ids, -filterenvironments=filterenvironments, -filterenvironment_ids=filterenvironment_ids, -filterfunctionalities=filterfunctionalities, -filterfunctionality_ids=filterfunctionality_ids, -filterservices=filterservices, -filterservice_ids=filterservice_ids, -filterteams=filterteams, -filterteam_ids=filterteam_ids, -filtercauses=filtercauses, -filtercause_ids=filtercause_ids, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filtermitigated_atgt=filtermitigated_atgt, -filtermitigated_atgte=filtermitigated_atgte, -filtermitigated_atlt=filtermitigated_atlt, -filtermitigated_atlte=filtermitigated_atlte, -filterresolved_atgt=filterresolved_atgt, -filterresolved_atgte=filterresolved_atgte, -filterresolved_atlt=filterresolved_atlt, -filterresolved_atlte=filterresolved_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterstatus=filterstatus, + filterseverity=filterseverity, + filtertype=filtertype, + filteruser_id=filteruser_id, + filtertypes=filtertypes, + filtertype_ids=filtertype_ids, + filterenvironments=filterenvironments, + filterenvironment_ids=filterenvironment_ids, + filterfunctionalities=filterfunctionalities, + filterfunctionality_ids=filterfunctionality_ids, + filterservices=filterservices, + filterservice_ids=filterservice_ids, + filterteams=filterteams, + filterteam_ids=filterteam_ids, + filtercauses=filtercauses, + filtercause_ids=filtercause_ids, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filtermitigated_atgt=filtermitigated_atgt, + filtermitigated_atgte=filtermitigated_atgte, + filtermitigated_atlt=filtermitigated_atlt, + filtermitigated_atlte=filtermitigated_atlte, + filterresolved_atgt=filterresolved_atgt, + filterresolved_atgte=filterresolved_atgte, + filterresolved_atlt=filterresolved_atlt, + filterresolved_atlte=filterresolved_atlte, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -626,9 +610,8 @@ async def asyncio( filterresolved_atlt: str | Unset = UNSET, filterresolved_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentPostMortemList | None: - """ List incident retrospectives + """List incident retrospectives List incident retrospectives @@ -677,47 +660,47 @@ async def asyncio( Returns: IncidentPostMortemList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterstatus=filterstatus, -filterseverity=filterseverity, -filtertype=filtertype, -filteruser_id=filteruser_id, -filtertypes=filtertypes, -filtertype_ids=filtertype_ids, -filterenvironments=filterenvironments, -filterenvironment_ids=filterenvironment_ids, -filterfunctionalities=filterfunctionalities, -filterfunctionality_ids=filterfunctionality_ids, -filterservices=filterservices, -filterservice_ids=filterservice_ids, -filterteams=filterteams, -filterteam_ids=filterteam_ids, -filtercauses=filtercauses, -filtercause_ids=filtercause_ids, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filtermitigated_atgt=filtermitigated_atgt, -filtermitigated_atgte=filtermitigated_atgte, -filtermitigated_atlt=filtermitigated_atlt, -filtermitigated_atlte=filtermitigated_atlte, -filterresolved_atgt=filterresolved_atgt, -filterresolved_atgte=filterresolved_atgte, -filterresolved_atlt=filterresolved_atlt, -filterresolved_atlte=filterresolved_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterstatus=filterstatus, + filterseverity=filterseverity, + filtertype=filtertype, + filteruser_id=filteruser_id, + filtertypes=filtertypes, + filtertype_ids=filtertype_ids, + filterenvironments=filterenvironments, + filterenvironment_ids=filterenvironment_ids, + filterfunctionalities=filterfunctionalities, + filterfunctionality_ids=filterfunctionality_ids, + filterservices=filterservices, + filterservice_ids=filterservice_ids, + filterteams=filterteams, + filterteam_ids=filterteam_ids, + filtercauses=filtercauses, + filtercause_ids=filtercause_ids, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filtermitigated_atgt=filtermitigated_atgt, + filtermitigated_atgte=filtermitigated_atgte, + filtermitigated_atlt=filtermitigated_atlt, + filtermitigated_atlte=filtermitigated_atlte, + filterresolved_atgt=filterresolved_atgt, + filterresolved_atgte=filterresolved_atgte, + filterresolved_atlt=filterresolved_atlt, + filterresolved_atlte=filterresolved_atlte, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py b/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py index 79242118..0914afba 100644 --- a/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py +++ b/rootly_sdk/api/incident_retrospectives/list_incident_postmortem.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/post_mortems/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/post_mortems/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentPostMortemResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPostMortemResponse | None: if response.status_code == 200: response_200 = IncidentPostMortemResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPostMortemResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPostMortemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPostMortemResponse]: - """ Retrieves an incident retrospective + """Retrieves an incident retrospective List incidents retrospectives @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPostMortemResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPostMortemResponse | None: - """ Retrieves an incident retrospective + """Retrieves an incident retrospective List incidents retrospectives @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | IncidentPostMortemResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentPostMortemResponse]: - """ Retrieves an incident retrospective + """Retrieves an incident retrospective List incidents retrospectives @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPostMortemResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentPostMortemResponse | None: - """ Retrieves an incident retrospective + """Retrieves an incident retrospective List incidents retrospectives @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | IncidentPostMortemResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py b/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py index 46ae4974..226bb3b4 100644 --- a/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py +++ b/rootly_sdk/api/incident_retrospectives/update_incident_postmortem.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateIncidentPostMortem, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/post_mortems/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/post_mortems/{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 | IncidentPostMortemResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentPostMortemResponse | None: if response.status_code == 200: response_200 = IncidentPostMortemResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentPostMortemResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentPostMortemResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, - ) -> Response[ErrorsList | IncidentPostMortemResponse]: - """ Update an incident retrospective + """Update an incident retrospective Update a specific incident retrospective by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentPostMortemResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, - ) -> ErrorsList | IncidentPostMortemResponse | None: - """ Update an incident retrospective + """Update an incident retrospective Update a specific incident retrospective by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentPostMortemResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, - ) -> Response[ErrorsList | IncidentPostMortemResponse]: - """ Update an incident retrospective + """Update an incident retrospective Update a specific incident retrospective by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentPostMortemResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentPostMortem, - ) -> ErrorsList | IncidentPostMortemResponse | None: - """ Update an incident retrospective + """Update an incident retrospective Update a specific incident retrospective by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentPostMortemResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_role_tasks/__init__.py b/rootly_sdk/api/incident_role_tasks/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_role_tasks/__init__.py +++ b/rootly_sdk/api/incident_role_tasks/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 56362106..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 @@ -16,50 +16,40 @@ def _get_kwargs( incident_role_id: str, *, body: NewIncidentRoleTask, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incident_roles/{incident_role_id}/incident_role_tasks".format(incident_role_id=quote(str(incident_role_id), safe=""),), + "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() - headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRoleTaskResponse | None: if response.status_code == 201: response_201 = IncidentRoleTaskResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRoleTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentRoleTask, - ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """ Creates an incident role task + """Creates an incident role task Creates a new task from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ - + """ kwargs = _get_kwargs( incident_role_id=incident_role_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_role_id: str, *, client: AuthenticatedClient, body: NewIncidentRoleTask, - ) -> ErrorsList | IncidentRoleTaskResponse | None: - """ Creates an incident role task + """Creates an incident role task Creates a new task from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentRoleTaskResponse - """ - + """ return sync_detailed( incident_role_id=incident_role_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_role_id: str, *, client: AuthenticatedClient, body: NewIncidentRoleTask, - ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """ Creates an incident role task + """Creates an incident role task Creates a new task from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ - + """ kwargs = _get_kwargs( incident_role_id=incident_role_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_role_id: str, *, client: AuthenticatedClient, body: NewIncidentRoleTask, - ) -> ErrorsList | IncidentRoleTaskResponse | None: - """ Creates an incident role task + """Creates an incident role task Creates a new task from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentRoleTaskResponse - """ - - - return (await asyncio_detailed( - incident_role_id=incident_role_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_role_id=incident_role_id, + client=client, + body=body, + ) + ).parsed 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 160b9bb0..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_role_tasks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_role_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRoleTaskResponse | None: if response.status_code == 200: response_200 = IncidentRoleTaskResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRoleTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """ Delete an incident role task + """Delete an incident role task Delete a specific incident_role task by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRoleTaskResponse | None: - """ Delete an incident role task + """Delete an incident role task Delete a specific incident_role task by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentRoleTaskResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """ Delete an incident role task + """Delete an incident role task Delete a specific incident_role task by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRoleTaskResponse | None: - """ Delete an incident role task + """Delete an incident role task Delete a specific incident_role task by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleTaskResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 4b763173..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_role_tasks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_role_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRoleTaskResponse | None: if response.status_code == 200: response_200 = IncidentRoleTaskResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRoleTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """ Retrieves an incident role task + """Retrieves an incident role task Retrieves a specific incident_role_task by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRoleTaskResponse | None: - """ Retrieves an incident role task + """Retrieves an incident role task Retrieves a specific incident_role_task by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentRoleTaskResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """ Retrieves an incident role task + """Retrieves an incident role task Retrieves a specific incident_role_task by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRoleTaskResponse | None: - """ Retrieves an incident role task + """Retrieves an incident role task Retrieves a specific incident_role_task by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleTaskResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 4f911371..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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/incident_roles/{incident_role_id}/incident_role_tasks".format(incident_role_id=quote(str(incident_role_id), safe=""),), + "url": "/v1/incident_roles/{incident_role_id}/incident_role_tasks".format( + incident_role_id=quote(str(incident_role_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentRoleTaskList | None: if response.status_code == 200: response_200 = IncidentRoleTaskList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +51,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentRoleTaskList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentRoleTaskList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentRoleTaskList]: - """ List incident role tasks + """List incident role tasks List incident_role tasks @@ -93,15 +86,13 @@ def sync_detailed( Returns: Response[IncidentRoleTaskList] - """ - + """ kwargs = _get_kwargs( incident_role_id=incident_role_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +101,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_role_id: str, *, @@ -117,9 +109,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentRoleTaskList | None: - """ List incident role tasks + """List incident role tasks List incident_role tasks @@ -135,18 +126,17 @@ def sync( Returns: IncidentRoleTaskList - """ - + """ return sync_detailed( incident_role_id=incident_role_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( incident_role_id: str, *, @@ -154,9 +144,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentRoleTaskList]: - """ List incident role tasks + """List incident role tasks List incident_role tasks @@ -172,23 +161,20 @@ async def asyncio_detailed( Returns: Response[IncidentRoleTaskList] - """ - + """ kwargs = _get_kwargs( incident_role_id=incident_role_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_role_id: str, *, @@ -196,9 +182,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentRoleTaskList | None: - """ List incident role tasks + """List incident role tasks List incident_role tasks @@ -214,14 +199,14 @@ async def asyncio( Returns: IncidentRoleTaskList - """ - - - return (await asyncio_detailed( - incident_role_id=incident_role_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_role_id=incident_role_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 7b7f591b..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentRoleTask, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_role_tasks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_role_tasks/{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 | IncidentRoleTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRoleTaskResponse | None: if response.status_code == 200: response_200 = IncidentRoleTaskResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRoleTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentRoleTask, - ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """ Update an incident role task + """Update an incident role task Update a specific incident_role task by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRoleTask, - ) -> ErrorsList | IncidentRoleTaskResponse | None: - """ Update an incident role task + """Update an incident role task Update a specific incident_role task by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentRoleTaskResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRoleTask, - ) -> Response[ErrorsList | IncidentRoleTaskResponse]: - """ Update an incident role task + """Update an incident role task Update a specific incident_role task by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentRoleTask, - ) -> ErrorsList | IncidentRoleTaskResponse | None: - """ Update an incident role task + """Update an incident role task Update a specific incident_role task by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentRoleTaskResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_roles/__init__.py b/rootly_sdk/api/incident_roles/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_roles/__init__.py +++ b/rootly_sdk/api/incident_roles/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/incident_roles/create_incident_role.py b/rootly_sdk/api/incident_roles/create_incident_role.py index 1c153986..6b747e39 100644 --- a/rootly_sdk/api/incident_roles/create_incident_role.py +++ b/rootly_sdk/api/incident_roles/create_incident_role.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewIncidentRole, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incident_roles", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | IncidentRoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRoleResponse | None: if response.status_code == 201: response_201 = IncidentRoleResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentRole, - ) -> Response[ErrorsList | IncidentRoleResponse]: - """ Creates an incident role + """Creates an incident role Creates a new incident role from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewIncidentRole, - ) -> ErrorsList | IncidentRoleResponse | None: - """ Creates an incident role + """Creates an incident role Creates a new incident role from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | IncidentRoleResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewIncidentRole, - ) -> Response[ErrorsList | IncidentRoleResponse]: - """ Creates an incident role + """Creates an incident role Creates a new incident role from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewIncidentRole, - ) -> ErrorsList | IncidentRoleResponse | None: - """ Creates an incident role + """Creates an incident role Creates a new incident role from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_roles/delete_incident_role.py b/rootly_sdk/api/incident_roles/delete_incident_role.py index dd9d1304..82e614df 100644 --- a/rootly_sdk/api/incident_roles/delete_incident_role.py +++ b/rootly_sdk/api/incident_roles/delete_incident_role.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_roles/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_roles/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRoleResponse | None: if response.status_code == 200: response_200 = IncidentRoleResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRoleResponse]: - """ Delete an incident role + """Delete an incident role Delete a specific incident_role by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRoleResponse | None: - """ Delete an incident role + """Delete an incident role Delete a specific incident_role by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | IncidentRoleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRoleResponse]: - """ Delete an incident role + """Delete an incident role Delete a specific incident_role by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRoleResponse | None: - """ Delete an incident role + """Delete an incident role Delete a specific incident_role by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incident_roles/get_incident_role.py b/rootly_sdk/api/incident_roles/get_incident_role.py index 7f7d2000..17763838 100644 --- a/rootly_sdk/api/incident_roles/get_incident_role.py +++ b/rootly_sdk/api/incident_roles/get_incident_role.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_roles/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_roles/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentRoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRoleResponse | None: if response.status_code == 200: response_200 = IncidentRoleResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRoleResponse]: - """ Retrieves an incident role + """Retrieves an incident role Retrieves a specific incident_role by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRoleResponse | None: - """ Retrieves an incident role + """Retrieves an incident role Retrieves a specific incident_role by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | IncidentRoleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentRoleResponse]: - """ Retrieves an incident role + """Retrieves an incident role Retrieves a specific incident_role by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentRoleResponse | None: - """ Retrieves an incident role + """Retrieves an incident role Retrieves a specific incident_role by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | IncidentRoleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incident_roles/list_incident_roles.py b/rootly_sdk/api/incident_roles/list_incident_roles.py index b2203ed5..3d27e9e4 100644 --- a/rootly_sdk/api/incident_roles/list_incident_roles.py +++ b/rootly_sdk/api/incident_roles/list_incident_roles.py @@ -34,11 +34,7 @@ def _get_kwargs( filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -88,27 +84,21 @@ def _get_kwargs( 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/incident_roles", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentRoleList | None: if response.status_code == 200: response_200 = IncidentRoleList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -152,9 +142,8 @@ def sync_detailed( filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentRoleList]: - """ List incident roles + """List incident roles List incident roles @@ -189,34 +178,32 @@ def sync_detailed( Returns: Response[IncidentRoleList] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -225,6 +212,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -251,9 +239,8 @@ def sync( filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentRoleList | None: - """ List incident roles + """List incident roles List incident roles @@ -288,37 +275,36 @@ def sync( Returns: IncidentRoleList - """ - + """ return sync_detailed( client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -345,9 +331,8 @@ async def asyncio_detailed( filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentRoleList]: - """ List incident roles + """List incident roles List incident roles @@ -382,42 +367,39 @@ async def asyncio_detailed( Returns: Response[IncidentRoleList] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -444,9 +426,8 @@ async def asyncio( filterenabledin: str | Unset = UNSET, filterenablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentRoleList | None: - """ List incident roles + """List incident roles List incident roles @@ -481,33 +462,33 @@ async def asyncio( Returns: IncidentRoleList - """ - - - return (await asyncio_detailed( - client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterenabledeq=filterenabledeq, -filterenablednot_eq=filterenablednot_eq, -filterenabledin=filterenabledin, -filterenablednot_in=filterenablednot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterenabledeq=filterenabledeq, + filterenablednot_eq=filterenablednot_eq, + filterenabledin=filterenabledin, + filterenablednot_in=filterenablednot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/incident_roles/update_incident_role.py b/rootly_sdk/api/incident_roles/update_incident_role.py index 552ee1be..e9c102f3 100644 --- a/rootly_sdk/api/incident_roles/update_incident_role.py +++ b/rootly_sdk/api/incident_roles/update_incident_role.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateIncidentRole, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_roles/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_roles/{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 | IncidentRoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentRoleResponse | None: if response.status_code == 200: response_200 = IncidentRoleResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentRoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentRole, - ) -> Response[ErrorsList | IncidentRoleResponse]: - """ Update an incident role + """Update an incident role Update a specific incident_role by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, - ) -> ErrorsList | IncidentRoleResponse | None: - """ Update an incident role + """Update an incident role Update a specific incident_role by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentRoleResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, - ) -> Response[ErrorsList | IncidentRoleResponse]: - """ Update an incident role + """Update an incident role Update a specific incident_role by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentRole, - ) -> ErrorsList | IncidentRoleResponse | None: - """ Update an incident role + """Update an incident role Update a specific incident_role by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentRoleResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_status_page_events/__init__.py b/rootly_sdk/api/incident_status_page_events/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_status_page_events/__init__.py +++ b/rootly_sdk/api/incident_status_page_events/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 05586429..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 @@ -16,50 +16,40 @@ def _get_kwargs( incident_id: str, *, body: NewIncidentStatusPageEvent, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/status-page-events".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/status-page-events".format( + incident_id=quote(str(incident_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 | IncidentStatusPageEventResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentStatusPageEventResponse | None: if response.status_code == 201: response_201 = IncidentStatusPageEventResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentStatusPageEventResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentStatusPageEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentStatusPageEvent, - ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """ Creates an incident status page event + """Creates an incident status page event Creates a new event from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentStatusPageEvent, - ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """ Creates an incident status page event + """Creates an incident status page event Creates a new event from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentStatusPageEvent, - ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """ Creates an incident status page event + """Creates an incident status page event Creates a new event from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentStatusPageEvent, - ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """ Creates an incident status page event + """Creates an incident status page event Creates a new event from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed 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 1f6a16c5..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/status-page-events/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/status-page-events/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentStatusPageEventResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentStatusPageEventResponse | None: if response.status_code == 200: response_200 = IncidentStatusPageEventResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentStatusPageEventResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentStatusPageEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """ Delete an incident status page event + """Delete an incident status page event Delete a specific incident status page event by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """ Delete an incident status page event + """Delete an incident status page event Delete a specific incident status page event by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """ Delete an incident status page event + """Delete an incident status page event Delete a specific incident status page event by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """ Delete an incident status page event + """Delete an incident status page event Delete a specific incident status page event by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 9c9f3d57..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/status-page-events/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/status-page-events/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentStatusPageEventResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentStatusPageEventResponse | None: if response.status_code == 200: response_200 = IncidentStatusPageEventResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentStatusPageEventResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentStatusPageEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """ Retrieves an incident status page event + """Retrieves an incident status page event Retrieves a specific incident_status_page_event by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """ Retrieves an incident status page event + """Retrieves an incident status page event Retrieves a specific incident_status_page_event by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """ Retrieves an incident status page event + """Retrieves an incident status page event Retrieves a specific incident_status_page_event by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """ Retrieves an incident status page event + """Retrieves an incident status page event Retrieves a specific incident_status_page_event by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 d5a39b10..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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}/status-page-events".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/status-page-events".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentStatusPageEventList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentStatusPageEventList | None: if response.status_code == 200: response_200 = IncidentStatusPageEventList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentStatusPageEventList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentStatusPageEventList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentStatusPageEventList]: - """ List incident status page events + """List incident status page events List incident status page events @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[IncidentStatusPageEventList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentStatusPageEventList | None: - """ List incident status page events + """List incident status page events List incident status page events @@ -135,18 +128,17 @@ def sync( Returns: IncidentStatusPageEventList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( incident_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[IncidentStatusPageEventList]: - """ List incident status page events + """List incident status page events List incident status page events @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[IncidentStatusPageEventList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> IncidentStatusPageEventList | None: - """ List incident status page events + """List incident status page events List incident status page events @@ -214,14 +201,14 @@ async def asyncio( Returns: IncidentStatusPageEventList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 6415222e..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateIncidentStatusPageEvent, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/status-page-events/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/status-page-events/{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 | IncidentStatusPageEventResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentStatusPageEventResponse | None: if response.status_code == 200: response_200 = IncidentStatusPageEventResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentStatusPageEventResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentStatusPageEventResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentStatusPageEvent, - ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """ Update an incident status page event + """Update an incident status page event Update a specific incident status page event by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentStatusPageEvent, - ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """ Update an incident status page event + """Update an incident status page event Update a specific incident status page event by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentStatusPageEvent, - ) -> Response[ErrorsList | IncidentStatusPageEventResponse]: - """ Update an incident status page event + """Update an incident status page event Update a specific incident status page event by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentStatusPageEventResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentStatusPageEvent, - ) -> ErrorsList | IncidentStatusPageEventResponse | None: - """ Update an incident status page event + """Update an incident status page event Update a specific incident status page event by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentStatusPageEventResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_sub_statuses/__init__.py b/rootly_sdk/api/incident_sub_statuses/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_sub_statuses/__init__.py +++ b/rootly_sdk/api/incident_sub_statuses/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 48f87f92..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 @@ -16,43 +16,35 @@ def _get_kwargs( incident_id: str, *, body: NewIncidentSubStatus, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/sub_statuses".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/sub_statuses".format( + incident_id=quote(str(incident_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 | IncidentSubStatusResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentSubStatusResponse | None: if response.status_code == 201: response_201 = IncidentSubStatusResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentSubStatusResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentSubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentSubStatus, - ) -> Response[ErrorsList | IncidentSubStatusResponse]: - """ Creates a sub-status assignment + """Creates a sub-status assignment Creates a new sub-status assignment from provided data @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentSubStatusResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentSubStatus, - ) -> ErrorsList | IncidentSubStatusResponse | None: - """ Creates a sub-status assignment + """Creates a sub-status assignment Creates a new sub-status assignment from provided data @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentSubStatusResponse - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentSubStatus, - ) -> Response[ErrorsList | IncidentSubStatusResponse]: - """ Creates a sub-status assignment + """Creates a sub-status assignment Creates a new sub-status assignment from provided data @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentSubStatusResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: NewIncidentSubStatus, - ) -> ErrorsList | IncidentSubStatusResponse | None: - """ Creates a sub-status assignment + """Creates a sub-status assignment Creates a new sub-status assignment from provided data @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentSubStatusResponse - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed 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 6c50b875..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_sub_statuses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentSubStatusResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentSubStatusResponse | None: if response.status_code == 200: response_200 = IncidentSubStatusResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentSubStatusResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentSubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentSubStatusResponse]: - """ Delete an incident_sub_status + """Delete an incident_sub_status Delete a specific incident_sub_status by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentSubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentSubStatusResponse | None: - """ Delete an incident_sub_status + """Delete an incident_sub_status Delete a specific incident_sub_status by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | IncidentSubStatusResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentSubStatusResponse]: - """ Delete an incident_sub_status + """Delete an incident_sub_status Delete a specific incident_sub_status by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentSubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentSubStatusResponse | None: - """ Delete an incident_sub_status + """Delete an incident_sub_status Delete a specific incident_sub_status by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | IncidentSubStatusResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 c26ecbb7..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 @@ -15,11 +15,7 @@ def _get_kwargs( id: str, *, include: GetIncidentSubStatusInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -29,27 +25,25 @@ def _get_kwargs( params["include"] = json_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/incident_sub_statuses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentSubStatusResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentSubStatusResponse | None: if response.status_code == 200: response_200 = IncidentSubStatusResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -58,7 +52,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentSubStatusResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentSubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +68,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetIncidentSubStatusInclude | Unset = UNSET, - ) -> Response[IncidentSubStatusResponse]: - """ Retrieves incident_sub_status + """Retrieves incident_sub_status Retrieves a specific incident_sub_status by id @@ -88,13 +83,11 @@ def sync_detailed( Returns: Response[IncidentSubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -103,14 +96,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetIncidentSubStatusInclude | Unset = UNSET, - ) -> IncidentSubStatusResponse | None: - """ Retrieves incident_sub_status + """Retrieves incident_sub_status Retrieves a specific incident_sub_status by id @@ -124,24 +117,22 @@ def sync( Returns: IncidentSubStatusResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetIncidentSubStatusInclude | Unset = UNSET, - ) -> Response[IncidentSubStatusResponse]: - """ Retrieves incident_sub_status + """Retrieves incident_sub_status Retrieves a specific incident_sub_status by id @@ -155,29 +146,25 @@ async def asyncio_detailed( Returns: Response[IncidentSubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetIncidentSubStatusInclude | Unset = UNSET, - ) -> IncidentSubStatusResponse | None: - """ Retrieves incident_sub_status + """Retrieves incident_sub_status Retrieves a specific incident_sub_status by id @@ -191,12 +178,12 @@ async def asyncio( Returns: IncidentSubStatusResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed 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 2ba54f65..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 @@ -26,11 +26,7 @@ def _get_kwargs( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -60,27 +56,23 @@ def _get_kwargs( params["filter[assigned_at][lte]"] = filterassigned_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/incidents/{incident_id}/sub_statuses".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/sub_statuses".format( + incident_id=quote(str(incident_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentSubStatusList | None: if response.status_code == 200: response_200 = IncidentSubStatusList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -89,7 +81,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentSubStatusList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentSubStatusList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -111,9 +105,8 @@ def sync_detailed( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, - ) -> Response[IncidentSubStatusList]: - """ List incident_sub_statuses + """List incident_sub_statuses List incident_sub_statuses @@ -135,21 +128,19 @@ def sync_detailed( Returns: Response[IncidentSubStatusList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersub_status_id=filtersub_status_id, -filterassigned_atgt=filterassigned_atgt, -filterassigned_atgte=filterassigned_atgte, -filterassigned_atlt=filterassigned_atlt, -filterassigned_atlte=filterassigned_atlte, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersub_status_id=filtersub_status_id, + filterassigned_atgt=filterassigned_atgt, + filterassigned_atgte=filterassigned_atgte, + filterassigned_atlt=filterassigned_atlt, + filterassigned_atlte=filterassigned_atlte, ) response = client.get_httpx_client().request( @@ -158,6 +149,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, @@ -171,9 +163,8 @@ def sync( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, - ) -> IncidentSubStatusList | None: - """ List incident_sub_statuses + """List incident_sub_statuses List incident_sub_statuses @@ -195,24 +186,23 @@ def sync( Returns: IncidentSubStatusList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersub_status_id=filtersub_status_id, -filterassigned_atgt=filterassigned_atgt, -filterassigned_atgte=filterassigned_atgte, -filterassigned_atlt=filterassigned_atlt, -filterassigned_atlte=filterassigned_atlte, - + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersub_status_id=filtersub_status_id, + filterassigned_atgt=filterassigned_atgt, + filterassigned_atgte=filterassigned_atgte, + filterassigned_atlt=filterassigned_atlt, + filterassigned_atlte=filterassigned_atlte, ).parsed + async def asyncio_detailed( incident_id: str, *, @@ -226,9 +216,8 @@ async def asyncio_detailed( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, - ) -> Response[IncidentSubStatusList]: - """ List incident_sub_statuses + """List incident_sub_statuses List incident_sub_statuses @@ -250,29 +239,26 @@ async def asyncio_detailed( Returns: Response[IncidentSubStatusList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersub_status_id=filtersub_status_id, -filterassigned_atgt=filterassigned_atgt, -filterassigned_atgte=filterassigned_atgte, -filterassigned_atlt=filterassigned_atlt, -filterassigned_atlte=filterassigned_atlte, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersub_status_id=filtersub_status_id, + filterassigned_atgt=filterassigned_atgt, + filterassigned_atgte=filterassigned_atgte, + filterassigned_atlt=filterassigned_atlt, + filterassigned_atlte=filterassigned_atlte, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, @@ -286,9 +272,8 @@ async def asyncio( filterassigned_atgte: str | Unset = UNSET, filterassigned_atlt: str | Unset = UNSET, filterassigned_atlte: str | Unset = UNSET, - ) -> IncidentSubStatusList | None: - """ List incident_sub_statuses + """List incident_sub_statuses List incident_sub_statuses @@ -310,20 +295,20 @@ async def asyncio( Returns: IncidentSubStatusList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersub_status_id=filtersub_status_id, -filterassigned_atgt=filterassigned_atgt, -filterassigned_atgte=filterassigned_atgte, -filterassigned_atlt=filterassigned_atlt, -filterassigned_atlte=filterassigned_atlte, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersub_status_id=filtersub_status_id, + filterassigned_atgt=filterassigned_atgt, + filterassigned_atgte=filterassigned_atgte, + filterassigned_atlt=filterassigned_atlt, + filterassigned_atlte=filterassigned_atlte, + ) + ).parsed 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 26e18642..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 @@ -15,36 +15,30 @@ def _get_kwargs( id: str, *, body: UpdateIncidentSubStatus, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_sub_statuses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_sub_statuses/{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) -> IncidentSubStatusResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> IncidentSubStatusResponse | None: if response.status_code == 200: response_200 = IncidentSubStatusResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -53,7 +47,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[IncidentSubStatusResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[IncidentSubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,9 +63,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentSubStatus, - ) -> Response[IncidentSubStatusResponse]: - """ Update incident_sub_status + """Update incident_sub_status Update a specific incident_sub_status by id @@ -83,13 +78,11 @@ def sync_detailed( Returns: Response[IncidentSubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -98,14 +91,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateIncidentSubStatus, - ) -> IncidentSubStatusResponse | None: - """ Update incident_sub_status + """Update incident_sub_status Update a specific incident_sub_status by id @@ -119,24 +112,22 @@ def sync( Returns: IncidentSubStatusResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateIncidentSubStatus, - ) -> Response[IncidentSubStatusResponse]: - """ Update incident_sub_status + """Update incident_sub_status Update a specific incident_sub_status by id @@ -150,29 +141,25 @@ async def asyncio_detailed( Returns: Response[IncidentSubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateIncidentSubStatus, - ) -> IncidentSubStatusResponse | None: - """ Update incident_sub_status + """Update incident_sub_status Update a specific incident_sub_status by id @@ -186,12 +173,12 @@ async def asyncio( Returns: IncidentSubStatusResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incident_types/__init__.py b/rootly_sdk/api/incident_types/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incident_types/__init__.py +++ b/rootly_sdk/api/incident_types/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/incident_types/create_incident_type.py b/rootly_sdk/api/incident_types/create_incident_type.py index 77d54d91..d54679eb 100644 --- a/rootly_sdk/api/incident_types/create_incident_type.py +++ b/rootly_sdk/api/incident_types/create_incident_type.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewIncidentType, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incident_types", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | IncidentTypeResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentTypeResponse | None: if response.status_code == 201: response_201 = IncidentTypeResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentTypeResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentTypeResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncidentType, - ) -> Response[ErrorsList | IncidentTypeResponse]: - """ Creates an incident type + """Creates an incident type Creates a new incident_type from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewIncidentType, - ) -> ErrorsList | IncidentTypeResponse | None: - """ Creates an incident type + """Creates an incident type Creates a new incident_type from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | IncidentTypeResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewIncidentType, - ) -> Response[ErrorsList | IncidentTypeResponse]: - """ Creates an incident type + """Creates an incident type Creates a new incident_type from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewIncidentType, - ) -> ErrorsList | IncidentTypeResponse | None: - """ Creates an incident type + """Creates an incident type Creates a new incident_type from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | IncidentTypeResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed 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 index c0240412..7a8b50ab 100644 --- a/rootly_sdk/api/incident_types/create_incident_type_catalog_property.py +++ b/rootly_sdk/api/incident_types/create_incident_type_catalog_property.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCatalogProperty, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incident_types/properties", @@ -30,34 +24,28 @@ def _get_kwargs( _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: +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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> CatalogPropertyResponse | ErrorsList | None: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -127,22 +114,20 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + 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 16edd65f..c6f0addd 100644 --- a/rootly_sdk/api/incident_types/delete_incident_type.py +++ b/rootly_sdk/api/incident_types/delete_incident_type.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incident_types/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_types/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentTypeResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentTypeResponse | None: if response.status_code == 200: response_200 = IncidentTypeResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentTypeResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentTypeResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentTypeResponse]: - """ Delete an incident type + """Delete an incident type Delete a specific incident_type by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentTypeResponse | None: - """ Delete an incident type + """Delete an incident type Delete a specific incident_type by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | IncidentTypeResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentTypeResponse]: - """ Delete an incident type + """Delete an incident type Delete a specific incident_type by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentTypeResponse | None: - """ Delete an incident type + """Delete an incident type Delete a specific incident_type by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | IncidentTypeResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incident_types/get_incident_type.py b/rootly_sdk/api/incident_types/get_incident_type.py index 4832ffa4..598b47e2 100644 --- a/rootly_sdk/api/incident_types/get_incident_type.py +++ b/rootly_sdk/api/incident_types/get_incident_type.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/incident_types/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_types/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentTypeResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentTypeResponse | None: if response.status_code == 200: response_200 = IncidentTypeResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentTypeResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentTypeResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentTypeResponse]: - """ Retrieves an incident type + """Retrieves an incident type Retrieves a specific incident_type by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentTypeResponse | None: - """ Retrieves an incident type + """Retrieves an incident type Retrieves a specific incident_type by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | IncidentTypeResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentTypeResponse]: - """ Retrieves an incident type + """Retrieves an incident type Retrieves a specific incident_type by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentTypeResponse | None: - """ Retrieves an incident type + """Retrieves an incident type Retrieves a specific incident_type by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | IncidentTypeResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).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 index 40fb0dd6..322d4536 100644 --- a/rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py +++ b/rootly_sdk/api/incident_types/list_incident_type_catalog_properties.py @@ -28,11 +28,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -66,27 +62,21 @@ def _get_kwargs( 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: @@ -118,9 +108,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List IncidentType Catalog Properties @@ -143,22 +132,20 @@ def sync_detailed( 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, - + 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( @@ -167,6 +154,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -181,9 +169,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List IncidentType Catalog Properties @@ -206,25 +193,24 @@ def sync( 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, - + 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, @@ -239,9 +225,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List IncidentType Catalog Properties @@ -264,30 +249,27 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -302,9 +284,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List IncidentType Catalog Properties @@ -327,21 +308,21 @@ async def asyncio( 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 + """ + + 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 4d745cda..ba2eeaf3 100644 --- a/rootly_sdk/api/incident_types/list_incident_types.py +++ b/rootly_sdk/api/incident_types/list_incident_types.py @@ -34,11 +34,7 @@ def _get_kwargs( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -88,27 +84,21 @@ def _get_kwargs( 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/incident_types", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IncidentTypeList | None: if response.status_code == 200: response_200 = IncidentTypeList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -152,9 +142,8 @@ def sync_detailed( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentTypeList]: - """ List incident types + """List incident types List incident types @@ -189,34 +178,32 @@ def sync_detailed( Returns: Response[IncidentTypeList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -225,6 +212,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -251,9 +239,8 @@ def sync( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentTypeList | None: - """ List incident types + """List incident types List incident types @@ -288,37 +275,36 @@ def sync( Returns: IncidentTypeList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -345,9 +331,8 @@ async def asyncio_detailed( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[IncidentTypeList]: - """ List incident types + """List incident types List incident types @@ -382,42 +367,39 @@ async def asyncio_detailed( Returns: Response[IncidentTypeList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -444,9 +426,8 @@ async def asyncio( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> IncidentTypeList | None: - """ List incident types + """List incident types List incident types @@ -481,33 +462,33 @@ async def asyncio( Returns: IncidentTypeList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/incident_types/update_incident_type.py b/rootly_sdk/api/incident_types/update_incident_type.py index 4645d120..3df712c1 100644 --- a/rootly_sdk/api/incident_types/update_incident_type.py +++ b/rootly_sdk/api/incident_types/update_incident_type.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateIncidentType, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incident_types/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incident_types/{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 | IncidentTypeResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentTypeResponse | None: if response.status_code == 200: response_200 = IncidentTypeResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentTypeResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentTypeResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncidentType, - ) -> Response[ErrorsList | IncidentTypeResponse]: - """ Update an incident type + """Update an incident type Update a specific incident_type by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, - ) -> ErrorsList | IncidentTypeResponse | None: - """ Update an incident type + """Update an incident type Update a specific incident_type by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentTypeResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, - ) -> Response[ErrorsList | IncidentTypeResponse]: - """ Update an incident type + """Update an incident type Update a specific incident_type by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentTypeResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncidentType, - ) -> ErrorsList | IncidentTypeResponse | None: - """ Update an incident type + """Update an incident type Update a specific incident_type by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentTypeResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/__init__.py b/rootly_sdk/api/incidents/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/incidents/__init__.py +++ b/rootly_sdk/api/incidents/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/incidents/add_subscribers_to_incident.py b/rootly_sdk/api/incidents/add_subscribers_to_incident.py index 5f71394f..d652ab8a 100644 --- a/rootly_sdk/api/incidents/add_subscribers_to_incident.py +++ b/rootly_sdk/api/incidents/add_subscribers_to_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: AddSubscribers, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{id}/add_subscribers".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/add_subscribers".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: AddSubscribers, - ) -> Response[ErrorsList | IncidentResponse]: - """ Add subscribers to incident + """Add subscribers to incident Add subscribers to incident @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, - ) -> ErrorsList | IncidentResponse | None: - """ Add subscribers to incident + """Add subscribers to incident Add subscribers to incident @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, - ) -> Response[ErrorsList | IncidentResponse]: - """ Add subscribers to incident + """Add subscribers to incident Add subscribers to incident @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: AddSubscribers, - ) -> ErrorsList | IncidentResponse | None: - """ Add subscribers to incident + """Add subscribers to incident Add subscribers to incident @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/assign_user_to_incident.py b/rootly_sdk/api/incidents/assign_user_to_incident.py index 0e26c8cb..183ed7ec 100644 --- a/rootly_sdk/api/incidents/assign_user_to_incident.py +++ b/rootly_sdk/api/incidents/assign_user_to_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: AssignRoleToUser, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{id}/assign_role_to_user".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/assign_role_to_user".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: AssignRoleToUser, - ) -> Response[ErrorsList | IncidentResponse]: - """ Assign user to incident + """Assign user to incident Assign user to incident @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, - ) -> ErrorsList | IncidentResponse | None: - """ Assign user to incident + """Assign user to incident Assign user to incident @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, - ) -> Response[ErrorsList | IncidentResponse]: - """ Assign user to incident + """Assign user to incident Assign user to incident @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: AssignRoleToUser, - ) -> ErrorsList | IncidentResponse | None: - """ Assign user to incident + """Assign user to incident Assign user to incident @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/cancel_incident.py b/rootly_sdk/api/incidents/cancel_incident.py index 13854e99..acdcb056 100644 --- a/rootly_sdk/api/incidents/cancel_incident.py +++ b/rootly_sdk/api/incidents/cancel_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: CancelIncident, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/cancel".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/cancel".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: CancelIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Cancel an incident + """Cancel an incident Cancel a specific incident by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Cancel an incident + """Cancel an incident Cancel a specific incident by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Cancel an incident + """Cancel an incident Cancel a specific incident by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: CancelIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Cancel an incident + """Cancel an incident Cancel a specific incident by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/create_incident.py b/rootly_sdk/api/incidents/create_incident.py index aeda7d90..5e580107 100644 --- a/rootly_sdk/api/incidents/create_incident.py +++ b/rootly_sdk/api/incidents/create_incident.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewIncident, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/incidents", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentResponse | None: if response.status_code == 201: response_201 = IncidentResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Creates an incident + """Creates an incident Creates a new incident from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Creates an incident + """Creates an incident Creates a new incident from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Creates an incident + """Creates an incident Creates a new incident from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Creates an incident + """Creates an incident Creates a new incident from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/delete_incident.py b/rootly_sdk/api/incidents/delete_incident.py index c9e45746..93326984 100644 --- a/rootly_sdk/api/incidents/delete_incident.py +++ b/rootly_sdk/api/incidents/delete_incident.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incidents/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentResponse]: - """ Delete an incident + """Delete an incident Delete a specific incident by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentResponse | None: - """ Delete an incident + """Delete an incident Delete a specific incident by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | IncidentResponse]: - """ Delete an incident + """Delete an incident Delete a specific incident by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | IncidentResponse | None: - """ Delete an incident + """Delete an incident Delete a specific incident by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/detach_from_parent_incident.py b/rootly_sdk/api/incidents/detach_from_parent_incident.py index 5b156d39..97f2e681 100644 --- a/rootly_sdk/api/incidents/detach_from_parent_incident.py +++ b/rootly_sdk/api/incidents/detach_from_parent_incident.py @@ -14,37 +14,29 @@ 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=""),), + "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: +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: @@ -57,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,9 +64,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList | IncidentResponse]: - """ Detach an incident from its parent + """Detach an incident from its parent Detach a sub-incident from its parent incident @@ -85,12 +78,10 @@ def sync_detailed( Returns: Response[Any | ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -99,13 +90,13 @@ def sync_detailed( 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 an incident from its parent Detach a sub-incident from its parent incident @@ -118,22 +109,20 @@ def sync( Returns: Any | ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList | IncidentResponse]: - """ Detach an incident from its parent + """Detach an incident from its parent Detach a sub-incident from its parent incident @@ -146,27 +135,23 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 an incident from its parent Detach a sub-incident from its parent incident @@ -179,11 +164,11 @@ async def asyncio( Returns: Any | ErrorsList | IncidentResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + 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 fdf77f96..60b93b84 100644 --- a/rootly_sdk/api/incidents/get_incident.py +++ b/rootly_sdk/api/incidents/get_incident.py @@ -17,11 +17,7 @@ def _get_kwargs( id: str | UUID, *, include: GetIncidentInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -31,34 +27,30 @@ def _get_kwargs( params["include"] = json_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/incidents/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -67,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,9 +75,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetIncidentInclude | Unset = UNSET, - ) -> Response[ErrorsList | IncidentResponse]: - """ Retrieves an incident + """Retrieves an incident Retrieves a specific incident by id @@ -97,13 +90,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -112,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetIncidentInclude | Unset = UNSET, - ) -> ErrorsList | IncidentResponse | None: - """ Retrieves an incident + """Retrieves an incident Retrieves a specific incident by id @@ -133,24 +124,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetIncidentInclude | Unset = UNSET, - ) -> Response[ErrorsList | IncidentResponse]: - """ Retrieves an incident + """Retrieves an incident Retrieves a specific incident by id @@ -164,29 +153,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetIncidentInclude | Unset = UNSET, - ) -> ErrorsList | IncidentResponse | None: - """ Retrieves an incident + """Retrieves an incident Retrieves a specific incident by id @@ -200,12 +185,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/list_incidents.py b/rootly_sdk/api/incidents/list_incidents.py index c0cd820c..f320a9cc 100644 --- a/rootly_sdk/api/incidents/list_incidents.py +++ b/rootly_sdk/api/incidents/list_incidents.py @@ -177,11 +177,7 @@ def _get_kwargs( filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -519,34 +515,28 @@ def _get_kwargs( params["include"] = json_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/incidents", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentList | None: if response.status_code == 200: response_200 = IncidentList.from_dict(response.json()) - - return response_200 if response.status_code == 400: response_400 = ErrorsList.from_dict(response.json()) - - return response_400 if client.raise_on_unexpected_status: @@ -555,7 +545,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -730,9 +722,8 @@ def sync_detailed( filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, - ) -> Response[ErrorsList | IncidentList]: - """ List incidents + """List incidents List incidents @@ -907,174 +898,172 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentList] - """ - + """ kwargs = _get_kwargs( pageafter=pageafter, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterkind=filterkind, -filterstatus=filterstatus, -filterprivate=filterprivate, -filteruser_id=filteruser_id, -filterseverity=filterseverity, -filterseverity_id=filterseverity_id, -filterlabels=filterlabels, -filtertypes=filtertypes, -filtertype_ids=filtertype_ids, -filterenvironments=filterenvironments, -filterenvironment_ids=filterenvironment_ids, -filterfunctionalities=filterfunctionalities, -filterfunctionality_ids=filterfunctionality_ids, -filterfunctionality_names=filterfunctionality_names, -filterservices=filterservices, -filterservice_ids=filterservice_ids, -filterservice_names=filterservice_names, -filterteams=filterteams, -filterteam_ids=filterteam_ids, -filterteam_names=filterteam_names, -filtercause=filtercause, -filtercause_ids=filtercause_ids, -filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, -filterslack_channel_id=filterslack_channel_id, -filtersequential_id=filtersequential_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterupdated_atgt=filterupdated_atgt, -filterupdated_atgte=filterupdated_atgte, -filterupdated_atlt=filterupdated_atlt, -filterupdated_atlte=filterupdated_atlte, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterdetected_atgt=filterdetected_atgt, -filterdetected_atgte=filterdetected_atgte, -filterdetected_atlt=filterdetected_atlt, -filterdetected_atlte=filterdetected_atlte, -filteracknowledged_atgt=filteracknowledged_atgt, -filteracknowledged_atgte=filteracknowledged_atgte, -filteracknowledged_atlt=filteracknowledged_atlt, -filteracknowledged_atlte=filteracknowledged_atlte, -filtermitigated_atgt=filtermitigated_atgt, -filtermitigated_atgte=filtermitigated_atgte, -filtermitigated_atlt=filtermitigated_atlt, -filtermitigated_atlte=filtermitigated_atlte, -filterresolved_atgt=filterresolved_atgt, -filterresolved_atgte=filterresolved_atgte, -filterresolved_atlt=filterresolved_atlt, -filterresolved_atlte=filterresolved_atlte, -filterclosed_atgt=filterclosed_atgt, -filterclosed_atgte=filterclosed_atgte, -filterclosed_atlt=filterclosed_atlt, -filterclosed_atlte=filterclosed_atlte, -filterin_triage_atgt=filterin_triage_atgt, -filterin_triage_atgte=filterin_triage_atgte, -filterin_triage_atlt=filterin_triage_atlt, -filterin_triage_atlte=filterin_triage_atlte, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filterprivateeq=filterprivateeq, -filterprivatenot_eq=filterprivatenot_eq, -filterprivatein=filterprivatein, -filterprivatenot_in=filterprivatenot_in, -filteruser_ideq=filteruser_ideq, -filteruser_idnot_eq=filteruser_idnot_eq, -filteruser_idin=filteruser_idin, -filteruser_idnot_in=filteruser_idnot_in, -filterseverityeq=filterseverityeq, -filterseveritynot_eq=filterseveritynot_eq, -filterseverityin=filterseverityin, -filterseveritynot_in=filterseveritynot_in, -filterseverity_ideq=filterseverity_ideq, -filterseverity_idnot_eq=filterseverity_idnot_eq, -filterseverity_idin=filterseverity_idin, -filterseverity_idnot_in=filterseverity_idnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, -filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, -filterzendesk_ticket_idin=filterzendesk_ticket_idin, -filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, -filtersequential_ideq=filtersequential_ideq, -filtersequential_idnot_eq=filtersequential_idnot_eq, -filtersequential_idin=filtersequential_idin, -filtersequential_idnot_in=filtersequential_idnot_in, -filtertypeseq=filtertypeseq, -filtertypesnot_eq=filtertypesnot_eq, -filtertypesin=filtertypesin, -filtertypesnot_in=filtertypesnot_in, -filtertype_idseq=filtertype_idseq, -filtertype_idsnot_eq=filtertype_idsnot_eq, -filtertype_idsin=filtertype_idsin, -filtertype_idsnot_in=filtertype_idsnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterenvironment_idseq=filterenvironment_idseq, -filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, -filterenvironment_idsin=filterenvironment_idsin, -filterenvironment_idsnot_in=filterenvironment_idsnot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filterservice_idseq=filterservice_idseq, -filterservice_idsnot_eq=filterservice_idsnot_eq, -filterservice_idsin=filterservice_idsin, -filterservice_idsnot_in=filterservice_idsnot_in, -filterservice_nameseq=filterservice_nameseq, -filterservice_namesnot_eq=filterservice_namesnot_eq, -filterservice_namesin=filterservice_namesin, -filterservice_namesnot_in=filterservice_namesnot_in, -filterfunctionalitieseq=filterfunctionalitieseq, -filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, -filterfunctionalitiesin=filterfunctionalitiesin, -filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, -filterfunctionality_idseq=filterfunctionality_idseq, -filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, -filterfunctionality_idsin=filterfunctionality_idsin, -filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, -filterfunctionality_nameseq=filterfunctionality_nameseq, -filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, -filterfunctionality_namesin=filterfunctionality_namesin, -filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, -filtercauseseq=filtercauseseq, -filtercausesnot_eq=filtercausesnot_eq, -filtercausesin=filtercausesin, -filtercausesnot_in=filtercausesnot_in, -filtercause_idseq=filtercause_idseq, -filtercause_idsnot_eq=filtercause_idsnot_eq, -filtercause_idsin=filtercause_idsin, -filtercause_idsnot_in=filtercause_idsnot_in, -filterteamseq=filterteamseq, -filterteamsnot_eq=filterteamsnot_eq, -filterteamsin=filterteamsin, -filterteamsnot_in=filterteamsnot_in, -filterteam_idseq=filterteam_idseq, -filterteam_idsnot_eq=filterteam_idsnot_eq, -filterteam_idsin=filterteam_idsin, -filterteam_idsnot_in=filterteam_idsnot_in, -filterteam_nameseq=filterteam_nameseq, -filterteam_namesnot_eq=filterteam_namesnot_eq, -filterteam_namesin=filterteam_namesin, -filterteam_namesnot_in=filterteam_namesnot_in, -sort=sort, -include=include, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterkind=filterkind, + filterstatus=filterstatus, + filterprivate=filterprivate, + filteruser_id=filteruser_id, + filterseverity=filterseverity, + filterseverity_id=filterseverity_id, + filterlabels=filterlabels, + filtertypes=filtertypes, + filtertype_ids=filtertype_ids, + filterenvironments=filterenvironments, + filterenvironment_ids=filterenvironment_ids, + filterfunctionalities=filterfunctionalities, + filterfunctionality_ids=filterfunctionality_ids, + filterfunctionality_names=filterfunctionality_names, + filterservices=filterservices, + filterservice_ids=filterservice_ids, + filterservice_names=filterservice_names, + filterteams=filterteams, + filterteam_ids=filterteam_ids, + filterteam_names=filterteam_names, + filtercause=filtercause, + filtercause_ids=filtercause_ids, + filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, + filterslack_channel_id=filterslack_channel_id, + filtersequential_id=filtersequential_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterdetected_atgt=filterdetected_atgt, + filterdetected_atgte=filterdetected_atgte, + filterdetected_atlt=filterdetected_atlt, + filterdetected_atlte=filterdetected_atlte, + filteracknowledged_atgt=filteracknowledged_atgt, + filteracknowledged_atgte=filteracknowledged_atgte, + filteracknowledged_atlt=filteracknowledged_atlt, + filteracknowledged_atlte=filteracknowledged_atlte, + filtermitigated_atgt=filtermitigated_atgt, + filtermitigated_atgte=filtermitigated_atgte, + filtermitigated_atlt=filtermitigated_atlt, + filtermitigated_atlte=filtermitigated_atlte, + filterresolved_atgt=filterresolved_atgt, + filterresolved_atgte=filterresolved_atgte, + filterresolved_atlt=filterresolved_atlt, + filterresolved_atlte=filterresolved_atlte, + filterclosed_atgt=filterclosed_atgt, + filterclosed_atgte=filterclosed_atgte, + filterclosed_atlt=filterclosed_atlt, + filterclosed_atlte=filterclosed_atlte, + filterin_triage_atgt=filterin_triage_atgt, + filterin_triage_atgte=filterin_triage_atgte, + filterin_triage_atlt=filterin_triage_atlt, + filterin_triage_atlte=filterin_triage_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterprivateeq=filterprivateeq, + filterprivatenot_eq=filterprivatenot_eq, + filterprivatein=filterprivatein, + filterprivatenot_in=filterprivatenot_in, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filterseverity_ideq=filterseverity_ideq, + filterseverity_idnot_eq=filterseverity_idnot_eq, + filterseverity_idin=filterseverity_idin, + filterseverity_idnot_in=filterseverity_idnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, + filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, + filterzendesk_ticket_idin=filterzendesk_ticket_idin, + filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, + filtersequential_ideq=filtersequential_ideq, + filtersequential_idnot_eq=filtersequential_idnot_eq, + filtersequential_idin=filtersequential_idin, + filtersequential_idnot_in=filtersequential_idnot_in, + filtertypeseq=filtertypeseq, + filtertypesnot_eq=filtertypesnot_eq, + filtertypesin=filtertypesin, + filtertypesnot_in=filtertypesnot_in, + filtertype_idseq=filtertype_idseq, + filtertype_idsnot_eq=filtertype_idsnot_eq, + filtertype_idsin=filtertype_idsin, + filtertype_idsnot_in=filtertype_idsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterenvironment_idseq=filterenvironment_idseq, + filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, + filterenvironment_idsin=filterenvironment_idsin, + filterenvironment_idsnot_in=filterenvironment_idsnot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterservice_idseq=filterservice_idseq, + filterservice_idsnot_eq=filterservice_idsnot_eq, + filterservice_idsin=filterservice_idsin, + filterservice_idsnot_in=filterservice_idsnot_in, + filterservice_nameseq=filterservice_nameseq, + filterservice_namesnot_eq=filterservice_namesnot_eq, + filterservice_namesin=filterservice_namesin, + filterservice_namesnot_in=filterservice_namesnot_in, + filterfunctionalitieseq=filterfunctionalitieseq, + filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, + filterfunctionalitiesin=filterfunctionalitiesin, + filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, + filterfunctionality_idseq=filterfunctionality_idseq, + filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, + filterfunctionality_idsin=filterfunctionality_idsin, + filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, + filterfunctionality_nameseq=filterfunctionality_nameseq, + filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, + filterfunctionality_namesin=filterfunctionality_namesin, + filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, + filtercauseseq=filtercauseseq, + filtercausesnot_eq=filtercausesnot_eq, + filtercausesin=filtercausesin, + filtercausesnot_in=filtercausesnot_in, + filtercause_idseq=filtercause_idseq, + filtercause_idsnot_eq=filtercause_idsnot_eq, + filtercause_idsin=filtercause_idsin, + filtercause_idsnot_in=filtercause_idsnot_in, + filterteamseq=filterteamseq, + filterteamsnot_eq=filterteamsnot_eq, + filterteamsin=filterteamsin, + filterteamsnot_in=filterteamsnot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + filterteam_nameseq=filterteam_nameseq, + filterteam_namesnot_eq=filterteam_namesnot_eq, + filterteam_namesin=filterteam_namesin, + filterteam_namesnot_in=filterteam_namesnot_in, + sort=sort, + include=include, ) response = client.get_httpx_client().request( @@ -1083,6 +1072,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -1249,9 +1239,8 @@ def sync( filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, - ) -> ErrorsList | IncidentList | None: - """ List incidents + """List incidents List incidents @@ -1426,177 +1415,176 @@ def sync( Returns: ErrorsList | IncidentList - """ - + """ return sync_detailed( client=client, -pageafter=pageafter, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterkind=filterkind, -filterstatus=filterstatus, -filterprivate=filterprivate, -filteruser_id=filteruser_id, -filterseverity=filterseverity, -filterseverity_id=filterseverity_id, -filterlabels=filterlabels, -filtertypes=filtertypes, -filtertype_ids=filtertype_ids, -filterenvironments=filterenvironments, -filterenvironment_ids=filterenvironment_ids, -filterfunctionalities=filterfunctionalities, -filterfunctionality_ids=filterfunctionality_ids, -filterfunctionality_names=filterfunctionality_names, -filterservices=filterservices, -filterservice_ids=filterservice_ids, -filterservice_names=filterservice_names, -filterteams=filterteams, -filterteam_ids=filterteam_ids, -filterteam_names=filterteam_names, -filtercause=filtercause, -filtercause_ids=filtercause_ids, -filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, -filterslack_channel_id=filterslack_channel_id, -filtersequential_id=filtersequential_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterupdated_atgt=filterupdated_atgt, -filterupdated_atgte=filterupdated_atgte, -filterupdated_atlt=filterupdated_atlt, -filterupdated_atlte=filterupdated_atlte, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterdetected_atgt=filterdetected_atgt, -filterdetected_atgte=filterdetected_atgte, -filterdetected_atlt=filterdetected_atlt, -filterdetected_atlte=filterdetected_atlte, -filteracknowledged_atgt=filteracknowledged_atgt, -filteracknowledged_atgte=filteracknowledged_atgte, -filteracknowledged_atlt=filteracknowledged_atlt, -filteracknowledged_atlte=filteracknowledged_atlte, -filtermitigated_atgt=filtermitigated_atgt, -filtermitigated_atgte=filtermitigated_atgte, -filtermitigated_atlt=filtermitigated_atlt, -filtermitigated_atlte=filtermitigated_atlte, -filterresolved_atgt=filterresolved_atgt, -filterresolved_atgte=filterresolved_atgte, -filterresolved_atlt=filterresolved_atlt, -filterresolved_atlte=filterresolved_atlte, -filterclosed_atgt=filterclosed_atgt, -filterclosed_atgte=filterclosed_atgte, -filterclosed_atlt=filterclosed_atlt, -filterclosed_atlte=filterclosed_atlte, -filterin_triage_atgt=filterin_triage_atgt, -filterin_triage_atgte=filterin_triage_atgte, -filterin_triage_atlt=filterin_triage_atlt, -filterin_triage_atlte=filterin_triage_atlte, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filterprivateeq=filterprivateeq, -filterprivatenot_eq=filterprivatenot_eq, -filterprivatein=filterprivatein, -filterprivatenot_in=filterprivatenot_in, -filteruser_ideq=filteruser_ideq, -filteruser_idnot_eq=filteruser_idnot_eq, -filteruser_idin=filteruser_idin, -filteruser_idnot_in=filteruser_idnot_in, -filterseverityeq=filterseverityeq, -filterseveritynot_eq=filterseveritynot_eq, -filterseverityin=filterseverityin, -filterseveritynot_in=filterseveritynot_in, -filterseverity_ideq=filterseverity_ideq, -filterseverity_idnot_eq=filterseverity_idnot_eq, -filterseverity_idin=filterseverity_idin, -filterseverity_idnot_in=filterseverity_idnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, -filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, -filterzendesk_ticket_idin=filterzendesk_ticket_idin, -filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, -filtersequential_ideq=filtersequential_ideq, -filtersequential_idnot_eq=filtersequential_idnot_eq, -filtersequential_idin=filtersequential_idin, -filtersequential_idnot_in=filtersequential_idnot_in, -filtertypeseq=filtertypeseq, -filtertypesnot_eq=filtertypesnot_eq, -filtertypesin=filtertypesin, -filtertypesnot_in=filtertypesnot_in, -filtertype_idseq=filtertype_idseq, -filtertype_idsnot_eq=filtertype_idsnot_eq, -filtertype_idsin=filtertype_idsin, -filtertype_idsnot_in=filtertype_idsnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterenvironment_idseq=filterenvironment_idseq, -filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, -filterenvironment_idsin=filterenvironment_idsin, -filterenvironment_idsnot_in=filterenvironment_idsnot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filterservice_idseq=filterservice_idseq, -filterservice_idsnot_eq=filterservice_idsnot_eq, -filterservice_idsin=filterservice_idsin, -filterservice_idsnot_in=filterservice_idsnot_in, -filterservice_nameseq=filterservice_nameseq, -filterservice_namesnot_eq=filterservice_namesnot_eq, -filterservice_namesin=filterservice_namesin, -filterservice_namesnot_in=filterservice_namesnot_in, -filterfunctionalitieseq=filterfunctionalitieseq, -filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, -filterfunctionalitiesin=filterfunctionalitiesin, -filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, -filterfunctionality_idseq=filterfunctionality_idseq, -filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, -filterfunctionality_idsin=filterfunctionality_idsin, -filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, -filterfunctionality_nameseq=filterfunctionality_nameseq, -filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, -filterfunctionality_namesin=filterfunctionality_namesin, -filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, -filtercauseseq=filtercauseseq, -filtercausesnot_eq=filtercausesnot_eq, -filtercausesin=filtercausesin, -filtercausesnot_in=filtercausesnot_in, -filtercause_idseq=filtercause_idseq, -filtercause_idsnot_eq=filtercause_idsnot_eq, -filtercause_idsin=filtercause_idsin, -filtercause_idsnot_in=filtercause_idsnot_in, -filterteamseq=filterteamseq, -filterteamsnot_eq=filterteamsnot_eq, -filterteamsin=filterteamsin, -filterteamsnot_in=filterteamsnot_in, -filterteam_idseq=filterteam_idseq, -filterteam_idsnot_eq=filterteam_idsnot_eq, -filterteam_idsin=filterteam_idsin, -filterteam_idsnot_in=filterteam_idsnot_in, -filterteam_nameseq=filterteam_nameseq, -filterteam_namesnot_eq=filterteam_namesnot_eq, -filterteam_namesin=filterteam_namesin, -filterteam_namesnot_in=filterteam_namesnot_in, -sort=sort, -include=include, - + pageafter=pageafter, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterkind=filterkind, + filterstatus=filterstatus, + filterprivate=filterprivate, + filteruser_id=filteruser_id, + filterseverity=filterseverity, + filterseverity_id=filterseverity_id, + filterlabels=filterlabels, + filtertypes=filtertypes, + filtertype_ids=filtertype_ids, + filterenvironments=filterenvironments, + filterenvironment_ids=filterenvironment_ids, + filterfunctionalities=filterfunctionalities, + filterfunctionality_ids=filterfunctionality_ids, + filterfunctionality_names=filterfunctionality_names, + filterservices=filterservices, + filterservice_ids=filterservice_ids, + filterservice_names=filterservice_names, + filterteams=filterteams, + filterteam_ids=filterteam_ids, + filterteam_names=filterteam_names, + filtercause=filtercause, + filtercause_ids=filtercause_ids, + filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, + filterslack_channel_id=filterslack_channel_id, + filtersequential_id=filtersequential_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterdetected_atgt=filterdetected_atgt, + filterdetected_atgte=filterdetected_atgte, + filterdetected_atlt=filterdetected_atlt, + filterdetected_atlte=filterdetected_atlte, + filteracknowledged_atgt=filteracknowledged_atgt, + filteracknowledged_atgte=filteracknowledged_atgte, + filteracknowledged_atlt=filteracknowledged_atlt, + filteracknowledged_atlte=filteracknowledged_atlte, + filtermitigated_atgt=filtermitigated_atgt, + filtermitigated_atgte=filtermitigated_atgte, + filtermitigated_atlt=filtermitigated_atlt, + filtermitigated_atlte=filtermitigated_atlte, + filterresolved_atgt=filterresolved_atgt, + filterresolved_atgte=filterresolved_atgte, + filterresolved_atlt=filterresolved_atlt, + filterresolved_atlte=filterresolved_atlte, + filterclosed_atgt=filterclosed_atgt, + filterclosed_atgte=filterclosed_atgte, + filterclosed_atlt=filterclosed_atlt, + filterclosed_atlte=filterclosed_atlte, + filterin_triage_atgt=filterin_triage_atgt, + filterin_triage_atgte=filterin_triage_atgte, + filterin_triage_atlt=filterin_triage_atlt, + filterin_triage_atlte=filterin_triage_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterprivateeq=filterprivateeq, + filterprivatenot_eq=filterprivatenot_eq, + filterprivatein=filterprivatein, + filterprivatenot_in=filterprivatenot_in, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filterseverity_ideq=filterseverity_ideq, + filterseverity_idnot_eq=filterseverity_idnot_eq, + filterseverity_idin=filterseverity_idin, + filterseverity_idnot_in=filterseverity_idnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, + filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, + filterzendesk_ticket_idin=filterzendesk_ticket_idin, + filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, + filtersequential_ideq=filtersequential_ideq, + filtersequential_idnot_eq=filtersequential_idnot_eq, + filtersequential_idin=filtersequential_idin, + filtersequential_idnot_in=filtersequential_idnot_in, + filtertypeseq=filtertypeseq, + filtertypesnot_eq=filtertypesnot_eq, + filtertypesin=filtertypesin, + filtertypesnot_in=filtertypesnot_in, + filtertype_idseq=filtertype_idseq, + filtertype_idsnot_eq=filtertype_idsnot_eq, + filtertype_idsin=filtertype_idsin, + filtertype_idsnot_in=filtertype_idsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterenvironment_idseq=filterenvironment_idseq, + filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, + filterenvironment_idsin=filterenvironment_idsin, + filterenvironment_idsnot_in=filterenvironment_idsnot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterservice_idseq=filterservice_idseq, + filterservice_idsnot_eq=filterservice_idsnot_eq, + filterservice_idsin=filterservice_idsin, + filterservice_idsnot_in=filterservice_idsnot_in, + filterservice_nameseq=filterservice_nameseq, + filterservice_namesnot_eq=filterservice_namesnot_eq, + filterservice_namesin=filterservice_namesin, + filterservice_namesnot_in=filterservice_namesnot_in, + filterfunctionalitieseq=filterfunctionalitieseq, + filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, + filterfunctionalitiesin=filterfunctionalitiesin, + filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, + filterfunctionality_idseq=filterfunctionality_idseq, + filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, + filterfunctionality_idsin=filterfunctionality_idsin, + filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, + filterfunctionality_nameseq=filterfunctionality_nameseq, + filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, + filterfunctionality_namesin=filterfunctionality_namesin, + filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, + filtercauseseq=filtercauseseq, + filtercausesnot_eq=filtercausesnot_eq, + filtercausesin=filtercausesin, + filtercausesnot_in=filtercausesnot_in, + filtercause_idseq=filtercause_idseq, + filtercause_idsnot_eq=filtercause_idsnot_eq, + filtercause_idsin=filtercause_idsin, + filtercause_idsnot_in=filtercause_idsnot_in, + filterteamseq=filterteamseq, + filterteamsnot_eq=filterteamsnot_eq, + filterteamsin=filterteamsin, + filterteamsnot_in=filterteamsnot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + filterteam_nameseq=filterteam_nameseq, + filterteam_namesnot_eq=filterteam_namesnot_eq, + filterteam_namesin=filterteam_namesin, + filterteam_namesnot_in=filterteam_namesnot_in, + sort=sort, + include=include, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -1763,9 +1751,8 @@ async def asyncio_detailed( filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, - ) -> Response[ErrorsList | IncidentList]: - """ List incidents + """List incidents List incidents @@ -1940,182 +1927,179 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentList] - """ - + """ kwargs = _get_kwargs( pageafter=pageafter, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterkind=filterkind, -filterstatus=filterstatus, -filterprivate=filterprivate, -filteruser_id=filteruser_id, -filterseverity=filterseverity, -filterseverity_id=filterseverity_id, -filterlabels=filterlabels, -filtertypes=filtertypes, -filtertype_ids=filtertype_ids, -filterenvironments=filterenvironments, -filterenvironment_ids=filterenvironment_ids, -filterfunctionalities=filterfunctionalities, -filterfunctionality_ids=filterfunctionality_ids, -filterfunctionality_names=filterfunctionality_names, -filterservices=filterservices, -filterservice_ids=filterservice_ids, -filterservice_names=filterservice_names, -filterteams=filterteams, -filterteam_ids=filterteam_ids, -filterteam_names=filterteam_names, -filtercause=filtercause, -filtercause_ids=filtercause_ids, -filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, -filterslack_channel_id=filterslack_channel_id, -filtersequential_id=filtersequential_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterupdated_atgt=filterupdated_atgt, -filterupdated_atgte=filterupdated_atgte, -filterupdated_atlt=filterupdated_atlt, -filterupdated_atlte=filterupdated_atlte, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterdetected_atgt=filterdetected_atgt, -filterdetected_atgte=filterdetected_atgte, -filterdetected_atlt=filterdetected_atlt, -filterdetected_atlte=filterdetected_atlte, -filteracknowledged_atgt=filteracknowledged_atgt, -filteracknowledged_atgte=filteracknowledged_atgte, -filteracknowledged_atlt=filteracknowledged_atlt, -filteracknowledged_atlte=filteracknowledged_atlte, -filtermitigated_atgt=filtermitigated_atgt, -filtermitigated_atgte=filtermitigated_atgte, -filtermitigated_atlt=filtermitigated_atlt, -filtermitigated_atlte=filtermitigated_atlte, -filterresolved_atgt=filterresolved_atgt, -filterresolved_atgte=filterresolved_atgte, -filterresolved_atlt=filterresolved_atlt, -filterresolved_atlte=filterresolved_atlte, -filterclosed_atgt=filterclosed_atgt, -filterclosed_atgte=filterclosed_atgte, -filterclosed_atlt=filterclosed_atlt, -filterclosed_atlte=filterclosed_atlte, -filterin_triage_atgt=filterin_triage_atgt, -filterin_triage_atgte=filterin_triage_atgte, -filterin_triage_atlt=filterin_triage_atlt, -filterin_triage_atlte=filterin_triage_atlte, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filterprivateeq=filterprivateeq, -filterprivatenot_eq=filterprivatenot_eq, -filterprivatein=filterprivatein, -filterprivatenot_in=filterprivatenot_in, -filteruser_ideq=filteruser_ideq, -filteruser_idnot_eq=filteruser_idnot_eq, -filteruser_idin=filteruser_idin, -filteruser_idnot_in=filteruser_idnot_in, -filterseverityeq=filterseverityeq, -filterseveritynot_eq=filterseveritynot_eq, -filterseverityin=filterseverityin, -filterseveritynot_in=filterseveritynot_in, -filterseverity_ideq=filterseverity_ideq, -filterseverity_idnot_eq=filterseverity_idnot_eq, -filterseverity_idin=filterseverity_idin, -filterseverity_idnot_in=filterseverity_idnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, -filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, -filterzendesk_ticket_idin=filterzendesk_ticket_idin, -filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, -filtersequential_ideq=filtersequential_ideq, -filtersequential_idnot_eq=filtersequential_idnot_eq, -filtersequential_idin=filtersequential_idin, -filtersequential_idnot_in=filtersequential_idnot_in, -filtertypeseq=filtertypeseq, -filtertypesnot_eq=filtertypesnot_eq, -filtertypesin=filtertypesin, -filtertypesnot_in=filtertypesnot_in, -filtertype_idseq=filtertype_idseq, -filtertype_idsnot_eq=filtertype_idsnot_eq, -filtertype_idsin=filtertype_idsin, -filtertype_idsnot_in=filtertype_idsnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterenvironment_idseq=filterenvironment_idseq, -filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, -filterenvironment_idsin=filterenvironment_idsin, -filterenvironment_idsnot_in=filterenvironment_idsnot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filterservice_idseq=filterservice_idseq, -filterservice_idsnot_eq=filterservice_idsnot_eq, -filterservice_idsin=filterservice_idsin, -filterservice_idsnot_in=filterservice_idsnot_in, -filterservice_nameseq=filterservice_nameseq, -filterservice_namesnot_eq=filterservice_namesnot_eq, -filterservice_namesin=filterservice_namesin, -filterservice_namesnot_in=filterservice_namesnot_in, -filterfunctionalitieseq=filterfunctionalitieseq, -filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, -filterfunctionalitiesin=filterfunctionalitiesin, -filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, -filterfunctionality_idseq=filterfunctionality_idseq, -filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, -filterfunctionality_idsin=filterfunctionality_idsin, -filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, -filterfunctionality_nameseq=filterfunctionality_nameseq, -filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, -filterfunctionality_namesin=filterfunctionality_namesin, -filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, -filtercauseseq=filtercauseseq, -filtercausesnot_eq=filtercausesnot_eq, -filtercausesin=filtercausesin, -filtercausesnot_in=filtercausesnot_in, -filtercause_idseq=filtercause_idseq, -filtercause_idsnot_eq=filtercause_idsnot_eq, -filtercause_idsin=filtercause_idsin, -filtercause_idsnot_in=filtercause_idsnot_in, -filterteamseq=filterteamseq, -filterteamsnot_eq=filterteamsnot_eq, -filterteamsin=filterteamsin, -filterteamsnot_in=filterteamsnot_in, -filterteam_idseq=filterteam_idseq, -filterteam_idsnot_eq=filterteam_idsnot_eq, -filterteam_idsin=filterteam_idsin, -filterteam_idsnot_in=filterteam_idsnot_in, -filterteam_nameseq=filterteam_nameseq, -filterteam_namesnot_eq=filterteam_namesnot_eq, -filterteam_namesin=filterteam_namesin, -filterteam_namesnot_in=filterteam_namesnot_in, -sort=sort, -include=include, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterkind=filterkind, + filterstatus=filterstatus, + filterprivate=filterprivate, + filteruser_id=filteruser_id, + filterseverity=filterseverity, + filterseverity_id=filterseverity_id, + filterlabels=filterlabels, + filtertypes=filtertypes, + filtertype_ids=filtertype_ids, + filterenvironments=filterenvironments, + filterenvironment_ids=filterenvironment_ids, + filterfunctionalities=filterfunctionalities, + filterfunctionality_ids=filterfunctionality_ids, + filterfunctionality_names=filterfunctionality_names, + filterservices=filterservices, + filterservice_ids=filterservice_ids, + filterservice_names=filterservice_names, + filterteams=filterteams, + filterteam_ids=filterteam_ids, + filterteam_names=filterteam_names, + filtercause=filtercause, + filtercause_ids=filtercause_ids, + filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, + filterslack_channel_id=filterslack_channel_id, + filtersequential_id=filtersequential_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterdetected_atgt=filterdetected_atgt, + filterdetected_atgte=filterdetected_atgte, + filterdetected_atlt=filterdetected_atlt, + filterdetected_atlte=filterdetected_atlte, + filteracknowledged_atgt=filteracknowledged_atgt, + filteracknowledged_atgte=filteracknowledged_atgte, + filteracknowledged_atlt=filteracknowledged_atlt, + filteracknowledged_atlte=filteracknowledged_atlte, + filtermitigated_atgt=filtermitigated_atgt, + filtermitigated_atgte=filtermitigated_atgte, + filtermitigated_atlt=filtermitigated_atlt, + filtermitigated_atlte=filtermitigated_atlte, + filterresolved_atgt=filterresolved_atgt, + filterresolved_atgte=filterresolved_atgte, + filterresolved_atlt=filterresolved_atlt, + filterresolved_atlte=filterresolved_atlte, + filterclosed_atgt=filterclosed_atgt, + filterclosed_atgte=filterclosed_atgte, + filterclosed_atlt=filterclosed_atlt, + filterclosed_atlte=filterclosed_atlte, + filterin_triage_atgt=filterin_triage_atgt, + filterin_triage_atgte=filterin_triage_atgte, + filterin_triage_atlt=filterin_triage_atlt, + filterin_triage_atlte=filterin_triage_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterprivateeq=filterprivateeq, + filterprivatenot_eq=filterprivatenot_eq, + filterprivatein=filterprivatein, + filterprivatenot_in=filterprivatenot_in, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filterseverity_ideq=filterseverity_ideq, + filterseverity_idnot_eq=filterseverity_idnot_eq, + filterseverity_idin=filterseverity_idin, + filterseverity_idnot_in=filterseverity_idnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, + filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, + filterzendesk_ticket_idin=filterzendesk_ticket_idin, + filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, + filtersequential_ideq=filtersequential_ideq, + filtersequential_idnot_eq=filtersequential_idnot_eq, + filtersequential_idin=filtersequential_idin, + filtersequential_idnot_in=filtersequential_idnot_in, + filtertypeseq=filtertypeseq, + filtertypesnot_eq=filtertypesnot_eq, + filtertypesin=filtertypesin, + filtertypesnot_in=filtertypesnot_in, + filtertype_idseq=filtertype_idseq, + filtertype_idsnot_eq=filtertype_idsnot_eq, + filtertype_idsin=filtertype_idsin, + filtertype_idsnot_in=filtertype_idsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterenvironment_idseq=filterenvironment_idseq, + filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, + filterenvironment_idsin=filterenvironment_idsin, + filterenvironment_idsnot_in=filterenvironment_idsnot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterservice_idseq=filterservice_idseq, + filterservice_idsnot_eq=filterservice_idsnot_eq, + filterservice_idsin=filterservice_idsin, + filterservice_idsnot_in=filterservice_idsnot_in, + filterservice_nameseq=filterservice_nameseq, + filterservice_namesnot_eq=filterservice_namesnot_eq, + filterservice_namesin=filterservice_namesin, + filterservice_namesnot_in=filterservice_namesnot_in, + filterfunctionalitieseq=filterfunctionalitieseq, + filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, + filterfunctionalitiesin=filterfunctionalitiesin, + filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, + filterfunctionality_idseq=filterfunctionality_idseq, + filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, + filterfunctionality_idsin=filterfunctionality_idsin, + filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, + filterfunctionality_nameseq=filterfunctionality_nameseq, + filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, + filterfunctionality_namesin=filterfunctionality_namesin, + filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, + filtercauseseq=filtercauseseq, + filtercausesnot_eq=filtercausesnot_eq, + filtercausesin=filtercausesin, + filtercausesnot_in=filtercausesnot_in, + filtercause_idseq=filtercause_idseq, + filtercause_idsnot_eq=filtercause_idsnot_eq, + filtercause_idsin=filtercause_idsin, + filtercause_idsnot_in=filtercause_idsnot_in, + filterteamseq=filterteamseq, + filterteamsnot_eq=filterteamsnot_eq, + filterteamsin=filterteamsin, + filterteamsnot_in=filterteamsnot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + filterteam_nameseq=filterteam_nameseq, + filterteam_namesnot_eq=filterteam_namesnot_eq, + filterteam_namesin=filterteam_namesin, + filterteam_namesnot_in=filterteam_namesnot_in, + sort=sort, + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -2282,9 +2266,8 @@ async def asyncio( filterteam_namesnot_in: str | Unset = UNSET, sort: ListIncidentsSort | Unset = UNSET, include: ListIncidentsInclude | Unset = UNSET, - ) -> ErrorsList | IncidentList | None: - """ List incidents + """List incidents List incidents @@ -2459,173 +2442,173 @@ async def asyncio( Returns: ErrorsList | IncidentList - """ - - - return (await asyncio_detailed( - client=client, -pageafter=pageafter, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterkind=filterkind, -filterstatus=filterstatus, -filterprivate=filterprivate, -filteruser_id=filteruser_id, -filterseverity=filterseverity, -filterseverity_id=filterseverity_id, -filterlabels=filterlabels, -filtertypes=filtertypes, -filtertype_ids=filtertype_ids, -filterenvironments=filterenvironments, -filterenvironment_ids=filterenvironment_ids, -filterfunctionalities=filterfunctionalities, -filterfunctionality_ids=filterfunctionality_ids, -filterfunctionality_names=filterfunctionality_names, -filterservices=filterservices, -filterservice_ids=filterservice_ids, -filterservice_names=filterservice_names, -filterteams=filterteams, -filterteam_ids=filterteam_ids, -filterteam_names=filterteam_names, -filtercause=filtercause, -filtercause_ids=filtercause_ids, -filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, -filterslack_channel_id=filterslack_channel_id, -filtersequential_id=filtersequential_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterupdated_atgt=filterupdated_atgt, -filterupdated_atgte=filterupdated_atgte, -filterupdated_atlt=filterupdated_atlt, -filterupdated_atlte=filterupdated_atlte, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterdetected_atgt=filterdetected_atgt, -filterdetected_atgte=filterdetected_atgte, -filterdetected_atlt=filterdetected_atlt, -filterdetected_atlte=filterdetected_atlte, -filteracknowledged_atgt=filteracknowledged_atgt, -filteracknowledged_atgte=filteracknowledged_atgte, -filteracknowledged_atlt=filteracknowledged_atlt, -filteracknowledged_atlte=filteracknowledged_atlte, -filtermitigated_atgt=filtermitigated_atgt, -filtermitigated_atgte=filtermitigated_atgte, -filtermitigated_atlt=filtermitigated_atlt, -filtermitigated_atlte=filtermitigated_atlte, -filterresolved_atgt=filterresolved_atgt, -filterresolved_atgte=filterresolved_atgte, -filterresolved_atlt=filterresolved_atlt, -filterresolved_atlte=filterresolved_atlte, -filterclosed_atgt=filterclosed_atgt, -filterclosed_atgte=filterclosed_atgte, -filterclosed_atlt=filterclosed_atlt, -filterclosed_atlte=filterclosed_atlte, -filterin_triage_atgt=filterin_triage_atgt, -filterin_triage_atgte=filterin_triage_atgte, -filterin_triage_atlt=filterin_triage_atlt, -filterin_triage_atlte=filterin_triage_atlte, -filterkindeq=filterkindeq, -filterkindnot_eq=filterkindnot_eq, -filterkindin=filterkindin, -filterkindnot_in=filterkindnot_in, -filterstatuseq=filterstatuseq, -filterstatusnot_eq=filterstatusnot_eq, -filterstatusin=filterstatusin, -filterstatusnot_in=filterstatusnot_in, -filterprivateeq=filterprivateeq, -filterprivatenot_eq=filterprivatenot_eq, -filterprivatein=filterprivatein, -filterprivatenot_in=filterprivatenot_in, -filteruser_ideq=filteruser_ideq, -filteruser_idnot_eq=filteruser_idnot_eq, -filteruser_idin=filteruser_idin, -filteruser_idnot_in=filteruser_idnot_in, -filterseverityeq=filterseverityeq, -filterseveritynot_eq=filterseveritynot_eq, -filterseverityin=filterseverityin, -filterseveritynot_in=filterseveritynot_in, -filterseverity_ideq=filterseverity_ideq, -filterseverity_idnot_eq=filterseverity_idnot_eq, -filterseverity_idin=filterseverity_idin, -filterseverity_idnot_in=filterseverity_idnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, -filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, -filterzendesk_ticket_idin=filterzendesk_ticket_idin, -filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, -filtersequential_ideq=filtersequential_ideq, -filtersequential_idnot_eq=filtersequential_idnot_eq, -filtersequential_idin=filtersequential_idin, -filtersequential_idnot_in=filtersequential_idnot_in, -filtertypeseq=filtertypeseq, -filtertypesnot_eq=filtertypesnot_eq, -filtertypesin=filtertypesin, -filtertypesnot_in=filtertypesnot_in, -filtertype_idseq=filtertype_idseq, -filtertype_idsnot_eq=filtertype_idsnot_eq, -filtertype_idsin=filtertype_idsin, -filtertype_idsnot_in=filtertype_idsnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterenvironment_idseq=filterenvironment_idseq, -filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, -filterenvironment_idsin=filterenvironment_idsin, -filterenvironment_idsnot_in=filterenvironment_idsnot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filterservice_idseq=filterservice_idseq, -filterservice_idsnot_eq=filterservice_idsnot_eq, -filterservice_idsin=filterservice_idsin, -filterservice_idsnot_in=filterservice_idsnot_in, -filterservice_nameseq=filterservice_nameseq, -filterservice_namesnot_eq=filterservice_namesnot_eq, -filterservice_namesin=filterservice_namesin, -filterservice_namesnot_in=filterservice_namesnot_in, -filterfunctionalitieseq=filterfunctionalitieseq, -filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, -filterfunctionalitiesin=filterfunctionalitiesin, -filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, -filterfunctionality_idseq=filterfunctionality_idseq, -filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, -filterfunctionality_idsin=filterfunctionality_idsin, -filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, -filterfunctionality_nameseq=filterfunctionality_nameseq, -filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, -filterfunctionality_namesin=filterfunctionality_namesin, -filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, -filtercauseseq=filtercauseseq, -filtercausesnot_eq=filtercausesnot_eq, -filtercausesin=filtercausesin, -filtercausesnot_in=filtercausesnot_in, -filtercause_idseq=filtercause_idseq, -filtercause_idsnot_eq=filtercause_idsnot_eq, -filtercause_idsin=filtercause_idsin, -filtercause_idsnot_in=filtercause_idsnot_in, -filterteamseq=filterteamseq, -filterteamsnot_eq=filterteamsnot_eq, -filterteamsin=filterteamsin, -filterteamsnot_in=filterteamsnot_in, -filterteam_idseq=filterteam_idseq, -filterteam_idsnot_eq=filterteam_idsnot_eq, -filterteam_idsin=filterteam_idsin, -filterteam_idsnot_in=filterteam_idsnot_in, -filterteam_nameseq=filterteam_nameseq, -filterteam_namesnot_eq=filterteam_namesnot_eq, -filterteam_namesin=filterteam_namesin, -filterteam_namesnot_in=filterteam_namesnot_in, -sort=sort, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + pageafter=pageafter, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterkind=filterkind, + filterstatus=filterstatus, + filterprivate=filterprivate, + filteruser_id=filteruser_id, + filterseverity=filterseverity, + filterseverity_id=filterseverity_id, + filterlabels=filterlabels, + filtertypes=filtertypes, + filtertype_ids=filtertype_ids, + filterenvironments=filterenvironments, + filterenvironment_ids=filterenvironment_ids, + filterfunctionalities=filterfunctionalities, + filterfunctionality_ids=filterfunctionality_ids, + filterfunctionality_names=filterfunctionality_names, + filterservices=filterservices, + filterservice_ids=filterservice_ids, + filterservice_names=filterservice_names, + filterteams=filterteams, + filterteam_ids=filterteam_ids, + filterteam_names=filterteam_names, + filtercause=filtercause, + filtercause_ids=filtercause_ids, + filtercustom_field_selected_option_ids=filtercustom_field_selected_option_ids, + filterslack_channel_id=filterslack_channel_id, + filtersequential_id=filtersequential_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterupdated_atgt=filterupdated_atgt, + filterupdated_atgte=filterupdated_atgte, + filterupdated_atlt=filterupdated_atlt, + filterupdated_atlte=filterupdated_atlte, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterdetected_atgt=filterdetected_atgt, + filterdetected_atgte=filterdetected_atgte, + filterdetected_atlt=filterdetected_atlt, + filterdetected_atlte=filterdetected_atlte, + filteracknowledged_atgt=filteracknowledged_atgt, + filteracknowledged_atgte=filteracknowledged_atgte, + filteracknowledged_atlt=filteracknowledged_atlt, + filteracknowledged_atlte=filteracknowledged_atlte, + filtermitigated_atgt=filtermitigated_atgt, + filtermitigated_atgte=filtermitigated_atgte, + filtermitigated_atlt=filtermitigated_atlt, + filtermitigated_atlte=filtermitigated_atlte, + filterresolved_atgt=filterresolved_atgt, + filterresolved_atgte=filterresolved_atgte, + filterresolved_atlt=filterresolved_atlt, + filterresolved_atlte=filterresolved_atlte, + filterclosed_atgt=filterclosed_atgt, + filterclosed_atgte=filterclosed_atgte, + filterclosed_atlt=filterclosed_atlt, + filterclosed_atlte=filterclosed_atlte, + filterin_triage_atgt=filterin_triage_atgt, + filterin_triage_atgte=filterin_triage_atgte, + filterin_triage_atlt=filterin_triage_atlt, + filterin_triage_atlte=filterin_triage_atlte, + filterkindeq=filterkindeq, + filterkindnot_eq=filterkindnot_eq, + filterkindin=filterkindin, + filterkindnot_in=filterkindnot_in, + filterstatuseq=filterstatuseq, + filterstatusnot_eq=filterstatusnot_eq, + filterstatusin=filterstatusin, + filterstatusnot_in=filterstatusnot_in, + filterprivateeq=filterprivateeq, + filterprivatenot_eq=filterprivatenot_eq, + filterprivatein=filterprivatein, + filterprivatenot_in=filterprivatenot_in, + filteruser_ideq=filteruser_ideq, + filteruser_idnot_eq=filteruser_idnot_eq, + filteruser_idin=filteruser_idin, + filteruser_idnot_in=filteruser_idnot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filterseverity_ideq=filterseverity_ideq, + filterseverity_idnot_eq=filterseverity_idnot_eq, + filterseverity_idin=filterseverity_idin, + filterseverity_idnot_in=filterseverity_idnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterzendesk_ticket_ideq=filterzendesk_ticket_ideq, + filterzendesk_ticket_idnot_eq=filterzendesk_ticket_idnot_eq, + filterzendesk_ticket_idin=filterzendesk_ticket_idin, + filterzendesk_ticket_idnot_in=filterzendesk_ticket_idnot_in, + filtersequential_ideq=filtersequential_ideq, + filtersequential_idnot_eq=filtersequential_idnot_eq, + filtersequential_idin=filtersequential_idin, + filtersequential_idnot_in=filtersequential_idnot_in, + filtertypeseq=filtertypeseq, + filtertypesnot_eq=filtertypesnot_eq, + filtertypesin=filtertypesin, + filtertypesnot_in=filtertypesnot_in, + filtertype_idseq=filtertype_idseq, + filtertype_idsnot_eq=filtertype_idsnot_eq, + filtertype_idsin=filtertype_idsin, + filtertype_idsnot_in=filtertype_idsnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterenvironment_idseq=filterenvironment_idseq, + filterenvironment_idsnot_eq=filterenvironment_idsnot_eq, + filterenvironment_idsin=filterenvironment_idsin, + filterenvironment_idsnot_in=filterenvironment_idsnot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterservice_idseq=filterservice_idseq, + filterservice_idsnot_eq=filterservice_idsnot_eq, + filterservice_idsin=filterservice_idsin, + filterservice_idsnot_in=filterservice_idsnot_in, + filterservice_nameseq=filterservice_nameseq, + filterservice_namesnot_eq=filterservice_namesnot_eq, + filterservice_namesin=filterservice_namesin, + filterservice_namesnot_in=filterservice_namesnot_in, + filterfunctionalitieseq=filterfunctionalitieseq, + filterfunctionalitiesnot_eq=filterfunctionalitiesnot_eq, + filterfunctionalitiesin=filterfunctionalitiesin, + filterfunctionalitiesnot_in=filterfunctionalitiesnot_in, + filterfunctionality_idseq=filterfunctionality_idseq, + filterfunctionality_idsnot_eq=filterfunctionality_idsnot_eq, + filterfunctionality_idsin=filterfunctionality_idsin, + filterfunctionality_idsnot_in=filterfunctionality_idsnot_in, + filterfunctionality_nameseq=filterfunctionality_nameseq, + filterfunctionality_namesnot_eq=filterfunctionality_namesnot_eq, + filterfunctionality_namesin=filterfunctionality_namesin, + filterfunctionality_namesnot_in=filterfunctionality_namesnot_in, + filtercauseseq=filtercauseseq, + filtercausesnot_eq=filtercausesnot_eq, + filtercausesin=filtercausesin, + filtercausesnot_in=filtercausesnot_in, + filtercause_idseq=filtercause_idseq, + filtercause_idsnot_eq=filtercause_idsnot_eq, + filtercause_idsin=filtercause_idsin, + filtercause_idsnot_in=filtercause_idsnot_in, + filterteamseq=filterteamseq, + filterteamsnot_eq=filterteamsnot_eq, + filterteamsin=filterteamsin, + filterteamsnot_in=filterteamsnot_in, + filterteam_idseq=filterteam_idseq, + filterteam_idsnot_eq=filterteam_idsnot_eq, + filterteam_idsin=filterteam_idsin, + filterteam_idsnot_in=filterteam_idsnot_in, + filterteam_nameseq=filterteam_nameseq, + filterteam_namesnot_eq=filterteam_namesnot_eq, + filterteam_namesin=filterteam_namesin, + filterteam_namesnot_in=filterteam_namesnot_in, + sort=sort, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/mark_as_duplicate_incident.py b/rootly_sdk/api/incidents/mark_as_duplicate_incident.py index 57d7fed6..e93e2b46 100644 --- a/rootly_sdk/api/incidents/mark_as_duplicate_incident.py +++ b/rootly_sdk/api/incidents/mark_as_duplicate_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: ResolveIncident, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/duplicate".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/duplicate".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: ResolveIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Mark an incident as a duplicate + """Mark an incident as a duplicate Mark an incident as a duplicate @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Mark an incident as a duplicate + """Mark an incident as a duplicate Mark an incident as a duplicate @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Mark an incident as a duplicate + """Mark an incident as a duplicate Mark an incident as a duplicate @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Mark an incident as a duplicate + """Mark an incident as a duplicate Mark an incident as a duplicate @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/mitigate_incident.py b/rootly_sdk/api/incidents/mitigate_incident.py index b823b2ef..4c713578 100644 --- a/rootly_sdk/api/incidents/mitigate_incident.py +++ b/rootly_sdk/api/incidents/mitigate_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: MitigateIncident, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/mitigate".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/mitigate".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: MitigateIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Mitigate an incident + """Mitigate an incident Mitigate a specific incident by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Mitigate an incident + """Mitigate an incident Mitigate a specific incident by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Mitigate an incident + """Mitigate an incident Mitigate a specific incident by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: MitigateIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Mitigate an incident + """Mitigate an incident Mitigate a specific incident by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed 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 4f89fc0e..c86e1ec4 100644 --- a/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py +++ b/rootly_sdk/api/incidents/remove_assigned_user_from_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UnassignRoleFromUser, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incidents/{id}/unassign_role_from_user".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/unassign_role_from_user".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UnassignRoleFromUser, - ) -> Response[ErrorsList | IncidentResponse]: - """ Remove assigned user from incident + """Remove assigned user from incident Remove assigned user from incident @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, - ) -> ErrorsList | IncidentResponse | None: - """ Remove assigned user from incident + """Remove assigned user from incident Remove assigned user from incident @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, - ) -> Response[ErrorsList | IncidentResponse]: - """ Remove assigned user from incident + """Remove assigned user from incident Remove assigned user from incident @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UnassignRoleFromUser, - ) -> ErrorsList | IncidentResponse | None: - """ Remove assigned user from incident + """Remove assigned user from incident Remove assigned user from incident @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/remove_subscribers_to_incident.py b/rootly_sdk/api/incidents/remove_subscribers_to_incident.py index 06bad4cf..0be005da 100644 --- a/rootly_sdk/api/incidents/remove_subscribers_to_incident.py +++ b/rootly_sdk/api/incidents/remove_subscribers_to_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: RemoveSubscribers, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/incidents/{id}/remove_subscribers".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/remove_subscribers".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: RemoveSubscribers, - ) -> Response[ErrorsList | IncidentResponse]: - """ Remove subscribers from incident + """Remove subscribers from incident Remove subscribers to incident @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, - ) -> ErrorsList | IncidentResponse | None: - """ Remove subscribers from incident + """Remove subscribers from incident Remove subscribers to incident @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, - ) -> Response[ErrorsList | IncidentResponse]: - """ Remove subscribers from incident + """Remove subscribers from incident Remove subscribers to incident @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: RemoveSubscribers, - ) -> ErrorsList | IncidentResponse | None: - """ Remove subscribers from incident + """Remove subscribers from incident Remove subscribers to incident @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/resolve_incident.py b/rootly_sdk/api/incidents/resolve_incident.py index f3dec995..094ca943 100644 --- a/rootly_sdk/api/incidents/resolve_incident.py +++ b/rootly_sdk/api/incidents/resolve_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: ResolveIncident, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/resolve".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/resolve".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: ResolveIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Resolve an incident + """Resolve an incident Resolve a specific incident by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Resolve an incident + """Resolve an incident Resolve a specific incident by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Resolve an incident + """Resolve an incident Resolve a specific incident by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: ResolveIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Resolve an incident + """Resolve an incident Resolve a specific incident by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/restart_incident.py b/rootly_sdk/api/incidents/restart_incident.py index b56dabe3..45953fc9 100644 --- a/rootly_sdk/api/incidents/restart_incident.py +++ b/rootly_sdk/api/incidents/restart_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: RestartIncident, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/restart".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/restart".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: RestartIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Restart an incident + """Restart an incident Restart a specific incident by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Restart an incident + """Restart an incident Restart a specific incident by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Restart an incident + """Restart an incident Restart a specific incident by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: RestartIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Restart an incident + """Restart an incident Restart a specific incident by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/triage_incident.py b/rootly_sdk/api/incidents/triage_incident.py index 94ef58a2..819bedd0 100644 --- a/rootly_sdk/api/incidents/triage_incident.py +++ b/rootly_sdk/api/incidents/triage_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: InTriageIncident, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}/in_triage".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{id}/in_triage".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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: InTriageIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Triage an incident + """Triage an incident Set a specific incident by ID to triage state @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Triage an incident + """Triage an incident Set a specific incident by ID to triage state @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Triage an incident + """Triage an incident Set a specific incident by ID to triage state @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: InTriageIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Triage an incident + """Triage an incident Set a specific incident by ID to triage state @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py b/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py index e76739ee..d5a053f8 100644 --- a/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py +++ b/rootly_sdk/api/incidents/unmark_as_duplicate_incident.py @@ -14,37 +14,29 @@ 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=""),), + "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: +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: @@ -57,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,9 +64,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList | IncidentResponse]: - """ Remove duplicate marking from an incident + """Remove duplicate marking from an incident Remove the duplicate marking from an incident @@ -85,12 +78,10 @@ def sync_detailed( Returns: Response[Any | ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -99,13 +90,13 @@ def sync_detailed( 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 duplicate marking from an incident Remove the duplicate marking from an incident @@ -118,22 +109,20 @@ def sync( Returns: Any | ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[Any | ErrorsList | IncidentResponse]: - """ Remove duplicate marking from an incident + """Remove duplicate marking from an incident Remove the duplicate marking from an incident @@ -146,27 +135,23 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 duplicate marking from an incident Remove the duplicate marking from an incident @@ -179,11 +164,11 @@ async def asyncio( Returns: Any | ErrorsList | IncidentResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + 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 d3be1437..470c044e 100644 --- a/rootly_sdk/api/incidents/update_incident.py +++ b/rootly_sdk/api/incidents/update_incident.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateIncident, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/incidents/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/incidents/{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 | IncidentResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> 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 client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Update an incident + """Update an incident Update a specific incident by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Update an incident + """Update an incident Update a specific incident by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, - ) -> Response[ErrorsList | IncidentResponse]: - """ Update an incident + """Update an incident Update a specific incident by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateIncident, - ) -> ErrorsList | IncidentResponse | None: - """ Update an incident + """Update an incident Update a specific incident by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/ip_ranges/__init__.py b/rootly_sdk/api/ip_ranges/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/ip_ranges/__init__.py +++ b/rootly_sdk/api/ip_ranges/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/ip_ranges/get_ip_ranges.py b/rootly_sdk/api/ip_ranges/get_ip_ranges.py index 0f395270..1c8c7d81 100644 --- a/rootly_sdk/api/ip_ranges/get_ip_ranges.py +++ b/rootly_sdk/api/ip_ranges/get_ip_ranges.py @@ -9,31 +9,20 @@ from ...types import Response -def _get_kwargs( - -) -> dict[str, Any]: - - - - - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/ip_ranges", } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> IpRangesResponse | None: if response.status_code == 200: response_200 = IpRangesResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -54,9 +43,8 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - ) -> Response[IpRangesResponse]: - """ Retrieves IP ranges + """Retrieves IP ranges Retrieves the IP ranges for rootly.com services @@ -66,12 +54,9 @@ def sync_detailed( Returns: Response[IpRangesResponse] - """ - + """ - kwargs = _get_kwargs( - - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -79,12 +64,12 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, - ) -> IpRangesResponse | None: - """ Retrieves IP ranges + """Retrieves IP ranges Retrieves the IP ranges for rootly.com services @@ -94,20 +79,18 @@ def sync( Returns: IpRangesResponse - """ - + """ return sync_detailed( client=client, - ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, - ) -> Response[IpRangesResponse]: - """ Retrieves IP ranges + """Retrieves IP ranges Retrieves the IP ranges for rootly.com services @@ -117,25 +100,20 @@ async def asyncio_detailed( Returns: Response[IpRangesResponse] - """ + """ + kwargs = _get_kwargs() - kwargs = _get_kwargs( - - ) - - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, - ) -> IpRangesResponse | None: - """ Retrieves IP ranges + """Retrieves IP ranges Retrieves the IP ranges for rootly.com services @@ -145,10 +123,10 @@ async def asyncio( Returns: IpRangesResponse - """ - + """ - return (await asyncio_detailed( - client=client, - - )).parsed + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/live_call_routers/__init__.py b/rootly_sdk/api/live_call_routers/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/live_call_routers/__init__.py +++ b/rootly_sdk/api/live_call_routers/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 752ba290..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 @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewLiveCallRouter, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/live_call_routers", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | LiveCallRouterResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | LiveCallRouterResponse | None: if response.status_code == 201: response_201 = LiveCallRouterResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | LiveCallRouterResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | LiveCallRouterResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewLiveCallRouter, - ) -> Response[ErrorsList | LiveCallRouterResponse]: - """ Creates a Live Call Router + """Creates a Live Call Router Creates a new Live Call Router from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewLiveCallRouter, - ) -> ErrorsList | LiveCallRouterResponse | None: - """ Creates a Live Call Router + """Creates a Live Call Router Creates a new Live Call Router from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | LiveCallRouterResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewLiveCallRouter, - ) -> Response[ErrorsList | LiveCallRouterResponse]: - """ Creates a Live Call Router + """Creates a Live Call Router Creates a new Live Call Router from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewLiveCallRouter, - ) -> ErrorsList | LiveCallRouterResponse | None: - """ Creates a Live Call Router + """Creates a Live Call Router Creates a new Live Call Router from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | LiveCallRouterResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed 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 4175eae1..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/live_call_routers/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/live_call_routers/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | LiveCallRouterResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | LiveCallRouterResponse | None: if response.status_code == 200: response_200 = LiveCallRouterResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | LiveCallRouterResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | LiveCallRouterResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | LiveCallRouterResponse]: - """ Delete a Live Call Router + """Delete a Live Call Router Delete a specific Live Call Router by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | LiveCallRouterResponse | None: - """ Delete a Live Call Router + """Delete a Live Call Router Delete a specific Live Call Router by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | LiveCallRouterResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | LiveCallRouterResponse]: - """ Delete a Live Call Router + """Delete a Live Call Router Delete a specific Live Call Router by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | LiveCallRouterResponse | None: - """ Delete a Live Call Router + """Delete a Live Call Router Delete a specific Live Call Router by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | LiveCallRouterResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 3cfa7d93..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 @@ -19,11 +19,7 @@ def _get_kwargs( *, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,21 +29,17 @@ def _get_kwargs( json_phone_type: str = phone_type params["phone_type"] = json_phone_type - 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/live_call_routers/generate_phone_number", "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) @@ -56,8 +48,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -80,9 +70,8 @@ def sync_detailed( client: AuthenticatedClient, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, - ) -> Response[Any | ErrorsList]: - """ Generates a phone number for Live Call Router + """Generates a phone number for Live Call Router Generates a phone number for Live Call Router @@ -96,13 +85,11 @@ def sync_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( country_code=country_code, -phone_type=phone_type, - + phone_type=phone_type, ) response = client.get_httpx_client().request( @@ -111,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, - ) -> Any | ErrorsList | None: - """ Generates a phone number for Live Call Router + """Generates a phone number for Live Call Router Generates a phone number for Live Call Router @@ -132,24 +119,22 @@ def sync( Returns: Any | ErrorsList - """ - + """ return sync_detailed( client=client, -country_code=country_code, -phone_type=phone_type, - + country_code=country_code, + phone_type=phone_type, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, - ) -> Response[Any | ErrorsList]: - """ Generates a phone number for Live Call Router + """Generates a phone number for Live Call Router Generates a phone number for Live Call Router @@ -163,29 +148,25 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList] - """ - + """ kwargs = _get_kwargs( country_code=country_code, -phone_type=phone_type, - + phone_type=phone_type, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, country_code: GeneratePhoneNumberLiveCallRouterCountryCode, phone_type: GeneratePhoneNumberLiveCallRouterPhoneType, - ) -> Any | ErrorsList | None: - """ Generates a phone number for Live Call Router + """Generates a phone number for Live Call Router Generates a phone number for Live Call Router @@ -199,12 +180,12 @@ async def asyncio( Returns: Any | ErrorsList - """ - - - return (await asyncio_detailed( - client=client, -country_code=country_code, -phone_type=phone_type, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + country_code=country_code, + phone_type=phone_type, + ) + ).parsed 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 72283b56..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/live_call_routers/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/live_call_routers/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | LiveCallRouterResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | LiveCallRouterResponse | None: if response.status_code == 200: response_200 = LiveCallRouterResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | LiveCallRouterResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | LiveCallRouterResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | LiveCallRouterResponse]: - """ Retrieves a Live Call Router + """Retrieves a Live Call Router Retrieves a specific Live Call Router by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | LiveCallRouterResponse | None: - """ Retrieves a Live Call Router + """Retrieves a Live Call Router Retrieves a specific Live Call Router by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | LiveCallRouterResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | LiveCallRouterResponse]: - """ Retrieves a Live Call Router + """Retrieves a Live Call Router Retrieves a specific Live Call Router by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | LiveCallRouterResponse | None: - """ Retrieves a Live Call Router + """Retrieves a Live Call Router Retrieves a specific Live Call Router by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | LiveCallRouterResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 dee5a6a2..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 @@ -22,11 +22,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -52,27 +48,21 @@ def _get_kwargs( 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/live_call_routers", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> LiveCallRouterList | None: if response.status_code == 200: response_200 = LiveCallRouterList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -104,9 +94,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[LiveCallRouterList]: - """ List Live Call Routers + """List Live Call Routers List Live Call Routers @@ -129,22 +118,20 @@ def sync_detailed( Returns: Response[LiveCallRouterList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, ) response = client.get_httpx_client().request( @@ -153,6 +140,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -167,9 +155,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> LiveCallRouterList | None: - """ List Live Call Routers + """List Live Call Routers List Live Call Routers @@ -192,25 +179,24 @@ def sync( Returns: LiveCallRouterList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + 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, @@ -225,9 +211,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[LiveCallRouterList]: - """ List Live Call Routers + """List Live Call Routers List Live Call Routers @@ -250,30 +235,27 @@ async def asyncio_detailed( Returns: Response[LiveCallRouterList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -288,9 +270,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> LiveCallRouterList | None: - """ List Live Call Routers + """List Live Call Routers List Live Call Routers @@ -313,21 +294,21 @@ async def asyncio( Returns: LiveCallRouterList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + 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/live_call_routers/update_live_call_router.py b/rootly_sdk/api/live_call_routers/update_live_call_router.py index d6d140b6..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateLiveCallRouter, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/live_call_routers/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/live_call_routers/{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 | LiveCallRouterResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | LiveCallRouterResponse | None: if response.status_code == 200: response_200 = LiveCallRouterResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | LiveCallRouterResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | LiveCallRouterResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateLiveCallRouter, - ) -> Response[ErrorsList | LiveCallRouterResponse]: - """ Update a Live Call Router + """Update a Live Call Router Update a specific Live Call Router by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateLiveCallRouter, - ) -> ErrorsList | LiveCallRouterResponse | None: - """ Update a Live Call Router + """Update a Live Call Router Update a specific Live Call Router by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | LiveCallRouterResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateLiveCallRouter, - ) -> Response[ErrorsList | LiveCallRouterResponse]: - """ Update a Live Call Router + """Update a Live Call Router Update a specific Live Call Router by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | LiveCallRouterResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateLiveCallRouter, - ) -> ErrorsList | LiveCallRouterResponse | None: - """ Update a Live Call Router + """Update a Live Call Router Update a specific Live Call Router by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | LiveCallRouterResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/__init__.py b/rootly_sdk/api/meeting_recordings/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/meeting_recordings/__init__.py +++ b/rootly_sdk/api/meeting_recordings/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""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 index cbcd08e0..567609c4 100644 --- a/rootly_sdk/api/meeting_recordings/create_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/create_meeting_recording.py @@ -17,11 +17,7 @@ def _get_kwargs( incident_id: str, *, platform: CreateMeetingRecordingPlatform | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -31,27 +27,25 @@ def _get_kwargs( 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=""),), + "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 | MeetingRecordingResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 201: response_201 = MeetingRecordingResponse.from_dict(response.json()) - - return response_201 if response.status_code == 422: @@ -64,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -78,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, platform: CreateMeetingRecordingPlatform | Unset = UNSET, - ) -> Response[Any | MeetingRecordingResponse]: - """ Create meeting recording + """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). @@ -96,13 +91,11 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -platform=platform, - + platform=platform, ) response = client.get_httpx_client().request( @@ -111,14 +104,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, platform: CreateMeetingRecordingPlatform | Unset = UNSET, - ) -> Any | MeetingRecordingResponse | None: - """ Create meeting recording + """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). @@ -134,24 +127,22 @@ def sync( Returns: Any | MeetingRecordingResponse - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -platform=platform, - + client=client, + platform=platform, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, platform: CreateMeetingRecordingPlatform | Unset = UNSET, - ) -> Response[Any | MeetingRecordingResponse]: - """ Create meeting recording + """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). @@ -167,29 +158,25 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -platform=platform, - + platform=platform, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, platform: CreateMeetingRecordingPlatform | Unset = UNSET, - ) -> Any | MeetingRecordingResponse | None: - """ Create meeting recording + """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). @@ -205,12 +192,12 @@ async def asyncio( Returns: Any | MeetingRecordingResponse - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -platform=platform, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + platform=platform, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py index 5b859dc9..d1b80dd8 100644 --- a/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording.py @@ -12,30 +12,24 @@ 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=""),), + "url": "/v1/meeting_recordings/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: response_200 = MeetingRecordingResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: @@ -48,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -61,9 +57,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Delete a meeting recording + """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. @@ -77,12 +72,10 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -91,13 +84,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Delete a meeting recording + """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. @@ -111,22 +104,20 @@ def sync( Returns: Any | MeetingRecordingResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Delete a meeting recording + """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. @@ -140,27 +131,23 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Delete a meeting recording + """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. @@ -174,11 +161,11 @@ async def asyncio( Returns: Any | MeetingRecordingResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py index 501afaf2..b673907a 100644 --- a/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py +++ b/rootly_sdk/api/meeting_recordings/delete_meeting_recording_video.py @@ -12,30 +12,24 @@ 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=""),), + "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 | MeetingRecordingResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: response_200 = MeetingRecordingResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: @@ -48,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -61,9 +57,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Delete video from a meeting recording + """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. @@ -77,12 +72,10 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -91,13 +84,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Delete video from a meeting recording + """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. @@ -111,22 +104,20 @@ def sync( Returns: Any | MeetingRecordingResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Delete video from a meeting recording + """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. @@ -140,27 +131,23 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Delete video from a meeting recording + """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. @@ -174,11 +161,11 @@ async def asyncio( Returns: Any | MeetingRecordingResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py b/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py index a42d222c..92892c14 100644 --- a/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/delete_standalone_meeting_recording.py @@ -11,24 +11,18 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/meeting_recordings/{id}/delete_session".format(id=quote(str(id), safe=""),), + "url": "/v1/meeting_recordings/{id}/delete_session".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None: if response.status_code == 204: return None @@ -58,9 +52,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete a standalone meeting recording + """Delete a standalone meeting recording Delete a standalone meeting recording (not linked to an incident). Only the recording owner can delete it. Active recordings (pending, recording, paused) must be stopped first. Returns 404 for @@ -75,12 +68,10 @@ def sync_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,9 +85,8 @@ async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any]: - """ Delete a standalone meeting recording + """Delete a standalone meeting recording Delete a standalone meeting recording (not linked to an incident). Only the recording owner can delete it. Active recordings (pending, recording, paused) must be stopped first. Returns 404 for @@ -111,17 +101,12 @@ async def asyncio_detailed( Returns: Response[Any] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 index d31021f0..a32f12ff 100644 --- a/rootly_sdk/api/meeting_recordings/get_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/get_meeting_recording.py @@ -15,11 +15,7 @@ def _get_kwargs( id: str, *, include: GetMeetingRecordingInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -29,27 +25,25 @@ def _get_kwargs( params["include"] = json_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/meeting_recordings/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/meeting_recordings/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: response_200 = MeetingRecordingResponse.from_dict(response.json()) - - return response_200 if response.status_code == 404: @@ -62,7 +56,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +72,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetMeetingRecordingInclude | Unset = UNSET, - ) -> Response[Any | MeetingRecordingResponse]: - """ Get a meeting recording + """Get a meeting recording Retrieve a single meeting recording session including its status, duration, speaker count, word count, and transcript summary. @@ -93,13 +88,11 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -108,14 +101,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetMeetingRecordingInclude | Unset = UNSET, - ) -> Any | MeetingRecordingResponse | None: - """ Get a meeting recording + """Get a meeting recording Retrieve a single meeting recording session including its status, duration, speaker count, word count, and transcript summary. @@ -130,24 +123,22 @@ def sync( Returns: Any | MeetingRecordingResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetMeetingRecordingInclude | Unset = UNSET, - ) -> Response[Any | MeetingRecordingResponse]: - """ Get a meeting recording + """Get a meeting recording Retrieve a single meeting recording session including its status, duration, speaker count, word count, and transcript summary. @@ -162,29 +153,25 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetMeetingRecordingInclude | Unset = UNSET, - ) -> Any | MeetingRecordingResponse | None: - """ Get a meeting recording + """Get a meeting recording Retrieve a single meeting recording session including its status, duration, speaker count, word count, and transcript summary. @@ -199,12 +186,12 @@ async def asyncio( Returns: Any | MeetingRecordingResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/import_meeting_recording.py b/rootly_sdk/api/meeting_recordings/import_meeting_recording.py index 75f6ce30..121345b4 100644 --- a/rootly_sdk/api/meeting_recordings/import_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/import_meeting_recording.py @@ -15,38 +15,31 @@ def _get_kwargs( incident_id: str, *, body: ImportMeetingRecording | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/incidents/{incident_id}/meeting_recordings/import".format(incident_id=quote(str(incident_id), safe=""),), + "url": "/v1/incidents/{incident_id}/meeting_recordings/import".format( + incident_id=quote(str(incident_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) -> Any | MeetingRecordingResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 201: response_201 = MeetingRecordingResponse.from_dict(response.json()) - - return response_201 if response.status_code == 422: @@ -59,7 +52,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -73,9 +68,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: ImportMeetingRecording | Unset = UNSET, - ) -> Response[Any | MeetingRecordingResponse]: - """ Import a meeting recording + """Import a meeting recording Import an externally captured meeting recording and attach it to an incident. Video and transcript are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings @@ -92,13 +86,11 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +99,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( incident_id: str, *, client: AuthenticatedClient, body: ImportMeetingRecording | Unset = UNSET, - ) -> Any | MeetingRecordingResponse | None: - """ Import a meeting recording + """Import a meeting recording Import an externally captured meeting recording and attach it to an incident. Video and transcript are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings @@ -131,24 +123,22 @@ def sync( Returns: Any | MeetingRecordingResponse - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( incident_id: str, *, client: AuthenticatedClient, body: ImportMeetingRecording | Unset = UNSET, - ) -> Response[Any | MeetingRecordingResponse]: - """ Import a meeting recording + """Import a meeting recording Import an externally captured meeting recording and attach it to an incident. Video and transcript are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings @@ -165,29 +155,25 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( incident_id: str, *, client: AuthenticatedClient, body: ImportMeetingRecording | Unset = UNSET, - ) -> Any | MeetingRecordingResponse | None: - """ Import a meeting recording + """Import a meeting recording Import an externally captured meeting recording and attach it to an incident. Video and transcript are fetched asynchronously. The existing POST /v1/incidents/{incident_id}/meeting_recordings @@ -204,12 +190,12 @@ async def asyncio( Returns: Any | MeetingRecordingResponse - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + incident_id=incident_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py index 3967cb3c..1e6a2067 100644 --- a/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/leave_meeting_recording.py @@ -12,30 +12,24 @@ 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=""),), + "url": "/v1/meeting_recordings/{id}/leave".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: response_200 = MeetingRecordingResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: @@ -48,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -61,9 +57,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Leave a meeting call + """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 @@ -78,12 +73,10 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -92,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Leave a meeting call + """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 @@ -113,22 +106,20 @@ def sync( Returns: Any | MeetingRecordingResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Leave a meeting call + """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 @@ -143,27 +134,23 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Leave a meeting call + """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 @@ -178,11 +165,11 @@ async def asyncio( Returns: Any | MeetingRecordingResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py b/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py index 77dec4a0..65341cd2 100644 --- a/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py +++ b/rootly_sdk/api/meeting_recordings/list_all_meeting_recordings.py @@ -14,11 +14,7 @@ def _get_kwargs( status: str | Unset = UNSET, platform: str | Unset = UNSET, created_by: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -28,27 +24,21 @@ def _get_kwargs( params["created_by"] = created_by - 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/meeting_recordings", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> MeetingRecordingList | None: if response.status_code == 200: response_200 = MeetingRecordingList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -57,7 +47,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[MeetingRecordingList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[MeetingRecordingList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( status: str | Unset = UNSET, platform: str | Unset = UNSET, created_by: str | Unset = UNSET, - ) -> Response[MeetingRecordingList]: - """ List all meeting recordings + """List all meeting recordings List meeting recordings across the organization. Returns the current user's standalone recordings plus incident-backed recordings the user can access. Supports filtering by status, platform, and @@ -91,14 +82,12 @@ def sync_detailed( Returns: Response[MeetingRecordingList] - """ - + """ kwargs = _get_kwargs( status=status, -platform=platform, -created_by=created_by, - + platform=platform, + created_by=created_by, ) response = client.get_httpx_client().request( @@ -107,15 +96,15 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, status: str | Unset = UNSET, platform: str | Unset = UNSET, created_by: str | Unset = UNSET, - ) -> MeetingRecordingList | None: - """ List all meeting recordings + """List all meeting recordings List meeting recordings across the organization. Returns the current user's standalone recordings plus incident-backed recordings the user can access. Supports filtering by status, platform, and @@ -132,26 +121,24 @@ def sync( Returns: MeetingRecordingList - """ - + """ return sync_detailed( client=client, -status=status, -platform=platform, -created_by=created_by, - + status=status, + platform=platform, + created_by=created_by, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, status: str | Unset = UNSET, platform: str | Unset = UNSET, created_by: str | Unset = UNSET, - ) -> Response[MeetingRecordingList]: - """ List all meeting recordings + """List all meeting recordings List meeting recordings across the organization. Returns the current user's standalone recordings plus incident-backed recordings the user can access. Supports filtering by status, platform, and @@ -168,31 +155,27 @@ async def asyncio_detailed( Returns: Response[MeetingRecordingList] - """ - + """ kwargs = _get_kwargs( status=status, -platform=platform, -created_by=created_by, - + platform=platform, + created_by=created_by, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, status: str | Unset = UNSET, platform: str | Unset = UNSET, created_by: str | Unset = UNSET, - ) -> MeetingRecordingList | None: - """ List all meeting recordings + """List all meeting recordings List meeting recordings across the organization. Returns the current user's standalone recordings plus incident-backed recordings the user can access. Supports filtering by status, platform, and @@ -209,13 +192,13 @@ async def asyncio( Returns: MeetingRecordingList - """ - - - return (await asyncio_detailed( - client=client, -status=status, -platform=platform, -created_by=created_by, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + status=status, + platform=platform, + created_by=created_by, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py b/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py index e70da740..891b4d58 100644 --- a/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py +++ b/rootly_sdk/api/meeting_recordings/list_meeting_recordings.py @@ -15,11 +15,7 @@ def _get_kwargs( *, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -27,27 +23,25 @@ def _get_kwargs( 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=""),), + "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: +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: @@ -60,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( client: AuthenticatedClient, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[Any | MeetingRecordingList]: - """ List meeting recordings + """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. @@ -93,14 +88,12 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -109,15 +102,15 @@ def sync_detailed( 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 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. @@ -133,26 +126,24 @@ def sync( Returns: Any | MeetingRecordingList - """ - + """ return sync_detailed( incident_id=incident_id, -client=client, -pagenumber=pagenumber, -pagesize=pagesize, - + 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 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. @@ -168,31 +159,27 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingList] - """ - + """ kwargs = _get_kwargs( incident_id=incident_id, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 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. @@ -208,13 +195,13 @@ async def asyncio( Returns: Any | MeetingRecordingList - """ - - - return (await asyncio_detailed( - incident_id=incident_id, -client=client, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + 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 index 52937296..ad7f07dc 100644 --- a/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/pause_meeting_recording.py @@ -12,30 +12,24 @@ 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=""),), + "url": "/v1/meeting_recordings/{id}/pause".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: response_200 = MeetingRecordingResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: @@ -48,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -61,9 +57,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Pause a meeting recording + """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. @@ -77,12 +72,10 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -91,13 +84,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Pause a meeting recording + """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. @@ -111,22 +104,20 @@ def sync( Returns: Any | MeetingRecordingResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Pause a meeting recording + """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. @@ -140,27 +131,23 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Pause a meeting recording + """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. @@ -174,11 +161,11 @@ async def asyncio( Returns: Any | MeetingRecordingResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py index ce409c56..867ec697 100644 --- a/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/resume_meeting_recording.py @@ -12,30 +12,24 @@ 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=""),), + "url": "/v1/meeting_recordings/{id}/resume".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: response_200 = MeetingRecordingResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: @@ -48,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -61,9 +57,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Resume a meeting recording + """Resume a meeting recording Resume a paused recording session. The bot continues capturing audio/video from the meeting. @@ -76,12 +71,10 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -90,13 +83,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Resume a meeting recording + """Resume a meeting recording Resume a paused recording session. The bot continues capturing audio/video from the meeting. @@ -109,22 +102,20 @@ def sync( Returns: Any | MeetingRecordingResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Resume a meeting recording + """Resume a meeting recording Resume a paused recording session. The bot continues capturing audio/video from the meeting. @@ -137,27 +128,23 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Resume a meeting recording + """Resume a meeting recording Resume a paused recording session. The bot continues capturing audio/video from the meeting. @@ -170,11 +157,11 @@ async def asyncio( Returns: Any | MeetingRecordingResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/start_recording_session.py b/rootly_sdk/api/meeting_recordings/start_recording_session.py index 349b46fa..21addcf5 100644 --- a/rootly_sdk/api/meeting_recordings/start_recording_session.py +++ b/rootly_sdk/api/meeting_recordings/start_recording_session.py @@ -13,38 +13,29 @@ def _get_kwargs( *, body: StartSessionRequest | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/meeting_recordings/start_session", } - 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) -> Any | StartSessionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | StartSessionResponse | None: if response.status_code == 201: response_201 = StartSessionResponse.from_dict(response.json()) - - return response_201 if response.status_code == 422: @@ -57,7 +48,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | StartSessionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | StartSessionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -70,9 +63,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: StartSessionRequest | Unset = UNSET, - ) -> Response[Any | StartSessionResponse]: - """ Start a recording session + """Start a recording session Start a new desktop recording session. The server creates a recording record and returns a stream token the desktop client uses to send audio. No provider-specific configuration is needed from the @@ -87,12 +79,10 @@ def sync_detailed( Returns: Response[Any | StartSessionResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -101,13 +91,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: StartSessionRequest | Unset = UNSET, - ) -> Any | StartSessionResponse | None: - """ Start a recording session + """Start a recording session Start a new desktop recording session. The server creates a recording record and returns a stream token the desktop client uses to send audio. No provider-specific configuration is needed from the @@ -122,22 +112,20 @@ def sync( Returns: Any | StartSessionResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: StartSessionRequest | Unset = UNSET, - ) -> Response[Any | StartSessionResponse]: - """ Start a recording session + """Start a recording session Start a new desktop recording session. The server creates a recording record and returns a stream token the desktop client uses to send audio. No provider-specific configuration is needed from the @@ -152,27 +140,23 @@ async def asyncio_detailed( Returns: Response[Any | StartSessionResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: StartSessionRequest | Unset = UNSET, - ) -> Any | StartSessionResponse | None: - """ Start a recording session + """Start a recording session Start a new desktop recording session. The server creates a recording record and returns a stream token the desktop client uses to send audio. No provider-specific configuration is needed from the @@ -187,11 +171,11 @@ async def asyncio( Returns: Any | StartSessionResponse - """ - + """ - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py index 019ebf0f..4b59b83a 100644 --- a/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py +++ b/rootly_sdk/api/meeting_recordings/stop_meeting_recording.py @@ -12,30 +12,24 @@ 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=""),), + "url": "/v1/meeting_recordings/{id}/stop".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | MeetingRecordingResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | MeetingRecordingResponse | None: if response.status_code == 200: response_200 = MeetingRecordingResponse.from_dict(response.json()) - - return response_200 if response.status_code == 422: @@ -48,7 +42,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | MeetingRecordingResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | MeetingRecordingResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -61,9 +57,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Stop a meeting recording + """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 @@ -78,12 +73,10 @@ def sync_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -92,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Stop a meeting recording + """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 @@ -113,22 +106,20 @@ def sync( Returns: Any | MeetingRecordingResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[Any | MeetingRecordingResponse]: - """ Stop a meeting recording + """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 @@ -143,27 +134,23 @@ async def asyncio_detailed( Returns: Response[Any | MeetingRecordingResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> Any | MeetingRecordingResponse | None: - """ Stop a meeting recording + """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 @@ -178,11 +165,11 @@ async def asyncio( Returns: Any | MeetingRecordingResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/on_call_pay_reports/__init__.py b/rootly_sdk/api/on_call_pay_reports/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/on_call_pay_reports/__init__.py +++ b/rootly_sdk/api/on_call_pay_reports/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""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 index b6deff88..cf078832 100644 --- 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 @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewOnCallPayReport, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/on_call_pay_reports", @@ -30,34 +24,28 @@ def _get_kwargs( _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: +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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallPayReportResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallPayReportResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewOnCallPayReport, - ) -> Response[ErrorsList | OnCallPayReportResponse]: - """ Creates an On-Call Pay Report + """Creates an On-Call Pay Report Generates a new on-call pay report for the given date range. The report is generated asynchronously. @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewOnCallPayReport, - ) -> ErrorsList | OnCallPayReportResponse | None: - """ Creates an On-Call Pay Report + """Creates an On-Call Pay Report Generates a new on-call pay report for the given date range. The report is generated asynchronously. @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | OnCallPayReportResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewOnCallPayReport, - ) -> Response[ErrorsList | OnCallPayReportResponse]: - """ Creates an On-Call Pay Report + """Creates an On-Call Pay Report Generates a new on-call pay report for the given date range. The report is generated asynchronously. @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 + """Creates an On-Call Pay Report Generates a new on-call pay report for the given date range. The report is generated asynchronously. @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | OnCallPayReportResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py b/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py index d41ebe03..e367d8f4 100644 --- a/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py +++ b/rootly_sdk/api/on_call_pay_reports/get_on_call_pay_report.py @@ -15,44 +15,36 @@ def _get_kwargs( id: str, *, 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/on_call_pay_reports/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/on_call_pay_reports/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallPayReportResponse | None: +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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallPayReportResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallPayReportResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, - ) -> Response[ErrorsList | OnCallPayReportResponse]: - """ Retrieves an On-Call Pay Report + """Retrieves an On-Call Pay Report Retrieves a specific on-call pay report by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: str | Unset = UNSET, - ) -> ErrorsList | OnCallPayReportResponse | None: - """ Retrieves an On-Call Pay Report + """Retrieves an On-Call Pay Report Retrieves a specific on-call pay report by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | OnCallPayReportResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: str | Unset = UNSET, - ) -> Response[ErrorsList | OnCallPayReportResponse]: - """ Retrieves an On-Call Pay Report + """Retrieves an On-Call Pay Report Retrieves a specific on-call pay report by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: str | Unset = UNSET, - ) -> ErrorsList | OnCallPayReportResponse | None: - """ Retrieves an On-Call Pay Report + """Retrieves an On-Call Pay Report Retrieves a specific on-call pay report by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | OnCallPayReportResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed 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 index d977f47e..b365e4b4 100644 --- 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 @@ -19,11 +19,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -43,27 +39,21 @@ def _get_kwargs( 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: @@ -92,9 +82,8 @@ def sync_detailed( 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 List on-call pay reports @@ -114,19 +103,17 @@ def sync_detailed( 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, - + 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( @@ -135,6 +122,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -146,9 +134,8 @@ def sync( 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 List on-call pay reports @@ -168,22 +155,21 @@ def sync( 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, - + 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, @@ -195,9 +181,8 @@ async def asyncio_detailed( 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 List on-call pay reports @@ -217,27 +202,24 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -249,9 +231,8 @@ async def asyncio( 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 List on-call pay reports @@ -271,18 +252,18 @@ async def asyncio( 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 + """ + + 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 index 5bdc698d..a1d72c27 100644 --- 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 @@ -13,37 +13,29 @@ 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=""),), + "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: +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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallPayReportResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallPayReportResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallPayReportResponse]: - """ Regenerate an On-Call Pay Report + """Regenerate an On-Call Pay Report Triggers regeneration of an existing on-call pay report. @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OnCallPayReportResponse | None: - """ Regenerate an On-Call Pay Report + """Regenerate an On-Call Pay Report Triggers regeneration of an existing on-call pay report. @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | OnCallPayReportResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallPayReportResponse]: - """ Regenerate an On-Call Pay Report + """Regenerate an On-Call Pay Report Triggers regeneration of an existing on-call pay report. @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 + """Regenerate an On-Call Pay Report Triggers regeneration of an existing on-call pay report. @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | OnCallPayReportResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + 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 index 11fcaf02..7939e005 100644 --- 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 @@ -16,50 +16,40 @@ 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=""),), + "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: +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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallPayReportResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallPayReportResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateOnCallPayReport, - ) -> Response[ErrorsList | OnCallPayReportResponse]: - """ Update an On-Call Pay Report + """Update an On-Call Pay Report Update a specific on-call pay report by id. Triggers report regeneration. @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( 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 an On-Call Pay Report Update a specific on-call pay report by id. Triggers report regeneration. @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | OnCallPayReportResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + 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 an On-Call Pay Report Update a specific on-call pay report by id. Triggers report regeneration. @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallPayReportResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 an On-Call Pay Report Update a specific on-call pay report by id. Triggers report regeneration. @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | OnCallPayReportResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/on_call_roles/__init__.py b/rootly_sdk/api/on_call_roles/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/on_call_roles/__init__.py +++ b/rootly_sdk/api/on_call_roles/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 6c9210bd..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 @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewOnCallRole, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/on_call_roles", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | OnCallRoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallRoleResponse | None: if response.status_code == 201: response_201 = OnCallRoleResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallRoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewOnCallRole, - ) -> Response[ErrorsList | OnCallRoleResponse]: - """ Creates an On-Call Role + """Creates an On-Call Role Creates a new On-Call Role from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewOnCallRole, - ) -> ErrorsList | OnCallRoleResponse | None: - """ Creates an On-Call Role + """Creates an On-Call Role Creates a new On-Call Role from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | OnCallRoleResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewOnCallRole, - ) -> Response[ErrorsList | OnCallRoleResponse]: - """ Creates an On-Call Role + """Creates an On-Call Role Creates a new On-Call Role from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewOnCallRole, - ) -> ErrorsList | OnCallRoleResponse | None: - """ Creates an On-Call Role + """Creates an On-Call Role Creates a new On-Call Role from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | OnCallRoleResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed 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 ccf8a525..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/on_call_roles/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/on_call_roles/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallRoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallRoleResponse | None: if response.status_code == 200: response_200 = OnCallRoleResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallRoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallRoleResponse]: - """ Delete an On-Call Role + """Delete an On-Call Role Delete a specific On-Call Role by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OnCallRoleResponse | None: - """ Delete an On-Call Role + """Delete an On-Call Role Delete a specific On-Call Role by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | OnCallRoleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallRoleResponse]: - """ Delete an On-Call Role + """Delete an On-Call Role Delete a specific On-Call Role by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OnCallRoleResponse | None: - """ Delete an On-Call Role + """Delete an On-Call Role Delete a specific On-Call Role by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | OnCallRoleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 36a25e42..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/on_call_roles/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/on_call_roles/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallRoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallRoleResponse | None: if response.status_code == 200: response_200 = OnCallRoleResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallRoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallRoleResponse]: - """ Retrieves an On-Call Role + """Retrieves an On-Call Role Retrieves a specific On-Call Role by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OnCallRoleResponse | None: - """ Retrieves an On-Call Role + """Retrieves an On-Call Role Retrieves a specific On-Call Role by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | OnCallRoleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallRoleResponse]: - """ Retrieves an On-Call Role + """Retrieves an On-Call Role Retrieves a specific On-Call Role by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OnCallRoleResponse | None: - """ Retrieves an On-Call Role + """Retrieves an On-Call Role Retrieves a specific On-Call Role by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | OnCallRoleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 5d23915b..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 @@ -22,11 +22,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -52,27 +48,21 @@ def _get_kwargs( 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/on_call_roles", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> OnCallRoleList | None: if response.status_code == 200: response_200 = OnCallRoleList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -104,9 +94,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[OnCallRoleList]: - """ List On-Call Roles + """List On-Call Roles List On-Call Roles @@ -129,22 +118,20 @@ def sync_detailed( Returns: Response[OnCallRoleList] - """ - + """ kwargs = _get_kwargs( include=include, -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, - + 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( @@ -153,6 +140,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -167,9 +155,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> OnCallRoleList | None: - """ List On-Call Roles + """List On-Call Roles List On-Call Roles @@ -192,25 +179,24 @@ def sync( Returns: OnCallRoleList - """ - + """ return sync_detailed( client=client, -include=include, -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, - + include=include, + 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, @@ -225,9 +211,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[OnCallRoleList]: - """ List On-Call Roles + """List On-Call Roles List On-Call Roles @@ -250,30 +235,27 @@ async def asyncio_detailed( Returns: Response[OnCallRoleList] - """ - + """ kwargs = _get_kwargs( include=include, -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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -288,9 +270,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> OnCallRoleList | None: - """ List On-Call Roles + """List On-Call Roles List On-Call Roles @@ -313,21 +294,21 @@ async def asyncio( Returns: OnCallRoleList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -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 + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + 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/on_call_roles/update_on_call_role.py b/rootly_sdk/api/on_call_roles/update_on_call_role.py index a2e884b3..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateOnCallRole, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/on_call_roles/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/on_call_roles/{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 | OnCallRoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallRoleResponse | None: if response.status_code == 200: response_200 = OnCallRoleResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallRoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallRoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateOnCallRole, - ) -> Response[ErrorsList | OnCallRoleResponse]: - """ Update an On-Call Role + """Update an On-Call Role Update a specific On-Call Role by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateOnCallRole, - ) -> ErrorsList | OnCallRoleResponse | None: - """ Update an On-Call Role + """Update an On-Call Role Update a specific On-Call Role by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | OnCallRoleResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateOnCallRole, - ) -> Response[ErrorsList | OnCallRoleResponse]: - """ Update an On-Call Role + """Update an On-Call Role Update a specific On-Call Role by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallRoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateOnCallRole, - ) -> ErrorsList | OnCallRoleResponse | None: - """ Update an On-Call Role + """Update an On-Call Role Update a specific On-Call Role by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | OnCallRoleResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/on_call_shadows/__init__.py b/rootly_sdk/api/on_call_shadows/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/on_call_shadows/__init__.py +++ b/rootly_sdk/api/on_call_shadows/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 b3ec42ca..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 @@ -16,50 +16,40 @@ def _get_kwargs( schedule_id: str, *, body: NewOnCallShadow, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedules/{schedule_id}/on_call_shadows".format(schedule_id=quote(str(schedule_id), safe=""),), + "url": "/v1/schedules/{schedule_id}/on_call_shadows".format( + schedule_id=quote(str(schedule_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 | OnCallShadowResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallShadowResponse | None: if response.status_code == 201: response_201 = OnCallShadowResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallShadowResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallShadowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewOnCallShadow, - ) -> Response[ErrorsList | OnCallShadowResponse]: - """ creates an shadow configuration + """creates an shadow configuration Creates a new on call shadow configuration from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_id: str, *, client: AuthenticatedClient, body: NewOnCallShadow, - ) -> ErrorsList | OnCallShadowResponse | None: - """ creates an shadow configuration + """creates an shadow configuration Creates a new on call shadow configuration from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | OnCallShadowResponse - """ - + """ return sync_detailed( schedule_id=schedule_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, body: NewOnCallShadow, - ) -> Response[ErrorsList | OnCallShadowResponse]: - """ creates an shadow configuration + """creates an shadow configuration Creates a new on call shadow configuration from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_id: str, *, client: AuthenticatedClient, body: NewOnCallShadow, - ) -> ErrorsList | OnCallShadowResponse | None: - """ creates an shadow configuration + """creates an shadow configuration Creates a new on call shadow configuration from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | OnCallShadowResponse - """ - - - return (await asyncio_detailed( - schedule_id=schedule_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + body=body, + ) + ).parsed 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 efc4e22d..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/on_call_shadows/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/on_call_shadows/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallShadowResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallShadowResponse | None: if response.status_code == 200: response_200 = OnCallShadowResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallShadowResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallShadowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallShadowResponse]: - """ Retrieves an On Call Shadow configuration by ID + """Retrieves an On Call Shadow configuration by ID Retrieves a specific On Call Shadow configuration by ID @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OnCallShadowResponse | None: - """ Retrieves an On Call Shadow configuration by ID + """Retrieves an On Call Shadow configuration by ID Retrieves a specific On Call Shadow configuration by ID @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | OnCallShadowResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallShadowResponse]: - """ Retrieves an On Call Shadow configuration by ID + """Retrieves an On Call Shadow configuration by ID Retrieves a specific On Call Shadow configuration by ID @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OnCallShadowResponse | None: - """ Retrieves an On Call Shadow configuration by ID + """Retrieves an On Call Shadow configuration by ID Retrieves a specific On Call Shadow configuration by ID @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | OnCallShadowResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 efde6a58..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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/schedules/{schedule_id}/on_call_shadows".format(schedule_id=quote(str(schedule_id), safe=""),), + "url": "/v1/schedules/{schedule_id}/on_call_shadows".format( + schedule_id=quote(str(schedule_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> OnCallShadowsList | None: if response.status_code == 200: response_200 = OnCallShadowsList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -75,9 +67,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[OnCallShadowsList]: - """ List On Call Shadows for Shift + """List On Call Shadows for Shift List shadow shifts for schedule @@ -93,15 +84,13 @@ def sync_detailed( Returns: Response[OnCallShadowsList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +99,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_id: str, *, @@ -117,9 +107,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> OnCallShadowsList | None: - """ List On Call Shadows for Shift + """List On Call Shadows for Shift List shadow shifts for schedule @@ -135,18 +124,17 @@ def sync( Returns: OnCallShadowsList - """ - + """ return sync_detailed( schedule_id=schedule_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( schedule_id: str, *, @@ -154,9 +142,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[OnCallShadowsList]: - """ List On Call Shadows for Shift + """List On Call Shadows for Shift List shadow shifts for schedule @@ -172,23 +159,20 @@ async def asyncio_detailed( Returns: Response[OnCallShadowsList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_id: str, *, @@ -196,9 +180,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> OnCallShadowsList | None: - """ List On Call Shadows for Shift + """List On Call Shadows for Shift List shadow shifts for schedule @@ -214,14 +197,14 @@ async def asyncio( Returns: OnCallShadowsList - """ - - - return (await asyncio_detailed( - schedule_id=schedule_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 bbd1d9e3..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateOnCallShadow, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/on_call_shadows/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/on_call_shadows/{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 | OnCallShadowResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallShadowResponse | None: if response.status_code == 200: response_200 = OnCallShadowResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallShadowResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallShadowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateOnCallShadow, - ) -> Response[ErrorsList | OnCallShadowResponse]: - """ Update an On Call Shadow configuration + """Update an On Call Shadow configuration Update a specific on call shadow configuration by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateOnCallShadow, - ) -> ErrorsList | OnCallShadowResponse | None: - """ Update an On Call Shadow configuration + """Update an On Call Shadow configuration Update a specific on call shadow configuration by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | OnCallShadowResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateOnCallShadow, - ) -> Response[ErrorsList | OnCallShadowResponse]: - """ Update an On Call Shadow configuration + """Update an On Call Shadow configuration Update a specific on call shadow configuration by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateOnCallShadow, - ) -> ErrorsList | OnCallShadowResponse | None: - """ Update an On Call Shadow configuration + """Update an On Call Shadow configuration Update a specific on call shadow configuration by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | OnCallShadowResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/on_calls/__init__.py b/rootly_sdk/api/on_calls/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/on_calls/__init__.py +++ b/rootly_sdk/api/on_calls/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""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 index e5624bff..4d9fca2e 100644 --- a/rootly_sdk/api/on_calls/list_oncalls.py +++ b/rootly_sdk/api/on_calls/list_oncalls.py @@ -24,11 +24,7 @@ def _get_kwargs( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -58,41 +54,33 @@ def _get_kwargs( 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] = { "method": "get", "url": "/v1/oncalls", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OncallList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OncallList | None: if response.status_code == 200: response_200 = OncallList.from_dict(response.json()) - - 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: @@ -101,7 +89,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OncallList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OncallList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -124,9 +114,8 @@ def sync_detailed( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, - ) -> Response[ErrorsList | OncallList]: - """ List on-calls + """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. @@ -150,22 +139,20 @@ def sync_detailed( Returns: Response[ErrorsList | OncallList] - """ - + """ 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, -filternotification_types=filternotification_types, - + 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, + filternotification_types=filternotification_types, ) response = client.get_httpx_client().request( @@ -174,6 +161,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -188,9 +176,8 @@ def sync( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, - ) -> ErrorsList | OncallList | None: - """ List on-calls + """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. @@ -214,25 +201,24 @@ def sync( Returns: ErrorsList | OncallList - """ - + """ 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, -filternotification_types=filternotification_types, - + 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, + filternotification_types=filternotification_types, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -247,9 +233,8 @@ async def asyncio_detailed( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, - ) -> Response[ErrorsList | OncallList]: - """ List on-calls + """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. @@ -273,30 +258,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OncallList] - """ - + """ 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, -filternotification_types=filternotification_types, - + 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, + filternotification_types=filternotification_types, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -311,9 +293,8 @@ async def asyncio( filterservice_ids: str | Unset = UNSET, filtergroup_ids: str | Unset = UNSET, filternotification_types: str | Unset = UNSET, - ) -> ErrorsList | OncallList | None: - """ List on-calls + """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. @@ -337,21 +318,21 @@ async def asyncio( Returns: ErrorsList | OncallList - """ - - - 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, -filternotification_types=filternotification_types, - - )).parsed + """ + + 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, + filternotification_types=filternotification_types, + ) + ).parsed diff --git a/rootly_sdk/api/override_shifts/__init__.py b/rootly_sdk/api/override_shifts/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/override_shifts/__init__.py +++ b/rootly_sdk/api/override_shifts/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/override_shifts/create_override_shift.py b/rootly_sdk/api/override_shifts/create_override_shift.py index 60c2890e..ec336dd4 100644 --- a/rootly_sdk/api/override_shifts/create_override_shift.py +++ b/rootly_sdk/api/override_shifts/create_override_shift.py @@ -16,57 +16,45 @@ def _get_kwargs( schedule_id: str, *, body: NewOverrideShift, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedules/{schedule_id}/override_shifts".format(schedule_id=quote(str(schedule_id), safe=""),), + "url": "/v1/schedules/{schedule_id}/override_shifts".format( + schedule_id=quote(str(schedule_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 | OverrideShiftResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OverrideShiftResponse | None: if response.status_code == 200: response_200 = OverrideShiftResponse.from_dict(response.json()) - - return response_200 if response.status_code == 201: response_201 = OverrideShiftResponse.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: @@ -75,7 +63,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OverrideShiftResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OverrideShiftResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,9 +79,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewOverrideShift, - ) -> Response[ErrorsList | OverrideShiftResponse]: - """ creates an override shift + """creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the specified time range, they will be automatically deleted and replaced by the new override. This @@ -108,13 +97,11 @@ def sync_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -123,14 +110,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_id: str, *, client: AuthenticatedClient, body: NewOverrideShift, - ) -> ErrorsList | OverrideShiftResponse | None: - """ creates an override shift + """creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the specified time range, they will be automatically deleted and replaced by the new override. This @@ -147,24 +134,22 @@ def sync( Returns: ErrorsList | OverrideShiftResponse - """ - + """ return sync_detailed( schedule_id=schedule_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, body: NewOverrideShift, - ) -> Response[ErrorsList | OverrideShiftResponse]: - """ creates an override shift + """creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the specified time range, they will be automatically deleted and replaced by the new override. This @@ -181,29 +166,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_id: str, *, client: AuthenticatedClient, body: NewOverrideShift, - ) -> ErrorsList | OverrideShiftResponse | None: - """ creates an override shift + """creates an override shift Creates a new override shift from provided data. If any existing override shifts overlap with the specified time range, they will be automatically deleted and replaced by the new override. This @@ -220,12 +201,12 @@ async def asyncio( Returns: ErrorsList | OverrideShiftResponse - """ - - - return (await asyncio_detailed( - schedule_id=schedule_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + body=body, + ) + ).parsed 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 a568fa02..ee1f2e0d 100644 --- a/rootly_sdk/api/override_shifts/delete_on_call_shadow.py +++ b/rootly_sdk/api/override_shifts/delete_on_call_shadow.py @@ -13,44 +13,34 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/on_call_shadows/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/on_call_shadows/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OnCallShadowResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OnCallShadowResponse | None: if response.status_code == 200: response_200 = OnCallShadowResponse.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: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OnCallShadowResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OnCallShadowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallShadowResponse]: - """ Delete an on call shadow configuration + """Delete an on call shadow configuration 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. @@ -88,12 +79,10 @@ def sync_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -102,13 +91,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OnCallShadowResponse | None: - """ Delete an on call shadow configuration + """Delete an on call shadow configuration 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. @@ -122,22 +111,20 @@ def sync( Returns: ErrorsList | OnCallShadowResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OnCallShadowResponse]: - """ Delete an on call shadow configuration + """Delete an on call shadow configuration 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. @@ -151,27 +138,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OnCallShadowResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OnCallShadowResponse | None: - """ Delete an on call shadow configuration + """Delete an on call shadow configuration 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. @@ -185,11 +168,11 @@ async def asyncio( Returns: ErrorsList | OnCallShadowResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/override_shifts/delete_override_shift.py b/rootly_sdk/api/override_shifts/delete_override_shift.py index 211afd2f..200bc1a1 100644 --- a/rootly_sdk/api/override_shifts/delete_override_shift.py +++ b/rootly_sdk/api/override_shifts/delete_override_shift.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/override_shifts/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/override_shifts/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OverrideShiftResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OverrideShiftResponse | None: if response.status_code == 200: response_200 = OverrideShiftResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OverrideShiftResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OverrideShiftResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OverrideShiftResponse]: - """ Delete an override shift + """Delete an override shift Delete a specific override shift by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OverrideShiftResponse | None: - """ Delete an override shift + """Delete an override shift Delete a specific override shift by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | OverrideShiftResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OverrideShiftResponse]: - """ Delete an override shift + """Delete an override shift Delete a specific override shift by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OverrideShiftResponse | None: - """ Delete an override shift + """Delete an override shift Delete a specific override shift by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | OverrideShiftResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/override_shifts/get_override_shift.py b/rootly_sdk/api/override_shifts/get_override_shift.py index 3296a663..1116f33d 100644 --- a/rootly_sdk/api/override_shifts/get_override_shift.py +++ b/rootly_sdk/api/override_shifts/get_override_shift.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/override_shifts/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/override_shifts/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | OverrideShiftResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OverrideShiftResponse | None: if response.status_code == 200: response_200 = OverrideShiftResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OverrideShiftResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OverrideShiftResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OverrideShiftResponse]: - """ Retrieves an override shift + """Retrieves an override shift Retrieves a specific override shift by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OverrideShiftResponse | None: - """ Retrieves an override shift + """Retrieves an override shift Retrieves a specific override shift by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | OverrideShiftResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | OverrideShiftResponse]: - """ Retrieves an override shift + """Retrieves an override shift Retrieves a specific override shift by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | OverrideShiftResponse | None: - """ Retrieves an override shift + """Retrieves an override shift Retrieves a specific override shift by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | OverrideShiftResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/override_shifts/list_override_shifts.py b/rootly_sdk/api/override_shifts/list_override_shifts.py index f528b896..8370ff93 100644 --- a/rootly_sdk/api/override_shifts/list_override_shifts.py +++ b/rootly_sdk/api/override_shifts/list_override_shifts.py @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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/schedules/{schedule_id}/override_shifts".format(schedule_id=quote(str(schedule_id), safe=""),), + "url": "/v1/schedules/{schedule_id}/override_shifts".format( + schedule_id=quote(str(schedule_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> OverrideShiftList | None: if response.status_code == 200: response_200 = OverrideShiftList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -75,9 +67,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[OverrideShiftList]: - """ List override shifts + """List override shifts List override shifts @@ -93,15 +84,13 @@ def sync_detailed( Returns: Response[OverrideShiftList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +99,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_id: str, *, @@ -117,9 +107,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> OverrideShiftList | None: - """ List override shifts + """List override shifts List override shifts @@ -135,18 +124,17 @@ def sync( Returns: OverrideShiftList - """ - + """ return sync_detailed( schedule_id=schedule_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( schedule_id: str, *, @@ -154,9 +142,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[OverrideShiftList]: - """ List override shifts + """List override shifts List override shifts @@ -172,23 +159,20 @@ async def asyncio_detailed( Returns: Response[OverrideShiftList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_id: str, *, @@ -196,9 +180,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> OverrideShiftList | None: - """ List override shifts + """List override shifts List override shifts @@ -214,14 +197,14 @@ async def asyncio( Returns: OverrideShiftList - """ - - - return (await asyncio_detailed( - schedule_id=schedule_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/override_shifts/update_override_shift.py b/rootly_sdk/api/override_shifts/update_override_shift.py index 151c774f..3f692427 100644 --- a/rootly_sdk/api/override_shifts/update_override_shift.py +++ b/rootly_sdk/api/override_shifts/update_override_shift.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateOverrideShift, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/override_shifts/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/override_shifts/{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 | OverrideShiftResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | OverrideShiftResponse | None: if response.status_code == 200: response_200 = OverrideShiftResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | OverrideShiftResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | OverrideShiftResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateOverrideShift, - ) -> Response[ErrorsList | OverrideShiftResponse]: - """ Update an override shift + """Update an override shift Update a specific override shift by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateOverrideShift, - ) -> ErrorsList | OverrideShiftResponse | None: - """ Update an override shift + """Update an override shift Update a specific override shift by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | OverrideShiftResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateOverrideShift, - ) -> Response[ErrorsList | OverrideShiftResponse]: - """ Update an override shift + """Update an override shift Update a specific override shift by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | OverrideShiftResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateOverrideShift, - ) -> ErrorsList | OverrideShiftResponse | None: - """ Update an override shift + """Update an override shift Update a specific override shift by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | OverrideShiftResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/playbook_tasks/__init__.py b/rootly_sdk/api/playbook_tasks/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/playbook_tasks/__init__.py +++ b/rootly_sdk/api/playbook_tasks/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/playbook_tasks/create_playbook_task.py b/rootly_sdk/api/playbook_tasks/create_playbook_task.py index 0f1f0759..4589a663 100644 --- a/rootly_sdk/api/playbook_tasks/create_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/create_playbook_task.py @@ -16,50 +16,40 @@ def _get_kwargs( playbook_id: str, *, body: NewPlaybookTask, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/playbooks/{playbook_id}/playbook_tasks".format(playbook_id=quote(str(playbook_id), safe=""),), + "url": "/v1/playbooks/{playbook_id}/playbook_tasks".format( + playbook_id=quote(str(playbook_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 | PlaybookTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PlaybookTaskResponse | None: if response.status_code == 201: response_201 = PlaybookTaskResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PlaybookTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewPlaybookTask, - ) -> Response[ErrorsList | PlaybookTaskResponse]: - """ Creates a playbook task + """Creates a playbook task Creates a new task from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ - + """ kwargs = _get_kwargs( playbook_id=playbook_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( playbook_id: str, *, client: AuthenticatedClient, body: NewPlaybookTask, - ) -> ErrorsList | PlaybookTaskResponse | None: - """ Creates a playbook task + """Creates a playbook task Creates a new task from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | PlaybookTaskResponse - """ - + """ return sync_detailed( playbook_id=playbook_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( playbook_id: str, *, client: AuthenticatedClient, body: NewPlaybookTask, - ) -> Response[ErrorsList | PlaybookTaskResponse]: - """ Creates a playbook task + """Creates a playbook task Creates a new task from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ - + """ kwargs = _get_kwargs( playbook_id=playbook_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( playbook_id: str, *, client: AuthenticatedClient, body: NewPlaybookTask, - ) -> ErrorsList | PlaybookTaskResponse | None: - """ Creates a playbook task + """Creates a playbook task Creates a new task from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | PlaybookTaskResponse - """ - - - return (await asyncio_detailed( - playbook_id=playbook_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + playbook_id=playbook_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/playbook_tasks/delete_playbook_task.py b/rootly_sdk/api/playbook_tasks/delete_playbook_task.py index 86cdba80..9c9328d4 100644 --- a/rootly_sdk/api/playbook_tasks/delete_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/delete_playbook_task.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/playbook_tasks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/playbook_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PlaybookTaskResponse | None: if response.status_code == 200: response_200 = PlaybookTaskResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PlaybookTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PlaybookTaskResponse]: - """ Delete a playbook task + """Delete a playbook task Delete a specific playbook task by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | PlaybookTaskResponse | None: - """ Delete a playbook task + """Delete a playbook task Delete a specific playbook task by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | PlaybookTaskResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PlaybookTaskResponse]: - """ Delete a playbook task + """Delete a playbook task Delete a specific playbook task by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | PlaybookTaskResponse | None: - """ Delete a playbook task + """Delete a playbook task Delete a specific playbook task by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | PlaybookTaskResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/playbook_tasks/get_playbook_task.py b/rootly_sdk/api/playbook_tasks/get_playbook_task.py index b0513fa2..415605da 100644 --- a/rootly_sdk/api/playbook_tasks/get_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/get_playbook_task.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/playbook_tasks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/playbook_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PlaybookTaskResponse | None: if response.status_code == 200: response_200 = PlaybookTaskResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PlaybookTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PlaybookTaskResponse]: - """ Retrieves a playbook task + """Retrieves a playbook task Retrieves a specific playbook_task by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | PlaybookTaskResponse | None: - """ Retrieves a playbook task + """Retrieves a playbook task Retrieves a specific playbook_task by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | PlaybookTaskResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PlaybookTaskResponse]: - """ Retrieves a playbook task + """Retrieves a playbook task Retrieves a specific playbook_task by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | PlaybookTaskResponse | None: - """ Retrieves a playbook task + """Retrieves a playbook task Retrieves a specific playbook_task by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | PlaybookTaskResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py b/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py index 77d003b3..cc9e0fa2 100644 --- a/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py +++ b/rootly_sdk/api/playbook_tasks/list_playbook_tasks.py @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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/playbooks/{playbook_id}/playbook_tasks".format(playbook_id=quote(str(playbook_id), safe=""),), + "url": "/v1/playbooks/{playbook_id}/playbook_tasks".format( + playbook_id=quote(str(playbook_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PlaybookTaskList | None: if response.status_code == 200: response_200 = PlaybookTaskList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -75,9 +67,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[PlaybookTaskList]: - """ List playbook tasks + """List playbook tasks List playbook tasks @@ -93,15 +84,13 @@ def sync_detailed( Returns: Response[PlaybookTaskList] - """ - + """ kwargs = _get_kwargs( playbook_id=playbook_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +99,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( playbook_id: str, *, @@ -117,9 +107,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> PlaybookTaskList | None: - """ List playbook tasks + """List playbook tasks List playbook tasks @@ -135,18 +124,17 @@ def sync( Returns: PlaybookTaskList - """ - + """ return sync_detailed( playbook_id=playbook_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( playbook_id: str, *, @@ -154,9 +142,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[PlaybookTaskList]: - """ List playbook tasks + """List playbook tasks List playbook tasks @@ -172,23 +159,20 @@ async def asyncio_detailed( Returns: Response[PlaybookTaskList] - """ - + """ kwargs = _get_kwargs( playbook_id=playbook_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( playbook_id: str, *, @@ -196,9 +180,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> PlaybookTaskList | None: - """ List playbook tasks + """List playbook tasks List playbook tasks @@ -214,14 +197,14 @@ async def asyncio( Returns: PlaybookTaskList - """ - - - return (await asyncio_detailed( - playbook_id=playbook_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + playbook_id=playbook_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/playbook_tasks/update_playbook_task.py b/rootly_sdk/api/playbook_tasks/update_playbook_task.py index 9164fb36..b84699b6 100644 --- a/rootly_sdk/api/playbook_tasks/update_playbook_task.py +++ b/rootly_sdk/api/playbook_tasks/update_playbook_task.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdatePlaybookTask, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/playbook_tasks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/playbook_tasks/{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 | PlaybookTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PlaybookTaskResponse | None: if response.status_code == 200: response_200 = PlaybookTaskResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PlaybookTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePlaybookTask, - ) -> Response[ErrorsList | PlaybookTaskResponse]: - """ Update a playbook task + """Update a playbook task Update a specific playbook task by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdatePlaybookTask, - ) -> ErrorsList | PlaybookTaskResponse | None: - """ Update a playbook task + """Update a playbook task Update a specific playbook task by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | PlaybookTaskResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdatePlaybookTask, - ) -> Response[ErrorsList | PlaybookTaskResponse]: - """ Update a playbook task + """Update a playbook task Update a specific playbook task by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdatePlaybookTask, - ) -> ErrorsList | PlaybookTaskResponse | None: - """ Update a playbook task + """Update a playbook task Update a specific playbook task by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | PlaybookTaskResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/playbooks/__init__.py b/rootly_sdk/api/playbooks/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/playbooks/__init__.py +++ b/rootly_sdk/api/playbooks/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/playbooks/create_playbook.py b/rootly_sdk/api/playbooks/create_playbook.py index 3e590e64..cee3273e 100644 --- a/rootly_sdk/api/playbooks/create_playbook.py +++ b/rootly_sdk/api/playbooks/create_playbook.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewPlaybook, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/playbooks", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | PlaybookResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PlaybookResponse | None: if response.status_code == 201: response_201 = PlaybookResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PlaybookResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewPlaybook, - ) -> Response[ErrorsList | PlaybookResponse]: - """ Creates a playbook + """Creates a playbook Creates a new playbook from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewPlaybook, - ) -> ErrorsList | PlaybookResponse | None: - """ Creates a playbook + """Creates a playbook Creates a new playbook from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | PlaybookResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewPlaybook, - ) -> Response[ErrorsList | PlaybookResponse]: - """ Creates a playbook + """Creates a playbook Creates a new playbook from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewPlaybook, - ) -> ErrorsList | PlaybookResponse | None: - """ Creates a playbook + """Creates a playbook Creates a new playbook from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | PlaybookResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/playbooks/delete_playbook.py b/rootly_sdk/api/playbooks/delete_playbook.py index 3232d1a9..f666eef3 100644 --- a/rootly_sdk/api/playbooks/delete_playbook.py +++ b/rootly_sdk/api/playbooks/delete_playbook.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/playbooks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/playbooks/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PlaybookResponse | None: if response.status_code == 200: response_200 = PlaybookResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PlaybookResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PlaybookResponse]: - """ Delete a playbook + """Delete a playbook Delete a specific playbook by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | PlaybookResponse | None: - """ Delete a playbook + """Delete a playbook Delete a specific playbook by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | PlaybookResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PlaybookResponse]: - """ Delete a playbook + """Delete a playbook Delete a specific playbook by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | PlaybookResponse | None: - """ Delete a playbook + """Delete a playbook Delete a specific playbook by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | PlaybookResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/playbooks/get_playbook.py b/rootly_sdk/api/playbooks/get_playbook.py index d2ead9cb..7faea0c0 100644 --- a/rootly_sdk/api/playbooks/get_playbook.py +++ b/rootly_sdk/api/playbooks/get_playbook.py @@ -16,11 +16,7 @@ def _get_kwargs( id: str, *, include: GetPlaybookInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,34 +26,30 @@ def _get_kwargs( params["include"] = json_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/playbooks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/playbooks/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PlaybookResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PlaybookResponse | None: if response.status_code == 200: response_200 = PlaybookResponse.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: @@ -66,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PlaybookResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetPlaybookInclude | Unset = UNSET, - ) -> Response[ErrorsList | PlaybookResponse]: - """ Retrieves a playbook + """Retrieves a playbook Retrieves a specific playbook by id @@ -96,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -111,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetPlaybookInclude | Unset = UNSET, - ) -> ErrorsList | PlaybookResponse | None: - """ Retrieves a playbook + """Retrieves a playbook Retrieves a specific playbook by id @@ -132,24 +123,22 @@ def sync( Returns: ErrorsList | PlaybookResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetPlaybookInclude | Unset = UNSET, - ) -> Response[ErrorsList | PlaybookResponse]: - """ Retrieves a playbook + """Retrieves a playbook Retrieves a specific playbook by id @@ -163,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetPlaybookInclude | Unset = UNSET, - ) -> ErrorsList | PlaybookResponse | None: - """ Retrieves a playbook + """Retrieves a playbook Retrieves a specific playbook by id @@ -199,12 +184,12 @@ async def asyncio( Returns: ErrorsList | PlaybookResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/playbooks/list_playbooks.py b/rootly_sdk/api/playbooks/list_playbooks.py index f4850a11..0326a21d 100644 --- a/rootly_sdk/api/playbooks/list_playbooks.py +++ b/rootly_sdk/api/playbooks/list_playbooks.py @@ -15,11 +15,7 @@ def _get_kwargs( include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,27 +29,21 @@ def _get_kwargs( 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/playbooks", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PlaybookList | None: if response.status_code == 200: response_200 = PlaybookList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -77,9 +67,8 @@ def sync_detailed( include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[PlaybookList]: - """ List playbooks + """List playbooks List playbooks @@ -94,14 +83,12 @@ def sync_detailed( Returns: Response[PlaybookList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,15 +97,15 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> PlaybookList | None: - """ List playbooks + """List playbooks List playbooks @@ -133,26 +120,24 @@ def sync( Returns: PlaybookList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[PlaybookList]: - """ List playbooks + """List playbooks List playbooks @@ -167,31 +152,27 @@ async def asyncio_detailed( Returns: Response[PlaybookList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, include: ListPlaybooksInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> PlaybookList | None: - """ List playbooks + """List playbooks List playbooks @@ -206,13 +187,13 @@ async def asyncio( Returns: PlaybookList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/playbooks/update_playbook.py b/rootly_sdk/api/playbooks/update_playbook.py index e8f3d840..9fe8a131 100644 --- a/rootly_sdk/api/playbooks/update_playbook.py +++ b/rootly_sdk/api/playbooks/update_playbook.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdatePlaybook, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/playbooks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/playbooks/{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 | PlaybookResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PlaybookResponse | None: if response.status_code == 200: response_200 = PlaybookResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PlaybookResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PlaybookResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePlaybook, - ) -> Response[ErrorsList | PlaybookResponse]: - """ Update a playbook + """Update a playbook Update a specific playbook by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdatePlaybook, - ) -> ErrorsList | PlaybookResponse | None: - """ Update a playbook + """Update a playbook Update a specific playbook by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | PlaybookResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdatePlaybook, - ) -> Response[ErrorsList | PlaybookResponse]: - """ Update a playbook + """Update a playbook Update a specific playbook by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PlaybookResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdatePlaybook, - ) -> ErrorsList | PlaybookResponse | None: - """ Update a playbook + """Update a playbook Update a specific playbook by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | PlaybookResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/pulses/__init__.py b/rootly_sdk/api/pulses/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/pulses/__init__.py +++ b/rootly_sdk/api/pulses/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/pulses/create_pulse.py b/rootly_sdk/api/pulses/create_pulse.py index 2a363a25..30b82b81 100644 --- a/rootly_sdk/api/pulses/create_pulse.py +++ b/rootly_sdk/api/pulses/create_pulse.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewPulse, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/pulses", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | PulseResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PulseResponse | None: if response.status_code == 201: response_201 = PulseResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PulseResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PulseResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewPulse, - ) -> Response[ErrorsList | PulseResponse]: - """ Creates a pulse + """Creates a pulse Creates a new pulse from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | PulseResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewPulse, - ) -> ErrorsList | PulseResponse | None: - """ Creates a pulse + """Creates a pulse Creates a new pulse from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | PulseResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewPulse, - ) -> Response[ErrorsList | PulseResponse]: - """ Creates a pulse + """Creates a pulse Creates a new pulse from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PulseResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewPulse, - ) -> ErrorsList | PulseResponse | None: - """ Creates a pulse + """Creates a pulse Creates a new pulse from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | PulseResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/pulses/get_pulse.py b/rootly_sdk/api/pulses/get_pulse.py index 0ad8c36e..1d751fd4 100644 --- a/rootly_sdk/api/pulses/get_pulse.py +++ b/rootly_sdk/api/pulses/get_pulse.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/pulses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/pulses/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PulseResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PulseResponse | None: if response.status_code == 200: response_200 = PulseResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PulseResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PulseResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PulseResponse]: - """ Retrieves a pulse + """Retrieves a pulse Retrieves a specific pulse by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | PulseResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | PulseResponse | None: - """ Retrieves a pulse + """Retrieves a pulse Retrieves a specific pulse by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | PulseResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PulseResponse]: - """ Retrieves a pulse + """Retrieves a pulse Retrieves a specific pulse by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PulseResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | PulseResponse | None: - """ Retrieves a pulse + """Retrieves a pulse Retrieves a specific pulse by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | PulseResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/pulses/list_pulses.py b/rootly_sdk/api/pulses/list_pulses.py index 647ea640..1603a528 100644 --- a/rootly_sdk/api/pulses/list_pulses.py +++ b/rootly_sdk/api/pulses/list_pulses.py @@ -51,11 +51,7 @@ def _get_kwargs( filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -139,27 +135,21 @@ def _get_kwargs( 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/pulses", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PulseList | None: if response.status_code == 200: response_200 = PulseList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -220,9 +210,8 @@ def sync_detailed( filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[PulseList]: - """ List pulses + """List pulses List pulses @@ -274,51 +263,49 @@ def sync_detailed( Returns: Response[PulseList] - """ - + """ kwargs = _get_kwargs( include=include, -filtersource=filtersource, -filterservices=filterservices, -filterenvironments=filterenvironments, -filterlabels=filterlabels, -filterrefs=filterrefs, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterended_atgt=filterended_atgt, -filterended_atgte=filterended_atgte, -filterended_atlt=filterended_atlt, -filterended_atlte=filterended_atlte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -filterrefseq=filterrefseq, -filterrefsnot_eq=filterrefsnot_eq, -filterrefsin=filterrefsin, -filterrefsnot_in=filterrefsnot_in, -pagenumber=pagenumber, -pagesize=pagesize, - + filtersource=filtersource, + filterservices=filterservices, + filterenvironments=filterenvironments, + filterlabels=filterlabels, + filterrefs=filterrefs, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterended_atgt=filterended_atgt, + filterended_atgte=filterended_atgte, + filterended_atlt=filterended_atlt, + filterended_atlte=filterended_atlte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterrefseq=filterrefseq, + filterrefsnot_eq=filterrefsnot_eq, + filterrefsin=filterrefsin, + filterrefsnot_in=filterrefsnot_in, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -327,6 +314,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -370,9 +358,8 @@ def sync( filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> PulseList | None: - """ List pulses + """List pulses List pulses @@ -424,54 +411,53 @@ def sync( Returns: PulseList - """ - + """ return sync_detailed( client=client, -include=include, -filtersource=filtersource, -filterservices=filterservices, -filterenvironments=filterenvironments, -filterlabels=filterlabels, -filterrefs=filterrefs, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterended_atgt=filterended_atgt, -filterended_atgte=filterended_atgte, -filterended_atlt=filterended_atlt, -filterended_atlte=filterended_atlte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -filterrefseq=filterrefseq, -filterrefsnot_eq=filterrefsnot_eq, -filterrefsin=filterrefsin, -filterrefsnot_in=filterrefsnot_in, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + filtersource=filtersource, + filterservices=filterservices, + filterenvironments=filterenvironments, + filterlabels=filterlabels, + filterrefs=filterrefs, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterended_atgt=filterended_atgt, + filterended_atgte=filterended_atgte, + filterended_atlt=filterended_atlt, + filterended_atlte=filterended_atlte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterrefseq=filterrefseq, + filterrefsnot_eq=filterrefsnot_eq, + filterrefsin=filterrefsin, + filterrefsnot_in=filterrefsnot_in, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -515,9 +501,8 @@ async def asyncio_detailed( filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[PulseList]: - """ List pulses + """List pulses List pulses @@ -569,59 +554,56 @@ async def asyncio_detailed( Returns: Response[PulseList] - """ - + """ kwargs = _get_kwargs( include=include, -filtersource=filtersource, -filterservices=filterservices, -filterenvironments=filterenvironments, -filterlabels=filterlabels, -filterrefs=filterrefs, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterended_atgt=filterended_atgt, -filterended_atgte=filterended_atgte, -filterended_atlt=filterended_atlt, -filterended_atlte=filterended_atlte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -filterrefseq=filterrefseq, -filterrefsnot_eq=filterrefsnot_eq, -filterrefsin=filterrefsin, -filterrefsnot_in=filterrefsnot_in, -pagenumber=pagenumber, -pagesize=pagesize, - + filtersource=filtersource, + filterservices=filterservices, + filterenvironments=filterenvironments, + filterlabels=filterlabels, + filterrefs=filterrefs, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterended_atgt=filterended_atgt, + filterended_atgte=filterended_atgte, + filterended_atlt=filterended_atlt, + filterended_atlte=filterended_atlte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterrefseq=filterrefseq, + filterrefsnot_eq=filterrefsnot_eq, + filterrefsin=filterrefsin, + filterrefsnot_in=filterrefsnot_in, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -665,9 +647,8 @@ async def asyncio( filterrefsnot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> PulseList | None: - """ List pulses + """List pulses List pulses @@ -719,50 +700,50 @@ async def asyncio( Returns: PulseList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -filtersource=filtersource, -filterservices=filterservices, -filterenvironments=filterenvironments, -filterlabels=filterlabels, -filterrefs=filterrefs, -filterstarted_atgt=filterstarted_atgt, -filterstarted_atgte=filterstarted_atgte, -filterstarted_atlt=filterstarted_atlt, -filterstarted_atlte=filterstarted_atlte, -filterended_atgt=filterended_atgt, -filterended_atgte=filterended_atgte, -filterended_atlt=filterended_atlt, -filterended_atlte=filterended_atlte, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filtersourceeq=filtersourceeq, -filtersourcenot_eq=filtersourcenot_eq, -filtersourcein=filtersourcein, -filtersourcenot_in=filtersourcenot_in, -filterserviceseq=filterserviceseq, -filterservicesnot_eq=filterservicesnot_eq, -filterservicesin=filterservicesin, -filterservicesnot_in=filterservicesnot_in, -filterenvironmentseq=filterenvironmentseq, -filterenvironmentsnot_eq=filterenvironmentsnot_eq, -filterenvironmentsin=filterenvironmentsin, -filterenvironmentsnot_in=filterenvironmentsnot_in, -filterlabelseq=filterlabelseq, -filterlabelsnot_eq=filterlabelsnot_eq, -filterlabelsin=filterlabelsin, -filterlabelsnot_in=filterlabelsnot_in, -filterrefseq=filterrefseq, -filterrefsnot_eq=filterrefsnot_eq, -filterrefsin=filterrefsin, -filterrefsnot_in=filterrefsnot_in, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + filtersource=filtersource, + filterservices=filterservices, + filterenvironments=filterenvironments, + filterlabels=filterlabels, + filterrefs=filterrefs, + filterstarted_atgt=filterstarted_atgt, + filterstarted_atgte=filterstarted_atgte, + filterstarted_atlt=filterstarted_atlt, + filterstarted_atlte=filterstarted_atlte, + filterended_atgt=filterended_atgt, + filterended_atgte=filterended_atgte, + filterended_atlt=filterended_atlt, + filterended_atlte=filterended_atlte, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filtersourceeq=filtersourceeq, + filtersourcenot_eq=filtersourcenot_eq, + filtersourcein=filtersourcein, + filtersourcenot_in=filtersourcenot_in, + filterserviceseq=filterserviceseq, + filterservicesnot_eq=filterservicesnot_eq, + filterservicesin=filterservicesin, + filterservicesnot_in=filterservicesnot_in, + filterenvironmentseq=filterenvironmentseq, + filterenvironmentsnot_eq=filterenvironmentsnot_eq, + filterenvironmentsin=filterenvironmentsin, + filterenvironmentsnot_in=filterenvironmentsnot_in, + filterlabelseq=filterlabelseq, + filterlabelsnot_eq=filterlabelsnot_eq, + filterlabelsin=filterlabelsin, + filterlabelsnot_in=filterlabelsnot_in, + filterrefseq=filterrefseq, + filterrefsnot_eq=filterrefsnot_eq, + filterrefsin=filterrefsin, + filterrefsnot_in=filterrefsnot_in, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/pulses/update_pulse.py b/rootly_sdk/api/pulses/update_pulse.py index 354e0290..38022933 100644 --- a/rootly_sdk/api/pulses/update_pulse.py +++ b/rootly_sdk/api/pulses/update_pulse.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdatePulse, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/pulses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/pulses/{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 | PulseResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PulseResponse | None: if response.status_code == 200: response_200 = PulseResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PulseResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PulseResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePulse, - ) -> Response[ErrorsList | PulseResponse]: - """ Update a pulse + """Update a pulse Update a specific pulse by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | PulseResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdatePulse, - ) -> ErrorsList | PulseResponse | None: - """ Update a pulse + """Update a pulse Update a specific pulse by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | PulseResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdatePulse, - ) -> Response[ErrorsList | PulseResponse]: - """ Update a pulse + """Update a pulse Update a specific pulse by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PulseResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdatePulse, - ) -> ErrorsList | PulseResponse | None: - """ Update a pulse + """Update a pulse Update a specific pulse by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | PulseResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_configurations/__init__.py b/rootly_sdk/api/retrospective_configurations/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/retrospective_configurations/__init__.py +++ b/rootly_sdk/api/retrospective_configurations/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py b/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py index e128def7..a198248f 100644 --- a/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py +++ b/rootly_sdk/api/retrospective_configurations/get_retrospective_configuration.py @@ -18,11 +18,7 @@ def _get_kwargs( id: str, *, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -32,34 +28,30 @@ def _get_kwargs( params["include"] = json_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/retrospective_configurations/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_configurations/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveConfigurationResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveConfigurationResponse | None: if response.status_code == 200: response_200 = RetrospectiveConfigurationResponse.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: @@ -68,7 +60,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +76,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, - ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: - """ Retrieves a Retrospective Configuration + """Retrieves a Retrospective Configuration Retrieves a specific retrospective_configuration by id @@ -98,13 +91,11 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveConfigurationResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -113,14 +104,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, - ) -> ErrorsList | RetrospectiveConfigurationResponse | None: - """ Retrieves a Retrospective Configuration + """Retrieves a Retrospective Configuration Retrieves a specific retrospective_configuration by id @@ -134,24 +125,22 @@ def sync( Returns: ErrorsList | RetrospectiveConfigurationResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, - ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: - """ Retrieves a Retrospective Configuration + """Retrieves a Retrospective Configuration Retrieves a specific retrospective_configuration by id @@ -165,29 +154,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveConfigurationResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveConfigurationInclude | Unset = UNSET, - ) -> ErrorsList | RetrospectiveConfigurationResponse | None: - """ Retrieves a Retrospective Configuration + """Retrieves a Retrospective Configuration Retrieves a specific retrospective_configuration by id @@ -201,12 +186,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveConfigurationResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py b/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py index 65645a85..41494cab 100644 --- a/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py +++ b/rootly_sdk/api/retrospective_configurations/list_retrospective_configurations.py @@ -18,11 +18,7 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -38,27 +34,23 @@ def _get_kwargs( params["filter[kind]"] = filterkind - 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/retrospective_configurations", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveConfigurationList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> RetrospectiveConfigurationList | None: if response.status_code == 200: response_200 = RetrospectiveConfigurationList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -67,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveConfigurationList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[RetrospectiveConfigurationList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -83,9 +77,8 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, - ) -> Response[RetrospectiveConfigurationList]: - """ List retrospective configurations + """List retrospective configurations List retrospective configurations @@ -101,15 +94,13 @@ def sync_detailed( Returns: Response[RetrospectiveConfigurationList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, - + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, ) response = client.get_httpx_client().request( @@ -118,6 +109,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -125,9 +117,8 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, - ) -> RetrospectiveConfigurationList | None: - """ List retrospective configurations + """List retrospective configurations List retrospective configurations @@ -143,18 +134,17 @@ def sync( Returns: RetrospectiveConfigurationList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -162,9 +152,8 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, - ) -> Response[RetrospectiveConfigurationList]: - """ List retrospective configurations + """List retrospective configurations List retrospective configurations @@ -180,23 +169,20 @@ async def asyncio_detailed( Returns: Response[RetrospectiveConfigurationList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, - + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -204,9 +190,8 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, filterkind: str | Unset = UNSET, - ) -> RetrospectiveConfigurationList | None: - """ List retrospective configurations + """List retrospective configurations List retrospective configurations @@ -222,14 +207,14 @@ async def asyncio( Returns: RetrospectiveConfigurationList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterkind=filterkind, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterkind=filterkind, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py b/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py index 4f4cf761..ceb35adb 100644 --- a/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py +++ b/rootly_sdk/api/retrospective_configurations/update_retrospective_configuration.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateRetrospectiveConfiguration, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_configurations/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_configurations/{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 | RetrospectiveConfigurationResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveConfigurationResponse | None: if response.status_code == 200: response_200 = RetrospectiveConfigurationResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveConfiguration, - ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: - """ Update a retrospective configuration + """Update a retrospective configuration Update a specific retrospective configuration by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveConfigurationResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveConfiguration, - ) -> ErrorsList | RetrospectiveConfigurationResponse | None: - """ Update a retrospective configuration + """Update a retrospective configuration Update a specific retrospective configuration by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | RetrospectiveConfigurationResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveConfiguration, - ) -> Response[ErrorsList | RetrospectiveConfigurationResponse]: - """ Update a retrospective configuration + """Update a retrospective configuration Update a specific retrospective configuration by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveConfigurationResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveConfiguration, - ) -> ErrorsList | RetrospectiveConfigurationResponse | None: - """ Update a retrospective configuration + """Update a retrospective configuration Update a specific retrospective configuration by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveConfigurationResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_process_group_steps/__init__.py b/rootly_sdk/api/retrospective_process_group_steps/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/retrospective_process_group_steps/__init__.py +++ b/rootly_sdk/api/retrospective_process_group_steps/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 b685e5e7..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 @@ -16,43 +16,35 @@ def _get_kwargs( retrospective_process_group_id: str, *, body: NewRetrospectiveProcessGroupStep, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/retrospective_process_groups/{retrospective_process_group_id}/steps".format(retrospective_process_group_id=quote(str(retrospective_process_group_id), safe=""),), + "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() - headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: if response.status_code == 201: response_201 = RetrospectiveProcessGroupStepResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroupStep, - ) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: - """ Creates a retrospective process group step + """Creates a retrospective process group step Creates a new retrospective process group step from provided data @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupStepResponse] - """ - + """ kwargs = _get_kwargs( retrospective_process_group_id=retrospective_process_group_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( retrospective_process_group_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroupStep, - ) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: - """ Creates a retrospective process group step + """Creates a retrospective process group step Creates a new retrospective process group step from provided data @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | RetrospectiveProcessGroupStepResponse - """ - + """ return sync_detailed( retrospective_process_group_id=retrospective_process_group_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( retrospective_process_group_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroupStep, - ) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: - """ Creates a retrospective process group step + """Creates a retrospective process group step Creates a new retrospective process group step from provided data @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupStepResponse] - """ - + """ kwargs = _get_kwargs( retrospective_process_group_id=retrospective_process_group_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( retrospective_process_group_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroupStep, - ) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: - """ Creates a retrospective process group step + """Creates a retrospective process group step Creates a new retrospective process group step from provided data @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessGroupStepResponse - """ - - - return (await asyncio_detailed( - retrospective_process_group_id=retrospective_process_group_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + retrospective_process_group_id=retrospective_process_group_id, + client=client, + body=body, + ) + ).parsed 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 c93807f3..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/retrospective_process_group_steps/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_process_group_steps/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupStepResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: - """ Delete a RetrospectiveProcessGroup Step + """Delete a RetrospectiveProcessGroup Step Delete a specific RetrospectiveProcessGroup Step by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: - """ Delete a RetrospectiveProcessGroup Step + """Delete a RetrospectiveProcessGroup Step Delete a specific RetrospectiveProcessGroup Step by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | RetrospectiveProcessGroupStepResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveProcessGroupStepResponse]: - """ Delete a RetrospectiveProcessGroup Step + """Delete a RetrospectiveProcessGroup Step Delete a specific RetrospectiveProcessGroup Step by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveProcessGroupStepResponse | None: - """ Delete a RetrospectiveProcessGroup Step + """Delete a RetrospectiveProcessGroup Step Delete a specific RetrospectiveProcessGroup Step by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessGroupStepResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 f87bd7bd..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 @@ -12,30 +12,24 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/retrospective_process_group_steps/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_process_group_steps/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> RetrospectiveProcessGroupStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupStepResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -44,7 +38,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[RetrospectiveProcessGroupStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -57,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[RetrospectiveProcessGroupStepResponse]: - """ Retrieves a RetrospectiveProcessGroup Step + """Retrieves a RetrospectiveProcessGroup Step Retrieves a specific RetrospectiveProcessGroup Step by id @@ -72,12 +67,10 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -86,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> RetrospectiveProcessGroupStepResponse | None: - """ Retrieves a RetrospectiveProcessGroup Step + """Retrieves a RetrospectiveProcessGroup Step Retrieves a specific RetrospectiveProcessGroup Step by id @@ -105,22 +98,20 @@ def sync( Returns: RetrospectiveProcessGroupStepResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[RetrospectiveProcessGroupStepResponse]: - """ Retrieves a RetrospectiveProcessGroup Step + """Retrieves a RetrospectiveProcessGroup Step Retrieves a specific RetrospectiveProcessGroup Step by id @@ -133,27 +124,23 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> RetrospectiveProcessGroupStepResponse | None: - """ Retrieves a RetrospectiveProcessGroup Step + """Retrieves a RetrospectiveProcessGroup Step Retrieves a specific RetrospectiveProcessGroup Step by id @@ -166,11 +153,11 @@ async def asyncio( Returns: RetrospectiveProcessGroupStepResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 96b8a832..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 @@ -21,11 +21,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -45,27 +41,25 @@ def _get_kwargs( 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/retrospective_process_groups/{retrospective_process_group_id}/steps".format(retrospective_process_group_id=quote(str(retrospective_process_group_id), safe=""),), + "url": "/v1/retrospective_process_groups/{retrospective_process_group_id}/steps".format( + retrospective_process_group_id=quote(str(retrospective_process_group_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupStepList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> RetrospectiveProcessGroupStepList | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupStepList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -74,7 +68,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupStepList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[RetrospectiveProcessGroupStepList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -95,9 +91,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[RetrospectiveProcessGroupStepList]: - """ List RetrospectiveProcessGroup Steps + """List RetrospectiveProcessGroup Steps List RetrospectiveProcessGroup Steps @@ -118,20 +113,18 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupStepList] - """ - + """ kwargs = _get_kwargs( retrospective_process_group_id=retrospective_process_group_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterretrospective_step_id=filterretrospective_step_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterretrospective_step_id=filterretrospective_step_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ) response = client.get_httpx_client().request( @@ -140,6 +133,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( retrospective_process_group_id: str, *, @@ -152,9 +146,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> RetrospectiveProcessGroupStepList | None: - """ List RetrospectiveProcessGroup Steps + """List RetrospectiveProcessGroup Steps List RetrospectiveProcessGroup Steps @@ -175,23 +168,22 @@ def sync( Returns: RetrospectiveProcessGroupStepList - """ - + """ return sync_detailed( retrospective_process_group_id=retrospective_process_group_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterretrospective_step_id=filterretrospective_step_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterretrospective_step_id=filterretrospective_step_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ).parsed + async def asyncio_detailed( retrospective_process_group_id: str, *, @@ -204,9 +196,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[RetrospectiveProcessGroupStepList]: - """ List RetrospectiveProcessGroup Steps + """List RetrospectiveProcessGroup Steps List RetrospectiveProcessGroup Steps @@ -227,28 +218,25 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupStepList] - """ - + """ kwargs = _get_kwargs( retrospective_process_group_id=retrospective_process_group_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterretrospective_step_id=filterretrospective_step_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterretrospective_step_id=filterretrospective_step_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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( retrospective_process_group_id: str, *, @@ -261,9 +249,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> RetrospectiveProcessGroupStepList | None: - """ List RetrospectiveProcessGroup Steps + """List RetrospectiveProcessGroup Steps List RetrospectiveProcessGroup Steps @@ -284,19 +271,19 @@ async def asyncio( Returns: RetrospectiveProcessGroupStepList - """ - - - return (await asyncio_detailed( - retrospective_process_group_id=retrospective_process_group_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterretrospective_step_id=filterretrospective_step_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - - )).parsed + """ + + return ( + await asyncio_detailed( + retrospective_process_group_id=retrospective_process_group_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterretrospective_step_id=filterretrospective_step_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed 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 4a965479..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 @@ -15,36 +15,30 @@ def _get_kwargs( id: str, *, body: UpdateRetrospectiveProcessGroupStep, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_process_group_steps/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_process_group_steps/{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) -> RetrospectiveProcessGroupStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> RetrospectiveProcessGroupStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupStepResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -53,7 +47,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[RetrospectiveProcessGroupStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,9 +63,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroupStep, - ) -> Response[RetrospectiveProcessGroupStepResponse]: - """ Update RetrospectiveProcessGroup Step + """Update RetrospectiveProcessGroup Step Update a specific RetrospectiveProcessGroup Step by id @@ -83,13 +78,11 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -98,14 +91,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroupStep, - ) -> RetrospectiveProcessGroupStepResponse | None: - """ Update RetrospectiveProcessGroup Step + """Update RetrospectiveProcessGroup Step Update a specific RetrospectiveProcessGroup Step by id @@ -119,24 +112,22 @@ def sync( Returns: RetrospectiveProcessGroupStepResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroupStep, - ) -> Response[RetrospectiveProcessGroupStepResponse]: - """ Update RetrospectiveProcessGroup Step + """Update RetrospectiveProcessGroup Step Update a specific RetrospectiveProcessGroup Step by id @@ -150,29 +141,25 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroupStep, - ) -> RetrospectiveProcessGroupStepResponse | None: - """ Update RetrospectiveProcessGroup Step + """Update RetrospectiveProcessGroup Step Update a specific RetrospectiveProcessGroup Step by id @@ -186,12 +173,12 @@ async def asyncio( Returns: RetrospectiveProcessGroupStepResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_process_groups/__init__.py b/rootly_sdk/api/retrospective_process_groups/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/retrospective_process_groups/__init__.py +++ b/rootly_sdk/api/retrospective_process_groups/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 7b89f7e6..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 @@ -16,43 +16,35 @@ def _get_kwargs( retrospective_process_id: str, *, body: NewRetrospectiveProcessGroup, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/retrospective_processes/{retrospective_process_id}/groups".format(retrospective_process_id=quote(str(retrospective_process_id), safe=""),), + "url": "/v1/retrospective_processes/{retrospective_process_id}/groups".format( + retrospective_process_id=quote(str(retrospective_process_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 | RetrospectiveProcessGroupResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveProcessGroupResponse | None: if response.status_code == 201: response_201 = RetrospectiveProcessGroupResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroup, - ) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: - """ Creates a retrospective process group + """Creates a retrospective process group Creates a new retrospective process group from provided data @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupResponse] - """ - + """ kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroup, - ) -> ErrorsList | RetrospectiveProcessGroupResponse | None: - """ Creates a retrospective process group + """Creates a retrospective process group Creates a new retrospective process group from provided data @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | RetrospectiveProcessGroupResponse - """ - + """ return sync_detailed( retrospective_process_id=retrospective_process_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroup, - ) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: - """ Creates a retrospective process group + """Creates a retrospective process group Creates a new retrospective process group from provided data @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupResponse] - """ - + """ kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveProcessGroup, - ) -> ErrorsList | RetrospectiveProcessGroupResponse | None: - """ Creates a retrospective process group + """Creates a retrospective process group Creates a new retrospective process group from provided data @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessGroupResponse - """ - - - return (await asyncio_detailed( - retrospective_process_id=retrospective_process_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + retrospective_process_id=retrospective_process_id, + client=client, + body=body, + ) + ).parsed 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 5ec78e5a..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/retrospective_process_groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_process_groups/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessGroupResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveProcessGroupResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: - """ Delete a Retrospective Process Group + """Delete a Retrospective Process Group Delete a specific Retrospective Process Group by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveProcessGroupResponse | None: - """ Delete a Retrospective Process Group + """Delete a Retrospective Process Group Delete a specific Retrospective Process Group by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | RetrospectiveProcessGroupResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveProcessGroupResponse]: - """ Delete a Retrospective Process Group + """Delete a Retrospective Process Group Delete a specific Retrospective Process Group by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveProcessGroupResponse | None: - """ Delete a Retrospective Process Group + """Delete a Retrospective Process Group Delete a specific Retrospective Process Group by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessGroupResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 d92aa925..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 @@ -17,11 +17,7 @@ def _get_kwargs( id: str, *, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -31,27 +27,25 @@ def _get_kwargs( params["include"] = json_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/retrospective_process_groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_process_groups/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> RetrospectiveProcessGroupResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -60,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[RetrospectiveProcessGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -74,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, - ) -> Response[RetrospectiveProcessGroupResponse]: - """ Retrieves a Retrospective Process Group + """Retrieves a Retrospective Process Group Retrieves a specific Retrospective Process Group by id @@ -90,13 +85,11 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -105,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, - ) -> RetrospectiveProcessGroupResponse | None: - """ Retrieves a Retrospective Process Group + """Retrieves a Retrospective Process Group Retrieves a specific Retrospective Process Group by id @@ -126,24 +119,22 @@ def sync( Returns: RetrospectiveProcessGroupResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, - ) -> Response[RetrospectiveProcessGroupResponse]: - """ Retrieves a Retrospective Process Group + """Retrieves a Retrospective Process Group Retrieves a specific Retrospective Process Group by id @@ -157,29 +148,25 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessGroupInclude | Unset = UNSET, - ) -> RetrospectiveProcessGroupResponse | None: - """ Retrieves a Retrospective Process Group + """Retrieves a Retrospective Process Group Retrieves a specific Retrospective Process Group by id @@ -193,12 +180,12 @@ async def asyncio( Returns: RetrospectiveProcessGroupResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed 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 f9c6dc6a..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 @@ -28,11 +28,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -62,27 +58,25 @@ def _get_kwargs( 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/retrospective_processes/{retrospective_process_id}/groups".format(retrospective_process_id=quote(str(retrospective_process_id), safe=""),), + "url": "/v1/retrospective_processes/{retrospective_process_id}/groups".format( + retrospective_process_id=quote(str(retrospective_process_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessGroupList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> RetrospectiveProcessGroupList | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -91,7 +85,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[RetrospectiveProcessGroupList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -113,9 +109,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[RetrospectiveProcessGroupList]: - """ List Retrospective Process Groups + """List Retrospective Process Groups List Retrospective Process Groups @@ -137,21 +132,19 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupList] - """ - + """ kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersub_status_id=filtersub_status_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersub_status_id=filtersub_status_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ) response = client.get_httpx_client().request( @@ -160,6 +153,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( retrospective_process_id: str, *, @@ -173,9 +167,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> RetrospectiveProcessGroupList | None: - """ List Retrospective Process Groups + """List Retrospective Process Groups List Retrospective Process Groups @@ -197,24 +190,23 @@ def sync( Returns: RetrospectiveProcessGroupList - """ - + """ return sync_detailed( retrospective_process_id=retrospective_process_id, -client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersub_status_id=filtersub_status_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersub_status_id=filtersub_status_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ).parsed + async def asyncio_detailed( retrospective_process_id: str, *, @@ -228,9 +220,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[RetrospectiveProcessGroupList]: - """ List Retrospective Process Groups + """List Retrospective Process Groups List Retrospective Process Groups @@ -252,29 +243,26 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupList] - """ - + """ kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersub_status_id=filtersub_status_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersub_status_id=filtersub_status_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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( retrospective_process_id: str, *, @@ -288,9 +276,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> RetrospectiveProcessGroupList | None: - """ List Retrospective Process Groups + """List Retrospective Process Groups List Retrospective Process Groups @@ -312,20 +299,20 @@ async def asyncio( Returns: RetrospectiveProcessGroupList - """ - - - return (await asyncio_detailed( - retrospective_process_id=retrospective_process_id, -client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersub_status_id=filtersub_status_id, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - - )).parsed + """ + + return ( + await asyncio_detailed( + retrospective_process_id=retrospective_process_id, + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersub_status_id=filtersub_status_id, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed 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 a1c69c70..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 @@ -15,36 +15,30 @@ def _get_kwargs( id: str, *, body: UpdateRetrospectiveProcessGroup, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_process_groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_process_groups/{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) -> RetrospectiveProcessGroupResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> RetrospectiveProcessGroupResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessGroupResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -53,7 +47,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessGroupResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[RetrospectiveProcessGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -67,9 +63,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroup, - ) -> Response[RetrospectiveProcessGroupResponse]: - """ Update a Retrospective Process Group + """Update a Retrospective Process Group Update a specific Retrospective Process Group by id @@ -83,13 +78,11 @@ def sync_detailed( Returns: Response[RetrospectiveProcessGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -98,14 +91,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroup, - ) -> RetrospectiveProcessGroupResponse | None: - """ Update a Retrospective Process Group + """Update a Retrospective Process Group Update a specific Retrospective Process Group by id @@ -119,24 +112,22 @@ def sync( Returns: RetrospectiveProcessGroupResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroup, - ) -> Response[RetrospectiveProcessGroupResponse]: - """ Update a Retrospective Process Group + """Update a Retrospective Process Group Update a specific Retrospective Process Group by id @@ -150,29 +141,25 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcessGroup, - ) -> RetrospectiveProcessGroupResponse | None: - """ Update a Retrospective Process Group + """Update a Retrospective Process Group Update a specific Retrospective Process Group by id @@ -186,12 +173,12 @@ async def asyncio( Returns: RetrospectiveProcessGroupResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_processes/__init__.py b/rootly_sdk/api/retrospective_processes/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/retrospective_processes/__init__.py +++ b/rootly_sdk/api/retrospective_processes/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/retrospective_processes/create_retrospective_process.py b/rootly_sdk/api/retrospective_processes/create_retrospective_process.py index a3318c02..958b54e7 100644 --- a/rootly_sdk/api/retrospective_processes/create_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/create_retrospective_process.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewRetrospectiveProcess, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/retrospective_processes", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | RetrospectiveProcessResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveProcessResponse | None: if response.status_code == 201: response_201 = RetrospectiveProcessResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveProcessResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveProcess, - ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """ Creates a retrospective process + """Creates a retrospective process Creates a new retrospective process from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewRetrospectiveProcess, - ) -> ErrorsList | RetrospectiveProcessResponse | None: - """ Creates a retrospective process + """Creates a retrospective process Creates a new retrospective process from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | RetrospectiveProcessResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveProcess, - ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """ Creates a retrospective process + """Creates a retrospective process Creates a new retrospective process from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewRetrospectiveProcess, - ) -> ErrorsList | RetrospectiveProcessResponse | None: - """ Creates a retrospective process + """Creates a retrospective process Creates a new retrospective process from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py b/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py index 665d05ac..cb4c54f8 100644 --- a/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/delete_retrospective_process.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/retrospective_processes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_processes/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveProcessResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveProcessResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """ Delete a retrospective process + """Delete a retrospective process Delete a specific retrospective process by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveProcessResponse | None: - """ Delete a retrospective process + """Delete a retrospective process Delete a specific retrospective process by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | RetrospectiveProcessResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """ Delete a retrospective process + """Delete a retrospective process Delete a specific retrospective process by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveProcessResponse | None: - """ Delete a retrospective process + """Delete a retrospective process Delete a specific retrospective process by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_processes/get_retrospective_process.py b/rootly_sdk/api/retrospective_processes/get_retrospective_process.py index 0cc2260d..f88cfd09 100644 --- a/rootly_sdk/api/retrospective_processes/get_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/get_retrospective_process.py @@ -18,11 +18,7 @@ def _get_kwargs( id: str, *, include: GetRetrospectiveProcessInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -32,34 +28,30 @@ def _get_kwargs( params["include"] = json_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/retrospective_processes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_processes/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveProcessResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveProcessResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessResponse.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: @@ -68,7 +60,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveProcessResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +76,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetRetrospectiveProcessInclude | Unset = UNSET, - ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """ Retrieves a retrospective process + """Retrieves a retrospective process Retrieves a specific retrospective process by id @@ -98,13 +91,11 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -113,14 +104,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessInclude | Unset = UNSET, - ) -> ErrorsList | RetrospectiveProcessResponse | None: - """ Retrieves a retrospective process + """Retrieves a retrospective process Retrieves a specific retrospective process by id @@ -134,24 +125,22 @@ def sync( Returns: ErrorsList | RetrospectiveProcessResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessInclude | Unset = UNSET, - ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """ Retrieves a retrospective process + """Retrieves a retrospective process Retrieves a specific retrospective process by id @@ -165,29 +154,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetRetrospectiveProcessInclude | Unset = UNSET, - ) -> ErrorsList | RetrospectiveProcessResponse | None: - """ Retrieves a retrospective process + """Retrieves a retrospective process Retrieves a specific retrospective process by id @@ -201,12 +186,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py b/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py index e0baeee6..a106a418 100644 --- a/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py +++ b/rootly_sdk/api/retrospective_processes/list_retrospective_processes.py @@ -17,11 +17,7 @@ def _get_kwargs( include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -35,27 +31,23 @@ def _get_kwargs( 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/retrospective_processes", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveProcessList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> RetrospectiveProcessList | None: if response.status_code == 200: response_200 = RetrospectiveProcessList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -64,7 +56,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveProcessList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[RetrospectiveProcessList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +73,8 @@ def sync_detailed( include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[RetrospectiveProcessList]: - """ List retrospective processes + """List retrospective processes List retrospective processes @@ -96,14 +89,12 @@ def sync_detailed( Returns: Response[RetrospectiveProcessList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -112,15 +103,15 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> RetrospectiveProcessList | None: - """ List retrospective processes + """List retrospective processes List retrospective processes @@ -135,26 +126,24 @@ def sync( Returns: RetrospectiveProcessList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[RetrospectiveProcessList]: - """ List retrospective processes + """List retrospective processes List retrospective processes @@ -169,31 +158,27 @@ async def asyncio_detailed( Returns: Response[RetrospectiveProcessList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, include: ListRetrospectiveProcessesInclude | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> RetrospectiveProcessList | None: - """ List retrospective processes + """List retrospective processes List retrospective processes @@ -208,13 +193,13 @@ async def asyncio( Returns: RetrospectiveProcessList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_processes/update_retrospective_process.py b/rootly_sdk/api/retrospective_processes/update_retrospective_process.py index 8ca0883a..d290ed1b 100644 --- a/rootly_sdk/api/retrospective_processes/update_retrospective_process.py +++ b/rootly_sdk/api/retrospective_processes/update_retrospective_process.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateRetrospectiveProcess, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_processes/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_processes/{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 | RetrospectiveProcessResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveProcessResponse | None: if response.status_code == 200: response_200 = RetrospectiveProcessResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveProcessResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveProcessResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveProcess, - ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """ Update a retrospective process + """Update a retrospective process Updates a specific retrospective process by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcess, - ) -> ErrorsList | RetrospectiveProcessResponse | None: - """ Update a retrospective process + """Update a retrospective process Updates a specific retrospective process by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | RetrospectiveProcessResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcess, - ) -> Response[ErrorsList | RetrospectiveProcessResponse]: - """ Update a retrospective process + """Update a retrospective process Updates a specific retrospective process by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveProcessResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveProcess, - ) -> ErrorsList | RetrospectiveProcessResponse | None: - """ Update a retrospective process + """Update a retrospective process Updates a specific retrospective process by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveProcessResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_steps/__init__.py b/rootly_sdk/api/retrospective_steps/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/retrospective_steps/__init__.py +++ b/rootly_sdk/api/retrospective_steps/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/retrospective_steps/create_retrospective_step.py b/rootly_sdk/api/retrospective_steps/create_retrospective_step.py index d131dc96..92dfb6e8 100644 --- a/rootly_sdk/api/retrospective_steps/create_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/create_retrospective_step.py @@ -16,50 +16,40 @@ def _get_kwargs( retrospective_process_id: str, *, body: NewRetrospectiveStep, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps".format(retrospective_process_id=quote(str(retrospective_process_id), safe=""),), + "url": "/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps".format( + retrospective_process_id=quote(str(retrospective_process_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 | RetrospectiveStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveStepResponse | None: if response.status_code == 201: response_201 = RetrospectiveStepResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRetrospectiveStep, - ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """ Creates a retrospective step + """Creates a retrospective step Creates a new retrospective step from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveStep, - ) -> ErrorsList | RetrospectiveStepResponse | None: - """ Creates a retrospective step + """Creates a retrospective step Creates a new retrospective step from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | RetrospectiveStepResponse - """ - + """ return sync_detailed( retrospective_process_id=retrospective_process_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveStep, - ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """ Creates a retrospective step + """Creates a retrospective step Creates a new retrospective step from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( retrospective_process_id: str, *, client: AuthenticatedClient, body: NewRetrospectiveStep, - ) -> ErrorsList | RetrospectiveStepResponse | None: - """ Creates a retrospective step + """Creates a retrospective step Creates a new retrospective step from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveStepResponse - """ - - - return (await asyncio_detailed( - retrospective_process_id=retrospective_process_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + retrospective_process_id=retrospective_process_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py b/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py index 2574fb5e..51361c85 100644 --- a/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/delete_retrospective_step.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/retrospective_steps/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_steps/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveStepResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """ Delete a retrospective step + """Delete a retrospective step Delete a specific retrospective step by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveStepResponse | None: - """ Delete a retrospective step + """Delete a retrospective step Delete a specific retrospective step by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | RetrospectiveStepResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """ Delete a retrospective step + """Delete a retrospective step Delete a specific retrospective step by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveStepResponse | None: - """ Delete a retrospective step + """Delete a retrospective step Delete a specific retrospective step by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveStepResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_steps/get_retrospective_step.py b/rootly_sdk/api/retrospective_steps/get_retrospective_step.py index 4391ba02..416a641b 100644 --- a/rootly_sdk/api/retrospective_steps/get_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/get_retrospective_step.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/retrospective_steps/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_steps/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RetrospectiveStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveStepResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """ Retrieves a retrospective step + """Retrieves a retrospective step Retrieves a specific retrospective step by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveStepResponse | None: - """ Retrieves a retrospective step + """Retrieves a retrospective step Retrieves a specific retrospective step by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | RetrospectiveStepResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """ Retrieves a retrospective step + """Retrieves a retrospective step Retrieves a specific retrospective step by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | RetrospectiveStepResponse | None: - """ Retrieves a retrospective step + """Retrieves a retrospective step Retrieves a specific retrospective step by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | RetrospectiveStepResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py b/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py index 1daf49a6..d611a9e0 100644 --- a/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py +++ b/rootly_sdk/api/retrospective_steps/list_retrospective_steps.py @@ -17,11 +17,7 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,27 +29,23 @@ def _get_kwargs( 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/retrospective_processes/{retrospective_process_id}/retrospective_steps".format(retrospective_process_id=quote(str(retrospective_process_id), safe=""),), + "url": "/v1/retrospective_processes/{retrospective_process_id}/retrospective_steps".format( + retrospective_process_id=quote(str(retrospective_process_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RetrospectiveStepList | None: if response.status_code == 200: response_200 = RetrospectiveStepList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[RetrospectiveStepList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[RetrospectiveStepList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +73,8 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[RetrospectiveStepList]: - """ List retrospective steps + """List retrospective steps List retrospective steps @@ -98,16 +91,14 @@ def sync_detailed( Returns: Response[RetrospectiveStepList] - """ - + """ kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, ) response = client.get_httpx_client().request( @@ -116,6 +107,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( retrospective_process_id: str, *, @@ -124,9 +116,8 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> RetrospectiveStepList | None: - """ List retrospective steps + """List retrospective steps List retrospective steps @@ -143,19 +134,18 @@ def sync( Returns: RetrospectiveStepList - """ - + """ return sync_detailed( retrospective_process_id=retrospective_process_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, ).parsed + async def asyncio_detailed( retrospective_process_id: str, *, @@ -164,9 +154,8 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[RetrospectiveStepList]: - """ List retrospective steps + """List retrospective steps List retrospective steps @@ -183,24 +172,21 @@ async def asyncio_detailed( Returns: Response[RetrospectiveStepList] - """ - + """ kwargs = _get_kwargs( retrospective_process_id=retrospective_process_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( retrospective_process_id: str, *, @@ -209,9 +195,8 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> RetrospectiveStepList | None: - """ List retrospective steps + """List retrospective steps List retrospective steps @@ -228,15 +213,15 @@ async def asyncio( Returns: RetrospectiveStepList - """ - - - return (await asyncio_detailed( - retrospective_process_id=retrospective_process_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + retrospective_process_id=retrospective_process_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_steps/update_retrospective_step.py b/rootly_sdk/api/retrospective_steps/update_retrospective_step.py index 31f946d2..004aa760 100644 --- a/rootly_sdk/api/retrospective_steps/update_retrospective_step.py +++ b/rootly_sdk/api/retrospective_steps/update_retrospective_step.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateRetrospectiveStep, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/retrospective_steps/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/retrospective_steps/{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 | RetrospectiveStepResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RetrospectiveStepResponse | None: if response.status_code == 200: response_200 = RetrospectiveStepResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RetrospectiveStepResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RetrospectiveStepResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRetrospectiveStep, - ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """ Update a retrospective step + """Update a retrospective step Update a specific retrospective step by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveStep, - ) -> ErrorsList | RetrospectiveStepResponse | None: - """ Update a retrospective step + """Update a retrospective step Update a specific retrospective step by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | RetrospectiveStepResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveStep, - ) -> Response[ErrorsList | RetrospectiveStepResponse]: - """ Update a retrospective step + """Update a retrospective step Update a specific retrospective step by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RetrospectiveStepResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateRetrospectiveStep, - ) -> ErrorsList | RetrospectiveStepResponse | None: - """ Update a retrospective step + """Update a retrospective step Update a specific retrospective step by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | RetrospectiveStepResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_templates/__init__.py b/rootly_sdk/api/retrospective_templates/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/retrospective_templates/__init__.py +++ b/rootly_sdk/api/retrospective_templates/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/retrospective_templates/create_postmortem_template.py b/rootly_sdk/api/retrospective_templates/create_postmortem_template.py index 1a543ae2..a45d193d 100644 --- a/rootly_sdk/api/retrospective_templates/create_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/create_postmortem_template.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewPostMortemTemplate, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/post_mortem_templates", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | PostMortemTemplateResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PostMortemTemplateResponse | None: if response.status_code == 201: response_201 = PostMortemTemplateResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PostMortemTemplateResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PostMortemTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewPostMortemTemplate, - ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """ Creates a retrospective template + """Creates a retrospective template Creates a new Retrospective Template from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewPostMortemTemplate, - ) -> ErrorsList | PostMortemTemplateResponse | None: - """ Creates a retrospective template + """Creates a retrospective template Creates a new Retrospective Template from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | PostMortemTemplateResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewPostMortemTemplate, - ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """ Creates a retrospective template + """Creates a retrospective template Creates a new Retrospective Template from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewPostMortemTemplate, - ) -> ErrorsList | PostMortemTemplateResponse | None: - """ Creates a retrospective template + """Creates a retrospective template Creates a new Retrospective Template from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | PostMortemTemplateResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py b/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py index 75990be1..aafa6848 100644 --- a/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/delete_postmortem_template.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/post_mortem_templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/post_mortem_templates/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PostMortemTemplateResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PostMortemTemplateResponse | None: if response.status_code == 200: response_200 = PostMortemTemplateResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PostMortemTemplateResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PostMortemTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """ Delete a Retrospective Template + """Delete a Retrospective Template Delete a specific Retrospective Template by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | PostMortemTemplateResponse | None: - """ Delete a Retrospective Template + """Delete a Retrospective Template Delete a specific Retrospective Template by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | PostMortemTemplateResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """ Delete a Retrospective Template + """Delete a Retrospective Template Delete a specific Retrospective Template by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | PostMortemTemplateResponse | None: - """ Delete a Retrospective Template + """Delete a Retrospective Template Delete a specific Retrospective Template by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | PostMortemTemplateResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_templates/get_postmortem_template.py b/rootly_sdk/api/retrospective_templates/get_postmortem_template.py index fbe27f91..20fda05d 100644 --- a/rootly_sdk/api/retrospective_templates/get_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/get_postmortem_template.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/post_mortem_templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/post_mortem_templates/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | PostMortemTemplateResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PostMortemTemplateResponse | None: if response.status_code == 200: response_200 = PostMortemTemplateResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PostMortemTemplateResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PostMortemTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """ Retrieves a Retrospective Template + """Retrieves a Retrospective Template Retrieves a specific Retrospective Template by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | PostMortemTemplateResponse | None: - """ Retrieves a Retrospective Template + """Retrieves a Retrospective Template Retrieves a specific Retrospective Template by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | PostMortemTemplateResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """ Retrieves a Retrospective Template + """Retrieves a Retrospective Template Retrieves a specific Retrospective Template by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | PostMortemTemplateResponse | None: - """ Retrieves a Retrospective Template + """Retrieves a Retrospective Template Retrieves a specific Retrospective Template by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | PostMortemTemplateResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py b/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py index dae2f2ad..a85e9595 100644 --- a/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py +++ b/rootly_sdk/api/retrospective_templates/list_postmortem_templates.py @@ -14,11 +14,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -28,27 +24,21 @@ def _get_kwargs( 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/post_mortem_templates", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> PostMortemTemplateList | None: if response.status_code == 200: response_200 = PostMortemTemplateList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -57,7 +47,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[PostMortemTemplateList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[PostMortemTemplateList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[PostMortemTemplateList]: - """ List Retrospective Templates + """List Retrospective Templates List Retrospective Templates @@ -89,14 +80,12 @@ def sync_detailed( Returns: Response[PostMortemTemplateList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -105,15 +94,15 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> PostMortemTemplateList | None: - """ List Retrospective Templates + """List Retrospective Templates List Retrospective Templates @@ -128,26 +117,24 @@ def sync( Returns: PostMortemTemplateList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[PostMortemTemplateList]: - """ List Retrospective Templates + """List Retrospective Templates List Retrospective Templates @@ -162,31 +149,27 @@ async def asyncio_detailed( Returns: Response[PostMortemTemplateList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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, - ) -> PostMortemTemplateList | None: - """ List Retrospective Templates + """List Retrospective Templates List Retrospective Templates @@ -201,13 +184,13 @@ async def asyncio( Returns: PostMortemTemplateList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/retrospective_templates/update_postmortem_template.py b/rootly_sdk/api/retrospective_templates/update_postmortem_template.py index 9e840b8d..32d1be7f 100644 --- a/rootly_sdk/api/retrospective_templates/update_postmortem_template.py +++ b/rootly_sdk/api/retrospective_templates/update_postmortem_template.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdatePostMortemTemplate, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/post_mortem_templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/post_mortem_templates/{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 | PostMortemTemplateResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | PostMortemTemplateResponse | None: if response.status_code == 200: response_200 = PostMortemTemplateResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | PostMortemTemplateResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | PostMortemTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, - ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """ Update a Retrospective Template + """Update a Retrospective Template Update a specific Retrospective Template by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, - ) -> ErrorsList | PostMortemTemplateResponse | None: - """ Update a Retrospective Template + """Update a Retrospective Template Update a specific Retrospective Template by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | PostMortemTemplateResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, - ) -> Response[ErrorsList | PostMortemTemplateResponse]: - """ Update a Retrospective Template + """Update a Retrospective Template Update a specific Retrospective Template by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | PostMortemTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdatePostMortemTemplate, - ) -> ErrorsList | PostMortemTemplateResponse | None: - """ Update a Retrospective Template + """Update a Retrospective Template Update a specific Retrospective Template by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | PostMortemTemplateResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/roles/__init__.py b/rootly_sdk/api/roles/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/roles/__init__.py +++ b/rootly_sdk/api/roles/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/roles/create_role.py b/rootly_sdk/api/roles/create_role.py index 8b9f812c..14a23064 100644 --- a/rootly_sdk/api/roles/create_role.py +++ b/rootly_sdk/api/roles/create_role.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewRole, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/roles", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | RoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RoleResponse | None: if response.status_code == 201: response_201 = RoleResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewRole, - ) -> Response[ErrorsList | RoleResponse]: - """ Creates a role + """Creates a role Creates a new role from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | RoleResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewRole, - ) -> ErrorsList | RoleResponse | None: - """ Creates a role + """Creates a role Creates a new role from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | RoleResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewRole, - ) -> Response[ErrorsList | RoleResponse]: - """ Creates a role + """Creates a role Creates a new role from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RoleResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewRole, - ) -> ErrorsList | RoleResponse | None: - """ Creates a role + """Creates a role Creates a new role from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | RoleResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/roles/delete_role.py b/rootly_sdk/api/roles/delete_role.py index 37666e5f..72c04400 100644 --- a/rootly_sdk/api/roles/delete_role.py +++ b/rootly_sdk/api/roles/delete_role.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/roles/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/roles/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RoleResponse | None: if response.status_code == 200: response_200 = RoleResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RoleResponse]: - """ Delete a role + """Delete a role Delete a specific role by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | RoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | RoleResponse | None: - """ Delete a role + """Delete a role Delete a specific role by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | RoleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RoleResponse]: - """ Delete a role + """Delete a role Delete a specific role by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | RoleResponse | None: - """ Delete a role + """Delete a role Delete a specific role by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | RoleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/roles/get_role.py b/rootly_sdk/api/roles/get_role.py index e27afd1b..ec32d7ee 100644 --- a/rootly_sdk/api/roles/get_role.py +++ b/rootly_sdk/api/roles/get_role.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/roles/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/roles/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | RoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RoleResponse | None: if response.status_code == 200: response_200 = RoleResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RoleResponse]: - """ Retrieves a role + """Retrieves a role Retrieves a specific role by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | RoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | RoleResponse | None: - """ Retrieves a role + """Retrieves a role Retrieves a specific role by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | RoleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | RoleResponse]: - """ Retrieves a role + """Retrieves a role Retrieves a specific role by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | RoleResponse | None: - """ Retrieves a role + """Retrieves a role Retrieves a specific role by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | RoleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/roles/list_roles.py b/rootly_sdk/api/roles/list_roles.py index 53a8c51f..fd378970 100644 --- a/rootly_sdk/api/roles/list_roles.py +++ b/rootly_sdk/api/roles/list_roles.py @@ -22,11 +22,7 @@ def _get_kwargs( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -52,27 +48,21 @@ def _get_kwargs( 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/roles", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> RoleList | None: if response.status_code == 200: response_200 = RoleList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -104,9 +94,8 @@ def sync_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[RoleList]: - """ List roles + """List roles List roles @@ -129,22 +118,20 @@ def sync_detailed( Returns: Response[RoleList] - """ - + """ kwargs = _get_kwargs( include=include, -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, - + 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( @@ -153,6 +140,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -167,9 +155,8 @@ def sync( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> RoleList | None: - """ List roles + """List roles List roles @@ -192,25 +179,24 @@ def sync( Returns: RoleList - """ - + """ return sync_detailed( client=client, -include=include, -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, - + include=include, + 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, @@ -225,9 +211,8 @@ async def asyncio_detailed( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[RoleList]: - """ List roles + """List roles List roles @@ -250,30 +235,27 @@ async def asyncio_detailed( Returns: Response[RoleList] - """ - + """ kwargs = _get_kwargs( include=include, -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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -288,9 +270,8 @@ async def asyncio( filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> RoleList | None: - """ List roles + """List roles List roles @@ -313,21 +294,21 @@ async def asyncio( Returns: RoleList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -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 + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + 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/roles/update_role.py b/rootly_sdk/api/roles/update_role.py index d49dc5fe..a0e1e4cd 100644 --- a/rootly_sdk/api/roles/update_role.py +++ b/rootly_sdk/api/roles/update_role.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateRole, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/roles/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/roles/{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 | RoleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | RoleResponse | None: if response.status_code == 200: response_200 = RoleResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | RoleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | RoleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateRole, - ) -> Response[ErrorsList | RoleResponse]: - """ Update a role + """Update a role Update a specific role by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | RoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, - ) -> ErrorsList | RoleResponse | None: - """ Update a role + """Update a role Update a specific role by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | RoleResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, - ) -> Response[ErrorsList | RoleResponse]: - """ Update a role + """Update a role Update a specific role by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | RoleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateRole, - ) -> ErrorsList | RoleResponse | None: - """ Update a role + """Update a role Update a specific role by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | RoleResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/schedule_rotation_active_days/__init__.py b/rootly_sdk/api/schedule_rotation_active_days/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/schedule_rotation_active_days/__init__.py +++ b/rootly_sdk/api/schedule_rotation_active_days/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 c452b283..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 @@ -16,50 +16,40 @@ def _get_kwargs( schedule_rotation_id: str, *, body: NewScheduleRotationActiveDay, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days".format(schedule_rotation_id=quote(str(schedule_rotation_id), safe=""),), + "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() - headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationActiveDayResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationActiveDayResponse | None: if response.status_code == 201: response_201 = ScheduleRotationActiveDayResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewScheduleRotationActiveDay, - ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """ Creates a schedule rotation active day + """Creates a schedule rotation active day Creates a new schedule rotation active day from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ - + """ kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationActiveDay, - ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """ Creates a schedule rotation active day + """Creates a schedule rotation active day Creates a new schedule rotation active day from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - + """ return sync_detailed( schedule_rotation_id=schedule_rotation_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationActiveDay, - ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """ Creates a schedule rotation active day + """Creates a schedule rotation active day Creates a new schedule rotation active day from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ - + """ kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationActiveDay, - ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """ Creates a schedule rotation active day + """Creates a schedule rotation active day Creates a new schedule rotation active day from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - - - return (await asyncio_detailed( - schedule_rotation_id=schedule_rotation_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_rotation_id=schedule_rotation_id, + client=client, + body=body, + ) + ).parsed 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 24502cec..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/schedule_rotation_active_days/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedule_rotation_active_days/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationActiveDayResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationActiveDayResponse | None: if response.status_code == 200: response_200 = ScheduleRotationActiveDayResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """ Delete a schedule rotation active day + """Delete a schedule rotation active day Delete a specific schedule rotation active day @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """ Delete a schedule rotation active day + """Delete a schedule rotation active day Delete a specific schedule rotation active day @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """ Delete a schedule rotation active day + """Delete a schedule rotation active day Delete a specific schedule rotation active day @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """ Delete a schedule rotation active day + """Delete a schedule rotation active day Delete a specific schedule rotation active day @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 96876d4c..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/schedule_rotation_active_days/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedule_rotation_active_days/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationActiveDayResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationActiveDayResponse | None: if response.status_code == 200: response_200 = ScheduleRotationActiveDayResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """ Retrieves a schedule rotation active day + """Retrieves a schedule rotation active day Retrieves a specific schedule rotation active day by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """ Retrieves a schedule rotation active day + """Retrieves a schedule rotation active day Retrieves a specific schedule rotation active day by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """ Retrieves a schedule rotation active day + """Retrieves a schedule rotation active day Retrieves a specific schedule rotation active day by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """ Retrieves a schedule rotation active day + """Retrieves a schedule rotation active day Retrieves a specific schedule rotation active day by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 4d88567b..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days".format(schedule_rotation_id=quote(str(schedule_rotation_id), safe=""),), + "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_active_days".format( + schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ScheduleRotationActiveDayList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ScheduleRotationActiveDayList | None: if response.status_code == 200: response_200 = ScheduleRotationActiveDayList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ScheduleRotationActiveDayList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ScheduleRotationActiveDayList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[ScheduleRotationActiveDayList]: - """ List schedule rotation active days + """List schedule rotation active days List schedule rotation active days @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[ScheduleRotationActiveDayList] - """ - + """ kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_rotation_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> ScheduleRotationActiveDayList | None: - """ List schedule rotation active days + """List schedule rotation active days List schedule rotation active days @@ -135,18 +128,17 @@ def sync( Returns: ScheduleRotationActiveDayList - """ - + """ return sync_detailed( schedule_rotation_id=schedule_rotation_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( schedule_rotation_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[ScheduleRotationActiveDayList]: - """ List schedule rotation active days + """List schedule rotation active days List schedule rotation active days @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[ScheduleRotationActiveDayList] - """ - + """ kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_rotation_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> ScheduleRotationActiveDayList | None: - """ List schedule rotation active days + """List schedule rotation active days List schedule rotation active days @@ -214,14 +201,14 @@ async def asyncio( Returns: ScheduleRotationActiveDayList - """ - - - return (await asyncio_detailed( - schedule_rotation_id=schedule_rotation_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_rotation_id=schedule_rotation_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 2cf07c19..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateScheduleRotationActiveDay, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/schedule_rotation_active_days/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedule_rotation_active_days/{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 | ScheduleRotationActiveDayResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationActiveDayResponse | None: if response.status_code == 200: response_200 = ScheduleRotationActiveDayResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateScheduleRotationActiveDay, - ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """ Update a schedule rotation active day + """Update a schedule rotation active day Update a specific schedule rotation active day by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationActiveDay, - ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """ Update a schedule rotation active day + """Update a schedule rotation active day Update a specific schedule rotation active day by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationActiveDay, - ) -> Response[ErrorsList | ScheduleRotationActiveDayResponse]: - """ Update a schedule rotation active day + """Update a schedule rotation active day Update a specific schedule rotation active day by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationActiveDayResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationActiveDay, - ) -> ErrorsList | ScheduleRotationActiveDayResponse | None: - """ Update a schedule rotation active day + """Update a schedule rotation active day Update a specific schedule rotation active day by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationActiveDayResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/schedule_rotation_users/__init__.py b/rootly_sdk/api/schedule_rotation_users/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/schedule_rotation_users/__init__.py +++ b/rootly_sdk/api/schedule_rotation_users/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 a0010b58..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 @@ -16,50 +16,40 @@ def _get_kwargs( schedule_rotation_id: str, *, body: NewScheduleRotationUser, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users".format(schedule_rotation_id=quote(str(schedule_rotation_id), safe=""),), + "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() - headers["Content-Type"] = "application/vnd.api+json" _kwargs["headers"] = headers return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationUserResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationUserResponse | None: if response.status_code == 201: response_201 = ScheduleRotationUserResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationUserResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationUserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewScheduleRotationUser, - ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """ Creates a schedule rotation user + """Creates a schedule rotation user Creates a new schedule rotation user from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ - + """ kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationUser, - ) -> ErrorsList | ScheduleRotationUserResponse | None: - """ Creates a schedule rotation user + """Creates a schedule rotation user Creates a new schedule rotation user from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | ScheduleRotationUserResponse - """ - + """ return sync_detailed( schedule_rotation_id=schedule_rotation_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationUser, - ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """ Creates a schedule rotation user + """Creates a schedule rotation user Creates a new schedule rotation user from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ - + """ kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_rotation_id: str, *, client: AuthenticatedClient, body: NewScheduleRotationUser, - ) -> ErrorsList | ScheduleRotationUserResponse | None: - """ Creates a schedule rotation user + """Creates a schedule rotation user Creates a new schedule rotation user from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationUserResponse - """ - - - return (await asyncio_detailed( - schedule_rotation_id=schedule_rotation_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_rotation_id=schedule_rotation_id, + client=client, + body=body, + ) + ).parsed 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 eb2e1d71..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/schedule_rotation_users/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedule_rotation_users/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationUserResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationUserResponse | None: if response.status_code == 200: response_200 = ScheduleRotationUserResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationUserResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationUserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """ Delete a schedule rotation user + """Delete a schedule rotation user Delete a specific schedule rotation user by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationUserResponse | None: - """ Delete a schedule rotation user + """Delete a schedule rotation user Delete a specific schedule rotation user by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | ScheduleRotationUserResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """ Delete a schedule rotation user + """Delete a schedule rotation user Delete a specific schedule rotation user by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationUserResponse | None: - """ Delete a schedule rotation user + """Delete a schedule rotation user Delete a specific schedule rotation user by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationUserResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 9f0c7d4a..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/schedule_rotation_users/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedule_rotation_users/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationUserResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationUserResponse | None: if response.status_code == 200: response_200 = ScheduleRotationUserResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationUserResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationUserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """ Retrieves a schedule rotation user + """Retrieves a schedule rotation user Retrieves a specific schedule rotation user by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationUserResponse | None: - """ Retrieves a schedule rotation user + """Retrieves a schedule rotation user Retrieves a specific schedule rotation user by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | ScheduleRotationUserResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """ Retrieves a schedule rotation user + """Retrieves a schedule rotation user Retrieves a specific schedule rotation user by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationUserResponse | None: - """ Retrieves a schedule rotation user + """Retrieves a schedule rotation user Retrieves a specific schedule rotation user by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationUserResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 60441737..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users".format(schedule_rotation_id=quote(str(schedule_rotation_id), safe=""),), + "url": "/v1/schedule_rotations/{schedule_rotation_id}/schedule_rotation_users".format( + schedule_rotation_id=quote(str(schedule_rotation_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ScheduleRotationUserList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ScheduleRotationUserList | None: if response.status_code == 200: response_200 = ScheduleRotationUserList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ScheduleRotationUserList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ScheduleRotationUserList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[ScheduleRotationUserList]: - """ List schedule rotation users + """List schedule rotation users Args: schedule_rotation_id (str): @@ -91,15 +86,13 @@ def sync_detailed( Returns: Response[ScheduleRotationUserList] - """ - + """ kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -108,6 +101,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_rotation_id: str, *, @@ -115,9 +109,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> ScheduleRotationUserList | None: - """ List schedule rotation users + """List schedule rotation users Args: schedule_rotation_id (str): @@ -131,18 +124,17 @@ def sync( Returns: ScheduleRotationUserList - """ - + """ return sync_detailed( schedule_rotation_id=schedule_rotation_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( schedule_rotation_id: str, *, @@ -150,9 +142,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[ScheduleRotationUserList]: - """ List schedule rotation users + """List schedule rotation users Args: schedule_rotation_id (str): @@ -166,23 +157,20 @@ async def asyncio_detailed( Returns: Response[ScheduleRotationUserList] - """ - + """ kwargs = _get_kwargs( schedule_rotation_id=schedule_rotation_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_rotation_id: str, *, @@ -190,9 +178,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> ScheduleRotationUserList | None: - """ List schedule rotation users + """List schedule rotation users Args: schedule_rotation_id (str): @@ -206,14 +193,14 @@ async def asyncio( Returns: ScheduleRotationUserList - """ - - - return (await asyncio_detailed( - schedule_rotation_id=schedule_rotation_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_rotation_id=schedule_rotation_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 9b9cfb63..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateScheduleRotationUser, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/schedule_rotation_users/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedule_rotation_users/{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 | ScheduleRotationUserResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationUserResponse | None: if response.status_code == 200: response_200 = ScheduleRotationUserResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationUserResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationUserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateScheduleRotationUser, - ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """ Update schedule rotation user + """Update schedule rotation user Update a specific schedule rotation user by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationUser, - ) -> ErrorsList | ScheduleRotationUserResponse | None: - """ Update schedule rotation user + """Update schedule rotation user Update a specific schedule rotation user by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | ScheduleRotationUserResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationUser, - ) -> Response[ErrorsList | ScheduleRotationUserResponse]: - """ Update schedule rotation user + """Update schedule rotation user Update a specific schedule rotation user by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationUserResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotationUser, - ) -> ErrorsList | ScheduleRotationUserResponse | None: - """ Update schedule rotation user + """Update schedule rotation user Update a specific schedule rotation user by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationUserResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/schedule_rotations/__init__.py b/rootly_sdk/api/schedule_rotations/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/schedule_rotations/__init__.py +++ b/rootly_sdk/api/schedule_rotations/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py index 612f50c2..61069e24 100644 --- a/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/create_schedule_rotation.py @@ -16,50 +16,40 @@ def _get_kwargs( schedule_id: str, *, body: NewScheduleRotation, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedules/{schedule_id}/schedule_rotations".format(schedule_id=quote(str(schedule_id), safe=""),), + "url": "/v1/schedules/{schedule_id}/schedule_rotations".format( + schedule_id=quote(str(schedule_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 | ScheduleRotationResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationResponse | None: if response.status_code == 201: response_201 = ScheduleRotationResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewScheduleRotation, - ) -> Response[ErrorsList | ScheduleRotationResponse]: - """ Creates a schedule rotation + """Creates a schedule rotation Creates a new schedule rotation from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_id: str, *, client: AuthenticatedClient, body: NewScheduleRotation, - ) -> ErrorsList | ScheduleRotationResponse | None: - """ Creates a schedule rotation + """Creates a schedule rotation Creates a new schedule rotation from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | ScheduleRotationResponse - """ - + """ return sync_detailed( schedule_id=schedule_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, body: NewScheduleRotation, - ) -> Response[ErrorsList | ScheduleRotationResponse]: - """ Creates a schedule rotation + """Creates a schedule rotation Creates a new schedule rotation from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_id: str, *, client: AuthenticatedClient, body: NewScheduleRotation, - ) -> ErrorsList | ScheduleRotationResponse | None: - """ Creates a schedule rotation + """Creates a schedule rotation Creates a new schedule rotation from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationResponse - """ - - - return (await asyncio_detailed( - schedule_id=schedule_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py index b7e86348..441f2ff1 100644 --- a/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/delete_schedule_rotation.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/schedule_rotations/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedule_rotations/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationResponse | None: if response.status_code == 200: response_200 = ScheduleRotationResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationResponse]: - """ Delete a schedule rotation + """Delete a schedule rotation Delete a specific schedule rotation by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationResponse | None: - """ Delete a schedule rotation + """Delete a schedule rotation Delete a specific schedule rotation by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | ScheduleRotationResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationResponse]: - """ Delete a schedule rotation + """Delete a schedule rotation Delete a specific schedule rotation by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationResponse | None: - """ Delete a schedule rotation + """Delete a schedule rotation Delete a specific schedule rotation by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py index 879fb583..09f83172 100644 --- a/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/get_schedule_rotation.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/schedule_rotations/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedule_rotations/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleRotationResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationResponse | None: if response.status_code == 200: response_200 = ScheduleRotationResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationResponse]: - """ Retrieves a schedule rotation + """Retrieves a schedule rotation Retrieves a specific schedule rotation by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationResponse | None: - """ Retrieves a schedule rotation + """Retrieves a schedule rotation Retrieves a specific schedule rotation by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | ScheduleRotationResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleRotationResponse]: - """ Retrieves a schedule rotation + """Retrieves a schedule rotation Retrieves a specific schedule rotation by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleRotationResponse | None: - """ Retrieves a schedule rotation + """Retrieves a schedule rotation Retrieves a specific schedule rotation by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py b/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py index f2ad1705..80ad5986 100644 --- a/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py +++ b/rootly_sdk/api/schedule_rotations/list_schedule_rotations.py @@ -17,11 +17,7 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,27 +29,23 @@ def _get_kwargs( 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/schedules/{schedule_id}/schedule_rotations".format(schedule_id=quote(str(schedule_id), safe=""),), + "url": "/v1/schedules/{schedule_id}/schedule_rotations".format( + schedule_id=quote(str(schedule_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ScheduleRotationList | None: if response.status_code == 200: response_200 = ScheduleRotationList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ScheduleRotationList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ScheduleRotationList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +73,8 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[ScheduleRotationList]: - """ List schedule rotations + """List schedule rotations List schedule rotations @@ -98,16 +91,14 @@ def sync_detailed( Returns: Response[ScheduleRotationList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, ) response = client.get_httpx_client().request( @@ -116,6 +107,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_id: str, *, @@ -124,9 +116,8 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> ScheduleRotationList | None: - """ List schedule rotations + """List schedule rotations List schedule rotations @@ -143,19 +134,18 @@ def sync( Returns: ScheduleRotationList - """ - + """ return sync_detailed( schedule_id=schedule_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, ).parsed + async def asyncio_detailed( schedule_id: str, *, @@ -164,9 +154,8 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[ScheduleRotationList]: - """ List schedule rotations + """List schedule rotations List schedule rotations @@ -183,24 +172,21 @@ async def asyncio_detailed( Returns: Response[ScheduleRotationList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_id: str, *, @@ -209,9 +195,8 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> ScheduleRotationList | None: - """ List schedule rotations + """List schedule rotations List schedule rotations @@ -228,15 +213,15 @@ async def asyncio( Returns: ScheduleRotationList - """ - - - return (await asyncio_detailed( - schedule_id=schedule_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py b/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py index d8121e42..2016f193 100644 --- a/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py +++ b/rootly_sdk/api/schedule_rotations/update_schedule_rotation.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateScheduleRotation, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/schedule_rotations/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedule_rotations/{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 | ScheduleRotationResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleRotationResponse | None: if response.status_code == 200: response_200 = ScheduleRotationResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleRotationResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleRotationResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateScheduleRotation, - ) -> Response[ErrorsList | ScheduleRotationResponse]: - """ Update a schedule rotation + """Update a schedule rotation Update a specific schedule rotation by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotation, - ) -> ErrorsList | ScheduleRotationResponse | None: - """ Update a schedule rotation + """Update a schedule rotation Update a specific schedule rotation by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | ScheduleRotationResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotation, - ) -> Response[ErrorsList | ScheduleRotationResponse]: - """ Update a schedule rotation + """Update a schedule rotation Update a specific schedule rotation by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleRotationResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateScheduleRotation, - ) -> ErrorsList | ScheduleRotationResponse | None: - """ Update a schedule rotation + """Update a schedule rotation Update a specific schedule rotation by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | ScheduleRotationResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/schedules/__init__.py b/rootly_sdk/api/schedules/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/schedules/__init__.py +++ b/rootly_sdk/api/schedules/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/schedules/create_schedule.py b/rootly_sdk/api/schedules/create_schedule.py index d4dc2d24..fe6cb78c 100644 --- a/rootly_sdk/api/schedules/create_schedule.py +++ b/rootly_sdk/api/schedules/create_schedule.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewSchedule, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/schedules", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | ScheduleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleResponse | None: if response.status_code == 201: response_201 = ScheduleResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSchedule, - ) -> Response[ErrorsList | ScheduleResponse]: - """ Creates a schedule + """Creates a schedule Creates a new schedule from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewSchedule, - ) -> ErrorsList | ScheduleResponse | None: - """ Creates a schedule + """Creates a schedule Creates a new schedule from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | ScheduleResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSchedule, - ) -> Response[ErrorsList | ScheduleResponse]: - """ Creates a schedule + """Creates a schedule Creates a new schedule from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewSchedule, - ) -> ErrorsList | ScheduleResponse | None: - """ Creates a schedule + """Creates a schedule Creates a new schedule from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | ScheduleResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/schedules/delete_schedule.py b/rootly_sdk/api/schedules/delete_schedule.py index 3a43333f..1d4d73ba 100644 --- a/rootly_sdk/api/schedules/delete_schedule.py +++ b/rootly_sdk/api/schedules/delete_schedule.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/schedules/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedules/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleResponse | None: if response.status_code == 200: response_200 = ScheduleResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleResponse]: - """ Delete a schedule + """Delete a schedule Delete a specific schedule by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleResponse | None: - """ Delete a schedule + """Delete a schedule Delete a specific schedule by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | ScheduleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleResponse]: - """ Delete a schedule + """Delete a schedule Delete a specific schedule by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleResponse | None: - """ Delete a schedule + """Delete a schedule Delete a specific schedule by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | ScheduleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/schedules/get_schedule.py b/rootly_sdk/api/schedules/get_schedule.py index bbcfa9c7..254e51f6 100644 --- a/rootly_sdk/api/schedules/get_schedule.py +++ b/rootly_sdk/api/schedules/get_schedule.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/schedules/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedules/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ScheduleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleResponse | None: if response.status_code == 200: response_200 = ScheduleResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleResponse]: - """ Retrieves a schedule + """Retrieves a schedule Retrieves a specific schedule by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleResponse | None: - """ Retrieves a schedule + """Retrieves a schedule Retrieves a specific schedule by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | ScheduleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ScheduleResponse]: - """ Retrieves a schedule + """Retrieves a schedule Retrieves a specific schedule by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | ScheduleResponse | None: - """ Retrieves a schedule + """Retrieves a schedule Retrieves a specific schedule by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | ScheduleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/schedules/list_schedules.py b/rootly_sdk/api/schedules/list_schedules.py index f6d28f49..a10d4e91 100644 --- a/rootly_sdk/api/schedules/list_schedules.py +++ b/rootly_sdk/api/schedules/list_schedules.py @@ -24,11 +24,7 @@ def _get_kwargs( filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -58,27 +54,21 @@ def _get_kwargs( 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/schedules", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ScheduleList | None: if response.status_code == 200: response_200 = ScheduleList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -112,9 +102,8 @@ def sync_detailed( filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[ScheduleList]: - """ List schedules + """List schedules List schedules @@ -139,24 +128,22 @@ def sync_detailed( Returns: Response[ScheduleList] - """ - + """ kwargs = _get_kwargs( include=include, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -pagenumber=pagenumber, -pagesize=pagesize, - + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -165,6 +152,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -181,9 +169,8 @@ def sync( filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> ScheduleList | None: - """ List schedules + """List schedules List schedules @@ -208,27 +195,26 @@ def sync( Returns: ScheduleList - """ - + """ return sync_detailed( client=client, -include=include, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -245,9 +231,8 @@ async def asyncio_detailed( filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[ScheduleList]: - """ List schedules + """List schedules List schedules @@ -272,32 +257,29 @@ async def asyncio_detailed( Returns: Response[ScheduleList] - """ - + """ kwargs = _get_kwargs( include=include, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -pagenumber=pagenumber, -pagesize=pagesize, - + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -314,9 +296,8 @@ async def asyncio( filternamenot_in: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> ScheduleList | None: - """ List schedules + """List schedules List schedules @@ -341,23 +322,23 @@ async def asyncio( Returns: ScheduleList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -filtersearch=filtersearch, -filtername=filtername, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + filtersearch=filtersearch, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/schedules/update_schedule.py b/rootly_sdk/api/schedules/update_schedule.py index b2923e48..cc14d173 100644 --- a/rootly_sdk/api/schedules/update_schedule.py +++ b/rootly_sdk/api/schedules/update_schedule.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateSchedule, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/schedules/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/schedules/{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 | ScheduleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ScheduleResponse | None: if response.status_code == 200: response_200 = ScheduleResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ScheduleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ScheduleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSchedule, - ) -> Response[ErrorsList | ScheduleResponse]: - """ Update a schedule + """Update a schedule Updates a specific schedule by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateSchedule, - ) -> ErrorsList | ScheduleResponse | None: - """ Update a schedule + """Update a schedule Updates a specific schedule by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | ScheduleResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateSchedule, - ) -> Response[ErrorsList | ScheduleResponse]: - """ Update a schedule + """Update a schedule Updates a specific schedule by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ScheduleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateSchedule, - ) -> ErrorsList | ScheduleResponse | None: - """ Update a schedule + """Update a schedule Updates a specific schedule by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | ScheduleResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/secrets/__init__.py b/rootly_sdk/api/secrets/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/secrets/__init__.py +++ b/rootly_sdk/api/secrets/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/secrets/create_secret.py b/rootly_sdk/api/secrets/create_secret.py index f55ef863..927e7547 100644 --- a/rootly_sdk/api/secrets/create_secret.py +++ b/rootly_sdk/api/secrets/create_secret.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewSecret, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/secrets", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | SecretResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SecretResponse | None: if response.status_code == 201: response_201 = SecretResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SecretResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SecretResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSecret, - ) -> Response[ErrorsList | SecretResponse]: - """ Creates a secret + """Creates a secret Creates a new secret from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | SecretResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewSecret, - ) -> ErrorsList | SecretResponse | None: - """ Creates a secret + """Creates a secret Creates a new secret from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | SecretResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSecret, - ) -> Response[ErrorsList | SecretResponse]: - """ Creates a secret + """Creates a secret Creates a new secret from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SecretResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewSecret, - ) -> ErrorsList | SecretResponse | None: - """ Creates a secret + """Creates a secret Creates a new secret from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | SecretResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/secrets/delete_secret.py b/rootly_sdk/api/secrets/delete_secret.py index eb564884..cab7f849 100644 --- a/rootly_sdk/api/secrets/delete_secret.py +++ b/rootly_sdk/api/secrets/delete_secret.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/secrets/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/secrets/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SecretResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SecretResponse | None: if response.status_code == 200: response_200 = SecretResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SecretResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SecretResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SecretResponse]: - """ Delete a secret + """Delete a secret Delete a specific secret by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | SecretResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | SecretResponse | None: - """ Delete a secret + """Delete a secret Delete a specific secret by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | SecretResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SecretResponse]: - """ Delete a secret + """Delete a secret Delete a specific secret by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SecretResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | SecretResponse | None: - """ Delete a secret + """Delete a secret Delete a specific secret by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | SecretResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/secrets/get_secret.py b/rootly_sdk/api/secrets/get_secret.py index f8ea520f..0a85cd44 100644 --- a/rootly_sdk/api/secrets/get_secret.py +++ b/rootly_sdk/api/secrets/get_secret.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/secrets/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/secrets/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SecretResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SecretResponse | None: if response.status_code == 200: response_200 = SecretResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SecretResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SecretResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SecretResponse]: - """ Retrieves a secret + """Retrieves a secret Retrieve a specific secret by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | SecretResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | SecretResponse | None: - """ Retrieves a secret + """Retrieves a secret Retrieve a specific secret by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | SecretResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SecretResponse]: - """ Retrieves a secret + """Retrieves a secret Retrieve a specific secret by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SecretResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | SecretResponse | None: - """ Retrieves a secret + """Retrieves a secret Retrieve a specific secret by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | SecretResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/secrets/list_secrets.py b/rootly_sdk/api/secrets/list_secrets.py index a4385f26..5763e6c0 100644 --- a/rootly_sdk/api/secrets/list_secrets.py +++ b/rootly_sdk/api/secrets/list_secrets.py @@ -14,11 +14,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -28,27 +24,21 @@ def _get_kwargs( 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/secrets", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> SecretList | None: if response.status_code == 200: response_200 = SecretList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -72,9 +62,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[SecretList]: - """ List secrets + """List secrets List secrets @@ -89,14 +78,12 @@ def sync_detailed( Returns: Response[SecretList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -105,15 +92,15 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> SecretList | None: - """ List secrets + """List secrets List secrets @@ -128,26 +115,24 @@ def sync( Returns: SecretList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[SecretList]: - """ List secrets + """List secrets List secrets @@ -162,31 +147,27 @@ async def asyncio_detailed( Returns: Response[SecretList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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, - ) -> SecretList | None: - """ List secrets + """List secrets List secrets @@ -201,13 +182,13 @@ async def asyncio( Returns: SecretList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/secrets/update_secret.py b/rootly_sdk/api/secrets/update_secret.py index 55a8a9cf..41fe293e 100644 --- a/rootly_sdk/api/secrets/update_secret.py +++ b/rootly_sdk/api/secrets/update_secret.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateSecret, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/secrets/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/secrets/{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 | SecretResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SecretResponse | None: if response.status_code == 200: response_200 = SecretResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SecretResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SecretResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSecret, - ) -> Response[ErrorsList | SecretResponse]: - """ Update a secret + """Update a secret Update a specific secret by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | SecretResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateSecret, - ) -> ErrorsList | SecretResponse | None: - """ Update a secret + """Update a secret Update a specific secret by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | SecretResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateSecret, - ) -> Response[ErrorsList | SecretResponse]: - """ Update a secret + """Update a secret Update a specific secret by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SecretResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateSecret, - ) -> ErrorsList | SecretResponse | None: - """ Update a secret + """Update a secret Update a specific secret by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | SecretResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/services/__init__.py b/rootly_sdk/api/services/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/services/__init__.py +++ b/rootly_sdk/api/services/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/services/bulk_delete_services.py b/rootly_sdk/api/services/bulk_delete_services.py index 9af124a3..cb45739c 100644 --- a/rootly_sdk/api/services/bulk_delete_services.py +++ b/rootly_sdk/api/services/bulk_delete_services.py @@ -15,59 +15,46 @@ def _get_kwargs( *, body: BulkDestroyServicesType0 | BulkDestroyServicesType1, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/services/bulk_delete", } - if isinstance(body, BulkDestroyServicesType0): _kwargs["json"] = body.to_dict() else: _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) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: if response.status_code == 200: response_200 = BulkDestroyServicesResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyServicesResponse | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -75,8 +62,6 @@ def _parse_response_422(data: object) -> BulkDestroyServicesResponse | ErrorsLis raise TypeError() response_422_type_1 = BulkDestroyServicesResponse.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -89,7 +74,9 @@ def _parse_response_422(data: object) -> BulkDestroyServicesResponse | ErrorsLis return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -102,9 +89,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkDestroyServicesType0 | BulkDestroyServicesType1, - ) -> Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList]: - """ Bulk delete Services + """Bulk delete Services Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -119,12 +105,10 @@ def sync_detailed( Returns: Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -133,13 +117,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: BulkDestroyServicesType0 | BulkDestroyServicesType1, - ) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Services + """Bulk delete Services Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -154,22 +138,20 @@ def sync( Returns: BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: BulkDestroyServicesType0 | BulkDestroyServicesType1, - ) -> Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList]: - """ Bulk delete Services + """Bulk delete Services Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -184,27 +166,23 @@ async def asyncio_detailed( Returns: Response[BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: BulkDestroyServicesType0 | BulkDestroyServicesType1, - ) -> BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Services + """Bulk delete Services Delete services by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -219,11 +197,11 @@ async def asyncio( Returns: BulkDestroyServicesResponse | BulkDestroyServicesResponse | ErrorsList | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/services/bulk_upsert_services.py b/rootly_sdk/api/services/bulk_upsert_services.py index fc5c8168..c1aaa566 100644 --- a/rootly_sdk/api/services/bulk_upsert_services.py +++ b/rootly_sdk/api/services/bulk_upsert_services.py @@ -15,15 +15,9 @@ def _get_kwargs( *, body: BulkUpsertServices, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/services/bulk_upsert", @@ -31,38 +25,33 @@ def _get_kwargs( _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) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: if response.status_code == 200: response_200 = BulkUpsertServicesResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertServicesError | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -70,8 +59,6 @@ def _parse_response_422(data: object) -> BulkUpsertServicesError | ErrorsList: raise TypeError() response_422_type_1 = BulkUpsertServicesError.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -84,7 +71,9 @@ def _parse_response_422(data: object) -> BulkUpsertServicesError | ErrorsList: return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -97,9 +86,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkUpsertServices, - ) -> Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList]: - """ Bulk upsert Services + """Bulk upsert Services Create or update multiple services by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -116,12 +104,10 @@ def sync_detailed( Returns: Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -130,13 +116,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: BulkUpsertServices, - ) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: - """ Bulk upsert Services + """Bulk upsert Services Create or update multiple services by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -153,22 +139,20 @@ def sync( Returns: BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: BulkUpsertServices, - ) -> Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList]: - """ Bulk upsert Services + """Bulk upsert Services Create or update multiple services by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -185,27 +169,23 @@ async def asyncio_detailed( Returns: Response[BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: BulkUpsertServices, - ) -> BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList | None: - """ Bulk upsert Services + """Bulk upsert Services Create or update multiple services by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with @@ -222,11 +202,11 @@ async def asyncio( Returns: BulkUpsertServicesError | ErrorsList | BulkUpsertServicesResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/services/create_service.py b/rootly_sdk/api/services/create_service.py index ed8e5153..fcd786db 100644 --- a/rootly_sdk/api/services/create_service.py +++ b/rootly_sdk/api/services/create_service.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewService, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/services", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | ServiceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ServiceResponse | None: if response.status_code == 201: response_201 = ServiceResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ServiceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewService, - ) -> Response[ErrorsList | ServiceResponse]: - """ Creates a service + """Creates a service Creates a new service from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewService, - ) -> ErrorsList | ServiceResponse | None: - """ Creates a service + """Creates a service Creates a new service from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | ServiceResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewService, - ) -> Response[ErrorsList | ServiceResponse]: - """ Creates a service + """Creates a service Creates a new service from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewService, - ) -> ErrorsList | ServiceResponse | None: - """ Creates a service + """Creates a service Creates a new service from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | ServiceResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/services/create_service_catalog_property.py b/rootly_sdk/api/services/create_service_catalog_property.py index 162e3122..3c61dc54 100644 --- a/rootly_sdk/api/services/create_service_catalog_property.py +++ b/rootly_sdk/api/services/create_service_catalog_property.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCatalogProperty, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/services/properties", @@ -30,34 +24,28 @@ def _get_kwargs( _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: +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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> CatalogPropertyResponse | ErrorsList | None: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -127,22 +114,20 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/services/delete_service.py b/rootly_sdk/api/services/delete_service.py index f8de3316..52fc6e7d 100644 --- a/rootly_sdk/api/services/delete_service.py +++ b/rootly_sdk/api/services/delete_service.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/services/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/services/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ServiceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ServiceResponse | None: if response.status_code == 200: response_200 = ServiceResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ServiceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ServiceResponse]: - """ Delete a service + """Delete a service Delete a specific service by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | ServiceResponse | None: - """ Delete a service + """Delete a service Delete a specific service by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | ServiceResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ServiceResponse]: - """ Delete a service + """Delete a service Delete a specific service by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | ServiceResponse | None: - """ Delete a service + """Delete a service Delete a specific service by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | ServiceResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/services/get_service.py b/rootly_sdk/api/services/get_service.py index fda87ae4..17d3ef16 100644 --- a/rootly_sdk/api/services/get_service.py +++ b/rootly_sdk/api/services/get_service.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/services/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/services/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ServiceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ServiceResponse | None: if response.status_code == 200: response_200 = ServiceResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ServiceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ServiceResponse]: - """ Retrieves a service + """Retrieves a service Retrieves a specific service by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | ServiceResponse | None: - """ Retrieves a service + """Retrieves a service Retrieves a specific service by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | ServiceResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | ServiceResponse]: - """ Retrieves a service + """Retrieves a service Retrieves a specific service by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | ServiceResponse | None: - """ Retrieves a service + """Retrieves a service Retrieves a specific service by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | ServiceResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/services/get_service_incidents_chart.py b/rootly_sdk/api/services/get_service_incidents_chart.py index 9c9985c2..7a881811 100644 --- a/rootly_sdk/api/services/get_service_incidents_chart.py +++ b/rootly_sdk/api/services/get_service_incidents_chart.py @@ -16,44 +16,36 @@ def _get_kwargs( id: str | UUID, *, period: str, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} params["period"] = period - 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/{id}/incidents_chart".format(id=quote(str(id), safe=""),), + "url": "/v1/services/{id}/incidents_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentsChartResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentsChartResponse | None: if response.status_code == 200: response_200 = IncidentsChartResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentsChartResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentsChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, period: str, - ) -> Response[ErrorsList | IncidentsChartResponse]: - """ Get service incidents chart + """Get service incidents chart Get service incidents chart @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, period: str, - ) -> ErrorsList | IncidentsChartResponse | None: - """ Get service incidents chart + """Get service incidents chart Get service incidents chart @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | IncidentsChartResponse - """ - + """ return sync_detailed( id=id, -client=client, -period=period, - + client=client, + period=period, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, period: str, - ) -> Response[ErrorsList | IncidentsChartResponse]: - """ Get service incidents chart + """Get service incidents chart Get service incidents chart @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, period: str, - ) -> ErrorsList | IncidentsChartResponse | None: - """ Get service incidents chart + """Get service incidents chart Get service incidents chart @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | IncidentsChartResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -period=period, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + period=period, + ) + ).parsed diff --git a/rootly_sdk/api/services/get_service_uptime_chart.py b/rootly_sdk/api/services/get_service_uptime_chart.py index b4fe86ad..1976e560 100644 --- a/rootly_sdk/api/services/get_service_uptime_chart.py +++ b/rootly_sdk/api/services/get_service_uptime_chart.py @@ -16,44 +16,36 @@ def _get_kwargs( id: str | UUID, *, period: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} params["period"] = period - 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/{id}/uptime_chart".format(id=quote(str(id), safe=""),), + "url": "/v1/services/{id}/uptime_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UptimeChartResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UptimeChartResponse | None: if response.status_code == 200: response_200 = UptimeChartResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UptimeChartResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UptimeChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, period: str | Unset = UNSET, - ) -> Response[ErrorsList | UptimeChartResponse]: - """ Get service uptime chart + """Get service uptime chart Get service uptime chart @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | UptimeChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, - ) -> ErrorsList | UptimeChartResponse | None: - """ Get service uptime chart + """Get service uptime chart Get service uptime chart @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | UptimeChartResponse - """ - + """ return sync_detailed( id=id, -client=client, -period=period, - + client=client, + period=period, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, - ) -> Response[ErrorsList | UptimeChartResponse]: - """ Get service uptime chart + """Get service uptime chart Get service uptime chart @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UptimeChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, period: str | Unset = UNSET, - ) -> ErrorsList | UptimeChartResponse | None: - """ Get service uptime chart + """Get service uptime chart Get service uptime chart @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | UptimeChartResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -period=period, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + period=period, + ) + ).parsed diff --git a/rootly_sdk/api/services/list_service_catalog_properties.py b/rootly_sdk/api/services/list_service_catalog_properties.py index f86a36c9..54b4e887 100644 --- a/rootly_sdk/api/services/list_service_catalog_properties.py +++ b/rootly_sdk/api/services/list_service_catalog_properties.py @@ -28,11 +28,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -66,27 +62,21 @@ def _get_kwargs( 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: @@ -118,9 +108,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Service Catalog Properties @@ -143,22 +132,20 @@ def sync_detailed( 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, - + 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( @@ -167,6 +154,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -181,9 +169,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Service Catalog Properties @@ -206,25 +193,24 @@ def sync( 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, - + 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, @@ -239,9 +225,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Service Catalog Properties @@ -264,30 +249,27 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -302,9 +284,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Service Catalog Properties @@ -327,21 +308,21 @@ async def asyncio( 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 + """ + + 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 f245812d..0bec2c70 100644 --- a/rootly_sdk/api/services/list_services.py +++ b/rootly_sdk/api/services/list_services.py @@ -44,11 +44,7 @@ def _get_kwargs( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -118,27 +114,21 @@ def _get_kwargs( 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/services", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ServiceList | None: if response.status_code == 200: response_200 = ServiceList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -192,9 +182,8 @@ def sync_detailed( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[ServiceList]: - """ List services + """List services List services @@ -239,44 +228,42 @@ def sync_detailed( Returns: Response[ServiceList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filteralert_broadcast_enabled=filteralert_broadcast_enabled, -filterincident_broadcast_enabled=filterincident_broadcast_enabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, -filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, -filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, -filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, -filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, -filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, -filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, -filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filteralert_broadcast_enabled=filteralert_broadcast_enabled, + filterincident_broadcast_enabled=filterincident_broadcast_enabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -285,6 +272,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -321,9 +309,8 @@ def sync( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> ServiceList | None: - """ List services + """List services List services @@ -368,47 +355,46 @@ def sync( Returns: ServiceList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filteralert_broadcast_enabled=filteralert_broadcast_enabled, -filterincident_broadcast_enabled=filterincident_broadcast_enabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, -filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, -filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, -filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, -filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, -filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, -filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, -filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filteralert_broadcast_enabled=filteralert_broadcast_enabled, + filterincident_broadcast_enabled=filterincident_broadcast_enabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -445,9 +431,8 @@ async def asyncio_detailed( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[ServiceList]: - """ List services + """List services List services @@ -492,52 +477,49 @@ async def asyncio_detailed( Returns: Response[ServiceList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filteralert_broadcast_enabled=filteralert_broadcast_enabled, -filterincident_broadcast_enabled=filterincident_broadcast_enabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, -filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, -filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, -filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, -filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, -filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, -filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, -filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filteralert_broadcast_enabled=filteralert_broadcast_enabled, + filterincident_broadcast_enabled=filterincident_broadcast_enabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -574,9 +556,8 @@ async def asyncio( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> ServiceList | None: - """ List services + """List services List services @@ -621,43 +602,43 @@ async def asyncio( Returns: ServiceList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filteralert_broadcast_enabled=filteralert_broadcast_enabled, -filterincident_broadcast_enabled=filterincident_broadcast_enabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, -filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, -filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, -filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, -filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, -filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, -filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, -filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filteralert_broadcast_enabled=filteralert_broadcast_enabled, + filterincident_broadcast_enabled=filterincident_broadcast_enabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/services/update_service.py b/rootly_sdk/api/services/update_service.py index b6b26bbc..5ba68ee9 100644 --- a/rootly_sdk/api/services/update_service.py +++ b/rootly_sdk/api/services/update_service.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateService, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/services/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/services/{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 | ServiceResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ServiceResponse | None: if response.status_code == 200: response_200 = ServiceResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ServiceResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ServiceResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateService, - ) -> Response[ErrorsList | ServiceResponse]: - """ Update a service + """Update a service Update a specific service by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, - ) -> ErrorsList | ServiceResponse | None: - """ Update a service + """Update a service Update a specific service by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | ServiceResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, - ) -> Response[ErrorsList | ServiceResponse]: - """ Update a service + """Update a service Update a specific service by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ServiceResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateService, - ) -> ErrorsList | ServiceResponse | None: - """ Update a service + """Update a service Update a specific service by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | ServiceResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/severities/__init__.py b/rootly_sdk/api/severities/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/severities/__init__.py +++ b/rootly_sdk/api/severities/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/severities/create_severity.py b/rootly_sdk/api/severities/create_severity.py index 10aa975d..ac3b5494 100644 --- a/rootly_sdk/api/severities/create_severity.py +++ b/rootly_sdk/api/severities/create_severity.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewSeverity, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/severities", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | SeverityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SeverityResponse | None: if response.status_code == 201: response_201 = SeverityResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SeverityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SeverityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSeverity, - ) -> Response[ErrorsList | SeverityResponse]: - """ Creates a severity + """Creates a severity Creates a new severity from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewSeverity, - ) -> ErrorsList | SeverityResponse | None: - """ Creates a severity + """Creates a severity Creates a new severity from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | SeverityResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSeverity, - ) -> Response[ErrorsList | SeverityResponse]: - """ Creates a severity + """Creates a severity Creates a new severity from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewSeverity, - ) -> ErrorsList | SeverityResponse | None: - """ Creates a severity + """Creates a severity Creates a new severity from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | SeverityResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/severities/delete_severity.py b/rootly_sdk/api/severities/delete_severity.py index f881bf76..466626a3 100644 --- a/rootly_sdk/api/severities/delete_severity.py +++ b/rootly_sdk/api/severities/delete_severity.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/severities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/severities/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SeverityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SeverityResponse | None: if response.status_code == 200: response_200 = SeverityResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SeverityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SeverityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SeverityResponse]: - """ Delete a severity + """Delete a severity Delete a specific severity by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | SeverityResponse | None: - """ Delete a severity + """Delete a severity Delete a specific severity by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | SeverityResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SeverityResponse]: - """ Delete a severity + """Delete a severity Delete a specific severity by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | SeverityResponse | None: - """ Delete a severity + """Delete a severity Delete a specific severity by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | SeverityResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/severities/get_severity.py b/rootly_sdk/api/severities/get_severity.py index 8052c896..f36d72b9 100644 --- a/rootly_sdk/api/severities/get_severity.py +++ b/rootly_sdk/api/severities/get_severity.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/severities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/severities/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SeverityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SeverityResponse | None: if response.status_code == 200: response_200 = SeverityResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SeverityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SeverityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SeverityResponse]: - """ Retrieves a severity + """Retrieves a severity Retrieves a specific severity by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | SeverityResponse | None: - """ Retrieves a severity + """Retrieves a severity Retrieves a specific severity by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | SeverityResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SeverityResponse]: - """ Retrieves a severity + """Retrieves a severity Retrieves a specific severity by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | SeverityResponse | None: - """ Retrieves a severity + """Retrieves a severity Retrieves a specific severity by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | SeverityResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/severities/list_severities.py b/rootly_sdk/api/severities/list_severities.py index 10b1cc86..8102f620 100644 --- a/rootly_sdk/api/severities/list_severities.py +++ b/rootly_sdk/api/severities/list_severities.py @@ -40,11 +40,7 @@ def _get_kwargs( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -106,27 +102,21 @@ def _get_kwargs( 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/severities", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> SeverityList | None: if response.status_code == 200: response_200 = SeverityList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -176,9 +166,8 @@ def sync_detailed( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[SeverityList]: - """ List severities + """List severities List severities @@ -219,40 +208,38 @@ def sync_detailed( Returns: Response[SeverityList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterseverity=filterseverity, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterseverityeq=filterseverityeq, -filterseveritynot_eq=filterseveritynot_eq, -filterseverityin=filterseverityin, -filterseveritynot_in=filterseveritynot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterseverity=filterseverity, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -261,6 +248,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -293,9 +281,8 @@ def sync( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> SeverityList | None: - """ List severities + """List severities List severities @@ -336,43 +323,42 @@ def sync( Returns: SeverityList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterseverity=filterseverity, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterseverityeq=filterseverityeq, -filterseveritynot_eq=filterseveritynot_eq, -filterseverityin=filterseverityin, -filterseveritynot_in=filterseveritynot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterseverity=filterseverity, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -405,9 +391,8 @@ async def asyncio_detailed( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[SeverityList]: - """ List severities + """List severities List severities @@ -448,48 +433,45 @@ async def asyncio_detailed( Returns: Response[SeverityList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterseverity=filterseverity, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterseverityeq=filterseverityeq, -filterseveritynot_eq=filterseveritynot_eq, -filterseverityin=filterseverityin, -filterseveritynot_in=filterseveritynot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterseverity=filterseverity, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -522,9 +504,8 @@ async def asyncio( filtercolorin: str | Unset = UNSET, filtercolornot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> SeverityList | None: - """ List severities + """List severities List severities @@ -565,39 +546,39 @@ async def asyncio( Returns: SeverityList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterseverity=filterseverity, -filtercolor=filtercolor, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterseverityeq=filterseverityeq, -filterseveritynot_eq=filterseveritynot_eq, -filterseverityin=filterseverityin, -filterseveritynot_in=filterseveritynot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterseverity=filterseverity, + filtercolor=filtercolor, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterseverityeq=filterseverityeq, + filterseveritynot_eq=filterseveritynot_eq, + filterseverityin=filterseverityin, + filterseveritynot_in=filterseveritynot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/severities/update_severity.py b/rootly_sdk/api/severities/update_severity.py index d2b55f77..d1794033 100644 --- a/rootly_sdk/api/severities/update_severity.py +++ b/rootly_sdk/api/severities/update_severity.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateSeverity, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/severities/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/severities/{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 | SeverityResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SeverityResponse | None: if response.status_code == 200: response_200 = SeverityResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SeverityResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SeverityResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSeverity, - ) -> Response[ErrorsList | SeverityResponse]: - """ Update a severity + """Update a severity Update a specific severity by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, - ) -> ErrorsList | SeverityResponse | None: - """ Update a severity + """Update a severity Update a specific severity by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | SeverityResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, - ) -> Response[ErrorsList | SeverityResponse]: - """ Update a severity + """Update a severity Update a specific severity by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SeverityResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSeverity, - ) -> ErrorsList | SeverityResponse | None: - """ Update a severity + """Update a severity Update a specific severity by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | SeverityResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/__init__.py b/rootly_sdk/api/shift_coverage_requests/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/shift_coverage_requests/__init__.py +++ b/rootly_sdk/api/shift_coverage_requests/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py index 4f4fe512..422f1a19 100644 --- a/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py +++ b/rootly_sdk/api/shift_coverage_requests/create_shift_coverage_request.py @@ -16,43 +16,35 @@ def _get_kwargs( schedule_id: str, *, body: NewShiftCoverageRequest, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/schedules/{schedule_id}/shift_coverage_requests".format(schedule_id=quote(str(schedule_id), safe=""),), + "url": "/v1/schedules/{schedule_id}/shift_coverage_requests".format( + schedule_id=quote(str(schedule_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 | ShiftCoverageRequestList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | ShiftCoverageRequestList | None: if response.status_code == 201: response_201 = ShiftCoverageRequestList.from_dict(response.json()) - - return response_201 if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ShiftCoverageRequestList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ShiftCoverageRequestList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewShiftCoverageRequest, - ) -> Response[ErrorsList | ShiftCoverageRequestList]: - """ creates shift coverage requests + """creates shift coverage requests Creates coverage requests for the shifts overlapping the requested time range. A range can span multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be @@ -94,13 +87,11 @@ def sync_detailed( Returns: Response[ErrorsList | ShiftCoverageRequestList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -109,14 +100,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_id: str, *, client: AuthenticatedClient, body: NewShiftCoverageRequest, - ) -> ErrorsList | ShiftCoverageRequestList | None: - """ creates shift coverage requests + """creates shift coverage requests Creates coverage requests for the shifts overlapping the requested time range. A range can span multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be @@ -133,24 +124,22 @@ def sync( Returns: ErrorsList | ShiftCoverageRequestList - """ - + """ return sync_detailed( schedule_id=schedule_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, body: NewShiftCoverageRequest, - ) -> Response[ErrorsList | ShiftCoverageRequestList]: - """ creates shift coverage requests + """creates shift coverage requests Creates coverage requests for the shifts overlapping the requested time range. A range can span multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be @@ -167,29 +156,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ShiftCoverageRequestList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_id: str, *, client: AuthenticatedClient, body: NewShiftCoverageRequest, - ) -> ErrorsList | ShiftCoverageRequestList | None: - """ creates shift coverage requests + """creates shift coverage requests Creates coverage requests for the shifts overlapping the requested time range. A range can span multiple consecutive shifts (e.g. across a handoff), so one or more coverage requests may be @@ -206,12 +191,12 @@ async def asyncio( Returns: ErrorsList | ShiftCoverageRequestList - """ - - - return (await asyncio_detailed( - schedule_id=schedule_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py index 3918f752..af89d0d5 100644 --- a/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py +++ b/rootly_sdk/api/shift_coverage_requests/delete_shift_coverage_request.py @@ -12,30 +12,24 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/shift_coverage_requests/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/shift_coverage_requests/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ShiftCoverageRequestResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ShiftCoverageRequestResponse | None: if response.status_code == 200: response_200 = ShiftCoverageRequestResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -44,7 +38,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ShiftCoverageRequestResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ShiftCoverageRequestResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -57,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ShiftCoverageRequestResponse]: - """ deletes a shift coverage request + """deletes a shift coverage request Deletes a shift coverage request. @@ -72,12 +67,10 @@ def sync_detailed( Returns: Response[ShiftCoverageRequestResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -86,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ShiftCoverageRequestResponse | None: - """ deletes a shift coverage request + """deletes a shift coverage request Deletes a shift coverage request. @@ -105,22 +98,20 @@ def sync( Returns: ShiftCoverageRequestResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ShiftCoverageRequestResponse]: - """ deletes a shift coverage request + """deletes a shift coverage request Deletes a shift coverage request. @@ -133,27 +124,23 @@ async def asyncio_detailed( Returns: Response[ShiftCoverageRequestResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ShiftCoverageRequestResponse | None: - """ deletes a shift coverage request + """deletes a shift coverage request Deletes a shift coverage request. @@ -166,11 +153,11 @@ async def asyncio( Returns: ShiftCoverageRequestResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py b/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py index 5724fd2e..b841df57 100644 --- a/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py +++ b/rootly_sdk/api/shift_coverage_requests/get_shift_coverage_request.py @@ -12,30 +12,24 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/shift_coverage_requests/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/shift_coverage_requests/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ShiftCoverageRequestResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ShiftCoverageRequestResponse | None: if response.status_code == 200: response_200 = ShiftCoverageRequestResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -44,7 +38,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ShiftCoverageRequestResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ShiftCoverageRequestResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -57,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ShiftCoverageRequestResponse]: - """ retrieves a shift coverage request + """retrieves a shift coverage request Retrieves a specific shift coverage request. @@ -72,12 +67,10 @@ def sync_detailed( Returns: Response[ShiftCoverageRequestResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -86,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ShiftCoverageRequestResponse | None: - """ retrieves a shift coverage request + """retrieves a shift coverage request Retrieves a specific shift coverage request. @@ -105,22 +98,20 @@ def sync( Returns: ShiftCoverageRequestResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ShiftCoverageRequestResponse]: - """ retrieves a shift coverage request + """retrieves a shift coverage request Retrieves a specific shift coverage request. @@ -133,27 +124,23 @@ async def asyncio_detailed( Returns: Response[ShiftCoverageRequestResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ShiftCoverageRequestResponse | None: - """ retrieves a shift coverage request + """retrieves a shift coverage request Retrieves a specific shift coverage request. @@ -166,11 +153,11 @@ async def asyncio( Returns: ShiftCoverageRequestResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py b/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py index 90598715..62355c3a 100644 --- a/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py +++ b/rootly_sdk/api/shift_coverage_requests/list_shift_coverage_requests.py @@ -12,30 +12,24 @@ def _get_kwargs( schedule_id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/schedules/{schedule_id}/shift_coverage_requests".format(schedule_id=quote(str(schedule_id), safe=""),), + "url": "/v1/schedules/{schedule_id}/shift_coverage_requests".format( + schedule_id=quote(str(schedule_id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ShiftCoverageRequestList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ShiftCoverageRequestList | None: if response.status_code == 200: response_200 = ShiftCoverageRequestList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -44,7 +38,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ShiftCoverageRequestList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ShiftCoverageRequestList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -57,9 +53,8 @@ def sync_detailed( schedule_id: str, *, client: AuthenticatedClient, - ) -> Response[ShiftCoverageRequestList]: - """ list shift coverage requests + """list shift coverage requests List active shift coverage requests for a schedule. @@ -72,12 +67,10 @@ def sync_detailed( Returns: Response[ShiftCoverageRequestList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, - ) response = client.get_httpx_client().request( @@ -86,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( schedule_id: str, *, client: AuthenticatedClient, - ) -> ShiftCoverageRequestList | None: - """ list shift coverage requests + """list shift coverage requests List active shift coverage requests for a schedule. @@ -105,22 +98,20 @@ def sync( Returns: ShiftCoverageRequestList - """ - + """ return sync_detailed( schedule_id=schedule_id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( schedule_id: str, *, client: AuthenticatedClient, - ) -> Response[ShiftCoverageRequestList]: - """ list shift coverage requests + """list shift coverage requests List active shift coverage requests for a schedule. @@ -133,27 +124,23 @@ async def asyncio_detailed( Returns: Response[ShiftCoverageRequestList] - """ - + """ kwargs = _get_kwargs( schedule_id=schedule_id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( schedule_id: str, *, client: AuthenticatedClient, - ) -> ShiftCoverageRequestList | None: - """ list shift coverage requests + """list shift coverage requests List active shift coverage requests for a schedule. @@ -166,11 +153,11 @@ async def asyncio( Returns: ShiftCoverageRequestList - """ - + """ - return (await asyncio_detailed( - schedule_id=schedule_id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + schedule_id=schedule_id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/shifts/__init__.py b/rootly_sdk/api/shifts/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/shifts/__init__.py +++ b/rootly_sdk/api/shifts/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/shifts/get_schedule_shifts.py b/rootly_sdk/api/shifts/get_schedule_shifts.py index 0ab10eb8..e263871a 100644 --- a/rootly_sdk/api/shifts/get_schedule_shifts.py +++ b/rootly_sdk/api/shifts/get_schedule_shifts.py @@ -16,11 +16,7 @@ def _get_kwargs( *, to: str | Unset = UNSET, from_: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -28,34 +24,28 @@ def _get_kwargs( params["from"] = from_ - 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/schedules/{id}/shifts".format(id=quote(str(id), safe=""),), + "url": "/v1/schedules/{id}/shifts".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ShiftList | None: if response.status_code == 200: response_200 = ShiftList.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: @@ -64,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ShiftList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ShiftList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +71,8 @@ def sync_detailed( client: AuthenticatedClient, to: str | Unset = UNSET, from_: str | Unset = UNSET, - ) -> Response[ErrorsList | ShiftList]: - """ Retrieves a schedule shifts + """Retrieves a schedule shifts Retrieves schedule shifts @@ -96,14 +87,12 @@ def sync_detailed( Returns: Response[ErrorsList | ShiftList] - """ - + """ kwargs = _get_kwargs( id=id, -to=to, -from_=from_, - + to=to, + from_=from_, ) response = client.get_httpx_client().request( @@ -112,15 +101,15 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, to: str | Unset = UNSET, from_: str | Unset = UNSET, - ) -> ErrorsList | ShiftList | None: - """ Retrieves a schedule shifts + """Retrieves a schedule shifts Retrieves schedule shifts @@ -135,26 +124,24 @@ def sync( Returns: ErrorsList | ShiftList - """ - + """ return sync_detailed( id=id, -client=client, -to=to, -from_=from_, - + client=client, + to=to, + from_=from_, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, to: str | Unset = UNSET, from_: str | Unset = UNSET, - ) -> Response[ErrorsList | ShiftList]: - """ Retrieves a schedule shifts + """Retrieves a schedule shifts Retrieves schedule shifts @@ -169,31 +156,27 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ShiftList] - """ - + """ kwargs = _get_kwargs( id=id, -to=to, -from_=from_, - + to=to, + from_=from_, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, to: str | Unset = UNSET, from_: str | Unset = UNSET, - ) -> ErrorsList | ShiftList | None: - """ Retrieves a schedule shifts + """Retrieves a schedule shifts Retrieves schedule shifts @@ -208,13 +191,13 @@ async def asyncio( Returns: ErrorsList | ShiftList - """ - - - return (await asyncio_detailed( - id=id, -client=client, -to=to, -from_=from_, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + to=to, + from_=from_, + ) + ).parsed diff --git a/rootly_sdk/api/shifts/list_shifts.py b/rootly_sdk/api/shifts/list_shifts.py index c2a3880f..33fbd52d 100644 --- a/rootly_sdk/api/shifts/list_shifts.py +++ b/rootly_sdk/api/shifts/list_shifts.py @@ -20,11 +20,7 @@ def _get_kwargs( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -42,48 +38,38 @@ def _get_kwargs( if not isinstance(user_ids, Unset): json_user_ids = user_ids - params["user_ids[]"] = json_user_ids 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] = { "method": "get", "url": "/v1/shifts", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | ShiftList | None: if response.status_code == 200: response_200 = ShiftList.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: @@ -92,7 +78,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | ShiftList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | ShiftList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -111,9 +99,8 @@ def sync_detailed( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[ErrorsList | ShiftList]: - """ List shifts + """List shifts List shifts @@ -132,18 +119,16 @@ def sync_detailed( Returns: Response[ErrorsList | ShiftList] - """ - + """ kwargs = _get_kwargs( include=include, -from_=from_, -to=to, -user_ids=user_ids, -schedule_ids=schedule_ids, -pagenumber=pagenumber, -pagesize=pagesize, - + from_=from_, + to=to, + user_ids=user_ids, + schedule_ids=schedule_ids, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -152,6 +137,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -162,9 +148,8 @@ def sync( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> ErrorsList | ShiftList | None: - """ List shifts + """List shifts List shifts @@ -183,21 +168,20 @@ def sync( Returns: ErrorsList | ShiftList - """ - + """ return sync_detailed( client=client, -include=include, -from_=from_, -to=to, -user_ids=user_ids, -schedule_ids=schedule_ids, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + from_=from_, + to=to, + user_ids=user_ids, + schedule_ids=schedule_ids, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -208,9 +192,8 @@ async def asyncio_detailed( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[ErrorsList | ShiftList]: - """ List shifts + """List shifts List shifts @@ -229,26 +212,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | ShiftList] - """ - + """ kwargs = _get_kwargs( include=include, -from_=from_, -to=to, -user_ids=user_ids, -schedule_ids=schedule_ids, -pagenumber=pagenumber, -pagesize=pagesize, - + from_=from_, + to=to, + user_ids=user_ids, + schedule_ids=schedule_ids, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -259,9 +239,8 @@ async def asyncio( schedule_ids: list[str] | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> ErrorsList | ShiftList | None: - """ List shifts + """List shifts List shifts @@ -280,17 +259,17 @@ async def asyncio( Returns: ErrorsList | ShiftList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -from_=from_, -to=to, -user_ids=user_ids, -schedule_ids=schedule_ids, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + from_=from_, + 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 index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/sl_as/__init__.py +++ b/rootly_sdk/api/sl_as/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/sl_as/create_sla.py b/rootly_sdk/api/sl_as/create_sla.py index 73c5545c..578b60d8 100644 --- a/rootly_sdk/api/sl_as/create_sla.py +++ b/rootly_sdk/api/sl_as/create_sla.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewSla, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/slas", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | SlaResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SlaResponse | None: if response.status_code == 201: response_201 = SlaResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SlaResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSla, - ) -> Response[ErrorsList | SlaResponse]: - """ Creates an SLA + """Creates an SLA Creates a new SLA from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | SlaResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewSla, - ) -> ErrorsList | SlaResponse | None: - """ Creates an SLA + """Creates an SLA Creates a new SLA from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | SlaResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSla, - ) -> Response[ErrorsList | SlaResponse]: - """ Creates an SLA + """Creates an SLA Creates a new SLA from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SlaResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewSla, - ) -> ErrorsList | SlaResponse | None: - """ Creates an SLA + """Creates an SLA Creates a new SLA from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | SlaResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/sl_as/delete_sla.py b/rootly_sdk/api/sl_as/delete_sla.py index 86b33ea2..19b1e4eb 100644 --- a/rootly_sdk/api/sl_as/delete_sla.py +++ b/rootly_sdk/api/sl_as/delete_sla.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/slas/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/slas/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SlaResponse | None: +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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SlaResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SlaResponse]: - """ Delete an SLA + """Delete an SLA Delete a specific SLA by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | SlaResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | SlaResponse | None: - """ Delete an SLA + """Delete an SLA Delete a specific SLA by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | SlaResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SlaResponse]: - """ Delete an SLA + """Delete an SLA Delete a specific SLA by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SlaResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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: - """ Delete an SLA + """Delete an SLA Delete a specific SLA by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | SlaResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/sl_as/get_sla.py b/rootly_sdk/api/sl_as/get_sla.py index 4b1f9b34..b2dcad6d 100644 --- a/rootly_sdk/api/sl_as/get_sla.py +++ b/rootly_sdk/api/sl_as/get_sla.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/slas/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/slas/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SlaResponse | None: +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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SlaResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SlaResponse]: - """ Retrieves an SLA + """Retrieves an SLA Retrieves a specific SLA by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | SlaResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | SlaResponse | None: - """ Retrieves an SLA + """Retrieves an SLA Retrieves a specific SLA by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | SlaResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SlaResponse]: - """ Retrieves an SLA + """Retrieves an SLA Retrieves a specific SLA by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SlaResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 an SLA Retrieves a specific SLA by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | SlaResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + 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 index 09f7e651..d7f57b0a 100644 --- a/rootly_sdk/api/sl_as/list_sl_as.py +++ b/rootly_sdk/api/sl_as/list_sl_as.py @@ -29,11 +29,7 @@ def _get_kwargs( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -73,27 +69,21 @@ def _get_kwargs( 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: @@ -132,9 +122,8 @@ def sync_detailed( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[SlaList]: - """ List SLAs + """List SLAs List SLAs @@ -164,29 +153,27 @@ def sync_detailed( 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, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -195,6 +182,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -216,9 +204,8 @@ def sync( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> SlaList | None: - """ List SLAs + """List SLAs List SLAs @@ -248,32 +235,31 @@ def sync( 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, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + 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, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -295,9 +281,8 @@ async def asyncio_detailed( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[SlaList]: - """ List SLAs + """List SLAs List SLAs @@ -327,37 +312,34 @@ async def asyncio_detailed( 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, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -379,9 +361,8 @@ async def asyncio( filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> SlaList | None: - """ List SLAs + """List SLAs List SLAs @@ -411,28 +392,28 @@ async def asyncio( 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, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -sort=sort, - - )).parsed + """ + + 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, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/sl_as/update_sla.py b/rootly_sdk/api/sl_as/update_sla.py index 0b28c96e..f168bfc9 100644 --- a/rootly_sdk/api/sl_as/update_sla.py +++ b/rootly_sdk/api/sl_as/update_sla.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateSla, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/slas/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/slas/{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 | SlaResponse | None: +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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SlaResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SlaResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSla, - ) -> Response[ErrorsList | SlaResponse]: - """ Update an SLA + """Update an SLA Update a specific SLA by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | SlaResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateSla, - ) -> ErrorsList | SlaResponse | None: - """ Update an SLA + """Update an SLA Update a specific SLA by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | SlaResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateSla, - ) -> Response[ErrorsList | SlaResponse]: - """ Update an SLA + """Update an SLA Update a specific SLA by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SlaResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateSla, - ) -> ErrorsList | SlaResponse | None: - """ Update an SLA + """Update an SLA Update a specific SLA by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | SlaResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/status_page_templates/__init__.py b/rootly_sdk/api/status_page_templates/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/status_page_templates/__init__.py +++ b/rootly_sdk/api/status_page_templates/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 8a2e57bc..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 @@ -16,50 +16,40 @@ def _get_kwargs( status_page_id: str, *, body: StatusPageTemplate, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/status-pages/{status_page_id}/templates".format(status_page_id=quote(str(status_page_id), safe=""),), + "url": "/v1/status-pages/{status_page_id}/templates".format( + status_page_id=quote(str(status_page_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 | StatusPageTemplateResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusPageTemplateResponse | None: if response.status_code == 201: response_201 = StatusPageTemplateResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageTemplateResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusPageTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: StatusPageTemplate, - ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """ Creates a status page template + """Creates a status page template Creates a new template from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ - + """ kwargs = _get_kwargs( status_page_id=status_page_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( status_page_id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, - ) -> ErrorsList | StatusPageTemplateResponse | None: - """ Creates a status page template + """Creates a status page template Creates a new template from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | StatusPageTemplateResponse - """ - + """ return sync_detailed( status_page_id=status_page_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( status_page_id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, - ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """ Creates a status page template + """Creates a status page template Creates a new template from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ - + """ kwargs = _get_kwargs( status_page_id=status_page_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( status_page_id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, - ) -> ErrorsList | StatusPageTemplateResponse | None: - """ Creates a status page template + """Creates a status page template Creates a new template from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | StatusPageTemplateResponse - """ - - - return (await asyncio_detailed( - status_page_id=status_page_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + status_page_id=status_page_id, + client=client, + body=body, + ) + ).parsed 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 e64b4ed4..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/templates/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageTemplateResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusPageTemplateResponse | None: if response.status_code == 200: response_200 = StatusPageTemplateResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageTemplateResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusPageTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """ Delete a incident event + """Delete a incident event Delete a specific template event by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusPageTemplateResponse | None: - """ Delete a incident event + """Delete a incident event Delete a specific template event by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | StatusPageTemplateResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """ Delete a incident event + """Delete a incident event Delete a specific template event by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusPageTemplateResponse | None: - """ Delete a incident event + """Delete a incident event Delete a specific template event by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | StatusPageTemplateResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 85967bf5..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/templates/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageTemplateResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusPageTemplateResponse | None: if response.status_code == 200: response_200 = StatusPageTemplateResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageTemplateResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusPageTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """ Retrieves a status page template + """Retrieves a status page template Retrieves a specific status_page_template by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusPageTemplateResponse | None: - """ Retrieves a status page template + """Retrieves a status page template Retrieves a specific status_page_template by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | StatusPageTemplateResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """ Retrieves a status page template + """Retrieves a status page template Retrieves a specific status_page_template by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusPageTemplateResponse | None: - """ Retrieves a status page template + """Retrieves a status page template Retrieves a specific status_page_template by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | StatusPageTemplateResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 065e09d5..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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/status-pages/{status_page_id}/templates".format(status_page_id=quote(str(status_page_id), safe=""),), + "url": "/v1/status-pages/{status_page_id}/templates".format( + status_page_id=quote(str(status_page_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> StatusPageTemplateList | None: if response.status_code == 200: response_200 = StatusPageTemplateList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +51,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[StatusPageTemplateList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[StatusPageTemplateList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[StatusPageTemplateList]: - """ List status page templates + """List status page templates List status page templates @@ -93,15 +86,13 @@ def sync_detailed( Returns: Response[StatusPageTemplateList] - """ - + """ kwargs = _get_kwargs( status_page_id=status_page_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +101,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( status_page_id: str, *, @@ -117,9 +109,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> StatusPageTemplateList | None: - """ List status page templates + """List status page templates List status page templates @@ -135,18 +126,17 @@ def sync( Returns: StatusPageTemplateList - """ - + """ return sync_detailed( status_page_id=status_page_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( status_page_id: str, *, @@ -154,9 +144,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[StatusPageTemplateList]: - """ List status page templates + """List status page templates List status page templates @@ -172,23 +161,20 @@ async def asyncio_detailed( Returns: Response[StatusPageTemplateList] - """ - + """ kwargs = _get_kwargs( status_page_id=status_page_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( status_page_id: str, *, @@ -196,9 +182,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> StatusPageTemplateList | None: - """ List status page templates + """List status page templates List status page templates @@ -214,14 +199,14 @@ async def asyncio( Returns: StatusPageTemplateList - """ - - - return (await asyncio_detailed( - status_page_id=status_page_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + status_page_id=status_page_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 840d9a20..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: StatusPageTemplate, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/templates/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/templates/{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 | StatusPageTemplateResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusPageTemplateResponse | None: if response.status_code == 200: response_200 = StatusPageTemplateResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageTemplateResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusPageTemplateResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: StatusPageTemplate, - ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """ Update status page template + """Update status page template Update a specific template event by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, - ) -> ErrorsList | StatusPageTemplateResponse | None: - """ Update status page template + """Update status page template Update a specific template event by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | StatusPageTemplateResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, - ) -> Response[ErrorsList | StatusPageTemplateResponse]: - """ Update status page template + """Update status page template Update a specific template event by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageTemplateResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: StatusPageTemplate, - ) -> ErrorsList | StatusPageTemplateResponse | None: - """ Update status page template + """Update status page template Update a specific template event by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | StatusPageTemplateResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/status_pages/__init__.py b/rootly_sdk/api/status_pages/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/status_pages/__init__.py +++ b/rootly_sdk/api/status_pages/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/status_pages/create_status_page.py b/rootly_sdk/api/status_pages/create_status_page.py index 48df8501..499bcdb8 100644 --- a/rootly_sdk/api/status_pages/create_status_page.py +++ b/rootly_sdk/api/status_pages/create_status_page.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewStatusPage, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/status-pages", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | StatusPageResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusPageResponse | None: if response.status_code == 201: response_201 = StatusPageResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusPageResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewStatusPage, - ) -> Response[ErrorsList | StatusPageResponse]: - """ Creates a status page + """Creates a status page Creates a new status page from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewStatusPage, - ) -> ErrorsList | StatusPageResponse | None: - """ Creates a status page + """Creates a status page Creates a new status page from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | StatusPageResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewStatusPage, - ) -> Response[ErrorsList | StatusPageResponse]: - """ Creates a status page + """Creates a status page Creates a new status page from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewStatusPage, - ) -> ErrorsList | StatusPageResponse | None: - """ Creates a status page + """Creates a status page Creates a new status page from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | StatusPageResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/status_pages/delete_status_page.py b/rootly_sdk/api/status_pages/delete_status_page.py index 90a80ca5..fcb4150f 100644 --- a/rootly_sdk/api/status_pages/delete_status_page.py +++ b/rootly_sdk/api/status_pages/delete_status_page.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/status-pages/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/status-pages/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusPageResponse | None: if response.status_code == 200: response_200 = StatusPageResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusPageResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusPageResponse]: - """ Delete a status page + """Delete a status page Delete a specific status page by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusPageResponse | None: - """ Delete a status page + """Delete a status page Delete a specific status page by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | StatusPageResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusPageResponse]: - """ Delete a status page + """Delete a status page Delete a specific status page by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusPageResponse | None: - """ Delete a status page + """Delete a status page Delete a specific status page by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | StatusPageResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/status_pages/get_status_page.py b/rootly_sdk/api/status_pages/get_status_page.py index 2e74f226..d48c36a9 100644 --- a/rootly_sdk/api/status_pages/get_status_page.py +++ b/rootly_sdk/api/status_pages/get_status_page.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/status-pages/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/status-pages/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusPageResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusPageResponse | None: if response.status_code == 200: response_200 = StatusPageResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusPageResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusPageResponse]: - """ Retrieves a status page + """Retrieves a status page Retrieves a specific status page by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusPageResponse | None: - """ Retrieves a status page + """Retrieves a status page Retrieves a specific status page by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | StatusPageResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusPageResponse]: - """ Retrieves a status page + """Retrieves a status page Retrieves a specific status page by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusPageResponse | None: - """ Retrieves a status page + """Retrieves a status page Retrieves a specific status page by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | StatusPageResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/status_pages/list_status_pages.py b/rootly_sdk/api/status_pages/list_status_pages.py index 27e3d5f7..1e11a52a 100644 --- a/rootly_sdk/api/status_pages/list_status_pages.py +++ b/rootly_sdk/api/status_pages/list_status_pages.py @@ -30,11 +30,7 @@ def _get_kwargs( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -76,27 +72,21 @@ def _get_kwargs( 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/status-pages", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> StatusPageList | None: if response.status_code == 200: response_200 = StatusPageList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -136,9 +126,8 @@ def sync_detailed( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[StatusPageList]: - """ List status pages + """List status pages List status pages @@ -169,30 +158,28 @@ def sync_detailed( Returns: Response[StatusPageList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -201,6 +188,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -223,9 +211,8 @@ def sync( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> StatusPageList | None: - """ List status pages + """List status pages List status pages @@ -256,33 +243,32 @@ def sync( Returns: StatusPageList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -305,9 +291,8 @@ async def asyncio_detailed( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[StatusPageList]: - """ List status pages + """List status pages List status pages @@ -338,38 +323,35 @@ async def asyncio_detailed( Returns: Response[StatusPageList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -392,9 +374,8 @@ async def asyncio( filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> StatusPageList | None: - """ List status pages + """List status pages List status pages @@ -425,29 +406,29 @@ async def asyncio( Returns: StatusPageList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/status_pages/update_status_page.py b/rootly_sdk/api/status_pages/update_status_page.py index 2e675a2b..a6136c7a 100644 --- a/rootly_sdk/api/status_pages/update_status_page.py +++ b/rootly_sdk/api/status_pages/update_status_page.py @@ -17,50 +17,40 @@ def _get_kwargs( id: str | UUID, *, body: UpdateStatusPage, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/status-pages/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/status-pages/{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 | StatusPageResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusPageResponse | None: if response.status_code == 200: response_200 = StatusPageResponse.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: @@ -69,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusPageResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusPageResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -83,9 +75,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateStatusPage, - ) -> Response[ErrorsList | StatusPageResponse]: - """ Update a status page + """Update a status page Update a specific status page by id @@ -99,13 +90,11 @@ def sync_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -114,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, - ) -> ErrorsList | StatusPageResponse | None: - """ Update a status page + """Update a status page Update a specific status page by id @@ -135,24 +124,22 @@ def sync( Returns: ErrorsList | StatusPageResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, - ) -> Response[ErrorsList | StatusPageResponse]: - """ Update a status page + """Update a status page Update a specific status page by id @@ -166,29 +153,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusPageResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateStatusPage, - ) -> ErrorsList | StatusPageResponse | None: - """ Update a status page + """Update a status page Update a specific status page by id @@ -202,12 +185,12 @@ async def asyncio( Returns: ErrorsList | StatusPageResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/statuses/__init__.py b/rootly_sdk/api/statuses/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/statuses/__init__.py +++ b/rootly_sdk/api/statuses/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/statuses/get_status.py b/rootly_sdk/api/statuses/get_status.py index 868449cb..185a8694 100644 --- a/rootly_sdk/api/statuses/get_status.py +++ b/rootly_sdk/api/statuses/get_status.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/statuses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/statuses/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusResponse | None: if response.status_code == 200: response_200 = StatusResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusResponse]: - """ Retrieves a Status + """Retrieves a Status Retrieves a specific Status by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | StatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusResponse | None: - """ Retrieves a Status + """Retrieves a Status Retrieves a specific Status by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | StatusResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | StatusResponse]: - """ Retrieves a Status + """Retrieves a Status Retrieves a specific Status by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | StatusResponse | None: - """ Retrieves a Status + """Retrieves a Status Retrieves a specific Status by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | StatusResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/statuses/list_statuses.py b/rootly_sdk/api/statuses/list_statuses.py index 6ef59703..d7ddd61a 100644 --- a/rootly_sdk/api/statuses/list_statuses.py +++ b/rootly_sdk/api/statuses/list_statuses.py @@ -22,11 +22,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -50,34 +46,28 @@ def _get_kwargs( 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/statuses", "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | StatusList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | StatusList | None: if response.status_code == 200: response_200 = StatusList.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: @@ -86,7 +76,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | StatusList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | StatusList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -108,9 +100,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[ErrorsList | StatusList]: - """ List Statuses + """List Statuses List Statuses @@ -132,21 +123,19 @@ def sync_detailed( Returns: Response[ErrorsList | StatusList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ) response = client.get_httpx_client().request( @@ -155,6 +144,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -168,9 +158,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> ErrorsList | StatusList | None: - """ List Statuses + """List Statuses List Statuses @@ -192,24 +181,23 @@ def sync( Returns: ErrorsList | StatusList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -223,9 +211,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[ErrorsList | StatusList]: - """ List Statuses + """List Statuses List Statuses @@ -247,29 +234,26 @@ async def asyncio_detailed( Returns: Response[ErrorsList | StatusList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterenabled=filterenabled, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -283,9 +267,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> ErrorsList | StatusList | None: - """ List Statuses + """List Statuses List Statuses @@ -307,20 +290,20 @@ async def asyncio( Returns: ErrorsList | StatusList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filterenabled=filterenabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterenabled=filterenabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/sub_statuses/__init__.py b/rootly_sdk/api/sub_statuses/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/sub_statuses/__init__.py +++ b/rootly_sdk/api/sub_statuses/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/sub_statuses/create_sub_status.py b/rootly_sdk/api/sub_statuses/create_sub_status.py index aadefe27..47b85e50 100644 --- a/rootly_sdk/api/sub_statuses/create_sub_status.py +++ b/rootly_sdk/api/sub_statuses/create_sub_status.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewSubStatus, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/sub_statuses", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | SubStatusResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SubStatusResponse | None: if response.status_code == 201: response_201 = SubStatusResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SubStatusResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewSubStatus, - ) -> Response[ErrorsList | SubStatusResponse]: - """ Creates a Sub-Status + """Creates a Sub-Status Creates a new Sub-Status from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewSubStatus, - ) -> ErrorsList | SubStatusResponse | None: - """ Creates a Sub-Status + """Creates a Sub-Status Creates a new Sub-Status from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | SubStatusResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewSubStatus, - ) -> Response[ErrorsList | SubStatusResponse]: - """ Creates a Sub-Status + """Creates a Sub-Status Creates a new Sub-Status from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewSubStatus, - ) -> ErrorsList | SubStatusResponse | None: - """ Creates a Sub-Status + """Creates a Sub-Status Creates a new Sub-Status from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | SubStatusResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/sub_statuses/delete_sub_status.py b/rootly_sdk/api/sub_statuses/delete_sub_status.py index a5a182a3..4e323dfb 100644 --- a/rootly_sdk/api/sub_statuses/delete_sub_status.py +++ b/rootly_sdk/api/sub_statuses/delete_sub_status.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/sub_statuses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SubStatusResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SubStatusResponse | None: if response.status_code == 200: response_200 = SubStatusResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SubStatusResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SubStatusResponse]: - """ Delete a Sub-Status + """Delete a Sub-Status Delete a specific Sub-Status by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | SubStatusResponse | None: - """ Delete a Sub-Status + """Delete a Sub-Status Delete a specific Sub-Status by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | SubStatusResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SubStatusResponse]: - """ Delete a Sub-Status + """Delete a Sub-Status Delete a specific Sub-Status by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | SubStatusResponse | None: - """ Delete a Sub-Status + """Delete a Sub-Status Delete a specific Sub-Status by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | SubStatusResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/sub_statuses/get_sub_status.py b/rootly_sdk/api/sub_statuses/get_sub_status.py index efce5621..74ea1a88 100644 --- a/rootly_sdk/api/sub_statuses/get_sub_status.py +++ b/rootly_sdk/api/sub_statuses/get_sub_status.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/sub_statuses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/sub_statuses/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | SubStatusResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SubStatusResponse | None: if response.status_code == 200: response_200 = SubStatusResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SubStatusResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SubStatusResponse]: - """ Retrieves a Sub-Status + """Retrieves a Sub-Status Retrieves a specific Sub-Status by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | SubStatusResponse | None: - """ Retrieves a Sub-Status + """Retrieves a Sub-Status Retrieves a specific Sub-Status by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | SubStatusResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | SubStatusResponse]: - """ Retrieves a Sub-Status + """Retrieves a Sub-Status Retrieves a specific Sub-Status by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | SubStatusResponse | None: - """ Retrieves a Sub-Status + """Retrieves a Sub-Status Retrieves a specific Sub-Status by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | SubStatusResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/sub_statuses/list_sub_statuses.py b/rootly_sdk/api/sub_statuses/list_sub_statuses.py index 6f10c920..ecbe33ee 100644 --- a/rootly_sdk/api/sub_statuses/list_sub_statuses.py +++ b/rootly_sdk/api/sub_statuses/list_sub_statuses.py @@ -21,11 +21,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -49,27 +45,21 @@ def _get_kwargs( 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/sub_statuses", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> SubStatusList | None: if response.status_code == 200: response_200 = SubStatusList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -100,9 +90,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[SubStatusList]: - """ List Sub-Statuses + """List Sub-Statuses List Sub-Statuses @@ -124,21 +113,19 @@ def sync_detailed( Returns: Response[SubStatusList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filterparent_status=filterparent_status, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterparent_status=filterparent_status, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ) response = client.get_httpx_client().request( @@ -147,6 +134,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -160,9 +148,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> SubStatusList | None: - """ List Sub-Statuses + """List Sub-Statuses List Sub-Statuses @@ -184,24 +171,23 @@ def sync( Returns: SubStatusList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filterparent_status=filterparent_status, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterparent_status=filterparent_status, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -215,9 +201,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[SubStatusList]: - """ List Sub-Statuses + """List Sub-Statuses List Sub-Statuses @@ -239,29 +224,26 @@ async def asyncio_detailed( Returns: Response[SubStatusList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filterparent_status=filterparent_status, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterparent_status=filterparent_status, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -275,9 +257,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> SubStatusList | None: - """ List Sub-Statuses + """List Sub-Statuses List Sub-Statuses @@ -299,20 +280,20 @@ async def asyncio( Returns: SubStatusList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, -filterparent_status=filterparent_status, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + filterparent_status=filterparent_status, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/sub_statuses/update_sub_status.py b/rootly_sdk/api/sub_statuses/update_sub_status.py index 6c27e118..290e2864 100644 --- a/rootly_sdk/api/sub_statuses/update_sub_status.py +++ b/rootly_sdk/api/sub_statuses/update_sub_status.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateSubStatus, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/sub_statuses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/sub_statuses/{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 | SubStatusResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | SubStatusResponse | None: if response.status_code == 200: response_200 = SubStatusResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | SubStatusResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | SubStatusResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateSubStatus, - ) -> Response[ErrorsList | SubStatusResponse]: - """ Update a Sub-Status + """Update a Sub-Status Update a specific Sub-Status by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, - ) -> ErrorsList | SubStatusResponse | None: - """ Update a Sub-Status + """Update a Sub-Status Update a specific Sub-Status by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | SubStatusResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, - ) -> Response[ErrorsList | SubStatusResponse]: - """ Update a Sub-Status + """Update a Sub-Status Update a specific Sub-Status by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | SubStatusResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateSubStatus, - ) -> ErrorsList | SubStatusResponse | None: - """ Update a Sub-Status + """Update a Sub-Status Update a specific Sub-Status by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | SubStatusResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/teams/__init__.py b/rootly_sdk/api/teams/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/teams/__init__.py +++ b/rootly_sdk/api/teams/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/teams/bulk_delete_groups.py b/rootly_sdk/api/teams/bulk_delete_groups.py index 39a1d313..dc3ee765 100644 --- a/rootly_sdk/api/teams/bulk_delete_groups.py +++ b/rootly_sdk/api/teams/bulk_delete_groups.py @@ -15,59 +15,46 @@ def _get_kwargs( *, body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/teams/bulk_delete", } - if isinstance(body, BulkDestroyTeamsType0): _kwargs["json"] = body.to_dict() else: _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) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: if response.status_code == 200: response_200 = BulkDestroyTeamsResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkDestroyTeamsResponse | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -75,8 +62,6 @@ def _parse_response_422(data: object) -> BulkDestroyTeamsResponse | ErrorsList: raise TypeError() response_422_type_1 = BulkDestroyTeamsResponse.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -89,7 +74,9 @@ def _parse_response_422(data: object) -> BulkDestroyTeamsResponse | ErrorsList: return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -102,9 +89,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, - ) -> Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList]: - """ Bulk delete Teams + """Bulk delete Teams Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -119,12 +105,10 @@ def sync_detailed( Returns: Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -133,13 +117,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, - ) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Teams + """Bulk delete Teams Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -154,22 +138,20 @@ def sync( Returns: BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, - ) -> Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList]: - """ Bulk delete Teams + """Bulk delete Teams Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -184,27 +166,23 @@ async def asyncio_detailed( Returns: Response[BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: BulkDestroyTeamsType0 | BulkDestroyTeamsType1, - ) -> BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList | None: - """ Bulk delete Teams + """Bulk delete Teams Delete teams by external_id list, or prune by managed_by source. Two mutually exclusive modes. @@ -219,11 +197,11 @@ async def asyncio( Returns: BulkDestroyTeamsResponse | BulkDestroyTeamsResponse | ErrorsList | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/teams/bulk_upsert_groups.py b/rootly_sdk/api/teams/bulk_upsert_groups.py index 45cdb26c..406c76f5 100644 --- a/rootly_sdk/api/teams/bulk_upsert_groups.py +++ b/rootly_sdk/api/teams/bulk_upsert_groups.py @@ -15,15 +15,9 @@ def _get_kwargs( *, body: BulkUpsertTeams, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/teams/bulk_upsert", @@ -31,38 +25,33 @@ def _get_kwargs( _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) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: if response.status_code == 200: response_200 = BulkUpsertTeamsResponse.from_dict(response.json()) - - return response_200 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if response.status_code == 422: + def _parse_response_422(data: object) -> BulkUpsertTeamsError | ErrorsList: try: if not isinstance(data, dict): raise TypeError() response_422_type_0 = ErrorsList.from_dict(data) - - return response_422_type_0 except (TypeError, ValueError, AttributeError, KeyError): pass @@ -70,8 +59,6 @@ def _parse_response_422(data: object) -> BulkUpsertTeamsError | ErrorsList: raise TypeError() response_422_type_1 = BulkUpsertTeamsError.from_dict(data) - - return response_422_type_1 response_422 = _parse_response_422(response.json()) @@ -84,7 +71,9 @@ def _parse_response_422(data: object) -> BulkUpsertTeamsError | ErrorsList: return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -97,9 +86,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: BulkUpsertTeams, - ) -> Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList]: - """ Bulk upsert Teams + """Bulk upsert Teams Create or update multiple teams by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both @@ -116,12 +104,10 @@ def sync_detailed( Returns: Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -130,13 +116,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: BulkUpsertTeams, - ) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: - """ Bulk upsert Teams + """Bulk upsert Teams Create or update multiple teams by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both @@ -153,22 +139,20 @@ def sync( Returns: BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: BulkUpsertTeams, - ) -> Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList]: - """ Bulk upsert Teams + """Bulk upsert Teams Create or update multiple teams by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both @@ -185,27 +169,23 @@ async def asyncio_detailed( Returns: Response[BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: BulkUpsertTeams, - ) -> BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList | None: - """ Bulk upsert Teams + """Bulk upsert Teams Create or update multiple teams by external_id. Only attributes present in the payload are written (managed-fields semantics). Transactional: all succeed or all fail. Requires an API key with both @@ -222,11 +202,11 @@ async def asyncio( Returns: BulkUpsertTeamsError | ErrorsList | BulkUpsertTeamsResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/teams/create_group_catalog_property.py b/rootly_sdk/api/teams/create_group_catalog_property.py index 667aa2d9..c3a7a4ef 100644 --- a/rootly_sdk/api/teams/create_group_catalog_property.py +++ b/rootly_sdk/api/teams/create_group_catalog_property.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewCatalogProperty, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/teams/properties", @@ -30,34 +24,28 @@ def _get_kwargs( _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: +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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[CatalogPropertyResponse | ErrorsList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[CatalogPropertyResponse | ErrorsList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> CatalogPropertyResponse | ErrorsList | None: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -127,22 +114,20 @@ def sync( Returns: CatalogPropertyResponse | ErrorsList - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewCatalogProperty, - ) -> Response[CatalogPropertyResponse | ErrorsList]: - """ Creates a Catalog Property + """Creates a Catalog Property Creates a new Catalog Property from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[CatalogPropertyResponse | ErrorsList] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + 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 Catalog Property Creates a new Catalog Property from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: CatalogPropertyResponse | ErrorsList - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/teams/create_team.py b/rootly_sdk/api/teams/create_team.py index 64336b1c..aa00b3db 100644 --- a/rootly_sdk/api/teams/create_team.py +++ b/rootly_sdk/api/teams/create_team.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewTeam, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/teams", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | TeamResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | TeamResponse | None: if response.status_code == 201: response_201 = TeamResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | TeamResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | TeamResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewTeam, - ) -> Response[ErrorsList | TeamResponse]: - """ Creates a team + """Creates a team Creates a new team from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | TeamResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewTeam, - ) -> ErrorsList | TeamResponse | None: - """ Creates a team + """Creates a team Creates a new team from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | TeamResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewTeam, - ) -> Response[ErrorsList | TeamResponse]: - """ Creates a team + """Creates a team Creates a new team from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | TeamResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewTeam, - ) -> ErrorsList | TeamResponse | None: - """ Creates a team + """Creates a team Creates a new team from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | TeamResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/teams/delete_team.py b/rootly_sdk/api/teams/delete_team.py index 6b8aeef4..bd6221ce 100644 --- a/rootly_sdk/api/teams/delete_team.py +++ b/rootly_sdk/api/teams/delete_team.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/teams/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/teams/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | TeamResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | TeamResponse | None: if response.status_code == 200: response_200 = TeamResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | TeamResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | TeamResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | TeamResponse]: - """ Delete a team + """Delete a team Delete a specific team by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | TeamResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | TeamResponse | None: - """ Delete a team + """Delete a team Delete a specific team by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | TeamResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | TeamResponse]: - """ Delete a team + """Delete a team Delete a specific team by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | TeamResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | TeamResponse | None: - """ Delete a team + """Delete a team Delete a specific team by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | TeamResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/teams/get_team.py b/rootly_sdk/api/teams/get_team.py index c2cca437..3c4c049d 100644 --- a/rootly_sdk/api/teams/get_team.py +++ b/rootly_sdk/api/teams/get_team.py @@ -17,11 +17,7 @@ def _get_kwargs( id: str | UUID, *, include: GetTeamInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -31,34 +27,30 @@ def _get_kwargs( params["include"] = json_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/teams/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/teams/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | TeamResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | TeamResponse | None: if response.status_code == 200: response_200 = TeamResponse.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: @@ -67,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | TeamResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | TeamResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,9 +75,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetTeamInclude | Unset = UNSET, - ) -> Response[ErrorsList | TeamResponse]: - """ Retrieves a team + """Retrieves a team Retrieves a specific team by id @@ -97,13 +90,11 @@ def sync_detailed( Returns: Response[ErrorsList | TeamResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -112,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetTeamInclude | Unset = UNSET, - ) -> ErrorsList | TeamResponse | None: - """ Retrieves a team + """Retrieves a team Retrieves a specific team by id @@ -133,24 +124,22 @@ def sync( Returns: ErrorsList | TeamResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetTeamInclude | Unset = UNSET, - ) -> Response[ErrorsList | TeamResponse]: - """ Retrieves a team + """Retrieves a team Retrieves a specific team by id @@ -164,29 +153,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | TeamResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetTeamInclude | Unset = UNSET, - ) -> ErrorsList | TeamResponse | None: - """ Retrieves a team + """Retrieves a team Retrieves a specific team by id @@ -200,12 +185,12 @@ async def asyncio( Returns: ErrorsList | TeamResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/teams/get_team_incidents_chart.py b/rootly_sdk/api/teams/get_team_incidents_chart.py index cae557f5..7f173bd8 100644 --- a/rootly_sdk/api/teams/get_team_incidents_chart.py +++ b/rootly_sdk/api/teams/get_team_incidents_chart.py @@ -15,44 +15,36 @@ def _get_kwargs( id: str, *, period: str, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} params["period"] = period - 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/{id}/incidents_chart".format(id=quote(str(id), safe=""),), + "url": "/v1/teams/{id}/incidents_chart".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | IncidentsChartResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | IncidentsChartResponse | None: if response.status_code == 200: response_200 = IncidentsChartResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | IncidentsChartResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | IncidentsChartResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, period: str, - ) -> Response[ErrorsList | IncidentsChartResponse]: - """ Get team incidents chart + """Get team incidents chart Get team incidents chart @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, period: str, - ) -> ErrorsList | IncidentsChartResponse | None: - """ Get team incidents chart + """Get team incidents chart Get team incidents chart @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | IncidentsChartResponse - """ - + """ return sync_detailed( id=id, -client=client, -period=period, - + client=client, + period=period, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, period: str, - ) -> Response[ErrorsList | IncidentsChartResponse]: - """ Get team incidents chart + """Get team incidents chart Get team incidents chart @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | IncidentsChartResponse] - """ - + """ kwargs = _get_kwargs( id=id, -period=period, - + period=period, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, period: str, - ) -> ErrorsList | IncidentsChartResponse | None: - """ Get team incidents chart + """Get team incidents chart Get team incidents chart @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | IncidentsChartResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -period=period, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + period=period, + ) + ).parsed diff --git a/rootly_sdk/api/teams/list_group_catalog_properties.py b/rootly_sdk/api/teams/list_group_catalog_properties.py index 780416a9..59d899d2 100644 --- a/rootly_sdk/api/teams/list_group_catalog_properties.py +++ b/rootly_sdk/api/teams/list_group_catalog_properties.py @@ -28,11 +28,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -66,27 +62,21 @@ def _get_kwargs( 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: @@ -118,9 +108,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Group Catalog Properties @@ -143,22 +132,20 @@ def sync_detailed( 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, - + 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( @@ -167,6 +154,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -181,9 +169,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Group Catalog Properties @@ -206,25 +193,24 @@ def sync( 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, - + 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, @@ -239,9 +225,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[CatalogPropertyList]: - """ List Catalog Properties + """List Catalog Properties List Group Catalog Properties @@ -264,30 +249,27 @@ async def asyncio_detailed( 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, - + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -302,9 +284,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> CatalogPropertyList | None: - """ List Catalog Properties + """List Catalog Properties List Group Catalog Properties @@ -327,21 +308,21 @@ async def asyncio( 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 + """ + + 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 b97bed92..8ae9cdb6 100644 --- a/rootly_sdk/api/teams/list_teams.py +++ b/rootly_sdk/api/teams/list_teams.py @@ -50,11 +50,7 @@ def _get_kwargs( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -138,27 +134,21 @@ def _get_kwargs( 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/teams", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> TeamList | None: if response.status_code == 200: response_200 = TeamList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -217,9 +207,8 @@ def sync_detailed( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[TeamList]: - """ List teams + """List teams List teams @@ -269,49 +258,47 @@ def sync_detailed( Returns: Response[TeamList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filtercolor=filtercolor, -filteralert_broadcast_enabled=filteralert_broadcast_enabled, -filterincident_broadcast_enabled=filterincident_broadcast_enabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, -filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, -filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, -filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, -filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, -filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, -filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, -filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filtercolor=filtercolor, + filteralert_broadcast_enabled=filteralert_broadcast_enabled, + filterincident_broadcast_enabled=filterincident_broadcast_enabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, + sort=sort, ) response = client.get_httpx_client().request( @@ -320,6 +307,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -361,9 +349,8 @@ def sync( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> TeamList | None: - """ List teams + """List teams List teams @@ -413,52 +400,51 @@ def sync( Returns: TeamList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filtercolor=filtercolor, -filteralert_broadcast_enabled=filteralert_broadcast_enabled, -filterincident_broadcast_enabled=filterincident_broadcast_enabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, -filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, -filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, -filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, -filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, -filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, -filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, -filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filtercolor=filtercolor, + filteralert_broadcast_enabled=filteralert_broadcast_enabled, + filterincident_broadcast_enabled=filterincident_broadcast_enabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, + sort=sort, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -500,9 +486,8 @@ async def asyncio_detailed( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[TeamList]: - """ List teams + """List teams List teams @@ -552,57 +537,54 @@ async def asyncio_detailed( Returns: Response[TeamList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filtercolor=filtercolor, -filteralert_broadcast_enabled=filteralert_broadcast_enabled, -filterincident_broadcast_enabled=filterincident_broadcast_enabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, -filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, -filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, -filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, -filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, -filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, -filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, -filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, -sort=sort, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filtercolor=filtercolor, + filteralert_broadcast_enabled=filteralert_broadcast_enabled, + filterincident_broadcast_enabled=filterincident_broadcast_enabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -644,9 +626,8 @@ async def asyncio( filterincident_broadcast_enabledin: str | Unset = UNSET, filterincident_broadcast_enablednot_in: str | Unset = UNSET, sort: str | Unset = UNSET, - ) -> TeamList | None: - """ List teams + """List teams List teams @@ -696,48 +677,48 @@ async def asyncio( Returns: TeamList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filterslug=filterslug, -filtername=filtername, -filterbackstage_id=filterbackstage_id, -filtercortex_id=filtercortex_id, -filteropslevel_id=filteropslevel_id, -filterexternal_id=filterexternal_id, -filtercolor=filtercolor, -filteralert_broadcast_enabled=filteralert_broadcast_enabled, -filterincident_broadcast_enabled=filterincident_broadcast_enabled, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filtercoloreq=filtercoloreq, -filtercolornot_eq=filtercolornot_eq, -filtercolorin=filtercolorin, -filtercolornot_in=filtercolornot_in, -filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, -filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, -filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, -filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, -filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, -filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, -filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, -filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filterslug=filterslug, + filtername=filtername, + filterbackstage_id=filterbackstage_id, + filtercortex_id=filtercortex_id, + filteropslevel_id=filteropslevel_id, + filterexternal_id=filterexternal_id, + filtercolor=filtercolor, + filteralert_broadcast_enabled=filteralert_broadcast_enabled, + filterincident_broadcast_enabled=filterincident_broadcast_enabled, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filtercoloreq=filtercoloreq, + filtercolornot_eq=filtercolornot_eq, + filtercolorin=filtercolorin, + filtercolornot_in=filtercolornot_in, + filteralert_broadcast_enabledeq=filteralert_broadcast_enabledeq, + filteralert_broadcast_enablednot_eq=filteralert_broadcast_enablednot_eq, + filteralert_broadcast_enabledin=filteralert_broadcast_enabledin, + filteralert_broadcast_enablednot_in=filteralert_broadcast_enablednot_in, + filterincident_broadcast_enabledeq=filterincident_broadcast_enabledeq, + filterincident_broadcast_enablednot_eq=filterincident_broadcast_enablednot_eq, + filterincident_broadcast_enabledin=filterincident_broadcast_enabledin, + filterincident_broadcast_enablednot_in=filterincident_broadcast_enablednot_in, + sort=sort, + ) + ).parsed diff --git a/rootly_sdk/api/teams/update_team.py b/rootly_sdk/api/teams/update_team.py index a0e8d96c..b555e950 100644 --- a/rootly_sdk/api/teams/update_team.py +++ b/rootly_sdk/api/teams/update_team.py @@ -17,43 +17,35 @@ def _get_kwargs( id: str | UUID, *, body: UpdateTeam, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/teams/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/teams/{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 | TeamResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | TeamResponse | None: if response.status_code == 200: response_200 = TeamResponse.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: @@ -62,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | TeamResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | TeamResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -76,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateTeam, - ) -> Response[ErrorsList | TeamResponse]: - """ Update a team + """Update a team Update a specific team by id @@ -92,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | TeamResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -107,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, - ) -> ErrorsList | TeamResponse | None: - """ Update a team + """Update a team Update a specific team by id @@ -128,24 +119,22 @@ def sync( Returns: ErrorsList | TeamResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, - ) -> Response[ErrorsList | TeamResponse]: - """ Update a team + """Update a team Update a specific team by id @@ -159,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | TeamResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateTeam, - ) -> ErrorsList | TeamResponse | None: - """ Update a team + """Update a team Update a specific team by id @@ -195,12 +180,12 @@ async def asyncio( Returns: ErrorsList | TeamResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/user_email_addresses/__init__.py b/rootly_sdk/api/user_email_addresses/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/user_email_addresses/__init__.py +++ b/rootly_sdk/api/user_email_addresses/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 47ab4359..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 @@ -16,57 +16,45 @@ def _get_kwargs( user_id: str, *, body: NewUserEmailAddress, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/users/{user_id}/email_addresses".format(user_id=quote(str(user_id), safe=""),), + "url": "/v1/users/{user_id}/email_addresses".format( + user_id=quote(str(user_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 | UserEmailAddressResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 201: response_201 = UserEmailAddressResponse.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 == 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: @@ -75,7 +63,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,9 +79,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewUserEmailAddress, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Creates a user email address + """Creates a user email address Creates a new user email address from provided data @@ -105,13 +94,11 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( user_id=user_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -120,14 +107,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( user_id: str, *, client: AuthenticatedClient, body: NewUserEmailAddress, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Creates a user email address + """Creates a user email address Creates a new user email address from provided data @@ -141,24 +128,22 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ - + """ return sync_detailed( user_id=user_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, body: NewUserEmailAddress, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Creates a user email address + """Creates a user email address Creates a new user email address from provided data @@ -172,29 +157,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( user_id=user_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( user_id: str, *, client: AuthenticatedClient, body: NewUserEmailAddress, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Creates a user email address + """Creates a user email address Creates a new user email address from provided data @@ -208,12 +189,12 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ - - - return (await asyncio_detailed( - user_id=user_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + user_id=user_id, + client=client, + body=body, + ) + ).parsed 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 eaac6866..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 @@ -13,44 +13,34 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/email_addresses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/email_addresses/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.from_dict(response.json()) - - 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: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Delete user email address + """Delete user email address Deletes a user email address @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Delete user email address + """Delete user email address Deletes a user email address @@ -120,22 +109,20 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Delete user email address + """Delete user email address Deletes a user email address @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Delete user email address + """Delete user email address Deletes a user email address @@ -181,11 +164,11 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 1ccb7cf2..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 @@ -13,44 +13,34 @@ def _get_kwargs( user_id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/users/{user_id}/email_addresses".format(user_id=quote(str(user_id), safe=""),), + "url": "/v1/users/{user_id}/email_addresses".format( + user_id=quote(str(user_id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserEmailAddressList | None: if response.status_code == 200: response_200 = UserEmailAddressList.from_dict(response.json()) - - 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: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserEmailAddressList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( user_id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserEmailAddressList]: - """ Retrieves user email addresses + """Retrieves user email addresses Retrieves all email addresses for the specified user @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressList] - """ - + """ kwargs = _get_kwargs( user_id=user_id, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( user_id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserEmailAddressList | None: - """ Retrieves user email addresses + """Retrieves user email addresses Retrieves all email addresses for the specified user @@ -120,22 +109,20 @@ def sync( Returns: ErrorsList | UserEmailAddressList - """ - + """ return sync_detailed( user_id=user_id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserEmailAddressList]: - """ Retrieves user email addresses + """Retrieves user email addresses Retrieves all email addresses for the specified user @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressList] - """ - + """ kwargs = _get_kwargs( user_id=user_id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( user_id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserEmailAddressList | None: - """ Retrieves user email addresses + """Retrieves user email addresses Retrieves all email addresses for the specified user @@ -181,11 +164,11 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressList - """ - + """ - return (await asyncio_detailed( - user_id=user_id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + user_id=user_id, + client=client, + ) + ).parsed 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 98929369..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 @@ -13,44 +13,34 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/email_addresses/{id}/resend_verification".format(id=quote(str(id), safe=""),), + "url": "/v1/email_addresses/{id}/resend_verification".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.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: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Resends verification email + """Resends verification email Resends verification email for an email address @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Resends verification email + """Resends verification email Resends verification email for an email address @@ -120,22 +109,20 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Resends verification email + """Resends verification email Resends verification email for an email address @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Resends verification email + """Resends verification email Resends verification email for an email address @@ -181,11 +164,11 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 9416a47c..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 @@ -13,44 +13,34 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/email_addresses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/email_addresses/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.from_dict(response.json()) - - 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: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Show user email address + """Show user email address Retrieves a specific user email address @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Show user email address + """Show user email address Retrieves a specific user email address @@ -120,22 +109,20 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Show user email address + """Show user email address Retrieves a specific user email address @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Show user email address + """Show user email address Retrieves a specific user email address @@ -181,11 +164,11 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 a0f9f5f0..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 @@ -16,57 +16,45 @@ def _get_kwargs( id: str, *, body: UpdateUserEmailAddress, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/email_addresses/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/email_addresses/{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 | UserEmailAddressResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.from_dict(response.json()) - - 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -75,7 +63,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,9 +79,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUserEmailAddress, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Update user email address + """Update user email address Updates a user email address @@ -105,13 +94,11 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -120,14 +107,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateUserEmailAddress, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Update user email address + """Update user email address Updates a user email address @@ -141,24 +128,22 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateUserEmailAddress, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Update user email address + """Update user email address Updates a user email address @@ -172,29 +157,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateUserEmailAddress, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Update user email address + """Update user email address Updates a user email address @@ -208,12 +189,12 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed 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 c1705bf3..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 @@ -15,51 +15,41 @@ def _get_kwargs( id: str, *, token: str, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} params["token"] = token - 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/email_addresses/{id}/verify".format(id=quote(str(id), safe=""),), + "url": "/v1/email_addresses/{id}/verify".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserEmailAddressResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserEmailAddressResponse | None: if response.status_code == 200: response_200 = UserEmailAddressResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserEmailAddressResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserEmailAddressResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, token: str, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Verifies an email address with token + """Verifies an email address with token Verifies an email address using a verification token @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, -token=token, - + token=token, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, token: str, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Verifies an email address with token + """Verifies an email address with token Verifies an email address using a verification token @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | UserEmailAddressResponse - """ - + """ return sync_detailed( id=id, -client=client, -token=token, - + client=client, + token=token, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, token: str, - ) -> Response[ErrorsList | UserEmailAddressResponse]: - """ Verifies an email address with token + """Verifies an email address with token Verifies an email address using a verification token @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserEmailAddressResponse] - """ - + """ kwargs = _get_kwargs( id=id, -token=token, - + token=token, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, token: str, - ) -> ErrorsList | UserEmailAddressResponse | None: - """ Verifies an email address with token + """Verifies an email address with token Verifies an email address using a verification token @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | UserEmailAddressResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -token=token, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + token=token, + ) + ).parsed diff --git a/rootly_sdk/api/user_notification_rules/__init__.py b/rootly_sdk/api/user_notification_rules/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/user_notification_rules/__init__.py +++ b/rootly_sdk/api/user_notification_rules/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 19253753..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 @@ -16,50 +16,40 @@ def _get_kwargs( user_id: str, *, body: NewUserNotificationRule, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/users/{user_id}/notification_rules".format(user_id=quote(str(user_id), safe=""),), + "url": "/v1/users/{user_id}/notification_rules".format( + user_id=quote(str(user_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 | UserNotificationRuleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserNotificationRuleResponse | None: if response.status_code == 201: response_201 = UserNotificationRuleResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserNotificationRuleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserNotificationRuleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewUserNotificationRule, - ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """ Creates an user notification rule + """Creates an user notification rule Creates a new user notification rule from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ - + """ kwargs = _get_kwargs( user_id=user_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( user_id: str, *, client: AuthenticatedClient, body: NewUserNotificationRule, - ) -> ErrorsList | UserNotificationRuleResponse | None: - """ Creates an user notification rule + """Creates an user notification rule Creates a new user notification rule from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | UserNotificationRuleResponse - """ - + """ return sync_detailed( user_id=user_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, body: NewUserNotificationRule, - ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """ Creates an user notification rule + """Creates an user notification rule Creates a new user notification rule from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ - + """ kwargs = _get_kwargs( user_id=user_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( user_id: str, *, client: AuthenticatedClient, body: NewUserNotificationRule, - ) -> ErrorsList | UserNotificationRuleResponse | None: - """ Creates an user notification rule + """Creates an user notification rule Creates a new user notification rule from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | UserNotificationRuleResponse - """ - - - return (await asyncio_detailed( - user_id=user_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + user_id=user_id, + client=client, + body=body, + ) + ).parsed 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 ac285e3d..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/notification_rules/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/notification_rules/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserNotificationRuleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserNotificationRuleResponse | None: if response.status_code == 200: response_200 = UserNotificationRuleResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserNotificationRuleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserNotificationRuleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """ Delete an user notification rule + """Delete an user notification rule Delete a specific user notification rule by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserNotificationRuleResponse | None: - """ Delete an user notification rule + """Delete an user notification rule Delete a specific user notification rule by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | UserNotificationRuleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """ Delete an user notification rule + """Delete an user notification rule Delete a specific user notification rule by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserNotificationRuleResponse | None: - """ Delete an user notification rule + """Delete an user notification rule Delete a specific user notification rule by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | UserNotificationRuleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 068564e7..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/notification_rules/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/notification_rules/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserNotificationRuleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserNotificationRuleResponse | None: if response.status_code == 200: response_200 = UserNotificationRuleResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserNotificationRuleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserNotificationRuleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """ Retrieves an user notification rule + """Retrieves an user notification rule Retrieves a specific user notification rule by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserNotificationRuleResponse | None: - """ Retrieves an user notification rule + """Retrieves an user notification rule Retrieves a specific user notification rule by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | UserNotificationRuleResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """ Retrieves an user notification rule + """Retrieves an user notification rule Retrieves a specific user notification rule by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserNotificationRuleResponse | None: - """ Retrieves an user notification rule + """Retrieves an user notification rule Retrieves a specific user notification rule by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | UserNotificationRuleResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 cd513ec7..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 @@ -17,11 +17,7 @@ def _get_kwargs( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -33,27 +29,25 @@ def _get_kwargs( 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/users/{user_id}/notification_rules".format(user_id=quote(str(user_id), safe=""),), + "url": "/v1/users/{user_id}/notification_rules".format( + user_id=quote(str(user_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> UserNotificationRuleList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> UserNotificationRuleList | None: if response.status_code == 200: response_200 = UserNotificationRuleList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -62,7 +56,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[UserNotificationRuleList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[UserNotificationRuleList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +75,8 @@ def sync_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[UserNotificationRuleList]: - """ List user notification rules + """List user notification rules List user notification rules @@ -98,16 +93,14 @@ def sync_detailed( Returns: Response[UserNotificationRuleList] - """ - + """ kwargs = _get_kwargs( user_id=user_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, ) response = client.get_httpx_client().request( @@ -116,6 +109,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( user_id: str, *, @@ -124,9 +118,8 @@ def sync( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> UserNotificationRuleList | None: - """ List user notification rules + """List user notification rules List user notification rules @@ -143,19 +136,18 @@ def sync( Returns: UserNotificationRuleList - """ - + """ return sync_detailed( user_id=user_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, ).parsed + async def asyncio_detailed( user_id: str, *, @@ -164,9 +156,8 @@ async def asyncio_detailed( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> Response[UserNotificationRuleList]: - """ List user notification rules + """List user notification rules List user notification rules @@ -183,24 +174,21 @@ async def asyncio_detailed( Returns: Response[UserNotificationRuleList] - """ - + """ kwargs = _get_kwargs( user_id=user_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( user_id: str, *, @@ -209,9 +197,8 @@ async def asyncio( pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, sort: str | Unset = UNSET, - ) -> UserNotificationRuleList | None: - """ List user notification rules + """List user notification rules List user notification rules @@ -228,15 +215,15 @@ async def asyncio( Returns: UserNotificationRuleList - """ - - - return (await asyncio_detailed( - user_id=user_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -sort=sort, - - )).parsed + """ + + return ( + await asyncio_detailed( + user_id=user_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + sort=sort, + ) + ).parsed 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 8f7cde00..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateUserNotificationRule, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/notification_rules/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/notification_rules/{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 | UserNotificationRuleResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserNotificationRuleResponse | None: if response.status_code == 200: response_200 = UserNotificationRuleResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserNotificationRuleResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserNotificationRuleResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUserNotificationRule, - ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """ Update an user notification rule + """Update an user notification rule Update a specific user notification rule by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateUserNotificationRule, - ) -> ErrorsList | UserNotificationRuleResponse | None: - """ Update an user notification rule + """Update an user notification rule Update a specific user notification rule by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | UserNotificationRuleResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateUserNotificationRule, - ) -> Response[ErrorsList | UserNotificationRuleResponse]: - """ Update an user notification rule + """Update an user notification rule Update a specific user notification rule by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserNotificationRuleResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateUserNotificationRule, - ) -> ErrorsList | UserNotificationRuleResponse | None: - """ Update an user notification rule + """Update an user notification rule Update a specific user notification rule by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | UserNotificationRuleResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/user_phone_numbers/__init__.py b/rootly_sdk/api/user_phone_numbers/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/user_phone_numbers/__init__.py +++ b/rootly_sdk/api/user_phone_numbers/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 f8811d68..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 @@ -16,57 +16,45 @@ def _get_kwargs( user_id: str, *, body: NewUserPhoneNumber, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/users/{user_id}/phone_numbers".format(user_id=quote(str(user_id), safe=""),), + "url": "/v1/users/{user_id}/phone_numbers".format( + user_id=quote(str(user_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 | UserPhoneNumberResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserPhoneNumberResponse | None: if response.status_code == 201: response_201 = UserPhoneNumberResponse.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 == 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: @@ -75,7 +63,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserPhoneNumberResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,9 +79,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewUserPhoneNumber, - ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """ Creates a user phone number + """Creates a user phone number Creates a new user phone number from provided data @@ -105,13 +94,11 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ - + """ kwargs = _get_kwargs( user_id=user_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -120,14 +107,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( user_id: str, *, client: AuthenticatedClient, body: NewUserPhoneNumber, - ) -> ErrorsList | UserPhoneNumberResponse | None: - """ Creates a user phone number + """Creates a user phone number Creates a new user phone number from provided data @@ -141,24 +128,22 @@ def sync( Returns: ErrorsList | UserPhoneNumberResponse - """ - + """ return sync_detailed( user_id=user_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, body: NewUserPhoneNumber, - ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """ Creates a user phone number + """Creates a user phone number Creates a new user phone number from provided data @@ -172,29 +157,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ - + """ kwargs = _get_kwargs( user_id=user_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( user_id: str, *, client: AuthenticatedClient, body: NewUserPhoneNumber, - ) -> ErrorsList | UserPhoneNumberResponse | None: - """ Creates a user phone number + """Creates a user phone number Creates a new user phone number from provided data @@ -208,12 +189,12 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberResponse - """ - - - return (await asyncio_detailed( - user_id=user_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + user_id=user_id, + client=client, + body=body, + ) + ).parsed 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 34c67d76..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 @@ -13,51 +13,39 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/phone_numbers/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/phone_numbers/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserPhoneNumberResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserPhoneNumberResponse | None: if response.status_code == 200: response_200 = UserPhoneNumberResponse.from_dict(response.json()) - - 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserPhoneNumberResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """ Delete user phone number + """Delete user phone number Deletes a user phone number @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserPhoneNumberResponse | None: - """ Delete user phone number + """Delete user phone number Deletes a user phone number @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | UserPhoneNumberResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """ Delete user phone number + """Delete user phone number Deletes a user phone number @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserPhoneNumberResponse | None: - """ Delete user phone number + """Delete user phone number Deletes a user phone number @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberResponse - """ + """ - - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 4d12979d..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 @@ -13,44 +13,34 @@ def _get_kwargs( user_id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/users/{user_id}/phone_numbers".format(user_id=quote(str(user_id), safe=""),), + "url": "/v1/users/{user_id}/phone_numbers".format( + user_id=quote(str(user_id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserPhoneNumberList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserPhoneNumberList | None: if response.status_code == 200: response_200 = UserPhoneNumberList.from_dict(response.json()) - - 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: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserPhoneNumberList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( user_id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserPhoneNumberList]: - """ Retrieves user phone numbers + """Retrieves user phone numbers Retrieves all phone numbers for the specified user @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberList] - """ - + """ kwargs = _get_kwargs( user_id=user_id, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( user_id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserPhoneNumberList | None: - """ Retrieves user phone numbers + """Retrieves user phone numbers Retrieves all phone numbers for the specified user @@ -120,22 +109,20 @@ def sync( Returns: ErrorsList | UserPhoneNumberList - """ - + """ return sync_detailed( user_id=user_id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( user_id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserPhoneNumberList]: - """ Retrieves user phone numbers + """Retrieves user phone numbers Retrieves all phone numbers for the specified user @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberList] - """ - + """ kwargs = _get_kwargs( user_id=user_id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( user_id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserPhoneNumberList | None: - """ Retrieves user phone numbers + """Retrieves user phone numbers Retrieves all phone numbers for the specified user @@ -181,11 +164,11 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberList - """ - + """ - return (await asyncio_detailed( - user_id=user_id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + user_id=user_id, + client=client, + ) + ).parsed 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 5e73d520..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 @@ -13,44 +13,34 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/phone_numbers/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/phone_numbers/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserPhoneNumberResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserPhoneNumberResponse | None: if response.status_code == 200: response_200 = UserPhoneNumberResponse.from_dict(response.json()) - - 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: @@ -59,7 +49,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserPhoneNumberResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -72,9 +64,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """ Show user phone number + """Show user phone number Retrieves a specific user phone number @@ -87,12 +78,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -101,13 +90,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserPhoneNumberResponse | None: - """ Show user phone number + """Show user phone number Retrieves a specific user phone number @@ -120,22 +109,20 @@ def sync( Returns: ErrorsList | UserPhoneNumberResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """ Show user phone number + """Show user phone number Retrieves a specific user phone number @@ -148,27 +135,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserPhoneNumberResponse | None: - """ Show user phone number + """Show user phone number Retrieves a specific user phone number @@ -181,11 +164,11 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 b34f6764..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 @@ -16,57 +16,45 @@ def _get_kwargs( id: str, *, body: UpdateUserPhoneNumber, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/phone_numbers/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/phone_numbers/{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 | UserPhoneNumberResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserPhoneNumberResponse | None: if response.status_code == 200: response_200 = UserPhoneNumberResponse.from_dict(response.json()) - - 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 response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -75,7 +63,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserPhoneNumberResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserPhoneNumberResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -89,9 +79,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUserPhoneNumber, - ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """ Update user phone number + """Update user phone number Updates a user phone number @@ -105,13 +94,11 @@ def sync_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -120,14 +107,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateUserPhoneNumber, - ) -> ErrorsList | UserPhoneNumberResponse | None: - """ Update user phone number + """Update user phone number Updates a user phone number @@ -141,24 +128,22 @@ def sync( Returns: ErrorsList | UserPhoneNumberResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateUserPhoneNumber, - ) -> Response[ErrorsList | UserPhoneNumberResponse]: - """ Update user phone number + """Update user phone number Updates a user phone number @@ -172,29 +157,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserPhoneNumberResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateUserPhoneNumber, - ) -> ErrorsList | UserPhoneNumberResponse | None: - """ Update user phone number + """Update user phone number Updates a user phone number @@ -208,12 +189,12 @@ async def asyncio( Returns: ErrorsList | UserPhoneNumberResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/users/__init__.py b/rootly_sdk/api/users/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/users/__init__.py +++ b/rootly_sdk/api/users/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/users/delete_user.py b/rootly_sdk/api/users/delete_user.py index 72db2e32..e0be4b19 100644 --- a/rootly_sdk/api/users/delete_user.py +++ b/rootly_sdk/api/users/delete_user.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/users/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/users/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserResponse | None: if response.status_code == 200: response_200 = UserResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserResponse]: - """ Delete an user + """Delete an user Delete a specific user by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | UserResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserResponse | None: - """ Delete an user + """Delete an user Delete a specific user by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | UserResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserResponse]: - """ Delete an user + """Delete an user Delete a specific user by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | UserResponse | None: - """ Delete an user + """Delete an user Delete a specific user by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | UserResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/users/get_current_user.py b/rootly_sdk/api/users/get_current_user.py index efed9786..054c8451 100644 --- a/rootly_sdk/api/users/get_current_user.py +++ b/rootly_sdk/api/users/get_current_user.py @@ -10,38 +10,27 @@ from ...types import Response -def _get_kwargs( - -) -> dict[str, Any]: - - - - - +def _get_kwargs() -> dict[str, Any]: _kwargs: dict[str, Any] = { "method": "get", "url": "/v1/users/me", } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserResponse | None: if response.status_code == 200: response_200 = UserResponse.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: @@ -50,7 +39,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -62,9 +53,8 @@ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Res def sync_detailed( *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserResponse]: - """ Get current user + """Get current user Get current user @@ -74,12 +64,9 @@ def sync_detailed( Returns: Response[ErrorsList | UserResponse] - """ + """ - - kwargs = _get_kwargs( - - ) + kwargs = _get_kwargs() response = client.get_httpx_client().request( **kwargs, @@ -87,12 +74,12 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, - ) -> ErrorsList | UserResponse | None: - """ Get current user + """Get current user Get current user @@ -102,20 +89,18 @@ def sync( Returns: ErrorsList | UserResponse - """ - + """ return sync_detailed( client=client, - ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, - ) -> Response[ErrorsList | UserResponse]: - """ Get current user + """Get current user Get current user @@ -125,25 +110,20 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserResponse] - """ - + """ - kwargs = _get_kwargs( - - ) + kwargs = _get_kwargs() - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, - ) -> ErrorsList | UserResponse | None: - """ Get current user + """Get current user Get current user @@ -153,10 +133,10 @@ async def asyncio( Returns: ErrorsList | UserResponse - """ - + """ - return (await asyncio_detailed( - client=client, - - )).parsed + return ( + await asyncio_detailed( + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/users/get_user.py b/rootly_sdk/api/users/get_user.py index b5b7dd44..7000acf4 100644 --- a/rootly_sdk/api/users/get_user.py +++ b/rootly_sdk/api/users/get_user.py @@ -16,11 +16,7 @@ def _get_kwargs( id: str, *, include: GetUserInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,34 +26,30 @@ def _get_kwargs( params["include"] = json_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/users/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/users/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserResponse | None: if response.status_code == 200: response_200 = UserResponse.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: @@ -66,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetUserInclude | Unset = UNSET, - ) -> Response[ErrorsList | UserResponse]: - """ Retrieves an user + """Retrieves an user Retrieves a specific user by id @@ -96,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | UserResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -111,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, include: GetUserInclude | Unset = UNSET, - ) -> ErrorsList | UserResponse | None: - """ Retrieves an user + """Retrieves an user Retrieves a specific user by id @@ -132,24 +123,22 @@ def sync( Returns: ErrorsList | UserResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, include: GetUserInclude | Unset = UNSET, - ) -> Response[ErrorsList | UserResponse]: - """ Retrieves an user + """Retrieves an user Retrieves a specific user by id @@ -163,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, include: GetUserInclude | Unset = UNSET, - ) -> ErrorsList | UserResponse | None: - """ Retrieves an user + """Retrieves an user Retrieves a specific user by id @@ -199,12 +184,12 @@ async def asyncio( Returns: ErrorsList | UserResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/users/list_users.py b/rootly_sdk/api/users/list_users.py index 94015268..7ef32a0b 100644 --- a/rootly_sdk/api/users/list_users.py +++ b/rootly_sdk/api/users/list_users.py @@ -24,11 +24,7 @@ def _get_kwargs( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -60,34 +56,26 @@ def _get_kwargs( params["include"] = json_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/users", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | UserList | None: if response.status_code == 200: response_200 = UserList.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: @@ -96,7 +84,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -118,9 +108,8 @@ def sync_detailed( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, - ) -> Response[ErrorsList | UserList]: - """ List users + """List users List users @@ -142,21 +131,19 @@ def sync_detailed( Returns: Response[ErrorsList | UserList] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filteremail=filteremail, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, -include=include, - + pagesize=pagesize, + filtersearch=filtersearch, + filteremail=filteremail, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, + include=include, ) response = client.get_httpx_client().request( @@ -165,6 +152,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -178,9 +166,8 @@ def sync( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, - ) -> ErrorsList | UserList | None: - """ List users + """List users List users @@ -202,24 +189,23 @@ def sync( Returns: ErrorsList | UserList - """ - + """ return sync_detailed( client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filteremail=filteremail, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, -include=include, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filteremail=filteremail, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, + include=include, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -233,9 +219,8 @@ async def asyncio_detailed( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, - ) -> Response[ErrorsList | UserList]: - """ List users + """List users List users @@ -257,29 +242,26 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserList] - """ - + """ kwargs = _get_kwargs( pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filteremail=filteremail, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, -include=include, - + pagesize=pagesize, + filtersearch=filtersearch, + filteremail=filteremail, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -293,9 +275,8 @@ async def asyncio( filtercreated_atlte: str | Unset = UNSET, sort: ListUsersSort | Unset = UNSET, include: ListUsersInclude | Unset = UNSET, - ) -> ErrorsList | UserList | None: - """ List users + """List users List users @@ -317,20 +298,20 @@ async def asyncio( Returns: ErrorsList | UserList - """ - - - return (await asyncio_detailed( - client=client, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filteremail=filteremail, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -sort=sort, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filteremail=filteremail, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + sort=sort, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/users/update_user.py b/rootly_sdk/api/users/update_user.py index 2b964d01..40ac5b44 100644 --- a/rootly_sdk/api/users/update_user.py +++ b/rootly_sdk/api/users/update_user.py @@ -16,45 +16,36 @@ def _get_kwargs( id: str, *, body: UpdateUser | Unset = UNSET, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/users/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/users/{id}".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) -> ErrorsList | UserResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | UserResponse | None: if response.status_code == 200: response_200 = UserResponse.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: @@ -63,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | UserResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | UserResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -77,9 +70,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateUser | Unset = UNSET, - ) -> Response[ErrorsList | UserResponse]: - """ Update a user + """Update a user Update a specific user by id @@ -93,13 +85,11 @@ def sync_detailed( Returns: Response[ErrorsList | UserResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -108,14 +98,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateUser | Unset = UNSET, - ) -> ErrorsList | UserResponse | None: - """ Update a user + """Update a user Update a specific user by id @@ -129,24 +119,22 @@ def sync( Returns: ErrorsList | UserResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateUser | Unset = UNSET, - ) -> Response[ErrorsList | UserResponse]: - """ Update a user + """Update a user Update a specific user by id @@ -160,29 +148,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | UserResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateUser | Unset = UNSET, - ) -> ErrorsList | UserResponse | None: - """ Update a user + """Update a user Update a specific user by id @@ -196,12 +180,12 @@ async def asyncio( Returns: ErrorsList | UserResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/webhooks_deliveries/__init__.py b/rootly_sdk/api/webhooks_deliveries/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/webhooks_deliveries/__init__.py +++ b/rootly_sdk/api/webhooks_deliveries/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py b/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py index b6bc0805..4e61f403 100644 --- a/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py +++ b/rootly_sdk/api/webhooks_deliveries/deliver_webhooks_delivery.py @@ -12,30 +12,24 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/webhooks/deliveries/{id}/deliver".format(id=quote(str(id), safe=""),), + "url": "/v1/webhooks/deliveries/{id}/deliver".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WebhooksDeliveryResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> WebhooksDeliveryResponse | None: if response.status_code == 200: response_200 = WebhooksDeliveryResponse.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -44,7 +38,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WebhooksDeliveryResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[WebhooksDeliveryResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -57,9 +53,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[WebhooksDeliveryResponse]: - """ Retries a webhook delivery + """Retries a webhook delivery Retries a webhook delivery @@ -72,12 +67,10 @@ def sync_detailed( Returns: Response[WebhooksDeliveryResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -86,13 +79,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> WebhooksDeliveryResponse | None: - """ Retries a webhook delivery + """Retries a webhook delivery Retries a webhook delivery @@ -105,22 +98,20 @@ def sync( Returns: WebhooksDeliveryResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[WebhooksDeliveryResponse]: - """ Retries a webhook delivery + """Retries a webhook delivery Retries a webhook delivery @@ -133,27 +124,23 @@ async def asyncio_detailed( Returns: Response[WebhooksDeliveryResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> WebhooksDeliveryResponse | None: - """ Retries a webhook delivery + """Retries a webhook delivery Retries a webhook delivery @@ -166,11 +153,11 @@ async def asyncio( Returns: WebhooksDeliveryResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py b/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py index c479e65a..6bcff9b9 100644 --- a/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py +++ b/rootly_sdk/api/webhooks_deliveries/get_webhooks_delivery.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/webhooks/deliveries/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/webhooks/deliveries/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WebhooksDeliveryResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WebhooksDeliveryResponse | None: if response.status_code == 200: response_200 = WebhooksDeliveryResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksDeliveryResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WebhooksDeliveryResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WebhooksDeliveryResponse]: - """ Retrieves a webhook delivery + """Retrieves a webhook delivery Retrieves a specific webhook delivery by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksDeliveryResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WebhooksDeliveryResponse | None: - """ Retrieves a webhook delivery + """Retrieves a webhook delivery Retrieves a specific webhook delivery by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WebhooksDeliveryResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WebhooksDeliveryResponse]: - """ Retrieves a webhook delivery + """Retrieves a webhook delivery Retrieves a specific webhook delivery by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksDeliveryResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WebhooksDeliveryResponse | None: - """ Retrieves a webhook delivery + """Retrieves a webhook delivery Retrieves a specific webhook delivery by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WebhooksDeliveryResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py b/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py index dd41af2b..a333135e 100644 --- a/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py +++ b/rootly_sdk/api/webhooks_deliveries/list_webhooks_deliveries.py @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,23 @@ def _get_kwargs( 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/webhooks/endpoints/{endpoint_id}/deliveries".format(endpoint_id=quote(str(endpoint_id), safe=""),), + "url": "/v1/webhooks/endpoints/{endpoint_id}/deliveries".format( + endpoint_id=quote(str(endpoint_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WebhooksDeliveryList | None: if response.status_code == 200: response_200 = WebhooksDeliveryList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +51,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WebhooksDeliveryList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[WebhooksDeliveryList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[WebhooksDeliveryList]: - """ List webhook deliveries + """List webhook deliveries List webhook deliveries for given endpoint @@ -93,15 +86,13 @@ def sync_detailed( Returns: Response[WebhooksDeliveryList] - """ - + """ kwargs = _get_kwargs( endpoint_id=endpoint_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +101,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( endpoint_id: str, *, @@ -117,9 +109,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> WebhooksDeliveryList | None: - """ List webhook deliveries + """List webhook deliveries List webhook deliveries for given endpoint @@ -135,18 +126,17 @@ def sync( Returns: WebhooksDeliveryList - """ - + """ return sync_detailed( endpoint_id=endpoint_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( endpoint_id: str, *, @@ -154,9 +144,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[WebhooksDeliveryList]: - """ List webhook deliveries + """List webhook deliveries List webhook deliveries for given endpoint @@ -172,23 +161,20 @@ async def asyncio_detailed( Returns: Response[WebhooksDeliveryList] - """ - + """ kwargs = _get_kwargs( endpoint_id=endpoint_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( endpoint_id: str, *, @@ -196,9 +182,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> WebhooksDeliveryList | None: - """ List webhook deliveries + """List webhook deliveries List webhook deliveries for given endpoint @@ -214,14 +199,14 @@ async def asyncio( Returns: WebhooksDeliveryList - """ - - - return (await asyncio_detailed( - endpoint_id=endpoint_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + endpoint_id=endpoint_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/__init__.py b/rootly_sdk/api/webhooks_endpoints/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/webhooks_endpoints/__init__.py +++ b/rootly_sdk/api/webhooks_endpoints/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py index 20da6ccd..cbe5aec3 100644 --- a/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/create_webhooks_endpoint.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewWebhooksEndpoint, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/webhooks/endpoints", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | WebhooksEndpointResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WebhooksEndpointResponse | None: if response.status_code == 201: response_201 = WebhooksEndpointResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksEndpointResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WebhooksEndpointResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWebhooksEndpoint, - ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """ Creates a webhook endpoint + """Creates a webhook endpoint Creates a new webhook endpoint from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewWebhooksEndpoint, - ) -> ErrorsList | WebhooksEndpointResponse | None: - """ Creates a webhook endpoint + """Creates a webhook endpoint Creates a new webhook endpoint from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | WebhooksEndpointResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewWebhooksEndpoint, - ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """ Creates a webhook endpoint + """Creates a webhook endpoint Creates a new webhook endpoint from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewWebhooksEndpoint, - ) -> ErrorsList | WebhooksEndpointResponse | None: - """ Creates a webhook endpoint + """Creates a webhook endpoint Creates a new webhook endpoint from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | WebhooksEndpointResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py index 78d15ce4..080d170b 100644 --- a/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/delete_webhooks_endpoint.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/webhooks/endpoints/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/webhooks/endpoints/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WebhooksEndpointResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WebhooksEndpointResponse | None: if response.status_code == 200: response_200 = WebhooksEndpointResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksEndpointResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WebhooksEndpointResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """ Delete a webhook endpoint + """Delete a webhook endpoint Delete a specific webhook endpoint by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WebhooksEndpointResponse | None: - """ Delete a webhook endpoint + """Delete a webhook endpoint Delete a specific webhook endpoint by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WebhooksEndpointResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """ Delete a webhook endpoint + """Delete a webhook endpoint Delete a specific webhook endpoint by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WebhooksEndpointResponse | None: - """ Delete a webhook endpoint + """Delete a webhook endpoint Delete a specific webhook endpoint by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WebhooksEndpointResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py index 76356bae..548a6545 100644 --- a/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/get_webhooks_endpoint.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/webhooks/endpoints/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/webhooks/endpoints/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WebhooksEndpointResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WebhooksEndpointResponse | None: if response.status_code == 200: response_200 = WebhooksEndpointResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksEndpointResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WebhooksEndpointResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """ Retrieves a webhook endpoint + """Retrieves a webhook endpoint Retrieves a specific webhook endpoint by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WebhooksEndpointResponse | None: - """ Retrieves a webhook endpoint + """Retrieves a webhook endpoint Retrieves a specific webhook endpoint by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WebhooksEndpointResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """ Retrieves a webhook endpoint + """Retrieves a webhook endpoint Retrieves a specific webhook endpoint by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WebhooksEndpointResponse | None: - """ Retrieves a webhook endpoint + """Retrieves a webhook endpoint Retrieves a specific webhook endpoint by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WebhooksEndpointResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py b/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py index 98342393..6db925f4 100644 --- a/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py +++ b/rootly_sdk/api/webhooks_endpoints/list_webhooks_endpoints.py @@ -16,11 +16,7 @@ def _get_kwargs( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -34,27 +30,21 @@ def _get_kwargs( params["filter[name]"] = filtername - 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/webhooks/endpoints", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WebhooksEndpointList | None: if response.status_code == 200: response_200 = WebhooksEndpointList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -63,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WebhooksEndpointList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[WebhooksEndpointList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -80,9 +72,8 @@ def sync_detailed( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, - ) -> Response[WebhooksEndpointList]: - """ List webhook endpoints + """List webhook endpoints List webhook endpoints @@ -99,16 +90,14 @@ def sync_detailed( Returns: Response[WebhooksEndpointList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, ) response = client.get_httpx_client().request( @@ -117,6 +106,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -125,9 +115,8 @@ def sync( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, - ) -> WebhooksEndpointList | None: - """ List webhook endpoints + """List webhook endpoints List webhook endpoints @@ -144,19 +133,18 @@ def sync( Returns: WebhooksEndpointList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -165,9 +153,8 @@ async def asyncio_detailed( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, - ) -> Response[WebhooksEndpointList]: - """ List webhook endpoints + """List webhook endpoints List webhook endpoints @@ -184,24 +171,21 @@ async def asyncio_detailed( Returns: Response[WebhooksEndpointList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, - + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -210,9 +194,8 @@ async def asyncio( pagesize: int | Unset = UNSET, filterslug: str | Unset = UNSET, filtername: str | Unset = UNSET, - ) -> WebhooksEndpointList | None: - """ List webhook endpoints + """List webhook endpoints List webhook endpoints @@ -229,15 +212,15 @@ async def asyncio( Returns: WebhooksEndpointList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filterslug=filterslug, -filtername=filtername, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filterslug=filterslug, + filtername=filtername, + ) + ).parsed diff --git a/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py b/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py index 5ee6fc83..e1d1f110 100644 --- a/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py +++ b/rootly_sdk/api/webhooks_endpoints/update_webhooks_endpoint.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateWebhooksEndpoint, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/webhooks/endpoints/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/webhooks/endpoints/{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 | WebhooksEndpointResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WebhooksEndpointResponse | None: if response.status_code == 200: response_200 = WebhooksEndpointResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WebhooksEndpointResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WebhooksEndpointResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWebhooksEndpoint, - ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """ Update a webhook endpoint + """Update a webhook endpoint Update a specific webhook endpoint by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateWebhooksEndpoint, - ) -> ErrorsList | WebhooksEndpointResponse | None: - """ Update a webhook endpoint + """Update a webhook endpoint Update a specific webhook endpoint by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | WebhooksEndpointResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWebhooksEndpoint, - ) -> Response[ErrorsList | WebhooksEndpointResponse]: - """ Update a webhook endpoint + """Update a webhook endpoint Update a specific webhook endpoint by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WebhooksEndpointResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWebhooksEndpoint, - ) -> ErrorsList | WebhooksEndpointResponse | None: - """ Update a webhook endpoint + """Update a webhook endpoint Update a specific webhook endpoint by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | WebhooksEndpointResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py index 85cb61bc..6f1732ff 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/create_workflow_action_item_form_field_condition.py @@ -16,43 +16,35 @@ def _get_kwargs( workflow_id: str, *, body: NewWorkflowActionItemFormFieldCondition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/workflows/{workflow_id}/action_item_form_field_conditions".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/action_item_form_field_conditions".format( + workflow_id=quote(str(workflow_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 | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: if response.status_code == 201: response_201 = WorkflowActionItemFormFieldConditionResponse.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 == 403: @@ -62,8 +54,6 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res if response.status_code == 422: response_422 = ErrorsList.from_dict(response.json()) - - return response_422 if client.raise_on_unexpected_status: @@ -72,7 +62,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -86,9 +78,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowActionItemFormFieldCondition, - ) -> Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: - """ Creates a workflow action item form field condition + """Creates a workflow action item form field condition Creates a new workflow action item form field condition from provided data @@ -102,13 +93,11 @@ def sync_detailed( Returns: Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -117,14 +106,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowActionItemFormFieldCondition, - ) -> Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: - """ Creates a workflow action item form field condition + """Creates a workflow action item form field condition Creates a new workflow action item form field condition from provided data @@ -138,24 +127,22 @@ def sync( Returns: Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowActionItemFormFieldCondition, - ) -> Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse]: - """ Creates a workflow action item form field condition + """Creates a workflow action item form field condition Creates a new workflow action item form field condition from provided data @@ -169,29 +156,25 @@ async def asyncio_detailed( Returns: Response[Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowActionItemFormFieldCondition, - ) -> Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: - """ Creates a workflow action item form field condition + """Creates a workflow action item form field condition Creates a new workflow action item form field condition from provided data @@ -205,12 +188,12 @@ async def asyncio( Returns: Any | ErrorsList | WorkflowActionItemFormFieldConditionResponse - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py index e0f022ea..fac3f287 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/delete_workflow_action_item_form_field_condition.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflow_action_item_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_action_item_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: if response.status_code == 200: response_200 = WorkflowActionItemFormFieldConditionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: - """ Delete a workflow action item form field condition + """Delete a workflow action item form field condition Delete a specific workflow action item form field condition by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: - """ Delete a workflow action item form field condition + """Delete a workflow action item form field condition Delete a specific workflow action item form field condition by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WorkflowActionItemFormFieldConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: - """ Delete a workflow action item form field condition + """Delete a workflow action item form field condition Delete a specific workflow action item form field condition by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: - """ Delete a workflow action item form field condition + """Delete a workflow action item form field condition Delete a specific workflow action item form field condition by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WorkflowActionItemFormFieldConditionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py index cc189f69..b9d2d505 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/get_workflow_action_item_form_field_condition.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/workflow_action_item_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_action_item_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: if response.status_code == 200: response_200 = WorkflowActionItemFormFieldConditionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: - """ Retrieves a workflow action item form field condition + """Retrieves a workflow action item form field condition Retrieves a specific workflow action item form field condition by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: - """ Retrieves a workflow action item form field condition + """Retrieves a workflow action item form field condition Retrieves a specific workflow action item form field condition by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WorkflowActionItemFormFieldConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: - """ Retrieves a workflow action item form field condition + """Retrieves a workflow action item form field condition Retrieves a specific workflow action item form field condition by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: - """ Retrieves a workflow action item form field condition + """Retrieves a workflow action item form field condition Retrieves a specific workflow action item form field condition by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WorkflowActionItemFormFieldConditionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py index 4f92c141..f1e23abb 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/list_workflow_action_item_form_field_conditions.py @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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/workflows/{workflow_id}/action_item_form_field_conditions".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/action_item_form_field_conditions".format( + workflow_id=quote(str(workflow_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowActionItemFormFieldConditionList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> WorkflowActionItemFormFieldConditionList | None: if response.status_code == 200: response_200 = WorkflowActionItemFormFieldConditionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WorkflowActionItemFormFieldConditionList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[WorkflowActionItemFormFieldConditionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[WorkflowActionItemFormFieldConditionList]: - """ List workflow action item form field conditions + """List workflow action item form field conditions List workflow action item form field conditions @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[WorkflowActionItemFormFieldConditionList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> WorkflowActionItemFormFieldConditionList | None: - """ List workflow action item form field conditions + """List workflow action item form field conditions List workflow action item form field conditions @@ -135,18 +128,17 @@ def sync( Returns: WorkflowActionItemFormFieldConditionList - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( workflow_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[WorkflowActionItemFormFieldConditionList]: - """ List workflow action item form field conditions + """List workflow action item form field conditions List workflow action item form field conditions @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[WorkflowActionItemFormFieldConditionList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> WorkflowActionItemFormFieldConditionList | None: - """ List workflow action item form field conditions + """List workflow action item form field conditions List workflow action item form field conditions @@ -214,14 +201,14 @@ async def asyncio( Returns: WorkflowActionItemFormFieldConditionList - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py b/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py index a3f9d143..d85c85c9 100644 --- a/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py +++ b/rootly_sdk/api/workflow_action_item_form_field_conditions/update_workflow_action_item_form_field_condition.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateWorkflowActionItemFormFieldCondition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflow_action_item_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_action_item_form_field_conditions/{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 | WorkflowActionItemFormFieldConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: if response.status_code == 200: response_200 = WorkflowActionItemFormFieldConditionResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflowActionItemFormFieldCondition, - ) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: - """ Update a workflow action item form field condition + """Update a workflow action item form field condition Update a specific workflow action item form field condition by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowActionItemFormFieldCondition, - ) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: - """ Update a workflow action item form field condition + """Update a workflow action item form field condition Update a specific workflow action item form field condition by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | WorkflowActionItemFormFieldConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowActionItemFormFieldCondition, - ) -> Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse]: - """ Update a workflow action item form field condition + """Update a workflow action item form field condition Update a specific workflow action item form field condition by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowActionItemFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowActionItemFormFieldCondition, - ) -> ErrorsList | WorkflowActionItemFormFieldConditionResponse | None: - """ Update a workflow action item form field condition + """Update a workflow action item form field condition Update a specific workflow action item form field condition by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | WorkflowActionItemFormFieldConditionResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_form_field_conditions/__init__.py b/rootly_sdk/api/workflow_form_field_conditions/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/workflow_form_field_conditions/__init__.py +++ b/rootly_sdk/api/workflow_form_field_conditions/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" 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 9b07fc05..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 @@ -16,43 +16,35 @@ def _get_kwargs( workflow_id: str, *, body: NewWorkflowFormFieldCondition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/workflows/{workflow_id}/form_field_conditions".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/form_field_conditions".format( + workflow_id=quote(str(workflow_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 | WorkflowFormFieldConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowFormFieldConditionResponse | None: if response.status_code == 201: response_201 = WorkflowFormFieldConditionResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowFormFieldCondition, - ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """ Creates a workflow form field condition + """Creates a workflow form field condition Creates a new workflow form field condition from provided data @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowFormFieldCondition, - ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """ Creates a workflow form field condition + """Creates a workflow form field condition Creates a new workflow form field condition from provided data @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowFormFieldCondition, - ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """ Creates a workflow form field condition + """Creates a workflow form field condition Creates a new workflow form field condition from provided data @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowFormFieldCondition, - ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """ Creates a workflow form field condition + """Creates a workflow form field condition Creates a new workflow form field condition from provided data @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ) + ).parsed 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 a09a4b5a..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflow_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowFormFieldConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowFormFieldConditionResponse | None: if response.status_code == 200: response_200 = WorkflowFormFieldConditionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """ Delete a workflow_form field condition + """Delete a workflow_form field condition Delete a specific workflow form field condition by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """ Delete a workflow_form field condition + """Delete a workflow_form field condition Delete a specific workflow form field condition by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """ Delete a workflow_form field condition + """Delete a workflow_form field condition Delete a specific workflow form field condition by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """ Delete a workflow_form field condition + """Delete a workflow_form field condition Delete a specific workflow form field condition by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 be51dff7..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 @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/workflow_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_form_field_conditions/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowFormFieldConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowFormFieldConditionResponse | None: if response.status_code == 200: response_200 = WorkflowFormFieldConditionResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """ Retrieves a workflow form field condition + """Retrieves a workflow form field condition Retrieves a specific workflow form field condition by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """ Retrieves a workflow form field condition + """Retrieves a workflow form field condition Retrieves a specific workflow form field condition by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """ Retrieves a workflow form field condition + """Retrieves a workflow form field condition Retrieves a specific workflow form field condition by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """ Retrieves a workflow form field condition + """Retrieves a workflow form field condition Retrieves a specific workflow form field condition by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed 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 9b1abf32..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 @@ -16,11 +16,7 @@ def _get_kwargs( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -30,27 +26,25 @@ def _get_kwargs( 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/workflows/{workflow_id}/form_field_conditions".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/form_field_conditions".format( + workflow_id=quote(str(workflow_id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowFormFieldConditionList | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> WorkflowFormFieldConditionList | None: if response.status_code == 200: response_200 = WorkflowFormFieldConditionList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -59,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[WorkflowFormFieldConditionList]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[WorkflowFormFieldConditionList]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +71,8 @@ def sync_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[WorkflowFormFieldConditionList]: - """ List workflow form field conditions + """List workflow form field conditions List workflow form field conditions @@ -93,15 +88,13 @@ def sync_detailed( Returns: Response[WorkflowFormFieldConditionList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) response = client.get_httpx_client().request( @@ -110,6 +103,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, @@ -117,9 +111,8 @@ def sync( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> WorkflowFormFieldConditionList | None: - """ List workflow form field conditions + """List workflow form field conditions List workflow form field conditions @@ -135,18 +128,17 @@ def sync( Returns: WorkflowFormFieldConditionList - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ).parsed + async def asyncio_detailed( workflow_id: str, *, @@ -154,9 +146,8 @@ async def asyncio_detailed( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> Response[WorkflowFormFieldConditionList]: - """ List workflow form field conditions + """List workflow form field conditions List workflow form field conditions @@ -172,23 +163,20 @@ async def asyncio_detailed( Returns: Response[WorkflowFormFieldConditionList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, @@ -196,9 +184,8 @@ async def asyncio( include: str | Unset = UNSET, pagenumber: int | Unset = UNSET, pagesize: int | Unset = UNSET, - ) -> WorkflowFormFieldConditionList | None: - """ List workflow form field conditions + """List workflow form field conditions List workflow form field conditions @@ -214,14 +201,14 @@ async def asyncio( Returns: WorkflowFormFieldConditionList - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + ) + ).parsed 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 4a0bb263..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 @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateWorkflowFormFieldCondition, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflow_form_field_conditions/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_form_field_conditions/{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 | WorkflowFormFieldConditionResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowFormFieldConditionResponse | None: if response.status_code == 200: response_200 = WorkflowFormFieldConditionResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflowFormFieldCondition, - ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """ Update a workflow form field condition + """Update a workflow form field condition Update a specific workflow form field condition by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowFormFieldCondition, - ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """ Update a workflow form field condition + """Update a workflow form field condition Update a specific workflow form field condition by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowFormFieldCondition, - ) -> Response[ErrorsList | WorkflowFormFieldConditionResponse]: - """ Update a workflow form field condition + """Update a workflow form field condition Update a specific workflow form field condition by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowFormFieldConditionResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowFormFieldCondition, - ) -> ErrorsList | WorkflowFormFieldConditionResponse | None: - """ Update a workflow form field condition + """Update a workflow form field condition Update a specific workflow form field condition by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | WorkflowFormFieldConditionResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_groups/__init__.py b/rootly_sdk/api/workflow_groups/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/workflow_groups/__init__.py +++ b/rootly_sdk/api/workflow_groups/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/workflow_groups/create_workflow_group.py b/rootly_sdk/api/workflow_groups/create_workflow_group.py index 2ec68289..33784b56 100644 --- a/rootly_sdk/api/workflow_groups/create_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/create_workflow_group.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewWorkflowGroup, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/workflow_groups", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | WorkflowGroupResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowGroupResponse | None: if response.status_code == 201: response_201 = WorkflowGroupResponse.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: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowGroupResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowGroup, - ) -> Response[ErrorsList | WorkflowGroupResponse]: - """ Creates a workflow group + """Creates a workflow group Creates a new workflow group from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewWorkflowGroup, - ) -> ErrorsList | WorkflowGroupResponse | None: - """ Creates a workflow group + """Creates a workflow group Creates a new workflow group from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | WorkflowGroupResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewWorkflowGroup, - ) -> Response[ErrorsList | WorkflowGroupResponse]: - """ Creates a workflow group + """Creates a workflow group Creates a new workflow group from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewWorkflowGroup, - ) -> ErrorsList | WorkflowGroupResponse | None: - """ Creates a workflow group + """Creates a workflow group Creates a new workflow group from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | WorkflowGroupResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_groups/delete_workflow_group.py b/rootly_sdk/api/workflow_groups/delete_workflow_group.py index 9faf6070..46a16891 100644 --- a/rootly_sdk/api/workflow_groups/delete_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/delete_workflow_group.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflow_groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_groups/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowGroupResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowGroupResponse | None: if response.status_code == 200: response_200 = WorkflowGroupResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowGroupResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowGroupResponse]: - """ Delete a workflow_group + """Delete a workflow_group Delete a specific workflow group by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowGroupResponse | None: - """ Delete a workflow_group + """Delete a workflow_group Delete a specific workflow group by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WorkflowGroupResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowGroupResponse]: - """ Delete a workflow_group + """Delete a workflow_group Delete a specific workflow group by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowGroupResponse | None: - """ Delete a workflow_group + """Delete a workflow_group Delete a specific workflow group by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WorkflowGroupResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_groups/get_workflow_group.py b/rootly_sdk/api/workflow_groups/get_workflow_group.py index ca691893..2484f46b 100644 --- a/rootly_sdk/api/workflow_groups/get_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/get_workflow_group.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/workflow_groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_groups/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowGroupResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowGroupResponse | None: if response.status_code == 200: response_200 = WorkflowGroupResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowGroupResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowGroupResponse]: - """ Retrieves a workflow group + """Retrieves a workflow group Retrieves a specific workflow group by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowGroupResponse | None: - """ Retrieves a workflow group + """Retrieves a workflow group Retrieves a specific workflow group by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WorkflowGroupResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowGroupResponse]: - """ Retrieves a workflow group + """Retrieves a workflow group Retrieves a specific workflow group by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowGroupResponse | None: - """ Retrieves a workflow group + """Retrieves a workflow group Retrieves a specific workflow group by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WorkflowGroupResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_groups/list_workflow_groups.py b/rootly_sdk/api/workflow_groups/list_workflow_groups.py index 61535a4a..4a20aac8 100644 --- a/rootly_sdk/api/workflow_groups/list_workflow_groups.py +++ b/rootly_sdk/api/workflow_groups/list_workflow_groups.py @@ -20,11 +20,7 @@ def _get_kwargs( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -46,27 +42,21 @@ def _get_kwargs( params["filter[position]"] = filterposition - 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/workflow_groups", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowGroupList | None: if response.status_code == 200: response_200 = WorkflowGroupList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -96,9 +86,8 @@ def sync_detailed( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, - ) -> Response[WorkflowGroupList]: - """ List workflow groups + """List workflow groups List workflow groups @@ -119,20 +108,18 @@ def sync_detailed( Returns: Response[WorkflowGroupList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filterkind=filterkind, -filterexpanded=filterexpanded, -filterposition=filterposition, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filterkind=filterkind, + filterexpanded=filterexpanded, + filterposition=filterposition, ) response = client.get_httpx_client().request( @@ -141,6 +128,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -153,9 +141,8 @@ def sync( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, - ) -> WorkflowGroupList | None: - """ List workflow groups + """List workflow groups List workflow groups @@ -176,23 +163,22 @@ def sync( Returns: WorkflowGroupList - """ - + """ return sync_detailed( client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filterkind=filterkind, -filterexpanded=filterexpanded, -filterposition=filterposition, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filterkind=filterkind, + filterexpanded=filterexpanded, + filterposition=filterposition, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -205,9 +191,8 @@ async def asyncio_detailed( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, - ) -> Response[WorkflowGroupList]: - """ List workflow groups + """List workflow groups List workflow groups @@ -228,28 +213,25 @@ async def asyncio_detailed( Returns: Response[WorkflowGroupList] - """ - + """ kwargs = _get_kwargs( include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filterkind=filterkind, -filterexpanded=filterexpanded, -filterposition=filterposition, - + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filterkind=filterkind, + filterexpanded=filterexpanded, + filterposition=filterposition, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -262,9 +244,8 @@ async def asyncio( filterkind: str | Unset = UNSET, filterexpanded: bool | Unset = UNSET, filterposition: int | Unset = UNSET, - ) -> WorkflowGroupList | None: - """ List workflow groups + """List workflow groups List workflow groups @@ -285,19 +266,19 @@ async def asyncio( Returns: WorkflowGroupList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filterkind=filterkind, -filterexpanded=filterexpanded, -filterposition=filterposition, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filterkind=filterkind, + filterexpanded=filterexpanded, + filterposition=filterposition, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_groups/update_workflow_group.py b/rootly_sdk/api/workflow_groups/update_workflow_group.py index f07c29eb..f1922d9a 100644 --- a/rootly_sdk/api/workflow_groups/update_workflow_group.py +++ b/rootly_sdk/api/workflow_groups/update_workflow_group.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateWorkflowGroup, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflow_groups/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_groups/{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 | WorkflowGroupResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowGroupResponse | None: if response.status_code == 200: response_200 = WorkflowGroupResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowGroupResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowGroupResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflowGroup, - ) -> Response[ErrorsList | WorkflowGroupResponse]: - """ Update a workflow group + """Update a workflow group Update a specific workflow group by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowGroup, - ) -> ErrorsList | WorkflowGroupResponse | None: - """ Update a workflow group + """Update a workflow group Update a specific workflow group by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | WorkflowGroupResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowGroup, - ) -> Response[ErrorsList | WorkflowGroupResponse]: - """ Update a workflow group + """Update a workflow group Update a specific workflow group by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowGroupResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowGroup, - ) -> ErrorsList | WorkflowGroupResponse | None: - """ Update a workflow group + """Update a workflow group Update a specific workflow group by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | WorkflowGroupResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_runs/__init__.py b/rootly_sdk/api/workflow_runs/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/workflow_runs/__init__.py +++ b/rootly_sdk/api/workflow_runs/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/workflow_runs/create_workflow_run.py b/rootly_sdk/api/workflow_runs/create_workflow_run.py index 807401a1..70d53a0f 100644 --- a/rootly_sdk/api/workflow_runs/create_workflow_run.py +++ b/rootly_sdk/api/workflow_runs/create_workflow_run.py @@ -16,50 +16,40 @@ def _get_kwargs( workflow_id: str, *, body: NewWorkflowRun, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/workflows/{workflow_id}/workflow_runs".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/workflow_runs".format( + workflow_id=quote(str(workflow_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 | WorkflowRunResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowRunResponse | None: if response.status_code == 201: response_201 = WorkflowRunResponse.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: @@ -68,7 +58,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowRunResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowRunResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -82,9 +74,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowRun, - ) -> Response[ErrorsList | WorkflowRunResponse]: - """ Creates a workflow run + """Creates a workflow run Creates a new workflow run from provided data @@ -98,13 +89,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowRunResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -113,14 +102,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowRun, - ) -> ErrorsList | WorkflowRunResponse | None: - """ Creates a workflow run + """Creates a workflow run Creates a new workflow run from provided data @@ -134,24 +123,22 @@ def sync( Returns: ErrorsList | WorkflowRunResponse - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowRun, - ) -> Response[ErrorsList | WorkflowRunResponse]: - """ Creates a workflow run + """Creates a workflow run Creates a new workflow run from provided data @@ -165,29 +152,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowRunResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowRun, - ) -> ErrorsList | WorkflowRunResponse | None: - """ Creates a workflow run + """Creates a workflow run Creates a new workflow run from provided data @@ -201,12 +184,12 @@ async def asyncio( Returns: ErrorsList | WorkflowRunResponse - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_runs/list_workflow_runs.py b/rootly_sdk/api/workflow_runs/list_workflow_runs.py index 410344c1..236adc68 100644 --- a/rootly_sdk/api/workflow_runs/list_workflow_runs.py +++ b/rootly_sdk/api/workflow_runs/list_workflow_runs.py @@ -21,11 +21,7 @@ def _get_kwargs( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -47,27 +43,23 @@ def _get_kwargs( 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/workflows/{workflow_id}/workflow_runs".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/workflow_runs".format( + workflow_id=quote(str(workflow_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowRunsList | None: if response.status_code == 200: response_200 = WorkflowRunsList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -96,9 +88,8 @@ def sync_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[WorkflowRunsList]: - """ List workflow runs + """List workflow runs List workflow runs @@ -118,19 +109,17 @@ def sync_detailed( Returns: Response[WorkflowRunsList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ) response = client.get_httpx_client().request( @@ -139,6 +128,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, @@ -150,9 +140,8 @@ def sync( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> WorkflowRunsList | None: - """ List workflow runs + """List workflow runs List workflow runs @@ -172,22 +161,21 @@ def sync( Returns: WorkflowRunsList - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, ).parsed + async def asyncio_detailed( workflow_id: str, *, @@ -199,9 +187,8 @@ async def asyncio_detailed( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> Response[WorkflowRunsList]: - """ List workflow runs + """List workflow runs List workflow runs @@ -221,27 +208,24 @@ async def asyncio_detailed( Returns: Response[WorkflowRunsList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + 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 - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, @@ -253,9 +237,8 @@ async def asyncio( filtercreated_atgte: str | Unset = UNSET, filtercreated_atlt: str | Unset = UNSET, filtercreated_atlte: str | Unset = UNSET, - ) -> WorkflowRunsList | None: - """ List workflow runs + """List workflow runs List workflow runs @@ -275,18 +258,18 @@ async def asyncio( Returns: WorkflowRunsList - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_tasks/__init__.py b/rootly_sdk/api/workflow_tasks/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/workflow_tasks/__init__.py +++ b/rootly_sdk/api/workflow_tasks/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/workflow_tasks/create_workflow_task.py b/rootly_sdk/api/workflow_tasks/create_workflow_task.py index f1d81127..cc51608f 100644 --- a/rootly_sdk/api/workflow_tasks/create_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/create_workflow_task.py @@ -16,43 +16,35 @@ def _get_kwargs( workflow_id: str, *, body: NewWorkflowTask, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", - "url": "/v1/workflows/{workflow_id}/workflow_tasks".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/workflow_tasks".format( + workflow_id=quote(str(workflow_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 | WorkflowTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowTaskResponse | None: if response.status_code == 201: response_201 = WorkflowTaskResponse.from_dict(response.json()) - - return response_201 if response.status_code == 401: response_401 = ErrorsList.from_dict(response.json()) - - return response_401 if client.raise_on_unexpected_status: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflowTask, - ) -> Response[ErrorsList | WorkflowTaskResponse]: - """ Creates a workflow task + """Creates a workflow task Creates a new workflow task from provided data @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowTask, - ) -> ErrorsList | WorkflowTaskResponse | None: - """ Creates a workflow task + """Creates a workflow task Creates a new workflow task from provided data @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | WorkflowTaskResponse - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowTask, - ) -> Response[ErrorsList | WorkflowTaskResponse]: - """ Creates a workflow task + """Creates a workflow task Creates a new workflow task from provided data @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, client: AuthenticatedClient, body: NewWorkflowTask, - ) -> ErrorsList | WorkflowTaskResponse | None: - """ Creates a workflow task + """Creates a workflow task Creates a new workflow task from provided data @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | WorkflowTaskResponse - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_tasks/delete_workflow_task.py b/rootly_sdk/api/workflow_tasks/delete_workflow_task.py index 6838a0f6..5c119fa1 100644 --- a/rootly_sdk/api/workflow_tasks/delete_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/delete_workflow_task.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflow_tasks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowTaskResponse | None: if response.status_code == 200: response_200 = WorkflowTaskResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowTaskResponse]: - """ Delete a workflow task + """Delete a workflow task Delete a specific workflow task by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowTaskResponse | None: - """ Delete a workflow task + """Delete a workflow task Delete a specific workflow task by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WorkflowTaskResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowTaskResponse]: - """ Delete a workflow task + """Delete a workflow task Delete a specific workflow task by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowTaskResponse | None: - """ Delete a workflow task + """Delete a workflow task Delete a specific workflow task by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WorkflowTaskResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_tasks/get_workflow_task.py b/rootly_sdk/api/workflow_tasks/get_workflow_task.py index 6d2cf894..d2ceba25 100644 --- a/rootly_sdk/api/workflow_tasks/get_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/get_workflow_task.py @@ -13,37 +13,29 @@ def _get_kwargs( id: str, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "get", - "url": "/v1/workflow_tasks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_tasks/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowTaskResponse | None: if response.status_code == 200: response_200 = WorkflowTaskResponse.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: @@ -52,7 +44,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -65,9 +59,8 @@ def sync_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowTaskResponse]: - """ Retrieves a workflow task + """Retrieves a workflow task Retrieves a specific workflow_task by id @@ -80,12 +73,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -94,13 +85,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowTaskResponse | None: - """ Retrieves a workflow task + """Retrieves a workflow task Retrieves a specific workflow_task by id @@ -113,22 +104,20 @@ def sync( Returns: ErrorsList | WorkflowTaskResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowTaskResponse]: - """ Retrieves a workflow task + """Retrieves a workflow task Retrieves a specific workflow_task by id @@ -141,27 +130,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowTaskResponse | None: - """ Retrieves a workflow task + """Retrieves a workflow task Retrieves a specific workflow_task by id @@ -174,11 +159,11 @@ async def asyncio( Returns: ErrorsList | WorkflowTaskResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py index e90b20ce..cc404c3a 100644 --- a/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py +++ b/rootly_sdk/api/workflow_tasks/list_workflow_tasks.py @@ -27,11 +27,7 @@ def _get_kwargs( filterslugnot_eq: str | Unset = UNSET, filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -63,27 +59,23 @@ def _get_kwargs( params["filter[slug][not_in]"] = filterslugnot_in - 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/workflows/{workflow_id}/workflow_tasks".format(workflow_id=quote(str(workflow_id), safe=""),), + "url": "/v1/workflows/{workflow_id}/workflow_tasks".format( + workflow_id=quote(str(workflow_id), safe=""), + ), "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowTaskList | None: if response.status_code == 200: response_200 = WorkflowTaskList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -119,9 +111,8 @@ def sync_detailed( filterslugnot_eq: str | Unset = UNSET, filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, - ) -> Response[WorkflowTaskList]: - """ List workflow tasks + """List workflow tasks List workflow tasks @@ -148,26 +139,24 @@ def sync_detailed( Returns: Response[WorkflowTaskList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, ) response = client.get_httpx_client().request( @@ -176,6 +165,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( workflow_id: str, *, @@ -194,9 +184,8 @@ def sync( filterslugnot_eq: str | Unset = UNSET, filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, - ) -> WorkflowTaskList | None: - """ List workflow tasks + """List workflow tasks List workflow tasks @@ -223,29 +212,28 @@ def sync( Returns: WorkflowTaskList - """ - + """ return sync_detailed( workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, - + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, ).parsed + async def asyncio_detailed( workflow_id: str, *, @@ -264,9 +252,8 @@ async def asyncio_detailed( filterslugnot_eq: str | Unset = UNSET, filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, - ) -> Response[WorkflowTaskList]: - """ List workflow tasks + """List workflow tasks List workflow tasks @@ -293,34 +280,31 @@ async def asyncio_detailed( Returns: Response[WorkflowTaskList] - """ - + """ kwargs = _get_kwargs( workflow_id=workflow_id, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, - + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( workflow_id: str, *, @@ -339,9 +323,8 @@ async def asyncio( filterslugnot_eq: str | Unset = UNSET, filterslugin: str | Unset = UNSET, filterslugnot_in: str | Unset = UNSET, - ) -> WorkflowTaskList | None: - """ List workflow tasks + """List workflow tasks List workflow tasks @@ -368,25 +351,25 @@ async def asyncio( Returns: WorkflowTaskList - """ - - - return (await asyncio_detailed( - workflow_id=workflow_id, -client=client, -include=include, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, - - )).parsed + """ + + return ( + await asyncio_detailed( + workflow_id=workflow_id, + client=client, + include=include, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + ) + ).parsed diff --git a/rootly_sdk/api/workflow_tasks/update_workflow_task.py b/rootly_sdk/api/workflow_tasks/update_workflow_task.py index 99d59d37..3b045b86 100644 --- a/rootly_sdk/api/workflow_tasks/update_workflow_task.py +++ b/rootly_sdk/api/workflow_tasks/update_workflow_task.py @@ -16,43 +16,35 @@ def _get_kwargs( id: str, *, body: UpdateWorkflowTask, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflow_tasks/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflow_tasks/{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 | WorkflowTaskResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowTaskResponse | None: if response.status_code == 200: response_200 = WorkflowTaskResponse.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: @@ -61,7 +53,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowTaskResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowTaskResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -75,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflowTask, - ) -> Response[ErrorsList | WorkflowTaskResponse]: - """ Update a workflow task + """Update a workflow task Update a specific workflow task by id @@ -91,13 +84,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -106,14 +97,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowTask, - ) -> ErrorsList | WorkflowTaskResponse | None: - """ Update a workflow task + """Update a workflow task Update a specific workflow task by id @@ -127,24 +118,22 @@ def sync( Returns: ErrorsList | WorkflowTaskResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowTask, - ) -> Response[ErrorsList | WorkflowTaskResponse]: - """ Update a workflow task + """Update a workflow task Update a specific workflow task by id @@ -158,29 +147,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowTaskResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str, *, client: AuthenticatedClient, body: UpdateWorkflowTask, - ) -> ErrorsList | WorkflowTaskResponse | None: - """ Update a workflow task + """Update a workflow task Update a specific workflow task by id @@ -194,12 +179,12 @@ async def asyncio( Returns: ErrorsList | WorkflowTaskResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflows/__init__.py b/rootly_sdk/api/workflows/__init__.py index c9921b5f..2d7c0b23 100644 --- a/rootly_sdk/api/workflows/__init__.py +++ b/rootly_sdk/api/workflows/__init__.py @@ -1 +1 @@ -""" Contains endpoint functions for accessing the API """ +"""Contains endpoint functions for accessing the API""" diff --git a/rootly_sdk/api/workflows/create_workflow.py b/rootly_sdk/api/workflows/create_workflow.py index e442e251..2db8a745 100644 --- a/rootly_sdk/api/workflows/create_workflow.py +++ b/rootly_sdk/api/workflows/create_workflow.py @@ -14,15 +14,9 @@ def _get_kwargs( *, body: NewWorkflow, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "post", "url": "/v1/workflows", @@ -30,34 +24,28 @@ def _get_kwargs( _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 | WorkflowResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowResponse | None: if response.status_code == 201: response_201 = WorkflowResponse.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 == 403: response_403 = ErrorsList.from_dict(response.json()) - - return response_403 if client.raise_on_unexpected_status: @@ -66,7 +54,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -79,9 +69,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: NewWorkflow, - ) -> Response[ErrorsList | WorkflowResponse]: - """ Creates a workflow + """Creates a workflow Creates a new workflow from provided data @@ -94,12 +83,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) response = client.get_httpx_client().request( @@ -108,13 +95,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, body: NewWorkflow, - ) -> ErrorsList | WorkflowResponse | None: - """ Creates a workflow + """Creates a workflow Creates a new workflow from provided data @@ -127,22 +114,20 @@ def sync( Returns: ErrorsList | WorkflowResponse - """ - + """ return sync_detailed( client=client, -body=body, - + body=body, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, body: NewWorkflow, - ) -> Response[ErrorsList | WorkflowResponse]: - """ Creates a workflow + """Creates a workflow Creates a new workflow from provided data @@ -155,27 +140,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ - + """ kwargs = _get_kwargs( body=body, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, body: NewWorkflow, - ) -> ErrorsList | WorkflowResponse | None: - """ Creates a workflow + """Creates a workflow Creates a new workflow from provided data @@ -188,11 +169,11 @@ async def asyncio( Returns: ErrorsList | WorkflowResponse - """ + """ - - return (await asyncio_detailed( - client=client, -body=body, - - )).parsed + return ( + await asyncio_detailed( + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/api/workflows/delete_workflow.py b/rootly_sdk/api/workflows/delete_workflow.py index 25e1f741..c407da66 100644 --- a/rootly_sdk/api/workflows/delete_workflow.py +++ b/rootly_sdk/api/workflows/delete_workflow.py @@ -14,37 +14,29 @@ def _get_kwargs( id: str | UUID, - ) -> dict[str, Any]: - - - - - _kwargs: dict[str, Any] = { "method": "delete", - "url": "/v1/workflows/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflows/{id}".format( + id=quote(str(id), safe=""), + ), } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowResponse | None: if response.status_code == 200: response_200 = WorkflowResponse.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: @@ -53,7 +45,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -66,9 +60,8 @@ def sync_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowResponse]: - """ Delete a workflow + """Delete a workflow Delete a specific workflow by id @@ -81,12 +74,10 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) response = client.get_httpx_client().request( @@ -95,13 +86,13 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowResponse | None: - """ Delete a workflow + """Delete a workflow Delete a specific workflow by id @@ -114,22 +105,20 @@ def sync( Returns: ErrorsList | WorkflowResponse - """ - + """ return sync_detailed( id=id, -client=client, - + client=client, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, - ) -> Response[ErrorsList | WorkflowResponse]: - """ Delete a workflow + """Delete a workflow Delete a specific workflow by id @@ -142,27 +131,23 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ - + """ kwargs = _get_kwargs( id=id, - ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, - ) -> ErrorsList | WorkflowResponse | None: - """ Delete a workflow + """Delete a workflow Delete a specific workflow by id @@ -175,11 +160,11 @@ async def asyncio( Returns: ErrorsList | WorkflowResponse - """ - + """ - return (await asyncio_detailed( - id=id, -client=client, - - )).parsed + return ( + await asyncio_detailed( + id=id, + client=client, + ) + ).parsed diff --git a/rootly_sdk/api/workflows/get_workflow.py b/rootly_sdk/api/workflows/get_workflow.py index 54e1957f..905edf81 100644 --- a/rootly_sdk/api/workflows/get_workflow.py +++ b/rootly_sdk/api/workflows/get_workflow.py @@ -17,11 +17,7 @@ def _get_kwargs( id: str | UUID, *, include: GetWorkflowInclude | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -31,34 +27,30 @@ def _get_kwargs( params["include"] = json_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/workflows/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflows/{id}".format( + id=quote(str(id), safe=""), + ), "params": params, } - return _kwargs - -def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> ErrorsList | WorkflowResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowResponse | None: if response.status_code == 200: response_200 = WorkflowResponse.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: @@ -67,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -81,9 +75,8 @@ def sync_detailed( *, client: AuthenticatedClient, include: GetWorkflowInclude | Unset = UNSET, - ) -> Response[ErrorsList | WorkflowResponse]: - """ Retrieves a workflow + """Retrieves a workflow Retrieves a specific workflow by id @@ -97,13 +90,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) response = client.get_httpx_client().request( @@ -112,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, include: GetWorkflowInclude | Unset = UNSET, - ) -> ErrorsList | WorkflowResponse | None: - """ Retrieves a workflow + """Retrieves a workflow Retrieves a specific workflow by id @@ -133,24 +124,22 @@ def sync( Returns: ErrorsList | WorkflowResponse - """ - + """ return sync_detailed( id=id, -client=client, -include=include, - + client=client, + include=include, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, include: GetWorkflowInclude | Unset = UNSET, - ) -> Response[ErrorsList | WorkflowResponse]: - """ Retrieves a workflow + """Retrieves a workflow Retrieves a specific workflow by id @@ -164,29 +153,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ - + """ kwargs = _get_kwargs( id=id, -include=include, - + include=include, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, include: GetWorkflowInclude | Unset = UNSET, - ) -> ErrorsList | WorkflowResponse | None: - """ Retrieves a workflow + """Retrieves a workflow Retrieves a specific workflow by id @@ -200,12 +185,12 @@ async def asyncio( Returns: ErrorsList | WorkflowResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -include=include, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + include=include, + ) + ).parsed diff --git a/rootly_sdk/api/workflows/list_workflows.py b/rootly_sdk/api/workflows/list_workflows.py index a28d9c95..8b9f0bb3 100644 --- a/rootly_sdk/api/workflows/list_workflows.py +++ b/rootly_sdk/api/workflows/list_workflows.py @@ -32,11 +32,7 @@ def _get_kwargs( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> dict[str, Any]: - - - params: dict[str, Any] = {} @@ -86,27 +82,21 @@ def _get_kwargs( params["filter[name][not_in]"] = filternamenot_in - 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/workflows", "params": params, } - return _kwargs - def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> WorkflowList | None: if response.status_code == 200: response_200 = WorkflowList.from_dict(response.json()) - - return response_200 if client.raise_on_unexpected_status: @@ -146,9 +136,8 @@ def sync_detailed( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> Response[WorkflowList]: - """ List workflows + """List workflows List workflows @@ -179,30 +168,28 @@ def sync_detailed( Returns: Response[WorkflowList] - """ - + """ kwargs = _get_kwargs( include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) response = client.get_httpx_client().request( @@ -211,6 +198,7 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( *, client: AuthenticatedClient, @@ -233,9 +221,8 @@ def sync( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> WorkflowList | None: - """ List workflows + """List workflows List workflows @@ -266,33 +253,32 @@ def sync( Returns: WorkflowList - """ - + """ return sync_detailed( client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ).parsed + async def asyncio_detailed( *, client: AuthenticatedClient, @@ -315,9 +301,8 @@ async def asyncio_detailed( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> Response[WorkflowList]: - """ List workflows + """List workflows List workflows @@ -348,38 +333,35 @@ async def asyncio_detailed( Returns: Response[WorkflowList] - """ - + """ kwargs = _get_kwargs( include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( *, client: AuthenticatedClient, @@ -402,9 +384,8 @@ async def asyncio( filternamenot_eq: str | Unset = UNSET, filternamein: str | Unset = UNSET, filternamenot_in: str | Unset = UNSET, - ) -> WorkflowList | None: - """ List workflows + """List workflows List workflows @@ -435,29 +416,29 @@ async def asyncio( Returns: WorkflowList - """ - - - return (await asyncio_detailed( - client=client, -include=include, -sort=sort, -pagenumber=pagenumber, -pagesize=pagesize, -filtersearch=filtersearch, -filtername=filtername, -filterslug=filterslug, -filtercreated_atgt=filtercreated_atgt, -filtercreated_atgte=filtercreated_atgte, -filtercreated_atlt=filtercreated_atlt, -filtercreated_atlte=filtercreated_atlte, -filterslugeq=filterslugeq, -filterslugnot_eq=filterslugnot_eq, -filterslugin=filterslugin, -filterslugnot_in=filterslugnot_in, -filternameeq=filternameeq, -filternamenot_eq=filternamenot_eq, -filternamein=filternamein, -filternamenot_in=filternamenot_in, - - )).parsed + """ + + return ( + await asyncio_detailed( + client=client, + include=include, + sort=sort, + pagenumber=pagenumber, + pagesize=pagesize, + filtersearch=filtersearch, + filtername=filtername, + filterslug=filterslug, + filtercreated_atgt=filtercreated_atgt, + filtercreated_atgte=filtercreated_atgte, + filtercreated_atlt=filtercreated_atlt, + filtercreated_atlte=filtercreated_atlte, + filterslugeq=filterslugeq, + filterslugnot_eq=filterslugnot_eq, + filterslugin=filterslugin, + filterslugnot_in=filterslugnot_in, + filternameeq=filternameeq, + filternamenot_eq=filternamenot_eq, + filternamein=filternamein, + filternamenot_in=filternamenot_in, + ) + ).parsed diff --git a/rootly_sdk/api/workflows/update_workflow.py b/rootly_sdk/api/workflows/update_workflow.py index cd73da6f..aa48bba6 100644 --- a/rootly_sdk/api/workflows/update_workflow.py +++ b/rootly_sdk/api/workflows/update_workflow.py @@ -17,50 +17,40 @@ def _get_kwargs( id: str | UUID, *, body: UpdateWorkflow, - ) -> dict[str, Any]: headers: dict[str, Any] = {} - - - - - _kwargs: dict[str, Any] = { "method": "put", - "url": "/v1/workflows/{id}".format(id=quote(str(id), safe=""),), + "url": "/v1/workflows/{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 | WorkflowResponse | None: +def _parse_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> ErrorsList | WorkflowResponse | None: if response.status_code == 200: response_200 = WorkflowResponse.from_dict(response.json()) - - return response_200 if response.status_code == 403: response_403 = ErrorsList.from_dict(response.json()) - - return response_403 if response.status_code == 404: response_404 = ErrorsList.from_dict(response.json()) - - return response_404 if client.raise_on_unexpected_status: @@ -69,7 +59,9 @@ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Res return None -def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[ErrorsList | WorkflowResponse]: +def _build_response( + *, client: AuthenticatedClient | Client, response: httpx.Response +) -> Response[ErrorsList | WorkflowResponse]: return Response( status_code=HTTPStatus(response.status_code), content=response.content, @@ -83,9 +75,8 @@ def sync_detailed( *, client: AuthenticatedClient, body: UpdateWorkflow, - ) -> Response[ErrorsList | WorkflowResponse]: - """ Update a workflow + """Update a workflow Update a specific workflow by id @@ -99,13 +90,11 @@ def sync_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) response = client.get_httpx_client().request( @@ -114,14 +103,14 @@ def sync_detailed( return _build_response(client=client, response=response) + def sync( id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, - ) -> ErrorsList | WorkflowResponse | None: - """ Update a workflow + """Update a workflow Update a specific workflow by id @@ -135,24 +124,22 @@ def sync( Returns: ErrorsList | WorkflowResponse - """ - + """ return sync_detailed( id=id, -client=client, -body=body, - + client=client, + body=body, ).parsed + async def asyncio_detailed( id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, - ) -> Response[ErrorsList | WorkflowResponse]: - """ Update a workflow + """Update a workflow Update a specific workflow by id @@ -166,29 +153,25 @@ async def asyncio_detailed( Returns: Response[ErrorsList | WorkflowResponse] - """ - + """ kwargs = _get_kwargs( id=id, -body=body, - + body=body, ) - response = await client.get_async_httpx_client().request( - **kwargs - ) + response = await client.get_async_httpx_client().request(**kwargs) return _build_response(client=client, response=response) + async def asyncio( id: str | UUID, *, client: AuthenticatedClient, body: UpdateWorkflow, - ) -> ErrorsList | WorkflowResponse | None: - """ Update a workflow + """Update a workflow Update a specific workflow by id @@ -202,12 +185,12 @@ async def asyncio( Returns: ErrorsList | WorkflowResponse - """ - - - return (await asyncio_detailed( - id=id, -client=client, -body=body, - - )).parsed + """ + + return ( + await asyncio_detailed( + id=id, + client=client, + body=body, + ) + ).parsed diff --git a/rootly_sdk/client.py b/rootly_sdk/client.py index 92d39e90..1b7055ab 100644 --- a/rootly_sdk/client.py +++ b/rootly_sdk/client.py @@ -33,6 +33,7 @@ class Client: status code that was not documented in the source OpenAPI document. Can also be provided as a keyword argument to the constructor. """ + raise_on_unexpected_status: bool = field(default=False, kw_only=True) _base_url: str = field(alias="base_url") _cookies: dict[str, str] = field(factory=dict, kw_only=True, alias="cookies") @@ -265,4 +266,3 @@ async def __aenter__(self) -> "AuthenticatedClient": async def __aexit__(self, *args: Any, **kwargs: Any) -> None: """Exit a context manager for underlying httpx.AsyncClient (see httpx docs)""" await self.get_async_httpx_client().__aexit__(*args, **kwargs) - diff --git a/rootly_sdk/errors.py b/rootly_sdk/errors.py index b912123d..5f92e76a 100644 --- a/rootly_sdk/errors.py +++ b/rootly_sdk/errors.py @@ -1,4 +1,5 @@ -""" Contains shared errors types that can be raised from API functions """ +"""Contains shared errors types that can be raised from API functions""" + class UnexpectedStatus(Exception): """Raised by api functions when the response status an undocumented status and Client.raise_on_unexpected_status is True""" @@ -11,4 +12,5 @@ def __init__(self, status_code: int, content: bytes): f"Unexpected status code: {status_code}\n\nResponse content:\n{content.decode(errors='ignore')}" ) + __all__ = ["UnexpectedStatus"] diff --git a/rootly_sdk/types.py b/rootly_sdk/types.py index b9fb2f7e..b64af095 100644 --- a/rootly_sdk/types.py +++ b/rootly_sdk/types.py @@ -1,4 +1,4 @@ -""" Contains some shared types for properties """ +"""Contains some shared types for properties""" from collections.abc import Mapping, MutableMapping from http import HTTPStatus @@ -24,16 +24,17 @@ def __bool__(self) -> Literal[False]: ) RequestFiles = list[tuple[str, FileTypes]] + @define class File: - """ Contains information for file uploads """ + """Contains information for file uploads""" payload: BinaryIO file_name: str | None = None mime_type: str | None = None def to_tuple(self) -> FileTypes: - """ Return a tuple representation that httpx will accept for multipart/form-data """ + """Return a tuple representation that httpx will accept for multipart/form-data""" return self.file_name, self.payload, self.mime_type @@ -42,7 +43,7 @@ def to_tuple(self) -> FileTypes: @define class Response(Generic[T]): - """ A response from an endpoint """ + """A response from an endpoint""" status_code: HTTPStatus content: bytes